/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var PCe=Object.create;var Th=Object.defineProperty;var J3=Object.getOwnPropertyDescriptor;var _Ce=Object.getOwnPropertyNames;var MCe=Object.getPrototypeOf,ACe=Object.prototype.hasOwnProperty;var X3=r=>{throw TypeError(r)};var ICe=(r,e,t)=>e in r?Th(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var b=(r,e)=>()=>(r&&(e=r(r=0)),e);var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ke=(r,e)=>{for(var t in e)Th(r,t,{get:e[t],enumerable:!0})},e6=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of _Ce(e))!ACe.call(r,a)&&a!==t&&Th(r,a,{get:()=>e[a],enumerable:!(n=J3(e,a))||n.enumerable});return r};var We=(r,e,t)=>(t=r!=null?PCe(MCe(r)):{},e6(e||!r||!r.__esModule?Th(t,"default",{value:r,enumerable:!0}):t,r)),Lo=r=>e6(Th({},"__esModule",{value:!0}),r),Ye=(r,e,t,n)=>{for(var a=n>1?void 0:n?J3(e,t):e,s=r.length-1,i;s>=0;s--)(i=r[s])&&(a=(n?i(e,t,a):i(a))||a);return n&&a&&Th(e,t,a),a};var _=(r,e,t)=>ICe(r,typeof e!="symbol"?e+"":e,t),t6=(r,e,t)=>e.has(r)||X3("Cannot "+t);var di=(r,e,t)=>(t6(r,e,"read from private field"),t?t.call(r):e.get(r)),qu=(r,e,t)=>e.has(r)?X3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),ql=(r,e,t,n)=>(t6(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);var NCe,zct,cE,r6,mA,hA,RCe,n6,Bct,OCe,FCe,qct,fA,kh=b(()=>{NCe=Math.pow(10,8)*24*60*60*1e3,zct=-NCe,cE=6048e5,r6=864e5,mA=6e4,hA=36e5,RCe=3600,n6=RCe*24,Bct=n6*7,OCe=n6*365.2425,FCe=OCe/12,qct=FCe*3,fA=Symbol.for("constructDateFrom")});function qr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&fA in r?r[fA](e):r instanceof Date?new r.constructor(e):new Date(e)}var ui=b(()=>{kh()});function Qe(r,e){return qr(e||r,r)}var Hr=b(()=>{ui()});function Hl(r,e,t){let n=Qe(r,t==null?void 0:t.in);return isNaN(e)?qr((t==null?void 0:t.in)||r,NaN):(e&&n.setDate(n.getDate()+e),n)}var Oy=b(()=>{ui();Hr()});function wh(r,e,t){let n=Qe(r,t==null?void 0:t.in);if(isNaN(e))return qr((t==null?void 0:t.in)||r,NaN);if(!e)return n;let a=n.getDate(),s=qr((t==null?void 0:t.in)||r,n.getTime());s.setMonth(n.getMonth()+e+1,0);let i=s.getDate();return a>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),a),n)}var dE=b(()=>{ui();Hr()});function Sh(r,e,t){let{years:n=0,months:a=0,weeks:s=0,days:i=0,hours:o=0,minutes:l=0,seconds:c=0}=e,d=Qe(r,t==null?void 0:t.in),u=a||n?wh(d,a+n*12):d,p=i||s?Hl(u,i+s*7):u,m=l+o*60,f=(c+m*60)*1e3;return qr((t==null?void 0:t.in)||r,+p+f)}var a6=b(()=>{Oy();dE();ui();Hr()});var s6=b(()=>{});var i6=b(()=>{});var o6=b(()=>{});var l6=b(()=>{});var c6=b(()=>{});var d6=b(()=>{});function $o(){return LCe}var LCe,Eh=b(()=>{LCe={}});function Aa(r,e){var o,l,c,d,u,p,m,h;let t=$o(),n=(h=(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?h:0,a=Qe(r,e==null?void 0:e.in),s=a.getDay(),i=(s{Eh();Hr()});function Hu(r,e){return Aa(r,{...e,weekStartsOn:1})}var Fy=b(()=>{xh()});function uE(r,e){let t=Qe(r,e==null?void 0:e.in),n=t.getFullYear(),a=qr(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let s=Hu(a),i=qr(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let o=Hu(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}var pE=b(()=>{ui();Fy();Hr()});function gA(r){let e=Qe(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}var u6=b(()=>{Hr()});function mE(r,...e){let t=qr.bind(null,r||e.find(n=>typeof n=="object"));return e.map(t)}var yA=b(()=>{ui()});function Ia(r,e){let t=Qe(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}var hE=b(()=>{Hr()});function p6(r,e,t){let[n,a]=mE(t==null?void 0:t.in,r,e),s=Ia(n),i=Ia(a),o=+s-gA(s),l=+i-gA(i);return Math.round((o-l)/r6)}var vA=b(()=>{u6();yA();kh();hE()});function m6(r,e){let t=uE(r,e),n=qr((e==null?void 0:e.in)||r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Hu(n)}var bA=b(()=>{ui();pE();Fy()});var h6=b(()=>{});var f6=b(()=>{});var g6=b(()=>{});var y6=b(()=>{});var v6=b(()=>{});function b6(r,e,t){return Hl(r,e*7,t)}var T6=b(()=>{Oy()});function k6(r,e,t){return wh(r,e*12,t)}var w6=b(()=>{dE()});var S6=b(()=>{});var E6=b(()=>{});var x6=b(()=>{});var D6=b(()=>{});var C6=b(()=>{});var P6=b(()=>{});var _6=b(()=>{});var M6=b(()=>{});var A6=b(()=>{});var I6=b(()=>{});function TA(r,e,t){let[n,a]=mE(t==null?void 0:t.in,r,e);return+Ia(n)==+Ia(a)}var N6=b(()=>{yA();hE()});function R6(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}var kA=b(()=>{});function Rn(r){return!(!R6(r)&&typeof r!="number"||isNaN(+Qe(r)))}var wA=b(()=>{kA();Hr()});var O6=b(()=>{});var F6=b(()=>{});var L6=b(()=>{});var $6=b(()=>{});var j6=b(()=>{});var z6=b(()=>{});var B6=b(()=>{});var q6=b(()=>{});var H6=b(()=>{});var U6=b(()=>{});var V6=b(()=>{});var W6=b(()=>{});var Y6=b(()=>{});var G6=b(()=>{});function Ly(r,e){let t=Qe(r,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}var Z6=b(()=>{Hr()});function fE(r,e){let t=Qe(r,e==null?void 0:e.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}var K6=b(()=>{Hr()});var Q6=b(()=>{});var J6=b(()=>{});var X6=b(()=>{});var eZ=b(()=>{});var tZ=b(()=>{});var rZ=b(()=>{});var nZ=b(()=>{});var aZ=b(()=>{});var sZ=b(()=>{});var iZ=b(()=>{});var oZ=b(()=>{});var lZ=b(()=>{});var cZ=b(()=>{});var dZ=b(()=>{});function gE(r,e){let t=Qe(r,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}var uZ=b(()=>{Hr()});var pZ=b(()=>{});function mZ(r,e){let t=Qe(r,e==null?void 0:e.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}var hZ=b(()=>{Hr()});function yE(r,e){let t=Qe(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}var SA=b(()=>{Hr()});var fZ=b(()=>{});var gZ=b(()=>{});var yZ=b(()=>{});var vZ=b(()=>{});function Dh(r,e){var o,l,c,d,u,p,m,h;let t=$o(),n=(h=(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?h:0,a=Qe(r,e==null?void 0:e.in),s=a.getDay(),i=(s{Eh();Hr()});var TZ=b(()=>{});var kZ=b(()=>{});var wZ=b(()=>{});var SZ=b(()=>{});var EZ=b(()=>{});var xZ=b(()=>{});var DZ=b(()=>{});var CZ=b(()=>{});var $Ce,PZ,_Z=b(()=>{$Ce={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"}},PZ=(r,e,t)=>{let n,a=$Ce[r];return typeof a=="string"?n=a:e===1?n=a.one:n=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n}});function vE(r){return(e={})=>{let t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}var MZ=b(()=>{});var jCe,zCe,BCe,AZ,IZ=b(()=>{MZ();jCe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zCe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BCe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},AZ={date:vE({formats:jCe,defaultWidth:"full"}),time:vE({formats:zCe,defaultWidth:"full"}),dateTime:vE({formats:BCe,defaultWidth:"full"})}});var qCe,NZ,RZ=b(()=>{qCe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},NZ=(r,e,t,n)=>qCe[r]});function Ch(r){return(e,t)=>{let n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&r.formattingValues){let i=r.defaultFormattingWidth||r.defaultWidth,o=t!=null&&t.width?String(t.width):i;a=r.formattingValues[o]||r.formattingValues[i]}else{let i=r.defaultWidth,o=t!=null&&t.width?String(t.width):r.defaultWidth;a=r.values[o]||r.values[i]}let s=r.argumentCallback?r.argumentCallback(e):e;return a[s]}}var OZ=b(()=>{});var HCe,UCe,VCe,WCe,YCe,GCe,ZCe,FZ,LZ=b(()=>{OZ();HCe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UCe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VCe={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"]},WCe={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"]},YCe={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"}},GCe={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"}},ZCe=(r,e)=>{let t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},FZ={ordinalNumber:ZCe,era:Ch({values:HCe,defaultWidth:"wide"}),quarter:Ch({values:UCe,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ch({values:VCe,defaultWidth:"wide"}),day:Ch({values:WCe,defaultWidth:"wide"}),dayPeriod:Ch({values:YCe,defaultWidth:"wide",formattingValues:GCe,defaultFormattingWidth:"wide"})}});function Ph(r){return(e,t={})=>{let n=t.width,a=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(a);if(!s)return null;let i=s[0],o=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(o)?QCe(o,u=>u.test(i)):KCe(o,u=>u.test(i)),c;c=r.valueCallback?r.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;let d=e.slice(i.length);return{value:c,rest:d}}}function KCe(r,e){for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function QCe(r,e){for(let t=0;t{});function jZ(r){return(e,t={})=>{let n=e.match(r.matchPattern);if(!n)return null;let a=n[0],s=e.match(r.parsePattern);if(!s)return null;let i=r.valueCallback?r.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;let o=e.slice(a.length);return{value:i,rest:o}}}var zZ=b(()=>{});var JCe,XCe,e0e,t0e,r0e,n0e,a0e,s0e,i0e,o0e,l0e,c0e,BZ,qZ=b(()=>{$Z();zZ();JCe=/^(\d+)(th|st|nd|rd)?/i,XCe=/\d+/i,e0e={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},t0e={any:[/^b/i,/^(a|c)/i]},r0e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},n0e={any:[/1/i,/2/i,/3/i,/4/i]},a0e={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},s0e={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]},i0e={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},o0e={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]},l0e={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},c0e={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}},BZ={ordinalNumber:jZ({matchPattern:JCe,parsePattern:XCe,valueCallback:r=>parseInt(r,10)}),era:Ph({matchPatterns:e0e,defaultMatchWidth:"wide",parsePatterns:t0e,defaultParseWidth:"any"}),quarter:Ph({matchPatterns:r0e,defaultMatchWidth:"wide",parsePatterns:n0e,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ph({matchPatterns:a0e,defaultMatchWidth:"wide",parsePatterns:s0e,defaultParseWidth:"any"}),day:Ph({matchPatterns:i0e,defaultMatchWidth:"wide",parsePatterns:o0e,defaultParseWidth:"any"}),dayPeriod:Ph({matchPatterns:l0e,defaultMatchWidth:"any",parsePatterns:c0e,defaultParseWidth:"any"})}});var EA,HZ=b(()=>{_Z();IZ();RZ();LZ();qZ();EA={code:"en-US",formatDistance:PZ,formatLong:AZ,formatRelative:NZ,localize:FZ,match:BZ,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var UZ=b(()=>{HZ()});function VZ(r,e){let t=Qe(r,e==null?void 0:e.in);return p6(t,yE(t))+1}var xA=b(()=>{vA();SA();Hr()});function WZ(r,e){let t=Qe(r,e==null?void 0:e.in),n=+Hu(t)-+m6(t);return Math.round(n/cE)+1}var DA=b(()=>{kh();Fy();bA();Hr()});function bE(r,e){var d,u,p,m,h,f,g,y;let t=Qe(r,e==null?void 0:e.in),n=t.getFullYear(),a=$o(),s=(y=(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:(f=(h=a.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)!=null?y:1,i=qr((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let o=Aa(i,e),l=qr((e==null?void 0:e.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);let c=Aa(l,e);return+t>=+o?n+1:+t>=+c?n:n-1}var TE=b(()=>{Eh();ui();xh();Hr()});function YZ(r,e){var o,l,c,d,u,p,m,h;let t=$o(),n=(h=(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?h:1,a=bE(r,e),s=qr((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),Aa(s,e)}var CA=b(()=>{Eh();ui();TE();xh()});function GZ(r,e){let t=Qe(r,e==null?void 0:e.in),n=+Aa(t,e)-+YZ(t,e);return Math.round(n/cE)+1}var PA=b(()=>{kh();xh();CA();Hr()});function Kt(r,e){let t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}var _A=b(()=>{});var Ul,ZZ=b(()=>{_A();Ul={y(r,e){let t=r.getFullYear(),n=t>0?t:1-t;return Kt(e==="yy"?n%100:n,e.length)},M(r,e){let t=r.getMonth();return e==="M"?String(t+1):Kt(t+1,2)},d(r,e){return Kt(r.getDate(),e.length)},a(r,e){let t=r.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(r,e){return Kt(r.getHours()%12||12,e.length)},H(r,e){return Kt(r.getHours(),e.length)},m(r,e){return Kt(r.getMinutes(),e.length)},s(r,e){return Kt(r.getSeconds(),e.length)},S(r,e){let t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return Kt(a,e.length)}}});function KZ(r,e=""){let t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+Kt(s,2)}function QZ(r,e){return r%60===0?(r>0?"-":"+")+Kt(Math.abs(r)/60,2):Uu(r,e)}function Uu(r,e=""){let t=r>0?"-":"+",n=Math.abs(r),a=Kt(Math.trunc(n/60),2),s=Kt(n%60,2);return t+a+e+s}var _h,MA,JZ=b(()=>{xA();DA();pE();PA();TE();_A();ZZ();_h={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MA={G:function(r,e,t){let n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){let n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return Ul.y(r,e)},Y:function(r,e,t,n){let a=bE(r,n),s=a>0?a:1-a;if(e==="YY"){let i=s%100;return Kt(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Kt(s,e.length)},R:function(r,e){let t=uE(r);return Kt(t,e.length)},u:function(r,e){let t=r.getFullYear();return Kt(t,e.length)},Q:function(r,e,t){let n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Kt(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){let n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Kt(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){let n=r.getMonth();switch(e){case"M":case"MM":return Ul.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){let n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Kt(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){let a=GZ(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):Kt(a,e.length)},I:function(r,e,t){let n=WZ(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Kt(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Ul.d(r,e)},D:function(r,e,t){let n=VZ(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Kt(n,e.length)},E:function(r,e,t){let n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){let a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Kt(s,2);case"eo":return t.ordinalNumber(s,{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(r,e,t,n){let a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Kt(s,e.length);case"co":return t.ordinalNumber(s,{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(r,e,t){let n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return Kt(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){let a=r.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(r,e,t){let n=r.getHours(),a;switch(n===12?a=_h.noon:n===0?a=_h.midnight:a=n/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(r,e,t){let n=r.getHours(),a;switch(n>=17?a=_h.evening:n>=12?a=_h.afternoon:n>=4?a=_h.morning:a=_h.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(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Ul.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Ul.H(r,e)},K:function(r,e,t){let n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Kt(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Kt(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Ul.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Ul.s(r,e)},S:function(r,e){return Ul.S(r,e)},X:function(r,e,t){let n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return QZ(n);case"XXXX":case"XX":return Uu(n);case"XXXXX":case"XXX":default:return Uu(n,":")}},x:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"x":return QZ(n);case"xxxx":case"xx":return Uu(n);case"xxxxx":case"xxx":default:return Uu(n,":")}},O:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+KZ(n,":");case"OOOO":default:return"GMT"+Uu(n,":")}},z:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+KZ(n,":");case"zzzz":default:return"GMT"+Uu(n,":")}},t:function(r,e,t){let n=Math.trunc(+r/1e3);return Kt(n,e.length)},T:function(r,e,t){return Kt(+r,e.length)}}});var XZ,eK,d0e,tK,rK=b(()=>{XZ=(r,e)=>{switch(r){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"})}},eK=(r,e)=>{switch(r){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"})}},d0e=(r,e)=>{let t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return XZ(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",XZ(n,e)).replace("{{time}}",eK(a,e))},tK={p:eK,P:d0e}});function nK(r){return u0e.test(r)}function aK(r){return p0e.test(r)}function sK(r,e,t){let n=h0e(r,e,t);if(console.warn(n),m0e.includes(r))throw new RangeError(n)}function h0e(r,e,t){let n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var u0e,p0e,m0e,iK=b(()=>{u0e=/^D+$/,p0e=/^Y+$/,m0e=["D","DD","YY","YYYY"]});function D(r,e,t){var d,u,p,m,h,f,g,y,k,T,w,S,x,C,M,N,F,G;let n=$o(),a=(u=(d=t==null?void 0:t.locale)!=null?d:n.locale)!=null?u:EA,s=(T=(k=(f=(h=t==null?void 0:t.firstWeekContainsDate)!=null?h:(m=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:n.firstWeekContainsDate)!=null?k:(y=(g=n.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)!=null?T:1,i=(G=(F=(C=(x=t==null?void 0:t.weekStartsOn)!=null?x:(S=(w=t==null?void 0:t.locale)==null?void 0:w.options)==null?void 0:S.weekStartsOn)!=null?C:n.weekStartsOn)!=null?F:(N=(M=n.locale)==null?void 0:M.options)==null?void 0:N.weekStartsOn)!=null?G:0,o=Qe(r,t==null?void 0:t.in);if(!Rn(o))throw new RangeError("Invalid time value");let l=e.match(g0e).map(R=>{let A=R[0];if(A==="p"||A==="P"){let I=tK[A];return I(R,a.formatLong)}return R}).join("").match(f0e).map(R=>{if(R==="''")return{isToken:!1,value:"'"};let A=R[0];if(A==="'")return{isToken:!1,value:T0e(R)};if(MA[A])return{isToken:!0,value:R};if(A.match(b0e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:R}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(R=>{if(!R.isToken)return R.value;let A=R.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&aK(A)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&nK(A))&&sK(A,e,String(r));let I=MA[A[0]];return I(o,A,a.localize,c)}).join("")}function T0e(r){let e=r.match(y0e);return e?e[1].replace(v0e,"'"):r}var f0e,g0e,y0e,v0e,b0e,oK=b(()=>{UZ();Eh();JZ();rK();iK();wA();Hr();f0e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g0e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,y0e=/^'([^]*?)'?$/,v0e=/''/g,b0e=/[a-zA-Z]/});var lK=b(()=>{});var cK=b(()=>{});var dK=b(()=>{});var uK=b(()=>{});var pK=b(()=>{});var mK=b(()=>{});var hK=b(()=>{});var fK=b(()=>{});var gK=b(()=>{});var yK=b(()=>{});var vK=b(()=>{});var bK=b(()=>{});var TK=b(()=>{});var kK=b(()=>{});var wK=b(()=>{});var SK=b(()=>{});var EK=b(()=>{});var xK=b(()=>{});var DK=b(()=>{});var CK=b(()=>{});var PK=b(()=>{});var _K=b(()=>{});var MK=b(()=>{});var AK=b(()=>{});var IK=b(()=>{});var NK=b(()=>{});var RK=b(()=>{});var OK=b(()=>{});var FK=b(()=>{});var LK=b(()=>{});var $K=b(()=>{});var jK=b(()=>{});var zK=b(()=>{});var BK=b(()=>{});var qK=b(()=>{});var HK=b(()=>{});var UK=b(()=>{});var VK=b(()=>{});var WK=b(()=>{});var YK=b(()=>{});var GK=b(()=>{});function AA(r,e){return+Qe(r)<+Qe(e)}var ZK=b(()=>{Hr()});var KK=b(()=>{});var QK=b(()=>{});var JK=b(()=>{});var XK=b(()=>{});var e5=b(()=>{});var t5=b(()=>{});var r5=b(()=>{});var n5=b(()=>{});var a5=b(()=>{});var s5=b(()=>{});var i5=b(()=>{});var o5=b(()=>{});var l5=b(()=>{});var c5=b(()=>{});var d5=b(()=>{});var u5=b(()=>{});var p5=b(()=>{});var m5=b(()=>{});var h5=b(()=>{});var f5=b(()=>{});var g5=b(()=>{});var y5=b(()=>{});var v5=b(()=>{});var b5=b(()=>{});var T5=b(()=>{});var k5=b(()=>{});var w5=b(()=>{});var S5=b(()=>{});var E5=b(()=>{});var x5=b(()=>{});var D5=b(()=>{});var C5=b(()=>{});var P5=b(()=>{});var _5=b(()=>{});var M5=b(()=>{});var A5=b(()=>{});var I5=b(()=>{});var N5=b(()=>{});var R5=b(()=>{});var O5=b(()=>{});function Mh(r,e,t){return Hl(r,-e,t)}var F5=b(()=>{Oy()});var L5=b(()=>{});var $5=b(()=>{});var j5=b(()=>{});var z5=b(()=>{});var B5=b(()=>{});var q5=b(()=>{});var H5=b(()=>{});var U5=b(()=>{});var V5=b(()=>{});var W5=b(()=>{});var Y5=b(()=>{});var G5=b(()=>{});var Z5=b(()=>{});var K5=b(()=>{});var Q5=b(()=>{});var J5=b(()=>{});var X5=b(()=>{});var e9=b(()=>{});var t9=b(()=>{});var r9=b(()=>{});var n9=b(()=>{});var a9=b(()=>{});var s9=b(()=>{});var i9=b(()=>{});var o9=b(()=>{});function to(r,e){var c;let t=()=>qr(e==null?void 0:e.in,NaN),n=(c=e==null?void 0:e.additionalDigits)!=null?c:2,a=E0e(r),s;if(a.date){let d=x0e(a.date,n);s=D0e(d.restDateString,d.year)}if(!s||isNaN(+s))return t();let i=+s,o=0,l;if(a.time&&(o=C0e(a.time),isNaN(o)))return t();if(a.timezone){if(l=P0e(a.timezone),isNaN(l))return t()}else{let d=new Date(i+o),u=Qe(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 Qe(i+o+l,e==null?void 0:e.in)}function E0e(r){let e={},t=r.split(kE.dateTimeDelimiter),n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],kE.timeZoneDelimiter.test(e.date)&&(e.date=r.split(kE.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){let a=kE.timezone.exec(n);a?(e.time=n.replace(a[1],""),e.timezone=a[1]):e.time=n}return e}function x0e(r,e){let t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};let a=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:s===null?a:s*100,restDateString:r.slice((n[1]||n[2]).length)}}function D0e(r,e){if(e===null)return new Date(NaN);let t=r.match(k0e);if(!t)return new Date(NaN);let n=!!t[4],a=$y(t[1]),s=$y(t[2])-1,i=$y(t[3]),o=$y(t[4]),l=$y(t[5])-1;if(n)return N0e(e,o,l)?_0e(e,o,l):new Date(NaN);{let c=new Date(0);return!A0e(e,s,i)||!I0e(e,a)?new Date(NaN):(c.setUTCFullYear(e,s,Math.max(a,i)),c)}}function $y(r){return r?parseInt(r):1}function C0e(r){let e=r.match(w0e);if(!e)return NaN;let t=IA(e[1]),n=IA(e[2]),a=IA(e[3]);return R0e(t,n,a)?t*hA+n*mA+a*1e3:NaN}function IA(r){return r&&parseFloat(r.replace(",","."))||0}function P0e(r){if(r==="Z")return 0;let e=r.match(S0e);if(!e)return 0;let t=e[1]==="+"?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return O0e(n,a)?t*(n*hA+a*mA):NaN}function _0e(r,e,t){let n=new Date(0);n.setUTCFullYear(r,0,4);let a=n.getUTCDay()||7,s=(e-1)*7+t+1-a;return n.setUTCDate(n.getUTCDate()+s),n}function l9(r){return r%400===0||r%4===0&&r%100!==0}function A0e(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(M0e[e]||(l9(r)?29:28))}function I0e(r,e){return e>=1&&e<=(l9(r)?366:365)}function N0e(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function R0e(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function O0e(r,e){return e>=0&&e<=59}var kE,k0e,w0e,S0e,M0e,c9=b(()=>{kh();ui();Hr();kE={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},k0e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,w0e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,S0e=/^([+-])(\d{2})(?::?(\d{2}))?$/;M0e=[31,null,31,30,31,30,31,31,30,31,30,31]});var d9=b(()=>{});var u9=b(()=>{});var p9=b(()=>{});var m9=b(()=>{});var h9=b(()=>{});var f9=b(()=>{});var g9=b(()=>{});var y9=b(()=>{});var v9=b(()=>{});var b9=b(()=>{});var T9=b(()=>{});var k9=b(()=>{});var w9=b(()=>{});var S9=b(()=>{});var E9=b(()=>{});var x9=b(()=>{});var D9=b(()=>{});var C9=b(()=>{});var P9=b(()=>{});var _9=b(()=>{});var M9=b(()=>{});var A9=b(()=>{});var I9=b(()=>{});var N9=b(()=>{});var R9=b(()=>{});var O9=b(()=>{});var F9=b(()=>{});var L9=b(()=>{});var $9=b(()=>{});var j9=b(()=>{});var z9=b(()=>{});var B9=b(()=>{});var q9=b(()=>{});var H9=b(()=>{});var U9=b(()=>{});var V9=b(()=>{});var W9=b(()=>{});var Y9=b(()=>{});var G9=b(()=>{});var Z9=b(()=>{});var K9=b(()=>{});var Q9=b(()=>{});var J9=b(()=>{});var X9=b(()=>{});var e8=b(()=>{});var t8=b(()=>{});var Qr=b(()=>{a6();l6();Oy();d6();f6();c6();g6();dE();y6();v6();T6();w6();S6();D6();C6();P6();_6();M6();ui();A6();I6();O6();vA();F6();L6();$6();z6();B6();q6();H6();U6();W6();Y6();G6();J6();X6();eZ();tZ();rZ();nZ();aZ();sZ();iZ();lZ();cZ();dZ();pZ();fZ();gZ();Z6();yZ();vZ();TZ();kZ();wZ();K6();SZ();EZ();xZ();DZ();bZ();hZ();CZ();oK();lK();cK();dK();uK();pK();mK();hK();fK();gK();yK();vK();bK();TK();kK();xA();wK();EK();xK();DK();CK();PK();DA();pE();_K();MK();AK();IK();NK();j6();RK();OK();FK();PA();LK();TE();jK();zK();BK();qK();HK();UK();VK();WK();YK();GK();ZK();kA();KK();QK();JK();XK();e5();Q6();SK();o5();l5();c5();N6();u5();m5();h5();g5();y5();v5();T5();p5();k5();s6();i6();w5();S5();E5();x5();D5();C5();P5();_5();M5();A5();I5();N5();wA();R5();o6();O5();L5();$5();z5();B5();$K();q5();j5();H5();U5();E6();V5();W5();Y5();G5();x6();Z5();K5();Q5();J5();X5();e9();t9();r9();n9();a9();s9();i9();o9();i5();c9();d9();u9();p9();m9();h9();f9();g9();y9();v9();b9();T9();k9();w9();S9();E9();x9();C9();P9();a5();_9();M9();A9();s5();n5();h6();I9();N9();D9();R9();O9();r5();F9();L9();hE();$9();d5();Fy();bA();f5();uZ();oZ();b5();j9();z9();xh();CA();SA();B9();H9();U9();F5();V9();V6();W9();Y9();q9();G9();Z9();K9();Q9();Hr();t5();J9();X9();e8();t8()});var Vl=E(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});var Ur=require("obsidian"),NA="YYYY-MM-DD",RA="gggg-[W]ww",r8="YYYY-MM",n8="YYYY-[Q]Q",a8="YYYY";function jy(r){var t,n;let e=window.app.plugins.getPlugin("periodic-notes");return e&&((n=(t=e.settings)==null?void 0:t[r])==null?void 0:n.enabled)}function zy(){var r,e,t,n;try{let{internalPlugins:a,plugins:s}=window.app;if(jy("daily")){let{format:c,folder:d,template:u}=((e=(r=s.getPlugin("periodic-notes"))==null?void 0:r.settings)==null?void 0:e.daily)||{};return{format:c||NA,folder:(d==null?void 0:d.trim())||"",template:(u==null?void 0:u.trim())||""}}let{folder:i,format:o,template:l}=((n=(t=a.getPluginById("daily-notes"))==null?void 0:t.instance)==null?void 0:n.options)||{};return{format:o||NA,folder:(i==null?void 0:i.trim())||"",template:(l==null?void 0:l.trim())||""}}catch(a){console.info("No custom daily note settings found!",a)}}function By(){var r,e,t,n,a,s,i;try{let o=window.app.plugins,l=(r=o.getPlugin("calendar"))==null?void 0:r.options,c=(t=(e=o.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.weekly;if(jy("weekly"))return{format:c.format||RA,folder:((n=c.folder)==null?void 0:n.trim())||"",template:((a=c.template)==null?void 0:a.trim())||""};let d=l||{};return{format:d.weeklyNoteFormat||RA,folder:((s=d.weeklyNoteFolder)==null?void 0:s.trim())||"",template:((i=d.weeklyNoteTemplate)==null?void 0:i.trim())||""}}catch(o){console.info("No custom weekly note settings found!",o)}}function qy(){var e,t,n,a;let r=window.app.plugins;try{let s=jy("monthly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.monthly)||{};return{format:s.format||r8,folder:((n=s.folder)==null?void 0:n.trim())||"",template:((a=s.template)==null?void 0:a.trim())||""}}catch(s){console.info("No custom monthly note settings found!",s)}}function Hy(){var e,t,n,a;let r=window.app.plugins;try{let s=jy("quarterly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.quarterly)||{};return{format:s.format||n8,folder:((n=s.folder)==null?void 0:n.trim())||"",template:((a=s.template)==null?void 0:a.trim())||""}}catch(s){console.info("No custom quarterly note settings found!",s)}}function Uy(){var e,t,n,a;let r=window.app.plugins;try{let s=jy("yearly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.yearly)||{};return{format:s.format||a8,folder:((n=s.folder)==null?void 0:n.trim())||"",template:((a=s.template)==null?void 0:a.trim())||""}}catch(s){console.info("No custom yearly note settings found!",s)}}function s8(...r){let e=[];for(let n=0,a=r.length;n{let k=n(),T=r.clone().set({hour:k.get("hour"),minute:k.get("minute"),second:k.get("second")});return h&&T.add(parseInt(f,10),g),y?T.format(y.substring(1).trim()):T.format(s)}).replace(/{{\s*yesterday\s*}}/gi,r.clone().subtract(1,"day").format(s)).replace(/{{\s*tomorrow\s*}}/gi,r.clone().add(1,"d").format(s)));return e.foldManager.save(u,l),u}catch(u){console.error(`Failed to create file: '${d}'`,u),new Ur.Notice("Unable to create new file.")}}function z0e(r,e){var t;return(t=e[ro(r,"day")])!=null?t:null}function B0e(){let{vault:r}=window.app,{folder:e}=zy(),t=r.getAbstractFileByPath(Ur.normalizePath(e));if(!t)throw new OA("Failed to find daily notes folder");let n={};return Ur.Vault.recurseChildren(t,a=>{if(a instanceof Ur.TFile){let s=Ih(a,"day");if(s){let i=ro(s,"day");n[i]=a}}}),n}var FA=class extends Error{};function q0e(){let{moment:r}=window,e=r.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function H0e(r){return q0e().indexOf(r.toLowerCase())}async function c8(r){let{vault:e}=window.app,{template:t,format:n,folder:a}=By(),[s,i]=await Ah(t),o=r.format(n),l=await Vy(a,o);try{let c=await e.create(l,s.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),y=r.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&y.add(parseInt(m,10),h),f?y.format(f.substring(1).trim()):y.format(n)}).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=H0e(u);return r.weekday(m).format(p.trim())}));return window.app.foldManager.save(c,i),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ur.Notice("Unable to create new file.")}}function U0e(r,e){var t;return(t=e[ro(r,"week")])!=null?t:null}function V0e(){let r={};if(!u8())return r;let{vault:e}=window.app,{folder:t}=By(),n=e.getAbstractFileByPath(Ur.normalizePath(t));if(!n)throw new FA("Failed to find weekly notes folder");return Ur.Vault.recurseChildren(n,a=>{if(a instanceof Ur.TFile){let s=Ih(a,"week");if(s){let i=ro(s,"week");r[i]=a}}}),r}var LA=class extends Error{};async function d8(r){let{vault:e}=window.app,{template:t,format:n,folder:a}=qy(),[s,i]=await Ah(t),o=r.format(n),l=await Vy(a,o);try{let c=await e.create(l,s.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),y=r.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&y.add(parseInt(m,10),h),f?y.format(f.substring(1).trim()):y.format(n)}).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,i),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ur.Notice("Unable to create new file.")}}function W0e(r,e){var t;return(t=e[ro(r,"month")])!=null?t:null}function Y0e(){let r={};if(!p8())return r;let{vault:e}=window.app,{folder:t}=qy(),n=e.getAbstractFileByPath(Ur.normalizePath(t));if(!n)throw new LA("Failed to find monthly notes folder");return Ur.Vault.recurseChildren(n,a=>{if(a instanceof Ur.TFile){let s=Ih(a,"month");if(s){let i=ro(s,"month");r[i]=a}}}),r}var $A=class extends Error{};async function G0e(r){let{vault:e}=window.app,{template:t,format:n,folder:a}=Hy(),[s,i]=await Ah(t),o=r.format(n),l=await Vy(a,o);try{let c=await e.create(l,s.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),y=r.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&y.add(parseInt(m,10),h),f?y.format(f.substring(1).trim()):y.format(n)}).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,i),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ur.Notice("Unable to create new file.")}}function Z0e(r,e){var t;return(t=e[ro(r,"quarter")])!=null?t:null}function K0e(){let r={};if(!m8())return r;let{vault:e}=window.app,{folder:t}=Hy(),n=e.getAbstractFileByPath(Ur.normalizePath(t));if(!n)throw new $A("Failed to find quarterly notes folder");return Ur.Vault.recurseChildren(n,a=>{if(a instanceof Ur.TFile){let s=Ih(a,"quarter");if(s){let i=ro(s,"quarter");r[i]=a}}}),r}var jA=class extends Error{};async function Q0e(r){let{vault:e}=window.app,{template:t,format:n,folder:a}=Uy(),[s,i]=await Ah(t),o=r.format(n),l=await Vy(a,o);try{let c=await e.create(l,s.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),y=r.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&y.add(parseInt(m,10),h),f?y.format(f.substring(1).trim()):y.format(n)}).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,i),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ur.Notice("Unable to create new file.")}}function J0e(r,e){var t;return(t=e[ro(r,"year")])!=null?t:null}function X0e(){let r={};if(!h8())return r;let{vault:e}=window.app,{folder:t}=Uy(),n=e.getAbstractFileByPath(Ur.normalizePath(t));if(!n)throw new jA("Failed to find yearly notes folder");return Ur.Vault.recurseChildren(n,a=>{if(a instanceof Ur.TFile){let s=Ih(a,"year");if(s){let i=ro(s,"year");r[i]=a}}}),r}function ePe(){var n,a;let{app:r}=window,e=r.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=r.plugins.getPlugin("periodic-notes");return t&&((a=(n=t.settings)==null?void 0:n.daily)==null?void 0:a.enabled)}function u8(){var t,n;let{app:r}=window;if(r.plugins.getPlugin("calendar"))return!0;let e=r.plugins.getPlugin("periodic-notes");return e&&((n=(t=e.settings)==null?void 0:t.weekly)==null?void 0:n.enabled)}function p8(){var t,n;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((n=(t=e.settings)==null?void 0:t.monthly)==null?void 0:n.enabled)}function m8(){var t,n;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((n=(t=e.settings)==null?void 0:t.quarterly)==null?void 0:n.enabled)}function h8(){var t,n;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((n=(t=e.settings)==null?void 0:t.yearly)==null?void 0:n.enabled)}function tPe(r){let e={day:zy,week:By,month:qy,quarter:Hy,year:Uy}[r];return e()}function rPe(r,e){return{day:l8,month:d8,week:c8}[r](e)}mt.DEFAULT_DAILY_NOTE_FORMAT=NA;mt.DEFAULT_MONTHLY_NOTE_FORMAT=r8;mt.DEFAULT_QUARTERLY_NOTE_FORMAT=n8;mt.DEFAULT_WEEKLY_NOTE_FORMAT=RA;mt.DEFAULT_YEARLY_NOTE_FORMAT=a8;mt.appHasDailyNotesPluginLoaded=ePe;mt.appHasMonthlyNotesPluginLoaded=p8;mt.appHasQuarterlyNotesPluginLoaded=m8;mt.appHasWeeklyNotesPluginLoaded=u8;mt.appHasYearlyNotesPluginLoaded=h8;mt.createDailyNote=l8;mt.createMonthlyNote=d8;mt.createPeriodicNote=rPe;mt.createQuarterlyNote=G0e;mt.createWeeklyNote=c8;mt.createYearlyNote=Q0e;mt.getAllDailyNotes=B0e;mt.getAllMonthlyNotes=Y0e;mt.getAllQuarterlyNotes=K0e;mt.getAllWeeklyNotes=V0e;mt.getAllYearlyNotes=X0e;mt.getDailyNote=z0e;mt.getDailyNoteSettings=zy;mt.getDateFromFile=Ih;mt.getDateFromPath=j0e;mt.getDateUID=ro;mt.getMonthlyNote=W0e;mt.getMonthlyNoteSettings=qy;mt.getPeriodicNoteSettings=tPe;mt.getQuarterlyNote=Z0e;mt.getQuarterlyNoteSettings=Hy;mt.getTemplateInfo=Ah;mt.getWeeklyNote=U0e;mt.getWeeklyNoteSettings=By;mt.getYearlyNote=J0e;mt.getYearlyNoteSettings=Uy});var S8={};Ke(S8,{DEFAULT_CALENDAR_VIEW_SETTINGS:()=>v8,DEFAULT_FIELD_MAPPING:()=>wE,DEFAULT_GOOGLE_CALENDAR_EXPORT:()=>T8,DEFAULT_ICS_INTEGRATION_SETTINGS:()=>b8,DEFAULT_INTERNAL_VISIBLE_PROPERTIES:()=>Nh,DEFAULT_NLP_TRIGGERS:()=>w8,DEFAULT_PRIORITIES:()=>g8,DEFAULT_PROJECT_AUTOSUGGEST:()=>k8,DEFAULT_SETTINGS:()=>kn,DEFAULT_STATUSES:()=>f8,DEFAULT_TASK_CREATION_DEFAULTS:()=>y8});var Nh,wE,f8,g8,y8,v8,b8,T8,k8,w8,kn,Vu=b(()=>{Nh=["status","priority","due","scheduled","projects","contexts"],wE={title:"title",status:"status",priority:"priority",due:"due",scheduled:"scheduled",contexts:"contexts",projects:"projects",timeEstimate:"timeEstimate",completedDate:"completedDate",dateCreated:"dateCreated",dateModified:"dateModified",recurrence:"recurrence",recurrenceAnchor:"recurrence_anchor",archiveTag:"archived",timeEntries:"timeEntries",completeInstances:"complete_instances",skippedInstances:"skipped_instances",blockedBy:"blockedBy",pomodoros:"pomodoros",icsEventId:"icsEventId",icsEventTag:"ics_event",googleCalendarEventId:"googleCalendarEventId",reminders:"reminders"},f8=[{id:"none",value:"none",label:"None",color:"#cccccc",isCompleted:!1,order:0,autoArchive:!1,autoArchiveDelay:5},{id:"open",value:"open",label:"Open",color:"#808080",isCompleted:!1,order:1,autoArchive:!1,autoArchiveDelay:5},{id:"in-progress",value:"in-progress",label:"In progress",color:"#0066cc",isCompleted:!1,order:2,autoArchive:!1,autoArchiveDelay:5},{id:"done",value:"done",label:"Done",color:"#00aa00",isCompleted:!0,order:3,autoArchive:!1,autoArchiveDelay:5}],g8=[{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}],y8={defaultContexts:"",defaultTags:"",defaultProjects:"",useParentNoteAsProject:!1,defaultTimeEstimate:0,defaultRecurrence:"none",defaultDueDate:"none",defaultScheduledDate:"today",bodyTemplate:"",useBodyTemplate:!1,defaultReminders:[]},v8={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",nowIndicator:!0,selectMirror:!0,weekNumbers:!1,showTodayHighlight:!0,eventMinHeight:15,slotEventOverlap:!0,eventMaxStack:null,dayMaxEvents:!0,dayMaxEventRows:!1},b8={defaultNoteTemplate:"",defaultNoteFolder:"",icsNoteFilenameFormat:"title",customICSNoteFilenameTemplate:"{title}",enableAutoExport:!1,autoExportPath:"tasknotes-calendar.ics",autoExportInterval:60,useDurationForExport:!1,useICSEndAsDue:!1},T8={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},k8={enableFuzzy:!1,rows:["{title|n(Title)}","{aliases|n(Aliases)}","{file.path|n(Path)}"],showAdvanced:!1,requiredTags:[],includeFolders:[],propertyKey:"",propertyValue:""},w8={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}]},kn={tasksFolder:"TaskNotes/Tasks",moveArchivedTasks:!1,archiveFolder:"TaskNotes/Archive",taskTag:"task",taskIdentificationMethod:"tag",hideIdentifyingTagsInCards:!1,taskPropertyName:"",taskPropertyValue:"",excludedFolders:"",defaultTaskPriority:"normal",defaultTaskStatus:"open",taskOrgFiltersCollapsed:!1,taskFilenameFormat:"zettel",storeTitleInFilename:!0,customFilenameTemplate:"{title}",taskCreationDefaults:y8,calendarViewSettings:v8,pomodoroWorkDuration:25,pomodoroShortBreakDuration:5,pomodoroLongBreakDuration:15,pomodoroLongBreakInterval:4,pomodoroAutoStartBreaks:!0,pomodoroAutoStartWork:!1,pomodoroNotifications:!0,pomodoroSoundEnabled:!0,pomodoroSoundVolume:50,pomodoroStorageLocation:"plugin",pomodoroMobileSidebar:"tab",enableTaskLinkOverlay:!0,disableOverlayOnAlias:!1,enableInstantTaskConvert:!0,useDefaultsOnInstantConvert:!0,enableNaturalLanguageInput:!0,nlpDefaultToScheduled:!0,nlpLanguage:"en",uiLanguage:"system",statusSuggestionTrigger:"*",nlpTriggers:w8,singleClickAction:"edit",doubleClickAction:"openNote",projectAutosuggest:k8,inlineTaskConvertFolder:"{{currentNotePath}}",disableNoteIndexing:!1,suggestionDebounceMs:0,fieldMapping:wE,customStatuses:f8,customPriorities:g8,recurrenceMigrated:!1,lastSeenVersion:void 0,showReleaseNotesOnUpdate:!0,showTrackedTasksInStatusBar:!1,autoStopTimeTrackingOnComplete:!0,autoStopTimeTrackingNotification:!1,showRelationships:!0,relationshipsPosition:"bottom",showTaskCardInNote:!0,showExpandableSubtasks:!0,subtaskChevronPosition:"right",viewsButtonAlignment:"right",hideCompletedFromOverdue:!0,icsIntegration:b8,savedViews:[],enableNotifications:!0,notificationType:"system",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",relationships:"TaskNotes/Views/relationships.base"},maintainDueDateOffsetInRecurring:!1,resetCheckboxesOnRecurrence:!1,useFrontmatterMarkdownLinks:!1,oauthSetupMode:"advanced",lemonSqueezyLicenseKey:"",googleOAuthClientId:"",googleOAuthClientSecret:"",microsoftOAuthClientId:"",microsoftOAuthClientSecret:"",enableGoogleCalendar:!1,enableMicrosoftCalendar:!1,enabledGoogleCalendars:[],googleCalendarSyncTokens:{},enabledMicrosoftCalendars:[],microsoftCalendarSyncTokens:{},googleCalendarExport:T8}});function nPe(){return(0,ld.requireApiVersion)("1.11.0")}function Tt(r,e,t){if(nPe()){let n=new ld.SettingGroup(r).setHeading(e.heading);return e.className&&n.addClass(e.className),e.description&&n.addSetting(a=>{a.setDesc(e.description),a.settingEl.addClass("settings-view__group-description")}),t(n),n}else{let n=new zA(r).setHeading(e.heading);return e.className&&n.addClass(e.className),e.description&&n.addSetting(a=>{a.setDesc(e.description),a.settingEl.addClass("settings-view__group-description")}),t(n),n}}function De(r,e){return r.setName(e.name).setDesc(e.desc).addToggle(t=>{t.setValue(e.getValue()).onChange(e.setValue)})}function sn(r,e){return r.setName(e.name).setDesc(e.desc).addText(t=>{if(t.setValue(e.getValue()),e.debounceMs&&e.debounceMs>0){let n=Rh(e.setValue,e.debounceMs);t.onChange(n)}else t.onChange(e.setValue);return e.placeholder&&t.setPlaceholder(e.placeholder),e.ariaLabel&&t.inputEl.setAttribute("aria-label",e.ariaLabel),t.inputEl.addClass("settings-view__input"),t})}function on(r,e){return r.setName(e.name).setDesc(e.desc).addDropdown(t=>(e.options.forEach(n=>{t.addOption(n.value,n.label)}),t.setValue(e.getValue()).onChange(e.setValue),e.ariaLabel&&t.selectEl.setAttribute("aria-label",e.ariaLabel),t))}function Na(r,e){let t=e.debounceMs?Rh(e.setValue,e.debounceMs):e.setValue;return r.setName(e.name).setDesc(e.desc).addText(n=>(n.setValue(e.getValue().toString()).onChange(a=>{let s=parseInt(a);if(!isNaN(s)){if(e.min!==void 0&&se.max)return;t(s)}}),n.inputEl.type="number",e.placeholder&&n.setPlaceholder(e.placeholder),e.min!==void 0&&n.inputEl.setAttribute("min",e.min.toString()),e.max!==void 0&&n.inputEl.setAttribute("max",e.max.toString()),e.ariaLabel&&n.inputEl.setAttribute("aria-label",e.ariaLabel),n.inputEl.addClass("settings-view__input"),n))}function Wu(r,e){return r.setName(e.name).setDesc(e.desc).addButton(t=>(t.setButtonText(e.buttonText).onClick(e.onClick),e.buttonClass?t.buttonEl.addClass(e.buttonClass):t.buttonEl.addClasses(["tn-btn","tn-btn--ghost"]),t))}function cd(r,e){return new ld.Setting(r).setName(e).setHeading()}function jo(r,e){return r.createEl("p",{text:e,cls:"settings-view__help-note"})}function Rh(r,e,t=!1){let n,a,s,i=function(...o){a=o,s=this;let l=()=>{n=void 0,a=void 0,t||r.apply(s,o)},c=t&&!n;clearTimeout(n),n=setTimeout(l,e),c&&r.apply(this,o)};return i.flush=()=>{n&&a&&(clearTimeout(n),n=void 0,r.apply(s,a),a=void 0)},i}var ld,zA,Wl=b(()=>{ld=require("obsidian");zA=class{constructor(e){this.containerEl=e}setHeading(e){return new ld.Setting(this.containerEl).setName(e).setHeading(),this}addClass(e){return this}addSetting(e){let t=new ld.Setting(this.containerEl);return e(t),this}}});async function pi(r,e){return new Wy(r,e).show()}var SE,Wy,Yu=b(()=>{SE=require("obsidian"),Wy=class extends SE.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 SE.Setting(e).setName(this.options.title).setHeading(),e.createEl("p",{text:this.options.message});let t=e.createEl("div",{cls:"modal-button-container"});t.style.display="flex",t.style.gap="10px",t.style.justifyContent="flex-end",t.style.marginTop="20px";let n=null;this.options.thirdButtonText&&(n=t.createEl("button",{text:this.options.thirdButtonText}),n.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 s=t.createEl("button",{text:this.options.confirmText,cls:this.options.isDestructive?"mod-warning":"mod-cta"});this.options.isDestructive&&(s.style.backgroundColor="var(--color-red)",s.style.color="white"),s.addEventListener("click",()=>{this.resolve(!0),this.close()}),setTimeout(()=>{this.options.defaultToConfirm?s.focus():a.focus()},0)}onClose(){let{contentEl:e}=this;e.empty(),this.resolve&&this.resolve(!1)}}});var ud,_E=b(()=>{ud=class{constructor(e){this.deps=e}buildMetadataRows(e,t,n){var i;let a=[],s=Math.min(e.length,3);for(let o=0;o0&&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(),s=a.match(/^\[\[([^\]]+)\]\]$/);if(s){let l=s[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 i=a.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return i?i[1].trim():a}if(t==="number"||t==="boolean")return String(e);if(t==="object"){let n=e;if(typeof n.path=="string"){let a=n.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 s=t.aliases||[];return s.length?s.join(", "):""}let n=e;e.startsWith("frontmatter:")&&(n=e.slice(12));let a=this.deps.getFrontmatter(t)||{};return this.stringifyFmValue(a[n])}}});function sPe(r){let e=[],t="",n=0;for(;na.length>0)}function iPe(r){return r.replace(/\\\|/g,"|").replace(/\\\)/g,")")}function Bo(r){let e=[];if(!r)return e;let t=/\{([^}]*)\}/g,n,a=0;for(;(n=t.exec(r))!==null;){let i=r.slice(a,n.index);i.length>0&&e.push({property:`literal:${i}`,showName:!1}),a=t.lastIndex;let o=n[1].trim();if(!o)continue;let l=sPe(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;u0&&e.push({property:`literal:${s}`,showName:!1}),e}var Yy=b(()=>{});function _8(r){return r!=null?r.trim():""}function oPe(r){return r?r.trim():""}function ME(r){let e=oPe(r==null?void 0:r.propertyKey),t=_8(r==null?void 0:r.propertyValue);return{key:e,value:t,enabled:e.length>0}}function AE(r,e){if(!e.enabled)return!0;if(!r||typeof r!="object"||!(e.key in r))return!1;let t=r[e.key],n=_8(e.value);if(n.length===0)return t!=null;let a=n.toLowerCase(),s=i=>{if(i==null)return!1;if(Array.isArray(i))return i.some(o=>s(o));if(typeof i=="string")return i.trim().toLowerCase()===a;if(typeof i=="number"||typeof i=="boolean")return String(i).toLowerCase()===a;if(typeof i=="object")try{return JSON.stringify(i).toLowerCase()===a}catch(o){return!1}return String(i).toLowerCase()===a};return s(t)}var GA=b(()=>{});var I8={};Ke(I8,{NATURAL_LANGUAGE_DATE_PATTERNS:()=>Gy,addDaysToDateString:()=>Zu,addDaysToDateTime:()=>jh,addMonthsToDateString:()=>dPe,addWeeksToDateString:()=>KA,addYearsToDateString:()=>uPe,combineDateAndTime:()=>En,convertUTCToLocalCalendarDate:()=>pd,createSafeDate:()=>cPe,createSafeUTCDate:()=>QA,createTimeFormatHelper:()=>vPe,createUTCDateForRRule:()=>rs,createUTCDateFromLocalCalendarDate:()=>Rr,formatDateAsUTCString:()=>eI,formatDateForDisplay:()=>Zl,formatDateForStorage:()=>me,formatDateStringTime:()=>A8,formatDateTime:()=>M8,formatDateTimeForDisplay:()=>ns,formatTime:()=>$h,formatTimestampForDisplay:()=>NE,generateUTCCalendarDates:()=>tI,getCurrentDateString:()=>Qy,getCurrentDateTimeString:()=>bPe,getCurrentTimestamp:()=>ct,getDatePart:()=>Xe,getEndOfMonthString:()=>fPe,getEndOfWeekString:()=>mPe,getEndOfYearString:()=>yPe,getNaturalLanguageDateSuggestions:()=>wPe,getStartOfMonthString:()=>hPe,getStartOfWeekString:()=>pPe,getStartOfYearString:()=>gPe,getTimePart:()=>la,getTodayLocal:()=>Jt,getTodayString:()=>Jr,getUTCEndOfMonth:()=>$E,getUTCEndOfWeek:()=>rI,getUTCStartOfMonth:()=>LE,getUTCStartOfWeek:()=>FE,hasTimeComponent:()=>Ir,isBeforeDateSafe:()=>Gl,isBeforeDateTimeAware:()=>Kl,isNaturalLanguageDate:()=>jE,isOverdueTimeAware:()=>Fa,isPastDate:()=>JA,isSameDateSafe:()=>Sn,isToday:()=>Ky,isTodayTimeAware:()=>RE,isTodayUTC:()=>XA,isValidDateInput:()=>kPe,normalizeCalendarBoundariesToUTC:()=>TPe,normalizeDateString:()=>lPe,parseDate:()=>ca,parseDateAsLocal:()=>Ku,parseDateToLocal:()=>Nr,parseDateToUTC:()=>nt,parseTimestamp:()=>IE,resolveNaturalLanguageDate:()=>Qu,startOfDayForDateString:()=>Zy,validateCompleteInstances:()=>OE,validateDateInput:()=>ZA,validateDateTimeInput:()=>Jy});function ca(r){if(!r){let t=new Error("Date string cannot be empty");throw console.error("Date parsing error:",{dateString:r,error:t.message}),t}let e=r.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 n=t[1];return ca(n)}if(e.startsWith("T")&&/^T\d{2}:\d{2}(:\d{2})?/.test(e)){let n=new Error(`Invalid date format - time without date: ${r}`);throw console.warn("Date parsing error - incomplete time format:",{original:r,trimmed:e,error:n.message}),n}if(/^\d{4}-W\d{2}$/.test(e)){let[n,a]=e.split("-W"),s=parseInt(n,10),i=parseInt(a,10);if(isNaN(s)||isNaN(i)){let u=new Error(`Invalid numeric values in ISO week format: ${r}`);throw console.warn("Date parsing error - invalid ISO week numbers:",{original:r,year:n,week:a,yearNum:s,weekNum:i}),u}if(i<1||i>53){let u=new Error(`Invalid week number in ISO week format: ${r} (week must be 1-53)`);throw console.warn("Date parsing error - week number out of range:",{original:r,weekNum:i,error:u.message}),u}let o=new Date(s,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()+(i-1)*7),!Rn(d)){let u=new Error(`Failed to calculate date from ISO week format: ${r}`);throw console.error("Date parsing error - ISO week calculation failed:",{original:r,yearNum:s,weekNum:i,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 n=e.replace(" ","T"),a=to(n);if(!Rn(a)){let s=new Error(`Invalid space-separated datetime: ${r}`);throw console.warn("Date parsing error - space-separated datetime invalid:",{original:r,converted:n,error:s.message}),s}return a}if(e.includes("T")||e.includes("Z")||e.match(/[+-]\d{2}:\d{2}$/)){let n=to(e);if(!Rn(n)){let a=new Error(`Invalid timezone-aware date: ${r}`);throw console.warn("Date parsing error - timezone-aware format invalid:",{original:r,trimmed:e,error:a.message}),a}return n}else{let n=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!n){let l=new Error(`Invalid date-only string: ${r} (expected format: yyyy-MM-dd)`);throw console.warn("Date parsing error - date-only format invalid:",{original:r,trimmed:e,expectedFormat:"yyyy-MM-dd",error:l.message}),l}let[,a,s,i]=n,o=new Date(parseInt(a,10),parseInt(s,10)-1,parseInt(i,10));if(!Rn(o)||o.getFullYear()!==parseInt(a,10)||o.getMonth()!==parseInt(s,10)-1||o.getDate()!==parseInt(i,10)){let l=new Error(`Invalid date values: ${r}`);throw console.warn("Date parsing error - invalid date values:",{original:r,year:a,month:s,day:i,error:l.message}),l}return o}}catch(t){if(t instanceof Error&&t.message.includes("Invalid date"))throw t;let n=new Error(`Unexpected error parsing date "${r}": ${t instanceof Error?t.message:String(t)}`);throw console.error("Unexpected date parsing error:",{original:r,trimmed:e,error:t instanceof Error?t.message:String(t),stack:t instanceof Error?t.stack:void 0}),n}}function nt(r){if(!r){let t=new Error("Date string cannot be empty");throw console.error("Date parsing error:",{dateString:r,error:t.message}),t}let e=r.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 nt(a)}let n=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(n){let[,a,s,i]=n,o=parseInt(a,10),l=parseInt(s,10),c=parseInt(i,10);if(l<1||l>12)throw new Error(`Invalid month in date: ${r}`);if(c<1||c>31)throw new Error(`Invalid day in date: ${r}`);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: ${r}`);return d}return Nr(e)}catch(t){let n=new Error(`Failed to parse date to UTC: ${e}`);throw console.error("Date parsing error:",{dateString:r,trimmed:e,error:t instanceof Error?t.message:String(t),stack:t instanceof Error?t.stack:void 0}),n}}function Sn(r,e){try{let t=Xe(r),n=Xe(e),a=nt(t),s=nt(n);return a.getTime()===s.getTime()}catch(t){return console.error("Error comparing dates:",{date1:r,date2:e,error:t}),!1}}function Gl(r,e){try{let t=Xe(r),n=Xe(e),a=nt(t),s=nt(n);return a.getTime()=0?"+":"-",n=m=>String(Math.abs(m)).padStart(2,"0"),a=n(Math.floor(Math.abs(e)/60)),s=n(Math.abs(e)%60),i=r.getFullYear(),o=n(r.getMonth()+1),l=n(r.getDate()),c=n(r.getHours()),d=n(r.getMinutes()),u=n(r.getSeconds()),p=String(r.getMilliseconds()).padStart(3,"0");return`${i}-${o}-${l}T${c}:${d}:${u}.${p}${t}${a}:${s}`}function Qy(){let r=new Date,e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}function IE(r){try{if(!r)throw new Error("Timestamp string cannot be empty");let e=to(r);if(!Rn(e))throw new Error(`Invalid timestamp: ${r}`);return e}catch(e){throw console.error("Error parsing timestamp:",{timestampString:r,error:e}),e}}function NE(r,e,t="24"){if(!r)return r;try{let n=IE(r);return Rn(n)?D(n,e||(t==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm")):r}catch(n){return console.error("Error formatting timestamp for display:",{timestampString:r,error:n}),r}}function Ir(r){return r?/T\d{2}:\d{2}/.test(r):!1}function Xe(r){if(!r)return"";try{if(/^\d{4}-\d{2}-\d{2}$/.test(r))return r;let e=r.indexOf("T");if(e>-1)return r.substring(0,e);let t=nt(r);return me(t)}catch(e){return console.error("Error extracting date part:",{dateString:r,error:e}),r}}function la(r){if(!r||!Ir(r))return null;try{let e=ca(r);return D(e,"HH:mm")}catch(e){return console.error("Error extracting time part:",{dateString:r,error:e}),null}}function $h(r,e="24"){return Rn(r)?D(r,e==="12"?"h:mm a":"HH:mm"):(console.warn("Invalid date provided to formatTime:",r),"")}function M8(r,e="24"){return Rn(r)?D(r,e==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm"):(console.warn("Invalid date provided to formatDateTime:",r),"")}function A8(r,e="24"){if(!r||!Ir(r))return r;try{let t=Nr(r);return $h(t,e)}catch(t){return console.error("Error formatting date string time:",{dateString:r,error:t}),r}}function vPe(r){return{formatDateTimeForDisplay:(e,t={})=>ns(e,{...t,userTimeFormat:r}),formatTime:e=>$h(e,r),formatDateTime:e=>M8(e,r),formatDateStringTime:e=>A8(e,r)}}function En(r,e){if(!r)return"";if(!e)return r;try{let t=r.match(/^(\d{4}-\d{2}-\d{2})$/);if(t)return/^\d{2}:\d{2}$/.test(e)?`${t[1]}T${e}`:(console.warn("Invalid time format, expected HH:mm:",e),r);let n=Xe(r);return!n||!/^\d{4}-\d{2}-\d{2}$/.test(n)?(console.warn("Invalid date part from dateString:",{dateString:r,datePart:n}),r):/^\d{2}:\d{2}$/.test(e)?`${n}T${e}`:(console.warn("Invalid time format, expected HH:mm:",e),r)}catch(t){return console.error("Error combining date and time:",{dateString:r,timeString:e,error:t}),r}}function ns(r,e={}){if(!r)return"";let{dateFormat:t="MMM d, yyyy",timeFormat:n,showTime:a=!0,userTimeFormat:s="24"}=e,i=n||(s==="12"?"h:mm a":"HH:mm");try{let o=ca(r);return Ir(r)&&a?!t||t.trim()===""?D(o,i):D(o,`${t} ${i}`):!t||t.trim()===""?"":D(o,t)}catch(o){return console.error("Error formatting datetime for display:",{dateString:r,error:o}),r}}function Kl(r,e){try{let t=nt(r),n=nt(e),a=t,s=n;if(Ir(r)){let i=la(r);if(i){let[o,l]=i.split(":").map(Number);a=new Date(t),a.setUTCHours(o,l,0,0)}}if(Ir(e)){let i=la(e);if(i){let[o,l]=i.split(":").map(Number);s=new Date(n),s.setUTCHours(o,l,0,0)}}return Ir(r)&&!Ir(e)?(s=new Date(n),s.setUTCHours(23,59,59,999)):!Ir(r)&&Ir(e)&&(a=new Date(t),a.setUTCHours(23,59,59,999)),a.getTime(){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 ca(t),!0}catch(n){return console.warn("Invalid complete_instances entry (date parsing failed):",e,n),!1}}).map(e=>e.trim()):[]}function bPe(){return D(new Date,"yyyy-MM-dd'T'HH:mm")}function jh(r,e){try{let t=ca(r),n=Hl(t,e);return Ir(r)?D(n,"yyyy-MM-dd'T'HH:mm"):D(n,"yyyy-MM-dd")}catch(t){throw console.error("Error adding days to datetime:",{dateString:r,days:e,error:t}),t}}function rs(r){try{let e=r.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!e)throw new Error(`Invalid date format for RRULE: ${r}`);let[,t,n,a]=e,s=parseInt(t,10),i=parseInt(n,10),o=parseInt(a,10);if(i<1||i>12)throw new Error(`Invalid month in date: ${r}`);if(o<1||o>31)throw new Error(`Invalid day in date: ${r}`);let l=new Date(Date.UTC(s,i-1,o));if(l.getUTCFullYear()!==s||l.getUTCMonth()!==i-1||l.getUTCDate()!==o)throw new Error(`Invalid date values: ${r}`);return l}catch(e){throw console.error("Error creating UTC date for RRULE:",{dateString:r,error:e}),e}}function Rr(r){let e=r.getFullYear(),t=r.getMonth(),n=r.getDate();return new Date(Date.UTC(e,t,n,0,0,0,0))}function XA(r){try{let e=Jt(),t=Rr(e);return r.getUTCFullYear()===t.getUTCFullYear()&&r.getUTCMonth()===t.getUTCMonth()&&r.getUTCDate()===t.getUTCDate()}catch(e){return console.error("Error in isTodayUTC:",e),!1}}function TPe(r,e){try{let t=D(r,"yyyy-MM-dd"),n=D(e,"yyyy-MM-dd"),a=rs(t),s=rs(n);return{utcStart:a,utcEnd:s}}catch(t){throw console.error("Error normalizing calendar boundaries to UTC:",{startDate:r,endDate:e,error:t}),t}}function eI(r){try{let e=r.getUTCFullYear(),t=String(r.getUTCMonth()+1).padStart(2,"0"),n=String(r.getUTCDate()).padStart(2,"0");return`${e}-${t}-${n}`}catch(e){return console.error("Error formatting date as UTC string:",{date:r,error:e}),r.toISOString().split("T")[0]}}function me(r){try{if(!r||!(r instanceof Date)||isNaN(r.getTime()))return console.warn("formatDateForStorage received invalid date:",r),"";let e=r.getUTCFullYear(),t=String(r.getUTCMonth()+1).padStart(2,"0"),n=String(r.getUTCDate()).padStart(2,"0");return`${e}-${t}-${n}`}catch(e){return console.error("Error formatting date for storage:",{date:r,error:e}),""}}function tI(r,e){let t=[],n=me(r),a=me(e),s=rs(n),i=rs(a);for(;s<=i;)t.push(new Date(s)),s.setUTCDate(s.getUTCDate()+1);return t}function FE(r,e=1){let t=rs(me(r)),a=(t.getUTCDay()-e+7)%7,s=new Date(t);return s.setUTCDate(s.getUTCDate()-a),s}function rI(r,e=1){let t=FE(r,e),n=new Date(t);return n.setUTCDate(n.getUTCDate()+6),n}function LE(r){let e=rs(me(r));return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1))}function $E(r){let e=rs(me(r));return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+1,0))}function jE(r){if(!r||typeof r!="string")return!1;let e=r.toLowerCase().trim().replace(/\s+/g," ");return e in Gy?!0:[/^in\s+(\d+)\s+(days?)$/,/^(\d+)\s+(days?)\s+ago$/,/^in\s+(\d+)\s+(weeks?)$/,/^(\d+)\s+(weeks?)\s+ago$/].some(n=>n.test(e))}function kPe(r){if(typeof r!="string")return!1;let e=r.trim();if(e===""||jE(e))return!0;try{let t=ca(e);return Rn(t)}catch(t){return!1}}function Qu(r){if(!r||typeof r!="string")return r;let e=r.toLowerCase().trim().replace(/\s+/g," ");if(e in Gy)try{return Gy[e]()}catch(t){return console.error("Error resolving natural language date:",{value:r,error:t}),r}try{let t=e.match(/^in\s+(\d+)\s+(days?)$/);if(t){let n=parseInt(t[1],10);return Zu(Jr(),n)}if(t=e.match(/^(\d+)\s+(days?)\s+ago$/),t){let n=parseInt(t[1],10);return Zu(Jr(),-n)}if(t=e.match(/^in\s+(\d+)\s+(weeks?)$/),t){let n=parseInt(t[1],10);return KA(Jr(),n)}if(t=e.match(/^(\d+)\s+(weeks?)\s+ago$/),t){let n=parseInt(t[1],10);return KA(Jr(),-n)}}catch(t){console.error("Error parsing relative natural language date:",{value:r,error:t})}return r}function wPe(){let r=Object.keys(Gy),e=["in 3 days","2 days ago","in 1 week","2 weeks ago"];return[...r,...e].sort()}var Nr,Gy,kt=b(()=>{Qr();Nr=ca;Gy={today:()=>Jr(),tomorrow:()=>Zu(Jr(),1),yesterday:()=>Zu(Jr(),-1),"next week":()=>Zu(Jr(),7),"last week":()=>Zu(Jr(),-7)}});var Wn,Ql,Ju,sr,Xu=b(()=>{kt();Wn=class extends Error{constructor(t,n,a){super(t);this.field=n;this.nodeId=a;this.name="FilterValidationError"}},Ql=class extends Error{constructor(t,n){super(t);this.nodeId=n;this.name="FilterEvaluationError"}},Ju=class Ju{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 Wn("Filter node must be an object");if(!("id"in e)||!e.id||typeof e.id!="string")throw new Wn("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 throw new Wn(`Unknown filter node type: ${e.type}`,void 0,e.id)}static validateCondition(e,t=!0){if(typeof e.property!="string")throw new Wn("Condition must have a valid property","property",e.id);if(t&&e.property==="")throw new Wn("Property must be selected","property",e.id);if(e.property==="")return;if(!e.operator||typeof e.operator!="string")throw new Wn("Condition must have a valid operator","operator",e.id);if(!this.getValidOperatorsForProperty(e.property).includes(e.operator))throw new Wn(`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 Wn(`Operator '${e.operator}' requires a value`,"value",e.id)}static validateGroup(e,t=!0){if(!e.conjunction||!["and","or"].includes(e.conjunction))throw new Wn("Group must have a valid conjunction (and/or)","conjunction",e.id);if(!Array.isArray(e.children))throw new Wn("Group must have a children array","children",e.id);e.children.forEach((n,a)=>{try{this.validateFilterNode(n,t)}catch(s){throw s instanceof Wn?new Wn(`Child ${a}: ${s.message}`,s.field,e.id):s}})}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"],"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 n;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((n=e.blockedBy)==null?void 0:n.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"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 Ql(`Unknown property: ${t}`)}}static applyOperator(e,t,n,a,s){try{switch(t){case"is":return this.isEqual(e,n,s);case"is-not":return!this.isEqual(e,n,s);case"contains":return this.contains(e,n,s);case"does-not-contain":return!this.contains(e,n,s);case"is-before":return this.isBefore(e,n);case"is-after":return this.isAfter(e,n);case"is-on-or-before":return this.isOnOrBefore(e,n);case"is-on-or-after":return this.isOnOrAfter(e,n);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,n);case"is-less-than":return this.isLessThan(e,n);case"is-greater-than-or-equal":return this.isGreaterThanOrEqual(e,n);case"is-less-than-or-equal":return this.isLessThanOrEqual(e,n);default:throw new Ql(`Unknown operator: ${t}`,a)}}catch(i){throw i instanceof Ql?i:new Ql(`Error applying operator '${t}': ${i.message}`,a)}}static isEqual(e,t,n){return n&&this.isDateProperty(n)&&typeof e=="string"&&typeof t=="string"&&(e||jE(t))?this.isEqualDate(e,t):Array.isArray(e)?Array.isArray(t)?e.some(a=>t.includes(a)):e.includes(t):Array.isArray(t)?t.includes(e):e===t}static matchesHierarchicalTag(e,t){if(!e||!t)return!1;let n=e.toLowerCase(),a=t.toLowerCase();return!!(n===a||n.startsWith(a+"/")||n.includes(a))}static matchesHierarchicalTagExact(e,t){if(!e||!t)return!1;let n=e.toLowerCase(),a=t.toLowerCase();return!!(n===a||n.startsWith(a+"/"))}static matchesTagConditions(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(t.length===0)return!0;let n=[],a=[];for(let s of t)if(typeof s=="string"&&s.startsWith("-")){let i=s.slice(1);i&&a.push(i)}else typeof s=="string"&&n.push(s);for(let s of a)if(e.some(o=>this.matchesHierarchicalTag(o,s)))return!1;return n.length>0?n.some(s=>e.some(i=>this.matchesHierarchicalTag(i,s))):!0}static contains(e,t,n){if(Array.isArray(e))if(Array.isArray(t))if(n==="tags"){let a=e.filter(i=>typeof i=="string"),s=t.filter(i=>typeof i=="string");return Ju.matchesTagConditions(a,s)}else return t.some(a=>e.some(s=>typeof s=="string"&&typeof a=="string"&&s.toLowerCase().includes(a.toLowerCase())));else{let a=typeof t=="string"?t:String(t!=null?t:"");if(n==="tags"){let s=e.filter(i=>typeof i=="string");return Ju.matchesTagConditions(s,[a])}else{let s=a.toLowerCase();return e.some(i=>typeof i=="string"&&i.toLowerCase().includes(s))}}else if(typeof e=="string")if(Array.isArray(t))if(n==="tags"){let a=t.filter(s=>typeof s=="string");return Ju.matchesTagConditions([e],a)}else return t.some(a=>typeof a=="string"&&e.toLowerCase().includes(a.toLowerCase()));else return n==="tags"&&typeof t=="string"?Ju.matchesTagConditions([e],[t]):typeof t=="string"&&e.toLowerCase().includes(t.toLowerCase());return!1}static isBefore(e,t){if(!e||!t)return!1;try{let n=Qu(t);return Kl(e,n)}catch(n){return!1}}static isAfter(e,t){if(!e||!t)return!1;try{let n=Qu(t);return Kl(n,e)}catch(n){return!1}}static isOnOrBefore(e,t){if(!e||!t)return!1;try{let n=Qu(t);return Kl(e,n)||Sn(Xe(e),Xe(n))}catch(n){return!1}}static isOnOrAfter(e,t){if(!e||!t)return!1;try{let n=Qu(t);return Kl(n,e)||Sn(Xe(e),Xe(n))}catch(n){return!1}}static isDateProperty(e){return["due","scheduled","completedDate","dateCreated","dateModified"].includes(e)}static isEqualDate(e,t){try{let n=Qu(t);return Sn(Xe(e),Xe(n))}catch(n){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 n=t.trim();return n.length===0||n==='""'||n==="''"}):!1}static isGreaterThan(e,t){let n=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(n)||isNaN(a)?!1:n>a}static isLessThan(e,t){let n=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(n)||isNaN(a)?!1:n=a}static isLessThanOrEqual(e,t){let n=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(n)||isNaN(a)?!1:n<=a}};Ju.idCounter=0;sr=Ju});var qo,md,zE=b(()=>{qo=require("obsidian");_E();Yy();GA();Xu();md=class extends qo.FuzzySuggestModal{constructor(e,t,n){super(e),this.plugin=t,this.onChoose=n,this.setPlaceholder("Type to search for project notes..."),this.setInstructions([{command:"\u2191\u2193",purpose:"to navigate"},{command:"\u21B5",purpose:"to select"},{command:"esc",purpose:"to cancel"}])}getItems(){var s,i,o,l,c,d,u;let e=this.app.vault.getAllLoadedFiles().filter(p=>p instanceof qo.TFile&&p.extension==="md"&&!p.path.includes(".trash")),t=(o=(i=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:i.requiredTags)!=null?o:[],n=(d=(c=(l=this.plugin.settings)==null?void 0:l.projectAutosuggest)==null?void 0:c.includeFolders)!=null?d:[],a=ME((u=this.plugin.settings)==null?void 0:u.projectAutosuggest);return t.length===0&&n.length===0&&!a.enabled?e:e.filter(p=>{var h,f;if(!(p instanceof qo.TFile))return!1;let m=this.app.metadataCache.getFileCache(p);if(t.length>0){let g=((h=m==null?void 0:m.tags)==null?void 0:h.map(T=>T.tag.replace("#","")))||[],y=((f=m==null?void 0:m.frontmatter)==null?void 0:f.tags)||[],k=[...g,...Array.isArray(y)?y:[y].filter(Boolean)];if(!sr.matchesTagConditions(k,t))return!1}if(n.length>0&&!n.some(y=>p.path.startsWith(y)||p.path.startsWith(y+"/")))return!1;if(a.enabled){let g=m==null?void 0:m.frontmatter;if(!AE(g,a))return!1}return!0})}getItemText(e){var i,o,l,c;if(!(e instanceof qo.TFile))return e.name;let t=`${e.name} ${e.path}`,n=(l=(o=(i=this.plugin.settings)==null?void 0:i.projectAutosuggest)==null?void 0:o.rows)!=null?l:[],a=new Set;for(let d of n)try{let u=Bo(d);for(let p of u)p.searchable&&!p.property.startsWith("literal:")&&a.add(p.property)}catch(u){}let s=this.app.metadataCache.getFileCache(e);if(s!=null&&s.frontmatter){let d=this.plugin.fieldMapper.mapFromFrontmatter(s.frontmatter,e.path,this.plugin.settings.storeTitleInFilename),u=typeof d.title=="string"?d.title:"";u&&(t+=` ${u}`);let p=(0,qo.parseFrontMatterAliases)(s.frontmatter)||[];Array.isArray(p)&&p.length>0&&(t+=` ${p.join(" ")}`);for(let m of a){let h="";switch(m){case"file.path":h=e.path;break;case"file.parent":h=((c=e.parent)==null?void 0:c.name)||"";break;case"file.basename":h=e.basename;break;case"title":case"aliases":break;default:{let f=s.frontmatter[m];f!=null&&(h=Array.isArray(f)?f.join(" "):String(f));break}}h&&(t+=` ${h}`)}}return t}renderSuggestion(e,t){var i,o,l,c;let n=e.item;if(t.empty(),!(n instanceof qo.TFile)){t.textContent=n.name;return}let a=t.createDiv({cls:"project-suggestion"}),s=((l=(o=(i=this.plugin.settings)==null?void 0:i.projectAutosuggest)==null?void 0:o.rows)!=null?l:[]).slice(0,3);if(s.length===0){a.createSpan({cls:"project-name",text:n.basename});return}try{let d=this.app.metadataCache.getFileCache(n),u=(d==null?void 0:d.frontmatter)||{},p=this.plugin.fieldMapper.mapFromFrontmatter(u,n.path,this.plugin.settings.storeTitleInFilename),m=typeof p.title=="string"?p.title:"",h=(0,qo.parseFrontMatterAliases)(u)||[],f=Array.isArray(h)?h.filter(T=>typeof T=="string"):[],g={basename:n.basename,name:n.name,path:n.path,parent:((c=n.parent)==null?void 0:c.path)||"",title:m,aliases:f,frontmatter:u},y=new ud({getFrontmatter:()=>u});a.createDiv({cls:"project-name",text:n.basename});let k=y.buildMetadataRows(s,g,Bo);for(let T of k){let w=a.createDiv({cls:"project-meta"});w.textContent=T}}catch(d){console.error("Error rendering project suggestion:",d),a.createSpan({cls:"project-name",text:n.basename})}}onChooseItem(e,t){this.onChoose(e)}}});function hi(r){if(r==null)return[];let e=[],t="",n=0,a=null;for(let i=0;i0){n--,t+="]]",i++;continue}if(!n&&(o==='"'||o==="'")){a===null?a=o:a===o&&(a=null),t+=o;continue}if(o===","&&n===0&&a===null){let c=t.trim();c&&e.push(c),t="";continue}t+=o}let s=t.trim();return s&&e.push(s),e}var ep=b(()=>{});var oI={};Ke(oI,{DEFAULT_CORE_FIELDS:()=>O8,DEFAULT_FIELD_GROUPS:()=>R8,createDefaultFieldConfig:()=>F8,getFieldsByGroup:()=>DPe,getFieldsForModal:()=>L8,initializeFieldConfig:()=>tp,migrateUserFieldsToFieldConfig:()=>$8});function F8(){return{version:1,fields:[...O8],groups:[...R8]}}function L8(r,e){return r.fields.filter(t=>t.enabled).filter(t=>e?t.visibleInCreation:t.visibleInEdit).sort((t,n)=>{var o,l;let a=r.groups.find(c=>c.id===t.group),s=r.groups.find(c=>c.id===n.group),i=((o=a==null?void 0:a.order)!=null?o:0)-((l=s==null?void 0:s.order)!=null?l:0);return i!==0?i:t.order-n.order})}function DPe(r,e){let t=L8(r,e),n=new Map;for(let a of t){let s=n.get(a.group)||[];s.push(a),n.set(a.group,s)}return n}function $8(r){return!r||r.length===0?[]:r.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 tp(r,e){if(r)return r;let t=F8();if(e&&e.length>0){let n=$8(e);t.fields.push(...n)}return t}var R8,O8,Xy=b(()=>{R8=[{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}],O8=[{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}]});var a7,s7,hd,av,sv,ao,er,Hh,GE,ZE,KE,so,sp,Fs=b(()=>{a7="tasknotes-mini-calendar-view",s7="tasknotes-agenda-view",hd="tasknotes-pomodoro-view",av="tasknotes-pomodoro-stats-view",sv="tasknotes-stats-view",ao="data-changed",er="task-updated",Hh="task-deleted",GE="pomodoro-start",ZE="pomodoro-complete",KE="pomodoro-interrupt",so="pomodoro-tick",sp="date-changed"});var iv,hn,ip=b(()=>{iv=["MO","TU","WE","TH","FR","SA","SU"],hn=(function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(iv.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=iv[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r})()});function op(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=Ct(t,e/t.length)),t.slice(0,e)+String(n))}var yr,Ls,gI,Yn,gi,Ct,i7,o7,da,QE,$s,ln,_t,$a=b(()=>{ip();yr=function(r){return r!=null},Ls=function(r){return typeof r=="number"},gI=function(r){return typeof r=="string"&&iv.includes(r)},Yn=Array.isArray,gi=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n{$a();Uo=function(r,e,t,n,a,s){return n===void 0&&(n=0),a===void 0&&(a=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,a,s))},jPe=[31,28,31,30,31,30,31,31,30,31,30,31],c7=1e3*60*60*24,JE=9999,d7=Uo(1970,1,1),zPe=[6,0,1,2,3,4,5],Uh=function(r){return r%4===0&&r%100!==0||r%400===0},yI=function(r){return r instanceof Date},lp=function(r){return yI(r)&&!isNaN(r.getTime())},BPe=function(r,e){var t=r.getTime(),n=e.getTime(),a=t-n;return Math.round(a/c7)},ov=function(r){return BPe(r,d7)},XE=function(r){return new Date(d7.getTime()+r*c7)},qPe=function(r){var e=r.getUTCMonth();return e===1&&Uh(r.getUTCFullYear())?29:jPe[e]},Jl=function(r){return zPe[r.getUTCDay()]},vI=function(r,e){var t=Uo(r,e+1,1);return[Jl(t),qPe(t)]},ex=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},tx=function(r){var e=new Date(r.getTime());return e},bI=function(r){for(var e=[],t=0;t{HPe=(function(){function r(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 r.prototype.accept=function(e){++this.total;var t=this.minDate&&ethis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.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}},r.prototype.clone=function(){return new r(this.method,this.args)},r})(),ec=HPe});function Wh(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");TI(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function oe(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,s;n{TI=function(r,e){return TI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},TI(r,e)};Gn=function(){return Gn=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{tc();rx();UPe=(function(r){Wh(e,r);function e(t,n,a){var s=r.call(this,t,n)||this;return s.iterator=a,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e})(ec),kI=UPe});var VPe,cp,nx=b(()=>{VPe={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}},cp=VPe});var m7,WPe,YPe,GPe,Vo,h7=b(()=>{nx();yi();$a();m7=function(r,e){return r.indexOf(e)!==-1},WPe=function(r){return r.toString()},YPe=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},GPe=(function(){function r(e,t,n,a){if(t===void 0&&(t=WPe),n===void 0&&(n=cp),a===void 0&&(a=YPe),this.text=[],this.language=n||cp,this.gettext=t,this.dateFormatter=a,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),i=[].concat(this.options.bynmonthday);s.sort(function(d,u){return d-u}),i.sort(function(d,u){return u-d}),this.bymonthday=s.concat(i),this.bymonthday.length||(this.bymonthday=null)}if(yr(this.origOptions.byweekday)){var o=Yn(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 r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(m7(["dtstart","tzid","wkst","freq"],n))return!0;if(!m7(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[be.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("")},r.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"))},r.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"))},r.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()},r.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())},r.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()},r.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")))},r.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")))},r.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"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var a=Math.abs(e);switch(a){case 1:case 21:case 31:t=a+n("st");break;case 2:case 22:t=a+n("nd");break;case 3:case 23:t=a+n("rd");break;default:t=a+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=Ls(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,a){var s=this;a===void 0&&(a=","),Yn(e)||(e=[e]);var i=function(l,c,d){for(var u="",p=0;p366)throw new Error("Nth out of range: "+p);return n.nextSymbol(),n.accept("last")?-p:p;default:return!1}}function d(){n.accept("on"),n.accept("the");var p=c();if(p)for(t.bymonthday=[p],n.nextSymbol();n.accept("comma");){if(p=c(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(p),n.nextSymbol()}}function u(){if(n.symbol==="until"){var p=Date.parse(n.text);if(!p)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(p)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ZPe,f7=b(()=>{nx();yi();ZPe=(function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var a in this.rules){n=this.rules[a];var s=n.exec(this.text);s&&(e===null||s[0].length>e[0].length)&&(e=s,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},r.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},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r})()});function dv(r){return r{(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ht||(ht={}))});var g7,Yh,y7,v7,b7=b(()=>{h7();f7();yi();rc();nx();g7=function(r,e){return e===void 0&&(e=cp),new be(cv(r,e)||void 0)},Yh=["count","until","interval","byweekday","bymonthday","bymonth"];Vo.IMPLEMENTED=[];Vo.IMPLEMENTED[ht.HOURLY]=Yh;Vo.IMPLEMENTED[ht.MINUTELY]=Yh;Vo.IMPLEMENTED[ht.DAILY]=["byhour"].concat(Yh);Vo.IMPLEMENTED[ht.WEEKLY]=Yh;Vo.IMPLEMENTED[ht.MONTHLY]=Yh;Vo.IMPLEMENTED[ht.YEARLY]=["byweekno","byyearday"].concat(Yh);y7=function(r,e,t,n){return new Vo(r,e,t,n).toString()},v7=Vo.isFullyConvertible});var Gh,T7,ax=b(()=>{tc();rc();$a();ua();Gh=(function(){function r(e,t,n,a){this.hour=e,this.minute=t,this.second=n,this.millisecond=a||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r})(),T7=(function(r){Wh(e,r);function e(t,n,a,s,i,o,l){var c=r.call(this,s,i,o,l)||this;return c.year=t,c.month=n,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 Jl(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 n=Math.floor(this.month/12),a=da(this.month,12);this.month=a,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,a){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=QE(this.hour,24),i=s.div,o=s.mod;if(i&&(this.hour=o,this.addDaily(i)),$s(a)||_t(a,this.hour))break}},e.prototype.addMinutes=function(t,n,a,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var i=QE(this.minute,60),o=i.div,l=i.mod;if(o&&(this.minute=l,this.addHours(o,!1,a)),($s(a)||_t(a,this.hour))&&($s(s)||_t(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,a,s,i){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=QE(this.second,60),l=o.div,c=o.mod;if(l&&(this.second=c,this.addMinutes(l,!1,a,s)),($s(a)||_t(a,this.hour))&&($s(s)||_t(s,this.minute))&&($s(i)||_t(i,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=vI(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>JE))return;t=vI(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var a=t.freq,s=t.interval,i=t.wkst,o=t.byhour,l=t.byminute,c=t.bysecond;switch(a){case ht.YEARLY:return this.addYears(s);case ht.MONTHLY:return this.addMonths(s);case ht.WEEKLY:return this.addWeekly(s,i);case ht.DAILY:return this.addDaily(s);case ht.HOURLY:return this.addHours(s,n,o);case ht.MINUTELY:return this.addMinutes(s,n,o,l);case ht.SECONDLY:return this.addSeconds(s,n,o,l,c)}},e})(Gh)});function wI(r){for(var e=[],t=Object.keys(r),n=0,a=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||ln(e.byweekno)||ln(e.byyearday)||e.bymonthday||ln(e.bymonthday)||yr(e.byweekday)||yr(e.byeaster)))switch(e.freq){case be.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case be.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case be.WEEKLY:e.byweekday=[Jl(e.dtstart)];break}if(yr(e.bymonth)&&!Yn(e.bymonth)&&(e.bymonth=[e.bymonth]),yr(e.byyearday)&&!Yn(e.byyearday)&&Ls(e.byyearday)&&(e.byyearday=[e.byyearday]),!yr(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Yn(e.bymonthday)){for(var a=[],s=[],t=0;t0?a.push(n):n<0&&s.push(n)}e.bymonthday=a,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(yr(e.byweekno)&&!Yn(e.byweekno)&&(e.byweekno=[e.byweekno]),!yr(e.byweekday))e.bynweekday=null;else if(Ls(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(gI(e.byweekday))e.byweekday=[hn.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof hn)!e.byweekday.n||e.freq>be.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var i=[],o=[],t=0;tbe.MONTHLY?i.push(l.weekday):o.push([l.weekday,l.n])}e.byweekday=ln(i)?i:null,e.bynweekday=ln(o)?o:null}return yr(e.byhour)?Ls(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq{tc();rc();$a();yi();ua();ip();ax()});function mv(r){var e=r.split(` `).map(KPe).filter(function(t){return t!==null});return Gn(Gn({},e[0]),e[1])}function pv(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],a=t[2];return n&&(e.tzid=n),e.dtstart=lv(a),e}function KPe(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return E7(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return E7(r);case"DTSTART":return pv(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function E7(r){var e=r.replace(/^RRULE:/i,""),t=pv(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(a){var s=a.split("="),i=s[0],o=s[1];switch(i.toUpperCase()){case"FREQ":t.freq=ht[o.toUpperCase()];break;case"WKST":t.wkst=vi[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=QPe(o),c=i.toLowerCase();t[c]=l;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=JPe(o);break;case"DTSTART":case"TZID":var d=pv(r);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=lv(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+i+"'")}}),t}function QPe(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(x7)}return x7(r)}function x7(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function JPe(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return vi[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var a=Number(n[1]),s=n[2],i=vi[s].weekday;return new hn(i,a)})}var EI=b(()=>{tc();rc();ip();ua();yi()});var dp,sx=b(()=>{ua();dp=(function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=Vh(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:u7(this.date,this.tzid)},r})()});function hv(r){for(var e=[],t="",n=Object.keys(r),a=Object.keys(uv),s=0;s{yi();$a();ip();ua();sx()});function e_e(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var D7,C7=b(()=>{rx();ua();$a();D7=(function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?tx(t):bI(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,a=t?Object.keys(t):[],s=function(d){for(var u=0;u{tc();$a();P7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],Ct(1,31),!0),Ct(2,28),!0),Ct(3,31),!0),Ct(4,30),!0),Ct(5,31),!0),Ct(6,30),!0),Ct(7,31),!0),Ct(8,31),!0),Ct(9,30),!0),Ct(10,31),!0),Ct(11,30),!0),Ct(12,31),!0),Ct(1,7),!0),_7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],Ct(1,31),!0),Ct(2,29),!0),Ct(3,31),!0),Ct(4,30),!0),Ct(5,31),!0),Ct(6,30),!0),Ct(7,31),!0),Ct(8,31),!0),Ct(9,30),!0),Ct(10,31),!0),Ct(11,30),!0),Ct(12,31),!0),Ct(1,7),!0),t_e=gi(1,29),r_e=gi(1,30),fd=gi(1,31),pa=gi(1,32),M7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],pa,!0),r_e,!0),pa,!0),fd,!0),pa,!0),fd,!0),pa,!0),pa,!0),fd,!0),pa,!0),fd,!0),pa,!0),pa.slice(0,7),!0),A7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],pa,!0),t_e,!0),pa,!0),fd,!0),pa,!0),fd,!0),pa,!0),pa,!0),fd,!0),pa,!0),fd,!0),pa,!0),pa.slice(0,7),!0),n_e=gi(-28,0),a_e=gi(-29,0),gd=gi(-30,0),ma=gi(-31,0),I7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],ma,!0),a_e,!0),ma,!0),gd,!0),ma,!0),gd,!0),ma,!0),ma,!0),gd,!0),ma,!0),gd,!0),ma,!0),ma.slice(0,7),!0),N7=oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe([],ma,!0),n_e,!0),ma,!0),gd,!0),ma,!0),gd,!0),ma,!0),ma,!0),gd,!0),ma,!0),gd,!0),ma,!0),ma.slice(0,7),!0),R7=[0,31,60,91,121,152,182,213,244,274,305,335,366],O7=[0,31,59,90,120,151,181,212,243,273,304,334,365],DI=(function(){for(var r=[],e=0;e<55;e++)r=r.concat(gi(7));return r})()});function L7(r,e){var t=Uo(r,1,1),n=Uh(r)?366:365,a=Uh(r+1)?366:365,s=ov(t),i=Jl(t),o=Gn(Gn({yearlen:n,nextyearlen:a,yearordinal:s,yearweekday:i},s_e(r)),{wnomask:null});if($s(e.byweekno))return o;o.wnomask=Ct(0,n+7);var l,c,d=l=da(7-i+e.wkst,7);d>=4?(d=0,c=o.yearlen+da(i-e.wkst,7)):c=n-d;for(var u=Math.floor(c/7),p=da(c,7),m=Math.floor(u+p/4),h=0;h0&&f<=m){var g=void 0;f>1?(g=d+(f-1)*7,d!==l&&(g-=7-l)):g=d;for(var y=0;y<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==e.wkst);y++);}}if(_t(e.byweekno,1)){var g=d+m*7;if(d!==l&&(g-=7-l),g=4?(w=0,x=S+da(T-e.wkst,7)):x=n-d,k=Math.floor(52+da(x,7)/4)}if(_t(e.byweekno,k))for(var g=0;g{tc();ua();$a();F7()});function j7(r,e,t,n,a,s){var i={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===be.YEARLY)if($s(s.bymonth))o=[[0,t]];else for(var l=0;l{yi();$a()});function B7(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),a=r%100,s=Math.floor(n/4),i=n%4,o=Math.floor((n+8)/25),l=Math.floor((n-o+1)/3),c=Math.floor(19*t+n-s-l+15)%30,d=Math.floor(a/4),u=a%4,p=Math.floor(32+2*i+2*d-c-u)%7,m=Math.floor((t+11*c+22*p)/451),h=Math.floor((c+p-7*m+114)/31),f=(c+p-7*m+114)%31+1,g=Date.UTC(r,h-1,f+e),y=Date.UTC(r,0,1);return[Math.ceil((g-y)/(1e3*60*60*24))]}var q7=b(()=>{});var i_e,H7,U7=b(()=>{$a();rc();$7();z7();q7();ax();ua();i_e=(function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=L7(e,n)),ln(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var a=this.yearinfo,s=a.yearlen,i=a.mrange,o=a.wdaymask;this.monthinfo=j7(e,t,s,i,o,n)}yr(n.byeaster)&&(this.eastermask=B7(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[gi(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],a=this.mrange[t],s=Ct(null,this.yearlen),i=n;i{ua();$a()});function ix(r,e){var t=e.dtstart,n=e.freq,a=e.interval,s=e.until,i=e.bysetpos,o=e.count;if(o===0||a===0)return nc(r);var l=T7.fromDate(t),c=new H7(e);c.rebuild(l.year,l.month);for(var d=c_e(c,l,e);;){var u=c.getdayset(n)(l.year,l.month,l.day),p=u[0],m=u[1],h=u[2],f=l_e(p,m,h,c,e);if(ln(i))for(var g=V7(i,d,m,h,c,p),y=0;ys)return nc(r);if(k>=t){var T=Y7(k,e);if(!r.accept(T)||o&&(--o,!o))return nc(r)}}else for(var y=m;ys)return nc(r);if(k>=t){var T=Y7(k,e);if(!r.accept(T)||o&&(--o,!o))return nc(r)}}}if(e.interval===0||(l.add(e,f),l.year>JE))return nc(r);dv(n)||(d=c.gettimeset(n)(l.hour,l.minute,l.second,0)),c.rebuild(l.year,l.month)}}function o_e(r,e,t){var n=t.bymonth,a=t.byweekno,s=t.byweekday,i=t.byeaster,o=t.bymonthday,l=t.bynmonthday,c=t.byyearday;return ln(n)&&!_t(n,r.mmask[e])||ln(a)&&!r.wnomask[e]||ln(s)&&!_t(s,r.wdaymask[e])||ln(r.nwdaymask)&&!r.nwdaymask[e]||i!==null&&!_t(r.eastermask,e)||(ln(o)||ln(l))&&!_t(o,r.mdaymask[e])&&!_t(l,r.nmdaymask[e])||ln(c)&&(e=r.yearlen&&!_t(c,e+1-r.yearlen)&&!_t(c,-r.nextyearlen+e-r.yearlen))}function Y7(r,e){return new dp(r,e.tzid).rezonedDate()}function nc(r){return r.getValue()}function l_e(r,e,t,n,a){for(var s=!1,i=e;i=be.HOURLY&&ln(a)&&!_t(a,e.hour)||n>=be.MINUTELY&&ln(s)&&!_t(s,e.minute)||n>=be.SECONDLY&&ln(i)&&!_t(i,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var CI=b(()=>{rc();ua();U7();yi();SI();$a();sx();W7();ax()});var vi,uv,S7,be,yi=b(()=>{ua();rx();p7();b7();rc();SI();EI();xI();C7();ip();CI();vi={MO:new hn(0),TU:new hn(1),WE:new hn(2),TH:new hn(3),FR:new hn(4),SA:new hn(5),SU:new hn(6)},uv={freq:ht.YEARLY,dtstart:null,interval:1,wkst:vi.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},S7=Object.keys(uv),be=(function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new D7,this.origOptions=wI(e);var n=k7(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return cv(e,t)},r.fromText=function(e,t){return g7(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return ix(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new kI("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new ec("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,a){if(n===void 0&&(n=!1),!lp(e)||!lp(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(a)return this._iter(new kI("between",s,a));var i=this._cacheGet("between",s);return i===!1&&(i=this._iter(new ec("between",s)),this._cacheAdd("between",i,s)),i},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!lp(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},a=this._cacheGet("before",n);return a===!1&&(a=this._iter(new ec("before",n)),this._cacheAdd("before",a,n)),a},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!lp(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},a=this._cacheGet("after",n);return a===!1&&(a=this._iter(new ec("after",n)),this._cacheAdd("after",a,n)),a},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return hv(this.origOptions)},r.prototype.toText=function(e,t,n){return y7(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return v7(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ht.YEARLY,r.MONTHLY=ht.MONTHLY,r.WEEKLY=ht.WEEKLY,r.DAILY=ht.DAILY,r.HOURLY=ht.HOURLY,r.MINUTELY=ht.MINUTELY,r.SECONDLY=ht.SECONDLY,r.MO=vi.MO,r.TU=vi.TU,r.WE=vi.WE,r.TH=vi.TH,r.FR=vi.FR,r.SA=vi.SA,r.SU=vi.SU,r.parseString=mv,r.optionsToString=hv,r})()});function G7(r,e,t,n,a,s){var i={},o=r.accept;function l(p,m){t.forEach(function(h){h.between(p,m,!0).forEach(function(f){i[Number(f)]=!0})})}a.forEach(function(p){var m=new dp(p,s).rezonedDate();i[Number(m)]=!0}),r.accept=function(p){var m=Number(p);return isNaN(m)?o.call(this,p):!i[m]&&(l(new Date(m-1),new Date(m+1)),!i[m])?(i[m]=!0,o.call(this,p)):!0},r.method==="between"&&(l(r.args.after,r.args.before),r.accept=function(p){var m=Number(p);return i[m]?!0:(i[m]=!0,o.call(this,p))});for(var c=0;c{sx();CI();ua()});function d_e(r,e){var t=[],n=[],a=[],s=[],i=pv(r),o=i.dtstart,l=i.tzid,c=f_e(r,e.unfold);return c.forEach(function(d){var u;if(d){var p=h_e(d),m=p.name,h=p.parms,f=p.value;switch(m.toUpperCase()){case"RRULE":if(h.length)throw new Error("unsupported RRULE parm: ".concat(h.join(",")));t.push(mv(d));break;case"RDATE":var g=(u=/RDATE(?:;TZID=([^:=]+))?/i.exec(d))!==null&&u!==void 0?u:[],y=g[1];y&&!l&&(l=y),n=n.concat(Q7(f,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: ".concat(h.join(",")));a.push(mv(f));break;case"EXDATE":s=s.concat(Q7(f,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+m)}}}),{dtstart:o,tzid:l,rrulevals:t,rdatevals:n,exrulevals:a,exdatevals:s}}function u_e(r,e){var t=d_e(r,e),n=t.rrulevals,a=t.rdatevals,s=t.exrulevals,i=t.exdatevals,o=t.dtstart,l=t.tzid,c=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||a.length||s.length||i.length){var d=new MI(c);return d.dtstart(o),d.tzid(l||void 0),n.forEach(function(p){d.rrule(new be(PI(p,o,l),c))}),a.forEach(function(p){d.rdate(p)}),s.forEach(function(p){d.exrule(new be(PI(p,o,l),c))}),i.forEach(function(p){d.exdate(p)}),e.compatible&&e.dtstart&&d.rdate(o),d}var u=n[0]||{};return new be(PI(u,u.dtstart||e.dtstart||o,u.tzid||e.tzid||l),c)}function ox(r,e){return e===void 0&&(e={}),u_e(r,p_e(e))}function PI(r,e,t){return Gn(Gn({},r),{dtstart:e,tzid:t})}function p_e(r){var e=[],t=Object.keys(r),n=Object.keys(K7);if(t.forEach(function(a){_t(n,a)||e.push(a)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Gn(Gn({},K7),r)}function m_e(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=o7(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function h_e(r){var e=m_e(r),t=e.name,n=e.value,a=t.split(";");if(!a)throw new Error("empty property name");return{name:a[0].toUpperCase(),parms:a.slice(1),value:n}}function f_e(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` `),n=0;n0&&a[0]===" "?(t[n-1]+=a.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function g_e(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Q7(r,e){return g_e(e),r.split(",").map(function(t){return lv(t)})}var K7,_I=b(()=>{tc();yi();AI();ua();$a();EI();K7={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function J7(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n{tc();yi();ua();$a();Z7();_I();xI();MI=(function(r){Wh(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=J7.apply(n,["dtstart"]),n.tzid=J7.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return G7(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){X7(t,this._rrule)},e.prototype.exrule=function(t){X7(t,this._exrule)},e.prototype.rdate=function(t){eQ(t,this._rdate)},e.prototype.exdate=function(t){eQ(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return ox(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return ox(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(hv({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(` `))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(` `).map(function(a){return a.replace(/^RRULE:/,"EXRULE:")}).filter(function(a){return!/^DTSTART/.test(a)}))}),this._rdate.length&&t.push(tQ("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(tQ("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(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e})(be)});var II=b(()=>{yi();AI();_I();rc();ip();ua()});function cn(r){if(!r)return r;let e=r.trim();if(e.startsWith("<")&&e.endsWith(">")){let n=e.slice(1,-1).trim(),a=/\.md$/i.test(n);try{n=decodeURIComponent(n)}catch(i){console.debug("Failed to decode URI component:",n,i)}let s=(0,fv.parseLinktext)(n);return a?n:s.path||n}if(e.startsWith("[[")&&e.endsWith("]]")){let n=e.slice(2,-2).trim(),a=n.indexOf("|"),s=a!==-1?n.substring(0,a):n;return(0,fv.parseLinktext)(s).path}let t=e.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(t){let n=t[2].trim();n.startsWith("<")&&n.endsWith(">")&&(n=n.slice(1,-1).trim());let a=/\.md$/i.test(n);try{n=decodeURIComponent(n)}catch(i){console.debug("Failed to decode URI component:",n,i)}let s=(0,fv.parseLinktext)(n);return a?n:s.path}return e}function Zh(r,e){if(!r)return"";let t=r.trim(),n=t.match(/^\[([^\]]+)\]\(([^)]+)\)$/);if(n){let a=n[1].trim(),s=n[2].trim();if(a)return a;let i=cn(s),o=e==null?void 0:e.metadataCache.getFirstLinkpathDest(i,"");if(o)return o.basename;let l=i.replace(/\.md$/i,""),c=l.split("/");return c[c.length-1]||l}if(t.startsWith("[[")&&t.endsWith("]]")){let a=t.slice(2,-2).trim(),s=a.indexOf("|");if(s!==-1){let u=a.slice(s+1).trim();if(u)return u}let o=(0,fv.parseLinktext)(a.split("|")[0]||a).path||cn(t),l=e==null?void 0:e.metadataCache.getFirstLinkpathDest(o,"");if(l)return l.basename;let c=o.replace(/\.md$/i,""),d=c.split("/");return d[d.length-1]||c}return t}function Wo(r,e,t,n,a,s){if(s)return r.fileManager.generateMarkdownLink(e,t,n||"",a||"");let o=`[[${r.metadataCache.fileToLinktext(e,t,!0)}`;return n&&(o+=n),a&&(o+=`|${a}`),o+="]]",o}function NI(r,e,t,n,a){return Wo(r,e,t,"",n,a)}var fv,io=b(()=>{fv=require("obsidian")});function v_e(r){return y_e.includes(r)}function RI(r){return typeof r=="string"?r:r.uid}function Yo(r){if(typeof r=="string"){let e=r.trim();return e?{uid:cn(e),reltype:as}:null}if(typeof r=="object"&&r!==null){let e=r,t=typeof e.uid=="string"?e.uid.trim():"";if(!t)return null;let n=cn(t),a=typeof e.reltype=="string"?e.reltype.trim().toUpperCase():"",s=v_e(a)?a:as,i=typeof e.gap=="string"&&e.gap.trim().length>0?e.gap.trim():void 0;return i?{uid:n,reltype:s,gap:i}:{uid:n,reltype:s}}return null}function lx(r){if(r==null)return;let e=Array.isArray(r)?r:[r],t=[];for(let n of e){let a=Yo(n);a&&t.push(a)}return t.length>0?t:void 0}function rQ(r){return r.map(e=>{let n={uid:e.uid.startsWith("[[")?e.uid:`[[${e.uid}]]`,reltype:e.reltype};return e.gap&&e.gap.trim().length>0&&(n.gap=e.gap),n})}function up(r,e,t){let n=RI(t);if(!n)return null;let a=cn(n);if(!a)return null;let s=new Set;s.add(a),a.endsWith(".md")&&s.add(a.replace(/\.md$/i,""));let i=(0,Kh.parseLinktext)(a);i.path&&i.path!==a&&s.add(i.path);for(let o of s){let l=r.metadataCache.getFirstLinkpathDest(o,e);if(l instanceof Kh.TFile)return{path:l.path,file:l};let c=r.vault.getAbstractFileByPath(o);if(c instanceof Kh.TFile)return{path:c.path,file:c}}return null}function js(r,e,t,n){let a=r.vault.getAbstractFileByPath(t);return a instanceof Kh.TFile?Wo(r,a,e,"","",n):`[[${(t.split("/").pop()||t).replace(/\.md$/i,"")}]]`}var Kh,as,y_e,Qh=b(()=>{Kh=require("obsidian");ep();io();as="FINISHTOSTART",y_e=["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"]});var Jh,OI=b(()=>{Qh();kt();Jh=class{constructor(e){this.mapping=e}toUserField(e){return this.mapping[e]}normalizeTitle(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>String(t)).join(", ");if(e!=null)return typeof e=="object"?"":String(e)}mapFromFrontmatter(e,t,n){var s;if(!e)return{};let a={path:t};if(e[this.mapping.title]!==void 0){let i=e[this.mapping.title],o=this.normalizeTitle(i);o!==void 0&&(a.title=o)}else if(n){let i=(s=t.split("/").pop())==null?void 0:s.replace(".md","");i&&(a.title=i)}if(e[this.mapping.status]!==void 0){let i=e[this.mapping.status];typeof i=="boolean"?a.status=i?"true":"false":a.status=i}if(e[this.mapping.priority]!==void 0&&(a.priority=e[this.mapping.priority]),e[this.mapping.due]!==void 0&&(a.due=e[this.mapping.due]),e[this.mapping.scheduled]!==void 0&&(a.scheduled=e[this.mapping.scheduled]),e[this.mapping.contexts]!==void 0){let i=e[this.mapping.contexts];a.contexts=Array.isArray(i)?i:[i]}if(e[this.mapping.projects]!==void 0){let i=e[this.mapping.projects];a.projects=Array.isArray(i)?i:[i]}if(e[this.mapping.timeEstimate]!==void 0&&(a.timeEstimate=e[this.mapping.timeEstimate]),e[this.mapping.completedDate]!==void 0&&(a.completedDate=e[this.mapping.completedDate]),e[this.mapping.recurrence]!==void 0&&(a.recurrence=e[this.mapping.recurrence]),e[this.mapping.recurrenceAnchor]!==void 0){let i=e[this.mapping.recurrenceAnchor];i==="scheduled"||i==="completion"?a.recurrence_anchor=i:(console.warn(`Invalid recurrence_anchor value: ${i}, defaulting to 'scheduled'`),a.recurrence_anchor="scheduled")}if(e[this.mapping.dateCreated]!==void 0&&(a.dateCreated=e[this.mapping.dateCreated]),e[this.mapping.dateModified]!==void 0&&(a.dateModified=e[this.mapping.dateModified]),e[this.mapping.timeEntries]!==void 0){let i=e[this.mapping.timeEntries];a.timeEntries=Array.isArray(i)?i:[]}if(e[this.mapping.completeInstances]!==void 0&&(a.complete_instances=OE(e[this.mapping.completeInstances])),e[this.mapping.skippedInstances]!==void 0&&(a.skipped_instances=OE(e[this.mapping.skippedInstances])),this.mapping.blockedBy&&e[this.mapping.blockedBy]!==void 0){let i=lx(e[this.mapping.blockedBy]);i&&(a.blockedBy=i)}if(e[this.mapping.icsEventId]!==void 0){let i=e[this.mapping.icsEventId];a.icsEventId=Array.isArray(i)?i:[i]}if(e[this.mapping.googleCalendarEventId]!==void 0&&(a.googleCalendarEventId=e[this.mapping.googleCalendarEventId]),e[this.mapping.reminders]!==void 0){let i=e[this.mapping.reminders];if(Array.isArray(i)){let o=i.filter(l=>l!=null);o.length>0&&(a.reminders=o)}else i!=null&&(a.reminders=[i])}return e.tags&&Array.isArray(e.tags)&&(a.tags=e.tags,a.archived=e.tags.includes(this.mapping.archiveTag)),a}mapToFrontmatter(e,t,n){let a={};if(e.title!==void 0&&(a[this.mapping.title]=e.title),e.status!==void 0){let i=e.status.toLowerCase(),o=i==="true"||i==="false"?i==="true":e.status;a[this.mapping.status]=o}if(e.priority!==void 0&&(a[this.mapping.priority]=e.priority),e.due!==void 0&&(a[this.mapping.due]=e.due),e.scheduled!==void 0&&(a[this.mapping.scheduled]=e.scheduled),e.contexts!==void 0&&(!Array.isArray(e.contexts)||e.contexts.length>0)&&(a[this.mapping.contexts]=e.contexts),e.projects!==void 0&&(!Array.isArray(e.projects)||e.projects.length>0)&&(a[this.mapping.projects]=e.projects),e.timeEstimate!==void 0&&(a[this.mapping.timeEstimate]=e.timeEstimate),e.completedDate!==void 0&&(a[this.mapping.completedDate]=e.completedDate),e.recurrence!==void 0&&(a[this.mapping.recurrence]=e.recurrence),e.recurrence_anchor!==void 0&&(a[this.mapping.recurrenceAnchor]=e.recurrence_anchor),e.dateCreated!==void 0&&(a[this.mapping.dateCreated]=e.dateCreated),e.dateModified!==void 0&&(a[this.mapping.dateModified]=e.dateModified),e.timeEntries!==void 0&&(a[this.mapping.timeEntries]=e.timeEntries),e.complete_instances!==void 0&&(a[this.mapping.completeInstances]=e.complete_instances),e.skipped_instances!==void 0&&e.skipped_instances.length>0&&(a[this.mapping.skippedInstances]=e.skipped_instances),e.blockedBy!==void 0)if(Array.isArray(e.blockedBy)){let i=e.blockedBy.map(o=>Yo(o)).filter(o=>!!o);i.length>0&&(a[this.mapping.blockedBy]=rQ(i))}else a[this.mapping.blockedBy]=e.blockedBy;e.icsEventId!==void 0&&e.icsEventId.length>0&&(a[this.mapping.icsEventId]=e.icsEventId),e.reminders!==void 0&&e.reminders.length>0&&(a[this.mapping.reminders]=e.reminders);let s=e.tags?[...e.tags]:[];return t&&!s.includes(t)&&s.push(t),e.archived===!0&&!s.includes(this.mapping.archiveTag)?s.push(this.mapping.archiveTag):e.archived===!1&&(s=s.filter(i=>i!==this.mapping.archiveTag)),s.length>0&&(a.tags=s),a}updateMapping(e){this.mapping=e}getMapping(){return{...this.mapping}}lookupMappingKey(e){for(let[t,n]of Object.entries(this.mapping))if(n===e)return t;return null}isRecognizedProperty(e){return this.lookupMappingKey(e)!==null}isPropertyForField(e,t){return this.mapping[t]===e}toUserFields(e){return e.map(t=>this.mapping[t])}fromUserField(e){return this.lookupMappingKey(e)}static validateMapping(e){let t=[],n=Object.keys(e);for(let i of n)(!e[i]||e[i].trim()==="")&&t.push(`Field "${i}" cannot be empty`);let a=Object.values(e),s=new Set(a);return a.length!==s.size&&t.push("Field mappings must have unique property names"),{valid:t.length===0,errors:t}}}});var lQ={};Ke(lQ,{addDTSTARTToRecurrenceRule:()=>vp,addDTSTARTToRecurrenceRuleWithDraggedTime:()=>BI,calculateDefaultDate:()=>bi,calculateDuration:()=>nQ,calculateTotalTimeSpent:()=>ha,ensureFolderExists:()=>mp,extractNoteInfo:()=>x_e,extractTaskInfo:()=>FI,extractTimeblocksFromNote:()=>oQ,filterEmptyProjects:()=>ac,formatTime:()=>gv,generateRecurringInstances:()=>gp,generateTimeblockId:()=>$I,getActiveTimeEntry:()=>dx,getEffectiveTaskStatus:()=>fp,getNextUncompletedOccurrence:()=>aQ,getRecurrenceDisplayText:()=>yv,getRecurringTaskCompletionText:()=>k_e,isDueByRRule:()=>hp,isSameDay:()=>ux,parseTime:()=>b_e,resetMarkdownCheckboxes:()=>LI,sanitizeForCssClass:()=>mx,sanitizeTags:()=>zs,shouldShowRecurringTaskOnDate:()=>T_e,shouldUseRecurringTaskUI:()=>w_e,splitFrontmatterAndBody:()=>Xh,timeblockToCalendarEvent:()=>D_e,updateDTSTARTInRecurrenceRule:()=>zI,updateTimeblockInDailyNote:()=>px,updateToNextScheduledOccurrence:()=>yp,validateTimeBlock:()=>iQ});function cx(r){if(!r.startsWith("---"))return{};let e=r.indexOf("---",3);if(e===-1)return{};let t=r.substring(3,e);try{return(0,pp.parseYaml)(t)||{}}catch(n){return console.error("Error parsing frontmatter:",n),{}}}async function mp(r,e){try{let n=(0,pp.normalizePath)(e).split("/").filter(s=>s.length>0),a="";for(let s of n)if(a=a?`${a}/${s}`:s,!await r.adapter.exists(a))try{await r.createFolder(a)}catch(i){if(!await r.adapter.exists(a))throw new Error(`Failed to create folder "${a}"`)}}catch(t){let n=t instanceof Error?t.message:String(t),a=t instanceof Error?t.stack:void 0;console.error("Error creating folder structure:",{error:n,stack:a,folderPath:e,normalizedPath:(0,pp.normalizePath)(e)});let s=new Error(`Failed to create folder "${e}": ${n}`);throw a&&(s.stack=a),s}}function nQ(r,e){try{let t=new Date(r),n=new Date(e);if(isNaN(t.getTime())||isNaN(n.getTime()))return console.error("Invalid timestamps for duration calculation:",{startTime:r,endTime:e}),0;if(n<=t)return console.error("End time is not after start time:",{startTime:r,endTime:e}),0;let a=n.getTime()-t.getTime(),s=Math.round(a/(1e3*60));return Math.max(0,s)}catch(t){return console.error("Error calculating duration:",t,{startTime:r,endTime:e}),0}}function ha(r){return!r||!Array.isArray(r)?0:r.reduce((e,t)=>{if(!t.startTime||!t.endTime)return e;let n=nQ(t.startTime,t.endTime);return e+n},0)}function dx(r){return!r||!Array.isArray(r)?null:r.find(e=>e.startTime&&!e.endTime)||null}function gv(r){if(!r||r===0||isNaN(r))return"0m";let e=Math.floor(r/60),t=r%60;return e===0?`${t}m`:t===0?`${e}h`:`${e}h ${t}m`}function b_e(r){try{let e=r.match(/^(\d{1,2}):(\d{2})$/);if(e){let t=parseInt(e[1],10),n=parseInt(e[2],10);if(t>=0&&t<=23&&n>=0&&n<=59)return{hours:t,minutes:n}}return null}catch(e){return console.error("Error parsing time string:",e),null}}function bi(r){if(r==="none")return"";let e=new Date,t;switch(r){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 ux(r,e){return r.getUTCFullYear()===e.getUTCFullYear()&&r.getUTCMonth()===e.getUTCMonth()&&r.getUTCDate()===e.getUTCDate()}function FI(r,e,t,n,a,s,i){var d;let o=r.metadataCache.getFileCache(n),l=o==null?void 0:o.frontmatter;if(l)if(a){let u=a.mapFromFrontmatter(l,t,s);return{title:u.title||"Untitled task",status:u.status||i||"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||[],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 Jh(wE).mapFromFrontmatter(l,t,s);return{title:p.title||"Untitled task",status:p.status||i||"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||[],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:i||"open",priority:"normal",path:t,archived:!1,reminders:[]}}function Xh(r){if(r.startsWith("---")){let e=r.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:r}}function LI(r){let e=/^(\s*)([-*+]|\d+\.)(\s+\[)[xX](\].*)/gm,t=!1;return{content:r.replace(e,(a,s,i,o,l)=>(t=!0,`${s}${i}${o} ${l}`)),changed:t}}function hp(r,e){if(!r.recurrence)return!0;if(typeof r.recurrence=="string")try{let t,n=r.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(n){let c=n[1];if(c.length===8){let d=parseInt(c.slice(0,4)),u=parseInt(c.slice(4,6))-1,p=parseInt(c.slice(6,8));t=new Date(Date.UTC(d,u,p,0,0,0,0))}else{let d=parseInt(c.slice(0,4)),u=parseInt(c.slice(4,6))-1,p=parseInt(c.slice(6,8)),m=parseInt(c.slice(9,11))||0,h=parseInt(c.slice(11,13))||0,f=parseInt(c.slice(13,15))||0;t=new Date(Date.UTC(d,u,p,m,h,f,0))}}else if(r.scheduled)t=rs(r.scheduled);else if(r.dateCreated)t=rs(r.dateCreated);else return!1;let a=r.recurrence.replace(/DTSTART:[^;]+;?/,""),s=be.parseString(a);s.dtstart=t;let i=new be(s),o=rs(eI(e));return i.between(o,new Date(o.getTime()+1440*60*1e3-1),!0).length>0}catch(t){return console.error("Error evaluating rrule:",t,{task:r.title,recurrence:r.recurrence}),!0}return!0}function fp(r,e,t){if(!r.recurrence)return r.status||"open";let n=me(e);return(Array.isArray(r.complete_instances)?r.complete_instances:[]).includes(n)?t||"done":r.status||"open"}function T_e(r,e){return r.recurrence?hp(r,e):!0}function k_e(r,e){var a;if(!r.recurrence)return"";let t=me(e);return((a=r.complete_instances)==null?void 0:a.includes(t))||!1?"Completed for this date":"Not completed for this date"}function w_e(r){return!!r.recurrence}function gp(r,e,t){if(!r.recurrence)return[];if(typeof r.recurrence=="string")try{let s,i=r.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(i){let p=i[1];if(p.length===8){let m=parseInt(p.slice(0,4)),h=parseInt(p.slice(4,6))-1,f=parseInt(p.slice(6,8));s=new Date(Date.UTC(m,h,f,0,0,0,0))}else{let m=parseInt(p.slice(0,4)),h=parseInt(p.slice(4,6))-1,f=parseInt(p.slice(6,8)),g=parseInt(p.slice(9,11))||0,y=parseInt(p.slice(11,13))||0,k=parseInt(p.slice(13,15))||0;s=new Date(Date.UTC(m,h,f,g,y,k,0))}}else if(r.scheduled)s=rs(r.scheduled);else if(r.dateCreated)s=rs(r.dateCreated);else return[];let o=r.recurrence.replace(/DTSTART:[^;]+;?/,""),l=be.parseString(o);l.dtstart=s;let c=new be(l),d=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0)),u=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),23,59,59,999));return c.between(d,u,!0)}catch(s){console.error("Error generating recurring instances:",s,{task:r.title,recurrence:r.recurrence})}let n=[],a=new Date(e);for(;a<=t;)hp(r,a)&&n.push(new Date(a)),a.setUTCDate(a.getUTCDate()+1);return n}function aQ(r){return r.recurrence?(r.recurrence_anchor||"scheduled")==="completion"?E_e(r):S_e(r):null}function sQ(r){let e=r.match(/INTERVAL=(\d+)/);return e?parseInt(e[1],10):1}function S_e(r){if(!r.recurrence)return null;try{let e=Jr(),t=nt(e),n=sQ(r.recurrence),a=365;r.recurrence.includes("FREQ=DAILY")?a=Math.max(30,n*1*2):r.recurrence.includes("FREQ=WEEKLY")?a=Math.max(90,n*7*2):r.recurrence.includes("FREQ=MONTHLY")?a=Math.max(400,n*31*2):r.recurrence.includes("FREQ=YEARLY")&&(a=Math.max(800,n*366*2));let s=t;if(r.recurrence.includes("DTSTART:")){let c=r.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(c){let d=c[1];if(d.length===8){let u=parseInt(d.slice(0,4)),p=parseInt(d.slice(4,6))-1,m=parseInt(d.slice(6,8)),h=new Date(Date.UTC(u,p,m,0,0,0,0));s=h=t)return c}return null}catch(e){return console.error("Error calculating next scheduled-based occurrence:",e,{task:r.title}),null}}function E_e(r){if(!r.recurrence||typeof r.recurrence!="string")return null;try{let e=Jr(),t=nt(e),n=sQ(r.recurrence),a=365;r.recurrence.includes("FREQ=DAILY")?a=Math.max(30,n*1*2):r.recurrence.includes("FREQ=WEEKLY")?a=Math.max(90,n*7*2):r.recurrence.includes("FREQ=MONTHLY")?a=Math.max(400,n*31*2):r.recurrence.includes("FREQ=YEARLY")&&(a=Math.max(800,n*366*2));let s=null;if(r.recurrence.includes("DTSTART:")){let u=r.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(u){let p=u[1];if(p.length===8){let m=parseInt(p.slice(0,4)),h=parseInt(p.slice(4,6))-1,f=parseInt(p.slice(6,8));s=new Date(Date.UTC(m,h,f,0,0,0,0))}}}let i=s||t,o=new Date(i.getTime()+a*24*60*60*1e3),l=gp(r,i,o),c=new Set(r.skipped_instances||[]),d=s?s.getTime():0;for(let u of l){let p=me(u);if(u.getTime()>d&&u>=t&&!c.has(p))return u}return null}catch(e){return console.error("Error calculating completion-based recurrence:",e,{task:r.title}),null}}function yp(r,e=!0){let t=aQ(r),n=null,a=null,s=null;if(t){if(e)try{let i=r.scheduled?nt(r.scheduled):null,o=r.due?nt(r.due):null;if(i&&o){let l=o.getTime()-i.getTime();t&&(s=new Date(t.getTime()+l))}}catch(i){console.error("Error calculating next due date with offset:",i)}if(r.scheduled&&r.scheduled.includes("T")){let i=r.scheduled.split("T")[1];n=`${me(t)}T${i}`}else n=me(t);if(s&&r.due&&r.due.includes("T")){let i=r.due.split("T")[1];a=`${me(s)}T${i}`}else s&&(a=me(s))}return{scheduled:n,due:a}}function yv(r){if(!r)return"";try{if(r.includes("FREQ=")){let e=r.replace(/DTSTART:[^;]+;?/,"");return be.fromString(e).toText()}return"rrule"}catch(e){return console.error("Error converting recurrence to display text:",e,{recurrence:r}),"rrule"}}function x_e(r,e,t,n,a){var c;let s=((c=t.split("/").pop())==null?void 0:c.replace(".md",""))||"Untitled",i=[],o,l=n==null?void 0:n.stat.mtime;if(n){let d=r.metadataCache.getFileCache(n),u=d==null?void 0:d.frontmatter;if(u)if(u.title&&(s=u.title),u.tags&&Array.isArray(u.tags)&&(i=u.tags),a){let p=a.toUserField("dateCreated");u[p]&&(o=u[p])}else u.dateCreated?o=u.dateCreated:u.created&&(o=u.created)}if(s==="Untitled"){let d=e.match(/^#\s+(.+)$/m);d&&d[1]&&(s=d[1].trim())}if(!o&&n&&(o=D(new Date(n.stat.ctime),"yyyy-MM-dd'T'HH:mm:ss")),o&&!o.match(/^\d{4}-\d{2}-\d{2}$/))try{let d=Nr(o);isNaN(d.getTime())||(o=D(d,"yyyy-MM-dd"))}catch(d){console.error(`Error parsing date ${o}:`,d)}return{title:s,tags:i,path:t,createdDate:o,lastModified:l}}function iQ(r){if(!r||typeof r!="object"||!r.id||typeof r.id!="string"||!r.title||typeof r.title!="string"||!r.startTime||typeof r.startTime!="string"||!r.endTime||typeof r.endTime!="string")return!1;let e=/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/;if(!e.test(r.startTime)||!e.test(r.endTime))return!1;let[t,n]=r.startTime.split(":").map(Number),[a,s]=r.endTime.split(":").map(Number),i=t*60+n;if(a*60+s<=i||r.attachments&&!Array.isArray(r.attachments))return!1;if(r.attachments){for(let l of r.attachments)if(typeof l!="string"||!l.trim())return!1}return!(r.color&&typeof r.color!="string"||r.description&&typeof r.description!="string")}function oQ(r,e){try{let t=cx(r);if(!t||!t.timeblocks||!Array.isArray(t.timeblocks))return[];let n=[];for(let a of t.timeblocks)iQ(a)?n.push(a):console.warn(`Invalid timeblock in ${e}:`,a);return n}catch(t){return console.error(`Error extracting timeblocks from ${e}:`,t),[]}}function D_e(r,e,t="#6366f1"){let n=`${e}T${r.startTime}:00`,a=`${e}T${r.endTime}:00`;return{id:`timeblock-${r.id}`,title:r.title,start:n,end:a,allDay:!1,backgroundColor:r.color||t,borderColor:r.color||t,editable:!0,eventType:"timeblock",extendedProps:{type:"timeblock",eventType:"timeblock",timeblock:r,originalDate:e,description:r.description,attachments:r.attachments||[]}}}function $I(){return`tb-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}async function px(r,e,t,n,a,s){let{getDailyNote:i,getAllDailyNotes:o,appHasDailyNotesPluginLoaded:l}=await Promise.resolve().then(()=>We(Vl()));if(!l())throw new Error("Daily Notes plugin is not enabled");let c=o(),d=window.moment(t),u=i(d,c);if(!u)throw new Error(`Daily note for ${t} not found`);let p=await r.vault.read(u),m=oQ(p,u.path),h=m.findIndex(y=>y.id===e);if(h===-1)throw new Error(`Timeblock ${e} not found`);let f=m[h];if(t===n){await C_e(r,u,e,a,s);return}await P_e(r,u,e);let g={...f,startTime:a,endTime:s};await __e(r,n,g)}async function C_e(r,e,t,n,a){let s=await r.vault.read(e),i=cx(s)||{};if(!i.timeblocks||!Array.isArray(i.timeblocks))throw new Error("No timeblocks found in frontmatter");let o=i.timeblocks.findIndex(l=>l.id===t);if(o===-1)throw new Error(`Timeblock ${t} not found`);i.timeblocks[o].startTime=n,i.timeblocks[o].endTime=a,await jI(r,e,i,s)}async function P_e(r,e,t){let n=await r.vault.read(e),a=cx(n)||{};!a.timeblocks||!Array.isArray(a.timeblocks)||(a.timeblocks=a.timeblocks.filter(s=>s.id!==t),await jI(r,e,a,n))}async function __e(r,e,t){let{createDailyNote:n,getDailyNote:a,getAllDailyNotes:s}=await Promise.resolve().then(()=>We(Vl())),i=window.moment(e),o=s(),l=a(i,o);if(!l){try{l=await n(i)}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 r.vault.read(l),d=cx(c)||{};d.timeblocks||(d.timeblocks=[]),d.timeblocks.push(t),await jI(r,l,d,c)}async function jI(r,e,t,n){let a=n;if(n.startsWith("---")){let o=n.indexOf("---",3);o!==-1&&(a=n.substring(o+3))}let i=`--- ${(0,pp.stringifyYaml)(t)}---${a}`;await r.vault.modify(e,i)}function ac(r){return!r||!Array.isArray(r)?[]:r.filter(e=>{if(typeof e!="string")return!1;let t=e.trim();return!(t.length===0||t==='""'||t==="''")})}function vp(r){if(!r.recurrence||typeof r.recurrence!="string")return null;if(r.recurrence.includes("DTSTART:"))return r.recurrence;let e;if(r.scheduled)e=r.scheduled;else if(r.dateCreated)e=r.dateCreated;else return null;try{let t;if(Ir(e)){let n=Nr(e),a=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),i=String(n.getDate()).padStart(2,"0"),o=String(n.getHours()).padStart(2,"0"),l=String(n.getMinutes()).padStart(2,"0"),c=String(n.getSeconds()).padStart(2,"0");t=`${a}${s}${i}T${o}${l}${c}Z`}else{let n=nt(e),a=n.getUTCFullYear(),s=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");t=`${a}${s}${i}`}return`DTSTART:${t};${r.recurrence}`}catch(t){return console.error("Error parsing date for DTSTART:",t,{sourceDateString:e}),null}}function zI(r,e){if(!r||typeof r!="string")return null;try{let t;if(Ir(e)){let n=Nr(e),a=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),i=String(n.getDate()).padStart(2,"0"),o=String(n.getHours()).padStart(2,"0"),l=String(n.getMinutes()).padStart(2,"0"),c=String(n.getSeconds()).padStart(2,"0");t=`${a}${s}${i}T${o}${l}${c}Z`}else{let n=nt(e),a=n.getUTCFullYear(),s=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");t=`${a}${s}${i}`}return r.includes("DTSTART:")?r.replace(/DTSTART:[^;]+;?/,`DTSTART:${t};`):`DTSTART:${t};${r}`}catch(t){return console.error("Error updating DTSTART in recurrence rule:",t,{dateStr:e}),null}}function BI(r,e,t){if(!r.recurrence||typeof r.recurrence!="string")return null;if(r.recurrence.includes("DTSTART:"))return r.recurrence;let n;if(r.scheduled)n=r.scheduled;else if(r.dateCreated)n=r.dateCreated;else return null;try{let a;if(t){let s=nt(n),i=s.getUTCFullYear(),o=String(s.getUTCMonth()+1).padStart(2,"0"),l=String(s.getUTCDate()).padStart(2,"0");a=`${i}${o}${l}`}else{let s=nt(n),i=s.getUTCFullYear(),o=String(s.getUTCMonth()+1).padStart(2,"0"),l=String(s.getUTCDate()).padStart(2,"0"),c=String(e.getHours()).padStart(2,"0"),d=String(e.getMinutes()).padStart(2,"0");a=`${i}${o}${l}T${c}${d}00Z`}return`DTSTART:${a};${r.recurrence}`}catch(a){return console.error("Error parsing date for DTSTART with dragged time:",a,{sourceDateString:n,draggedStart:e,allDay:t}),null}}function zs(r){return!r||typeof r!="string"?"":r.split(",").map(e=>{let t=e.trim();return t.startsWith("#")?t.slice(1):t}).filter(e=>e.length>0).join(", ")}function mx(r){return!r||typeof r!="string"?"":r.replace(/[^a-zA-Z0-9-]/g,"-").toLowerCase()}var pp,Fn=b(()=>{pp=require("obsidian");Qr();II();OI();Vu();kt()});var cQ=b(()=>{});var dQ,qI=b(()=>{dQ={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 uQ,pQ=b(()=>{uQ={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 mQ,hQ=b(()=>{mQ={code:"es",name:"Espa\xF1ol",chronoLocale:"es",dateTriggers:{due:["vence","fecha l\xEDmite","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\xEDa","todos los d\xEDas","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\xF1o","todos los a\xF1os","por a\xF1o"]},every:["cada","todos los","todas las"],other:["otro","otra"],weekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["mi\xE9rcoles"],thursday:["jueves"],friday:["viernes"],saturday:["s\xE1bado"],sunday:["domingo"]},pluralWeekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["mi\xE9rcoles"],thursday:["jueves"],friday:["viernes"],saturday:["s\xE1bados"],sunday:["domingos"]},ordinals:{first:["primer","primera","primero"],second:["segundo","segunda"],third:["tercer","tercera","tercero"],fourth:["cuarto","cuarta"],last:["\xFAltimo","\xFAltima"]},periods:{day:["d\xEDa","d\xEDas"],week:["semana","semanas"],month:["mes","meses"],year:["a\xF1o","a\xF1os"]}},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\xEDtico","cr\xEDtica","m\xE1ximo","m\xE1xima","prioritario","prioritaria"],high:["alto","alta","importante","elevado","elevada"],normal:["medio","media","normal","regular","est\xE1ndar"],low:["bajo","baja","menor","m\xEDnimo","m\xEDnima"]}}});var fQ,gQ=b(()=>{fQ={code:"fr",name:"Fran\xE7ais",chronoLocale:"fr",dateTriggers:{due:["\xE9ch\xE9ance","date limite","doit \xEAtre termin\xE9","pour le","avant le"],scheduled:["programm\xE9 pour","programm\xE9 le","commencer le","d\xE9buter le","travailler sur","le"]},recurrence:{frequencies:{daily:["quotidien","quotidienne","quotidiennement","chaque jour","tous les jours","journalier","journali\xE8re"],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\xE9e","tous les ans","par an","par ann\xE9e"]},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\xE8re"],second:["deuxi\xE8me","second","seconde"],third:["troisi\xE8me"],fourth:["quatri\xE8me"],last:["dernier","derni\xE8re"]},periods:{day:["jour","jours"],week:["semaine","semaines"],month:["mois"],year:["an","ans","ann\xE9e","ann\xE9es"]}},timeEstimate:{hours:["h","hr","hrs","heure","heures"],minutes:["m","min","mins","minute","minutes"]},fallbackStatus:{open:["\xE0 faire","ouvert","en attente","todo"],inProgress:["en cours","en progression","en train de faire"],done:["termin\xE9","fini","accompli","fait"],cancelled:["annul\xE9","abandonn\xE9"],waiting:["en attente","bloqu\xE9","suspendu"]},fallbackPriority:{urgent:["urgent","urgente","critique","maximum","prioritaire"],high:["\xE9lev\xE9","\xE9lev\xE9e","haut","haute","important","importante","sup\xE9rieur","sup\xE9rieure"],normal:["moyen","moyenne","normal","normale","standard","r\xE9gulier","r\xE9guli\xE8re"],low:["faible","bas","basse","mineur","mineure","minimum"]}}});var yQ,vQ=b(()=>{yQ={code:"de",name:"Deutsch",chronoLocale:"de",dateTriggers:{due:["f\xE4llig","termin","abgabe","deadline","bis zum","bis"],scheduled:["geplant f\xFCr","geplant am","beginnen am","anfangen am","arbeiten an","am"]},recurrence:{frequencies:{daily:["t\xE4glich","jeden Tag","alle Tage","tagaus tagein"],weekly:["w\xF6chentlich","jede Woche","alle Wochen"],monthly:["monatlich","jeden Monat","alle Monate"],yearly:["j\xE4hrlich","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\xE4uft","in arbeit"],done:["erledigt","fertig","abgeschlossen","gemacht"],cancelled:["abgebrochen","storniert","abgesagt"],waiting:["wartend","warten","blockiert","pausiert"]},fallbackPriority:{urgent:["dringend","eilig","kritisch","sofort","h\xF6chste"],high:["hoch","hohe","wichtig","priorit\xE4r"],normal:["normal","mittel","mittlere","standard"],low:["niedrig","niedrige","gering","geringe"]}}});var bQ,TQ=b(()=>{bQ={code:"ru",name:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",chronoLocale:"ru",dateTriggers:{due:["\u0441\u0440\u043E\u043A","\u0434\u0435\u0434\u043B\u0430\u0439\u043D","\u0434\u043E","\u043A","\u0441\u0434\u0430\u0442\u044C \u0434\u043E"],scheduled:["\u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u043D\u0430","\u043D\u0430\u0447\u0430\u0442\u044C","\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043D\u0430\u0434","\u043D\u0430"]},recurrence:{frequencies:{daily:["\u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u043E","\u043A\u0430\u0436\u0434\u044B\u0439 \u0434\u0435\u043D\u044C","\u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u044B\u0439","\u043A\u0430\u0436\u0434\u043E\u0434\u043D\u0435\u0432\u043D\u044B\u0439"],weekly:["\u0435\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u043E","\u043A\u0430\u0436\u0434\u0443\u044E \u043D\u0435\u0434\u0435\u043B\u044E","\u0435\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u044B\u0439"],monthly:["\u0435\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u043E","\u043A\u0430\u0436\u0434\u044B\u0439 \u043C\u0435\u0441\u044F\u0446","\u0435\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439"],yearly:["\u0435\u0436\u0435\u0433\u043E\u0434\u043D\u043E","\u043A\u0430\u0436\u0434\u044B\u0439 \u0433\u043E\u0434","\u0435\u0436\u0435\u0433\u043E\u0434\u043D\u044B\u0439"]},every:["\u043A\u0430\u0436\u0434\u044B\u0439","\u043A\u0430\u0436\u0434\u0443\u044E","\u043A\u0430\u0436\u0434\u043E\u0435","\u0432\u0441\u0435"],other:["\u0434\u0440\u0443\u0433\u043E\u0439","\u0434\u0440\u0443\u0433\u0443\u044E","\u0434\u0440\u0443\u0433\u043E\u0435"],weekdays:{monday:["\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A"],tuesday:["\u0432\u0442\u043E\u0440\u043D\u0438\u043A"],wednesday:["\u0441\u0440\u0435\u0434\u0430"],thursday:["\u0447\u0435\u0442\u0432\u0435\u0440\u0433"],friday:["\u043F\u044F\u0442\u043D\u0438\u0446\u0430"],saturday:["\u0441\u0443\u0431\u0431\u043E\u0442\u0430"],sunday:["\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435"]},pluralWeekdays:{monday:["\u043F\u043E \u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430\u043C"],tuesday:["\u043F\u043E \u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430\u043C"],wednesday:["\u043F\u043E \u0441\u0440\u0435\u0434\u0430\u043C"],thursday:["\u043F\u043E \u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430\u043C"],friday:["\u043F\u043E \u043F\u044F\u0442\u043D\u0438\u0446\u0430\u043C"],saturday:["\u043F\u043E \u0441\u0443\u0431\u0431\u043E\u0442\u0430\u043C"],sunday:["\u043F\u043E \u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F\u043C"]},ordinals:{first:["\u043F\u0435\u0440\u0432\u044B\u0439","\u043F\u0435\u0440\u0432\u0430\u044F","\u043F\u0435\u0440\u0432\u043E\u0435"],second:["\u0432\u0442\u043E\u0440\u043E\u0439","\u0432\u0442\u043E\u0440\u0430\u044F","\u0432\u0442\u043E\u0440\u043E\u0435"],third:["\u0442\u0440\u0435\u0442\u0438\u0439","\u0442\u0440\u0435\u0442\u044C\u044F","\u0442\u0440\u0435\u0442\u044C\u0435"],fourth:["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044B\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0430\u044F","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435"],last:["\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439","\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F","\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435"]},periods:{day:["\u0434\u0435\u043D\u044C","\u0434\u043D\u0438"],week:["\u043D\u0435\u0434\u0435\u043B\u044F","\u043D\u0435\u0434\u0435\u043B\u0438"],month:["\u043C\u0435\u0441\u044F\u0446","\u043C\u0435\u0441\u044F\u0446\u044B"],year:["\u0433\u043E\u0434","\u0433\u043E\u0434\u044B"]}},timeEstimate:{hours:["\u0447","\u0447\u0430\u0441","\u0447\u0430\u0441\u0430","\u0447\u0430\u0441\u043E\u0432"],minutes:["\u043C","\u043C\u0438\u043D","\u043C\u0438\u043D\u0443\u0442\u0430","\u043C\u0438\u043D\u0443\u0442\u044B","\u043C\u0438\u043D\u0443\u0442"]},fallbackStatus:{open:["\u043E\u0442\u043A\u0440\u044B\u0442\u043E","\u043A \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044E","\u043D\u043E\u0432\u043E\u0435","todo"],inProgress:["\u0432 \u0440\u0430\u0431\u043E\u0442\u0435","\u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F","\u0432 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0435"],done:["\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E","\u0433\u043E\u0442\u043E\u0432\u043E","\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","\u0441\u0434\u0435\u043B\u0430\u043D\u043E"],cancelled:["\u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E","\u043E\u0442\u043C\u0435\u043D\u0451\u043D","\u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430"],waiting:["\u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435","\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043E","\u043D\u0430 \u043F\u0430\u0443\u0437\u0435"]},fallbackPriority:{urgent:["\u0441\u0440\u043E\u0447\u043D\u043E","\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u043E","\u044D\u043A\u0441\u0442\u0440\u0435\u043D\u043D\u043E","\u043D\u0435\u043C\u0435\u0434\u043B\u0435\u043D\u043D\u043E"],high:["\u0432\u044B\u0441\u043E\u043A\u0438\u0439","\u0432\u044B\u0441\u043E\u043A\u0430\u044F","\u0432\u0430\u0436\u043D\u043E","\u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043D\u043E"],normal:["\u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u044B\u0439","\u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u0430\u044F","\u0441\u0440\u0435\u0434\u043D\u0438\u0439","\u0441\u0440\u0435\u0434\u043D\u044F\u044F"],low:["\u043D\u0438\u0437\u043A\u0438\u0439","\u043D\u0438\u0437\u043A\u0430\u044F","\u043D\u0435\u0432\u0430\u0436\u043D\u043E","\u043C\u043E\u0436\u043D\u043E \u043F\u043E\u0437\u0436\u0435"]}}});var kQ,wQ=b(()=>{kQ={code:"zh",name:"\u4E2D\u6587",chronoLocale:"zh",dateTriggers:{due:["\u622A\u6B62","\u5230\u671F","\u671F\u9650","\u5728","\u4E4B\u524D"],scheduled:["\u5B89\u6392\u5728","\u8BA1\u5212\u5728","\u5F00\u59CB\u5728","\u5728"]},recurrence:{frequencies:{daily:["\u6BCF\u5929","\u6BCF\u65E5","\u5929\u5929","\u65E5\u5E38"],weekly:["\u6BCF\u5468","\u6BCF\u661F\u671F","\u5468\u5468"],monthly:["\u6BCF\u6708","\u6BCF\u4E2A\u6708","\u6708\u6708"],yearly:["\u6BCF\u5E74","\u5E74\u5E74","\u6BCF\u4E00\u5E74"]},every:["\u6BCF","\u6BCF\u4E2A","\u6BCF\u4E00\u4E2A"],other:["\u5176\u4ED6","\u53E6\u4E00\u4E2A"],weekdays:{monday:["\u5468\u4E00","\u661F\u671F\u4E00","\u793C\u62DC\u4E00"],tuesday:["\u5468\u4E8C","\u661F\u671F\u4E8C","\u793C\u62DC\u4E8C"],wednesday:["\u5468\u4E09","\u661F\u671F\u4E09","\u793C\u62DC\u4E09"],thursday:["\u5468\u56DB","\u661F\u671F\u56DB","\u793C\u62DC\u56DB"],friday:["\u5468\u4E94","\u661F\u671F\u4E94","\u793C\u62DC\u4E94"],saturday:["\u5468\u516D","\u661F\u671F\u516D","\u793C\u62DC\u516D"],sunday:["\u5468\u65E5","\u661F\u671F\u65E5","\u793C\u62DC\u65E5"]},pluralWeekdays:{monday:["\u5468\u4E00","\u661F\u671F\u4E00","\u793C\u62DC\u4E00"],tuesday:["\u5468\u4E8C","\u661F\u671F\u4E8C","\u793C\u62DC\u4E8C"],wednesday:["\u5468\u4E09","\u661F\u671F\u4E09","\u793C\u62DC\u4E09"],thursday:["\u5468\u56DB","\u661F\u671F\u56DB","\u793C\u62DC\u56DB"],friday:["\u5468\u4E94","\u661F\u671F\u4E94","\u793C\u62DC\u4E94"],saturday:["\u5468\u516D","\u661F\u671F\u516D","\u793C\u62DC\u516D"],sunday:["\u5468\u65E5","\u661F\u671F\u65E5","\u793C\u62DC\u65E5"]},ordinals:{first:["\u7B2C\u4E00\u4E2A","\u7B2C\u4E00","\u9996\u4E2A"],second:["\u7B2C\u4E8C\u4E2A","\u7B2C\u4E8C"],third:["\u7B2C\u4E09\u4E2A","\u7B2C\u4E09"],fourth:["\u7B2C\u56DB\u4E2A","\u7B2C\u56DB"],last:["\u6700\u540E\u4E00\u4E2A","\u6700\u540E","\u672B\u5C3E"]},periods:{day:["\u5929","\u65E5"],week:["\u5468","\u661F\u671F"],month:["\u6708","\u4E2A\u6708"],year:["\u5E74"]}},timeEstimate:{hours:["\u5C0F\u65F6","\u65F6","\u4E2A\u5C0F\u65F6"],minutes:["\u5206\u949F","\u5206","\u4E2A\u5206\u949F"]},fallbackStatus:{open:["\u5F85\u529E","\u672A\u5B8C\u6210","\u5F00\u653E","\u65B0\u5EFA"],inProgress:["\u8FDB\u884C\u4E2D","\u6B63\u5728\u5904\u7406","\u5904\u7406\u4E2D","\u5DE5\u4F5C\u4E2D"],done:["\u5B8C\u6210","\u5DF2\u5B8C\u6210","\u7ED3\u675F","\u641E\u5B9A"],cancelled:["\u53D6\u6D88","\u5DF2\u53D6\u6D88","\u5E9F\u5F03"],waiting:["\u7B49\u5F85","\u6682\u505C","\u963B\u585E","\u5F85\u5B9A"]},fallbackPriority:{urgent:["\u7D27\u6025","\u6025\u8FEB","\u7ACB\u5373","\u9A6C\u4E0A"],high:["\u9AD8","\u91CD\u8981","\u4F18\u5148","\u9AD8\u4F18\u5148\u7EA7"],normal:["\u6B63\u5E38","\u666E\u901A","\u4E2D\u7B49","\u6807\u51C6"],low:["\u4F4E","\u4E0D\u91CD\u8981","\u4F4E\u4F18\u5148\u7EA7","\u6B21\u8981"]}}});var SQ,EQ=b(()=>{SQ={code:"ja",name:"\u65E5\u672C\u8A9E",chronoLocale:"ja",dateTriggers:{due:["\u671F\u9650","\u7DE0\u5207","\u3006\u5207","\u307E\u3067","\u307E\u3067\u306B","\u306B"],scheduled:["\u4E88\u5B9A","\u8A08\u753B","\u958B\u59CB","\u304B\u3089","\u306B\u958B\u59CB","\u3092\u958B\u59CB"]},recurrence:{frequencies:{daily:["\u6BCE\u65E5","\u65E5\u3005","\u6BCE\u65E5\u6BCE\u65E5","\u9023\u65E5"],weekly:["\u6BCE\u9031","\u9031\u6BCE","\u9031\u4E00","\u6BCE\u9031\u6BCE\u9031"],monthly:["\u6BCE\u6708","\u6708\u6BCE","\u6708\u4E00","\u6BCE\u6708\u6BCE\u6708"],yearly:["\u6BCE\u5E74","\u5E74\u6BCE","\u5E74\u4E00","\u6BCE\u5E74\u6BCE\u5E74","\u5E74\u6B21"]},every:["\u6BCE","\u5404","\u5168\u3066"],other:["\u4ED6\u306E","\u5225\u306E","\u7570\u306A\u308B"],weekdays:{monday:["\u6708\u66DC\u65E5","\u6708\u66DC","\u6708","\u3052\u3064\u3088\u3046\u3073"],tuesday:["\u706B\u66DC\u65E5","\u706B\u66DC","\u706B","\u304B\u3088\u3046\u3073"],wednesday:["\u6C34\u66DC\u65E5","\u6C34\u66DC","\u6C34","\u3059\u3044\u3088\u3046\u3073"],thursday:["\u6728\u66DC\u65E5","\u6728\u66DC","\u6728","\u3082\u304F\u3088\u3046\u3073"],friday:["\u91D1\u66DC\u65E5","\u91D1\u66DC","\u91D1","\u304D\u3093\u3088\u3046\u3073"],saturday:["\u571F\u66DC\u65E5","\u571F\u66DC","\u571F","\u3069\u3088\u3046\u3073"],sunday:["\u65E5\u66DC\u65E5","\u65E5\u66DC","\u65E5","\u306B\u3061\u3088\u3046\u3073"]},pluralWeekdays:{monday:["\u6708\u66DC\u65E5","\u6708\u66DC","\u6708","\u3052\u3064\u3088\u3046\u3073"],tuesday:["\u706B\u66DC\u65E5","\u706B\u66DC","\u706B","\u304B\u3088\u3046\u3073"],wednesday:["\u6C34\u66DC\u65E5","\u6C34\u66DC","\u6C34","\u3059\u3044\u3088\u3046\u3073"],thursday:["\u6728\u66DC\u65E5","\u6728\u66DC","\u6728","\u3082\u304F\u3088\u3046\u3073"],friday:["\u91D1\u66DC\u65E5","\u91D1\u66DC","\u91D1","\u304D\u3093\u3088\u3046\u3073"],saturday:["\u571F\u66DC\u65E5","\u571F\u66DC","\u571F","\u3069\u3088\u3046\u3073"],sunday:["\u65E5\u66DC\u65E5","\u65E5\u66DC","\u65E5","\u306B\u3061\u3088\u3046\u3073"]},ordinals:{first:["\u6700\u521D\u306E","\u7B2C\u4E00\u306E","\u4E00\u756A\u76EE\u306E","\u521D\u56DE"],second:["\u4E8C\u756A\u76EE\u306E","\u7B2C\u4E8C\u306E","\u6B21\u306E"],third:["\u4E09\u756A\u76EE\u306E","\u7B2C\u4E09\u306E"],fourth:["\u56DB\u756A\u76EE\u306E","\u7B2C\u56DB\u306E"],last:["\u6700\u5F8C\u306E","\u6700\u7D42\u306E","\u7D42\u308F\u308A\u306E"]},periods:{day:["\u65E5","\u65E5\u9593"],week:["\u9031","\u9031\u9593"],month:["\u6708","\u6708\u9593","\u30F6\u6708"],year:["\u5E74","\u5E74\u9593"]}},timeEstimate:{hours:["\u6642\u9593","\u6642","\u3058\u304B\u3093"],minutes:["\u5206","\u5206\u9593","\u3075\u3093","\u3077\u3093"]},fallbackStatus:{open:["\u672A\u7740\u624B","\u65B0\u898F","\u30AA\u30FC\u30D7\u30F3","\u958B\u59CB\u524D","\u5F85\u6A5F"],inProgress:["\u9032\u884C\u4E2D","\u4F5C\u696D\u4E2D","\u5B9F\u884C\u4E2D","\u51E6\u7406\u4E2D","\u9032\u884C"],done:["\u5B8C\u4E86","\u7D42\u4E86","\u6E08\u307F","\u7D42\u308F\u308A","\u9054\u6210"],cancelled:["\u30AD\u30E3\u30F3\u30BB\u30EB","\u4E2D\u6B62","\u53D6\u6D88","\u5EC3\u6B62","\u505C\u6B62"],waiting:["\u5F85\u6A5F","\u4FDD\u7559","\u30D6\u30ED\u30C3\u30AF","\u4E00\u6642\u505C\u6B62","\u5F85\u3061"]},fallbackPriority:{urgent:["\u7DCA\u6025","\u81F3\u6025","\u6025\u52D9","\u6700\u512A\u5148","\u3059\u3050\u306B"],high:["\u9AD8","\u91CD\u8981","\u512A\u5148","\u9AD8\u512A\u5148\u5EA6","\u91CD\u70B9"],normal:["\u666E\u901A","\u901A\u5E38","\u6A19\u6E96","\u4E00\u822C","\u30CE\u30FC\u30DE\u30EB"],low:["\u4F4E","\u8EFD\u5FAE","\u5F8C\u56DE\u3057","\u4F4E\u512A\u5148\u5EA6","\u4F59\u88D5"]}}});var xQ,DQ=b(()=>{xQ={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\xEC"],tuesday:["marted\xEC"],wednesday:["mercoled\xEC"],thursday:["gioved\xEC"],friday:["venerd\xEC"],saturday:["sabato"],sunday:["domenica"]},pluralWeekdays:{monday:["luned\xEC"],tuesday:["marted\xEC"],wednesday:["mercoled\xEC"],thursday:["gioved\xEC"],friday:["venerd\xEC"],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 CQ,PQ=b(()=>{CQ={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 _Q,MQ=b(()=>{_Q={code:"pt",name:"Portugu\xEAs",chronoLocale:"pt",dateTriggers:{due:["vencimento","prazo","deve estar pronto at\xE9","at\xE9","para","limite"],scheduled:["programado para","agendado para","come\xE7ar em","trabalhar em","em","no"]},recurrence:{frequencies:{daily:["di\xE1rio","di\xE1ria","diariamente","todos os dias","cada dia","por dia"],weekly:["semanal","semanalmente","toda semana","todas as semanas","por semana"],monthly:["mensal","mensalmente","todo m\xEAs","todos os meses","por m\xEAs"],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\xE7a","ter\xE7a-feira"],wednesday:["quarta","quarta-feira"],thursday:["quinta","quinta-feira"],friday:["sexta","sexta-feira"],saturday:["s\xE1bado"],sunday:["domingo"]},pluralWeekdays:{monday:["segundas","segundas-feiras"],tuesday:["ter\xE7as","ter\xE7as-feiras"],wednesday:["quartas","quartas-feiras"],thursday:["quintas","quintas-feiras"],friday:["sextas","sextas-feiras"],saturday:["s\xE1bados"],sunday:["domingos"]},ordinals:{first:["primeiro","primeira"],second:["segundo","segunda"],third:["terceiro","terceira"],fourth:["quarto","quarta"],last:["\xFAltimo","\xFAltima"]},periods:{day:["dia","dias"],week:["semana","semanas"],month:["m\xEAs","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\xEDdo","terminado","finalizado","completo"],cancelled:["cancelado","anulado","suspenso"],waiting:["aguardando","esperando","bloqueado","em espera"]},fallbackPriority:{urgent:["urgente","cr\xEDtico","cr\xEDtica","m\xE1ximo","m\xE1xima","priorit\xE1rio","priorit\xE1ria"],high:["alto","alta","importante","elevado","elevada"],normal:["m\xE9dio","m\xE9dia","normal","regular","padr\xE3o"],low:["baixo","baixa","menor","m\xEDnimo","m\xEDnima"]}}});var AQ,IQ=b(()=>{AQ={code:"sv",name:"Svenska",chronoLocale:"sv",dateTriggers:{due:["f\xF6rfaller","deadline","m\xE5ste vara klar","senast","till","innan"],scheduled:["schemalagd","planerad f\xF6r","b\xF6rja","arbeta med","den","p\xE5"]},recurrence:{frequencies:{daily:["dagligen","varje dag","alla dagar","per dag"],weekly:["veckovis","varje vecka","alla veckor","per vecka"],monthly:["m\xE5nadsvis","varje m\xE5nad","alla m\xE5nader","per m\xE5nad"],yearly:["\xE5rligen","varje \xE5r","alla \xE5r","per \xE5r"]},every:["varje","alla","var"],other:["annan","annat","andra"],weekdays:{monday:["m\xE5ndag"],tuesday:["tisdag"],wednesday:["onsdag"],thursday:["torsdag"],friday:["fredag"],saturday:["l\xF6rdag"],sunday:["s\xF6ndag"]},pluralWeekdays:{monday:["m\xE5ndagar"],tuesday:["tisdagar"],wednesday:["onsdagar"],thursday:["torsdagar"],friday:["fredagar"],saturday:["l\xF6rdagar"],sunday:["s\xF6ndagar"]},ordinals:{first:["f\xF6rsta"],second:["andra"],third:["tredje"],fourth:["fj\xE4rde"],last:["sista"]},periods:{day:["dag","dagar"],week:["vecka","veckor"],month:["m\xE5nad","m\xE5nader"],year:["\xE5r"]}},timeEstimate:{hours:["t","tim","timme","timmar","h"],minutes:["m","min","minut","minuter"]},fallbackStatus:{open:["att g\xF6ra","\xF6ppen","kvar","todo","v\xE4ntande"],inProgress:["p\xE5g\xE5ende","arbetar","g\xF6r","i process","under arbete"],done:["klar","f\xE4rdig","slutf\xF6rd","avslutad","gjord"],cancelled:["avbruten","inst\xE4lld","avbokad"],waiting:["v\xE4ntar","blockerad","pausad","vilande"]},fallbackPriority:{urgent:["br\xE5dskande","kritisk","h\xF6gsta","akut","omedelbar"],high:["h\xF6g","viktig","f\xF6rh\xF6jd","prioriterad"],normal:["normal","medel","standard","vanlig"],low:["l\xE5g","mindre","minimal","obetydlig"]}}});var NQ,RQ=b(()=>{NQ={code:"uk",name:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",chronoLocale:"uk",dateTriggers:{due:["\u0442\u0435\u0440\u043C\u0456\u043D","\u0434\u0435\u0434\u043B\u0430\u0439\u043D","\u043C\u0430\u0454 \u0431\u0443\u0442\u0438 \u0433\u043E\u0442\u043E\u0432\u043E \u0434\u043E","\u0434\u043E","\u043D\u0435 \u043F\u0456\u0437\u043D\u0456\u0448\u0435","\u043A\u0440\u0430\u0439\u043D\u0456\u0439 \u0442\u0435\u0440\u043C\u0456\u043D"],scheduled:["\u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E \u043D\u0430","\u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0438\u0439","\u043F\u043E\u0447\u0430\u0442\u0438","\u043F\u0440\u0430\u0446\u044E\u0432\u0430\u0442\u0438 \u043D\u0430\u0434","\u043D\u0430","\u0432"]},recurrence:{frequencies:{daily:["\u0449\u043E\u0434\u043D\u044F","\u0449\u043E\u0434\u0435\u043D\u043D\u043E","\u043A\u043E\u0436\u0435\u043D \u0434\u0435\u043D\u044C","\u0432\u0441\u0456 \u0434\u043D\u0456","\u043D\u0430 \u0434\u0435\u043D\u044C"],weekly:["\u0449\u043E\u0442\u0438\u0436\u043D\u044F","\u0449\u043E\u0442\u0438\u0436\u043D\u0435\u0432\u043E","\u043A\u043E\u0436\u0435\u043D \u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0432\u0441\u0456 \u0442\u0438\u0436\u043D\u0456","\u043D\u0430 \u0442\u0438\u0436\u0434\u0435\u043D\u044C"],monthly:["\u0449\u043E\u043C\u0456\u0441\u044F\u0446\u044F","\u0449\u043E\u043C\u0456\u0441\u044F\u0447\u043D\u043E","\u043A\u043E\u0436\u0435\u043D \u043C\u0456\u0441\u044F\u0446\u044C","\u0432\u0441\u0456 \u043C\u0456\u0441\u044F\u0446\u0456","\u043D\u0430 \u043C\u0456\u0441\u044F\u0446\u044C"],yearly:["\u0449\u043E\u0440\u043E\u043A\u0443","\u0449\u043E\u0440\u0456\u0447\u043D\u043E","\u043A\u043E\u0436\u0435\u043D \u0440\u0456\u043A","\u0432\u0441\u0456 \u0440\u043E\u043A\u0438","\u043D\u0430 \u0440\u0456\u043A"]},every:["\u043A\u043E\u0436\u0435\u043D","\u043A\u043E\u0436\u043D\u0430","\u043A\u043E\u0436\u043D\u0435","\u0432\u0441\u0456"],other:["\u0456\u043D\u0448\u0438\u0439","\u0456\u043D\u0448\u0430","\u0456\u043D\u0448\u0435","\u0456\u043D\u0448\u0456"],weekdays:{monday:["\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A"],tuesday:["\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A"],wednesday:["\u0441\u0435\u0440\u0435\u0434\u0430"],thursday:["\u0447\u0435\u0442\u0432\u0435\u0440"],friday:["\u043F'\u044F\u0442\u043D\u0438\u0446\u044F"],saturday:["\u0441\u0443\u0431\u043E\u0442\u0430"],sunday:["\u043D\u0435\u0434\u0456\u043B\u044F"]},pluralWeekdays:{monday:["\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043A\u0438"],tuesday:["\u0432\u0456\u0432\u0442\u043E\u0440\u043A\u0438"],wednesday:["\u0441\u0435\u0440\u0435\u0434\u0438"],thursday:["\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0438"],friday:["\u043F'\u044F\u0442\u043D\u0438\u0446\u0456"],saturday:["\u0441\u0443\u0431\u043E\u0442\u0438"],sunday:["\u043D\u0435\u0434\u0456\u043B\u0456"]},ordinals:{first:["\u043F\u0435\u0440\u0448\u0438\u0439","\u043F\u0435\u0440\u0448\u0430","\u043F\u0435\u0440\u0448\u0435"],second:["\u0434\u0440\u0443\u0433\u0438\u0439","\u0434\u0440\u0443\u0433\u0430","\u0434\u0440\u0443\u0433\u0435"],third:["\u0442\u0440\u0435\u0442\u0456\u0439","\u0442\u0440\u0435\u0442\u044F","\u0442\u0440\u0435\u0442\u0454"],fourth:["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0430","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435"],last:["\u043E\u0441\u0442\u0430\u043D\u043D\u0456\u0439","\u043E\u0441\u0442\u0430\u043D\u043D\u044F","\u043E\u0441\u0442\u0430\u043D\u043D\u0454"]},periods:{day:["\u0434\u0435\u043D\u044C","\u0434\u043D\u0456","\u0434\u043D\u0456\u0432"],week:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0442\u0438\u0436\u043D\u0456","\u0442\u0438\u0436\u043D\u0456\u0432"],month:["\u043C\u0456\u0441\u044F\u0446\u044C","\u043C\u0456\u0441\u044F\u0446\u0456","\u043C\u0456\u0441\u044F\u0446\u0456\u0432"],year:["\u0440\u0456\u043A","\u0440\u043E\u043A\u0438","\u0440\u043E\u043A\u0456\u0432"]}},timeEstimate:{hours:["\u0433","\u0433\u043E\u0434","\u0433\u043E\u0434\u0438\u043D\u0430","\u0433\u043E\u0434\u0438\u043D\u0438","\u0433\u043E\u0434\u0438\u043D"],minutes:["\u0445\u0432","\u043C\u0456\u043D","\u0445\u0432\u0438\u043B\u0438\u043D\u0430","\u0445\u0432\u0438\u043B\u0438\u043D\u0438","\u0445\u0432\u0438\u043B\u0438\u043D"]},fallbackStatus:{open:["\u0437\u0440\u043E\u0431\u0438\u0442\u0438","\u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438\u0439","\u043E\u0447\u0456\u043A\u0443\u0454","todo","\u0432 \u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u0456"],inProgress:["\u0432 \u0440\u043E\u0431\u043E\u0442\u0456","\u0432\u0438\u043A\u043E\u043D\u0443\u0454\u0442\u044C\u0441\u044F","\u0440\u043E\u0431\u043B\u044E","\u043F\u0440\u0430\u0446\u044E\u044E","\u0432 \u043F\u0440\u043E\u0446\u0435\u0441\u0456"],done:["\u0433\u043E\u0442\u043E\u0432\u043E","\u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043E","\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","\u0437\u0430\u043A\u0456\u043D\u0447\u0435\u043D\u043E","\u0437\u0440\u043E\u0431\u043B\u0435\u043D\u043E"],cancelled:["\u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E","\u0432\u0456\u0434\u043C\u0456\u043D\u0435\u043D\u043E","\u043F\u0440\u0438\u043F\u0438\u043D\u0435\u043D\u043E"],waiting:["\u0447\u0435\u043A\u0430\u044E","\u043E\u0447\u0456\u043A\u0443\u044E","\u0437\u0430\u0431\u043B\u043E\u043A\u043E\u0432\u0430\u043D\u043E","\u043F\u0440\u0438\u0437\u0443\u043F\u0438\u043D\u0435\u043D\u043E"]},fallbackPriority:{urgent:["\u0442\u0435\u0440\u043C\u0456\u043D\u043E\u0432\u043E","\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u043E","\u043D\u0430\u0439\u0432\u0438\u0449\u0438\u0439","\u043D\u0435\u0432\u0456\u0434\u043A\u043B\u0430\u0434\u043D\u043E","\u043F\u0440\u0456\u043E\u0440\u0438\u0442\u0435\u0442\u043D\u043E"],high:["\u0432\u0438\u0441\u043E\u043A\u0438\u0439","\u0432\u0438\u0441\u043E\u043A\u0430","\u0432\u0430\u0436\u043B\u0438\u0432\u043E","\u043F\u0456\u0434\u0432\u0438\u0449\u0435\u043D\u0438\u0439"],normal:["\u0441\u0435\u0440\u0435\u0434\u043D\u0456\u0439","\u0441\u0435\u0440\u0435\u0434\u043D\u044F","\u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u043E","\u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E","\u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E"],low:["\u043D\u0438\u0437\u044C\u043A\u0438\u0439","\u043D\u0438\u0437\u044C\u043A\u0430","\u043C\u0435\u043D\u0448\u0438\u0439","\u043C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0438\u0439","\u043D\u0435\u0437\u043D\u0430\u0447\u043D\u0438\u0439"]}}});var OQ=b(()=>{});function LQ(r){return FQ[r]||FQ.en}var FQ,HI=b(()=>{pQ();hQ();gQ();vQ();TQ();wQ();EQ();DQ();PQ();MQ();IQ();RQ();OQ();FQ={en:uQ,es:mQ,fr:fQ,de:yQ,ru:bQ,zh:kQ,ja:SQ,it:xQ,nl:CQ,pt:_Q,sv:AQ,uk:NQ}});var hx,UI=b(()=>{hx=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 $Q=E((VI,WI)=>{(function(r,e){typeof VI=="object"&&typeof WI!="undefined"?WI.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(VI,(function(){"use strict";var r="month",e="quarter";return function(t,n){var a=n.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 s=a.add;a.add=function(o,l){return o=Number(o),this.$utils().p(l)===e?this.add(3*o,r):s.bind(this)(o,l)};var i=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(r).startOf("day"):this.month(3*u+2).endOf(r).endOf("day")}return i.bind(this)(o,l)}}}))});var Lt=E((YI,GI)=>{(function(r,e){typeof YI=="object"&&typeof GI!="undefined"?GI.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(YI,(function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",a="second",s="minute",i="hour",o="day",l="week",c="month",d="quarter",u="year",p="date",m="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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(R){var A=["th","st","nd","rd"],I=R%100;return"["+R+(A[(I-20)%10]||A[I]||A[0])+"]"}},y=function(R,A,I){var L=String(R);return!L||L.length>=A?R:""+Array(A+1-L.length).join(I)+R},k={s:y,z:function(R){var A=-R.utcOffset(),I=Math.abs(A),L=Math.floor(I/60),V=I%60;return(A<=0?"+":"-")+y(L,2,"0")+":"+y(V,2,"0")},m:function R(A,I){if(A.date()1)return R(H[0])}else{var K=A.name;w[K]=A,V=K}return!L&&V&&(T=V),V||!L&&T},M=function(R,A){if(x(R))return R.clone();var I=typeof A=="object"?A:{};return I.date=R,I.args=arguments,new F(I)},N=k;N.l=C,N.i=x,N.w=function(R,A){return M(R,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var F=(function(){function R(I){this.$L=C(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[S]=!0}var A=R.prototype;return A.parse=function(I){this.$d=(function(L){var V=L.date,W=L.utc;if(V===null)return new Date(NaN);if(N.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var H=V.match(h);if(H){var K=H[2]-1||0,le=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],K,H[3]||1,H[4]||0,H[5]||0,H[6]||0,le)):new Date(H[1],K,H[3]||1,H[4]||0,H[5]||0,H[6]||0,le)}}return new Date(V)})(I),this.init()},A.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},A.$utils=function(){return N},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(I,L){var V=M(I);return this.startOf(L)<=V&&V<=this.endOf(L)},A.isAfter=function(I,L){return M(I){(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(j||(j={}));(function(r){r[r.SUNDAY=0]="SUNDAY",r[r.MONDAY=1]="MONDAY",r[r.TUESDAY=2]="TUESDAY",r[r.WEDNESDAY=3]="WEDNESDAY",r[r.THURSDAY=4]="THURSDAY",r[r.FRIDAY=5]="FRIDAY",r[r.SATURDAY=6]="SATURDAY"})(Fe||(Fe={}));(function(r){r[r.JANUARY=1]="JANUARY",r[r.FEBRUARY=2]="FEBRUARY",r[r.MARCH=3]="MARCH",r[r.APRIL=4]="APRIL",r[r.MAY=5]="MAY",r[r.JUNE=6]="JUNE",r[r.JULY=7]="JULY",r[r.AUGUST=8]="AUGUST",r[r.SEPTEMBER=9]="SEPTEMBER",r[r.OCTOBER=10]="OCTOBER",r[r.NOVEMBER=11]="NOVEMBER",r[r.DECEMBER=12]="DECEMBER"})(Bs||(Bs={}))});function jQ(r,e){r.assign("day",e.getDate()),r.assign("month",e.getMonth()+1),r.assign("year",e.getFullYear())}function zQ(r,e){r.assign("hour",e.getHours()),r.assign("minute",e.getMinutes()),r.assign("second",e.getSeconds()),r.assign("millisecond",e.getMilliseconds()),r.assign("meridiem",e.getHours()<12?j.AM:j.PM)}function fx(r,e){r.imply("day",e.getDate()),r.imply("month",e.getMonth()+1),r.imply("year",e.getFullYear())}function BQ(r,e){r.imply("hour",e.getHours()),r.imply("minute",e.getMinutes()),r.imply("second",e.getSeconds()),r.imply("millisecond",e.getMilliseconds()),r.imply("meridiem",e.getHours()<12?j.AM:j.PM)}var ZI=b(()=>{Pt()});function yd(r,e,t,n,a=0){let s=0,i=0;for(;i{KI=We(Lt(),1);Pt();A_e={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:r=>qQ(r,Bs.MARCH,Fe.SUNDAY,2),dstEnd:r=>qQ(r,Bs.OCTOBER,Fe.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:r=>yd(r,Bs.MARCH,Fe.SUNDAY,2,2),dstEnd:r=>yd(r,Bs.NOVEMBER,Fe.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:r=>yd(r,Bs.MARCH,Fe.SUNDAY,2,2),dstEnd:r=>yd(r,Bs.NOVEMBER,Fe.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:r=>yd(r,Bs.MARCH,Fe.SUNDAY,2,2),dstEnd:r=>yd(r,Bs.NOVEMBER,Fe.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:r=>yd(r,Bs.MARCH,Fe.SUNDAY,2,2),dstEnd:r=>yd(r,Bs.NOVEMBER,Fe.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 HQ(r,e){var n,a,s,i,o,l,c;let t=new Date(r);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=(n=e==null?void 0:e.month)!=null?n: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=(s=e==null?void 0:e.day)!=null?s: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=(i=e==null?void 0:e.hour)!=null?i: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 ef(r){let e={};for(let t in r)e[t]=-r[t];return e}var vv=b(()=>{});var UQ,JI,$t,J,Mt,et=b(()=>{UQ=We($Q(),1),JI=We(Lt(),1);ZI();QI();vv();JI.default.extend(UQ.default);$t=class r{constructor(e,t){_(this,"instant");_(this,"timezoneOffset");this.instant=e!=null?e:new Date,this.timezoneOffset=t!=null?t:null}static fromDate(e){return new r(e)}static fromInput(e,t){var s;if(e instanceof Date)return r.fromDate(e);let n=(s=e==null?void 0:e.instant)!=null?s:new Date,a=gx(e==null?void 0:e.timezone,n,t);return new r(n,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 s;(!e||e.getTime()<0)&&(e=new Date);let n=-e.getTimezoneOffset(),a=(s=t!=null?t:this.timezoneOffset)!=null?s:n;return n-a}getTimezoneOffset(){var e;return(e=this.timezoneOffset)!=null?e:-this.instant.getTimezoneOffset()}},J=class r{constructor(e,t){_(this,"knownValues");_(this,"impliedValues");_(this,"reference");_(this,"_tags",new Set);if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let a in t)this.knownValues[a]=t[a];let n=e.getDateWithAdjustedTimezone();this.imply("day",n.getDate()),this.imply("month",n.getMonth()+1),this.imply("year",n.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 r(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,JI.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 n=HQ(e.getDateWithAdjustedTimezone(),t),a=new r(e);return a.addTag("result/relativeDate"),t.hour||t.minute||t.second?(a.addTag("result/relativeDateAndTime"),zQ(a,n),jQ(a,n),a.assign("timezoneOffset",e.getTimezoneOffset())):(BQ(a,n),a.imply("timezoneOffset",e.getTimezoneOffset()),t.day?(a.assign("day",n.getDate()),a.assign("month",n.getMonth()+1),a.assign("year",n.getFullYear()),a.assign("weekday",n.getDay())):t.week?(a.assign("day",n.getDate()),a.assign("month",n.getMonth()+1),a.assign("year",n.getFullYear()),a.imply("weekday",n.getDay())):(a.imply("day",n.getDate()),t.month?(a.assign("month",n.getMonth()+1),a.assign("year",n.getFullYear())):(a.imply("month",n.getMonth()+1),t.year?a.assign("year",n.getFullYear()):a.imply("year",n.getFullYear())))),a}},Mt=class r{constructor(e,t,n,a,s){_(this,"refDate");_(this,"index");_(this,"text");_(this,"reference");_(this,"start");_(this,"end");this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=a||new J(e),this.end=s}clone(){let e=new r(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 ja(r,e,t="\\s{0,5},?\\s{0,5}"){let n=e.replace(/\((?!\?)/g,"(?:");return`${r}${n}(?:${t}${n}){0,10}`}function I_e(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}function se(r){return`(?:${I_e(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}var wt=b(()=>{});function ss(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}function Yt(r,e,t){let n=(0,VQ.default)(r),a=n;a=a.month(t-1),a=a.date(e),a=a.year(n.year());let s=a.add(1,"y"),i=a.add(-1,"y");return Math.abs(s.diff(n)){VQ=We(Lt(),1)});function N_e(r){let e=r.toLowerCase();return XI[e]!==void 0?XI[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 rf(r){let e=r.toLowerCase();return eN[e]!==void 0?eN[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}function bd(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return ss(e)}function ki(r){let e={},t=r,n=WQ.exec(t);for(;n;)O_e(e,n),t=t.substring(n[0].length).trim(),n=WQ.exec(t);return Object.keys(e).length==0?null:e}function O_e(r,e){if(e[0].match(/^[a-zA-Z]+$/))return;let t=N_e(e[1]),n=bv[e[2].toLowerCase()];r[n]=t}var yx,tN,Ti,XI,eN,YQ,bv,GQ,tf,vd,ZQ,WQ,R_e,KQ,sc,Td,xn=b(()=>{wt();Xr();yx={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},tN={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},Ti={...tN,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},XI={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12},eN={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},YQ={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"},bv={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",...YQ},GQ=`(?:${se(XI)}|[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)?)`;tf=`(?:${se(eN)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;vd="(?:[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])";ZQ=`(${GQ})\\s{0,3}(${se(bv)})`,WQ=new RegExp(ZQ,"i"),R_e=`(${GQ})\\s{0,3}(${se(YQ)})`,KQ="\\s{0,5},?(?:\\s*and)?\\s{0,5}",sc=ja("(?:(?:about|around)\\s{0,3})?",ZQ,KQ),Td=ja("(?:(?:about|around)\\s{0,3})?",R_e,KQ)});var B,fe=b(()=>{B=class{constructor(){_(this,"cachedInnerPattern",null);_(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 n=(a=t[1])!=null?a:"";t.index=t.index+n.length,t[0]=t[0].substring(n.length);for(let s=2;s{xn();et();fe();F_e=new RegExp(`(?:(?:within|in|for)\\s*)?(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${sc})(?=\\W|$)`,"i"),L_e=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${sc})(?=\\W|$)`,"i"),$_e=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Td})(?=\\W|$)`,"i"),Tv=class extends B{constructor(t){super();_(this,"strictMode");this.strictMode=t}innerPattern(t){return this.strictMode?$_e:t.option.forwardDate?F_e:L_e}innerExtract(t,n){if(n[0].match(/^for\s*the\s*\w+/))return null;let a=ki(n[1]);return a?(t.debug(()=>{console.log(a),console.log(J.createRelativeFromReference(t.reference,a))}),J.createRelativeFromReference(t.reference,a)):null}}});var j_e,JQ,XQ,z_e,eJ,kv,tJ=b(()=>{Xr();xn();xn();xn();wt();fe();j_e=new RegExp(`(?:on\\s{0,3})?(${tf})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${tf}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${se(Ti)})(?:(?:-|/|,?\\s{0,3})(${vd}(?!\\w)))?(?=\\W|$)`,"i"),JQ=1,XQ=2,z_e=3,eJ=4,kv=class extends B{innerPattern(){return j_e}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=Ti[t[z_e].toLowerCase()],s=rf(t[JQ]);if(s>31)return t.index=t.index+t[JQ].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[eJ]){let i=bd(t[eJ]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[XQ]){let i=rf(t[XQ]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var B_e,q_e,rJ,rN,nN,wv,nJ=b(()=>{Xr();xn();xn();xn();wt();fe();B_e=new RegExp(`(${se(Ti)})(?:-|/|\\s*,?\\s*)(${tf})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${tf})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${vd}))?(?=\\W|$)(?!\\:\\d)`,"i"),q_e=1,rJ=2,rN=3,nN=4,wv=class extends B{constructor(t){super();_(this,"shouldSkipYearLikeDate");this.shouldSkipYearLikeDate=t}innerPattern(){return B_e}innerExtract(t,n){let a=Ti[n[q_e].toLowerCase()],s=rf(n[rJ]);if(s>31||this.shouldSkipYearLikeDate&&!n[rN]&&!n[nN]&&n[rJ].match(/^2[0-5]$/))return null;let i=t.createParsingComponents({day:s,month:a}).addTag("parser/ENMonthNameMiddleEndianParser");if(n[nN]){let c=bd(n[nN]);i.assign("year",c)}else{let c=Yt(t.refDate,s,a);i.imply("year",c)}if(!n[rN])return i;let o=rf(n[rN]),l=t.createParsingResult(n.index,n[0]);return l.start=i,l.end=i.clone(),l.end.assign("day",o),l}}});var H_e,U_e,V_e,aJ,Sv,sJ=b(()=>{xn();Xr();wt();xn();fe();H_e=new RegExp(`((?:in)\\s*)?(${se(Ti)})\\s*(?:(?:,|-|of)?\\s*(${vd})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),U_e=1,V_e=2,aJ=3,Sv=class extends B{innerPattern(){return H_e}innerExtract(e,t){let n=t[V_e].toLowerCase();if(t[0].length<=3&&!tN[n])return null;let a=e.createParsingResult(t.index+(t[U_e]||"").length,t.index+t[0].length);a.start.imply("day",1),a.start.addTag("parser/ENMonthNameParser");let s=Ti[n];if(a.start.assign("month",s),t[aJ]){let i=bd(t[aJ]);a.start.assign("year",i)}else{let i=Yt(e.refDate,1,s);a.start.imply("year",i)}return a}}});var W_e,Y_e,G_e,iJ,Z_e,Ev,oJ=b(()=>{xn();wt();fe();W_e=new RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${se(Ti)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Y_e=1,G_e=2,iJ=3,Z_e=4,Ev=class extends B{constructor(t){super();_(this,"strictMonthDateOrder");this.strictMonthDateOrder=t}innerPattern(){return W_e}innerExtract(t,n){let a=parseInt(n[Y_e]),s=parseInt(n[Z_e]),i=n[iJ]?parseInt(n[iJ]):Ti[n[G_e].toLowerCase()];if(i<1||i>12){if(this.strictMonthDateOrder)return null;s>=1&&s<=12&&([i,s]=[s,i])}return s<1||s>31?null:{day:s,month:i,year:a}}}});var K_e,Q_e,J_e,xv,lJ=b(()=>{fe();K_e=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Q_e=1,J_e=2,xv=class extends B{innerPattern(){return K_e}innerExtract(e,t){let n=parseInt(t[J_e]),a=parseInt(t[Q_e]);return e.createParsingComponents().imply("day",1).assign("month",a).assign("year",n)}}});function X_e(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function eMe(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var cJ,nf,vx,bx,Dv,Ln,ic=b(()=>{Pt();cJ=2,nf=3,vx=4,bx=5,Dv=6,Ln=class{constructor(e=!1){_(this,"strictMode");_(this,"cachedPrimaryPrefix",null);_(this,"cachedPrimarySuffix",null);_(this,"cachedPrimaryTimePattern",null);_(this,"cachedFollowingPhase",null);_(this,"cachedFollowingSuffix",null);_(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 n=this.extractPrimaryTimeComponents(e,t);if(!n)return t[0].match(/^\d{4}/)?(t.index+=4,null):(t.index+=t[0].length,null);let a=t.index+t[1].length,s=t[0].substring(t[1].length),i=e.createParsingResult(a,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),c=this.getFollowingTimePatternThroughCache().exec(o);return s.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(i):(i.end=this.extractFollowingTimeComponents(e,c,i),i.end&&(i.text+=c[0]),this.checkAndReturnWithFollowingPattern(i))}extractPrimaryTimeComponents(e,t,n=!1){let a=e.createParsingComponents(),s=0,i=null,o=parseInt(t[cJ]);if(o>100){if(this.strictMode||t[nf]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[nf]!=null){if(t[nf].length==1&&!t[Dv])return null;s=parseInt(t[nf])}if(s>=60)return null;if(o>12&&(i=j.PM),t[Dv]!=null){if(o>12)return null;let l=t[Dv][0].toLowerCase();l=="a"&&(i=j.AM,o==12&&(o=0)),l=="p"&&(i=j.PM,o!=12&&(o+=12))}if(a.assign("hour",o),a.assign("minute",s),i!==null?a.assign("meridiem",i):o<12?a.imply("meridiem",j.AM):a.imply("meridiem",j.PM),t[bx]!=null){let l=parseInt(t[bx].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(t[vx]!=null){let l=parseInt(t[vx]);if(l>=60)return null;a.assign("second",l)}return a}extractFollowingTimeComponents(e,t,n){let a=e.createParsingComponents();if(t[bx]!=null){let l=parseInt(t[bx].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(t[vx]!=null){let l=parseInt(t[vx]);if(l>=60)return null;a.assign("second",l)}let s=parseInt(t[cJ]),i=0,o=-1;if(t[nf]!=null?i=parseInt(t[nf]):s>100&&(i=s%100,s=Math.floor(s/100)),i>=60||s>24)return null;if(s>=12&&(o=j.PM),t[Dv]!=null){if(s>12)return null;let l=t[Dv][0].toLowerCase();l=="a"&&(o=j.AM,s==12&&(s=0,a.isCertain("day")||a.imply("day",a.get("day")+1))),l=="p"&&(o=j.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==j.AM?(n.start.imply("meridiem",j.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",j.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return a.assign("hour",s),a.assign("minute",i),o>=0?a.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?a.imply("meridiem",j.AM):s<=12&&(a.assign("hour",s+12),a.assign("meridiem",j.PM)):s>12?a.imply("meridiem",j.PM):s<=12&&a.imply("meridiem",j.AM),a.date().getTime()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 n=t[1],a=t[2];if(a.includes(".")&&!a.match(/\d(\.\d{2})+$/))return null;let s=parseInt(a),i=parseInt(n);if(s>24||i>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=X_e(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=eMe(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}}});var Cv,dJ=b(()=>{Pt();ic();Cv=class extends Ln{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|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 n=super.extractPrimaryTimeComponents(e,t);if(!n)return n;if(t[0].endsWith("night")){let a=n.get("hour");a>=6&&a<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",j.PM)):a<6&&n.assign("meridiem",j.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",j.PM);let a=n.get("hour");a>=0&&a<=6&&n.assign("hour",n.get("hour")+12)}return t[0].endsWith("morning")&&(n.assign("meridiem",j.AM),n.get("hour")<12&&n.assign("hour",n.get("hour"))),n.addTag("parser/ENTimeExpressionParser")}extractFollowingTimeComponents(e,t,n){let a=super.extractFollowingTimeComponents(e,t,n);return a&&a.addTag("parser/ENTimeExpressionParser"),a}}});var tMe,rMe,Pv,uJ=b(()=>{xn();et();fe();vv();tMe=new RegExp(`(${sc})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),rMe=new RegExp(`(${Td})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),Pv=class extends B{constructor(t){super();_(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?rMe:tMe}innerExtract(t,n){let a=ki(n[1]);return a?J.createRelativeFromReference(t.reference,ef(a)):null}}});var nMe,aMe,sMe,_v,pJ=b(()=>{xn();et();fe();nMe=new RegExp(`(${sc})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),aMe=new RegExp(`(${Td})\\s{0,5}(later|after|from now)(?=\\W|$)`,"i"),sMe=1,_v=class extends B{constructor(t){super();_(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?aMe:nMe}innerExtract(t,n){let a=ki(n[sMe]);return a?J.createRelativeFromReference(t.reference,a):null}}});var af,is,oc=b(()=>{af=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}},is=class{refine(e,t){if(t.length<2)return t;let n=[],a=t[0],s=null;for(let i=1;i{console.log(`${this.constructor.name} merged ${l} and ${c} into ${d}`)}),a=d}}return a!=null&&n.push(a),n}}});var xr,wi=b(()=>{oc();xr=class extends is{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.imply(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.imply(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),i=n.start.dayjs();n.start.isOnlyWeekdayComponent()&&i.add(7,"days").isAfter(s)?(i=i.add(7,"days"),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year())):t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(i)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isDateWithUnknownYear()&&i.add(1,"years").isAfter(s)?(i=i.add(1,"years"),n.start.imply("year",i.year())):t.start.isDateWithUnknownYear()&&s.add(-1,"years").isBefore(i)?(s=s.add(-1,"years"),t.start.imply("year",s.year())):[n,t]=[t,n]}let a=t.clone();return a.start=t.start,a.end=n.start,a.index=Math.min(t.index,n.index),t.index{wi();Mv=class extends xr{patternBetween(){return/^\s*(to|-|–|until|through|till)\s*$/i}}});function oo(r,e){e=e.add(1,"day"),vr(r,e),Go(r,e)}function hJ(r,e){e=e.add(1,"day"),aN(r,e),Go(r,e)}function vr(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}function fJ(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",j.AM):r.assign("meridiem",j.PM)}function aN(r,e){r.imply("day",e.date()),r.imply("month",e.month()+1),r.imply("year",e.year())}function Go(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}var qs=b(()=>{Pt()});function sN(r,e){let t=r.clone(),n=r.start,a=e.start;if(t.start=gJ(n,a),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,i=e.end==null?e.start:e.end,o=gJ(s,i);if(r.end==null&&o.date().getTime(){Pt();qs()});var Dr,Si=b(()=>{oc();yJ();Dr=class extends is{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let a=t.start.isOnlyDate()?sN(t,n):sN(n,t);return a.index=t.index,a.text=t.text+e+n.text,a}}});var sf,vJ=b(()=>{Si();sf=class extends Dr{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-|\\.|\u2219|:)?\\s*$")}}});var iMe,Av,bJ=b(()=>{QI();iMe=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Av=class{constructor(e){_(this,"timezoneOverrides");this.timezoneOverrides=e}refine(e,t){var a;let n=(a=e.option.timezones)!=null?a:{};return t.forEach(s=>{var m,h;let i=e.text.substring(s.index+s.text.length),o=iMe.exec(i);if(!o)return;let l=o[1].toUpperCase(),c=(h=(m=s.start.date())!=null?m:s.refDate)!=null?h:new Date,d={...this.timezoneOverrides,...n},u=gx(l,c,d);if(u==null)return;e.debug(()=>{console.log(`Extracting timezone: '${l}' into: ${u} for: ${s.start}`)});let p=s.start.get("timezoneOffset");p!==null&&u!=p&&(s.start.isCertain("timezoneOffset")||l!=o[1])||s.start.isOnlyDate()&&l!=o[1]||(s.text+=o[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",u),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",u))}),t}}});var oMe,lMe,cMe,dMe,lo,Iv=b(()=>{oMe=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),lMe=1,cMe=2,dMe=3,lo=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let a=e.text.substring(n.index+n.text.length),s=oMe.exec(a);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let i=parseInt(s[cMe]),o=parseInt(s[dMe]||"0"),l=i*60+o;l>840||(s[lMe]==="-"&&(l=-l),n.end!=null&&n.end.assign("timezoneOffset",l),n.start.assign("timezoneOffset",l),n.text+=s[0])}),t}}});var kd,iN=b(()=>{kd=class{refine(e,t){if(t.length<2)return t;let n=[],a=t[0];for(let s=1;s=a.index+a.text.length){n.push(a),a=i;continue}let o=null,l=null;i.text.length>a.text.length?(o=i,l=a):(o=a,l=i),e.debug(()=>{console.log(`${this.constructor.name} remove ${l} by ${o}`)}),a=o}return a!=null&&n.push(a),n}}});var TJ,Nv,kJ=b(()=>{TJ=We(Lt(),1);ZI();Nv=class{refine(e,t){return e.option.forwardDate&&t.forEach(n=>{let a=(0,TJ.default)(e.reference.getDateWithAdjustedTimezone());if(n.start.isOnlyTime()&&e.reference.instant>n.start.date()){let s=e.reference.getDateWithAdjustedTimezone(),i=new Date(s);i.setDate(i.getDate()+1),fx(n.start,i),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${n} time from the ref date (${s}) to the following day (${i})`)}),n.end&&n.end.isOnlyTime()&&(fx(n.end,i),n.start.date()>n.end.date()&&(i.setDate(i.getDate()+1),fx(n.end,i)))}if(n.start.isOnlyWeekdayComponent()&&a.isAfter(n.start.dayjs())&&(a.day()>=n.start.get("weekday")?a=a.day(n.start.get("weekday")+7):a=a.day(n.start.get("weekday")),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year()),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${n} weekday (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(a.day()>n.end.get("weekday")?a=a.day(n.end.get("weekday")+7):a=a.day(n.end.get("weekday")),n.end.imply("day",a.date()),n.end.imply("month",a.month()+1),n.end.imply("year",a.year()),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${n} weekday (${n.end})`)}))),n.start.isDateWithUnknownYear()&&a.isAfter(n.start.dayjs()))for(let s=0;s<3&&a.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${n} year (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${n} month (${n.start})`)}))}),t}}});var Rv,wJ=b(()=>{oc();Rv=class extends af{constructor(t){super();_(this,"strictMode");this.strictMode=t}isValid(t,n){return n.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${n.text}'`)}),!1):n.start.isValidDate()?n.end&&!n.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${n} (${n.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,n):!0:(t.debug(()=>{console.log(`Removing invalid result: ${n} (${n.start})`)}),!1)}isStrictModeValid(t,n){return n.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${n} (${n.end})`)}),!1):!0}}});var uMe,pMe,mMe,hMe,SJ,fMe,EJ,xJ,gMe,DJ,CJ,lc,Tx=b(()=>{fe();uMe=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"),pMe=1,mMe=2,hMe=3,SJ=4,fMe=5,EJ=6,xJ=7,gMe=8,DJ=9,CJ=10,lc=class extends B{innerPattern(){return uMe}innerExtract(e,t){let n=e.createParsingComponents({year:parseInt(t[pMe]),month:parseInt(t[mMe]),day:parseInt(t[hMe])});if(t[SJ]!=null&&(n.assign("hour",parseInt(t[SJ])),n.assign("minute",parseInt(t[fMe])),t[EJ]!=null&&n.assign("second",parseInt(t[EJ])),t[xJ]!=null&&n.assign("millisecond",parseInt(t[xJ])),t[gMe]!=null)){let a=0;if(t[DJ]){let s=parseInt(t[DJ]),i=0;t[CJ]!=null&&(i=parseInt(t[CJ])),a=s*60,a<0?a-=i:a+=i}n.assign("timezoneOffset",a)}return n.addTag("parser/ISOFormatParser")}}});var bp,oN=b(()=>{oc();bp=class extends is{mergeResults(e,t,n){let a=n.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,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}}});function Or(r,e=!1){return r.parsers.unshift(new lc),r.refiners.unshift(new bp),r.refiners.unshift(new lo),r.refiners.unshift(new kd),r.refiners.push(new Av),r.refiners.push(new kd),r.refiners.push(new Nv),r.refiners.push(new Rv(e)),r}var Hs=b(()=>{bJ();Iv();iN();kJ();wJ();Tx();oN()});function fa(r){let e=(0,wd.default)(r.getDateWithAdjustedTimezone()),t=new J(r,{});return vr(t,e),fJ(t,e),t.assign("timezoneOffset",r.getTimezoneOffset()),t.addTag("casualReference/now"),t}function $n(r){let e=(0,wd.default)(r.getDateWithAdjustedTimezone()),t=new J(r,{});return vr(t,e),Go(t,e),t.addTag("casualReference/today"),t}function ga(r){return Tp(r,1).addTag("casualReference/yesterday")}function Tp(r,e){return Zo(r,-e)}function ya(r){return Zo(r,1).addTag("casualReference/tomorrow")}function Zo(r,e){let t=(0,wd.default)(r.getDateWithAdjustedTimezone()),n=new J(r,{});return t=t.add(e,"day"),vr(n,t),Go(n,t),n}function PJ(r,e=22){let t=(0,wd.default)(r.getDateWithAdjustedTimezone()),n=new J(r,{});return vr(n,t),n.imply("hour",e),n.imply("meridiem",j.PM),n.addTag("casualReference/tonight"),n}function kx(r,e=0){let t=(0,wd.default)(r.getDateWithAdjustedTimezone()),n=new J(r,{});return t.hour()<6&&(t=t.add(-1,"day")),vr(n,t),n.imply("hour",e),n}function of(r,e=20){let t=new J(r,{});return t.imply("meridiem",j.PM),t.imply("hour",e),t.addTag("casualReference/evening"),t}function wx(r,e=20){let t=(0,wd.default)(r.getDateWithAdjustedTimezone()),n=new J(r,{});return t=t.add(-1,"day"),vr(n,t),n.imply("hour",e),n.imply("meridiem",j.PM),n.addTag("casualReference/yesterday"),n.addTag("casualReference/evening"),n}function kp(r){let e=new J(r,{}),t=(0,wd.default)(r.getDateWithAdjustedTimezone());return t.hour()>2&&hJ(e,t),e.assign("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("millisecond",0),e.addTag("casualReference/midnight"),e}function lf(r,e=6){let t=new J(r,{});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 _J(r,e=15){let t=new J(r,{});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 cf(r){let e=new J(r,{});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 wd,Us=b(()=>{et();wd=We(Lt(),1);qs();Pt()});var MJ,yMe,Ov,AJ=b(()=>{MJ=We(Lt(),1);fe();qs();Us();yMe=/(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Ov=class extends B{innerPattern(e){return yMe}innerExtract(e,t){let n=(0,MJ.default)(e.refDate),a=t[0].toLowerCase(),s=e.createParsingComponents();switch(a){case"now":s=fa(e.reference);break;case"today":s=$n(e.reference);break;case"yesterday":s=ga(e.reference);break;case"tomorrow":case"tmr":case"tmrw":s=ya(e.reference);break;case"tonight":s=PJ(e.reference);break;case"overmorrow":s=Zo(e.reference,2);break;default:a.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),vr(s,n),s.imply("hour",0));break}return s.addTag("parser/ENCasualDateParser"),s}}});var vMe,Fv,IJ=b(()=>{fe();Us();vMe=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i,Fv=class extends B{innerPattern(){return vMe}innerExtract(e,t){let n=null;switch(t[1].toLowerCase()){case"afternoon":n=_J(e.reference);break;case"evening":case"night":n=of(e.reference);break;case"midnight":n=kp(e.reference);break;case"morning":n=lf(e.reference);break;case"noon":case"midday":n=cf(e.reference);break}return n&&n.addTag("parser/ENCasualTimeParser"),n}}});function fn(r){let e={};for(let t in r)e[t]=-r[t];return e}function Sx(r,e){let t=r.clone(),n=r.dayjs();for(let a in e)n=n.add(e[a],a);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}var Vs=b(()=>{});function gn(r,e,t){let n=r.getDateWithAdjustedTimezone(),a=bMe(n,e,t),s=new J(r);return s=Sx(s,{day:a}),s.assign("weekday",e),s}function bMe(r,e,t){let n=r.getDay();switch(t){case"this":return Ex(r,e);case"last":return NJ(r,e);case"next":return n==Fe.SUNDAY?e==Fe.SUNDAY?7:e:n==Fe.SATURDAY?e==Fe.SATURDAY?7:e==Fe.SUNDAY?8:1+e:e=0&&(n-=7),n}var co=b(()=>{Pt();et();Vs()});var kMe,wMe,SMe,EMe,Lv,RJ=b(()=>{xn();wt();fe();co();Pt();kMe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${se(yx)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),wMe=1,SMe=2,EMe=3,Lv=class extends B{innerPattern(){return kMe}innerExtract(e,t){let n=t[wMe],a=t[EMe],s=n||a;s=s||"",s=s.toLowerCase();let i=null;s=="last"||s=="past"?i="last":s=="next"?i="next":s=="this"&&(i="this");let o=t[SMe].toLowerCase(),l;if(yx[o]!==void 0)l=yx[o];else if(o=="weekend")l=i=="last"?Fe.SUNDAY:Fe.SATURDAY;else if(o=="weekday"){let c=e.reference.getDateWithAdjustedTimezone().getDay();c==Fe.SUNDAY||c==Fe.SATURDAY?l=i=="last"?Fe.FRIDAY:Fe.MONDAY:(l=c-1,l=i=="last"?l-1:l+1,l=l%5+1)}else return null;return gn(e.reference,l,i)}}});var OJ,xMe,DMe,CMe,$v,FJ=b(()=>{xn();et();OJ=We(Lt(),1);fe();wt();xMe=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${se(bv)})(?=\\s*)(?=\\W|$)`,"i"),DMe=1,CMe=2,$v=class extends B{innerPattern(){return xMe}innerExtract(e,t){let n=t[DMe].toLowerCase(),a=t[CMe].toLowerCase(),s=bv[a];if(n=="next"||n.startsWith("after")){let l={};return l[s]=1,J.createRelativeFromReference(e.reference,l)}if(n=="last"||n=="past"){let l={};return l[s]=-1,J.createRelativeFromReference(e.reference,l)}let i=e.createParsingComponents(),o=(0,OJ.default)(e.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.imply("year",o.year())):a.match(/month/i)?(o=o.add(-o.date()+1,"d"),i.imply("day",o.date()),i.assign("year",o.year()),i.assign("month",o.month()+1)):a.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.assign("year",o.year())),i}}});var PMe,_Me,MMe,LJ,$J,lN,Dn,cc=b(()=>{Xr();PMe=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"),_Me=1,MMe=5,LJ=2,$J=3,lN=4,Dn=class{constructor(e){_(this,"groupNumberMonth");_(this,"groupNumberDay");this.groupNumberMonth=e?$J:LJ,this.groupNumberDay=e?LJ:$J}pattern(){return PMe}extract(e,t){let n=t.index+t[_Me].length,a=t.index+t[0].length-t[MMe].length;if(n>0&&e.text.substring(0,n).match("\\d/?$")||a12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(i.start.assign("day",l),i.start.assign("month",o),t[lN]){let c=parseInt(t[lN]),d=ss(c);i.start.assign("year",d)}else{let c=Yt(e.refDate,l,o);i.start.imply("year",c)}return i.addTag("parser/SlashDateFormatParser")}}});var AMe,IMe,jv,jJ=b(()=>{xn();et();fe();vv();AMe=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${sc})(?=\\W|$)`,"i"),IMe=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Td})(?=\\W|$)`,"i"),jv=class extends B{constructor(t=!0){super();_(this,"allowAbbreviations");this.allowAbbreviations=t}innerPattern(){return this.allowAbbreviations?AMe:IMe}innerExtract(t,n){let a=n[1].toLowerCase(),s=ki(n[2]);if(!s)return null;switch(a){case"last":case"past":case"-":s=ef(s);break}return J.createRelativeFromReference(t.reference,s)}}});function NMe(r){return r.text.match(/^[+-]/i)!=null}function zJ(r){return r.text.match(/^-/i)!=null}var zv,BJ=b(()=>{oc();et();xn();Vs();zv=class extends is{shouldMergeResults(e,t,n){return e.match(/^\s*$/i)?NMe(n)||zJ(n):!1}mergeResults(e,t,n,a){let s=ki(n.text);zJ(n)&&(s=fn(s));let i=J.createRelativeFromReference($t.fromDate(t.start.date()),s);return new Mt(t.reference,t.index,`${t.text}${e}${n.text}`,i)}}});function qJ(r){return r.text.match(/\s+(before|from)$/i)!=null}function RMe(r){return r.text.match(/\s+(after|since)$/i)!=null}var Bv,HJ=b(()=>{oc();et();xn();vv();Bv=class extends is{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!qJ(t)&&!RMe(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let a=ki(t.text);qJ(t)&&(a=ef(a));let s=J.createRelativeFromReference($t.fromDate(n.start.date()),a);return new Mt(n.reference,t.index,`${t.text}${e}${n.text}`,s)}}});var OMe,FMe,qv,UJ=b(()=>{xn();OMe=new RegExp(`^\\s*(${vd})`,"i"),FMe=1,qv=class{refine(e,t){return t.forEach(function(n){if(!n.start.isDateWithUnknownYear())return;let a=e.text.substring(n.index+n.text.length),s=OMe.exec(a);if(!s||s[0].trim().length<=3)return;e.debug(()=>{console.log(`Extracting year: '${s[0]}' into : ${n}`)});let i=bd(s[FMe]);n.end!=null&&n.end.assign("year",i),n.start.assign("year",i),n.text+=s[0]}),t}}});var Hv,VJ=b(()=>{oc();Hv=class extends af{constructor(){super()}isValid(e,t){let n=t.text.trim();return n===e.text.trim()?!0:n.toLowerCase()==="may"&&!e.text.substring(0,t.index).trim().match(/\b(in)$/i)?(e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):n.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 wp,cN=b(()=>{QQ();tJ();nJ();sJ();oJ();lJ();dJ();uJ();pJ();mJ();vJ();Hs();AJ();IJ();RJ();FJ();cc();jJ();BJ();HJ();iN();UJ();VJ();wp=class{createCasualConfiguration(e=!1){let t=this.createConfiguration(!1,e);return t.parsers.push(new Ov),t.parsers.push(new Fv),t.parsers.push(new Sv),t.parsers.push(new $v),t.parsers.push(new jv),t.refiners.push(new Hv),t}createConfiguration(e=!0,t=!1){let n=Or({parsers:[new Dn(t),new Tv(e),new kv,new wv(t),new Lv,new xv,new Cv(e),new Pv(e),new _v(e)],refiners:[new sf]},e);return n.parsers.unshift(new Ev(e)),n.refiners.unshift(new Bv),n.refiners.unshift(new zv),n.refiners.unshift(new kd),n.refiners.push(new sf),n.refiners.push(new qv),n.refiners.push(new Mv),n}}});var Me,Uv,os=b(()=>{et();cN();Me=class r{constructor(e){_(this,"parsers");_(this,"refiners");_(this,"defaultConfig",new wp);e=e||this.defaultConfig.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new r({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let a=this.parse(e,t,n);return a.length>0?a[0].start.date():null}parse(e,t,n){let a=new Uv(e,t,n),s=[];return this.parsers.forEach(i=>{let o=r.executeParser(a,i);s=s.concat(o)}),s.sort((i,o)=>i.index-o.index),this.refiners.forEach(function(i){s=i.refine(a,s)}),s}static executeParser(e,t){let n=[],a=t.pattern(e),s=e.text,i=e.text,o=a.exec(i);for(;o;){let l=o.index+s.length-i.length;o.index=l;let c=t.extract(e,o);if(!c){i=s.substring(o.index+1),o=a.exec(i);continue}let d=null;c instanceof Mt?d=c:c instanceof J?(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}'`)),n.push(d),i=s.substring(u+p.length),o=a.exec(i)}return n}},Uv=class{constructor(e,t,n){_(this,"text");_(this,"option");_(this,"reference");_(this,"refDate");this.text=e,this.option=n!=null?n:{},this.reference=$t.fromInput(t,this.option.timezones),this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof J?e:new J(this.reference,e)}createParsingResult(e,t,n,a){let s=typeof t=="string"?t:this.text.substring(e,t),i=n?this.createParsingComponents(n):null,o=a?this.createParsingComponents(a):null;return new Mt(this.reference,e,s,i,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}}});var uN={};Ke(uN,{Chrono:()=>Me,GB:()=>LMe,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>Vv,configuration:()=>xx,parse:()=>$Me,parseDate:()=>jMe,strict:()=>dN});function $Me(r,e,t){return Vv.parse(r,e,t)}function jMe(r,e,t){return Vv.parseDate(r,e,t)}var xx,Vv,dN,LMe,WJ=b(()=>{os();et();Pt();cN();xx=new wp,Vv=new Me(xx.createCasualConfiguration(!1)),dN=new Me(xx.createConfiguration(!0,!1)),LMe=new Me(xx.createCasualConfiguration(!0))});var Wv,YJ=b(()=>{ic();Wv=class extends Ln{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});function gN(r){let e=r.toLowerCase();return pN[e]!==void 0?pN[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 KJ(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return ss(e)}function XJ(r){let e={},t=r,n=GJ.exec(t);for(;n;)zMe(e,n),t=t.substring(n[0].length),n=GJ.exec(t);return e}function zMe(r,e){let t=gN(e[1]),n=Yv[e[2].toLowerCase()];r[n]=t}var mN,hN,pN,Yv,fN,ZJ,QJ,GJ,JJ,df=b(()=>{wt();Xr();mN={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},hN={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":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},pN={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12},Yv={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"},fN=`(?:${se(pN)}|[0-9]+|[0-9]+\\.[0-9]+|halb?|halbe?|einigen?|wenigen?|mehreren?)`;ZJ="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";QJ=`(${fN})\\s{0,5}(${se(Yv)})\\s{0,5}`,GJ=new RegExp(QJ,"i"),JJ=ja("",QJ)});var BMe,qMe,HMe,UMe,Gv,eX=b(()=>{df();wt();fe();co();BMe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${se(mN)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),qMe=1,HMe=3,UMe=2,Gv=class extends B{innerPattern(){return BMe}innerExtract(e,t){let n=t[UMe].toLowerCase(),a=mN[n],s=t[qMe],i=t[HMe],o=s||i;o=o||"",o=o.toLowerCase();let l=null;return o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this"),gn(e.reference,a,l)}}});var VMe,WMe,YMe,tX,rX,nX,Zv,aX=b(()=>{Pt();VMe=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"),WMe=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|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"),YMe=2,tX=3,rX=4,nX=5,Zv=class r{pattern(e){return VMe}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=r.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let a=e.text.substring(t.index+t[0].length),s=WMe.exec(a);return s&&(n.end=r.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,a=0,s=null;if(n=parseInt(t[YMe]),t[tX]!=null&&(a=parseInt(t[tX])),a>=60||n>24)return null;if(n>=12&&(s=j.PM),t[nX]!=null){if(n>12)return null;let i=t[nX].toLowerCase();i.match(/morgen|vormittag/)&&(s=j.AM,n==12&&(n=0)),i.match(/nachmittag|abend/)&&(s=j.PM,n!=12&&(n+=12)),i.match(/nacht/)&&(n==12?(s=j.AM,n=0):n<6?s=j.AM:(s=j.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",a),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",j.AM):e.imply("meridiem",j.PM),t[rX]!=null){let i=parseInt(t[rX]);if(i>=60)return null;e.assign("second",i)}return e}}});var Kv,sX=b(()=>{wi();Kv=class extends xr{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}}});var Qv,iX=b(()=>{Si();Qv=class extends Dr{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}}});var oX,Sp,yN=b(()=>{oX=We(Lt(),1);Pt();fe();qs();Vs();Sp=class r extends B{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=(0,oX.default)(e.refDate),a=t[2].toLowerCase(),s=e.createParsingComponents();return Go(s,n),r.extractTimeComponents(s,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=Sx(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.AM);break}return e}}});var lX,GMe,ZMe,KMe,Jv,cX=b(()=>{lX=We(Lt(),1);fe();qs();yN();Us();GMe=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),ZMe=1,KMe=2,Jv=class extends B{innerPattern(e){return GMe}innerExtract(e,t){let n=(0,lX.default)(e.refDate),a=(t[ZMe]||"").toLowerCase(),s=(t[KMe]||"").toLowerCase(),i=e.createParsingComponents();switch(a){case"jetzt":i=fa(e.reference);break;case"heute":i=$n(e.reference);break;case"morgen":oo(i,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),oo(i,n);break;case"gestern":n=n.add(-1,"day"),vr(i,n),Go(i,n);break;case"vorgestern":n=n.add(-2,"day"),vr(i,n),Go(i,n);break;default:a.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),vr(i,n),i.imply("hour",0));break}return s&&(i=Sp.extractTimeComponents(i,s)),i}}});var QMe,dX,uX,JMe,pX,Xv,mX=b(()=>{Xr();df();df();wt();fe();QMe=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${se(hN)})(?:(?:-|/|,?\\s*)(${ZJ}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),dX=1,uX=2,JMe=3,pX=4,Xv=class extends B{innerPattern(){return QMe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=hN[t[JMe].toLowerCase()],s=parseInt(t[dX]);if(s>31)return t.index=t.index+t[dX].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[pX]){let i=KJ(t[pX]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[uX]){let i=parseInt(t[uX]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var eb,hX=b(()=>{df();et();fe();Vs();wt();eb=class extends B{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${fN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${se(Yv)})`,"i")}innerExtract(e,t){let n=t[2]?gN(t[2]):1,a=Yv[t[4].toLowerCase()],s={};s[a]=n;let i=t[1]||t[3]||"";if(i=i.toLowerCase(),!!i)return(/vor/.test(i)||/letzte/.test(i)||/vergangen/.test(i))&&(s=fn(s)),J.createRelativeFromReference(e.reference,s)}}});var tb,fX=b(()=>{df();et();fe();tb=class extends B{innerPattern(){return new RegExp(`(?:in|f\xFCr|w\xE4hrend)\\s*(${JJ})(?=\\W|$)`,"i")}innerExtract(e,t){let n=XJ(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var TN={};Ke(TN,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>vN,createCasualConfiguration:()=>gX,createConfiguration:()=>bN,parse:()=>eAe,parseDate:()=>tAe,strict:()=>XMe});function eAe(r,e,t){return vN.parse(r,e,t)}function tAe(r,e,t){return vN.parseDate(r,e,t)}function gX(r=!0){let e=bN(!1,r);return e.parsers.unshift(new Sp),e.parsers.unshift(new Jv),e.parsers.unshift(new eb),e}function bN(r=!0,e=!0){return Or({parsers:[new lc,new Dn(e),new Wv,new Zv,new Xv,new Gv,new tb],refiners:[new Kv,new Qv]},r)}var vN,XMe,yX=b(()=>{Hs();os();et();Pt();cc();Tx();YJ();eX();aX();sX();iX();cX();yN();mX();hX();fX();vN=new Me(gX()),XMe=new Me(bN(!0))});var vX,rb,bX=b(()=>{vX=We(Lt(),1);Pt();fe();qs();Us();rb=class extends B{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=(0,vX.default)(e.refDate),a=t[0].toLowerCase(),s=e.createParsingComponents();switch(a){case"maintenant":return fa(e.reference);case"aujourd'hui":return $n(e.reference);case"hier":return ga(e.reference);case"demain":return ya(e.reference);default:a.match(/cette\s*nuit/)?(vr(s,n),s.imply("hour",22),s.imply("meridiem",j.PM)):a.match(/la\s*veille/)&&(n=n.add(-1,"day"),vr(s,n),s.imply("hour",0))}return s}}});var nb,TX=b(()=>{Pt();fe();nb=class extends B{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),a=e.createParsingComponents();switch(n){case"apr\xE8s-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"\xE0 minuit":a.imply("hour",0),a.imply("meridiem",j.AM);break}return a}}});var ab,kX=b(()=>{ic();ab=class extends Ln{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});var sb,wX=b(()=>{Si();sb=class extends Dr{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|au|vers|de|,|-)?\\s*$")}}});var ib,SX=b(()=>{wi();ib=class extends xr{patternBetween(){return/^\s*(à|a|au|-)\s*$/i}}});function xN(r){let e=r.toLowerCase();return kN[e]!==void 0?kN[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}function CN(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}function DX(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}function Cx(r){let e={},t=r,n=EX.exec(t);for(;n;)rAe(e,n),t=t.substring(n[0].length),n=EX.exec(t);return e}function rAe(r,e){let t=xN(e[1]),n=ob[e[2].toLowerCase()];r[n]=t}var wN,SN,kN,ob,EN,DN,xX,CX,EX,Dx,Sd=b(()=>{wt();wN={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},SN={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":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\u00FBt: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\u00E9cembre:12,decembre:12,dec:12,"dec.":12},kN={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},ob={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\u00E9e:"year",ann\u00E9es:"year"},EN=`(?:${se(kN)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;DN="(?:[0-9]{1,2}(?:er)?)";xX="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";CX=`(${EN})\\s{0,5}(${se(ob)})\\s{0,5}`,EX=new RegExp(CX,"i"),Dx=ja("",CX)});var nAe,aAe,sAe,lb,PX=b(()=>{Sd();wt();fe();co();nAe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${se(wN)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),aAe=1,sAe=2,lb=class extends B{innerPattern(){return nAe}innerExtract(e,t){let n=t[aAe].toLowerCase(),a=wN[n];if(a===void 0)return null;let s=t[sAe];s=s||"",s=s.toLowerCase();let i=null;return s=="dernier"?i="last":s=="prochain"&&(i="next"),gn(e.reference,a,i)}}});var iAe,oAe,lAe,_X,MX,AX,cb,IX=b(()=>{Pt();iAe=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),oAe=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),lAe=2,_X=3,MX=4,AX=5,cb=class r{pattern(e){return iAe}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=r.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let a=e.text.substring(t.index+t[0].length),s=oAe.exec(a);return s&&(n.end=r.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,a=0,s=null;if(n=parseInt(t[lAe]),t[_X]!=null&&(a=parseInt(t[_X])),a>=60||n>24)return null;if(n>=12&&(s=j.PM),t[AX]!=null){if(n>12)return null;let i=t[AX][0].toLowerCase();i=="a"&&(s=j.AM,n==12&&(n=0)),i=="p"&&(s=j.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",a),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",j.AM):e.imply("meridiem",j.PM),t[MX]!=null){let i=parseInt(t[MX]);if(i>=60)return null;e.assign("second",i)}return e}}});var cAe,NX,RX,dAe,OX,db,FX=b(()=>{Xr();Sd();Sd();Sd();wt();fe();cAe=new RegExp(`(?:on\\s*?)?(${DN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${DN}))?(?:-|/|\\s*(?:de)?\\s*)(${se(SN)})(?:(?:-|/|,?\\s*)(${xX}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),NX=1,RX=2,dAe=3,OX=4,db=class extends B{innerPattern(){return cAe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=SN[t[dAe].toLowerCase()],s=CN(t[NX]);if(s>31)return t.index=t.index+t[NX].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[OX]){let i=DX(t[OX]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[RX]){let i=CN(t[RX]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var ub,LX=b(()=>{Sd();et();fe();Vs();ub=class extends B{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Dx})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Cx(t[1]),a=fn(n);return J.createRelativeFromReference(e.reference,a)}}});var pb,$X=b(()=>{Sd();et();fe();pb=class extends B{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Dx})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Cx(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var mb,jX=b(()=>{Sd();et();fe();Vs();wt();mb=class extends B{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${EN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${se(ob)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?xN(t[1]):1,a=ob[t[3].toLowerCase()],s={};s[a]=n;let i=t[2]||t[4]||"";if(i=i.toLowerCase(),!!i)return(/derni[eè]re?s?/.test(i)||/pass[ée]e?s?/.test(i)||/pr[ée]c[ée]dents?/.test(i))&&(s=fn(s)),J.createRelativeFromReference(e.reference,s)}}});var MN={};Ke(MN,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>PN,createCasualConfiguration:()=>zX,createConfiguration:()=>_N,parse:()=>pAe,parseDate:()=>mAe,strict:()=>uAe});function pAe(r,e,t){return PN.parse(r,e,t)}function mAe(r,e,t){return PN.parseDate(r,e,t)}function zX(r=!0){let e=_N(!1,r);return e.parsers.unshift(new rb),e.parsers.unshift(new nb),e.parsers.unshift(new mb),e}function _N(r=!0,e=!0){return Or({parsers:[new Dn(e),new db,new ab,new cb,new ub,new pb,new lb],refiners:[new sb,new ib]},r)}var PN,uAe,BX=b(()=>{Hs();os();et();Pt();bX();TX();cc();kX();wX();SX();PX();IX();FX();LX();$X();jX();PN=new Me(zX()),uAe=new Me(_N(!0))});function za(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,hAe)}function hAe(r){return String.fromCharCode(r.charCodeAt(0)-65248)}function Ep(r){let e=0;for(let t=0;t{Ko={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10},uf={\u65E5:0,\u6708:1,\u706B:2,\u6C34:3,\u6728:4,\u91D1:5,\u571F:6}});var HX,fAe,qX,gAe,AN,yAe,vAe,bAe,hb,UX=b(()=>{pf();Xr();HX=We(Lt(),1),fAe=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,qX=1,gAe=2,AN=3,yAe=4,vAe=5,bAe=6,hb=class{pattern(){return fAe}extract(e,t){let n=parseInt(za(t[vAe])),a=parseInt(za(t[bAe])),s=e.createParsingComponents({day:a,month:n});if(t[qX]&&t[qX].match("\u540C|\u4ECA|\u672C")){let i=(0,HX.default)(e.refDate);s.assign("year",i.year())}if(t[gAe]){let i=t[yAe],o=i=="\u5143"?1:parseInt(za(i));t[AN]=="\u4EE4\u548C"?o+=2018:t[AN]=="\u5E73\u6210"?o+=1988:t[AN]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let i=Yt(e.refDate,a,n);s.imply("year",i)}return s}}});var fb,VX=b(()=>{wi();fb=class extends xr{patternBetween(){return/^\s*(から|-|ー|-|~|~)\s*$/i}}});function kAe(r){switch(r){case"\u304D\u3087\u3046":return"\u4ECA\u65E5";case"\u307B\u3093\u3058\u3064":return"\u672C\u65E5";case"\u304D\u306E\u3046":return"\u6628\u65E5";case"\u3042\u3057\u305F":return"\u660E\u65E5";case"\u3053\u3093\u3084":return"\u4ECA\u591C";case"\u3053\u3093\u3086\u3046":return"\u4ECA\u5915";case"\u3053\u3093\u3070\u3093":return"\u4ECA\u6669";case"\u3051\u3055":return"\u4ECA\u671D";default:return r}}var WX,TAe,gb,YX=b(()=>{WX=We(Lt(),1);Pt();Us();TAe=/今日|きょう|本日|ほんじつ|昨日|きのう|明日|あした|今夜|こんや|今夕|こんゆう|今晩|こんばん|今朝|けさ/i;gb=class{pattern(){return TAe}extract(e,t){let n=kAe(t[0]),a=(0,WX.default)(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return ga(e.reference);case"\u660E\u65E5":return ya(e.reference);case"\u672C\u65E5":case"\u4ECA\u65E5":return $n(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",j.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",j.AM)),s.assign("day",a.date()),s.assign("month",a.month()+1),s.assign("year",a.year()),s}}});var wAe,yb,GX=b(()=>{pf();co();wAe=new RegExp("((?\u524D\u306E|\u6B21\u306E|\u4ECA\u9031))?(?"+Object.keys(uf).join("|")+")(?:\u66DC\u65E5|\u66DC)","i"),yb=class{pattern(){return wAe}extract(e,t){let n=t.groups.weekday,a=uf[n];if(a===void 0)return null;let s=t.groups.prefix||"",i=null;return s.match(/前の/)?i="last":s.match(/次の/)?i="next":s.match(/今週/)&&(i="this"),gn(e.reference,a,i)}}});var SAe,ZX,EAe,xAe,vb,KX=b(()=>{Xr();pf();SAe=new RegExp("([0-9\uFF10-\uFF19]{4}[\\/|\\\uFF0F])?([0-1\uFF10-\uFF11]{0,1}[0-9\uFF10-\uFF19]{1})(?:[\\/|\\\uFF0F]([0-3\uFF10-\uFF13]{0,1}[0-9\uFF10-\uFF19]{1}))","i"),ZX=1,EAe=2,xAe=3,vb=class{pattern(){return SAe}extract(e,t){let n=e.createParsingComponents(),a=parseInt(za(t[EAe])),s=parseInt(za(t[xAe]));if(a<1||a>12||s<1||s>31)return null;if(n.assign("day",s),n.assign("month",a),t[ZX]){let i=parseInt(za(t[ZX])),o=ss(i);n.assign("year",o)}else{let i=Yt(e.reference.instant,s,a);n.imply("year",i)}return n}}});var DAe,CAe,Px,_x,Ed,mf,Mx,bb,QX=b(()=>{fe();Pt();pf();DAe=new RegExp("(?:(\u5348\u524D|\u5348\u5F8C|A.M.|P.M.|AM|PM))?(?:[\\s,\uFF0C\u3001]*)(?:([0-9\uFF10-\uFF19]+|["+Object.keys(Ko).join("")+"]+)(?:\\s*)(?:\u6642|:|\uFF1A)(?:\\s*)([0-9\uFF10-\uFF19]+|\u534A|["+Object.keys(Ko).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)([0-9\uFF10-\uFF19]+|["+Object.keys(Ko).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),CAe=new RegExp("(?:^\\s*(?:\u304B\u3089|\\-|\\\u2013|\\\uFF0D|\\~|\\\u301C)\\s*)(?:(\u5348\u524D|\u5348\u5F8C|A.M.|P.M.|AM|PM))?(?:[\\s,\uFF0C\u3001]*)(?:([0-9\uFF10-\uFF19]+|["+Object.keys(Ko).join("")+"]+)(?:\\s*)(?:\u6642|:|\uFF1A)(?:\\s*)([0-9\uFF10-\uFF19]+|\u534A|["+Object.keys(Ko).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)([0-9\uFF10-\uFF19]+|["+Object.keys(Ko).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Px=1,_x=2,Ed=3,mf=4,Mx=5,bb=class extends B{innerPattern(){return DAe}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=e.createParsingResult(t.index,t[0]),a=0,s=0,i=-1;if(t[mf]){let o=parseInt(za(t[mf]));if(isNaN(o)&&(o=Ep(t[mf])),o>=60)return null;n.start.assign("second",o)}if(a=parseInt(za(t[_x])),isNaN(a)&&(a=Ep(t[_x])),t[Ed]?t[Ed]==="\u534A"?s=30:(s=parseInt(za(t[Ed])),isNaN(s)&&(s=Ep(t[Ed]))):a>100&&(s=a%100,a=Math.floor(a/100)),s>=60||a>24)return null;if(a>=12&&(i=j.PM),t[Px]){if(a>12)return null;let o=t[Px],l=o[0].toLowerCase();o==="\u5348\u524D"||l==="a"?(i=j.AM,a===12&&(a=0)):(o==="\u5348\u5F8C"||l==="p")&&(i=j.PM,a!=12&&(a+=12))}else if(t[Mx]){if(a>12)return null;let o=t[Mx][0].toLowerCase();o==="a"&&(i=j.AM,a===12&&(a=0)),o==="p"&&(i=j.PM,a!=12&&(a+=12))}if(n.start.assign("hour",a),n.start.assign("minute",s),i>=0?n.start.assign("meridiem",i):a<12?n.start.imply("meridiem",0):n.start.imply("meridiem",1),t=CAe.exec(e.text.substring(n.index+n.text.length)),!t)return n.text.match(/^\d+$/)?null:n;if(n.end=e.createParsingComponents(),a=0,s=0,i=-1,t[mf]){let o=parseInt(za(t[mf]));if(isNaN(o)&&(o=Ep(t[mf])),o>=60)return null;n.end.assign("second",o)}if(a=parseInt(za(t[_x])),isNaN(a)&&(a=Ep(t[_x])),t[Ed]?t[Ed]==="\u534A"?s=30:(s=parseInt(za(t[Ed])),isNaN(s)&&(s=Ep(t[Ed]))):a>100&&(s=a%100,a=Math.floor(a/100)),s>=60||a>24)return null;if(a>=12&&(i=j.PM),t[Px]){if(a>12)return null;let o=t[Px],l=o[0].toLowerCase();o==="\u5348\u524D"||l==="a"?(i=j.AM,a===12&&(a=0)):(o==="\u5348\u5F8C"||l==="p")&&(i=j.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(i===j.AM?(n.start.imply("meridiem",j.AM),n.start.get("hour")===12&&n.start.assign("hour",0)):(n.start.imply("meridiem",1),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}else if(t[Mx]){if(a>12)return null;let o=t[Mx][0].toLowerCase();o==="a"&&(i=j.AM,a===12&&(a=0)),o==="p"&&(i=j.PM,a!=12&&(a+=12))}return n.text=n.text+t[0],n.end.assign("hour",a),n.end.assign("minute",s),i>=0?n.end.assign("meridiem",i):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?n.end.imply("meridiem",j.AM):a<=12&&(n.end.assign("hour",a+12),n.end.assign("meridiem",j.PM)):a>12?n.end.imply("meridiem",j.PM):a<=12&&n.end.imply("meridiem",j.AM),n.end.date().getTime(){Si();Tb=class extends Dr{patternBetween(){return/^\s*(の)?\s*$/i}}});var kb,XX=b(()=>{oc();kb=class extends is{mergeResults(e,t,n){let a=t.clone();return a.text=t.text+e+n.text,a.start.assign("weekday",n.start.get("weekday")),a.end&&a.end.assign("weekday",n.start.get("weekday")),a}shouldMergeResults(e,t,n){return t.start.isCertain("day")&&n.start.isOnlyWeekdayComponent()&&!n.start.isCertain("hour")&&e.match(/^[,、の]?\s*$/)!==null}}});var PAe,wb,eee=b(()=>{pf();co();PAe=new RegExp("(?:\\(|\\\uFF08)(?"+Object.keys(uf).join("|")+")(?:\\)|\\\uFF09)","i"),wb=class{pattern(){return PAe}extract(e,t){let n=t.groups.weekday,a=uf[n];return a===void 0?null:gn(e.reference,a)}}});var RN={};Ke(RN,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>IN,createCasualConfiguration:()=>tee,createConfiguration:()=>NN,parse:()=>MAe,parseDate:()=>AAe,strict:()=>_Ae});function MAe(r,e,t){return IN.parse(r,e,t)}function AAe(r,e,t){return IN.parseDate(r,e,t)}function tee(){let r=NN(!1);return r.parsers.unshift(new gb),r}function NN(r=!0){let e=Or({parsers:[new hb,new yb,new wb,new vb,new bb],refiners:[new kb,new Tb,new fb]},r);return e.refiners=e.refiners.filter(t=>!(t instanceof bp)),e}var IN,_Ae,ree=b(()=>{UX();VX();YX();GX();KX();QX();JX();os();et();Pt();XX();eee();Hs();oN();IN=new Me(tee()),_Ae=new Me(NN(!0))});function aee(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}var ON,FN,nee,Ax=b(()=>{ON={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-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\u00E1bado:6,sabado:6,sab:6},FN={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o: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},nee="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?"});var IAe,NAe,RAe,OAe,Sb,see=b(()=>{Ax();wt();fe();co();IAe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${se(ON)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),NAe=1,RAe=2,OAe=3,Sb=class extends B{innerPattern(){return IAe}innerExtract(e,t){let n=t[RAe].toLowerCase(),a=ON[n];if(a===void 0)return null;let s=t[NAe],i=t[OAe],o=s||i||"";o=o.toLowerCase();let l=null;return o=="passado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this"),gn(e.reference,a,l)}}});var Eb,iee=b(()=>{ic();Eb=class extends Ln{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}}});var xb,oee=b(()=>{Si();xb=class extends Dr{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}}});var Db,lee=b(()=>{wi();Db=class extends xr{patternBetween(){return/^\s*(?:-)\s*$/i}}});var FAe,cee,dee,LAe,uee,Cb,pee=b(()=>{Xr();Ax();Ax();wt();fe();FAe=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${se(FN)})(?:\\s*(?:de|,)?\\s*(${nee}))?(?=\\W|$)`,"i"),cee=1,dee=2,LAe=3,uee=4,Cb=class extends B{innerPattern(){return FAe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=FN[t[LAe].toLowerCase()],s=parseInt(t[cee]);if(s>31)return t.index=t.index+t[cee].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[uee]){let i=aee(t[uee]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[dee]){let i=parseInt(t[dee]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var Pb,mee=b(()=>{fe();Us();Pb=class extends B{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),a=e.createParsingComponents();switch(n){case"agora":return fa(e.reference);case"hoje":return $n(e.reference);case"amanha":case"amanh\xE3":return ya(e.reference);case"ontem":return ga(e.reference)}return a}}});var hee,_b,fee=b(()=>{Pt();fe();qs();hee=We(Lt(),1),_b=class extends B{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=(0,hee.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\xE3":a.imply("meridiem",j.AM),a.imply("hour",6);break;case"meia-noite":oo(a,n),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 jN={};Ke(jN,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>LN,createCasualConfiguration:()=>gee,createConfiguration:()=>$N,parse:()=>jAe,parseDate:()=>zAe,strict:()=>$Ae});function jAe(r,e,t){return LN.parse(r,e,t)}function zAe(r,e,t){return LN.parseDate(r,e,t)}function gee(r=!0){let e=$N(!1,r);return e.parsers.push(new Pb),e.parsers.push(new _b),e}function $N(r=!0,e=!0){return Or({parsers:[new Dn(e),new Sb,new Eb,new Cb],refiners:[new xb,new Db]},r)}var LN,$Ae,yee=b(()=>{Hs();os();et();Pt();cc();see();iee();oee();lee();pee();mee();fee();LN=new Me(gee()),$Ae=new Me($N(!0))});var Mb,vee=b(()=>{wi();Mb=class extends xr{patternBetween(){return/^\s*(tot|-)\s*$/i}}});var Ab,bee=b(()=>{Si();Ab=class extends Dr{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}}});var Ib,Tee=b(()=>{fe();Us();Ib=class extends B{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),a=e.createParsingComponents();switch(n){case"nu":return fa(e.reference);case"vandaag":return $n(e.reference);case"morgen":case"morgend":return ya(e.reference);case"gisteren":return ga(e.reference)}return a}}});var kee,BAe,qAe,Nb,wee=b(()=>{Pt();fe();kee=We(Lt(),1);qs();BAe=1,qAe=2,Nb=class extends B{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=(0,kee.default)(e.refDate),a=e.createParsingComponents();switch(t[BAe]==="deze"&&(a.assign("day",e.refDate.getDate()),a.assign("month",e.refDate.getMonth()+1),a.assign("year",e.refDate.getFullYear())),t[qAe].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":oo(a,n),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 UAe(r){let e=r.toLowerCase();return zN[e]!==void 0?zN[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}function UN(r){let e=r.toLowerCase();return BN[e]!==void 0?BN[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}function Nx(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return ss(e)}function xd(r){let e={},t=r,n=See.exec(t);for(;n;)VAe(e,n),t=t.substring(n[0].length),n=See.exec(t);return e}function VAe(r,e){let t=UAe(e[1]),n=Rb[e[2].toLowerCase()];r[n]=t}var qN,dc,zN,BN,Rb,HAe,HN,Ix,Eee,See,Qo,Ws=b(()=>{wt();Xr();qN={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},dc={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},zN={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12},BN={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\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31},Rb={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"},HAe=`(?:${se(zN)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;HN=`(?:${se(BN)}|[0-9]{1,2}(?:ste|de)?)`;Ix="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";Eee=`(${HAe})\\s{0,5}(${se(Rb)})\\s{0,5}`,See=new RegExp(Eee,"i"),Qo=ja("(?:(?:binnen|in)\\s*)?",Eee)});var Ob,xee=b(()=>{Ws();et();fe();Ob=class extends B{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Qo+")(?=\\W|$)","i")}innerExtract(e,t){let n=xd(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var WAe,YAe,GAe,ZAe,Fb,Dee=b(()=>{Ws();wt();fe();co();WAe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${se(qN)})(?=\\W|$)`,"i"),YAe=1,GAe=2,ZAe=3,Fb=class extends B{innerPattern(){return WAe}innerExtract(e,t){let n=t[GAe].toLowerCase(),a=qN[n],s=t[YAe],i=t[ZAe],o=s||i;o=o||"",o=o.toLowerCase();let l=null;return o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this"),gn(e.reference,a,l)}}});var KAe,QAe,Cee,Pee,_ee,Lb,Mee=b(()=>{Xr();Ws();Ws();Ws();wt();fe();KAe=new RegExp(`(?:on\\s*?)?(${HN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${HN}))?(?:-|/|\\s*(?:of)?\\s*)(`+se(dc)+`)(?:(?:-|/|,?\\s*)(${Ix}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),QAe=3,Cee=1,Pee=2,_ee=4,Lb=class extends B{innerPattern(){return KAe}innerExtract(e,t){let n=dc[t[QAe].toLowerCase()],a=UN(t[Cee]);if(a>31)return t.index=t.index+t[Cee].length,null;let s=e.createParsingComponents({day:a,month:n});if(t[_ee]){let l=Nx(t[_ee]);s.assign("year",l)}else{let l=Yt(e.refDate,a,n);s.imply("year",l)}if(!t[Pee])return s;let i=UN(t[Pee]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",i),o}}});var JAe,XAe,Aee,hf,Iee=b(()=>{Ws();Xr();wt();Ws();fe();JAe=new RegExp(`(${se(dc)})\\s*(?:[,-]?\\s*(${Ix})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),XAe=1,Aee=2,hf=class extends B{innerPattern(){return JAe}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let a=t[XAe],s=dc[a.toLowerCase()];if(n.assign("month",s),t[Aee]){let i=Nx(t[Aee]);n.assign("year",i)}else{let i=Yt(e.refDate,1,s);n.imply("year",i)}return n}}});var eIe,tIe,rIe,$b,Nee=b(()=>{fe();eIe=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),tIe=1,rIe=2,$b=class extends B{innerPattern(){return eIe}innerExtract(e,t){let n=parseInt(t[rIe]),a=parseInt(t[tIe]);return e.createParsingComponents().imply("day",1).assign("month",a).assign("year",n)}}});var jb,Ree=b(()=>{ic();jb=class extends Ln{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});var nIe,aIe,sIe,Oee,iIe,zb,Fee=b(()=>{Ws();wt();fe();nIe=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${se(dc)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),aIe=1,sIe=2,Oee=3,iIe=4,zb=class extends B{innerPattern(){return nIe}innerExtract(e,t){let n=t[Oee]?parseInt(t[Oee]):dc[t[sIe].toLowerCase()];if(n<1||n>12)return null;let a=parseInt(t[aIe]);return{day:parseInt(t[iIe]),month:n,year:a}}}});var Lee,oIe,lIe,Bb,$ee=b(()=>{fe();Pt();qs();Lee=We(Lt(),1),oIe=1,lIe=2,Bb=class extends B{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[oIe].toLowerCase(),a=t[lIe].toLowerCase(),s=e.createParsingComponents(),i=(0,Lee.default)(e.refDate);switch(n){case"gisteren":vr(s,i.add(-1,"day"));break;case"van":vr(s,i);break;case"morgen":oo(s,i);break}switch(a){case"ochtend":s.imply("meridiem",j.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",j.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",j.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",j.PM),s.imply("hour",20);break}return s}}});var cIe,dIe,uIe,qb,jee=b(()=>{Ws();et();fe();Vs();cIe=new RegExp(`(dit|deze|vorig|afgelopen|(?:aan)?komend|over|\\+|-)e?\\s*(${Qo})(?=\\W|$)`,"i"),dIe=1,uIe=2,qb=class extends B{innerPattern(){return cIe}innerExtract(e,t){let n=t[dIe].toLowerCase(),a=xd(t[uIe]);switch(n){case"vorig":case"afgelopen":case"-":a=fn(a);break}return J.createRelativeFromReference(e.reference,a)}}});var zee,pIe,mIe,hIe,Hb,Bee=b(()=>{Ws();et();zee=We(Lt(),1);fe();wt();pIe=new RegExp(`(dit|deze|(?:aan)?komend|volgend|afgelopen|vorig)e?\\s*(${se(Rb)})(?=\\s*)(?=\\W|$)`,"i"),mIe=1,hIe=2,Hb=class extends B{innerPattern(){return pIe}innerExtract(e,t){let n=t[mIe].toLowerCase(),a=t[hIe].toLowerCase(),s=Rb[a];if(n=="volgend"||n=="komend"||n=="aankomend"){let l={};return l[s]=1,J.createRelativeFromReference(e.reference,l)}if(n=="afgelopen"||n=="vorig"){let l={};return l[s]=-1,J.createRelativeFromReference(e.reference,l)}let i=e.createParsingComponents(),o=(0,zee.default)(e.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.imply("year",o.year())):a.match(/maand/i)?(o=o.add(-o.date()+1,"d"),i.imply("day",o.date()),i.assign("year",o.year()),i.assign("month",o.month()+1)):a.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.assign("year",o.year())),i}}});var fIe,gIe,Ub,qee=b(()=>{Ws();et();fe();Vs();fIe=new RegExp("("+Qo+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),gIe=new RegExp("("+Qo+")geleden(?=(?:\\W|$))","i"),Ub=class extends B{constructor(t){super();_(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?gIe:fIe}innerExtract(t,n){let a=xd(n[1]),s=fn(a);return J.createRelativeFromReference(t.reference,s)}}});var yIe,vIe,bIe,Vb,Hee=b(()=>{Ws();et();fe();yIe=new RegExp("("+Qo+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),vIe=new RegExp("("+Qo+")(later|vanaf nu)(?=(?:\\W|$))","i"),bIe=1,Vb=class extends B{constructor(t){super();_(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?vIe:yIe}innerExtract(t,n){let a=xd(n[bIe]);return J.createRelativeFromReference(t.reference,a)}}});var YN={};Ke(YN,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>VN,createCasualConfiguration:()=>Uee,createConfiguration:()=>WN,parse:()=>kIe,parseDate:()=>wIe,strict:()=>TIe});function kIe(r,e,t){return VN.parse(r,e,t)}function wIe(r,e,t){return VN.parseDate(r,e,t)}function Uee(r=!0){let e=WN(!1,r);return e.parsers.unshift(new Ib),e.parsers.unshift(new Nb),e.parsers.unshift(new Bb),e.parsers.unshift(new hf),e.parsers.unshift(new Hb),e.parsers.unshift(new qb),e}function WN(r=!0,e=!0){return Or({parsers:[new Dn(e),new Ob,new Lb,new hf,new Fb,new zb,new $b,new jb(r),new Ub(r),new Vb(r)],refiners:[new Ab,new Mb]},r)}var VN,TIe,Vee=b(()=>{Hs();os();et();Pt();vee();bee();Tee();wee();cc();xee();Dee();Mee();Iee();Nee();Ree();Fee();$ee();jee();Bee();qee();Hee();VN=new Me(Uee()),TIe=new Me(WN(!0))});function xi(r){let e=0;for(let t=0;t{jn={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10},ff={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6}});var Gee,GN,Yee,ZN,xp,KN=b(()=>{Gee=We(Lt(),1);fe();gf();GN=1,Yee=2,ZN=3,xp=class extends B{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(jn).join("")+"]{4}|["+Object.keys(jn).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(jn).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(jn).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=(0,Gee.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),s=parseInt(t[Yee]);if(isNaN(s)&&(s=xi(t[Yee])),a.start.assign("month",s),t[ZN]){let i=parseInt(t[ZN]);isNaN(i)&&(i=xi(t[ZN])),a.start.assign("day",i)}else a.start.imply("day",n.date());if(t[GN]){let i=parseInt(t[GN]);isNaN(i)&&(i=Wee(t[GN])),a.start.assign("year",i)}else a.start.imply("year",n.year());return a}}});var Zee,SIe,QN,EIe,Dp,JN=b(()=>{Zee=We(Lt(),1);fe();gf();SIe=new RegExp("(\\d+|["+Object.keys(jn).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),QN=1,EIe=2,Dp=class extends B{innerPattern(){return SIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=parseInt(t[QN]);if(isNaN(a)&&(a=xi(t[QN])),isNaN(a)){let l=t[QN];if(l==="\u51E0")a=3;else if(l==="\u534A")a=.5;else return null}let s=(0,Zee.default)(e.refDate),o=t[EIe][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(a,"d"):o=="\u661F"||o=="\u793C"?s=s.add(a*7,"d"):o=="\u6708"?s=s.add(a,"month"):o=="\u5E74"&&(s=s.add(a,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(a,"second"):o=="\u5206"?s=s.add(a,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(a,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}}});var Kee,xIe,Cp,XN=b(()=>{Kee=We(Lt(),1);fe();gf();xIe=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(ff).join("|")+")"),Cp=class extends B{innerPattern(){return xIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,s=ff[a];if(s===void 0)return null;let i=null,o=t.groups.prefix;o=="\u4E0A"?i="last":o=="\u4E0B"?i="next":o=="\u8FD9"&&(i="this");let l=(0,Kee.default)(e.refDate),c=!1,d=l.day();return i=="last"||i=="past"?(l=l.day(s-7),c=!0):i=="next"?(l=l.day(s+7),c=!0):i=="this"?l=l.day(s):Math.abs(s-7-d){Qee=We(Lt(),1);fe();gf();DIe=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jn).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jn).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jn).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),CIe=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jn).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jn).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jn).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Rx=1,Ox=2,Fx=3,Lx=4,$x=5,jx=6,Di=7,yf=8,zx=9,Pp=class extends B{innerPattern(){return DIe}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=(0,Qee.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Rx]){let d=t[Rx];d=="\u660E"?n.hour()>1&&(s=s.add(1,"day")):d=="\u6628"?s=s.add(-1,"day"):d=="\u524D"?s=s.add(-2,"day"):d=="\u5927\u524D"?s=s.add(-3,"day"):d=="\u540E"?s=s.add(2,"day"):d=="\u5927\u540E"&&(s=s.add(3,"day")),a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year())}else if(t[Lx]){let d=t[Lx];d=="\u660E"?s=s.add(1,"day"):d=="\u6628"?s=s.add(-1,"day"):d=="\u524D"?s=s.add(-2,"day"):d=="\u5927\u524D"?s=s.add(-3,"day"):d=="\u540E"?s=s.add(2,"day"):d=="\u5927\u540E"&&(s=s.add(3,"day")),a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year())}else a.start.imply("day",s.date()),a.start.imply("month",s.month()+1),a.start.imply("year",s.year());let i=0,o=0,l=-1;if(t[yf]){let d=parseInt(t[yf]);if(isNaN(d)&&(d=xi(t[yf])),d>=60)return null;a.start.assign("second",d)}if(i=parseInt(t[jx]),isNaN(i)&&(i=xi(t[jx])),t[Di]?t[Di]=="\u534A"?o=30:t[Di]=="\u6B63"||t[Di]=="\u6574"?o=0:(o=parseInt(t[Di]),isNaN(o)&&(o=xi(t[Di]))):i>100&&(o=i%100,i=Math.floor(i/100)),o>=60||i>24)return null;if(i>=12&&(l=1),t[zx]){if(i>12)return null;let d=t[zx][0].toLowerCase();d=="a"&&(l=0,i==12&&(i=0)),d=="p"&&(l=1,i!=12&&(i+=12))}else if(t[Ox]){let u=t[Ox][0];u=="\u65E9"?(l=0,i==12&&(i=0)):u=="\u665A"&&(l=1,i!=12&&(i+=12))}else if(t[Fx]){let u=t[Fx][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,i==12&&(i=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,i!=12&&(i+=12))}else if(t[$x]){let u=t[$x][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,i==12&&(i=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,i!=12&&(i+=12))}if(a.start.assign("hour",i),a.start.assign("minute",o),l>=0?a.start.assign("meridiem",l):i<12?a.start.imply("meridiem",0):a.start.imply("meridiem",1),t=CIe.exec(e.text.substring(a.index+a.text.length)),!t)return a.text.match(/^\d+$/)?null:a;let c=s.clone();if(a.end=e.createParsingComponents(),t[Rx]){let d=t[Rx];d=="\u660E"?n.hour()>1&&(c=c.add(1,"day")):d=="\u6628"?c=c.add(-1,"day"):d=="\u524D"?c=c.add(-2,"day"):d=="\u5927\u524D"?c=c.add(-3,"day"):d=="\u540E"?c=c.add(2,"day"):d=="\u5927\u540E"&&(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[Lx]){let d=t[Lx];d=="\u660E"?c=c.add(1,"day"):d=="\u6628"?c=c.add(-1,"day"):d=="\u524D"?c=c.add(-2,"day"):d=="\u5927\u524D"?c=c.add(-3,"day"):d=="\u540E"?c=c.add(2,"day"):d=="\u5927\u540E"&&(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(i=0,o=0,l=-1,t[yf]){let d=parseInt(t[yf]);if(isNaN(d)&&(d=xi(t[yf])),d>=60)return null;a.end.assign("second",d)}if(i=parseInt(t[jx]),isNaN(i)&&(i=xi(t[jx])),t[Di]?t[Di]=="\u534A"?o=30:t[Di]=="\u6B63"||t[Di]=="\u6574"?o=0:(o=parseInt(t[Di]),isNaN(o)&&(o=xi(t[Di]))):i>100&&(o=i%100,i=Math.floor(i/100)),o>=60||i>24)return null;if(i>=12&&(l=1),t[zx]){if(i>12)return null;let d=t[zx][0].toLowerCase();d=="a"&&(l=0,i==12&&(i=0)),d=="p"&&(l=1,i!=12&&(i+=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[Ox]){let u=t[Ox][0];u=="\u65E9"?(l=0,i==12&&(i=0)):u=="\u665A"&&(l=1,i!=12&&(i+=12))}else if(t[Fx]){let u=t[Fx][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,i==12&&(i=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,i!=12&&(i+=12))}else if(t[$x]){let u=t[$x][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,i==12&&(i=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,i!=12&&(i+=12))}return a.text=a.text+t[0],a.end.assign("hour",i),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")>i?a.end.imply("meridiem",0):i>12&&a.end.imply("meridiem",1),a.end.date().getTime(){Jee=We(Lt(),1);fe();gf();PIe=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(ff).join("|")+")"),_p=class extends B{innerPattern(){return PIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,s=ff[a];if(s===void 0)return null;let i=(0,Jee.default)(e.refDate),o=!1,l=i.day();return Math.abs(s-7-l){rte=We(Lt(),1);fe();_Ie=1,Xee=2,MIe=3,ete=4,tte=5,AIe=6,Mp=class extends B{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,a=e.createParsingResult(n,t[0]),s=(0,rte.default)(e.refDate),i=s;if(t[_Ie])a.start.imply("hour",s.hour()),a.start.imply("minute",s.minute()),a.start.imply("second",s.second()),a.start.imply("millisecond",s.millisecond());else if(t[Xee]){let o=t[Xee],l=t[MIe];o=="\u660E"||o=="\u807D"?s.hour()>1&&(i=i.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?i=i.add(-1,"day"):o=="\u524D"?i=i.add(-2,"day"):o=="\u5927\u524D"?i=i.add(-3,"day"):o=="\u5F8C"?i=i.add(2,"day"):o=="\u5927\u5F8C"&&(i=i.add(3,"day")),l=="\u65E9"||l=="\u671D"?a.start.imply("hour",6):l=="\u665A"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(t[ete]){let l=t[ete][0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?a.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):l=="\u4E2D"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):l=="\u51CC"&&a.start.imply("hour",0)}else if(t[tte]){let o=t[tte];o=="\u660E"||o=="\u807D"?s.hour()>1&&(i=i.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?i=i.add(-1,"day"):o=="\u524D"?i=i.add(-2,"day"):o=="\u5927\u524D"?i=i.add(-3,"day"):o=="\u5F8C"?i=i.add(2,"day"):o=="\u5927\u5F8C"&&(i=i.add(3,"day"));let l=t[AIe];if(l){let c=l[0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?a.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):c=="\u4E2D"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):c=="\u51CC"&&a.start.imply("hour",0)}}return a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year()),a}}});function Ci(r){let e=0;for(let t=0;t{zn={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30},vf={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6}});var ste,nR,ate,aR,Ap,sR=b(()=>{ste=We(Lt(),1);fe();bf();nR=1,ate=2,aR=3,Ap=class extends B{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zn).join("")+"]{4}|["+Object.keys(zn).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zn).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zn).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=(0,ste.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),s=parseInt(t[ate]);if(isNaN(s)&&(s=Ci(t[ate])),a.start.assign("month",s),t[aR]){let i=parseInt(t[aR]);isNaN(i)&&(i=Ci(t[aR])),a.start.assign("day",i)}else a.start.imply("day",n.date());if(t[nR]){let i=parseInt(t[nR]);isNaN(i)&&(i=nte(t[nR])),a.start.assign("year",i)}else a.start.imply("year",n.year());return a}}});var ite,IIe,iR,NIe,Ip,oR=b(()=>{ite=We(Lt(),1);fe();bf();IIe=new RegExp("(\\d+|["+Object.keys(zn).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),iR=1,NIe=2,Ip=class extends B{innerPattern(){return IIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=parseInt(t[iR]);if(isNaN(a)&&(a=Ci(t[iR])),isNaN(a)){let l=t[iR];if(l==="\u5E7E")a=3;else if(l==="\u534A")a=.5;else return null}let s=(0,ite.default)(e.refDate),o=t[NIe][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(a,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(a*7,"d"):o=="\u6708"?s=s.add(a,"month"):o=="\u5E74"&&(s=s.add(a,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(a,"second"):o=="\u5206"?s=s.add(a,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(a,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}}});var ote,RIe,Np,lR=b(()=>{ote=We(Lt(),1);fe();bf();RIe=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(vf).join("|")+")"),Np=class extends B{innerPattern(){return RIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,s=vf[a];if(s===void 0)return null;let i=null,o=t.groups.prefix;o=="\u4E0A"?i="last":o=="\u4E0B"?i="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(i="this");let l=(0,ote.default)(e.refDate),c=!1,d=l.day();return i=="last"||i=="past"?(l=l.day(s-7),c=!0):i=="next"?(l=l.day(s+7),c=!0):i=="this"?l=l.day(s):Math.abs(s-7-d){lte=We(Lt(),1);fe();bf();OIe=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zn).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zn).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zn).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),FIe=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zn).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zn).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zn).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Bx=1,qx=2,Hx=3,Ux=4,Vx=5,Wx=6,Pi=7,Tf=8,Yx=9,Rp=class extends B{innerPattern(){return OIe}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=(0,lte.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Bx]){var i=t[Bx];i=="\u660E"||i=="\u807D"?n.hour()>1&&(s=s.add(1,"day")):i=="\u6628"||i=="\u5C0B"||i=="\u7434"?s=s.add(-1,"day"):i=="\u524D"?s=s.add(-2,"day"):i=="\u5927\u524D"?s=s.add(-3,"day"):i=="\u5F8C"?s=s.add(2,"day"):i=="\u5927\u5F8C"&&(s=s.add(3,"day")),a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year())}else if(t[Ux]){var o=t[Ux];o=="\u660E"||o=="\u807D"?s=s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s=s.add(-1,"day"):o=="\u524D"?s=s.add(-2,"day"):o=="\u5927\u524D"?s=s.add(-3,"day"):o=="\u5F8C"?s=s.add(2,"day"):o=="\u5927\u5F8C"&&(s=s.add(3,"day")),a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year())}else a.start.imply("day",s.date()),a.start.imply("month",s.month()+1),a.start.imply("year",s.year());let l=0,c=0,d=-1;if(t[Tf]){var u=parseInt(t[Tf]);if(isNaN(u)&&(u=Ci(t[Tf])),u>=60)return null;a.start.assign("second",u)}if(l=parseInt(t[Wx]),isNaN(l)&&(l=Ci(t[Wx])),t[Pi]?t[Pi]=="\u534A"?c=30:t[Pi]=="\u6B63"||t[Pi]=="\u6574"?c=0:(c=parseInt(t[Pi]),isNaN(c)&&(c=Ci(t[Pi]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),t[Yx]){if(l>12)return null;var p=t[Yx][0].toLowerCase();p=="a"&&(d=0,l==12&&(l=0)),p=="p"&&(d=1,l!=12&&(l+=12))}else if(t[qx]){var m=t[qx],h=m[0];h=="\u671D"||h=="\u65E9"?(d=0,l==12&&(l=0)):h=="\u665A"&&(d=1,l!=12&&(l+=12))}else if(t[Hx]){var f=t[Hx],g=f[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(d=0,l==12&&(l=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(d=1,l!=12&&(l+=12))}else if(t[Vx]){var y=t[Vx],k=y[0];k=="\u4E0A"||k=="\u671D"||k=="\u65E9"||k=="\u51CC"?(d=0,l==12&&(l=0)):(k=="\u4E0B"||k=="\u664F"||k=="\u665A")&&(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=FIe.exec(e.text.substring(a.index+a.text.length)),!t)return a.text.match(/^\d+$/)?null:a;let T=s.clone();if(a.end=e.createParsingComponents(),t[Bx]){var i=t[Bx];i=="\u660E"||i=="\u807D"?n.hour()>1&&(T=T.add(1,"day")):i=="\u6628"||i=="\u5C0B"||i=="\u7434"?T=T.add(-1,"day"):i=="\u524D"?T=T.add(-2,"day"):i=="\u5927\u524D"?T=T.add(-3,"day"):i=="\u5F8C"?T=T.add(2,"day"):i=="\u5927\u5F8C"&&(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[Ux]){var o=t[Ux];o=="\u660E"||o=="\u807D"?T=T.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?T=T.add(-1,"day"):o=="\u524D"?T=T.add(-2,"day"):o=="\u5927\u524D"?T=T.add(-3,"day"):o=="\u5F8C"?T=T.add(2,"day"):o=="\u5927\u5F8C"&&(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[Tf]){var u=parseInt(t[Tf]);if(isNaN(u)&&(u=Ci(t[Tf])),u>=60)return null;a.end.assign("second",u)}if(l=parseInt(t[Wx]),isNaN(l)&&(l=Ci(t[Wx])),t[Pi]?t[Pi]=="\u534A"?c=30:t[Pi]=="\u6B63"||t[Pi]=="\u6574"?c=0:(c=parseInt(t[Pi]),isNaN(c)&&(c=Ci(t[Pi]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),t[Yx]){if(l>12)return null;var p=t[Yx][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[qx]){var m=t[qx],h=m[0];h=="\u671D"||h=="\u65E9"?(d=0,l==12&&(l=0)):h=="\u665A"&&(d=1,l!=12&&(l+=12))}else if(t[Hx]){var f=t[Hx],g=f[0];g=="\u4E0A"||g=="\u671D"||g=="\u65E9"||g=="\u51CC"?(d=0,l==12&&(l=0)):(g=="\u4E0B"||g=="\u664F"||g=="\u665A")&&(d=1,l!=12&&(l+=12))}else if(t[Vx]){var y=t[Vx],k=y[0];k=="\u4E0A"||k=="\u671D"||k=="\u65E9"||k=="\u51CC"?(d=0,l==12&&(l=0)):(k=="\u4E0B"||k=="\u664F"||k=="\u665A")&&(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(){cte=We(Lt(),1);fe();bf();LIe=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(vf).join("|")+")"),Op=class extends B{innerPattern(){return LIe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,s=vf[a];if(s===void 0)return null;let i=(0,cte.default)(e.refDate),o=!1,l=i.day();return Math.abs(s-7-l){wi();Fp=class extends xr{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}}});var Lp,pR=b(()=>{Si();Lp=class extends Dr{patternBetween(){return/^\s*$/i}}});var Gx={};Ke(Gx,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>mR,createCasualConfiguration:()=>hR,createConfiguration:()=>fR,hant:()=>$Ie,parse:()=>zIe,parseDate:()=>BIe,strict:()=>jIe});function zIe(r,e,t){return mR.parse(r,e,t)}function BIe(r,e,t){return mR.parseDate(r,e,t)}function hR(){let r=fR();return r.parsers.unshift(new Mp),r}function fR(){let r=Or({parsers:[new Ap,new Np,new Op,new Rp,new Ip],refiners:[new Fp,new Lp]});return r.refiners=r.refiners.filter(e=>!(e instanceof lo)),r}var $Ie,mR,jIe,dte=b(()=>{Iv();Hs();os();et();Pt();rR();sR();oR();lR();cR();dR();uR();pR();$Ie=new Me(hR()),mR=new Me(hR()),jIe=new Me(fR())});var hte,qIe,ute,HIe,pte,mte,UIe,Wb,fte=b(()=>{hte=We(Lt(),1);fe();qIe=1,ute=2,HIe=3,pte=4,mte=5,UIe=6,Wb=class extends B{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,a=e.createParsingResult(n,t[0]),s=(0,hte.default)(e.refDate),i=s;if(t[qIe])a.start.imply("hour",s.hour()),a.start.imply("minute",s.minute()),a.start.imply("second",s.second()),a.start.imply("millisecond",s.millisecond());else if(t[ute]){let o=t[ute],l=t[HIe];o=="\u660E"?s.hour()>1&&(i=i.add(1,"day")):o=="\u6628"?i=i.add(-1,"day"):o=="\u524D"?i=i.add(-2,"day"):o=="\u5927\u524D"?i=i.add(-3,"day"):o=="\u540E"?i=i.add(2,"day"):o=="\u5927\u540E"&&(i=i.add(3,"day")),l=="\u65E9"?a.start.imply("hour",6):l=="\u665A"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(t[pte]){let l=t[pte][0];l=="\u65E9"||l=="\u4E0A"?a.start.imply("hour",6):l=="\u4E0B"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):l=="\u4E2D"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):l=="\u51CC"&&a.start.imply("hour",0)}else if(t[mte]){let o=t[mte];o=="\u660E"?s.hour()>1&&(i=i.add(1,"day")):o=="\u6628"?i=i.add(-1,"day"):o=="\u524D"?i=i.add(-2,"day"):o=="\u5927\u524D"?i=i.add(-3,"day"):o=="\u540E"?i=i.add(2,"day"):o=="\u5927\u540E"&&(i=i.add(3,"day"));let l=t[UIe];if(l){let c=l[0];c=="\u65E9"||c=="\u4E0A"?a.start.imply("hour",6):c=="\u4E0B"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):c=="\u4E2D"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):c=="\u51CC"&&a.start.imply("hour",0)}}return a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year()),a}}});var Yb,gte=b(()=>{wi();Yb=class extends xr{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}}});var Gb,yte=b(()=>{Si();Gb=class extends Dr{patternBetween(){return/^\s*$/i}}});var Zx={};Ke(Zx,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>gR,createCasualConfiguration:()=>yR,createConfiguration:()=>vR,hans:()=>VIe,parse:()=>YIe,parseDate:()=>GIe,strict:()=>WIe});function YIe(r,e,t){return gR.parse(r,e,t)}function GIe(r,e,t){return gR.parseDate(r,e,t)}function yR(){let r=vR();return r.parsers.unshift(new Wb),r}function vR(){let r=Or({parsers:[new xp,new Cp,new _p,new Pp,new Dp],refiners:[new Yb,new Gb]});return r.refiners=r.refiners.filter(e=>!(e instanceof lo)),r}var VIe,gR,WIe,vte=b(()=>{Iv();Hs();os();et();Pt();fte();KN();JN();XN();eR();tR();gte();yte();VIe=new Me(yR()),gR=new Me(yR()),WIe=new Me(vR())});var kR={};Ke(kR,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>bR,createCasualConfiguration:()=>bte,createConfiguration:()=>TR,hans:()=>Zx,hant:()=>Gx,parse:()=>KIe,parseDate:()=>QIe,strict:()=>ZIe});function KIe(r,e,t){return bR.parse(r,e,t)}function QIe(r,e,t){return bR.parseDate(r,e,t)}function bte(){let r=TR();return r.parsers.unshift(new Mp),r}function TR(){let r=Or({parsers:[new Ap,new xp,new Np,new Cp,new Op,new _p,new Rp,new Pp,new Ip,new Dp],refiners:[new Fp,new Lp]});return r.refiners=r.refiners.filter(e=>!(e instanceof lo)),r}var bR,ZIe,Tte=b(()=>{Hs();os();et();Pt();Iv();KN();JN();XN();eR();tR();rR();sR();oR();lR();cR();dR();uR();pR();dte();vte();bR=new Me(bte()),ZIe=new Me(TR())});function XIe(r){let e=r.toLowerCase();return SR[e]!==void 0?SR[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}function PR(r){let e=r.toLowerCase();return ER[e]!==void 0?ER[e]:parseInt(e)}function Qx(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return ss(e)}function Sf(r){let e={},t=r,n=kte.exec(t);for(;n;)eNe(e,n),t=t.substring(n[0].length).trim(),n=kte.exec(t);return e}function eNe(r,e){let t=XIe(e[1]),n=Zb[e[2].toLowerCase()];r[n]=t}var Ys,xR,DR,kf,SR,ER,Zb,JIe,CR,wR,Kx,wte,kte,wf,Gs=b(()=>{wt();Xr();Ys={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},xR={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6},DR={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u0430\u043B\u044C:2,\u0444\u0435\u0432\u0440\u0430\u043B\u044F:2,\u0444\u0435\u0432\u0440\u0430\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12},kf={...DR,\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12},SR={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12},ER={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31},Zb={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u0447\u0435\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u0447\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u0447\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"},JIe=`(?:${se(SR)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;CR=`(?:${se(ER)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;wR="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?",Kx=`(?:[1-9][0-9]{0,3}${wR}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${wR}|[5-9][0-9]${wR})`;wte=`(${JIe})\\s{0,3}(${se(Zb)})`,kte=new RegExp(wte,"i"),wf=ja("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",wte)});var Ste,Kb,Ete=b(()=>{Gs();et();fe();Ste=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${wf})${Ys.rightBoundary}`,Kb=class extends B{patternLeftBoundary(){return Ys.leftBoundary}innerPattern(e){return e.option.forwardDate?new RegExp(Ste,Ys.flags):new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Ste}`,Ys.flags)}innerExtract(e,t){let n=Sf(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var $p,ls,uc=b(()=>{fe();Gs();$p=class extends B{patternLeftBoundary(){return Ys.leftBoundary}innerPattern(e){return new RegExp(this.innerPatternString(e),Ys.flags)}innerPatternHasChange(e,t){return!1}},ls=class extends $p{innerPattern(e){return new RegExp(`${this.innerPatternString(e)}${Ys.rightBoundary}`,Ys.flags)}}});var xte,Dte,tNe,Cte,Qb,Pte=b(()=>{Xr();Gs();Gs();Gs();wt();uc();xte=1,Dte=2,tNe=3,Cte=4,Qb=class extends ls{innerPatternString(e){return`(?:\u0441)?\\s*(${CR})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${CR}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${se(kf)})(?:(?:-|\\/|,?\\s{0,3})(${Kx}(?![^\\s]\\d)))?`}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=kf[t[tNe].toLowerCase()],s=PR(t[xte]);if(s>31)return t.index=t.index+t[xte].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[Cte]){let i=Qx(t[Cte]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[Dte]){let i=PR(t[Dte]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var rNe,_te,Jb,Mte=b(()=>{Gs();Xr();wt();Gs();uc();rNe=2,_te=3,Jb=class extends $p{innerPatternString(e){return`((?:\u0432)\\s*)?(${se(kf)})\\s*(?:[,-]?\\s*(${Kx})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(e,t){let n=t[rNe].toLowerCase();if(t[0].length<=3&&!DR[n])return null;let a=e.createParsingResult(t.index,t.index+t[0].length);a.start.imply("day",1);let s=kf[n];if(a.start.assign("month",s),t[_te]){let i=Qx(t[_te]);a.start.assign("year",i)}else{let i=Yt(e.refDate,1,s);a.start.imply("year",i)}return a}}});var Xb,Ate=b(()=>{Pt();ic();Gs();Xb=class extends Ln{constructor(e){super(e)}patternFlags(){return Ys.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Ys.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let a=n.get("hour");a>=6&&a<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",j.PM)):a<6&&n.assign("meridiem",j.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",j.PM);let a=n.get("hour");a>=0&&a<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",j.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}}});var eT,Ite=b(()=>{Gs();et();Vs();uc();eT=class extends $p{innerPatternString(e){return`(${wf})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`}innerExtract(e,t){let n=Sf(t[1]),a=fn(n);return J.createRelativeFromReference(e.reference,a)}}});var tT,Nte=b(()=>{wi();tT=class extends xr{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}}});var rT,Rte=b(()=>{Si();rT=class extends Dr{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}}});var nT,Ote=b(()=>{Us();uc();nT=class extends ls{innerPatternString(e){return"(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)"}innerExtract(e,t){let n=t[1].toLowerCase(),a=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return $n(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ga(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ya(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Zo(e.reference,2);case"\u043F\u043E\u0441\u043B\u0435\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Zo(e.reference,3);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Tp(e.reference,2);case"\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Tp(e.reference,3)}return a}}});var Fte,aT,Lte=b(()=>{Us();qs();Fte=We(Lt(),1);uc();aT=class extends ls{innerPatternString(e){return"(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)"}innerExtract(e,t){let n=(0,Fte.default)(e.refDate),a=t[0].toLowerCase(),s=e.createParsingComponents();if(a==="\u0441\u0435\u0439\u0447\u0430\u0441")return fa(e.reference);if(a==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||a==="\u0432\u0435\u0447\u0435\u0440\u0430")return of(e.reference);if(a.endsWith("\u0443\u0442\u0440\u043E\u043C")||a.endsWith("\u0443\u0442\u0440\u0430"))return lf(e.reference);if(a.match(/в\s*полдень/))return cf(e.reference);if(a.match(/прошлой\s*ночью/))return kx(e.reference);if(a.match(/прошлым\s*вечером/))return wx(e.reference);if(a.match(/следующей\s*ночью/)){let i=n.hour()<22?1:2;n=n.add(i,"day"),vr(s,n),s.imply("hour",0)}return a.match(/в\s*полночь/)||a.endsWith("\u043D\u043E\u0447\u044C\u044E")?kp(e.reference):s}}});var nNe,aNe,sNe,sT,$te=b(()=>{Gs();wt();co();uc();nNe=1,aNe=2,sNe=3,sT=class extends ls{innerPatternString(e){return`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${se(xR)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?`}innerExtract(e,t){let n=t[aNe].toLowerCase(),a=xR[n],s=t[nNe],i=t[sNe],o=s||i;o=o||"",o=o.toLowerCase();let l=null;return o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?l="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?l="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(l="this"),gn(e.reference,a,l)}}});var jte,iNe,oNe,iT,zte=b(()=>{Gs();et();jte=We(Lt(),1);wt();uc();iNe=1,oNe=2,iT=class extends ls{innerPatternString(e){return`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${se(Zb)})`}innerExtract(e,t){let n=t[iNe].toLowerCase(),a=t[oNe].toLowerCase(),s=Zb[a];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let l={};return l[s]=1,J.createRelativeFromReference(e.reference,l)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let l={};return l[s]=-1,J.createRelativeFromReference(e.reference,l)}let i=e.createParsingComponents(),o=(0,jte.default)(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),i.imply("day",o.date()),i.assign("year",o.year()),i.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.assign("year",o.year())),i}}});var oT,Bte=b(()=>{Gs();et();Vs();uc();oT=class extends ls{innerPatternString(e){return`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0441\u043F\u0443\u0441\u0442\u044F|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${wf})`}innerExtract(e,t){let n=t[1].toLowerCase(),a=Sf(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":a=fn(a);break}return J.createRelativeFromReference(e.reference,a)}}});var AR={};Ke(AR,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>_R,createCasualConfiguration:()=>qte,createConfiguration:()=>MR,parse:()=>cNe,parseDate:()=>dNe,strict:()=>lNe});function cNe(r,e,t){return _R.parse(r,e,t)}function dNe(r,e,t){return _R.parseDate(r,e,t)}function qte(){let r=MR(!1);return r.parsers.unshift(new nT),r.parsers.unshift(new aT),r.parsers.unshift(new Jb),r.parsers.unshift(new iT),r.parsers.unshift(new oT),r}function MR(r=!0){return Or({parsers:[new Dn(!0),new Kb,new Qb,new sT,new Xb(r),new eT],refiners:[new rT,new tT]},r)}var _R,lNe,Hte=b(()=>{Ete();Pte();Mte();Ate();Ite();Nte();Rte();Hs();Ote();Lte();$te();zte();os();et();Pt();cc();Bte();_R=new Me(qte()),lNe=new Me(MR(!0))});function pNe(r){let e=r.toLowerCase();return IR[e]!==void 0?IR[e]:e==="un"||e==="una"||e==="uno"?1:e.match(/algunos?/)||e.match(/unos?/)?3:e.match(/media?/)?.5:parseFloat(e)}function Yte(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}function Kte(r){let e={},t=r,n=Ute.exec(t);for(;n;)mNe(e,n),t=t.substring(n[0].length),n=Ute.exec(t);return e}function mNe(r,e){let t=pNe(e[1]),n=Vte[e[2].toLowerCase()];r[n]=t}var NR,RR,IR,Vte,uNe,Wte,Gte,Ute,Zte,lT=b(()=>{wt();NR={domingo:0,dom:0,lunes:1,lun:1,martes:2,mar:2,mi\u00E9rcoles:3,miercoles:3,mi\u00E9:3,mie:3,jueves:4,jue:4,viernes:5,vie:5,s\u00E1bado:6,sabado:6,s\u00E1b:6,sab:6},RR={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},IR={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},Vte={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\u00EDa:"d",d\u00EDas:"d",semana:"week",semanas:"week",mes:"month",meses:"month",cuarto:"quarter",cuartos:"quarter",a\u00F1o:"year",a\u00F1os:"year"},uNe=`(?:${se(IR)}|[0-9]+|[0-9]+\\.[0-9]+|un?|uno?|una?|algunos?|unos?|demi-?)`;Wte="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";Gte=`(${uNe})\\s{0,5}(${se(Vte)})\\s{0,5}`,Ute=new RegExp(Gte,"i"),Zte=ja("",Gte)});var hNe,fNe,gNe,yNe,cT,Qte=b(()=>{lT();wt();fe();co();hNe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|pasado|pr[o\xF3]ximo)\\s*)?(${se(NR)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|pasado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),fNe=1,gNe=2,yNe=3,cT=class extends B{innerPattern(){return hNe}innerExtract(e,t){let n=t[gNe].toLowerCase(),a=NR[n];if(a===void 0)return null;let s=t[fNe],i=t[yNe],o=s||i||"";o=o.toLowerCase();let l=null;return o=="pasado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this"),gn(e.reference,a,l)}}});var dT,Jte=b(()=>{ic();dT=class extends Ln{primaryPrefix(){return"(?:(?:aslas|deslas|las?|al?|de|del)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:l)?|\\?)\\s*"}}});var uT,Xte=b(()=>{Si();uT=class extends Dr{patternBetween(){return new RegExp("^\\s*(?:,|de|aslas|a)?\\s*$")}}});var pT,ere=b(()=>{wi();pT=class extends xr{patternBetween(){return/^\s*(?:-)\s*$/i}}});var vNe,tre,rre,bNe,nre,mT,are=b(()=>{Xr();lT();lT();wt();fe();vNe=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${se(RR)})(?:\\s*(?:de|,)?\\s*(${Wte}))?(?=\\W|$)`,"i"),tre=1,rre=2,bNe=3,nre=4,mT=class extends B{innerPattern(){return vNe}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=RR[t[bNe].toLowerCase()],s=parseInt(t[tre]);if(s>31)return t.index=t.index+t[tre].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[nre]){let i=Yte(t[nre]);n.start.assign("year",i)}else{let i=Yt(e.refDate,s,a);n.start.imply("year",i)}if(t[rre]){let i=parseInt(t[rre]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var hT,sre=b(()=>{fe();Us();hT=class extends B{innerPattern(e){return/(ahora|hoy|mañana|ayer)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),a=e.createParsingComponents();switch(n){case"ahora":return fa(e.reference);case"hoy":return $n(e.reference);case"ma\xF1ana":return ya(e.reference);case"ayer":return ga(e.reference)}return a}}});var ire,fT,ore=b(()=>{Pt();fe();qs();ire=We(Lt(),1),fT=class extends B{innerPattern(){return/(?:esta\s*)?(mañana|tarde|medianoche|mediodia|mediodía|noche)(?=\W|$)/i}innerExtract(e,t){let n=(0,ire.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\xF1ana":a.imply("meridiem",j.AM),a.imply("hour",6);break;case"medianoche":oo(a,n),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"mediodia":case"mediod\xEDa":a.imply("meridiem",j.AM),a.imply("hour",12);break}return a}}});var gT,lre=b(()=>{lT();et();fe();gT=class extends B{innerPattern(){return new RegExp(`(?:en|por|durante|de|dentro de)\\s*(${Zte})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Kte(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var LR={};Ke(LR,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>OR,createCasualConfiguration:()=>cre,createConfiguration:()=>FR,parse:()=>kNe,parseDate:()=>wNe,strict:()=>TNe});function kNe(r,e,t){return OR.parse(r,e,t)}function wNe(r,e,t){return OR.parseDate(r,e,t)}function cre(r=!0){let e=FR(!1,r);return e.parsers.push(new hT),e.parsers.push(new fT),e}function FR(r=!0,e=!0){return Or({parsers:[new Dn(e),new cT,new dT,new mT,new gT],refiners:[new uT,new pT]},r)}var OR,TNe,dre=b(()=>{Hs();os();et();Pt();cc();Qte();Jte();Xte();ere();are();sre();ore();lre();OR=new Me(cre()),TNe=new Me(FR(!0))});function ENe(r){let e=r.toLowerCase();return jR[e]!==void 0?jR[e]:e.match(/декілька/)?2:e.match(/пів/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}function UR(r){let e=r.toLowerCase();return zR[e]!==void 0?zR[e]:parseInt(e)}function Xx(r){if(/(рік|року|р|р.)/i.test(r)&&(r=r.replace(/(рік|року|р|р.)/i,"")),/(до н.е.|до н. е.)/i.test(r))return r=r.replace(/(до н.е.|до н. е.)/i,""),-parseInt(r);if(/(н. е.|н.е.)/i.test(r))return r=r.replace(/(н. е.|н.е.)/i,""),parseInt(r);let e=parseInt(r);return ss(e)}function Df(r){let e={},t=r,n=ure.exec(t);for(;n;)xNe(e,n),t=t.substring(n[0].length).trim(),n=ure.exec(t);return e}function xNe(r,e){let t=ENe(e[1]),n=yT[e[2].toLowerCase()];r[n]=t}var _i,BR,qR,Ef,jR,zR,yT,SNe,HR,$R,Jx,pre,ure,xf,Zs=b(()=>{wt();Xr();_i={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},BR={\u043D\u0435\u0434\u0456\u043B\u044F:0,\u043D\u0435\u0434\u0456\u043B\u0456:0,\u043D\u0435\u0434\u0456\u043B\u044E:0,\u043D\u0434:0,"\u043D\u0434.":0,\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A:2,\u0432\u0456\u0432\u0442\u043E\u0440\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0435\u0440\u0435\u0434\u0430:3,\u0441\u0435\u0440\u0435\u0434\u0438:3,\u0441\u0435\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0443:4,\u0447\u0442:4,"\u0447\u0442.":4,"\u043F'\u044F\u0442\u043D\u0438\u0446\u044F":5,"\u043F'\u044F\u0442\u043D\u0438\u0446\u0456":5,"\u043F'\u044F\u0442\u043D\u0438\u0446\u044E":5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u043E\u0442\u0438:6,\u0441\u0443\u0431\u043E\u0442\u0443:6,\u0441\u0431:6,"\u0441\u0431.":6},qR={\u0441\u0456\u0447\u0435\u043D\u044C:1,\u0441\u0456\u0447\u043D\u044F:1,\u0441\u0456\u0447\u043D\u0456:1,\u043B\u044E\u0442\u0438\u0439:2,\u043B\u044E\u0442\u043E\u0433\u043E:2,\u043B\u044E\u0442\u043E\u043C\u0443:2,\u0431\u0435\u0440\u0435\u0437\u0435\u043D\u044C:3,\u0431\u0435\u0440\u0435\u0437\u043D\u044F:3,\u0431\u0435\u0440\u0435\u0437\u043D\u0456:3,\u043A\u0432\u0456\u0442\u0435\u043D\u044C:4,\u043A\u0432\u0456\u0442\u043D\u044F:4,\u043A\u0432\u0456\u0442\u043D\u0456:4,\u0442\u0440\u0430\u0432\u0435\u043D\u044C:5,\u0442\u0440\u0430\u0432\u043D\u044F:5,\u0442\u0440\u0430\u0432\u043D\u0456:5,\u0447\u0435\u0440\u0432\u0435\u043D\u044C:6,\u0447\u0435\u0440\u0432\u043D\u044F:6,\u0447\u0435\u0440\u0432\u043D\u0456:6,\u043B\u0438\u043F\u0435\u043D\u044C:7,\u043B\u0438\u043F\u043D\u044F:7,\u043B\u0438\u043F\u043D\u0456:7,\u0441\u0435\u0440\u043F\u0435\u043D\u044C:8,\u0441\u0435\u0440\u043F\u043D\u044F:8,\u0441\u0435\u0440\u043F\u043D\u0456:8,\u0432\u0435\u0440\u0435\u0441\u0435\u043D\u044C:9,\u0432\u0435\u0440\u0435\u0441\u043D\u044F:9,\u0432\u0435\u0440\u0435\u0441\u043D\u0456:9,\u0436\u043E\u0432\u0442\u0435\u043D\u044C:10,\u0436\u043E\u0432\u0442\u043D\u044F:10,\u0436\u043E\u0432\u0442\u043D\u0456:10,\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434:11,\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0430:11,\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0443:11,\u0433\u0440\u0443\u0434\u0435\u043D\u044C:12,\u0433\u0440\u0443\u0434\u043D\u044F:12,\u0433\u0440\u0443\u0434\u043D\u0456:12},Ef={...qR,\u0441\u0456\u0447:1,"\u0441\u0456\u0447.":1,\u043B\u044E\u0442:2,"\u043B\u044E\u0442.":2,\u0431\u0435\u0440:3,"\u0431\u0435\u0440.":3,\u043A\u0432\u0456\u0442:4,"\u043A\u0432\u0456\u0442.":4,\u0442\u0440\u0430\u0432:5,"\u0442\u0440\u0430\u0432.":5,\u0447\u0435\u0440\u0432:6,"\u0447\u0435\u0440\u0432.":6,\u043B\u0438\u043F:7,"\u043B\u0438\u043F.":7,\u0441\u0435\u0440\u043F:8,"\u0441\u0435\u0440\u043F.":8,\u0441\u0435\u0440:8,"c\u0435\u0440.":8,\u0432\u0435\u0440:9,"\u0432\u0435\u0440.":9,\u0432\u0435\u0440\u0435\u0441:9,"\u0432\u0435\u0440\u0435\u0441.":9,\u0436\u043E\u0432\u0442:10,"\u0436\u043E\u0432\u0442.":10,\u043B\u0438\u0441\u0442\u043E\u043F:11,"\u043B\u0438\u0441\u0442\u043E\u043F.":11,\u0433\u0440\u0443\u0434:12,"\u0433\u0440\u0443\u0434.":12},jR={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0457:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0456:2,\u0434\u0432\u0430:2,\u0434\u0432\u043E\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u044C\u043E\u0445:3,\u0447\u043E\u0442\u0438\u0440\u0438:4,\u0447\u043E\u0442\u0438\u0440\u044C\u043E\u0445:4,"\u043F'\u044F\u0442\u044C":5,"\u043F'\u044F\u0442\u0438":5,\u0448\u0456\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0456\u043C:7,\u0441\u0435\u043C\u0438:7,\u0432\u0456\u0441\u0456\u043C:8,\u0432\u043E\u0441\u044C\u043C\u0438:8,"\u0434\u0435\u0432'\u044F\u0442\u044C":9,"\u0434\u0435\u0432'\u044F\u0442\u0438":9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u044C:11,\u043E\u0434\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u0438:11,\u0434\u0432\u0430\u043D\u0430\u0434\u0446\u044F\u0442\u044C:12,\u0434\u0432\u0430\u043D\u0430\u0434\u0446\u044F\u0442\u0438:12},zR={\u043F\u0435\u0440\u0448\u0435:1,\u043F\u0435\u0440\u0448\u043E\u0433\u043E:1,\u0434\u0440\u0443\u0433\u0435:2,\u0434\u0440\u0443\u0433\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u0454:3,\u0442\u0440\u0435\u0442\u044C\u043E\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,"\u043F'\u044F\u0442\u0435":5,"\u043F'\u044F\u0442\u043E\u0433\u043E":5,\u0448\u043E\u0441\u0442\u0435:6,\u0448\u043E\u0441\u0442\u043E\u0433\u043E:6,\u0441\u044C\u043E\u043C\u0435:7,\u0441\u044C\u043E\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,"\u0434\u0435\u0432'\u044F\u0442\u0435":9,"\u0434\u0435\u0432'\u044F\u0442\u043E\u0433\u043E":9,\u0434\u0435\u0441\u044F\u0442\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u0435:11,\u043E\u0434\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0430\u043D\u0430\u0434\u0446\u044F\u0442\u0435:12,\u0434\u0432\u0430\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:13,\u0447\u043E\u0442\u0438\u0440\u043D\u0430\u0434\u0446\u044F\u0442\u0435:14,\u0447\u043E\u0442\u0438\u043D\u0440\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:14,"\u043F'\u044F\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u0435":15,"\u043F'\u044F\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E":15,\u0448\u0456\u0441\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u0435:16,\u0448\u0456\u0441\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:16,\u0441\u0456\u043C\u043D\u0430\u0434\u0446\u044F\u0442\u0435:17,\u0441\u0456\u043C\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:17,\u0432\u0456\u0441\u0456\u043C\u043D\u0430\u0434\u0446\u044F\u0442\u0435:18,\u0432\u0456\u0441\u0456\u043C\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:18,"\u0434\u0435\u0432'\u044F\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u0435":19,"\u0434\u0435\u0432'\u044F\u0442\u043D\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E":19,\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u0435:20,\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u043F\u0435\u0440\u0448\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u043F\u0435\u0440\u0448\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0434\u0440\u0443\u0433\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0434\u0440\u0443\u0433\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0442\u0440\u0435\u0442\u0454":23,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u043E\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u043F'\u044F\u0442\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u043F'\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0448\u043E\u0441\u0442\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0448\u043E\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0441\u044C\u043E\u043C\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0441\u044C\u043E\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0434\u0435\u0432'\u044F\u0442\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u044F\u0442\u044C \u0434\u0435\u0432'\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u044F\u0442\u0435:30,\u0442\u0440\u0438\u0434\u0446\u044F\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u044F\u0442\u044C \u043F\u0435\u0440\u0448\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u044F\u0442\u044C \u043F\u0435\u0440\u0448\u043E\u0433\u043E":31},yT={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043E\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u0445\u0432:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u0430:"minute",\u0445\u0432\u0438\u043B\u0438\u043D:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u0438:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u0443:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043E\u043A:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043A\u0438:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043A\u0443:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043E\u0447\u043E\u043A:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043E\u0447\u043A\u0438:"minute",\u0445\u0432\u0438\u043B\u0438\u043D\u043E\u0447\u043A\u0443:"minute",\u0433\u043E\u0434:"hour",\u0433\u043E\u0434\u0438\u043D\u0430:"hour",\u0433\u043E\u0434\u0438\u043D:"hour",\u0433\u043E\u0434\u0438\u043D\u0438:"hour",\u0433\u043E\u0434\u0438\u043D\u0443:"hour",\u0433\u043E\u0434\u0438\u043D\u043A\u0430:"hour",\u0433\u043E\u0434\u0438\u043D\u043E\u043A:"hour",\u0433\u043E\u0434\u0438\u043D\u043A\u0438:"hour",\u0433\u043E\u0434\u0438\u043D\u043A\u0443:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0456\u0432:"d",\u0434\u043D\u0456:"d",\u0434\u043E\u0431\u0430:"d",\u0434\u043E\u0431\u0443:"d",\u0442\u0438\u0436\u0434\u0435\u043D\u044C:"week",\u0442\u0438\u0436\u043D\u044E:"week",\u0442\u0438\u0436\u043D\u044F:"week",\u0442\u0438\u0436\u043D\u0456:"week",\u0442\u0438\u0436\u043D\u0456\u0432:"week",\u043C\u0456\u0441\u044F\u0446\u044C:"month",\u043C\u0456\u0441\u044F\u0446\u0456\u0432:"month",\u043C\u0456\u0441\u044F\u0446\u0456:"month",\u043C\u0456\u0441\u044F\u0446\u044F:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0443:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0430:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0456\u0432:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0456:"quarter",\u0440\u0456\u043A:"year",\u0440\u043E\u043A\u0443:"year",\u0440\u043E\u0446\u0456:"year",\u0440\u043E\u043A\u0456\u0432:"year",\u0440\u043E\u043A\u0438:"year"},SNe=`(?:${se(jR)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u0456\u0432|\u0434\u0435\u043A\u0456\u043B\u044C\u043A\u0430|\u043F\u0430\u0440(?:\u0443)|\\s{0,3})`;HR=`(?:${se(zR)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435)?)`;$R="(?:\\s+(?:\u0440\u043E\u043A\u0443|\u0440\u0456\u043A|\u0440|\u0440.))?",Jx=`(?:[1-9][0-9]{0,3}${$R}\\s*(?:\u043D.\u0435.|\u0434\u043E \u043D.\u0435.|\u043D. \u0435.|\u0434\u043E \u043D. \u0435.)|[1-2][0-9]{3}${$R}|[5-9][0-9]${$R})`;pre=`(${SNe})\\s{0,3}(${se(yT)})`,ure=new RegExp(pre,"i"),xf=ja("(?:(?:\u0431\u043B\u0438\u0437\u044C\u043A\u043E|\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u043D\u043E)\\s{0,3})?",pre)});var mre,vT,hre=b(()=>{Zs();et();fe();mre=`(?:(?:\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u043D\u043E|\u043E\u0440\u0456\u0454\u043D\u0442\u043E\u0432\u043D\u043E)\\s*(?:~\\s*)?)?(${xf})${_i.rightBoundary}`,vT=class extends B{patternLeftBoundary(){return _i.leftBoundary}innerPattern(e){return e.option.forwardDate?new RegExp(mre,"i"):new RegExp(`(?:\u043F\u0440\u043E\u0442\u044F\u0433\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0442\u044F\u0437\u0456|\u043F\u0440\u043E\u0442\u044F\u0433\u043E\u043C|\u0443\u043F\u0440\u043E\u0434\u043E\u0432\u0436|\u0432\u043F\u0440\u043E\u0434\u043E\u0432\u0436)\\s*${mre}`,_i.flags)}innerExtract(e,t){let n=Df(t[1]);return J.createRelativeFromReference(e.reference,n)}}});var jp,cs,pc=b(()=>{fe();Zs();jp=class extends B{patternLeftBoundary(){return _i.leftBoundary}innerPattern(e){return new RegExp(this.innerPatternString(e),_i.flags)}innerPatternHasChange(e,t){return!1}},cs=class extends jp{innerPattern(e){return new RegExp(`${this.innerPatternString(e)}${_i.rightBoundary}`,_i.flags)}}});var fre,gre,DNe,yre,bT,vre=b(()=>{Xr();Zs();Zs();Zs();wt();pc();fre=1,gre=2,DNe=3,yre=4,bT=class extends cs{innerPatternString(e){return`(?:\u0437|\u0456\u0437)?\\s*(${HR})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${HR}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${se(Ef)})(?:(?:-|\\/|,?\\s{0,3})(${Jx}(?![^\\s]\\d)))?`}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),a=Ef[t[DNe].toLowerCase()],s=UR(t[fre]);if(s>31)return t.index=t.index+t[fre].length,null;if(n.start.assign("month",a),n.start.assign("day",s),t[yre]){let i=Xx(t[yre]);n.start.assign("year",i)}else{let i=Yt(e.reference.instant,s,a);n.start.imply("year",i)}if(t[gre]){let i=UR(t[gre]);n.end=n.start.clone(),n.end.assign("day",i)}return n}}});var CNe,bre,TT,Tre=b(()=>{Zs();Xr();wt();Zs();pc();CNe=2,bre=3,TT=class extends jp{innerPatternString(e){return`((?:\u0432|\u0443)\\s*)?(${se(Ef)})\\s*(?:[,-]?\\s*(${Jx})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(e,t){let n=t[CNe].toLowerCase();if(t[0].length<=3&&!qR[n])return null;let a=e.createParsingResult(t.index,t.index+t[0].length);a.start.imply("day",1);let s=Ef[n];if(a.start.assign("month",s),t[bre]){let i=Xx(t[bre]);a.start.assign("year",i)}else{let i=Yt(e.reference.instant,1,s);a.start.imply("year",i)}return a}}});var kT,kre=b(()=>{Pt();ic();Zs();kT=class extends Ln{constructor(e){super(e)}patternFlags(){return _i.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0456|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0443|\u043E|\u043E\u0431|\u0437|\u0456\u0437|\u0432\u0456\u0434)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0440\u0430\u043D\u043A\u0443|\u0432\u0435\u0447\u043E\u0440\u0430|\u043F\u043E \u043E\u0431\u0456\u0434\u0456|\u043F\u0456\u0441\u043B\u044F \u043E\u0431\u0456\u0434\u0443))?(?!\\/)${_i.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u043E\u0440\u0430")){let a=n.get("hour");a>=6&&a<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",j.PM)):a<6&&n.assign("meridiem",j.AM)}if(t[0].endsWith("\u043F\u043E \u043E\u0431\u0456\u0434\u0456")||t[0].endsWith("\u043F\u0456\u0441\u043B\u044F \u043E\u0431\u0456\u0434\u0443")){n.assign("meridiem",j.PM);let a=n.get("hour");a>=0&&a<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0440\u0430\u043D\u043A\u0443")&&(n.assign("meridiem",j.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}}});var wT,wre=b(()=>{Zs();et();Vs();pc();wT=class extends jp{innerPatternString(e){return`(${xf})\\s{0,5}\u0442\u043E\u043C\u0443(?=(?:\\W|$))`}innerExtract(e,t){let n=Df(t[1]),a=fn(n);return J.createRelativeFromReference(e.reference,a)}}});var ST,Sre=b(()=>{wi();ST=class extends xr{patternBetween(){return/^\s*(і до|і по|до|по|-)\s*$/i}}});var ET,Ere=b(()=>{Si();ET=class extends Dr{patternBetween(){return new RegExp("^\\s*(T|\u0432|\u0443|\u043E|,|-)?\\s*$")}}});var xT,xre=b(()=>{Us();pc();xT=class extends cs{innerPatternString(e){return"(?:\u0437|\u0456\u0437|\u0432\u0456\u0434)?\\s*(\u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456|\u0432\u0447\u043E\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u0456\u0441\u043B\u044F\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430)"}innerExtract(e,t){let n=t[1].toLowerCase(),a=e.createParsingComponents();switch(n){case"\u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456":return $n(e.reference);case"\u0432\u0447\u043E\u0440\u0430":return ga(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ya(e.reference);case"\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430":return Zo(e.reference,2);case"\u043F\u0456\u0441\u043B\u044F\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430":return Zo(e.reference,3);case"\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430":return Tp(e.reference,2);case"\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430":return Tp(e.reference,3)}return a}}});var Dre,DT,Cre=b(()=>{Us();qs();Dre=We(Lt(),1);pc();DT=class extends cs{innerPatternString(e){return"(\u0437\u0430\u0440\u0430\u0437|\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E\\s*\u0432\u0435\u0447\u043E\u0440\u0430|\u043C\u0438\u043D\u0443\u043B\u043E\u0457\\s*\u043D\u043E\u0447\u0456|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0457\\s*\u043D\u043E\u0447\u0456|\u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456\\s*\u0432\u043D\u043E\u0447\u0456|\u0446\u0456\u0454\u0457\\s*\u043D\u043E\u0447\u0456|\u0446\u044C\u043E\u0433\u043E \u0440\u0430\u043D\u043A\u0443|\u0432\u0440\u0430\u043D\u0446\u0456|\u0440\u0430\u043D\u043A\u0443|\u0437\u0440\u0430\u043D\u043A\u0443|\u043E\u043F\u0456\u0432\u0434\u043D\u0456|\u0432\u0432\u0435\u0447\u0435\u0440\u0456|\u0432\u0435\u0447\u043E\u0440\u0430|\u043E\u043F\u0456\u0432\u043D\u043E\u0447\u0456|\u0432\u043D\u043E\u0447\u0456)"}innerExtract(e,t){let n=(0,Dre.default)(e.reference.instant),a=t[0].toLowerCase(),s=e.createParsingComponents();if(a==="\u0437\u0430\u0440\u0430\u0437")return fa(e.reference);if(a==="\u0432\u0432\u0435\u0447\u0435\u0440\u0456"||a==="\u0432\u0435\u0447\u043E\u0440\u0430")return of(e.reference);if(a.endsWith("\u0432\u0440\u0430\u043D\u0446\u0456")||a.endsWith("\u0440\u0430\u043D\u043A\u0443")||a.endsWith("\u0437\u0440\u0430\u043D\u043A\u0443"))return lf(e.reference);if(a.endsWith("\u043E\u043F\u0456\u0432\u0434\u043D\u0456"))return cf(e.reference);if(a.match(/минулої\s*ночі/))return kx(e.reference);if(a.match(/минулого\s*вечора/))return wx(e.reference);if(a.match(/наступної\s*ночі/)){let i=n.hour()<22?1:2;n=n.add(i,"day"),vr(s,n),s.imply("hour",1)}return a.match(/цієї\s*ночі/)?kp(e.reference):a.endsWith("\u043E\u043F\u0456\u0432\u043D\u043E\u0447\u0456")||a.endsWith("\u0432\u043D\u043E\u0447\u0456")?kp(e.reference):s}}});var PNe,_Ne,MNe,CT,Pre=b(()=>{Zs();wt();co();pc();PNe=1,_Ne=2,MNe=3,CT=class extends cs{innerPatternString(e){return`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:\u0443\\s*?)?(?:(\u0446\u0435\u0439|\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E|\u043C\u0438\u043D\u0443\u043B\u0438\u0439|\u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439|\u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044C\u043E\u0433\u043E|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443)\\s*)?(${se(BR)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*(\u043D\u0430|\u0443|\u0432)\\s*(\u0446\u044C\u043E\u043C\u0443|\u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443)\\s*\u0442\u0438\u0436\u043D\u0456)?`}innerExtract(e,t){let n=t[_Ne].toLocaleLowerCase(),a=BR[n],s=t[PNe],i=t[MNe],o=s||i;o=o||"",o=o.toLocaleLowerCase();let l=null;return o=="\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E"||o=="\u043C\u0438\u043D\u0443\u043B\u0438\u0439"||o=="\u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439"||o=="\u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044C\u043E\u0433\u043E"?l="last":o=="\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E"||o=="\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439"?l="next":(o=="\u0446\u0435\u0439"||o=="\u0446\u044C\u043E\u0433\u043E"||o=="\u0446\u044C\u043E\u043C\u0443")&&(l="this"),gn(e.reference,a,l)}}});var _re,ANe,INe,PT,Mre=b(()=>{Zs();et();_re=We(Lt(),1);wt();pc();ANe=1,INe=2,PT=class extends cs{innerPatternString(e){return`(\u0432 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443|\u0443 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443|\u043D\u0430 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443|\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E|\u043D\u0430 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443|\u0432 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443|\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E|\u043D\u0430 \u0446\u044C\u043E\u043C\u0443|\u0432 \u0446\u044C\u043E\u043C\u0443|\u0443 \u0446\u044C\u043E\u043C\u0443|\u0446\u044C\u043E\u0433\u043E)\\s*(${se(yT)})(?=\\s*)`}innerExtract(e,t){let n=t[ANe].toLowerCase(),a=t[INe].toLowerCase(),s=yT[a];if(n=="\u043D\u0430 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||n=="\u0432 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||n=="\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||n=="\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E"){let l={};return l[s]=1,J.createRelativeFromReference(e.reference,l)}if(n=="\u043D\u0430 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||n=="\u0432 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||n=="\u0443 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||n=="\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E"){let l={};return l[s]=-1,J.createRelativeFromReference(e.reference,l)}let i=e.createParsingComponents(),o=(0,_re.default)(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),i.imply("day",o.date()),i.assign("year",o.year()),i.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),i.imply("day",o.date()),i.imply("month",o.month()+1),i.assign("year",o.year())),i}}});var _T,Are=b(()=>{Zs();et();Vs();pc();_T=class extends cs{innerPatternString(e){return`(\u0446\u0456|\u043E\u0441\u0442\u0430\u043D\u043D\u0456|\u043C\u0438\u043D\u0443\u043B\u0456|\u043C\u0430\u0439\u0431\u0443\u0442\u043D\u0456|\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0456|\u043F\u0456\u0441\u043B\u044F|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${xf})`}innerExtract(e,t){let n=t[1].toLowerCase(),a=Df(t[3]);switch(n){case"\u043E\u0441\u0442\u0430\u043D\u043D\u0456":case"\u043C\u0438\u043D\u0443\u043B\u0456":case"-":a=fn(a);break}return J.createRelativeFromReference(e.reference,a)}}});var YR={};Ke(YR,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>VR,createCasualConfiguration:()=>Ire,createConfiguration:()=>WR,parse:()=>RNe,parseDate:()=>ONe,strict:()=>NNe});function Ire(){let r=WR(!1);return r.parsers.unshift(new xT),r.parsers.unshift(new DT),r.parsers.unshift(new TT),r.parsers.unshift(new PT),r.parsers.unshift(new _T),r}function WR(r){return Or({parsers:[new lc,new Dn(!0),new vT,new bT,new CT,new kT(r),new wT],refiners:[new ET,new ST]},r)}function RNe(r,e,t){return VR.parse(r,e,t)}function ONe(r,e,t){return VR.parseDate(r,e,t)}var VR,NNe,Nre=b(()=>{hre();vre();Tre();kre();wre();Sre();Ere();Hs();xre();Cre();Pre();Mre();os();et();Pt();cc();Are();Tx();VR=new Me(Ire()),NNe=new Me(WR(!0))});var eD={};Ke(eD,{Chrono:()=>Me,Meridiem:()=>j,ParsingComponents:()=>J,ParsingContext:()=>Uv,ParsingResult:()=>Mt,ReferenceWithTimezone:()=>$t,Weekday:()=>Fe,casual:()=>GR,de:()=>TN,en:()=>uN,es:()=>LR,fr:()=>MN,ja:()=>RN,nl:()=>YN,parse:()=>LNe,parseDate:()=>$Ne,pt:()=>jN,ru:()=>AR,strict:()=>FNe,uk:()=>YR,zh:()=>kR});function LNe(r,e,t){return GR.parse(r,e,t)}function $Ne(r,e,t){return GR.parseDate(r,e,t)}var FNe,GR,Rre=b(()=>{WJ();os();et();Pt();yX();BX();ree();yee();Vee();Tte();Hte();dre();Nre();FNe=dN,GR=Vv});var tD,Ore=b(()=>{Qr();Rre();II();HI();UI();qI();tD=class{constructor(e=[],t=[],n=!0,a="en",s,i){this.isValidDateString=l=>/^\d{4}-\d{2}-\d{2}$/.test(l),this.isValidTimeString=l=>/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(l),this.escapeRegex=l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),this.cleanupWhitespace=l=>l.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").trim(),this.defaultToScheduled=n,this.languageConfig=LQ(a),this.statusConfigs=e,this.priorityConfigs=t;let o=s||dQ;this.triggerConfig=new hx(o,i||[]),this.boundaries=this.createBoundaryConfig(),this.priorityPatterns=this.buildPriorityPatterns(t),this.statusPatterns=this.buildFallbackStatusPatterns(),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 eD[e]||eD}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:[]},[n,a]=this.extractTitleAndDetails(e);a&&(t.details=a);let s=n;for(let i of this.processingPipeline)try{s=i.process(s,t)}catch(o){console.debug(`Error in processor ${i.name}:`,o)}return t.title=s.trim(),this.validateAndCleanupResult(t)}extractTitleAndDetails(e){let t=e.trim(),n=t.indexOf(` `);if(n!==-1){let a=t.substring(0,n).trim(),s=t.substring(n+1).trim();return[a,s]}return[t,void 0]}extractTags(e,t){let n=this.triggerConfig.getTagTrigger();if(!n)return e;let a=this.escapeRegex(n),s=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),i=e.match(s);return i?(t.tags.push(...i.map(o=>o.substring(n.length))),this.cleanupWhitespace(e.replace(s,""))):e}extractContexts(e,t){let n=this.triggerConfig.getContextTrigger();if(!n)return e;let a=this.escapeRegex(n),s=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),i=e.match(s);return i?(t.contexts.push(...i.map(o=>o.substring(n.length))),this.cleanupWhitespace(e.replace(s,""))):e}extractProjects(e,t){let n=this.triggerConfig.getProjectTrigger();if(!n)return e;let a=e,s=this.escapeRegex(n),i=new RegExp(`${s}\\[\\[.*?\\]\\]`,"g"),o=a.match(i);o&&(t.projects.push(...o.map(d=>d.slice(n.length))),a=this.cleanupWhitespace(a.replace(i,"")));let l=new RegExp(`${s}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),c=a.match(l);return c&&(t.projects.push(...c.map(d=>d.substring(n.length))),a=this.cleanupWhitespace(a.replace(l,""))),a}extractUserFields(e,t){let n=e,a=this.triggerConfig.getAllEnabledTriggers().filter(s=>this.triggerConfig.isUserField(s.propertyId));for(let s of a){let i=this.triggerConfig.getUserField(s.propertyId);if(!i)continue;let o=this.escapeRegex(s.trigger);if(i.type==="list"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"gu"),c=[],d;for(;(d=l.exec(n))!==null;){let u=d[1]||d[2];c.push(u)}c.length>0&&(t.userFields||(t.userFields={}),t.userFields[i.id]=c,n=this.cleanupWhitespace(n.replace(l,"")))}else if(i.type==="text"||i.type==="boolean"||i.type==="number"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=n.match(l);if(c){let d=c[1]||c[2];t.userFields||(t.userFields={}),i.type==="boolean"?t.userFields[i.id]=d.toLowerCase()==="true"?"true":"false":t.userFields[i.id]=d,n=this.cleanupWhitespace(n.replace(l,""))}}else if(i.type==="date"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=n.match(l);if(c){let d=c[1]||c[2];t.userFields||(t.userFields={}),t.userFields[i.id]=d,n=this.cleanupWhitespace(n.replace(l,""))}}}return n}buildPriorityPatterns(e){if(e.length>0)return e.flatMap(i=>[{regex:new RegExp(`\\b${this.escapeRegex(i.value)}\\b`,"i"),value:i.value},{regex:new RegExp(`\\b${this.escapeRegex(i.label)}\\b`,"i"),value:i.value}]);let t=[],n=this.languageConfig.fallbackPriority,{boundary:a,endBoundary:s}=this.boundaries;return t.push({regex:new RegExp(`${a}(${n.urgent.map(i=>this.escapeRegex(i)).join("|")})${s}`,"i"),value:"urgent"}),t.push({regex:new RegExp(`${a}(${n.high.map(i=>this.escapeRegex(i)).join("|")})${s}`,"i"),value:"high"}),t.push({regex:new RegExp(`${a}(${n.normal.map(i=>this.escapeRegex(i)).join("|")})${s}`,"i"),value:"normal"}),t.push({regex:new RegExp(`${a}(${n.low.map(i=>this.escapeRegex(i)).join("|")})${s}`,"i"),value:"low"}),t}extractPriority(e,t){if(this.priorityConfigs.length>0){let a=[...this.priorityConfigs].sort((o,l)=>l.label.length-o.label.length),s=this.triggerConfig.getTriggerForProperty("priority"),i=s!=null&&s.enabled?s.trigger:"";for(let o of a){let l=[o.label,o.value];for(let c of l){if(!c||c.trim()==="")continue;if(i){let u=i+c,p=this.findTextMatch(e,u);if(p)return t.priority=o.value,this.cleanupWhitespace(e.replace(p.fullMatch,""))}let d=this.findTextMatch(e,c);if(d)return t.priority=o.value,this.cleanupWhitespace(e.replace(d.fullMatch,""))}}return e}let n=null;for(let a of this.priorityPatterns){let s=e.match(a.regex);s&&s.index!==void 0&&(!n||s.index0)return[];let e=this.languageConfig.fallbackStatus,{boundary:t,endBoundary:n}=this.boundaries;return[{regex:new RegExp(`${t}(${e.open.map(a=>this.escapeRegex(a)).join("|")})${n}`,"i"),value:"open"},{regex:new RegExp(`${t}(${e.inProgress.map(a=>this.escapeRegex(a)).join("|")})${n}`,"i"),value:"in-progress"},{regex:new RegExp(`${t}(${e.done.map(a=>this.escapeRegex(a)).join("|")})${n}`,"i"),value:"done"},{regex:new RegExp(`${t}(${e.cancelled.map(a=>this.escapeRegex(a)).join("|")})${n}`,"i"),value:"cancelled"},{regex:new RegExp(`${t}(${e.waiting.map(a=>this.escapeRegex(a)).join("|")})${n}`,"i"),value:"waiting"}]}extractStatus(e,t){if(this.statusConfigs.length>0){let n=[...this.statusConfigs].sort((i,o)=>o.label.length-i.label.length),a=this.triggerConfig.getTriggerForProperty("status"),s=a!=null&&a.enabled?a.trigger:"";for(let i of n){let o=[i.label,i.value];for(let l of o){if(!l||l.trim()==="")continue;if(s){let d=s+l,u=this.findTextMatch(e,d);if(u)return t.status=i.value,this.cleanupWhitespace(e.replace(u.fullMatch,""))}let c=this.findTextMatch(e,l);if(c)return t.status=i.value,this.cleanupWhitespace(e.replace(c.fullMatch,""))}}return e}for(let n of this.statusPatterns)if(n.regex.test(e))return t.status=n.value,this.cleanupWhitespace(e.replace(n.regex,""));return e}findTextMatch(e,t){if(!t||t.trim()==="")return null;let n=e.toLowerCase(),a=t.toLowerCase(),s=0;for(;;){let i=n.indexOf(a,s);if(i===-1)break;let o=i>0?e[i-1]:" ",l=i+t.length,c=lthis.escapeRegex(T)).join("|")})`,"i")},{type:"scheduled",regex:new RegExp(`\\b(${o.scheduled.map(T=>this.escapeRegex(T)).join("|")})`,"i")}],c=!1;for(let T of l){let w=n.match(T.regex);if(w){let S=(w.index||0)+w[0].length,x=n.substring(S),C=this.parseChronoFromPosition(x);C.success&&(c=!0,T.type==="due"?(t.dueDate=C.date,C.time&&(t.dueTime=C.time)):(t.scheduledDate=C.date,C.time&&(t.scheduledTime=C.time)),n=n.replace(T.regex,""),C.matchedText&&(n=n.replace(C.matchedText,"")),n=this.cleanupWhitespace(n))}}if(c)return n;let d=i.parse(e,new Date,{forwardDate:!0});if(d.length===0)return e;let u=d[0],p=u.text,m=u.start.date(),h=(a=u.end)==null?void 0:a.date(),f=new RegExp(`\\b(${o.due.map(T=>this.escapeRegex(T)).join("|")})\\b`,"i"),g=new RegExp(`\\b(${o.scheduled.map(T=>this.escapeRegex(T)).join("|")})\\b`,"i"),y=f.test(u.text),k=g.test(u.text);if(h&&Rn(h)&&h.getTime()!==m.getTime())t.scheduledDate=D(m,"yyyy-MM-dd"),u.start.isCertain("hour")&&(t.scheduledTime=D(m,"HH:mm")),t.dueDate=D(h,"yyyy-MM-dd"),(s=u.end)!=null&&s.isCertain("hour")&&(t.dueTime=D(h,"HH:mm"));else if(Rn(m)){let T=D(m,"yyyy-MM-dd"),w=u.start.isCertain("hour")?D(m,"HH:mm"):void 0;y&&!k?(t.dueDate=T,t.dueTime=w):k&&!y||this.defaultToScheduled?(t.scheduledDate=T,t.scheduledTime=w):(t.dueDate=T,t.dueTime=w)}n=n.replace(p,"").trim(),n=this.cleanupWhitespace(n)}catch(i){console.debug("Error in unified date parsing:",i)}return n}parseChronoFromPosition(e){try{let n=this.getChronoParser().parse(e,new Date,{forwardDate:!0});if(n.length>0){let a=n[0];if(a.index<=3){let s=a.start.date();if(Rn(s)){let i={success:!0,date:D(s,"yyyy-MM-dd"),matchedText:a.text};return a.start.isCertain("hour")&&(i.time=D(s,"HH:mm")),i}}}}catch(t){console.debug("Error parsing date with chrono:",t)}return{success:!1}}buildRecurrencePatterns(){let e=this.languageConfig.recurrence,t=[],{boundary:n,endBoundary:a}=this.boundaries,s=i=>i.map(o=>this.escapeRegex(o)).join("|");return t.push(...this.buildOrdinalWeekdayPatterns(e,n,a,s)),t.push(...this.buildIntervalPatterns(e,n,a,s)),t.push(...this.buildEveryOtherPatterns(e,n,a,s)),t.push(...this.buildWeekdayPatterns(e,n,a,s)),t.push(...this.buildFrequencyPatterns(e,n,a,s)),t}buildOrdinalWeekdayPatterns(e,t,n,a){let s=a(e.every),i=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}(${s})\\s+(${i})\\s+(${o})${n}`,"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,n,a){let s=a(e.every),i=a([...e.periods.day,...e.periods.week,...e.periods.month,...e.periods.year]);return[{regex:new RegExp(`${t}(${s})\\s+(\\d+)\\s+(${i})${n}`,"i"),handler:o=>{let l=parseInt(o[2]),c=o[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,e)};INTERVAL=${l}`}}]}buildEveryOtherPatterns(e,t,n,a){let s=a(e.every),i=a(e.other),o=a([...e.periods.day,...e.periods.week,...e.periods.month,...e.periods.year]);return[{regex:new RegExp(`${t}(${s})\\s+(${i})\\s+(${o})${n}`,"i"),handler:l=>{let c=l[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,e)};INTERVAL=2`}}]}buildWeekdayPatterns(e,t,n,a){let s=a(e.every),i=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}(${s})\\s+(${i})${n}`,"i"),handler:l=>{let c=l[2].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getWeekdayRRuleCode(c,e)}`}},{regex:new RegExp(`${t}(${o})${n}`,"i"),handler:l=>{let c=l[1].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getPluralWeekdayRRuleCode(c,e)}`}}]}buildFrequencyPatterns(e,t,n,a){return[{regex:new RegExp(`${t}(${a(e.frequencies.daily)})${n}`,"i"),handler:()=>"FREQ=DAILY"},{regex:new RegExp(`${t}(${a(e.frequencies.weekly)})${n}`,"i"),handler:()=>"FREQ=WEEKLY"},{regex:new RegExp(`${t}(${a(e.frequencies.monthly)})${n}`,"i"),handler:()=>"FREQ=MONTHLY"},{regex:new RegExp(`${t}(${a(e.frequencies.yearly)})${n}`,"i"),handler:()=>"FREQ=YEARLY"}]}getPeriodFrequency(e,t){return t.periods.week.some(n=>n.toLowerCase()===e)?"WEEKLY":t.periods.month.some(n=>n.toLowerCase()===e)?"MONTHLY":t.periods.year.some(n=>n.toLowerCase()===e)?"YEARLY":"DAILY"}getWeekdayRRuleCode(e,t){return t.weekdays.tuesday.some(n=>n.toLowerCase()===e)?"TU":t.weekdays.wednesday.some(n=>n.toLowerCase()===e)?"WE":t.weekdays.thursday.some(n=>n.toLowerCase()===e)?"TH":t.weekdays.friday.some(n=>n.toLowerCase()===e)?"FR":t.weekdays.saturday.some(n=>n.toLowerCase()===e)?"SA":t.weekdays.sunday.some(n=>n.toLowerCase()===e)?"SU":"MO"}getPluralWeekdayRRuleCode(e,t){return t.pluralWeekdays.tuesday.some(n=>n.toLowerCase()===e)?"TU":t.pluralWeekdays.wednesday.some(n=>n.toLowerCase()===e)?"WE":t.pluralWeekdays.thursday.some(n=>n.toLowerCase()===e)?"TH":t.pluralWeekdays.friday.some(n=>n.toLowerCase()===e)?"FR":t.pluralWeekdays.saturday.some(n=>n.toLowerCase()===e)?"SA":t.pluralWeekdays.sunday.some(n=>n.toLowerCase()===e)?"SU":"MO"}extractRecurrence(e,t){for(let n of this.recurrencePatterns){let a=e.match(n.regex);if(a){let s=n.handler(a);if(this.isValidRRuleString(s))return t.recurrence=s,this.cleanupWhitespace(e.replace(n.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 n=this.languageConfig.timeEstimate,{boundary:a,endBoundary:s}=this.boundaries,i=[{regex:new RegExp(`${a}(\\d+)(${n.hours.map(c=>this.escapeRegex(c)).join("|")})\\s*(\\d+)(${n.minutes.map(c=>this.escapeRegex(c)).join("|")})${s}`,"i"),handler:c=>parseInt(c[1])*60+parseInt(c[3])},{regex:new RegExp(`${a}(\\d+)\\s*(${n.hours.map(c=>this.escapeRegex(c)).join("|")})${s}`,"i"),handler:c=>parseInt(c[1])*60},{regex:new RegExp(`${a}(\\d+)\\s*(${n.minutes.map(c=>this.escapeRegex(c)).join("|")})${s}`,"i"),handler:c=>parseInt(c[1])}],o=e,l=0;for(let c of i){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 n=e.dueTime?`${e.dueDate} at ${e.dueTime}`:e.dueDate;t.push({icon:"calendar",text:`Due: ${n}`})}if(e.scheduledDate){let n=e.scheduledTime?`${e.scheduledDate} at ${e.scheduledTime}`:e.scheduledDate;t.push({icon:"calendar-clock",text:`Scheduled: ${n}`})}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(n=>"@"+n).join(", ")}`}),e.projects&&e.projects.length>0){let n=e.projects.map(a=>`+${a}`).join(", ");t.push({icon:"folder",text:`Projects: ${n}`})}if(e.tags&&e.tags.length>0&&t.push({icon:"tag",text:`Tags: ${e.tags.map(n=>"#"+n).join(", ")}`}),e.recurrence){let n="Invalid recurrence";try{e.recurrence.includes("FREQ=")&&this.isValidRRuleString(e.recurrence)&&(n=be.fromString(e.recurrence).toText())}catch(a){console.debug("Error parsing rrule for preview:",a)}t.push({icon:"repeat",text:`Recurrence: ${n}`})}if(e.estimate&&t.push({icon:"clock",text:`Estimate: ${e.estimate} min`}),e.userFields&&Object.keys(e.userFields).length>0)for(let[n,a]of Object.entries(e.userFields)){let s=this.triggerConfig.getUserField(n),i=(s==null?void 0:s.displayName)||n,o;Array.isArray(a)?o=a.join(", "):o=a,t.push({icon:"box",text:`${i}: ${o}`})}return t}getPreviewText(e){return this.getPreviewData(e).map(t=>t.text).join(" \u2022 ")}getStatusSuggestions(e,t=10){let n=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(n)||a.label.toLowerCase().includes(n)).slice(0,t).map(a=>({value:a.value,label:a.label,display:a.label}))}}});var Fre=b(()=>{cQ();qI();HI();UI();Ore()});var Ks,Cf=b(()=>{Fre();Ks=class r extends tD{static fromPlugin(e){let t=e.settings;return new r(t.customStatuses,t.customPriorities,t.nlpDefaultToScheduled,t.nlpLanguage,t.nlpTriggers,t.userFields)}constructor(e=[],t=[],n=!0,a="en",s,i){super(e,t,n,a,s,i)}}});var Lre={};Ke(Lre,{ReminderModal:()=>uo});var Fr,uo,Pf=b(()=>{Fr=require("obsidian");kt();uo=class extends Fr.Modal{constructor(t,n,a,s){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=n,this.task=a,this.reminders=a.reminders?[...a.reminders]:[],this.originalReminders=a.reminders?[...a.reminders]:[],this.onSave=s}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("tasknotes-plugin"),t.addClass("tasknotes-reminder-modal"),t.createDiv({cls:"reminder-modal__loading"}).createEl("div",{text:"Loading reminders..."}),this.initializeWithFreshData().catch(a=>{console.error("Failed to initialize reminder modal:",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 i=await this.plugin.cacheManager.getTaskInfo(this.task.path);i?(this.task=i,this.reminders=i.reminders?[...i.reminders]:[],this.originalReminders=i.reminders?[...i.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 n=t.createDiv({cls:"reminder-modal__header"});n.createEl("h2",{text:"Task Reminders"}),n.createDiv({cls:"reminder-modal__task-title",text:this.task.title});let a=this.getTaskContextInfo();if(a){let i=n.createDiv({cls:"reminder-modal__task-dates"});i.textContent=a}let s=t.createDiv({cls:"reminder-modal__content"});this.renderExistingReminders(s),this.renderAddReminderForm(s),this.renderActionButtons(t),this.setupKeyboardHandlers(),this.updateSaveButtonState()}renderActionButtons(t){let n=t.createDiv({cls:"reminder-modal__actions"});this.saveBtn=n.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=n.createEl("button",{text:"Cancel",cls:"reminder-modal__cancel-btn"});a.onclick=()=>{this.cancel()}}getTaskContextInfo(){let t=[];return this.task.due&&t.push(`Due: ${Zl(this.task.due)}`),this.task.scheduled&&t.push(`Scheduled: ${Zl(this.task.scheduled)}`),t.length>0?t.join(" \u2022 "):null}setupKeyboardHandlers(){let t=async n=>{n.key==="Enter"&&(n.ctrlKey||n.metaKey)&&!this.saveBtn.disabled?(n.preventDefault(),await this.save()):n.key==="Escape"&&(n.preventDefault(),this.cancel())};this.contentEl.addEventListener("keydown",t),this.onClose=()=>{this.contentEl.removeEventListener("keydown",t);let{contentEl:n}=this;n.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 n=t.createDiv({cls:"reminder-modal__section"}),a=n.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 i=n.createDiv({cls:"reminder-modal__empty-state"});(0,Fr.setIcon)(i.createDiv({cls:"reminder-modal__empty-icon"}),"bell-off"),i.createEl("div",{cls:"reminder-modal__empty-text",text:"No reminders set"});return}let s=n.createDiv({cls:"reminder-modal__reminder-list"});this.reminders.forEach((i,o)=>{let l=s.createDiv({cls:"reminder-modal__reminder-card"}),c=l.createDiv({cls:"reminder-modal__reminder-icon"}),d=i.type==="absolute"?"calendar-clock":"timer";(0,Fr.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(i),i.description){let f=u.createDiv({cls:"reminder-modal__reminder-description"});f.textContent=`"${i.description}"`}let h=l.createDiv({cls:"reminder-modal__reminder-actions"}).createEl("button",{cls:"reminder-modal__action-btn reminder-modal__remove-btn"});(0,Fr.setIcon)(h,"trash-2"),(0,Fr.setTooltip)(h,"Delete this reminder"),h.onclick=async f=>{f.stopPropagation(),await this.removeReminder(o)}})}formatReminderDisplayText(t){if(t.type==="absolute"){if(t.absoluteTime)try{let n=new Date(t.absoluteTime);return`${n.toLocaleDateString()} at ${n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`}catch(n){return`At ${t.absoluteTime}`}return"Absolute reminder"}else{let n=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${n}`}}renderQuickActions(t){if(!(this.task.due||this.task.scheduled))return;let s=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=s.createEl("button",{cls:"reminder-modal__quick-btn"}),m=p.createSpan({cls:"reminder-modal__quick-btn-icon"});(0,Fr.setIcon)(m,d),p.createSpan({cls:"reminder-modal__quick-btn-label",text:o}),(0,Fr.setTooltip)(p,`Add reminder ${l} ${u} date`),p.onclick=async()=>{await this.addQuickReminder(u,c,l)}})}async addQuickReminder(t,n,a){let s={id:`rem_${Date.now()}`,type:"relative",relatedTo:t,offset:n,description:a};await this.addReminder(s),new Fr.Notice(`Added reminder: ${a}`)}renderAddReminderForm(t){let n=t.createDiv({cls:"reminder-modal__section"});n.createDiv({cls:"reminder-modal__section-header"}).createEl("h3",{text:"Add New Reminder"}),this.renderQuickActions(n);let s=n.createDiv({cls:"reminder-modal__form"}),i=s.createDiv({cls:"reminder-modal__type-selector"}),o=i.createEl("button",{cls:"reminder-modal__type-tab reminder-modal__type-tab--active",text:"Relative",attr:{"data-type":"relative"}}),l=i.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=h=>{this.selectedType=h,o.classList.toggle("reminder-modal__type-tab--active",h==="relative"),l.classList.toggle("reminder-modal__type-tab--active",h==="absolute"),this.updateFormVisibility(s,this.selectedType)};o.onclick=()=>c("relative"),l.onclick=()=>c("absolute");let d=s.createDiv({cls:"relative-fields"});new Fr.Setting(d).setName("Time").addText(h=>{h.setPlaceholder("15").setValue(String(this.relativeOffset)).onChange(f=>{this.relativeOffset=parseInt(f)||0})}).addDropdown(h=>{h.addOption("minutes","minutes").addOption("hours","hours").addOption("days","days").setValue(this.relativeUnit).onChange(f=>{this.relativeUnit=f})}),new Fr.Setting(d).setName("Direction").addDropdown(h=>{h.addOption("before","Before").addOption("after","After").setValue(this.relativeDirection).onChange(f=>{this.relativeDirection=f})}),new Fr.Setting(d).setName("Relative to").addDropdown(h=>{let f={};this.task.due&&(f.due=`Due date (${Zl(this.task.due)})`),this.task.scheduled&&(f.scheduled=`Scheduled date (${Zl(this.task.scheduled)})`),Object.keys(f).length===0?(f.none="No dates available",h.setDisabled(!0)):(Object.entries(f).forEach(([g,y])=>{h.addOption(g,y)}),h.setValue(this.relativeAnchor)),h.onChange(g=>{this.relativeAnchor=g})});let u=s.createDiv({cls:"absolute-fields"});new Fr.Setting(u).setName("Date").addText(h=>{h.setPlaceholder("YYYY-MM-DD").setValue(this.absoluteDate).onChange(f=>{this.absoluteDate=f}),h.inputEl.type="date"}),new Fr.Setting(u).setName("Time").addText(h=>{h.setPlaceholder("HH:MM").setValue(this.absoluteTime).onChange(f=>{this.absoluteTime=f}),h.inputEl.type="time"}),new Fr.Setting(s).setName("Description (optional)").addText(h=>{h.setPlaceholder("Custom reminder message").setValue(this.description).onChange(f=>{this.description=f})});let p=s.createEl("button",{cls:"reminder-add-btn"}),m=p.createSpan({cls:"reminder-add-btn-icon"});(0,Fr.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 h=this.createReminder(this.selectedType,this.relativeAnchor,this.relativeOffset,this.relativeUnit,this.relativeDirection,this.absoluteDate,this.absoluteTime,this.description);h&&(await this.addReminder(h),this.selectedType==="relative"?(this.relativeOffset=15,this.relativeUnit="minutes",this.description=""):(this.absoluteDate="",this.absoluteTime="",this.description=""),this.resetFormInputs(s))}catch(h){console.error("Error adding reminder:",h),new Fr.Notice("Failed to add reminder. Please check your inputs.")}finally{p.disabled=!1,p.classList.remove("reminder-add-btn--loading")}},this.updateFormVisibility(s,this.selectedType)}updateFormVisibility(t,n){let a=t.querySelector(".relative-fields"),s=t.querySelector(".absolute-fields");n==="relative"?(a.style.display="block",s.style.display="none"):(a.style.display="none",s.style.display="block")}createReminder(t,n,a,s,i,o,l,c){let d=`rem_${Date.now()}`;if(t==="relative"){if(!(n==="due"?this.task.due:this.task.scheduled))return new Fr.Notice(`Cannot create reminder: Task has no ${n} date`),null;let p="PT";return s==="days"?p=`P${a}D`:s==="hours"?p=`PT${a}H`:p=`PT${a}M`,i==="before"&&(p="-"+p),{id:d,type:"relative",relatedTo:n,offset:p,description:c||void 0}}else{if(!o||!l)return new Fr.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 n=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${n}`}}formatReminderDetails(t){if(t.type==="absolute")return`At ${Zl(t.absoluteTime||"")}`;{let n=t.relatedTo==="due"?this.task.due:this.task.scheduled;return n?`When ${t.relatedTo} date is ${Zl(n)}`:`Relative to ${t.relatedTo} date (not set)`}}formatReminderDescription(t){if(t.description)return t.description;if(t.type==="absolute")return`At ${Zl(t.absoluteTime||"")}`;{let n=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${n}`}}formatOffset(t){let n=t.startsWith("-"),s=(n?t.substring(1):t).match(/P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?)?/);if(!s)return t;let[,i,o,l]=s,c=[];if(i&&c.push(`${i} day${i!=="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 n?`${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 n=this.reminders[t];this.reminders.splice(t,1),this.refreshRemindersListOnly(),this.task.path&&n&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.reminders],action:"removed",reminder:n})}async refresh(){await this.initializeWithFreshData()}refreshRemindersListOnly(){let t=this.contentEl.querySelector(".reminder-modal__content");if(t){let n=t.querySelector(".reminder-modal__section");n&&n.remove();let a=document.createElement("div");this.renderExistingReminders(a);let s=a.firstChild;s&&t.insertBefore(s,t.firstChild)}this.updateSaveButtonState()}resetFormInputs(t){let n=t.querySelector('input[placeholder="15"]');n&&(n.value=String(this.relativeOffset));let a=t.querySelector('input[placeholder="Custom reminder message"]');a&&(a.value=this.description);let s=t.querySelector('input[type="date"]');s&&(s.value=this.absoluteDate);let i=t.querySelector('input[type="time"]');i&&(i.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 n=this.remindersHaveChanged();this.onSave(this.reminders),n&&this.task.path&&this.plugin.emitter.trigger("reminder-changed",{taskPath:this.task.path,oldReminders:this.originalReminders,newReminders:[...this.reminders]}),this.close()}catch(n){console.error("Failed to save reminders:",n),new Fr.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,n)=>{let a=this.originalReminders[n];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()}}});var $re={};Ke($re,{CalendarExportService:()=>Jo});var zp,Jo,rD=b(()=>{Qr();zp=require("obsidian"),Jo=class{static generateCalendarURL(e){let{type:t,task:n,useScheduledAsDue:a=!0}=e;switch(t){case"google":return this.generateGoogleCalendarURL(n,a);case"outlook":return this.generateOutlookCalendarURL(n,a);case"yahoo":return this.generateYahooCalendarURL(n,a);case"ics":return this.generateICSDownloadURL(n);default:throw new Error(`Unsupported calendar type: ${t}`)}}static openCalendarURL(e,t){try{let n=this.generateCalendarURL(e);window.open(n,"_blank")}catch(n){console.error("Failed to generate calendar URL:",n),new zp.Notice(t?t("services.calendarExport.notices.generateLinkFailed"):"Failed to generate calendar link")}}static generateGoogleCalendarURL(e,t){let n="https://calendar.google.com/calendar/render",a=new URLSearchParams;a.append("action","TEMPLATE"),a.append("text",e.title);let s=this.formatGoogleDates(e,t);s&&a.append("dates",s);let i=this.buildDescription(e);return i&&a.append("details",i),e.contexts&&e.contexts.length>0&&a.append("location",e.contexts.join(", ")),`${n}?${a.toString()}`}static generateOutlookCalendarURL(e,t){let n="https://outlook.live.com/calendar/0/deeplink/compose",a=new URLSearchParams;a.append("subject",e.title);let{startISO:s,endISO:i}=this.getTaskDateRange(e,t);s&&a.append("startdt",s),i&&a.append("enddt",i);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"),`${n}?${a.toString()}`}static generateYahooCalendarURL(e,t){let n="https://calendar.yahoo.com/",a=new URLSearchParams;a.append("v","60"),a.append("title",e.title);let{startYahoo:s,endYahoo:i}=this.getYahooDateFormat(e,t);s&&a.append("st",s),i&&a.append("et",i);let o=this.buildDescription(e);return o&&a.append("desc",o),e.contexts&&e.contexts.length>0&&a.append("in_loc",e.contexts.join(", ")),`${n}?${a.toString()}`}static generateICSDownloadURL(e){let t=this.generateICSContent(e);return`data:text/calendar;charset=utf8,${encodeURIComponent(t)}`}static generateICSContent(e,t){let n=`${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}@tasknotes`,a=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),s=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//Task Export//EN","CALSCALE:GREGORIAN","METHOD:PUBLISH","BEGIN:VEVENT",`UID:${n}`,`DTSTAMP:${a}`];s.push(`SUMMARY:${this.escapeICSText(e.title)}`);let{startICS:i,endICS:o}=this.getICSDateFormat(e,!0,t);i&&s.push(`DTSTART:${i}`),o&&s.push(`DTEND:${o}`);let l=this.buildDescription(e);if(l&&s.push(`DESCRIPTION:${this.escapeICSText(l)}`),e.contexts&&e.contexts.length>0&&s.push(`LOCATION:${this.escapeICSText(e.contexts.join(", "))}`),e.tags&&e.tags.length>0&&s.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";s.push(`PRIORITY:${d}`)}if(e.status){let d={done:"COMPLETED","in-progress":"IN-PROCESS",todo:"NEEDS-ACTION",cancelled:"CANCELLED"}[e.status]||"NEEDS-ACTION";s.push(`STATUS:${d}`)}return s.push("END:VEVENT"),s.push("END:VCALENDAR"),s.join(`\r `)}static buildDescription(e){let t=[],n=[];return e.priority&&n.push(`Priority: ${e.priority}`),e.status&&n.push(`Status: ${e.status}`),e.projects&&e.projects.length>0&&n.push(`Projects: ${e.projects.join(", ")}`),e.tags&&e.tags.length>0&&n.push(`Tags: ${e.tags.join(", ")}`),e.contexts&&e.contexts.length>0&&n.push(`Contexts: ${e.contexts.join(", ")}`),e.timeEstimate&&n.push(`Estimated time: ${e.timeEstimate} minutes`),n.length>0&&t.push(...n),t.length>0&&t.push(""),t.push(`Exported from TaskNotes: ${e.path}`),t.join(` `)}static formatGoogleDates(e,t){let{startICS:n,endICS:a}=this.getICSDateFormat(e,t);if(!n)return null;if(a)return`${n}/${a}`;let s=this.parseICSDate(n),i=new Date(s.getTime()+3600*1e3),o=this.formatDateToICS(i);return`${n}/${o}`}static getTaskDateRange(e,t,n){let a=null,s=null;if(e.scheduled)try{a=this.parseTaskDate(e.scheduled).toISOString()}catch(i){console.warn("Invalid scheduled date:",e.scheduled)}if(n!=null&&n.useDurationForExport&&a&&e.timeEstimate&&e.timeEstimate>0){let i=new Date(a);s=new Date(i.getTime()+e.timeEstimate*60*1e3).toISOString()}else if(e.due)try{s=this.parseTaskDate(e.due).toISOString()}catch(i){console.warn("Invalid due date:",e.due)}else if(t&&a){let i=new Date(a);s=new Date(i.getTime()+3600*1e3).toISOString()}return{startISO:a,endISO:s}}static getYahooDateFormat(e,t){let{startISO:n,endISO:a}=this.getTaskDateRange(e,t),s=i=>{let o=new Date(i);return D(o,"yyyyMMdd'T'HHmmss")};return{startYahoo:n?s(n):null,endYahoo:a?s(a):null}}static getICSDateFormat(e,t=!0,n){let{startISO:a,endISO:s}=this.getTaskDateRange(e,t,n),i=o=>{let l=new Date(o);return this.formatDateToICS(l)};return{startICS:a?i(a):null,endICS:s?i(s):null}}static formatDateToICS(e){return e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,"")}static parseICSDate(e){let t=e.substr(0,4),n=e.substr(4,2),a=e.substr(6,2),s=e.substr(9,2),i=e.substr(11,2),o=e.substr(13,2);return new Date(`${t}-${n}-${a}T${s}:${i}:${o}Z`)}static parseTaskDate(e){return e.includes("T")?to(e):to(`${e}T00:00:00`)}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 `),n=[];return t.forEach(a=>{if(a.length<=75)n.push(a);else{let s=a;for(;s.length>75;)n.push(s.substring(0,75)),s=" "+s.substring(75);s.length>0&&n.push(s)}}),n.join(`\r `)}static generateMultipleTasksICSContent(e,t){let n=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),a=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//EN","CALSCALE:GREGORIAN"];return e.forEach((s,i)=>{let o=`${s.path.replace(/[^a-zA-Z0-9]/g,"-")}-${i}-${Date.now()}@tasknotes`;a.push("BEGIN:VEVENT"),a.push(`UID:${o}`),a.push(`DTSTAMP:${n}`),a.push(`SUMMARY:${this.escapeICSText(s.title)}`);let{startICS:l,endICS:c}=this.getICSDateFormat(s,!0,t);if(l){if(!c){let u=this.parseICSDate(l),p=new Date(u.getTime()+3600*1e3);c=this.formatDateToICS(p)}}else{let u;if(s.dateCreated?u=new Date(s.dateCreated):u=new Date,l=this.formatDateToICS(u),!c){let p=new Date(u.getTime()+36e5);c=this.formatDateToICS(p)}}a.push(`DTSTART:${l}`),a.push(`DTEND:${c}`);let d=this.buildDescription(s);if(d&&a.push(`DESCRIPTION:${this.escapeICSText(d)}`),s.contexts&&s.contexts.length>0&&a.push(`LOCATION:${this.escapeICSText(s.contexts.join(", "))}`),s.tags&&s.tags.length>0&&a.push(`CATEGORIES:${s.tags.map(u=>this.escapeICSText(u)).join(",")}`),s.priority){let p={highest:"1",high:"3",medium:"5",low:"7",lowest:"9"}[s.priority]||"5";a.push(`PRIORITY:${p}`)}if(s.status){let p={done:"COMPLETED","in-progress":"IN-PROCESS",todo:"NEEDS-ACTION",cancelled:"CANCELLED"}[s.status]||"NEEDS-ACTION";a.push(`STATUS:${p}`)}a.push("END:VEVENT")}),a.push("END:VCALENDAR"),this.foldICSLines(a.join(`\r `))}static downloadAllTasksICSFile(e,t,n){try{if(!e||e.length===0){new zp.Notice(t?t("services.calendarExport.notices.noTasksToExport"):"No tasks found to export");return}let a=this.generateMultipleTasksICSContent(e,n),s=new Blob([a],{type:"text/calendar"}),i=URL.createObjectURL(s),l=`tasknotes-all-tasks-${new Date().toISOString().split("T")[0]}.ics`,c=document.createElement("a");c.href=i,c.download=l,c.click(),URL.revokeObjectURL(i);let d=e.length===1?"":"s";new zp.Notice(t?t("services.calendarExport.notices.downloadSuccess",{filename:l,count:e.length,plural:d}):`Downloaded ${l} with ${e.length} task${d}`)}catch(a){console.error("Failed to download all tasks ICS file:",a),new zp.Notice(t?t("services.calendarExport.notices.downloadFailed"):"Failed to download calendar file")}}static downloadICSFile(e,t,n){try{let a=this.generateICSContent(e,n),s=new Blob([a],{type:"text/calendar"}),i=URL.createObjectURL(s),o=`${e.title.replace(/[^a-zA-Z0-9]/g,"-")}.ics`,l=document.createElement("a");l.href=i,l.download=o,l.click(),URL.revokeObjectURL(i),new zp.Notice(t?t("services.calendarExport.notices.singleDownloadSuccess",{filename:o}):`Downloaded ${o}`)}catch(a){console.error("Failed to download ICS file:",a),new zp.Notice(t?t("services.calendarExport.notices.downloadFailed"):"Failed to download calendar file")}}}});var jre,Bn,mc=b(()=>{jre=require("obsidian"),Bn=class extends jre.Menu{show(e){var t;if(e.instanceOf(MouseEvent))this.showAtMouseEvent(e);else if(e.instanceOf(KeyboardEvent)){let n=e.currentTarget;if(!n||!((t=n.instanceOf)!=null&&t.call(n,HTMLElement)))return;this.showAtPosition({x:n.getBoundingClientRect().left,y:n.getBoundingClientRect().bottom+4})}}}});var _f,nD,zre=b(()=>{_f=require("obsidian"),nD=class extends _f.Modal{constructor(e,t){super(e),this.options=t}onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("date-time-picker-modal"),this.options.title&&e.createEl("h3",{text:this.options.title}),new _f.Setting(e).setName("Date").addText(n=>{this.dateInput=n.inputEl,this.dateInput.type="date",this.options.currentDate&&(this.dateInput.value=this.options.currentDate)}),new _f.Setting(e).setName("Time (optional)").addText(n=>{this.timeInput=n.inputEl,this.timeInput.type="time",this.options.currentTime&&(this.timeInput.value=this.options.currentTime)}),new _f.Setting(e).addButton(n=>n.setButtonText("Cancel").onClick(()=>{this.close()})).addButton(n=>n.setButtonText("Select").setCta().onClick(()=>{let a=this.dateInput.value||null,s=this.timeInput.value||null;this.options.onSelect(a,s),this.close()})),setTimeout(()=>{this.dateInput.focus()},100);let t=n=>{if(n.key==="Enter"){n.preventDefault();let a=this.dateInput.value||null,s=this.timeInput.value||null;this.options.onSelect(a,s),this.close()}};this.dateInput.addEventListener("keydown",t),this.timeInput.addEventListener("keydown",t)}onClose(){let{contentEl:e}=this;e.empty()}}});var Bre={};Ke(Bre,{DateContextMenu:()=>ds});var ds,Bp=b(()=>{mc();zre();kt();ds=class{constructor(e){this.menu=new Bn,this.options=e,this.buildMenu()}t(e,t,n){var a;return((a=this.options.plugin)==null?void 0:a.i18n.translate(e,n))||t||e}buildMenu(){this.options.title&&(this.menu.addItem(s=>{s.setTitle(this.options.title||""),s.setIcon("calendar"),s.setDisabled(!0)}),this.menu.addSeparator());let e=this.getDateOptions(),t=e.filter(s=>s.category==="increment");t.length>0&&(t.forEach(s=>{this.menu.addItem(i=>{s.icon&&i.setIcon(s.icon),i.setTitle(s.label),i.onClick(async()=>{this.options.onSelect(s.value,null)})})}),this.menu.addSeparator()),e.filter(s=>s.category==="basic").forEach(s=>{this.menu.addItem(i=>{s.icon&&i.setIcon(s.icon);let l=s.value&&s.value===this.options.currentValue?this.t("contextMenus.date.selected","\u2713 {label}",{label:s.label}):s.label;i.setTitle(l),i.onClick(async()=>{this.options.onSelect(s.value,null)})})});let a=e.filter(s=>s.category==="weekday");a.length>0&&(this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.date.weekdaysLabel","Weekdays")),s.setIcon("calendar");let i=s.setSubmenu();a.forEach(o=>{i.addItem(l=>{let d=o.value&&o.value===this.options.currentValue?this.t("contextMenus.date.selected","\u2713 {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(s=>{s.setTitle(this.t("contextMenus.date.pickDateTime","Pick date & time\u2026")),s.setIcon("calendar"),s.onClick(async()=>{this.showDateTimePicker()})}),this.options.currentValue&&this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.date.clearDate","Clear date")),s.setIcon("x"),s.onClick(async()=>{this.options.onSelect(null,null)})})}getDateOptions(){let e=window.moment(),t=[];this.options.currentValue&&(t.push({label:this.t("contextMenus.date.increment.plusOneDay","+1 day"),value:jh(this.options.currentValue,1),icon:"plus",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.minusOneDay","-1 day"),value:jh(this.options.currentValue,-1),icon:"minus",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.plusOneWeek","+1 week"),value:jh(this.options.currentValue,7),icon:"plus-circle",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.minusOneWeek","-1 week"),value:jh(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"}),["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].forEach((o,l)=>{let c=e.clone().day(l);c.isSameOrBefore(e,"day")&&(c=c.add(1,"week"));let d=this.t(`common.weekdays.${o.toLowerCase()}`,o);t.push({label:d,value:c.format("YYYY-MM-DD"),icon:"calendar",category:"weekday"})});let a=e.clone().day(6);(a.isBefore(e)||a.isSame(e,"day"))&&a.add(1,"week"),t.push({label:this.t("contextMenus.date.basic.thisWeekend","This weekend"),value:a.format("YYYY-MM-DD"),icon:"calendar-days",category:"basic"});let s=e.clone().day(1).add(1,"week");t.push({label:this.t("contextMenus.date.basic.nextWeek","Next week"),value:s.format("YYYY-MM-DD"),icon:"calendar-plus",category:"basic"});let i=e.clone().add(1,"month").startOf("month");return t.push({label:this.t("contextMenus.date.basic.nextMonth","Next month"),value:i.format("YYYY-MM-DD"),icon:"calendar-range",category:"basic"}),t}show(e){this.menu.show(e)}showAtElement(e){this.menu.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4})}showDateTimePicker(){var n;let e=this.options.app||((n=this.options.plugin)==null?void 0:n.app);if(!e){console.error("DateContextMenu: No app instance available for modal");return}new nD(e,{currentDate:this.options.currentValue||null,currentTime:this.options.currentTime||null,title:this.t("contextMenus.date.modal.title","Set date & time"),onSelect:(a,s)=>{this.options.onSelect(a,s)}}).open()}}});var qre={};Ke(qre,{RecurrenceContextMenu:()=>po});var Mi,po,ZR,Mf=b(()=>{Mi=require("obsidian");mc();po=class{constructor(e){this.menu=new Bn,this.options=e,this.translate=e.plugin.i18n.translate.bind(e.plugin.i18n),this.buildMenu()}buildMenu(){this.getRecurrenceOptions().forEach(t=>{if(t.label.startsWith("\u2500")){this.menu.addSeparator();return}this.menu.addItem(n=>{let a=t.label;t.icon&&n.setIcon(t.icon),t.value===this.options.currentValue&&(a=`\u2713 ${t.label}`),n.setTitle(a),n.onClick(async()=>{let s=t.anchor||"scheduled";this.options.onSelect(t.value,s)})})}),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(){let e=[],t=new Date,n=["SU","MO","TU","WE","TH","FR","SA"],a=["January","February","March","April","May","June","July","August","September","October","November","December"],s=n[t.getDay()],i=t.getDate(),o=t.getMonth()+1,l=a[t.getMonth()],c=t.toLocaleDateString("en-US",{weekday:"long"}),d=this.formatDateForDTSTART(t);if(this.options.currentValue){let u=this.options.currentValue.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(u&&u[1].includes("T")){let p=u[1].split("T")[1];d=`${d}T${p}`}}else if(this.options.scheduledDate&&this.options.scheduledDate.includes("T")){let u=this.options.scheduledDate.match(/T(\d{2}):(\d{2})/);if(u){let p=u[1],m=u[2];d=`${d}T${p}${m}00Z`}}return e.push({label:this.translate("components.recurrenceContextMenu.daily"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days"}),e.push({label:this.translate("components.recurrenceContextMenu.weeklyOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1;BYDAY=${s}`,icon:"calendar"}),e.push({label:this.translate("components.recurrenceContextMenu.everyTwoWeeksOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=2;BYDAY=${s}`,icon:"calendar"}),e.push({label:this.translate("components.recurrenceContextMenu.monthlyOnThe",{ordinal:this.getOrdinal(i)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=${i}`,icon:"calendar-range"}),e.push({label:this.translate("components.recurrenceContextMenu.everyThreeMonthsOnThe",{ordinal:this.getOrdinal(i)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=${i}`,icon:"calendar-range"}),e.push({label:this.translate("components.recurrenceContextMenu.yearlyOn",{month:l,ordinal:this.getOrdinal(i)}),value:`DTSTART:${d};FREQ=YEARLY;INTERVAL=1;BYMONTH=${o};BYMONTHDAY=${i}`,icon:"calendar-clock"}),e.push({label:this.translate("components.recurrenceContextMenu.weekdaysOnly"),value:`DTSTART:${d};FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`,icon:"briefcase"}),e.push({label:"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",value:"",icon:void 0}),e.push({label:this.translate("components.recurrenceContextMenu.dailyAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days",anchor:"completion"}),e.push({label:this.translate("components.recurrenceContextMenu.every3DaysAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=3`,icon:"calendar-days",anchor:"completion"}),e.push({label:this.translate("components.recurrenceContextMenu.weeklyAfterCompletion"),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1`,icon:"calendar",anchor:"completion"}),e.push({label:this.translate("components.recurrenceContextMenu.monthlyAfterCompletion"),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1`,icon:"calendar-range",anchor:"completion"}),e}formatDateForDTSTART(e){let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}${n}${a}`}getOrdinal(e){let t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}showCustomRecurrenceModal(){new ZR(this.options.app,this.options.currentValue||"",this.options.currentAnchor||"scheduled",this.options.scheduledDate,(e,t)=>{e&&this.options.onSelect(e,t)}).open()}show(e){this.menu.show(e)}},ZR=class extends Mi.Modal{constructor(t,n,a,s,i){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=n,this.recurrenceAnchor=a,this.scheduledDate=s,this.onSubmit=i,this.parseCurrentValue()}parseCurrentValue(){if(!this.currentValue){if(this.dtstart=this.formatTodayForInput(),this.scheduledDate&&this.scheduledDate.includes("T")){let n=this.scheduledDate.match(/T(\d{2}):(\d{2})/);n&&(this.dtstartTime=`${n[1]}:${n[2]}`)}return}let t=this.currentValue.split(";");for(let n of t){let a=n.includes(":")&&n.startsWith("DTSTART")?":":"=",[s,i]=n.split(a);switch(s){case"DTSTART":if(i.length>=8){if(this.dtstart=`${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}`,i.length>8&&i.includes("T")){let o=i.slice(9);o.length>=4&&(this.dtstartTime=`${o.slice(0,2)}:${o.slice(2,4)}`)}}else{let o=new Date(i);isNaN(o.getTime())?this.dtstart=this.formatTodayForInput():this.dtstart=i}break;case"FREQ":this.frequency=i;break;case"INTERVAL":this.interval=parseInt(i)||1;break;case"BYDAY":{let o=i.split(","),l=[];for(let c of o){let d=c.match(/^(-?\d+)([A-Z]{2})$/);d?(this.bySetPos=parseInt(d[1]),l.push(d[2])):l.push(c)}this.byDay=l;break}case"BYMONTHDAY":this.byMonthDay=i.split(",").map(o=>parseInt(o));break;case"BYMONTH":this.byMonth=i.split(",").map(o=>parseInt(o));break;case"BYSETPOS":this.bySetPos=parseInt(i);break;case"COUNT":this.count=parseInt(i),this.endType="count";break;case"UNTIL":i.length===8?this.until=`${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}`:this.until=i,this.endType="until";break}}}formatTodayForInput(){let t=new Date,n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${a}-${s}`}onOpen(){let{contentEl:t}=this;t.empty(),t.createEl("h2",{text:"Custom Recurrence"}),new Mi.Setting(t).setName("Start date").setDesc("The date when the recurrence pattern begins").addText(Z=>{Z.inputEl.type="date",Z.setValue(this.dtstart).onChange(ae=>{this.dtstart=ae})}),new Mi.Setting(t).setName("Start time").setDesc("The time when recurring instances should appear (optional)").addText(Z=>{Z.inputEl.type="time",Z.setValue(this.dtstartTime).onChange(ae=>{this.dtstartTime=ae})}),new Mi.Setting(t).setName("Recur from").setDesc("When should the next occurrence be calculated from?").addDropdown(Z=>{Z.addOption("scheduled","Scheduled date (fixed schedule)").addOption("completion","Completion date (flexible schedule)").setValue(this.recurrenceAnchor).onChange(ae=>{this.recurrenceAnchor=ae})}),new Mi.Setting(t).setName("Frequency").addDropdown(Z=>{Z.addOption("DAILY","Daily").addOption("WEEKLY","Weekly").addOption("MONTHLY","Monthly").addOption("YEARLY","Yearly").setValue(this.frequency).onChange(ae=>{this.frequency=ae,this.updateFrequencySpecificVisibility()})}),new Mi.Setting(t).setName("Interval").setDesc("Every X days/weeks/months/years").addText(Z=>{Z.setValue(this.interval.toString()).onChange(ae=>{this.interval=parseInt(ae)||1})});let n=new Mi.Setting(t).setName("Days of week").setDesc("Select specific days (for weekly recurrence)"),a=n.controlEl.createDiv("days-container");[{key:"MO",label:"Mon"},{key:"TU",label:"Tue"},{key:"WE",label:"Wed"},{key:"TH",label:"Thu"},{key:"FR",label:"Fri"},{key:"SA",label:"Sat"},{key:"SU",label:"Sun"}].forEach(Z=>{let ae=a.createEl("label",{cls:"day-checkbox"});ae.style.display="inline-block",ae.style.marginRight="8px";let Ne=ae.createEl("input",{type:"checkbox"});Ne.checked=this.byDay.includes(Z.key),Ne.addEventListener("change",()=>{Ne.checked?this.byDay.includes(Z.key)||this.byDay.push(Z.key):this.byDay=this.byDay.filter(Ve=>Ve!==Z.key)}),ae.createSpan({text:` ${Z.label}`})});let i=new Mi.Setting(t).setName("Monthly recurrence").setDesc("Choose how to repeat monthly"),o=i.controlEl.createDiv("monthly-options"),l=o.createEl("label",{cls:"radio-option"});l.style.display="block",l.style.marginBottom="8px";let c=l.createEl("input",{type:"radio",value:"bydate"});c.name="monthly-type",c.checked=this.byMonthDay.length>0||this.byDay.length===0&&this.bySetPos===void 0,l.createSpan({text:" On day "});let d=l.createEl("select");d.style.marginLeft="4px",d.style.marginRight="4px";for(let Z=1;Z<=31;Z++){let ae=d.createEl("option",{value:Z.toString(),text:Z.toString()});(this.byMonthDay.length>0&&this.byMonthDay[0]===Z||this.byMonthDay.length===0&&Z===new Date().getDate())&&(ae.selected=!0)}l.createSpan({text:" of each month"});let u=o.createEl("label",{cls:"radio-option"});u.style.display="block",u.style.marginBottom="8px";let p=u.createEl("input",{type:"radio",value:"byday"});p.name="monthly-type",p.checked=this.byDay.length>0&&this.bySetPos!==void 0,u.createSpan({text:" On the "});let m=u.createEl("select");m.style.marginLeft="4px",m.style.marginRight="4px";let h=[{value:"1",text:"first"},{value:"2",text:"second"},{value:"3",text:"third"},{value:"4",text:"fourth"},{value:"-1",text:"last"}];h.forEach(Z=>{let ae=m.createEl("option",{value:Z.value,text:Z.text});(this.bySetPos===parseInt(Z.value)||!this.bySetPos&&Z.value==="1")&&(ae.selected=!0)});let f=u.createEl("select");f.style.marginLeft="4px",f.style.marginRight="4px";let g=[{value:"MO",text:"Monday"},{value:"TU",text:"Tuesday"},{value:"WE",text:"Wednesday"},{value:"TH",text:"Thursday"},{value:"FR",text:"Friday"},{value:"SA",text:"Saturday"},{value:"SU",text:"Sunday"}],k=["SU","MO","TU","WE","TH","FR","SA"][new Date().getDay()];g.forEach(Z=>{let ae=f.createEl("option",{value:Z.value,text:Z.text});(this.byDay.length>0&&this.byDay[0]===Z.value||this.byDay.length===0&&Z.value===k)&&(ae.selected=!0)}),u.createSpan({text:" of each month"});let T=new Mi.Setting(t).setName("Yearly recurrence").setDesc("Choose how to repeat yearly"),w=T.controlEl.createDiv("yearly-options"),S=w.createEl("label",{cls:"radio-option"});S.style.display="block",S.style.marginBottom="8px";let x=S.createEl("input",{type:"radio",value:"bydate"});x.name="yearly-type",x.checked=this.byMonthDay.length>0||this.byDay.length===0&&this.bySetPos===void 0,S.createSpan({text:" On "});let C=S.createEl("select");C.style.marginLeft="4px",C.style.marginRight="4px";let M=["January","February","March","April","May","June","July","August","September","October","November","December"];M.forEach((Z,ae)=>{let Ne=C.createEl("option",{value:(ae+1).toString(),text:Z});(this.byMonth.length>0&&this.byMonth[0]===ae+1||this.byMonth.length===0&&ae+1===new Date().getMonth()+1)&&(Ne.selected=!0)});let N=S.createEl("select");N.style.marginLeft="4px",N.style.marginRight="4px";for(let Z=1;Z<=31;Z++){let ae=N.createEl("option",{value:Z.toString(),text:Z.toString()});(this.byMonthDay.length>0&&this.byMonthDay[0]===Z||this.byMonthDay.length===0&&Z===new Date().getDate())&&(ae.selected=!0)}S.createSpan({text:" each year"});let F=w.createEl("label",{cls:"radio-option"});F.style.display="block",F.style.marginBottom="8px";let G=F.createEl("input",{type:"radio",value:"byday"});G.name="yearly-type",G.checked=this.byDay.length>0&&this.bySetPos!==void 0,F.createSpan({text:" On the "});let R=F.createEl("select");R.style.marginLeft="4px",R.style.marginRight="4px",h.forEach(Z=>{let ae=R.createEl("option",{value:Z.value,text:Z.text});(this.bySetPos===parseInt(Z.value)||!this.bySetPos&&Z.value==="1")&&(ae.selected=!0)});let A=F.createEl("select");A.style.marginLeft="4px",A.style.marginRight="4px",g.forEach(Z=>{let ae=A.createEl("option",{value:Z.value,text:Z.text});(this.byDay.length>0&&this.byDay[0]===Z.value||this.byDay.length===0&&Z.value===k)&&(ae.selected=!0)});let I=F.createEl("select");I.style.marginLeft="4px",I.style.marginRight="4px",M.forEach((Z,ae)=>{let Ne=I.createEl("option",{value:(ae+1).toString(),text:Z});(this.byMonth.length>0&&this.byMonth[0]===ae+1||this.byMonth.length===0&&ae+1===new Date().getMonth()+1)&&(Ne.selected=!0)}),F.createSpan({text:" each year"}),new Mi.Setting(t).setName("End condition").setDesc("Choose when the recurrence should end");let L=t.createDiv("end-condition-container"),V=L.createEl("label",{cls:"radio-option"});V.style.display="block",V.style.marginBottom="8px";let W=V.createEl("input",{type:"radio",value:"never"});W.name="end-type",W.checked=this.endType==="never",V.createSpan({text:" Never ends"});let H=L.createEl("label",{cls:"radio-option"});H.style.display="block",H.style.marginBottom="8px";let K=H.createEl("input",{type:"radio",value:"count"});K.name="end-type",K.checked=this.endType==="count",H.createSpan({text:" End after "});let le=H.createEl("input",{type:"number",placeholder:"10"});le.style.width="60px",le.style.marginLeft="4px",le.style.marginRight="4px",le.value=this.count?this.count.toString():"",H.createSpan({text:" occurrences"});let ge=L.createEl("label",{cls:"radio-option"});ge.style.display="block",ge.style.marginBottom="8px";let te=ge.createEl("input",{type:"radio",value:"until"});te.name="end-type",te.checked=this.endType==="until",ge.createSpan({text:" End on "});let vt=ge.createEl("input",{type:"date"});vt.style.marginLeft="4px",vt.value=this.until?this.until.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"):"",W.addEventListener("change",()=>{W.checked&&(this.endType="never")}),K.addEventListener("change",()=>{K.checked&&(this.endType="count")}),te.addEventListener("change",()=>{te.checked&&(this.endType="until")}),le.addEventListener("input",()=>{this.count=parseInt(le.value)||void 0,le.value&&(K.checked=!0,this.endType="count")}),vt.addEventListener("input",()=>{this.until=vt.value?vt.value.replace(/-/g,""):"",vt.value&&(te.checked=!0,this.endType="until")}),this.updateFrequencySpecificVisibility=()=>{n.settingEl.style.display=this.frequency==="WEEKLY"?"flex":"none",i.settingEl.style.display=this.frequency==="MONTHLY"?"flex":"none",T.settingEl.style.display=this.frequency==="YEARLY"?"flex":"none"},this.updateFrequencySpecificVisibility();let Ar=t.createDiv("button-container");Ar.style.display="flex",Ar.style.justifyContent="flex-end",Ar.style.gap="8px",Ar.style.marginTop="16px",Ar.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),Ar.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{let Z=c.checked?"bydate":"byday",ae=x.checked?"bydate":"byday";this.frequency==="MONTHLY"?Z==="bydate"?(this.byMonthDay=[parseInt(d.value)],this.byDay=[],this.bySetPos=void 0):(this.byMonthDay=[],this.byDay=[f.value],this.bySetPos=parseInt(m.value)):this.frequency==="YEARLY"&&(ae==="bydate"?(this.byMonth=[parseInt(C.value)],this.byMonthDay=[parseInt(N.value)],this.byDay=[],this.bySetPos=void 0):(this.byMonth=[parseInt(I.value)],this.byMonthDay=[],this.byDay=[A.value],this.bySetPos=parseInt(R.value)));let Ne=this.buildRRule(Z,ae);this.onSubmit(Ne,this.recurrenceAnchor),this.close()})}updateFrequencySpecificVisibility(){}buildRRule(t,n){let a=[];if(this.dtstart){let s=this.dtstart.replace(/-/g,"");if(this.dtstartTime){let i=this.dtstartTime.replace(":","")+"00";s=`${s}T${i}`}a.push(`DTSTART:${s}`)}switch(a.push(`FREQ=${this.frequency}`),this.interval>1&&a.push(`INTERVAL=${this.interval}`),this.frequency){case"WEEKLY":this.byDay.length>0&&a.push(`BYDAY=${this.byDay.join(",")}`);break;case"MONTHLY":if(t==="bydate"){let s=this.byMonthDay.length>0?this.byMonthDay[0]:new Date().getDate();a.push(`BYMONTHDAY=${s}`)}else if(t==="byday"&&this.byDay.length>0){let s=this.bySetPos||1;a.push(`BYDAY=${s}${this.byDay[0]}`)}break;case"YEARLY":if(n==="bydate"){let s=this.byMonth.length>0?this.byMonth[0]:new Date().getMonth()+1,i=this.byMonthDay.length>0?this.byMonthDay[0]:new Date().getDate();a.push(`BYMONTH=${s}`),a.push(`BYMONTHDAY=${i}`)}else if(n==="byday"){let s=this.byMonth.length>0?this.byMonth[0]:new Date().getMonth()+1;if(a.push(`BYMONTH=${s}`),this.byDay.length>0){let i=this.bySetPos||1;a.push(`BYDAY=${i}${this.byDay[0]}`)}}break}switch(this.endType){case"count":this.count&&this.count>0&&a.push(`COUNT=${this.count}`);break;case"until":if(this.until){let s=this.until.replace(/-/g,"");a.push(`UNTIL=${s}`)}break}return a.join(";")}onClose(){let{contentEl:t}=this;t.empty()}}});async function Hre(r,e){return new KR(r,e).show()}var MT,KR,Ure=b(()=>{MT=require("obsidian"),KR=class extends MT.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 MT.Setting(e).setName(this.options.title).setHeading(),new MT.Setting(e).addText(s=>{this.inputEl=s.inputEl,s.setPlaceholder(this.options.placeholder||"").setValue(this.options.initialValue||"").onChange(()=>{}),setTimeout(()=>{this.inputEl.focus(),this.inputEl.select()},100)});let t=e.createEl("div",{cls:"modal-button-container"});t.style.display="flex",t.style.gap="10px",t.style.justifyContent="flex-end",t.style.marginTop="20px";let n=t.createEl("button",{text:this.options.cancelText});n.addEventListener("click",()=>{this.resolve(null),this.close()});let a=t.createEl("button",{text:this.options.confirmText,cls:"mod-cta"});a.addEventListener("click",()=>{let s=this.inputEl.value.trim();this.resolve(s||null),this.close()}),this.inputEl.addEventListener("keydown",s=>{s.key==="Enter"?(s.preventDefault(),a.click()):s.key==="Escape"&&(s.preventDefault(),n.click())})}onClose(){let{contentEl:e}=this;e.empty(),this.resolve&&this.resolve(null)}}});var je,Af,QR=b(()=>{je=require("obsidian");kt();Pf();rD();Yu();Bp();Mf();Ure();Dd();zE();Qh();io();mc();Af=class{constructor(e){this.targetDoc=document;this.menu=new Bn,this.options=e,this.buildMenu()}t(e,t){return this.options.plugin.i18n.translate(e,t)}buildMenu(){var n,a;let{task:e,plugin:t}=this.options;if(this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.status")),s.setIcon("circle");let i=s.setSubmenu();this.addStatusOptions(i,e,t)}),e.recurrence){this.menu.addSeparator();let s=me(this.options.targetDate),i=((n=e.complete_instances)==null?void 0:n.includes(s))||!1;this.menu.addItem(l=>{l.setTitle(i?this.t("contextMenus.task.markIncomplete"):this.t("contextMenus.task.markComplete")),l.setIcon(i?"x":"check"),l.onClick(async()=>{var c,d;try{await t.toggleRecurringTaskComplete(e,this.options.targetDate),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){let p=u instanceof Error?u.message:String(u);console.error("Error toggling recurring task completion:",{error:p,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.toggleCompletionFailure",{message:p}))}})});let o=((a=e.skipped_instances)==null?void 0:a.includes(s))||!1;this.menu.addItem(l=>{l.setTitle(o?this.t("contextMenus.task.unskipInstance"):this.t("contextMenus.task.skipInstance")),l.setIcon(o?"undo":"x-circle"),l.onClick(async()=>{var c,d;try{await t.taskService.toggleRecurringTaskSkipped(e,this.options.targetDate),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){let p=u instanceof Error?u.message:String(u);console.error("Error toggling recurring task skip:",{error:p,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.toggleSkipFailure",{message:p}))}})})}this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.priority")),s.setIcon("star");let i=s.setSubmenu();this.addPriorityOptions(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.dueDate")),s.setIcon("calendar");let i=s.setSubmenu();this.addDateOptions(i,e.due,async o=>{var l,c;try{await t.updateTaskProperty(e,"due",o||void 0),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){let u=d instanceof Error?d.message:String(d);console.error("Error updating task due date:",{error:u,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.updateDueDateFailure",{message:u}))}},()=>{t.openDueDateModal(e)})}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.scheduledDate")),s.setIcon("calendar-clock");let i=s.setSubmenu();this.addDateOptions(i,e.scheduled,async o=>{var l,c;try{await t.updateTaskProperty(e,"scheduled",o||void 0),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){let u=d instanceof Error?d.message:String(d);console.error("Error updating task scheduled date:",{error:u,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.updateScheduledFailure",{message:u}))}},()=>{t.openScheduledDateModal(e)})}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.reminders")),s.setIcon("bell");let i=s.setSubmenu();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(o=>{o.setTitle(this.t("contextMenus.task.manageReminders")),o.setIcon("settings"),o.onClick(()=>{new uo(t.app,t,e,async c=>{var d,u;try{await t.updateTaskProperty(e,"reminders",c.length>0?c:void 0),(u=(d=this.options).onUpdate)==null||u.call(d)}catch(p){console.error("Error updating reminders:",p),new je.Notice(this.t("contextMenus.task.notices.updateRemindersFailure"))}}).open()})}),e.reminders&&e.reminders.length>0&&i.addItem(o=>{o.setTitle(this.t("contextMenus.task.clearReminders")),o.setIcon("trash"),o.onClick(async()=>{var l,c;try{await t.updateTaskProperty(e,"reminders",void 0),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){console.error("Error clearing reminders:",d),new je.Notice(this.t("contextMenus.task.notices.clearRemindersFailure"))}})})}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.dependencies.title")),s.setIcon("git-branch");let i=s.setSubmenu();this.addDependencyMenuItems(i,e,t)}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.organization.title")),s.setIcon("folder-tree");let i=s.setSubmenu();this.addOrganizationMenuItems(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(s=>{let i=t.getActiveTimeSession(e);s.setTitle(i?this.t("contextMenus.task.stopTimeTracking"):this.t("contextMenus.task.startTimeTracking")),s.setIcon(i?"pause":"play"),s.onClick(async()=>{var l,c;t.getActiveTimeSession(e)?await t.stopTimeTracking(e):await t.startTimeTracking(e),(c=(l=this.options).onUpdate)==null||c.call(l)})}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.editTimeEntries")),s.setIcon("clock"),s.onClick(()=>{t.openTimeEntryEditor(e)})}),this.menu.addItem(s=>{s.setTitle(e.archived?this.t("contextMenus.task.unarchive"):this.t("contextMenus.task.archive")),s.setIcon(e.archived?"archive-restore":"archive"),s.onClick(async()=>{var i,o;try{await t.toggleTaskArchive(e),(o=(i=this.options).onUpdate)==null||o.call(i)}catch(l){let c=l instanceof Error?l.message:String(l);console.error("Error toggling task archive:",{error:c,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.archiveFailure",{message:c}))}})}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.openNote")),s.setIcon("file-text"),s.onClick(()=>{let i=t.app.vault.getAbstractFileByPath(e.path);i instanceof je.TFile&&t.app.workspace.getLeaf(!1).openFile(i)})}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.copyTitle")),s.setIcon("copy"),s.onClick(async()=>{try{await navigator.clipboard.writeText(e.title),new je.Notice(this.t("contextMenus.task.notices.copyTitleSuccess"))}catch(i){new je.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.noteActions")),s.setIcon("file-text");let i=s.setSubmenu(),o=t.app.vault.getAbstractFileByPath(e.path);if(o instanceof je.TFile){try{t.app.workspace.trigger("file-menu",i,o,"file-explorer")}catch(l){console.debug("Native file menu not available, using fallback")}i.addItem(l=>{l.setTitle(this.t("contextMenus.task.rename")),l.setIcon("pencil"),l.onClick(async()=>{try{let c=o.basename,d=await Hre(t.app,{title:this.t("contextMenus.task.renameTitle"),placeholder:this.t("contextMenus.task.renamePlaceholder"),initialValue:c});if(d&&d.trim()!==""&&d!==c){let u=o.extension,p=d.endsWith(`.${u}`)?d:`${d}.${u}`,m=o.parent?`${o.parent.path}/${p}`:p;await t.app.vault.rename(o,m),new je.Notice(this.t("contextMenus.task.notices.renameSuccess",{name:p})),this.options.onUpdate&&this.options.onUpdate()}}catch(c){console.error("Error renaming file:",c),new je.Notice(this.t("contextMenus.task.notices.renameFailure"))}})}),i.addItem(l=>{l.setTitle(this.t("contextMenus.task.delete")),l.setIcon("trash"),l.onClick(async()=>{var d;await pi(t.app,{title:this.t("contextMenus.task.deleteTitle"),message:this.t("contextMenus.task.deleteMessage",{name:o.name}),confirmText:this.t("contextMenus.task.deleteConfirm"),cancelText:this.t("common.cancel"),isDestructive:!0})&&((d=t.taskCalendarSyncService)!=null&&d.isEnabled()&&e.googleCalendarEventId&&t.taskCalendarSyncService.deleteTaskFromCalendarByPath(e.path,e.googleCalendarEventId).catch(u=>{console.warn("Failed to delete task from Google Calendar:",u)}),t.app.vault.trash(o,!0))})}),i.addSeparator(),i.addItem(l=>{l.setTitle(this.t("contextMenus.task.copyPath")),l.setIcon("copy"),l.onClick(async()=>{try{await navigator.clipboard.writeText(o.path),new je.Notice(this.t("contextMenus.task.notices.copyPathSuccess"))}catch(c){new je.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),i.addItem(l=>{l.setTitle(this.t("contextMenus.task.copyUrl")),l.setIcon("link"),l.onClick(async()=>{try{let c=`obsidian://open?vault=${encodeURIComponent(t.app.vault.getName())}&file=${encodeURIComponent(o.path)}`;await navigator.clipboard.writeText(c),new je.Notice(this.t("contextMenus.task.notices.copyUrlSuccess"))}catch(c){new je.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),i.addSeparator(),i.addItem(l=>{l.setTitle(this.t("contextMenus.task.showInExplorer")),l.setIcon("folder-open"),l.onClick(()=>{t.app.workspace.getLeaf().setViewState({type:"file-explorer",state:{}}).then(()=>{let c=t.app.workspace.getLeavesOfType("file-explorer")[0];c!=null&&c.view&&"revealInFolder"in c.view&&c.view.revealInFolder(o)})})})}}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.addToCalendar")),s.setIcon("calendar-plus");let i=s.setSubmenu();i.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.google")),o.setIcon("external-link"),o.onClick(()=>{Jo.openCalendarURL({type:"google",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.outlook")),o.setIcon("external-link"),o.onClick(()=>{Jo.openCalendarURL({type:"outlook",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.yahoo")),o.setIcon("external-link"),o.onClick(()=>{Jo.openCalendarURL({type:"yahoo",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addSeparator(),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.downloadIcs")),o.setIcon("download"),o.onClick(()=>{Jo.downloadICSFile(e,this.t.bind(this))})}),i.addSeparator(),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.syncToGoogle")),o.setIcon("refresh-cw"),o.onClick(async()=>{var l,c,d;if(!((l=t.taskCalendarSyncService)!=null&&l.isEnabled())){new je.Notice(this.t("contextMenus.task.calendar.syncToGoogleNotConfigured"));return}try{await t.taskCalendarSyncService.syncTaskToCalendar(e),new je.Notice(this.t("contextMenus.task.calendar.syncToGoogleSuccess")),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){console.error("Failed to sync task to Google Calendar:",u),new je.Notice(this.t("contextMenus.task.calendar.syncToGoogleFailed"))}})})}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.recurrence")),s.setIcon("refresh-ccw");let i=s.setSubmenu(),o=typeof e.recurrence=="string"?e.recurrence:void 0;this.addRecurrenceOptions(i,o,async l=>{var c,d;try{await t.updateTaskProperty(e,"recurrence",l||void 0),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){let p=u instanceof Error?u.message:String(u);console.error("Error updating task recurrence:",{error:p,taskPath:e.path}),new je.Notice(this.t("contextMenus.task.notices.updateRecurrenceFailure",{message:p}))}},t)}),this.menu.addSeparator(),this.menu.addItem(s=>{s.setTitle(this.t("contextMenus.task.createSubtask")),s.setIcon("plus"),s.onClick(()=>{let i=t.app.vault.getAbstractFileByPath(e.path);if(i instanceof je.TFile){let o=Wo(t.app,i,e.path,"","",t.settings.useFrontmatterMarkdownLinks);t.openTaskCreationModal({projects:[o]})}})}),setTimeout(()=>{this.updateMainMenuIconColors(e,t)},10)}addDependencyMenuItems(e,t,n){var i,o;e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.addBlockedBy")),l.setIcon("link-2"),l.onClick(()=>{this.menu.hide(),this.openBlockedBySelector(t,n)})});let a=(i=t.blockedBy)!=null?i:[];a.length>0&&e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlockedBy")),l.setIcon("unlink");let c=l.setSubmenu();a.forEach((d,u)=>{c.addItem(p=>{let m=RI(d)||this.t("contextMenus.task.dependencies.unknownDependency");p.setTitle(m),p.onClick(async()=>{var h,f;try{let g=a.filter((k,T)=>T!==u),y=await n.updateTaskProperty(t,"blockedBy",g.length>0?g:void 0);Object.assign(t,y),new je.Notice(this.t("contextMenus.task.dependencies.notices.blockedByRemoved")),(f=(h=this.options).onUpdate)==null||f.call(h)}catch(g){console.error("Failed to remove blocked-by dependency:",g),new je.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,n)})});let s=(o=t.blocking)!=null?o:[];s.length>0&&e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlocking")),l.setIcon("git-branch-minus");let c=l.setSubmenu();s.forEach(d=>{let u=n.app.vault.getAbstractFileByPath(d),p=u instanceof je.TFile?n.app.metadataCache.fileToLinktext(u,t.path,!1):d.split("/").pop()||d;c.addItem(m=>{m.setTitle(p),m.onClick(async()=>{var h,f;try{await n.taskService.updateBlockingRelationships(t,[],[d],{});let g=await n.cacheManager.getTaskInfo(t.path);g&&Object.assign(t,g),new je.Notice(this.t("contextMenus.task.dependencies.notices.blockingRemoved")),(f=(h=this.options).onUpdate)==null||f.call(h)}catch(g){console.error("Failed to remove blocking dependency:",g),new je.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}})})})})}dedupeDependencyEntries(e){let t=new Map;for(let n of e){let a=Yo(n);if(!a)continue;let s=this.getDependencyKey(a);t.has(s)||t.set(s,a)}return Array.from(t.values())}async openBlockedBySelector(e,t){let n=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 s=js(t.app,e.path,a.path,t.settings.useFrontmatterMarkdownLinks);return!n.has(s)},async a=>{await this.handleBlockedBySelection(e,t,a)})}async openBlockingSelector(e,t){var a;let n=new Set((a=e.blocking)!=null?a:[]);await this.openTaskDependencySelector(t,s=>s.path===e.path?!1:!n.has(s.path),async s=>{await this.handleBlockingSelection(e,t,s)})}async openTaskDependencySelector(e,t,n){var a,s;try{let i=e.cacheManager,l=((s=await((a=i==null?void 0:i.getAllTasks)==null?void 0:a.call(i)))!=null?s:[]).filter(t);if(l.length===0){new je.Notice(this.t("contextMenus.task.dependencies.notices.noEligibleTasks"));return}Zn(e,l,async c=>{c&&await n(c)})}catch(i){console.error("Failed to open task selector for dependencies:",i),new je.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockedBySelection(e,t,n){var a,s;if(n.path!==e.path)try{let i={uid:js(t.app,e.path,n.path,t.settings.useFrontmatterMarkdownLinks),reltype:as},o=Array.isArray(e.blockedBy)?e.blockedBy:[],l=this.dedupeDependencyEntries([...o,i]);if(l.length===o.length)return;let c=await t.updateTaskProperty(e,"blockedBy",l);Object.assign(e,c),new je.Notice(this.t("contextMenus.task.dependencies.notices.blockedByAdded",{count:1})),(s=(a=this.options).onUpdate)==null||s.call(a)}catch(i){console.error("Failed to add blocked-by dependency via selector:",i),new je.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockingSelection(e,t,n){var s,i,o;let a=n.path;if(a!==e.path&&!((s=e.blocking)!=null&&s.includes(a)))try{let l={uid:js(t.app,a,e.path,t.settings.useFrontmatterMarkdownLinks),reltype:as};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 je.Notice(this.t("contextMenus.task.dependencies.notices.blockingAdded",{count:1})),(o=(i=this.options).onUpdate)==null||o.call(i)}catch(l){console.error("Failed to add blocking dependency via selector:",l),new je.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,n){e.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addToProject")),a.setIcon("folder-plus"),a.onClick(()=>{this.menu.hide(),this.openProjectSelector(t,n)})}),e.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addSubtasks")),a.setIcon("indent"),a.onClick(()=>{this.menu.hide(),this.openSubtaskAssignmentSelector(t,n)})})}async openProjectSelector(e,t){try{new md(t.app,t,async a=>{a&&await this.addTaskToProject(e,t,a)}).open()}catch(n){console.error("Failed to open project selector:",n),new je.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"))}}async openSubtaskAssignmentSelector(e,t){var n,a;try{let s=t.cacheManager,o=((a=await((n=s==null?void 0:s.getAllTasks)==null?void 0:n.call(s)))!=null?a:[]).filter(l=>l.path!==e.path);if(o.length===0){new je.Notice(this.t("contextMenus.task.organization.notices.noEligibleSubtasks"));return}Zn(t,o,async l=>{l&&await this.assignTaskAsSubtask(e,t,l)})}catch(s){console.error("Failed to open subtask assignment selector:",s),new je.Notice(this.t("contextMenus.task.organization.notices.subtaskSelectFailed"))}}async addTaskToProject(e,t,n){var a,s;try{if(!(n instanceof je.TFile)){new je.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"));return}let i=Wo(t.app,n,e.path,"","",t.settings.useFrontmatterMarkdownLinks),o=`[[${n.basename}]]`,l=Array.isArray(e.projects)?e.projects:[];if(l.includes(i)||l.includes(o)){new je.Notice(this.t("contextMenus.task.organization.notices.alreadyInProject"));return}let d=[...l.filter(p=>p!==o),i],u=await t.updateTaskProperty(e,"projects",d);Object.assign(e,u),new je.Notice(this.t("contextMenus.task.organization.notices.addedToProject",{project:n.basename})),(s=(a=this.options).onUpdate)==null||s.call(a)}catch(i){console.error("Failed to add task to project:",i),new je.Notice(this.t("contextMenus.task.organization.notices.addToProjectFailed"))}}async assignTaskAsSubtask(e,t,n){var a,s;try{let i=t.app.vault.getAbstractFileByPath(e.path);if(!(i instanceof je.TFile)){new je.Notice(this.t("contextMenus.task.organization.notices.currentTaskNotFound"));return}let o=Wo(t.app,i,n.path,"","",t.settings.useFrontmatterMarkdownLinks),l=`[[${i.basename}]]`,c=Array.isArray(n.projects)?n.projects:[];if(c.includes(o)||c.includes(l)){new je.Notice(this.t("contextMenus.task.organization.notices.alreadySubtask"));return}let u=[...c.filter(m=>m!==l),o],p=await t.updateTaskProperty(n,"projects",u);Object.assign(n,p),new je.Notice(this.t("contextMenus.task.organization.notices.addedAsSubtask",{subtask:n.title,parent:i.basename})),(s=(a=this.options).onUpdate)==null||s.call(a)}catch(i){console.error("Failed to assign task as subtask:",i),new je.Notice(this.t("contextMenus.task.organization.notices.addAsSubtaskFailed"))}}buildProjectReference(e,t,n){return Wo(n.app,e,t,"","",n.settings.useFrontmatterMarkdownLinks)}updateMainMenuIconColors(e,t){let n=this.targetDoc.querySelector(".menu");if(!n)return;let a=n.querySelectorAll(".menu-item"),s=this.t("contextMenus.task.status"),i=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===s){let u=t.settings.customStatuses.find(p=>p.value===e.status);u&&u.color&&(c.style.color=u.color)}else if(d===i){let u=t.settings.customPriorities.find(p=>p.value===e.priority);u&&u.color&&(c.style.color=u.color)}}})}addStatusOptions(e,t,n){this.getStatusOptions(t,n).forEach((s,i)=>{e.addItem(o=>{let l=s.label;o.setIcon(s.icon||"circle"),s.value===t.status&&(l=this.t("contextMenus.task.statusSelected",{label:s.label})),o.setTitle(l),o.onClick(async()=>{var c,d;try{await n.updateTaskProperty(t,"status",s.value),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){let p=u instanceof Error?u.message:String(u);console.error("Error updating task status:",{error:p,taskPath:t.path}),new je.Notice(`Failed to update task status: ${p}`)}}),s.color&&setTimeout(()=>{let c=o.dom||o.domEl;if(c){let d=c.querySelector(".menu-item-icon");d&&(d.style.color=s.color)}},10)})})}addPriorityOptions(e,t,n){n.priorityManager.getPrioritiesByWeight().forEach(s=>{e.addItem(i=>{let o=s.label;i.setIcon("star"),s.value===t.priority&&(o=this.t("contextMenus.task.prioritySelected",{label:s.label})),i.setTitle(o),i.onClick(async()=>{var l,c;try{await n.updateTaskProperty(t,"priority",s.value),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){let u=d instanceof Error?d.message:String(d);console.error("Error updating task priority:",{error:u,taskPath:t.path}),new je.Notice(`Failed to update task priority: ${u}`)}}),s.color&&setTimeout(()=>{let l=i.dom||i.domEl;if(l){let c=l.querySelector(".menu-item-icon");c&&(c.style.color=s.color)}},10)})})}addDateOptions(e,t,n,a){let i=new ds({currentValue:t,onSelect:d=>{n(d)},onCustomDate:a,plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions(),o=i.filter(d=>d.category==="increment");o.length>0&&(o.forEach(d=>{e.addItem(u=>{d.icon&&u.setIcon(d.icon),u.setTitle(d.label),u.onClick(()=>n(d.value))})}),e.addSeparator()),i.filter(d=>d.category==="basic").forEach(d=>{e.addItem(u=>{d.icon&&u.setIcon(d.icon);let m=d.value===t?this.t("contextMenus.date.selected",{label:d.label}):d.label;u.setTitle(m),u.onClick(()=>n(d.value))})});let c=i.filter(d=>d.category==="weekday");c.length>0&&(e.addSeparator(),e.addItem(d=>{d.setTitle(this.t("contextMenus.date.weekdaysLabel")),d.setIcon("calendar");let u=d.setSubmenu();c.forEach(p=>{u.addItem(m=>{let f=p.value===t?this.t("contextMenus.date.selected",{label:p.label}):p.label;m.setTitle(f),m.setIcon("calendar"),m.onClick(()=>n(p.value))})})})),e.addSeparator(),e.addItem(d=>{d.setTitle(this.t("contextMenus.date.pickDateTime")),d.setIcon("calendar"),d.onClick(()=>a())}),t&&e.addItem(d=>{d.setTitle(this.t("contextMenus.date.clearDate")),d.setIcon("x"),d.onClick(()=>n(null))})}addRecurrenceOptions(e,t,n,a){let s=new Date,i=["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=i[s.getDay()],c=s.getDate(),d=s.getMonth()+1,u=o[s.getMonth()],p=s.toLocaleDateString("en-US",{weekday:"long"}),m=y=>{let k=y.getFullYear(),T=String(y.getMonth()+1).padStart(2,"0"),w=String(y.getDate()).padStart(2,"0");return`${k}${T}${w}`},h=y=>{let k=["th","st","nd","rd"],T=y%100;return y+(k[(T-20)%10]||k[T]||k[0])},f=m(s);[{label:this.t("modals.task.recurrence.daily"),value:`DTSTART:${f};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days"},{label:this.t("modals.task.recurrence.weeklyOn",{days:p}),value:`DTSTART:${f};FREQ=WEEKLY;INTERVAL=1;BYDAY=${l}`,icon:"calendar"},{label:this.t("modals.task.recurrence.everyTwoWeeks"),value:`DTSTART:${f};FREQ=WEEKLY;INTERVAL=2;BYDAY=${l}`,icon:"calendar"},{label:this.t("modals.task.recurrence.monthlyOnOrdinal",{ordinal:h(c)}),value:`DTSTART:${f};FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=${c}`,icon:"calendar-range"},{label:this.t("modals.task.recurrence.everyThreeMonths"),value:`DTSTART:${f};FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=${c}`,icon:"calendar-range"},{label:this.t("modals.task.recurrence.yearlyOn",{month:u,day:h(c)}),value:`DTSTART:${f};FREQ=YEARLY;INTERVAL=1;BYMONTH=${d};BYMONTHDAY=${c}`,icon:"calendar-clock"},{label:this.t("modals.task.recurrence.weekdays"),value:`DTSTART:${f};FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`,icon:"briefcase"}].forEach(y=>{e.addItem(k=>{let T=y.value===t;k.setTitle(T?`\u2713 ${y.label}`:y.label),k.setIcon(y.icon),k.onClick(()=>{n(y.value)})})}),e.addSeparator(),e.addItem(y=>{y.setTitle(this.t("contextMenus.task.customRecurrence")),y.setIcon("settings"),y.onClick(()=>{new po({currentValue:typeof t=="string"?t:void 0,currentAnchor:this.options.task.recurrence_anchor||"scheduled",scheduledDate:this.options.task.scheduled,onSelect:n,app:a.app,plugin:a}).showCustomRecurrenceModal()})}),t&&e.addItem(y=>{y.setTitle(this.t("contextMenus.task.clearRecurrence")),y.setIcon("x"),y.onClick(()=>{n(null)})})}getStatusOptions(e,t){let n=t.settings.customStatuses,a=[];return n&&n.length>0&&[...n].sort((i,o)=>i.order-o.order).forEach(i=>{a.push({label:i.label,value:i.value,color:i.color,icon:i.icon})}),a}addQuickRemindersSection(e,t,n,a,s){if(!(a==="due"?t.due:t.scheduled)){e.addItem(o=>{o.setTitle(s),o.setIcon("bell"),o.setDisabled(!0)});return}e.addItem(o=>{o.setTitle(s),o.setIcon("bell");let l=o.setSubmenu();[{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(async()=>{await this.addQuickReminder(t,n,a,d.offset,p)})})})})}async addQuickReminder(e,t,n,a,s){var l,c;let i={id:`rem_${Date.now()}`,type:"relative",relatedTo:n,offset:a,description:s},o=[...e.reminders||[],i];try{await t.updateTaskProperty(e,"reminders",o),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){console.error("Error adding reminder:",d),new je.Notice("Failed to add reminder")}}show(e){var t,n;(n=(t=e.target)==null?void 0:t.instanceOf)!=null&&n.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),this.menu.showAtMouseEvent(e)}showAtElement(e){this.targetDoc=e.ownerDocument,this.menu.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4})}}});var Vre={};Ke(Vre,{PriorityContextMenu:()=>mo});var mo,AT=b(()=>{mc();mo=class{constructor(e){this.targetDoc=document;this.menu=new Bn,this.options=e,this.buildMenu()}buildMenu(){let e=this.options.plugin.settings.customPriorities;this.sortedPriorities=[...e].sort((t,n)=>n.weight-t.weight),this.sortedPriorities.forEach(t=>{this.menu.addItem(n=>{let a=t.label;n.setIcon("star"),t.value===this.options.currentValue&&(a=`\u2713 ${t.label}`),n.setTitle(a),n.onClick(async()=>{this.options.onSelect(t.value)})})})}show(e){var t,n;(n=(t=e.target)==null?void 0:t.instanceOf)!=null&&n.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),this.menu.show(e),setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(e){this.targetDoc=e.ownerDocument,this.menu.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4}),setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let e=this.targetDoc.querySelector(".menu");if(!e)return;let t=e.querySelectorAll(".menu-item");this.sortedPriorities.forEach((n,a)=>{let s=t[a];if(s&&n.color){let i=s.querySelector(".menu-item-icon");i&&(i.style.color=n.color)}})}}});var JR={};Ke(JR,{BatchContextMenu:()=>IT});var Qs,IT,aD=b(()=>{Qs=require("obsidian");Bp();mc();Yu();IT=class{constructor(e){this.menu=new Bn,this.options=e,this.buildMenu()}t(e,t){return this.options.plugin.i18n.translate(e,t)}buildMenu(){let{plugin:e,selectedPaths:t}=this.options,n=t.length;this.menu.addItem(a=>{a.setTitle(`${n} tasks selected`),a.setIcon("check-square"),a.setDisabled(!0)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.status")),a.setIcon("circle");let s=a.setSubmenu();this.addStatusOptions(s)}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.priority")),a.setIcon("star");let s=a.setSubmenu();this.addPriorityOptions(s)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.dueDate")),a.setIcon("calendar");let s=a.setSubmenu();this.addDateOptions(s,"due")}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.scheduledDate")),a.setIcon("calendar-clock");let s=a.setSubmenu();this.addDateOptions(s,"scheduled")}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.archive")),a.setIcon("archive"),a.onClick(async()=>{await this.batchArchive(!0)})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.unarchive")),a.setIcon("archive-restore"),a.onClick(async()=>{await this.batchArchive(!1)})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle("Clear selection"),a.setIcon("x"),a.onClick(()=>{var s,i;(s=this.options.plugin.taskSelectionService)==null||s.clearSelection(),(i=this.options.plugin.taskSelectionService)==null||i.exitSelectionMode()})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(`Delete ${n} tasks`),a.setIcon("trash"),a.onClick(async()=>{await this.batchDelete()})})}addStatusOptions(e){let n=[...this.options.plugin.settings.customStatuses].sort((a,s)=>a.order-s.order);for(let a of n)e.addItem(s=>{s.setTitle(a.label),s.setIcon(a.icon||"circle"),s.onClick(async()=>{await this.batchUpdateProperty("status",a.value)}),a.color&&setTimeout(()=>{let i=s.dom||s.domEl;if(i){let o=i.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}},10)})}addPriorityOptions(e){let t=this.options.plugin.priorityManager.getPrioritiesByWeight();for(let n of t)e.addItem(a=>{a.setTitle(n.label),a.setIcon("star"),a.onClick(async()=>{await this.batchUpdateProperty("priority",n.value)}),n.color&&setTimeout(()=>{let s=a.dom||a.domEl;if(s){let i=s.querySelector(".menu-item-icon");i&&(i.style.color=n.color)}},10)});e.addSeparator(),e.addItem(n=>{n.setTitle(this.t("contextMenus.priority.clearPriority")),n.setIcon("x"),n.onClick(async()=>{await this.batchUpdateProperty("priority",void 0)})})}addDateOptions(e,t){let s=new ds({currentValue:void 0,onSelect:()=>{},plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions().filter(i=>i.category==="basic");for(let i of s)e.addItem(o=>{i.icon&&o.setIcon(i.icon),o.setTitle(i.label),o.onClick(async()=>{await this.batchUpdateProperty(t,i.value)})});e.addSeparator(),e.addItem(i=>{i.setTitle(this.t("contextMenus.date.clearDate")),i.setIcon("x"),i.onClick(async()=>{await this.batchUpdateProperty(t,void 0)})})}async batchUpdateProperty(e,t){var o,l;let{plugin:n,selectedPaths:a,onUpdate:s}=this.options,i=a.length;try{new Qs.Notice(`Updating ${i} tasks...`);let c=0,d=0;for(let u of a)try{let p=await n.cacheManager.getTaskInfo(u);p?(await n.taskService.updateProperty(p,e,t),c++):d++}catch(p){console.error(`[BatchContextMenu] Failed to update task ${u}:`,p),d++}d===0?new Qs.Notice(`Updated ${c} tasks`):new Qs.Notice(`Updated ${c} tasks, ${d} failed`),(o=n.taskSelectionService)==null||o.clearSelection(),(l=n.taskSelectionService)==null||l.exitSelectionMode(),s==null||s()}catch(c){console.error("[BatchContextMenu] Batch update failed:",c),new Qs.Notice("Failed to update tasks")}}async batchArchive(e){var i,o;let{plugin:t,selectedPaths:n,onUpdate:a}=this.options,s=n.length;try{new Qs.Notice(`${e?"Archiving":"Unarchiving"} ${s} tasks...`);let l=0,c=0;for(let d of n)try{let u=await t.cacheManager.getTaskInfo(d);u&&u.archived!==e?(await t.toggleTaskArchive(u),l++):u?l++:c++}catch(u){console.error(`[BatchContextMenu] Failed to archive task ${d}:`,u),c++}c===0?new Qs.Notice(`${e?"Archived":"Unarchived"} ${l} tasks`):new Qs.Notice(`${e?"Archived":"Unarchived"} ${l} tasks, ${c} failed`),(i=t.taskSelectionService)==null||i.clearSelection(),(o=t.taskSelectionService)==null||o.exitSelectionMode(),a==null||a()}catch(l){console.error("[BatchContextMenu] Batch archive failed:",l),new Qs.Notice("Failed to archive tasks")}}async batchDelete(){var i,o,l;let{plugin:e,selectedPaths:t,onUpdate:n}=this.options,a=t.length;if(await pi(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 Qs.Notice(`Deleting ${a} tasks...`);let c=0,d=0;for(let u of t)try{let p=e.app.vault.getAbstractFileByPath(u);if(p){if((i=e.taskCalendarSyncService)!=null&&i.isEnabled()){let m=await e.cacheManager.getTaskInfo(u);if(m!=null&&m.googleCalendarEventId)try{await e.taskCalendarSyncService.deleteTaskFromCalendarByPath(u,m.googleCalendarEventId)}catch(h){console.warn("Failed to delete task from Google Calendar:",h)}}await e.app.vault.trash(p,!0),c++}else d++}catch(p){console.error(`[BatchContextMenu] Failed to delete task ${u}:`,p),d++}d===0?new Qs.Notice(`Deleted ${c} tasks`):new Qs.Notice(`Deleted ${c} tasks, ${d} failed`),(o=e.taskSelectionService)==null||o.clearSelection(),(l=e.taskSelectionService)==null||l.exitSelectionMode(),n==null||n()}catch(c){console.error("[BatchContextMenu] Batch delete failed:",c),new Qs.Notice("Failed to delete tasks")}}show(e){this.menu.showAtMouseEvent(e)}showAtPosition(e,t){this.menu.showAtPosition({x:e,y:t})}}});function Wre(r){let{task:e,plugin:t,excludeSelector:n,onSingleClick:a,onDoubleClick:s,contextMenuHandler:i}=r,o=null,l=(f=!1)=>{let g=t.app.vault.getAbstractFileByPath(e.path);g instanceof XR.TFile&&(f?t.app.workspace.openLinkText(e.path,"",!0):t.app.workspace.getLeaf(!1).openFile(g))},c=async()=>{await t.openTaskEditModal(e)},d=async f=>{if(a){await a(f);return}if(f.ctrlKey||f.metaKey){l(!0);return}let g=t.settings.singleClickAction;g==="edit"?await c():g==="openNote"&&l(!1)},u=async f=>{if(s){await s(f);return}let g=t.settings.doubleClickAction;g==="edit"?await c():g==="openNote"&&l()};return{clickHandler:async f=>{if(n&&f.target.closest(n))return;let g=t.taskSelectionService;if(g){if(f.shiftKey){f.stopPropagation(),g.isSelectionModeActive()||g.enterSelectionMode(),g.toggleSelection(e.path);return}g.isSelectionModeActive()&&(g.clearSelection(),g.exitSelectionMode())}if(f.stopPropagation(),t.settings.doubleClickAction==="none"){await d(f);return}o?(clearTimeout(o),o=null,await u(f)):o=setTimeout(()=>{o=null,d(f)},250)},dblclickHandler:async f=>{},contextmenuHandler:async f=>{f.preventDefault(),f.stopPropagation();let g=t.taskSelectionService;if(f.shiftKey&&g){if(g.isSelectionModeActive()||g.enterSelectionMode(),g.isSelected(e.path)||g.addToSelection(e.path),g.getSelectionCount()>0){let{BatchContextMenu:y}=(aD(),Lo(JR));new y({plugin:t,selectedPaths:g.getSelectedPaths(),onUpdate:()=>{}}).show(f)}return}if(g&&g.getSelectionCount()>1){g.isSelected(e.path)||g.addToSelection(e.path);let{BatchContextMenu:y}=(aD(),Lo(JR));new y({plugin:t,selectedPaths:g.getSelectedPaths(),onUpdate:()=>{}}).show(f);return}g!=null&&g.isSelectionModeActive()&&(g.clearSelection(),g.exitSelectionMode()),i&&await i(f)},cleanup:()=>{o&&(clearTimeout(o),o=null)}}}function Yre(r,e){return t=>{e.app.vault.getAbstractFileByPath(r.path)&&e.app.workspace.trigger("hover-link",{event:t,source:"tasknotes-task-card",hoverParent:t.currentTarget,targetEl:t.currentTarget,linktext:r.path,sourcePath:r.path})}}async function Gre(r,e,t,n,a){let s=(d=!1)=>{let u=e.app.vault.getAbstractFileByPath(r.path);u instanceof XR.TFile&&(d?e.app.workspace.openLinkText(r.path,"",!0):e.app.workspace.getLeaf(!1).openFile(u))},i=async()=>{await e.openTaskEditModal(r,a?()=>a():void 0)},o=async d=>{if(d.ctrlKey||d.metaKey){s(!0);return}let u=e.settings.singleClickAction;u==="edit"?await i():u==="openNote"&&s(!1)},l=async d=>{let u=e.settings.doubleClickAction;u==="edit"?await i():u==="openNote"&&s()};if(e.settings.doubleClickAction==="none"){await o(t);return}let c=sD.get(n);if(c)clearTimeout(c),sD.delete(n),await l(t);else{let d=setTimeout(()=>{sD.delete(n),o(t)},250);sD.set(n,d)}}var XR,sD,eO=b(()=>{XR=require("obsidian");sD=new Map});function Xo(r,e,t,n,a={}){var p;let{cssClass:s="internal-link",hoverSource:i="tasknotes-property-link",showErrorNotices:o=!1,onPrimaryNavigate:l}=a,c=(p=n.sourcePath)!=null?p:"",d=cn(e),u=r.createEl("a",{cls:s,text:t,attr:{"data-href":d,role:"link",tabindex:"0"}});u.addEventListener("click",async m=>{m.preventDefault(),m.stopPropagation();try{if(m.ctrlKey||m.metaKey){n.workspace.openLinkText(d,c,!0);return}if(l&&await l(d,m)!==!1)return;let h=n.metadataCache.getFirstLinkpathDest(d,c)||n.metadataCache.getFirstLinkpathDest(d,"");h instanceof Cd.TFile?await n.workspace.getLeaf(!1).openFile(h):o&&new Cd.Notice(`Note "${t}" not found`)}catch(h){console.error("[TaskNotes] Error opening internal link:",{filePath:e,error:h}),o&&new Cd.Notice(`Failed to open note "${t}"`)}}),u.addEventListener("auxclick",async m=>{if(m.button===1){m.preventDefault(),m.stopPropagation();try{(n.metadataCache.getFirstLinkpathDest(d,c)||n.metadataCache.getFirstLinkpathDest(d,""))instanceof Cd.TFile&&n.workspace.openLinkText(d,c,!0)}catch(h){console.error("[TaskNotes] Error opening internal link:",{filePath:e,error:h})}}}),u.addEventListener("keydown",m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),u.click())}),u.addEventListener("mouseover",m=>{let h=n.metadataCache.getFirstLinkpathDest(d,c)||n.metadataCache.getFirstLinkpathDest(d,"");if(h instanceof Cd.TFile){let f={event:m,source:i,hoverParent:r,targetEl:u,linktext:d,sourcePath:c||h.path};n.workspace.trigger("hover-link",f)}})}function iD(r,e,t,n){let a=0,s;for(;(s=jNe.exec(e))!==null;){let[o,l,c,d]=s,u=s.index;if(u>a&&r.appendChild(document.createTextNode(e.slice(a,u))),l){let p=l,m=p,h=p;if(p.includes("|")){let[f,g]=p.split("|");m=f,h=g}Xo(r,m,h,t)}else if(c&&d){let p=String(d).trim(),m=String(c).trim();/^[a-z]+:\/\//i.test(p)?r.createEl("a",{text:m,attr:{href:p,target:"_blank",rel:"noopener"}}).classList.add("external-link"):Xo(r,p,m,t)}a=u+o.length}let i=e.slice(a);if(i&&(n!=null&&n.onTagClick)){let o=/(^|\s)(#[\p{L}\p{N}\p{M}_/-]+)/gu,l=0,c;for(;(c=o.exec(i))!==null;){let[,d,u]=c,p=c.index;p>l&&r.appendChild(document.createTextNode(i.slice(l,p))),d&&r.appendChild(document.createTextNode(d));let m=r.createEl("a",{cls:"tag",text:u,attr:{href:u,role:"button",tabindex:"0"}});m.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),n.onTagClick(u,h)}),m.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),n.onTagClick(u,h))}),l=p+d.length+u.length}l0}function BNe(r){return!r||typeof r!="string"?!1:/^\[([^\]]*)\]\(([^)]+)\)$/.test(r)}function qNe(r){let e=r.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!e)return null;let t=e[1].trim(),n=e[2].trim(),a=cn(n);return{displayText:t,filePath:a}}function Zre(r,e,t){var u,p;let n=(u=t.sourcePath)!=null?u:"",a=cn(r),s=t.metadataCache.getFirstLinkpathDest(a,n)||t.metadataCache.getFirstLinkpathDest(a,"");if(!(s instanceof Cd.TFile))return e;let i=t.metadataCache.getCache(s.path),o=(p=i==null?void 0:i.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=s.name,d=s.basename;return l===""||l===c||l===d||l===s.path||l===a?o:e}function oD(r,e,t,n={}){r.innerHTML="",e.flat(2).filter(s=>s!=null&&typeof s=="string").forEach((s,i)=>{if(i>0&&r.appendChild(document.createTextNode(", ")),r.appendChild(document.createTextNode("+")),zNe(s)){let o=s.slice(2,-2),l=o,c=o;if(o.includes("|")){let u=o.split("|");l=u[0].trim(),c=u[1].trim()}let d=Zre(l,c,t);Xo(r,l,d,t,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0,onPrimaryNavigate:n.onPrimaryNavigate})}else if(BNe(s)){let o=qNe(s);if(o){let l=Zre(o.filePath,o.displayText,t);Xo(r,o.filePath,l,t,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0,onPrimaryNavigate:n.onPrimaryNavigate})}else r.appendChild(document.createTextNode(s))}else r.appendChild(document.createTextNode(s))})}var Cd,jNe,lD=b(()=>{Cd=require("obsidian");io();jNe=/\[\[([^[\]]+)\]\]|\[([^\]]+)\]\(([^)]+)\)|<(https?:\/\/[^\s>]+)>|\[([^\]]+)\]\s*\[([^\]]*)\]/g});function Kre(r,e,t){if(!e||typeof e!="string")return;let n=HNe(e);if(!n)return;let a=r.createEl("a",{cls:"tag",text:n,attr:{href:n,role:"button",tabindex:"0"}});t!=null&&t.onTagClick&&(a.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),t.onTagClick(n,s)}),a.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t.onTagClick(n,s))}))}function Xre(r,e,t){if(typeof e=="string"){Kre(r,e,t);return}if(Array.isArray(e)){e.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,s)=>{s>0&&r.appendChild(document.createTextNode(" ")),Kre(r,String(a),t)});return}e!=null&&r.appendChild(document.createTextNode(String(e)))}function ene(r,e,t){if(typeof e=="string"){let n=Jre(e);if(n){let a=Qre(n),s=r.createEl("span",{cls:`context-tag ${a}`,text:n,attr:{role:"button",tabindex:"0"}});t!=null&&t.onTagClick&&(s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),t.onTagClick(n,i)}),s.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),t.onTagClick(n,i))}))}return}if(Array.isArray(e)){e.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,s)=>{s>0&&r.appendChild(document.createTextNode(", "));let i=Jre(a);if(i){let o=Qre(i),l=r.createEl("span",{cls:`context-tag ${o}`,text:i,attr:{role:"button",tabindex:"0"}});t!=null&&t.onTagClick&&(l.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),t.onTagClick(i,c)}),l.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t.onTagClick(i,c))}))}else r.appendChild(document.createTextNode(String(a)))});return}e!=null&&r.appendChild(document.createTextNode(String(e)))}function HNe(r){if(!r||typeof r!="string")return null;let e=r.trim();if(!e)return null;let t=e.startsWith("#"),n=e.replace(/[^\p{L}\p{N}_#/-]/gu,"");return t?n.length>1?n:null:n?`#${n}`:null}function UNe(r){let e=5381;for(let t=0;t>>0}function Qre(r){if(!r||typeof r!="string")return"context-tag--color-0";let e=r.replace(/^@/,"").toLowerCase();return e?`context-tag--color-${UNe(e)%20}`:"context-tag--color-0"}function Jre(r){if(!r||typeof r!="string")return null;let e=r.trim();if(!e)return null;let t=e.startsWith("@"),n=e.replace(/[^\p{L}\p{N}_@/-]/gu,"");return t?n.length>1?n:null:n?`@${n}`:null}var tne=b(()=>{});function WNe(r){return VNe.includes(r)}function Ba(r,e){return r.map(t=>WNe(t)?t:t in e.fieldMapper.getMapping()?e.fieldMapper.toUserField(t):t)}function hc(r,e,t){return t.fieldMapper.isPropertyForField(r,e)}var VNe,Pd=b(()=>{VNe=["tags","blocked","blocking"]});var fc={};Ke(fc,{DEFAULT_TASK_CARD_OPTIONS:()=>nO,cleanupTaskCard:()=>lRe,createTaskCard:()=>br,refreshParentTaskSubtasks:()=>cRe,showDeleteConfirmationModal:()=>oRe,showTaskContextMenu:()=>Nf,toggleBlockingTasks:()=>aO,toggleSubtasks:()=>NT,updateTaskCard:()=>iRe});function qp(r){let{container:e,className:t,icon:n,tooltip:a,ariaLabel:s,onClick:i,visible:o=!0}=r;if(!o)return null;let l=e.createEl("div",{cls:t,attr:{"aria-label":s||a}});return(0,Je.setIcon)(l,n),(0,Je.setTooltip)(l,a,{placement:"top"}),i&&l.addEventListener("click",c=>{c.stopPropagation(),i(c)}),l}function tO(r,e,t){let n=r.querySelector(e);if(!t.shouldExist)return n==null||n.remove(),null;if(n)return n.setAttribute("aria-label",t.ariaLabel||t.tooltip),(0,Je.setTooltip)(n,t.tooltip,{placement:"top"}),n;let s=r.querySelector(".task-card__badges")||r.querySelector(".task-card__main-row");return s?qp({container:s,...t}):null}function sne(r,e,t,n,a){return async s=>{s.stopPropagation();try{let i=(o,l,c)=>{let d=e.statusManager.getStatusConfig(l);d!=null&&d.color?n.style.borderColor=d.color:n.style.borderColor="",d!=null&&d.icon?(n.addClass("task-card__status-dot--icon"),n.empty(),(0,Je.setIcon)(n,d.icon)):(n.removeClass("task-card__status-dot--icon"),n.empty()),d!=null&&d.color?t.style.setProperty("--current-status-color",d.color):t.style.removeProperty("--current-status-color");let u=e.statusManager.getNextStatus(l),p=e.statusManager.getStatusConfig(u);p!=null&&p.color?t.style.setProperty("--next-status-color",p.color):t.style.removeProperty("--next-status-color");let m=t.querySelector(".task-card__checkbox");m&&(m.checked=c),YNe(t,o,e,c,l)};if(r.recurrence){let o=await e.toggleRecurringTaskComplete(r,a),l=fp(o,a,e.statusManager.getCompletedStatuses()[0]),c=e.statusManager.isCompletedStatus(l);i(o,l,c)}else{let o=await e.cacheManager.getTaskInfo(r.path);if(!o){new Je.Notice("Task not found");return}let l=o.status||e.settings.defaultTaskStatus,c=s.shiftKey?e.statusManager.getPreviousStatus(l):e.statusManager.getNextStatus(l),d=await e.updateTaskProperty(o,"status",c),u=e.statusManager.isCompletedStatus(c);i(d,c,u)}}catch(i){let o=i instanceof Error?i.message:String(i);console.error("Error cycling task status:",{error:o,taskPath:r.path}),new Je.Notice(`Failed to update task status: ${o}`)}}}function YNe(r,e,t,n,a){var o;r.classList.toggle("task-card--completed",n),r.classList.toggle("task-card--archived",!!e.archived),r.classList.toggle("task-card--actively-tracked",t.getActiveTimeSession(e)!==null),r.classList.toggle("task-card--recurring",!!e.recurrence),r.classList.toggle("task-card--chevron-left",((o=t.settings)==null?void 0:o.subtaskChevronPosition)==="left");for(let l of Array.from(r.classList))l.startsWith("task-card--priority-")&&r.classList.remove(l);e.priority&&r.classList.add(`task-card--priority-${mx(e.priority)}`);for(let l of Array.from(r.classList))l.startsWith("task-card--status-")&&r.classList.remove(l);a&&r.classList.add(`task-card--status-${mx(a)}`),r.dataset.status=a;let s=r.querySelector(".task-card__title"),i=r.querySelector(".task-card__title-text");s&&s.classList.toggle("completed",n),i&&i.classList.toggle("completed",n)}function GNe(r,e){return t=>{t.stopPropagation(),new mo({currentValue:r.priority,onSelect:async a=>{try{await e.updateTaskProperty(r,"priority",a)}catch(s){console.error("Error updating priority:",s),new Je.Notice("Failed to update priority")}},plugin:e}).show(t)}}function ine(r,e){return t=>{t.stopPropagation(),new po({currentValue:typeof r.recurrence=="string"?r.recurrence:void 0,currentAnchor:r.recurrence_anchor||"scheduled",scheduledDate:r.scheduled,onSelect:async(a,s)=>{try{await e.updateTaskProperty(r,"recurrence",a||void 0),s!==void 0&&await e.updateTaskProperty(r,"recurrence_anchor",s)}catch(i){console.error("Error updating recurrence:",i),new Je.Notice("Failed to update recurrence")}},app:e.app,plugin:e}).show(t)}}function one(r,e){return()=>{new uo(e.app,e,r,async n=>{try{await e.updateTaskProperty(r,"reminders",n.length>0?n:void 0)}catch(a){console.error("Error updating reminders:",a),new Je.Notice("Failed to update reminders")}}).open()}}function lne(r,e){return async()=>{try{await e.applyProjectSubtaskFilter(r)}catch(t){console.error("Error filtering project subtasks:",t),new Je.Notice("Failed to filter project subtasks")}}}function cne(r,e,t,n){return async()=>{try{if(!e.expandedProjectsService){new Je.Notice("Service not available. Please try reloading the plugin.");return}let a=e.expandedProjectsService.toggle(r.path);n.classList.toggle("task-card__chevron--expanded",a);let s=a?"Collapse subtasks":"Expand subtasks";n.setAttribute("aria-label",s),(0,Je.setTooltip)(n,s,{placement:"top"}),await NT(t,r,e,a)}catch(a){console.error("Error toggling subtasks:",a),new Je.Notice("Failed to toggle subtasks")}}}function ZNe(r,e,t,n){return async()=>{let a=n.classList.toggle("task-card__blocking-toggle--expanded");await aO(t,r,e,a)}}function dne(r,e,t,n){r.addEventListener("click",a=>{a.stopPropagation();let s=n==="due"?e.due:e.scheduled;new ds({currentValue:Xe(s||""),currentTime:la(s||""),onSelect:async(o,l)=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await t.updateTaskProperty(e,n,c)}catch(c){let d=c instanceof Error?c.message:String(c);console.error(`Error updating ${n} date:`,d);let u=n==="due"?"contextMenus.task.notices.updateDueDateFailure":"contextMenus.task.notices.updateScheduledFailure";new Je.Notice(t.i18n.translate(u,{message:d}))}},plugin:t,app:t.app}).show(a)})}function une(r){let e=[...Nh,"tags","blocked","blocking","googleCalendarSync"];return Ba(e,r)}function KNe(r,e){let t=e.app.vault.getAbstractFileByPath(r);if(!(t instanceof Je.TFile))return null;let n=e.app.metadataCache.getFileCache(t);return QNe(n)}function QNe(r){let e=r==null?void 0:r.listItems;if(!Array.isArray(e)||e.length===0)return null;let t=0,n=0;for(let a of e)!a||typeof a.task!="string"||typeof a.parent=="number"&&a.parent>=0||(t+=1,a.task.toLowerCase()==="x"&&(n+=1));return t===0?null:{completed:n,total:t,percent:Math.round(n/t*100)}}function If(r){if(r&&typeof r=="object"&&"icon"in r){let e=r;if(e.icon==="lucide-link"&&"data"in e&&e.data!==null&&e.data!==void 0){let t=String(e.data);if(!t.match(/^[a-z]+:\/\//i)){let a="display"in e&&e.display?String(e.display):null;return a&&a!==t?`[[${t}|${a}]]`:`[[${t}]]`}let n="display"in e&&e.display?String(e.display):null;return n?`[${n}](${t})`:t}return"data"in e&&e.data!==null&&e.data!==void 0?e.data:e.icon==="lucide-calendar"&&"date"in e?e.date:"display"in e&&e.display!==null&&e.display!==void 0?e.display:e.icon==="lucide-file-question"||e.icon==="lucide-help-circle"?"":e.icon?String(e.icon).replace("lucide-",""):""}return r}function JNe(r,e,t){try{let n=t.fieldMapper.lookupMappingKey(e);if(n&&n in cD)return cD[n](r);if(e in cD)return cD[e](r);if(e.startsWith("user:"))return XNe(r,e,t);if(r.customProperties&&e in r.customProperties)return If(r.customProperties[e]);if(r.customProperties){let a=`file.${e}`;if(a in r.customProperties)return If(r.customProperties[a])}if(e.startsWith("file.")&&r.basesData&&typeof r.basesData.getValue=="function")try{let a=r.basesData.getValue(e);if(a!=null)return If(a)}catch(a){}if(e.startsWith("formula."))try{let a=r.basesData;if(!a||typeof a.getValue!="function")return"";let s=a.getValue(e);if(s==null)return"";let i=If(s);return i!==""?i:""}catch(a){return console.debug(`[TaskNotes] Error computing formula ${e}:`,a),"[Formula Error]"}if(r.basesData&&typeof r.basesData.getValue=="function")try{let a=`note.${e}`,s=r.basesData.getValue(a);if(s!=null)return If(s)}catch(a){}if(r.path){let a=pne(r.path,e,t);if(a!==void 0)return a}return null}catch(n){return console.warn(`TaskCard: Error getting property ${e}:`,n),null}}function XNe(r,e,t){var i;let n=e.slice(5),a=(i=t.settings.userFields)==null?void 0:i.find(o=>o.id===n);if(!(a!=null&&a.key))return null;let s=r[a.key];return s===void 0&&(s=pne(r.path,a.key,t)),s}function pne(r,e,t){try{let n=t.app.metadataCache.getCache(r);return n!=null&&n.frontmatter?n.frontmatter[e]:void 0}catch(n){console.warn(`TaskCard: Error accessing frontmatter for ${r}:`,n);return}}function mne(r,e,t,n){let a=JNe(t,e,n);if(!eRe(a))return null;let s=r.createEl("span",{cls:`task-card__metadata-property task-card__metadata-property--${e.replace(":","-")}`});try{let o=n.fieldMapper.lookupMappingKey(e)||e;return o in rne?rne[o](s,a,t,n):e.startsWith("user:")?tRe(s,e,a,n):rRe(s,e,a,n),!s.textContent&&!s.hasChildNodes()?(s.remove(),null):s}catch(i){return console.warn(`TaskCard: Error rendering property ${e}:`,i),s.textContent=`${e}: (error)`,s}}function eRe(r){return r!=null&&!(Array.isArray(r)&&r.length===0)&&!(typeof r=="string"&&r.trim()==="")}function tRe(r,e,t,n){var c;let a=e.slice(5),s=(c=n.settings.userFields)==null?void 0:c.find(d=>d.id===a);if(!s){r.textContent=`${a}: (not found)`;return}let i=s.displayName||a;r.createEl("span",{text:`${i}: `});let o=r.createEl("span"),l={metadataCache:n.app.metadataCache,workspace:n.app.workspace};if(typeof t=="string"&&t.trim()!==""){let d=t.trim();if(d.includes("[[")||d.includes("](")||d.includes("#")&&/\s#\w+|#\w+/.test(d))iD(o,d,l);else{let u=ane(t,s);o.textContent=u}}else if(s.type==="list"&&Array.isArray(t))t.filter(u=>u!=null).forEach((u,p)=>{if(p>0&&o.appendChild(document.createTextNode(", ")),typeof u=="string"&&u.trim()!==""){let m=u.trim();if(m.includes("[[")||m.includes("](")||m.includes("#")&&/\s#\w+|#\w+/.test(m)){let h=o.createEl("span");iD(h,m,l)}else o.appendChild(document.createTextNode(String(u)))}else o.appendChild(document.createTextNode(String(u)))});else{let d=ane(t,s);d.trim()!==""?o.textContent=d:o.textContent="(empty)"}}function rRe(r,e,t,n){let a;e.startsWith("formula.")?a=e.substring(8):a=e.charAt(0).toUpperCase()+e.slice(1),r.createEl("span",{text:`${a}: `});let s=r.createEl("span");Array.isArray(t)?t.map(o=>If(o)).filter(o=>o!=null&&o!=="").forEach((o,l)=>{l>0&&s.appendChild(document.createTextNode(", ")),nne(s,o,n)}):nne(s,t,n)}function nne(r,e,t){if(typeof e=="string"&&t){let a={metadataCache:t.app.metadataCache,workspace:t.app.workspace};if(e.includes("[[")||e.includes("[")&&e.includes("](")||e.includes("#")&&/\s#\w+|#\w+/.test(e)){iD(r,e,a,{onTagClick:async(s,i)=>{let o=s.startsWith("#")?s.slice(1):s;await t.openTagsPane(`#${o}`)||console.log("Could not open search pane, generic property tag clicked:",s)}});return}r.appendChild(document.createTextNode(e));return}let n;if(typeof e=="object"&&e!==null)if(e instanceof Date)n=ns(e.toISOString(),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});else if(typeof e.toString=="function"&&e.toString()!=="[object Object]")n=e.toString();else{let a=Object.entries(e);a.length<=3?n=a.map(([s,i])=>`${s}: ${i}`).join(", "):n=JSON.stringify(e)}else typeof e=="boolean"?n=e?"\u2713":"\u2717":typeof e=="number"?n=Number.isInteger(e)?String(e):e.toFixed(2):n=String(e);n.length>100&&(n=n.substring(0,97)+"..."),r.appendChild(document.createTextNode(n))}function ane(r,e){if(r==null)return"";try{switch(e.type){case"text":case"number":return String(r);case"date":return ns(String(r),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});case"boolean":return r?"\u2713":"\u2717";case"list":return Array.isArray(r)?r.flat(2).join(", "):String(r);default:return String(r)}}catch(t){return console.warn("TaskCard: Error formatting user property value:",t),String(r)}}function nRe(r,e,t,n){var d,u;let a=RE(e),s=n.statusManager.isCompletedStatus(t.status),i=(u=(d=n.settings)==null?void 0:d.hideCompletedFromOverdue)!=null?u:!0,o=Fa(e,s,i),l=n.settings.calendarViewSettings.timeFormat,c="";if(a){let p=ns(e,{dateFormat:"",showTime:!0,userTimeFormat:l});c=p.trim()===""?"Due: Today":`Due: Today at ${p}`}else o?c=`Due: ${ns(e,{dateFormat:"MMM d",showTime:!0,userTimeFormat:l})} (overdue)`:c=`Due: ${ns(e,{dateFormat:"MMM d",showTime:!0,userTimeFormat:l})}`;r.textContent=c,r.classList.add("task-card__metadata-date","task-card__metadata-date--due"),o&&r.classList.add("task-card__metadata-date--overdue"),r.dataset.tnAction="edit-date",r.dataset.tnDateType="due",dne(r,t,n,"due")}function aRe(r,e,t,n){var d,u;let a=RE(e),s=n.statusManager.isCompletedStatus(t.status),i=(u=(d=n.settings)==null?void 0:d.hideCompletedFromOverdue)!=null?u:!0,o=Fa(e,s,i),l=n.settings.calendarViewSettings.timeFormat,c="";if(a){let p=ns(e,{dateFormat:"",showTime:!0,userTimeFormat:l});c=p.trim()===""?"Scheduled: Today":`Scheduled: Today at ${p}`}else o?c=`Scheduled: ${ns(e,{dateFormat:"MMM d",showTime:!0,userTimeFormat:l})} (past)`:c=`Scheduled: ${ns(e,{dateFormat:"MMM d",showTime:!0,userTimeFormat:l})}`;r.textContent=c,r.classList.add("task-card__metadata-date","task-card__metadata-date--scheduled"),o&&r.classList.add("task-card__metadata-date--past"),r.dataset.tnAction="edit-date",r.dataset.tnDateType="scheduled",dne(r,t,n,"scheduled")}function hne(r,e){r.style.display=e.length>0?"":"none"}function br(r,e,t,n={}){var H,K,le,ge,te,vt,Ar,xt,Le;let a={...nO,...n},s=a.targetDate||(()=>{let Z=new Date;return new Date(Date.UTC(Z.getFullYear(),Z.getMonth(),Z.getDate()))})(),i=r.recurrence?fp(r,s,e.statusManager.getCompletedStatuses()[0]):r.status,o=a.layout||"default",l=document.createElement(o==="inline"?"span":"div");l._taskPath=r.path;let c=e.getActiveTimeSession(r)!==null,d=r.recurrence?((H=r.complete_instances)==null?void 0:H.includes(me(s)))||!1:e.statusManager.isCompletedStatus(i),u=r.recurrence&&((K=r.skipped_instances)==null?void 0:K.includes(me(s)))||!1,p=!!r.recurrence,m=["task-card"];o!=="default"&&m.push(`task-card--layout-${o}`),d&&m.push("task-card--completed"),u&&m.push("task-card--skipped"),r.archived&&m.push("task-card--archived"),c&&m.push("task-card--actively-tracked"),p&&m.push("task-card--recurring"),r.priority&&m.push(`task-card--priority-${r.priority}`),i&&m.push(`task-card--status-${i}`),((le=e.settings)==null?void 0:le.subtaskChevronPosition)==="left"&&m.push("task-card--chevron-left"),ac(r.projects||[]).length>0&&m.push("task-card--has-projects"),l.className=m.join(" "),l.dataset.taskPath=r.path,l.dataset.key=r.path,l.dataset.status=i;let f=l.createEl(o==="inline"?"span":"div",{cls:"task-card__main-row"}),g=e.priorityManager.getPriorityConfig(r.priority);g&&l.style.setProperty("--priority-color",g.color);let y=e.statusManager.getStatusConfig(i);y&&l.style.setProperty("--current-status-color",y.color);let k=e.statusManager.getNextStatus(i),T=e.statusManager.getStatusConfig(k);T&&l.style.setProperty("--next-status-color",T.color);let w=null;!a.hideStatusIndicator&&(!t||t.some(Z=>hc(Z,"status",e)))&&(w=f.createEl("span",{cls:"task-card__status-dot"}),y&&(w.style.borderColor=y.color,y.icon&&(w.addClass("task-card__status-dot--icon"),(0,Je.setIcon)(w,y.icon)))),w&&(w.addEventListener("mousedown",Z=>{Z.preventDefault(),Z.stopPropagation()}),w.addEventListener("click",sne(r,e,l,w,s)));let x=!t||t.some(Z=>hc(Z,"priority",e));if(r.priority&&g&&x){let Z=f.createEl("span",{cls:"task-card__priority-dot",attr:{"aria-label":`Priority: ${g.label}`}});Z.style.borderColor=g.color,Z.addEventListener("click",GNe(r,e))}let C=f.createEl(o==="inline"?"span":"div",{cls:"task-card__content"}),M=o!=="inline"?f.createEl("div",{cls:"task-card__badges"}):null;if(M){if(r.recurrence){let Ne=`Recurring: ${yv(r.recurrence)} (click to change)`;qp({container:M,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:Ne,onClick:ine(r,e)})}if(r.reminders&&r.reminders.length>0){let Ne=r.reminders.length,Ve=Ne===1?"1 reminder set (click to manage)":`${Ne} reminders set (click to manage)`;qp({container:M,className:"task-card__reminder-indicator",icon:"bell",tooltip:Ve,onClick:one(r,e)})}if(e.projectSubtasksService.isTaskUsedAsProjectSync(r.path)&&(qp({container:M,className:"task-card__project-indicator",icon:"folder",tooltip:"This task is used as a project (click to filter subtasks)",onClick:lne(r,e)}),(ge=e.settings)!=null&&ge.showExpandableSubtasks)){let Ne=((te=e.expandedProjectsService)==null?void 0:te.isExpanded(r.path))||!1,Ve=qp({container:M,className:`task-card__chevron${Ne?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:Ne?"Collapse subtasks":"Expand subtasks"});Ve&&Ve.addEventListener("click",lr=>{lr.stopPropagation(),cne(r,e,l,Ve)()}),Ne&&NT(l,r,e,!0).catch(lr=>{console.error("Error showing initial subtasks:",lr)})}if(r.blocking&&r.blocking.length>0){let Ne=e.i18n.translate("ui.taskCard.blockingToggle",{count:r.blocking.length}),Ve=qp({container:M,className:"task-card__blocking-toggle is-visible",icon:"git-branch",tooltip:Ne});Ve&&Ve.addEventListener("click",lr=>{lr.stopPropagation(),ZNe(r,e,l,Ve)()})}}let N=f.createEl("div",{cls:"task-card__context-menu",attr:{"aria-label":"Task options"}});(0,Je.setIcon)(N,"ellipsis-vertical"),(0,Je.setTooltip)(N,"Task options",{placement:"top"}),N.addEventListener("click",async Z=>{Z.stopPropagation(),Z.preventDefault(),await Nf(Z,r.path,e,s)});let F=C.createEl(o==="inline"?"span":"div",{cls:"task-card__title"}),G=F.createSpan({cls:"task-card__title-text",text:r.title});d&&(F.classList.add("completed"),G.classList.add("completed"));let R=C.createEl(o==="inline"?"span":"div",{cls:"task-card__metadata"}),A=[],I=t||(e.settings.defaultVisibleProperties?Ba(e.settings.defaultVisibleProperties,e):une(e));for(let Z of I){if(hc(Z,"status",e)||hc(Z,"priority",e))continue;if(Z==="blocked"){if(r.isBlocked){let Ne=e.i18n.translate("ui.taskCard.blockedBadge"),Ve=(Ar=(vt=r.blockedBy)==null?void 0:vt.length)!=null?Ar:0,lr=Ve>0?`${Ne} (${Ve})`:Ne,rn=R.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocked",text:lr});(0,Je.setTooltip)(rn,e.i18n.translate("ui.taskCard.blockedBadgeTooltip"),{placement:"top"}),A.push(rn)}continue}if(Z==="blocking"){if(r.isBlocking){let Ne=e.i18n.translate("ui.taskCard.blockingBadge"),Ve=(Le=(xt=r.blocking)==null?void 0:xt.length)!=null?Le:0,lr=Ve>0?`${Ne} (${Ve})`:Ne,rn=R.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocking",text:lr});(0,Je.setTooltip)(rn,e.i18n.translate("ui.taskCard.blockingBadgeTooltip"),{placement:"top"}),A.push(rn)}continue}if(Z==="googleCalendarSync"){if(r.googleCalendarEventId){let Ne=R.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--google-calendar"});(0,Je.setIcon)(Ne,"calendar"),(0,Je.setTooltip)(Ne,e.i18n.translate("ui.taskCard.googleCalendarSyncTooltip"),{placement:"top"}),A.push(Ne)}continue}let ae=mne(R,Z,r,e);ae&&A.push(ae)}hne(R,A);let{clickHandler:L,dblclickHandler:V,contextmenuHandler:W}=Wre({task:r,plugin:e,contextMenuHandler:async Z=>{let ae=l.dataset.taskPath;ae&&await Nf(Z,ae,e,s)}});return l.addEventListener("click",L),l.addEventListener("dblclick",V),l.addEventListener("contextmenu",W),l.addEventListener("mouseover",Yre(r,e)),l}async function Nf(r,e,t,n){let a=t.app.vault.getAbstractFileByPath(e),s=()=>{a instanceof Je.TFile&&sRe(r,a,t)};try{let i=await t.cacheManager.getTaskInfo(e);if(!i){s();return}new Af({task:i,plugin:t,targetDate:n,onUpdate:()=>{t.app.workspace.trigger("tasknotes:refresh-views")}}).show(r)}catch(i){let o=i instanceof Error?i.message:String(i);console.error("Error creating context menu:",{error:o,taskPath:e}),new Je.Notice(`Failed to create context menu: ${o}`),s()}}function sRe(r,e,t){var s;let n=new Je.Menu,a=!1;try{t.app.workspace.trigger("file-menu",n,e,"tasknotes-bases-view"),a=((s=n.items)==null?void 0:s.length)>0}catch(i){a=!1}a||(n.addItem(i=>{i.setTitle("Open"),i.setIcon("file-text"),i.onClick(()=>{t.app.workspace.getLeaf(!1).openFile(e)})}),n.addItem(i=>{i.setTitle("Open in new tab"),i.setIcon("external-link"),i.onClick(()=>{t.app.workspace.openLinkText(e.path,"",!0)})})),n.showAtMouseEvent(r)}function iRe(r,e,t,n,a={}){var H,K,le,ge,te,vt,Ar,xt;let i={...nO,...a}.targetDate||(()=>{let Le=new Date;return new Date(Date.UTC(Le.getFullYear(),Le.getMonth(),Le.getDate()))})(),o=e.recurrence?fp(e,i,t.statusManager.getCompletedStatuses()[0]):e.status,l=t.getActiveTimeSession(e)!==null,c=e.recurrence?((H=e.complete_instances)==null?void 0:H.includes(me(i)))||!1:t.statusManager.isCompletedStatus(o),d=e.recurrence&&((K=e.skipped_instances)==null?void 0:K.includes(me(i)))||!1,u=!!e.recurrence,p=["task-card"];c&&p.push("task-card--completed"),d&&p.push("task-card--skipped"),e.archived&&p.push("task-card--archived"),l&&p.push("task-card--actively-tracked"),u&&p.push("task-card--recurring"),e.priority&&p.push(`task-card--priority-${e.priority}`),o&&p.push(`task-card--status-${o}`),((le=t.settings)==null?void 0:le.subtaskChevronPosition)==="left"&&p.push("task-card--chevron-left"),r.className=p.join(" "),r.dataset.status=o;let m=r.querySelector(".task-card__main-row"),h=t.priorityManager.getPriorityConfig(e.priority);h&&r.style.setProperty("--priority-color",h.color);let f=t.statusManager.getStatusConfig(o);f&&r.style.setProperty("--current-status-color",f.color);let g=t.statusManager.getNextStatus(o),y=t.statusManager.getStatusConfig(g);y&&r.style.setProperty("--next-status-color",y.color);let k=r.querySelector(".task-card__checkbox");k&&(k.checked=t.statusManager.isCompletedStatus(o));let T=!n||n.some(Le=>hc(Le,"status",t)),w=r.querySelector(".task-card__status-dot");if(T){if(w)f&&(w.style.borderColor=f.color);else if(m){let Le=m.createEl("span",{cls:"task-card__status-dot"});f&&(Le.style.borderColor=f.color),Le.addEventListener("mousedown",ae=>{ae.preventDefault(),ae.stopPropagation()}),Le.addEventListener("click",sne(e,t,r,Le,i));let Z=r.querySelector(".task-card__checkbox");Z?Z.insertAdjacentElement("afterend",Le):m.insertBefore(Le,m.firstChild)}}else w&&w.remove();let S=!n||n.some(Le=>hc(Le,"priority",t)),x=r.querySelector(".task-card__priority-dot");if(S&&e.priority&&h){if(!x&&m){let Le=m.createEl("span",{cls:"task-card__priority-dot",attr:{"aria-label":`Priority: ${h.label}`}});Le.style.borderColor=h.color,Le.addEventListener("click",Ne=>{Ne.stopPropagation(),new mo({currentValue:e.priority,onSelect:async lr=>{try{await t.updateTaskProperty(e,"priority",lr)}catch(rn){console.error("Error updating priority:",rn),new Je.Notice("Failed to update priority")}},plugin:t}).show(Ne)});let Z=r.querySelector(".task-card__status-dot"),ae=r.querySelector(".task-card__checkbox");Z?Z.insertAdjacentElement("afterend",Le):ae?ae.insertAdjacentElement("afterend",Le):m.insertBefore(Le,m.firstChild)}else if(x){x.style.borderColor=h.color,x.setAttribute("aria-label",`Priority: ${h.label}`);let Le=x.cloneNode(!0);Le.addEventListener("click",Z=>{Z.stopPropagation(),new mo({currentValue:e.priority,onSelect:async Ne=>{try{await t.updateTaskProperty(e,"priority",Ne)}catch(Ve){console.error("Error updating priority:",Ve),new Je.Notice("Failed to update priority")}},plugin:t}).show(Z)}),x.replaceWith(Le)}}else x&&x.remove();let C=r.querySelector(".task-card__badges"),M=e.recurrence?`Recurring: ${yv(e.recurrence)} (click to change)`:"";tO(r,".task-card__recurring-indicator",{shouldExist:!!e.recurrence,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:M,onClick:ine(e,t)});let N=!!(e.reminders&&e.reminders.length>0),F=((ge=e.reminders)==null?void 0:ge.length)||0,G=F===1?"1 reminder set (click to manage)":`${F} reminders set (click to manage)`;tO(r,".task-card__reminder-indicator",{shouldExist:N,className:"task-card__reminder-indicator",icon:"bell",tooltip:G,onClick:one(e,t)}),t.projectSubtasksService.isTaskUsedAsProject(e.path).then(Le=>{var Ne,Ve,lr,rn;(Ne=r.querySelector(".task-card__project-indicator-placeholder"))==null||Ne.remove(),(Ve=r.querySelector(".task-card__chevron-placeholder"))==null||Ve.remove(),tO(r,".task-card__project-indicator",{shouldExist:Le,className:"task-card__project-indicator",icon:"folder",tooltip:"This task is used as a project (click to filter subtasks)",onClick:lne(e,t)});let Z=Le&&((lr=t.settings)==null?void 0:lr.showExpandableSubtasks),ae=r.querySelector(".task-card__chevron");if(Z&&!ae){let Nn=((rn=t.expandedProjectsService)==null?void 0:rn.isExpanded(e.path))||!1,od=qp({container:C||m,className:`task-card__chevron${Nn?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:Nn?"Collapse subtasks":"Expand subtasks"});od&&od.addEventListener("click",Bu=>{Bu.stopPropagation(),cne(e,t,r,od)()}),Nn&&NT(r,e,t,!0).catch(Bu=>{console.error("Error showing initial subtasks in update:",Bu)})}else if(!Z&&ae){ae.remove();let Nn=r.querySelector(".task-card__subtasks");if(Nn){let od=Nn._clickHandler;od&&(Nn.removeEventListener("click",od),delete Nn._clickHandler),Nn.remove()}}}).catch(Le=>{console.error("Error checking if task is used as project in update:",Le)});let R=r.querySelector(".task-card__blocking-toggle");if(R)if(e.blocking&&e.blocking.length>0){R.classList.add("is-visible"),R.classList.remove("is-hidden");let Le=t.i18n.translate("ui.taskCard.blockingToggle",{count:e.blocking.length});R.setAttribute("aria-label",Le),(0,Je.setTooltip)(R,Le,{placement:"top"}),R.dataset.count=String(e.blocking.length),R.classList.contains("task-card__blocking-toggle--expanded")&&aO(r,e,t,!0).catch(Z=>{console.error("Error refreshing blocking tasks:",Z)})}else{R.classList.remove("is-visible","task-card__blocking-toggle--expanded"),R.classList.add("is-hidden");let Le=r.querySelector(".task-card__blocking");Le&&Le.remove()}let A=r.querySelector(".task-card__title-text"),I=r.querySelector(".task-card__title"),L=c;A&&(A.textContent=e.title,A.classList.toggle("completed",L)),I&&I.classList.toggle("completed",L);let V=r.querySelector(".task-card__badge--blocked");V&&V.remove();let W=r.querySelector(".task-card__metadata");if(W){W.innerHTML="";let Le=[],Z=n||(t.settings.defaultVisibleProperties?Ba(t.settings.defaultVisibleProperties,t):une(t));for(let ae of Z){if(hc(ae,"status",t)||hc(ae,"priority",t))continue;if(ae==="blocked"){if(e.isBlocked){let Ve=t.i18n.translate("ui.taskCard.blockedBadge"),lr=(vt=(te=e.blockedBy)==null?void 0:te.length)!=null?vt:0,rn=lr>0?`${Ve} (${lr})`:Ve,Nn=W.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocked",text:rn});(0,Je.setTooltip)(Nn,t.i18n.translate("ui.taskCard.blockedBadgeTooltip"),{placement:"top"}),Le.push(Nn)}continue}if(ae==="blocking"){if(e.isBlocking){let Ve=t.i18n.translate("ui.taskCard.blockingBadge"),lr=(xt=(Ar=e.blocking)==null?void 0:Ar.length)!=null?xt:0,rn=lr>0?`${Ve} (${lr})`:Ve,Nn=W.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocking",text:rn});(0,Je.setTooltip)(Nn,t.i18n.translate("ui.taskCard.blockingBadgeTooltip"),{placement:"top"}),Le.push(Nn)}continue}let Ne=mne(W,ae,e,t);Ne&&Le.push(Ne)}hne(W,Le)}}async function oRe(r,e){return new Promise((t,n)=>{new rO(e.app,r,async()=>{try{await e.taskService.deleteTask(r),t()}catch(s){n(s)}}).open()})}function lRe(r){let e=r.querySelector(".task-card__subtasks");if(e){let t=e._clickHandler;t&&(e.removeEventListener("click",t),delete e._clickHandler)}}async function NT(r,e,t,n){try{let a=r.querySelector(".task-card__subtasks");if(n){if(!a){a=r.ownerDocument.createElement("div"),a.className="task-card__subtasks";let i=o=>{o.stopPropagation()};a.addEventListener("click",i),a._clickHandler=i,r.appendChild(a)}for(;a.firstChild;)a.removeChild(a.firstChild);let s=a.createEl("div",{cls:"task-card__subtasks-loading",text:t.i18n.translate("contextMenus.task.subtasks.loading")});try{let i=t.app.vault.getAbstractFileByPath(e.path);if(!(i instanceof Je.TFile))throw new Error("Task file not found");if(!t.projectSubtasksService)throw new Error("projectSubtasksService not initialized");let o=await t.projectSubtasksService.getTasksLinkedToProject(i);if(s.remove(),o.length===0){a.createEl("div",{cls:"task-card__subtasks-loading",text:t.i18n.translate("contextMenus.task.subtasks.noSubtasks")});return}let l=t.projectSubtasksService.sortTasks(o),d=(u=>{var h;let p=[],m=u.closest(".task-card");for(;m;){let f=m._taskPath;f&&p.unshift(f),m=(h=m.parentElement)==null?void 0:h.closest(".task-card")}return p})(r);for(let u of l){if(d.includes(u.path)){console.warn("Circular reference detected in task chain:",{subtask:u.path,parentChain:d,cycle:[...d,u.path]});continue}let p=br(u,t,void 0);p.classList.add("task-card--subtask"),a.appendChild(p)}}catch(i){console.error("Error loading subtasks:",i),s.textContent=t.i18n.translate("contextMenus.task.subtasks.loadFailed")}}else if(a){let s=a._clickHandler;s&&(a.removeEventListener("click",s),delete a._clickHandler),a.remove()}}catch(a){throw console.error("Error in toggleSubtasks:",a),a}}async function aO(r,e,t,n){let a=r.querySelector(".task-card__blocking");if(!n){a&&a.remove();return}a||(a=r.createDiv({cls:"task-card__blocking"}),a.addEventListener("click",i=>i.stopPropagation()),a.addEventListener("dblclick",i=>i.stopPropagation()),a.addEventListener("contextmenu",i=>i.stopPropagation())),a.empty();let s=a.createDiv({cls:"task-card__blocking-loading",text:t.i18n.translate("ui.taskCard.loadingDependencies")});try{let o=(e.blocking?await Promise.all(e.blocking.map(l=>t.cacheManager.getTaskInfo(l))):[]).filter(l=>!!l);if(s.remove(),o.length===0){a.createDiv({cls:"task-card__blocking-empty",text:t.i18n.translate("ui.taskCard.blockingEmpty")});return}o.forEach(l=>{let c=br(l,t,void 0);c.classList.add("task-card--dependency"),a.appendChild(c)})}catch(i){console.error("Error loading blocking tasks:",i),s.textContent=t.i18n.translate("ui.taskCard.blockingLoadError")}}async function cRe(r,e,t){if(!r||!r.projects||r.projects.length===0)return;let n=0,a=10;for(;nsetTimeout(i,10)),n++}let s=t.querySelectorAll(".task-card__chevron--expanded");for(let i of s){let o=i.closest(".task-card");if(!o)continue;let l=o.dataset.taskPath;if(!l)continue;let c=e.app.vault.getAbstractFileByPath(l);if(!(c instanceof Je.TFile))continue;let d=c.basename;if(r.projects.flat(2).some(p=>{if(p&&typeof p=="string"&&p.startsWith("[[")&&p.endsWith("]]")){let m=p.slice(2,-2).trim(),h=(0,Je.parseLinktext)(m).path,f=e.app.metadataCache.getFirstLinkpathDest(h,"");return h===d||f&&f.path===l}return p===d||p===l})&&o.querySelector(".task-card__subtasks"))try{let m=await e.cacheManager.getTaskInfo(l);m&&await NT(o,m,e,!0)}catch(m){console.error("Error refreshing parent task subtasks:",m)}}}var Je,nO,cD,rne,rO,Kn=b(()=>{Je=require("obsidian");QR();Fn();Xu();kt();Bp();AT();Mf();eO();Pf();lD();tne();Pd();Vu();nO={layout:"default"};cD={due:r=>r.due,scheduled:r=>r.scheduled,projects:r=>r.projects,contexts:r=>r.contexts,tags:r=>r.tags,blocked:r=>r.isBlocked,blocking:r=>r.isBlocking,blockedBy:r=>r.blockedBy,blockingTasks:r=>r.blocking,timeEstimate:r=>r.timeEstimate,timeEntries:r=>r.timeEntries,totalTrackedTime:r=>r.totalTrackedTime,recurrence:r=>r.recurrence,completedDate:r=>r.completedDate,reminders:r=>r.reminders,icsEventId:r=>r.icsEventId,completeInstances:r=>r.complete_instances,skippedInstances:r=>r.skipped_instances,dateCreated:r=>r.dateCreated,dateModified:r=>r.dateModified,googleCalendarSync:r=>r.path,checklistProgress:r=>r.path};rne={due:(r,e,t,n)=>{typeof e=="string"&&nRe(r,e,t,n)},scheduled:(r,e,t,n)=>{typeof e=="string"&&aRe(r,e,t,n)},projects:(r,e,t,n)=>{if(Array.isArray(e)){let a={metadataCache:n.app.metadataCache,workspace:n.app.workspace,sourcePath:t.path};oD(r,e,a)}},contexts:(r,e,t,n)=>{Array.isArray(e)&&ene(r,e,{onTagClick:async(s,i)=>{let o=s.startsWith("@")?s.slice(1):s;await n.openTagsPane(`#${o}`)||console.log("Could not open search pane, context clicked:",s)}})},tags:(r,e,t,n)=>{if(Array.isArray(e)){let a=e;n.settings.taskIdentificationMethod==="tag"&&n.settings.hideIdentifyingTagsInCards&&(a=e.filter(s=>!sr.matchesHierarchicalTagExact(s,n.settings.taskTag))),a.length>0&&Xre(r,a,{onTagClick:async(i,o)=>{let l=i.startsWith("#")?i.slice(1):i;await n.openTagsPane(`#${l}`)||console.log("Could not open search pane, tag clicked:",i)}})}},timeEstimate:(r,e,t,n)=>{typeof e=="number"&&(r.textContent=`${n.formatTime(e)} estimated`)},totalTrackedTime:(r,e,t,n)=>{typeof e=="number"&&e>0&&(r.textContent=`${n.formatTime(e)} tracked`)},recurrence:(r,e)=>{typeof e=="string"&&(r.textContent=`Recurring: ${yv(e)}`)},completeInstances:(r,e,t)=>{var n;if(Array.isArray(e)&&e.length>0){let a=e.length,s=((n=t.skipped_instances)==null?void 0:n.length)||0,i=a+s;if(i>0){let o=Math.round(a/i*100);r.textContent=`\u2713 ${a} completed (${o}%)`,r.classList.add("task-card__metadata-pill--completed-instances")}else r.textContent=`\u2713 ${a} completed`,r.classList.add("task-card__metadata-pill--completed-instances")}},skippedInstances:(r,e,t)=>{if(Array.isArray(e)&&e.length>0){let n=e.length;r.textContent=`\u2298 ${n} skipped`,r.classList.add("task-card__metadata-pill--skipped-instances")}},completedDate:(r,e,t,n)=>{typeof e=="string"&&(r.textContent=`Completed: ${ns(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:n.settings.calendarViewSettings.timeFormat})}`)},dateCreated:(r,e,t,n)=>{typeof e=="string"&&(r.textContent=`Created: ${ns(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:n.settings.calendarViewSettings.timeFormat})}`)},dateModified:(r,e,t,n)=>{typeof e=="string"&&(r.textContent=`Modified: ${ns(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:n.settings.calendarViewSettings.timeFormat})}`)},blocked:(r,e,t)=>{var n,a;if(e===!0){let s=(a=(n=t.blockedBy)==null?void 0:n.length)!=null?a:0;r.textContent=s>0?`Blocked (${s})`:"Blocked",r.classList.add("task-card__metadata-pill--blocked")}},blocking:(r,e,t)=>{var n,a;if(e===!0){let s=(a=(n=t.blocking)==null?void 0:n.length)!=null?a:0;r.textContent=s>0?`Blocking (${s})`:"Blocking",r.classList.add("task-card__metadata-pill--blocking")}},blockedBy:(r,e,t,n)=>{if(Array.isArray(e)&&e.length>0){r.createEl("span",{text:"Blocked by: "});let a=r.createEl("span");e.forEach((s,i)=>{var l;i>0&&a.appendChild(document.createTextNode(", "));let o=typeof s=="string"?s:s.path;if(o){let c=a.createEl("a",{cls:"internal-link",attr:{href:o}});c.textContent=((l=o.split("/").pop())==null?void 0:l.replace(".md",""))||o,c.addEventListener("click",d=>{d.preventDefault(),d.stopPropagation(),n.app.workspace.openLinkText(o,"",!1)})}})}},blockingTasks:(r,e,t,n)=>{if(Array.isArray(e)&&e.length>0){r.createEl("span",{text:"Blocking: "});let a=r.createEl("span");e.forEach((s,i)=>{var l;i>0&&a.appendChild(document.createTextNode(", "));let o=a.createEl("a",{cls:"internal-link",attr:{href:s}});o.textContent=((l=s.split("/").pop())==null?void 0:l.replace(".md",""))||s,o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),n.app.workspace.openLinkText(s,"",!1)})})}},timeEntries:(r,e,t,n)=>{if(Array.isArray(e)&&e.length>0){let a=ha(e);a>0&&(r.textContent=`${n.formatTime(a)} tracked (${e.length} ${e.length===1?"entry":"entries"})`)}},reminders:(r,e)=>{Array.isArray(e)&&e.length>0&&(r.textContent=`${e.length} ${e.length===1?"reminder":"reminders"}`)},icsEventId:(r,e)=>{Array.isArray(e)&&e.length>0&&(r.textContent=`Linked to ${e.length} calendar ${e.length===1?"event":"events"}`)},checklistProgress:(r,e,t,n)=>{let a=KNe(t.path,n);if(!a)return;let s=r.createEl("span",{cls:"task-card__progress"}),o=s.createEl("span",{cls:"task-card__progress-bar"}).createEl("span",{cls:"task-card__progress-fill"});o.style.width=`${a.percent}%`,a.percent>0&&a.percent<5&&(o.style.minWidth="2px"),s.createEl("span",{cls:"task-card__progress-label",text:`${a.completed}/${a.total}`}),(0,Je.setTooltip)(s,`${a.percent}% complete (${a.completed}/${a.total})`,{placement:"top"})}};rO=class extends Je.Modal{constructor(e,t,n){super(e),this.task=t,this.onConfirm=n}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 n=e.createEl("div",{cls:"modal-button-container"});n.style.display="flex",n.style.gap="10px",n.style.justifyContent="flex-end",n.style.marginTop="20px";let a=n.createEl("button",{text:"Cancel"});a.addEventListener("click",()=>{this.close()});let s=n.createEl("button",{text:"Delete",cls:"mod-warning"});s.style.backgroundColor="var(--color-red)",s.style.color="white",s.addEventListener("click",async()=>{try{await this.onConfirm(),this.close(),new Je.Notice("Task deleted successfully")}catch(i){let o=i instanceof Error?i.message:String(i);new Je.Notice(`Failed to delete task: ${o}`),console.error("Error in delete confirmation:",i)}}),a.focus()}onClose(){let{contentEl:e}=this;e.empty()}}});var fne={};Ke(fne,{TaskSelectorWithCreateModal:()=>RT,openTaskSelector:()=>Zn,openTaskSelectorWithCreate:()=>dRe});async function dRe(r,e){let t=await r.cacheManager.getAllTasks();return new Promise(n=>{new RT(r.app,r,t,{onResult:n,...e}).open()})}function Zn(r,e,t,n){new RT(r.app,r,e,{placeholder:n==null?void 0:n.placeholder,title:n==null?void 0:n.title,onResult:s=>{s.type==="selected"||s.type==="created"?t(s.task):t(null)}}).open()}var el,RT,Dd=b(()=>{el=require("obsidian");kt();Fn();Cf();Kn();RT=class extends el.SuggestModal{constructor(t,n,a,s){super(t);this.createFooterEl=null;this.currentQuery="";this.resultHandled=!1;this.handleInputChange=()=>{let t=this.inputEl.value.trim();this.currentQuery=t,this.updateCreateFooter(t)};this.plugin=n,this.tasks=a,this.options=s,this.translate=n.i18n.translate.bind(n.i18n),this.nlParser=Ks.fromPlugin(n),this.setPlaceholder(s.placeholder||this.translate("modals.taskSelectorWithCreate.placeholder")),this.setInstructions([{command:"\u2191\u2193",purpose:this.translate("modals.taskSelector.instructions.navigate")},{command:"\u21B5",purpose:this.translate("modals.taskSelector.instructions.select")},{command:"\u21E7\u21B5",purpose:this.translate("modals.taskSelectorWithCreate.instructions.create")},{command:"esc",purpose:this.translate("modals.taskSelector.instructions.dismiss")}]),this.titleEl.setText(s.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),setTimeout(()=>this.createFooter(),0)}createFooter(){var n;let t=((n=this.modalEl.querySelector(".prompt"))==null?void 0:n.parentElement)||this.modalEl;this.createFooterEl=createDiv({cls:"task-selector-create-footer"}),this.createFooterEl.style.display="none",t.appendChild(this.createFooterEl)}updateCreateFooter(t){if(!this.createFooterEl)return;if(!t){this.createFooterEl.style.display="none",this.createFooterEl.empty();return}let n=this.nlParser.parseInput(t);if(n.title&&n.title!=="Untitled Task"){this.createFooterEl.empty(),this.createFooterEl.style.display="flex";let a=this.createFooterEl.createDiv({cls:"task-selector-create-footer__icon"});(0,el.setIcon)(a,"plus-circle");let s=this.createFooterEl.createDiv({cls:"task-selector-create-footer__content"});s.createDiv({cls:"task-selector-create-footer__title-line"}).createSpan({cls:"task-selector-create-footer__title",text:n.title});let o=this.buildMetadataParts(n);if(o.length>0){let c=s.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,el.setIcon)(p,d.icon),u.createSpan({cls:"task-selector-create-footer__chip-text",text:d.text})})}let l=s.createDiv({cls:"task-selector-create-footer__hint"});l.createSpan({cls:"task-selector-create-footer__shortcut",text:"\u21E7\u21B5"}),l.createSpan({cls:"task-selector-create-footer__hint-text",text:this.translate("modals.taskSelectorWithCreate.footer.createLabel")})}else this.createFooterEl.style.display="none",this.createFooterEl.empty()}buildMetadataParts(t){let n=[];if(t.dueDate){let a=t.dueTime?`${t.dueDate} ${t.dueTime}`:t.dueDate;n.push({icon:"calendar",text:a,type:"due"})}if(t.scheduledDate){let a=t.scheduledTime?`${t.scheduledDate} ${t.scheduledTime}`:t.scheduledDate;n.push({icon:"calendar-clock",text:a,type:"scheduled"})}if(t.priority&&t.priority!=="normal"&&n.push({icon:"flag",text:t.priority,type:"priority"}),t.status){let a=this.plugin.statusManager.getStatusConfig(t.status);n.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=>{n.push({icon:"at-sign",text:a,type:"context"})}),t.projects&&t.projects.length>0&&t.projects.forEach(a=>{n.push({icon:"folder",text:a.replace(/^\[\[|\]\]$/g,""),type:"project"})}),t.tags&&t.tags.length>0&&t.tags.forEach(a=>{n.push({icon:"hash",text:a,type:"tag"})}),t.recurrence&&n.push({icon:"repeat",text:t.recurrence,type:"recurrence"}),t.estimate&&t.estimate>0){let a=Math.floor(t.estimate/60),s=t.estimate%60,i=a>0?`${a}h ${s}m`:`${s}m`;n.push({icon:"timer",text:i,type:"estimate"})}if(t.details){let a=t.details.length>30?t.details.substring(0,30)+"...":t.details;n.push({icon:"file-text",text:a,type:"details"})}if(t.userFields){let a=this.plugin.settings.userFields||[];for(let[s,i]of Object.entries(t.userFields)){let o=a.find(d=>d.id===s),l=(o==null?void 0:o.displayName)||s,c=Array.isArray(i)?i.join(", "):i;n.push({icon:"sliders-horizontal",text:`${l}: ${c}`,type:"userfield"})}}return n}async createNewTask(){let t=this.inputEl.value.trim();if(!t){new el.Notice(this.translate("modals.taskSelectorWithCreate.notices.emptyQuery"));return}try{let n=this.nlParser.parseInput(t);if(!n.title||n.title==="Untitled Task"){new el.Notice(this.translate("modals.taskSelectorWithCreate.notices.invalidTitle"));return}let a=this.buildTaskDataFromParsed(n),s=await this.plugin.taskService.createTask(a);new el.Notice(this.translate("modals.taskCreation.notices.success",{title:s.taskInfo.title})),this.resultHandled=!0,this.close(),this.options.onResult({type:"created",task:s.taskInfo})}catch(n){console.error("Failed to create task:",n);let a=n instanceof Error?n.message:String(n);new el.Notice(this.translate("modals.taskCreation.notices.failure",{message:a}))}}buildTaskDataFromParsed(t){let n=ct(),a={title:t.title.trim(),status:t.status||this.plugin.settings.defaultTaskStatus,priority:t.priority||this.plugin.settings.defaultTaskPriority,dateCreated:n,dateModified:n};if(t.dueDate&&(a.due=t.dueTime?En(t.dueDate,t.dueTime):t.dueDate),t.scheduledDate&&(a.scheduled=t.scheduledTime?En(t.scheduledDate,t.scheduledTime):t.scheduledDate),t.contexts&&t.contexts.length>0&&(a.contexts=t.contexts),t.projects&&t.projects.length>0&&(a.projects=t.projects),t.tags&&t.tags.length>0&&(a.tags=t.tags.map(s=>zs(s))),t.details&&(a.details=t.details),t.recurrence&&(a.recurrence=t.recurrence),t.estimate&&t.estimate>0&&(a.timeEstimate=t.estimate),t.userFields){let s=this.plugin.settings.userFields||[],i={};for(let[o,l]of Object.entries(t.userFields)){let c=s.find(d=>d.id===o);c&&(i[c.key]=Array.isArray(l)?l.join(", "):l)}Object.keys(i).length>0&&(a.customFrontmatter=i)}return a}getSuggestions(t){return this.currentQuery=t,this.getFilteredTasks(t)}getFilteredTasks(t){let n=t.toLowerCase();return this.tasks.filter(a=>!a.archived).filter(a=>{var i;return!!(!t||a.title&&a.title.toLowerCase().includes(n)||a.due&&a.due.toLowerCase().includes(n)||a.priority&&a.priority!=="normal"&&a.priority.toLowerCase().includes(n)||(i=a.contexts)!=null&&i.some(o=>o&&o.toLowerCase().includes(n))||ac(a.projects||[]).some(o=>o&&o.toLowerCase().includes(n)))}).sort((a,s)=>{var u,p;let i=this.plugin.statusManager.isCompletedStatus(a.status),o=this.plugin.statusManager.isCompletedStatus(s.status);if(i!==o)return i?1:-1;if(a.due&&!s.due)return-1;if(!a.due&&s.due)return 1;if(a.due&&s.due){let m=a.due.localeCompare(s.due);if(m!==0)return m}let l={high:0,normal:1,low:2},c=(u=l[a.priority])!=null?u:1,d=(p=l[s.priority])!=null?p:1;return c!==d?c-d:a.title.localeCompare(s.title)})}renderSuggestion(t,n){let a=br(t,this.plugin,void 0,{layout:"default"});a.classList.add("task-selector-modal__suggestion");let s=a.cloneNode(!0);n.appendChild(s)}onChooseSuggestion(t,n){this.resultHandled=!0,this.options.onResult({type:"selected",task:t})}onClose(){this.inputEl.removeEventListener("input",this.handleInputChange),this.createFooterEl&&(this.createFooterEl.remove(),this.createFooterEl=null),setTimeout(()=>{this.resultHandled||this.options.onResult({type:"cancelled"})},0),super.onClose()}}});var mD,yne=b(()=>{mc();mD=class{constructor(e){this.targetDoc=document;this.menu=new Bn,this.options=e,this.buildMenu()}buildMenu(){this.getStatusOptions().forEach((t,n)=>{this.menu.addItem(a=>{let s=t.label;a.setIcon(t.icon||"circle"),t.value===this.options.currentValue&&(s=`\u2713 ${t.label}`),a.setTitle(s),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,s)=>a.order-s.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,n;(n=(t=e.target)==null?void 0:t.instanceOf)!=null&&n.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),this.menu.show(e),setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(e){this.targetDoc=e.ownerDocument,this.menu.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4}),setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let e=this.getStatusOptions(),t=this.targetDoc.querySelector(".menu");if(!t)return;let n=t.querySelectorAll(".menu-item");e.forEach((a,s)=>{let i=n[s];if(i&&a.color){let o=i.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}})}}});var Rf,sO=b(()=>{Pf();mc();Rf=class{constructor(e,t,n,a){this.plugin=e,this.task=t,this.triggerElement=n,this.onUpdate=a}show(e){let t=new Bn;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(n=>{n.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.manageAllReminders")).setIcon("settings").onClick(()=>{this.openReminderModal()})}),this.task.reminders&&this.task.reminders.length>0&&t.addItem(n=>{n.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.clearAllReminders")).setIcon("trash").onClick(async()=>{await this.clearAllReminders()})}),t.show(e)}addQuickRemindersSection(e,t,n){if(!(t==="due"?this.task.due:this.task.scheduled)){e.addItem(s=>{s.setTitle(n).setIcon("bell").setDisabled(!0)});return}e.addItem(s=>{s.setTitle(n),s.setIcon("bell"),this.addQuickReminderSubmenu(s.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(s=>{s.setTitle(a.label).onClick(async()=>{await this.addQuickReminder(t,a.offset,a.label)})})})}async addQuickReminder(e,t,n){let a={id:`rem_${Date.now()}`,type:"relative",relatedTo:e,offset:t,description:n},s=[...this.task.reminders||[],a];await this.saveReminders(s)}async clearAllReminders(){await this.saveReminders([])}async saveReminders(e){let t;if(this.task.path&&this.task.path.trim()!==""){let n=await this.plugin.cacheManager.getTaskInfo(this.task.path);n?(t={...n,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 uo(this.plugin.app,this.plugin,this.task,async t=>{await this.saveReminders(t)}).open()}}});function vne(r,e){let t=Object.keys(e).map(n=>uRe(r,n,e[n]));return t.length===1?t[0]:function(){t.forEach(n=>n())}}function uRe(r,e,t){let n=r[e],a=r.hasOwnProperty(e),s=a?n:function(){return Object.getPrototypeOf(r)[e].apply(this,arguments)},i=t(s);return n&&Object.setPrototypeOf(i,n),Object.setPrototypeOf(o,i),r[e]=o,l;function o(...c){return i===s&&r[e]===o&&l(),i.apply(this,c)}function l(){r[e]===o&&(a?r[e]=s:delete r[e]),i!==s&&(i=s,Object.setPrototypeOf(o,n||Function))}}var bne=b(()=>{});function pRe(r){let e=r.embedRegistry.embedByExtension.md({app:r,containerEl:document.createElement("div")},null,"");e.editable=!0,e.showEditor();let t=Object.getPrototypeOf(Object.getPrototypeOf(e.editMode));return e.unload(),t.constructor}function mRe(){return typeof app=="undefined"?class{constructor(e,t,n){this.containerEl=document.createElement("div");this.editorEl=document.createElement("div");this.owner={editMode:null,editor:null};this._loaded=!1;this.app=e,this.containerEl=t}set(e){}onUpdate(e,t){}buildLocalExtensions(){return[]}destroy(){}unload(){}}:pRe(app)}var kne,hD,yc,Tne,Of,iO=b(()=>{kne=require("obsidian"),hD=require("@codemirror/state"),yc=require("@codemirror/view");bne();Tne={cursorLocation:void 0,value:"",cls:"",placeholder:"",onEnter:()=>!1,onEscape:()=>{},onTab:()=>!1,onSubmit:()=>{},onBlur:()=>{},onPaste:()=>{},onChange:()=>{},extensions:[],enterVimInsertMode:!1},Of=class extends mRe(){constructor(t,n,a={}){super(t,n,{app:t,onMarkdownScroll:()=>{},getMode:()=>"source"});this.hasEnteredVimInsertMode=!1;this.options={...Tne,...a},this.initial_value=this.options.value,this.scope=new kne.Scope(this.app.scope),this.scope.register(["Mod"],"Enter",(s,i)=>!0),this.owner.editMode=this,this.owner.editor=this.editor,this.set(a.value||""),this.uninstaller=vne(this.app.workspace,{setActiveLeaf:s=>function(...i){var o;(o=this.activeCM)!=null&&o.hasFocus||s.call(this,...i)}}),this.options.onBlur!==Tne.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.app.workspace.activeEditor=this.owner,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:hD.EditorSelection.range(a.cursorLocation.anchor,a.cursorLocation.head)})}get value(){return this.editor.cm.state.doc.toString()}setValue(t){this.set(t)}enterVimInsertMode(){setTimeout(()=>{var t,n,a,s;try{if(!this.app.vault.getConfig("vimMode"))return;let o=(t=window.CodeMirrorAdapter)==null?void 0:t.Vim;if(!o)return;let l=(s=(a=(n=this.editor)==null?void 0:n.cm)==null?void 0:a.cm)!=null?s:this.activeCM;if(!l)return;o.handleKey(l,"i","api")}catch(i){}},50)}onUpdate(t,n){super.onUpdate(t,n),n&&this.options.onChange(this.value,t)}buildLocalExtensions(){let t=super.buildLocalExtensions();return t.push(yc.EditorView.theme({".cm-lineNumbers":{display:"none !important"},".cm-gutters":{display:"none !important"}})),t.push((0,yc.tooltips)({parent:document.body})),this.options.placeholder&&t.push((0,yc.placeholder)(this.options.placeholder)),t.push(yc.EditorView.domEventHandlers({paste:n=>{this.options.onPaste(n,this)}})),t.push(hD.Prec.highest(yc.keymap.of([{key:"Enter",run:n=>this.options.onEnter(this,!1,!1),shift:n=>this.options.onEnter(this,!1,!0)},{key:"Mod-Enter",run:n=>(this.options.onSubmit(this),!0)},{key:"Escape",run:n=>(this.options.onEscape(this),!0)},{key:"Tab",run:n=>this.options.onTab(this)}]))),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),this.app.workspace.activeEditor=null,this.uninstaller&&(this.uninstaller(),this.uninstaller=void 0),this.containerEl.empty(),super.destroy()}onunload(){this.destroy()}}});function FT(r,e){if(!r||!e)return 0;let t=r.toLowerCase().split(" ").filter(Boolean),n=e.toLowerCase(),a=0,s=0;for(let i=0;i0&&l===a&&(s+=5),a=l+o.length}return s}var wne=b(()=>{});var lO={};Ke(lO,{FileSuggestHelper:()=>oO});var Sne,oO,fD=b(()=>{Sne=require("obsidian");wne();Yy();GA();Xu();oO={async suggest(r,e,t=20,n){var i,o;let a=async()=>{var k,T,w,S,x,C,M,N,F,G;let l=(T=(k=r==null?void 0:r.app)==null?void 0:k.vault)!=null&&T.getMarkdownFiles?r.app.vault.getMarkdownFiles():[],c=[],d=((x=(S=(w=r.settings)==null?void 0:w.projectAutosuggest)==null?void 0:S.rows)!=null?x:[]).slice(0,3),u=new Set;for(let R of d)try{let A=Bo(R);for(let I of A)I.searchable&&!I.property.startsWith("literal:")&&u.add(I.property)}catch(A){}let p=(e||"").toLowerCase(),m=(C=n==null?void 0:n.requiredTags)!=null?C:[],h=(M=n==null?void 0:n.includeFolders)!=null?M:[],f=ME(n);for(let R of l){let A=r.app.metadataCache.getFileCache(R);if(m.length>0){let H=((N=A==null?void 0:A.tags)==null?void 0:N.map(te=>te.tag.replace("#","")))||[],K=((F=A==null?void 0:A.frontmatter)==null?void 0:F.tags)||[],le=[...H,...Array.isArray(K)?K:[K].filter(Boolean)];if(!sr.matchesTagConditions(le,m))continue}if(h.length>0&&!h.some(K=>R.path.startsWith(K)||R.path.startsWith(K+"/")))continue;if(f.enabled){let H=A==null?void 0:A.frontmatter;if(!AE(H,f))continue}let I=R.basename,L="";if(A!=null&&A.frontmatter){let H=r.fieldMapper.mapFromFrontmatter(A.frontmatter,R.path,r.settings.storeTitleInFilename);L=typeof H.title=="string"?H.title:""}let V=A!=null&&A.frontmatter?(0,Sne.parseFrontMatterAliases)(A.frontmatter)||[]:[],W=0;if(W=Math.max(W,FT(e,I)+15),L&&(W=Math.max(W,FT(e,L)+5)),Array.isArray(V))for(let H of V)typeof H=="string"&&(W=Math.max(W,FT(e,H)));if(u.size>0){let H=(A==null?void 0:A.frontmatter)||{};for(let K of u){let le="";if(K==="file.path")le=R.path;else if(K==="file.parent")le=((G=R.parent)==null?void 0:G.path)||"";else if(K==="file.basename")le=I;else if(K==="title")le=L;else if(K==="aliases")le=(Array.isArray(V)?V.filter(te=>typeof te=="string"):[]).join(" ");else{let ge=H[K];ge!=null&&(Array.isArray(ge)?le=ge.filter(te=>typeof te=="string").join(" "):typeof ge=="object"?le=JSON.stringify(ge):(typeof ge=="string"||typeof ge=="number"||typeof ge=="boolean")&&(le=String(ge)))}if(le){let ge=FT(e,le),te=ge>0?ge:le.toLowerCase().includes(p)?30:0;te>0&&(W=Math.max(W,te))}}}if(W>0){let H=[];L&&L!==I&&H.push(`title: ${L}`);let K=Array.isArray(V)?V.filter(ge=>typeof ge=="string"):[];K.length&&H.push(`aliases: ${K.join(", ")}`);let le=H.length?`${I} [${H.join(" | ")}]`:I;c.push({insertText:I,displayText:le,score:W})}}c.sort((R,A)=>A.score-R.score);let g=[],y=new Set;for(let R of c)if(!y.has(R.insertText)&&(g.push(R),y.add(R.insertText),g.length>=t))break;return g},s=(o=(i=r.settings)==null?void 0:i.suggestionDebounceMs)!=null?o:0;return s?new Promise(l=>{let c=r;c.__fileSuggestTimer&&clearTimeout(c.__fileSuggestTimer),c.__fileSuggestTimer=setTimeout(async()=>{let d=await a();l(d)},s)}):a()}}});var ze,Ff,cO,dO,LT,uO=b(()=>{ze=require("obsidian");Bp();AT();yne();Mf();sO();kt();Fn();zE();Qh();lD();Dd();io();iO();Ff=class extends ze.Modal{constructor(t,n){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.blockedByItems=[];this.blockingItems=[];this.selectedProjectItems=[];this.selectedSubtaskFiles=[];this.initialSubtaskFiles=[];this.detailsMarkdownEditor=null;this.isExpanded=!1;this.plugin=n}createDependencyItemFromFile(t,n={}){var i;let a=(i=n.sourcePath)!=null?i:this.getDependencySourcePath();return{dependency:{uid:js(this.plugin.app,a,t.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:as},path:t.path,name:t.basename}}createDependencyItemFromDependency(t,n){var o;let a=Yo(t);if(!a){let l=typeof t=="object"&&t&&"uid"in t&&typeof t.uid=="string"?t.uid:String(t);return{dependency:{uid:l,reltype:as},name:l,unresolved:!0}}let s=up(this.plugin.app,n!=null?n:this.getDependencySourcePath(),a);if(s){let l=((o=s.file)==null?void 0:o.basename)||s.path.split("/").pop()||a.uid;return{dependency:a,path:s.path,name:l}}let i=a.uid.replace(/^\[\[/,"").replace(/\]\]$/,"");return{dependency:a,name:i||t.uid,unresolved:!0}}createDependencyItemFromPath(t){let n=this.getDependencySourcePath(),a=this.plugin.app.vault.getAbstractFileByPath(t);if(a instanceof ze.TFile)return{dependency:{uid:js(this.plugin.app,n,a.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:as},path:a.path,name:a.basename};let i=(t.split("/").pop()||t).replace(/\.md$/i,"");return{dependency:{uid:`[[${i}]]`,reltype:as},path:t,name:i,unresolved:!0}}getDependencySourcePath(){var t;return this.getCurrentTaskPath()||((t=this.plugin.app.workspace.getActiveFile())==null?void 0:t.path)||""}getCurrentTaskPath(){}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.splice(t,1),this.renderBlockedByList()})}renderBlockingList(){this.renderDependencyList(this.blockingList,this.blockingItems,t=>{this.blockingItems.splice(t,1),this.renderBlockingList()})}renderDependencyList(t,n,a){if(!t||(t.empty(),n.length===0))return;let s=this.getLinkServices();n.forEach((i,o)=>{var p;let l=t.createDiv({cls:"task-project-item"});i.unresolved&&(l.addClass("task-project-item--unresolved"),(0,ze.setTooltip)(l,this.t("contextMenus.task.dependencies.notices.unresolved",{entries:i.dependency.uid}),{placement:"top"}));let c=l.createDiv({cls:"task-project-info"}),d=c.createSpan({cls:"task-project-name"});if(i.path&&!i.unresolved)d.addClass("clickable-dependency"),Xo(d,i.path,i.name,s,{cssClass:"task-dependency-link internal-link",hoverSource:"tasknotes-dependency-link",showErrorNotices:!0}),i.path!==i.name&&c.createDiv({cls:"task-project-path",text:i.path});else{d.textContent=i.name;let m=(p=i.path)!=null?p:i.dependency.uid;c.createDiv({cls:"task-project-path",text:m})}let u=l.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,ze.setTooltip)(u,this.t("modals.task.dependencies.removeTaskTooltip"),{placement:"top"}),u.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation(),a(o)})})}extractDetailsFromContent(t){let{body:n}=Xh(t);return n.replace(/\r\n/g,` `).trimEnd()}normalizeDetails(t){return t.replace(/\r\n/g,` `).trimEnd()}addBlockedByTask(t){let n={uid:js(this.plugin.app,this.getDependencySourcePath(),t.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:as};this.addBlockedByDependency(n)}addBlockingTask(t){this.addBlockingTaskFromPath(t.path)}addBlockedByDependency(t){let n=this.getDependencySourcePath(),a=this.createDependencyItemFromDependency(t,n);this.blockedByItems.some(i=>i.dependency.uid===a.dependency.uid||a.path&&i.path===a.path)||(this.blockedByItems.push(a),this.renderBlockedByList())}addBlockingTaskFromPath(t){let n=this.getCurrentTaskPath();if(n&&t===n)return;let a=this.createDependencyItemFromPath(t);this.blockingItems.some(i=>i.path===a.path||i.dependency.uid===a.dependency.uid)||(this.blockingItems.push(a),this.renderBlockingList())}async openBlockedBySelector(){let t=this.getDependencySourcePath(),n=this.getCurrentTaskPath(),a=new Set(this.blockedByItems.map(s=>s.dependency.uid));await this.openTaskDependencySelector(s=>{if(n&&s.path===n)return!1;let i=js(this.plugin.app,t,s.path,this.plugin.settings.useFrontmatterMarkdownLinks);return!a.has(i)},s=>{let i={uid:js(this.plugin.app,t,s.path),reltype:as};this.addBlockedByDependency(i)})}async openBlockingSelector(){let t=this.getDependencySourcePath(),n=this.getCurrentTaskPath(),a=new Set(this.blockingItems.map(i=>i.path).filter(i=>typeof i=="string")),s=new Set(this.blockingItems.map(i=>i.dependency.uid));await this.openTaskDependencySelector(i=>{if(n&&i.path===n||a.has(i.path))return!1;let o=js(this.plugin.app,t,i.path,this.plugin.settings.useFrontmatterMarkdownLinks);return!s.has(o)},i=>{this.addBlockingTaskFromPath(i.path)})}async openTaskDependencySelector(t,n){var a,s,i;try{let l=((i=await((s=(a=this.plugin.cacheManager).getAllTasks)==null?void 0:s.call(a)))!=null?i:[]).filter(t);if(l.length===0){new ze.Notice(this.t("contextMenus.task.dependencies.notices.noEligibleTasks"));return}Zn(this.plugin,l,c=>{c&&n(c)})}catch(o){console.error("Failed to open task selector for dependencies:",o),new ze.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}getApp(){return this.app}getPlugin(){return this.plugin}t(t,n){return this.plugin.i18n.translate(t,n)}getFileByPath(t){return this.app.vault.getAbstractFileByPath(t)}getMarkdownFiles(){return this.app.vault.getMarkdownFiles()}getFileCache(t){return this.app.metadataCache.getFileCache(t)}resolveLink(t,n){return this.app.metadataCache.getFirstLinkpathDest(t,n)}isEditMode(){return!1}isCreationMode(){return!1}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.handleSave()}},this.containerEl.addEventListener("keydown",this.keyboardHandler),this.initializeFormData().then(()=>{this.createModalContent(),this.focusTitleInput()})}createModalContent(){let{contentEl:t}=this;t.empty();let n=t.createDiv("minimalist-modal-container");this.splitContentWrapper=n.createDiv("modal-split-content"),this.splitLeftColumn=this.splitContentWrapper.createDiv("modal-split-left"),this.splitRightColumn=this.splitContentWrapper.createDiv("modal-split-right"),this.createPrimaryInput(this.splitLeftColumn),this.createActionBar(this.splitLeftColumn),this.createDetailsSection(n),this.createAdditionalSections(this.splitLeftColumn),this.createActionButtons(n)}createPrimaryInput(t){this.createTitleInput(t)}createAdditionalSections(t){}createTitleInput(t){let n=t.createDiv("title-input-container");this.titleInput=n.createEl("input",{type:"text",cls:"title-input",placeholder:this.t("modals.task.titlePlaceholder")}),this.titleInput.value=this.title,this.titleInput.addEventListener("input",a=>{this.title=a.target.value})}createActionBar(t){this.actionBar=t.createDiv("action-bar"),this.createActionIcon(this.actionBar,"calendar",this.t("modals.task.actions.due"),(n,a)=>{this.showDateContextMenu(a,"due")},"due-date"),this.createActionIcon(this.actionBar,"calendar-clock",this.t("modals.task.actions.scheduled"),(n,a)=>{this.showDateContextMenu(a,"scheduled")},"scheduled-date"),this.createActionIcon(this.actionBar,"dot-square",this.t("modals.task.actions.status"),(n,a)=>{this.showStatusContextMenu(a)},"status"),this.createActionIcon(this.actionBar,"star",this.t("modals.task.actions.priority"),(n,a)=>{this.showPriorityContextMenu(a)},"priority"),this.createActionIcon(this.actionBar,"refresh-ccw",this.t("modals.task.actions.recurrence"),(n,a)=>{this.showRecurrenceContextMenu(a)},"recurrence"),this.createActionIcon(this.actionBar,"bell",this.t("modals.task.actions.reminders"),(n,a)=>{this.showReminderContextMenu(a)},"reminders"),this.updateIconStates()}createActionIcon(t,n,a,s,i){let o=t.createDiv("action-icon");o.setAttribute("aria-label",a),o.setAttribute("data-initial-tooltip",a),o.setAttribute("tabindex","0"),o.setAttribute("role","button"),i&&o.setAttribute("data-type",i),(0,ze.setTooltip)(o,a,{placement:"top"});let l=o.createSpan("icon");return(0,ze.setIcon)(l,n),o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),s(o,c)}),o.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),c.stopPropagation(),s(o,c))}),o}createDetailsSection(t){this.detailsContainer=this.splitLeftColumn?this.splitLeftColumn.createDiv("details-container"):t.createDiv("details-container"),this.isExpanded||(this.detailsContainer.style.display="none",this.splitRightColumn&&(this.splitRightColumn.style.display="none"));let n=this.plugin.settings.modalFieldsConfig,a=this.shouldShowField("title",n),s=this.shouldShowField("details",n),i=this.isEditMode(),o=this.isCreationMode()&&this.plugin.settings.enableNaturalLanguageInput;if(a&&(i||o)){let l=this.detailsContainer.createDiv("detail-label");l.textContent=this.t("modals.task.titleLabel");let c=this.detailsContainer.createEl("input",{type:"text",cls:"title-input-detailed",placeholder:this.t("modals.task.titleDetailedPlaceholder")});c.value=this.title,c.addEventListener("input",d=>{this.title=d.target.value}),(i||o)&&!this.titleInput&&(this.titleInput=c)}if(s){let l=this.splitRightColumn||this.detailsContainer,c=l.createDiv("detail-label");c.textContent=this.t("modals.task.detailsLabel");let d=l.createDiv("details-markdown-editor");this.detailsMarkdownEditor=this.createMarkdownEditor(d,{value:this.details,placeholder:this.t("modals.task.detailsPlaceholder"),cls:"details-editor",onChange:u=>{this.details=u},onSubmit:()=>{this.handleSave()},onEscape:()=>{this.close()},onTab:()=>(this.focusNextField(),!0)})}this.createAdditionalFields(this.detailsContainer)}shouldShowField(t,n){if(!n||!n.fields)return!0;let a=n.fields.find(i=>i.id===t);if(!a)return!0;let s=this.isCreationMode()?a.visibleInCreation:a.visibleInEdit;return a.enabled&&s}createAdditionalFields(t){let n=this.plugin.settings.modalFieldsConfig;if(!n){console.error("TaskModal: modalFieldsConfig is not initialized. This should never happen.");return}this.createFieldsFromConfig(t,n)}createFieldsFromConfig(t,n){let{getFieldsByGroup:a}=(Xy(),Lo(oI)),s=a(n,this.isCreationMode()),i=[...n.groups].sort((o,l)=>o.order-l.order);for(let o of i){let l=s.get(o.id);if(!l||l.length===0||o.id==="basic")continue;let c=t.createDiv({cls:"task-modal__field-group"});o.id!=="metadata"&&t.createEl("hr",{cls:"task-modal__section-separator"});for(let d of l)this.createField(c,d)}}createField(t,n){switch(n.id){case"contexts":this.createContextsField(t);break;case"tags":this.createTagsField(t);break;case"time-estimate":this.createTimeEstimateField(t);break;case"projects":this.createProjectsField(t);break;case"subtasks":this.createSubtasksField(t);break;case"blocked-by":this.createBlockedByField(t);break;case"blocking":this.createBlockingField(t);break;default:n.fieldType==="user"&&this.createUserFieldByConfig(t,n);break}}createContextsField(t){new ze.Setting(t).setName(this.t("modals.task.contextsLabel")).addText(n=>{n.setPlaceholder(this.t("modals.task.contextsPlaceholder")).setValue(this.contexts).onChange(a=>{this.contexts=a}),this.contextsInput=n.inputEl,new cO(this.app,n.inputEl,this.plugin)})}createTagsField(t){new ze.Setting(t).setName(this.t("modals.task.tagsLabel")).addText(n=>{n.setPlaceholder(this.t("modals.task.tagsPlaceholder")).setValue(this.tags).onChange(a=>{this.tags=zs(a)}),this.tagsInput=n.inputEl,new dO(this.app,n.inputEl,this.plugin)})}createTimeEstimateField(t){new ze.Setting(t).setName(this.t("modals.task.timeEstimateLabel")).addText(n=>{n.setPlaceholder(this.t("modals.task.timeEstimatePlaceholder")).setValue(this.timeEstimate.toString()).onChange(a=>{this.timeEstimate=parseInt(a)||0}),this.timeEstimateInput=n.inputEl})}createProjectsField(t){new ze.Setting(t).setName(this.t("modals.task.organization.projects")).addButton(n=>{n.setButtonText(this.t("modals.task.organization.addToProjectButton")).setTooltip(this.t("modals.task.projectsTooltip")).onClick(()=>{new md(this.app,this.plugin,s=>{this.addProject(s)}).open()}),n.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.projectsList||(this.projectsList=t.createDiv({cls:"task-projects-list"})),this.renderOrganizationLists()}createSubtasksField(t){new ze.Setting(t).setName(this.t("modals.task.organization.subtasks")).addButton(n=>{n.setButtonText(this.t("modals.task.organization.addSubtasksButton")).setTooltip(this.t("modals.task.organization.addSubtasksTooltip")).onClick(()=>{this.openSubtaskSelector()}),n.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.subtasksList||(this.subtasksList=t.createDiv({cls:"task-projects-list"})),this.renderOrganizationLists()}createBlockedByField(t){new ze.Setting(t).setName(this.t("modals.task.dependencies.blockedBy")).addButton(n=>{n.setButtonText(this.t("modals.task.dependencies.addTaskButton")).setTooltip(this.t("modals.task.dependencies.selectTaskTooltip")).onClick(()=>{this.openBlockedBySelector()}),n.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.blockedByList||(this.blockedByList=t.createDiv({cls:"task-projects-list"})),this.renderDependencyLists()}createBlockingField(t){new ze.Setting(t).setName(this.t("modals.task.dependencies.blocking")).addButton(n=>{n.setButtonText(this.t("modals.task.dependencies.addTaskButton")).setTooltip(this.t("modals.task.dependencies.selectTaskTooltip")).onClick(()=>{this.openBlockingSelector()}),n.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.blockingList||(this.blockingList=t.createDiv({cls:"task-projects-list"})),this.renderDependencyLists()}createUserFieldByConfig(t,n){var i;let a=(i=this.plugin.settings.userFields)==null?void 0:i.find(o=>o.id===n.id);if(!a)return;let s=new ze.Setting(t).setName(a.displayName);switch(a.type){case"text":case"list":{s.addText(o=>{let l=this.userFields[a.key],c=Array.isArray(l)?l.join(", "):l||"";o.setValue(c).onChange(d=>{a.type==="list"?this.userFields[a.key]=d.split(",").map(u=>u.trim()).filter(u=>u.length>0):this.userFields[a.key]=d}),new LT(this.app,o.inputEl,this.plugin,a)});break}case"number":{s.addText(o=>{let l=this.userFields[a.key];o.setValue((l==null?void 0:l.toString())||"").onChange(c=>{let d=parseFloat(c);this.userFields[a.key]=isNaN(d)?null:d}),o.inputEl.type="number"});break}case"date":{s.addText(o=>{let l=this.userFields[a.key];o.setValue(l||"").onChange(c=>{this.userFields[a.key]=c}),o.inputEl.type="date"});break}case"boolean":{s.addToggle(o=>{let l=this.userFields[a.key];o.setValue(l===!0).onChange(c=>{this.userFields[a.key]=c})});break}}}createUserFields(t){var a;let n=((a=this.plugin.settings)==null?void 0:a.userFields)||[];n.length>0&&t.createDiv({cls:"user-fields-separator"}).createDiv({text:this.t("modals.task.customFieldsLabel"),cls:"detail-label-section"});for(let s of n){if(!s||!s.key||!s.displayName)continue;let i=this.userFields[s.key]||"";switch(s.type){case"boolean":new ze.Setting(t).setName(s.displayName).addToggle(o=>{o.setValue(i===!0||i==="true").onChange(l=>{this.userFields[s.key]=l})});break;case"number":new ze.Setting(t).setName(s.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.numberPlaceholder")).setValue(i?String(i):"").onChange(l=>{let c=parseFloat(l);this.userFields[s.key]=isNaN(c)?null:c})});break;case"date":new ze.Setting(t).setName(s.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.datePlaceholder")).setValue(i?String(i):"").onChange(d=>{this.userFields[s.key]=d||null});let l=o.inputEl.parentElement;l&&l.addClass("tn-date-control");let c=l==null?void 0:l.createEl("button",{cls:"user-field-date-picker-btn"});c&&(c.setAttribute("aria-label",this.t("modals.task.userFields.pickDate",{field:s.displayName})),(0,ze.setIcon)(c,"calendar"),c.addEventListener("click",d=>{d.preventDefault(),new ds({currentValue:o.getValue()||void 0,onSelect:p=>{o.setValue(p||""),this.userFields[s.key]=p||null},plugin:this.plugin,app:this.app}).showAtElement(c)}))});break;case"list":new ze.Setting(t).setName(s.displayName).addText(o=>{var d;let l=Array.isArray(i)?i.join(", "):i?String(i):"";o.setPlaceholder(this.t("modals.task.userFields.listPlaceholder")).setValue(l).onChange(u=>{u.trim()?this.userFields[s.key]=u.split(",").map(p=>p.trim()).filter(p=>p):this.userFields[s.key]=null}),new LT(this.app,o.inputEl,this.plugin,s);let c=t.querySelector(".user-field-link-preview");c&&((d=c.detach)==null||d.call(c))});break;case"text":default:new ze.Setting(t).setName(s.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.textPlaceholder",{field:s.displayName})).setValue(i?String(i):"").onChange(l=>{this.userFields[s.key]=l||null}),new LT(this.app,o.inputEl,this.plugin,s)});break}}}createActionButtons(t){let n=t.createDiv("modal-button-container");this.isEditMode()&&n.createEl("button",{cls:"open-note-button",text:this.t("modals.task.buttons.openNote")}).addEventListener("click",async()=>{await this.openTaskNote()});let a=n.createEl("button",{cls:"mod-cta",text:this.t("modals.task.buttons.save")});a.addEventListener("click",async()=>{a.disabled=!0;try{await this.handleSave(),this.close()}finally{a.disabled=!1}}),n.createEl("button",{text:this.t("common.cancel")}).addEventListener("click",()=>{this.close()})}expandModal(){this.isExpanded||(this.isExpanded=!0,this.detailsContainer.style.display="block",this.containerEl.addClass("expanded"),this.splitRightColumn&&(this.splitRightColumn.style.display=""),this.detailsContainer.style.opacity="0",this.detailsContainer.style.transform="translateY(-10px)",setTimeout(()=>{this.detailsContainer.style.opacity="1",this.detailsContainer.style.transform="translateY(0)"},50))}showDateContextMenu(t,n){let a=n==="due"?this.dueDate:this.scheduledDate,s=n==="due"?this.t("modals.task.dateMenu.dueTitle"):this.t("modals.task.dateMenu.scheduledTitle");new ds({currentValue:a?Xe(a):void 0,currentTime:a?la(a):void 0,title:s,plugin:this.plugin,app:this.app,onSelect:(o,l)=>{if(o){let c=l?En(o,l):o;n==="due"?this.dueDate=c:this.scheduledDate=c}else n==="due"?this.dueDate="":this.scheduledDate="";this.updateDateIconState()}}).show(t)}showStatusContextMenu(t){new mD({currentValue:this.status,onSelect:a=>{this.status=a,this.updateStatusIconState()},plugin:this.plugin}).show(t)}showPriorityContextMenu(t){new mo({currentValue:this.priority,onSelect:a=>{this.priority=a,this.updatePriorityIconState()},plugin:this.plugin}).show(t)}showRecurrenceContextMenu(t){new po({currentValue:this.recurrenceRule,currentAnchor:this.recurrenceAnchor,scheduledDate:this.scheduledDate,onSelect:(a,s)=>{this.recurrenceRule=a||"",s!==void 0&&(this.recurrenceAnchor=s),this.updateRecurrenceIconState()},app:this.app,plugin:this.plugin}).show(t)}showReminderContextMenu(t){let n={title:this.title,status:this.status,priority:this.priority,due:this.dueDate,scheduled:this.scheduledDate,path:"",archived:!1,reminders:this.reminders};new Rf(this.plugin,n,t.target,s=>{this.reminders=s.reminders||[],this.updateReminderIconState()}).show(t)}updateDateIconState(){this.updateIconStates()}updateStatusIconState(){this.updateIconStates()}updatePriorityIconState(){this.updateIconStates()}updateRecurrenceIconState(){this.updateIconStates()}updateReminderIconState(){this.updateIconStates()}getDefaultStatus(){let t=this.plugin.settings.customStatuses;return t&&t.length>0?[...t].sort((a,s)=>a.order-s.order)[0].value:"open"}getDefaultPriority(){let t=this.plugin.settings.customPriorities;return t&&t.length>0?[...t].sort((a,s)=>a.weight-s.weight)[0].value:"normal"}getRecurrenceDisplayText(){if(!this.recurrenceRule)return"";let t=this.recurrenceRule;if(t.includes("FREQ=DAILY"))return"Daily";if(t.includes("FREQ=WEEKLY")){if(t.includes("INTERVAL=2"))return"Every 2 weeks";if(t.includes("BYDAY=MO,TU,WE,TH,FR"))return"Weekdays";if(t.includes("BYDAY=")){let a=t.match(/BYDAY=([A-Z]{2})/);return a?`Weekly on ${{SU:"Sunday",MO:"Monday",TU:"Tuesday",WE:"Wednesday",TH:"Thursday",FR:"Friday",SA:"Saturday"}[a[1]]||a[1]}`:"Weekly"}else return"Weekly"}else if(t.includes("FREQ=MONTHLY")){if(t.includes("INTERVAL=3"))return"Every 3 months";if(t.includes("BYMONTHDAY=")){let a=t.match(/BYMONTHDAY=(\d+)/);return a?`Monthly on the ${this.getOrdinal(parseInt(a[1]))}`:"Monthly"}else return t.includes("BYDAY=")?"Monthly (by weekday)":"Monthly"}else if(t.includes("FREQ=YEARLY")){if(t.includes("BYMONTH=")&&t.includes("BYMONTHDAY=")){let a=t.match(/BYMONTH=(\d+)/),s=t.match(/BYMONTHDAY=(\d+)/);if(a&&s){let o=["","January","February","March","April","May","June","July","August","September","October","November","December"][parseInt(a[1])],l=this.getOrdinal(parseInt(s[1]));return`Yearly on ${o} ${l}`}}return"Yearly"}let n="";if(t.includes("COUNT=")){let a=t.match(/COUNT=(\d+)/);a&&(n=` (${a[1]} times)`)}else if(t.includes("UNTIL=")){let a=t.match(/UNTIL=(\d{8})/);if(a){let s=a[1];n=` (until ${`${s.slice(0,4)}-${s.slice(4,6)}-${s.slice(6,8)}`})`}}return"Custom"+n}getOrdinal(t){let n=["th","st","nd","rd"],a=t%100;return t+(n[(a-20)%10]||n[a]||n[0])}updateIconStates(){if(!this.actionBar)return;let t=this.actionBar.querySelector('[data-type="due-date"]');t&&(this.dueDate?(t.classList.add("has-value"),(0,ze.setTooltip)(t,this.t("modals.task.tooltips.dueValue",{value:this.dueDate}),{placement:"top"})):(t.classList.remove("has-value"),(0,ze.setTooltip)(t,this.t("modals.task.actions.due"),{placement:"top"})));let n=this.actionBar.querySelector('[data-type="scheduled-date"]');n&&(this.scheduledDate?(n.classList.add("has-value"),(0,ze.setTooltip)(n,this.t("modals.task.tooltips.scheduledValue",{value:this.scheduledDate}),{placement:"top"})):(n.classList.remove("has-value"),(0,ze.setTooltip)(n,this.t("modals.task.actions.scheduled"),{placement:"top"})));let a=this.actionBar.querySelector('[data-type="status"]');if(a){let l=this.plugin.settings.customStatuses.find(u=>u.value===this.status),c=l?l.label:this.status;this.status&&l&&l.value!==this.getDefaultStatus()?(a.classList.add("has-value"),(0,ze.setTooltip)(a,this.t("modals.task.tooltips.statusValue",{value:c}),{placement:"top"})):(a.classList.remove("has-value"),(0,ze.setTooltip)(a,this.t("modals.task.actions.status"),{placement:"top"}));let d=a.querySelector(".icon");d&&l&&l.color?d.style.color=l.color:d&&(d.style.color="")}let s=this.actionBar.querySelector('[data-type="priority"]');if(s){let l=this.plugin.settings.customPriorities.find(u=>u.value===this.priority),c=l?l.label:this.priority;this.priority&&l&&l.value!==this.getDefaultPriority()?(s.classList.add("has-value"),(0,ze.setTooltip)(s,this.t("modals.task.tooltips.priorityValue",{value:c}),{placement:"top"})):(s.classList.remove("has-value"),(0,ze.setTooltip)(s,this.t("modals.task.actions.priority"),{placement:"top"}));let d=s.querySelector(".icon");d&&l&&l.color?d.style.color=l.color:d&&(d.style.color="")}let i=this.actionBar.querySelector('[data-type="recurrence"]');i&&(this.recurrenceRule&&this.recurrenceRule.trim()?(i.classList.add("has-value"),(0,ze.setTooltip)(i,this.t("modals.task.tooltips.recurrenceValue",{value:this.getRecurrenceDisplayText()}),{placement:"top"})):(i.classList.remove("has-value"),(0,ze.setTooltip)(i,this.t("modals.task.actions.recurrence"),{placement:"top"})));let o=this.actionBar.querySelector('[data-type="reminders"]');if(o)if(this.reminders&&this.reminders.length>0){o.classList.add("has-value");let l=this.reminders.length,c=l===1?this.t("modals.task.tooltips.remindersSingle"):this.t("modals.task.tooltips.remindersPlural",{count:l});(0,ze.setTooltip)(o,c,{placement:"top"})}else o.classList.remove("has-value"),(0,ze.setTooltip)(o,this.t("modals.task.actions.reminders"),{placement:"top"})}focusTitleInput(){setTimeout(()=>{this.titleInput.focus(),this.titleInput.select()},100)}addProject(t){this.selectedProjectItems.some(n=>{var a;return((a=n.file)==null?void 0:a.path)===t.path})||(t instanceof ze.TFile&&this.selectedProjectItems.push({file:t,name:t.basename,link:this.buildProjectReference(t,this.getCurrentTaskPath()||"")}),this.updateProjectsFromFiles(),this.renderProjectsList())}removeProject(t){this.selectedProjectItems=this.selectedProjectItems.filter(n=>n!==t),this.updateProjectsFromFiles(),this.renderProjectsList()}updateProjectsFromFiles(){this.projects=this.selectedProjectItems.map(t=>t.link).join(", ")}buildProjectReference(t,n){return Wo(this.app,t,n,"","",this.plugin.settings.useFrontmatterMarkdownLinks)}initializeProjectsFromStrings(t){this.selectedProjectItems=[];let n=this.getCurrentTaskPath()||"";for(let a of t){if(!a||typeof a!="string"||a.trim()==="")continue;let s=a.match(/^\[\[([^\]]+)\]\]$/);if(s){let i=s[1],o=this.resolveLink(i,n);if(o)this.selectedProjectItems.push({file:o,name:o.basename,link:a});else{let l=i.split("|")[0];this.selectedProjectItems.push({name:l,link:a,unresolved:!0})}}else{let i=a.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(i){let o=cn(a),l=this.resolveLink(o,n);if(l)this.selectedProjectItems.push({file:l,name:l.basename,link:a});else{let c=i[1]||o;this.selectedProjectItems.push({name:c,link:a,unresolved:!0})}}else{let l=this.getMarkdownFiles().find(c=>c.basename===a||c.name===a+".md");l?this.selectedProjectItems.push({file:l,name:l.basename,link:`[[${l.basename}]]`}):this.selectedProjectItems.push({name:a,link:a,unresolved:!0})}}}this.updateProjectsFromFiles()}renderProjectsList(){this.projectsList&&(this.projectsList.empty(),this.selectedProjectItems.length!==0&&this.selectedProjectItems.forEach(t=>{let n=this.projectsList.createDiv({cls:"task-project-item"});t.unresolved&&n.addClass("task-project-item--unresolved");let a=n.createDiv({cls:"task-project-info"}),s=a.createDiv({cls:"task-project-name clickable-project"});if(t.file){let o=NI(this.app,t.file,this.getCurrentTaskPath()||"",t.file.name);if(this.renderProjectLinksWithoutPrefix(s,[o]),t.file.path!==t.file.name){let l=a.createDiv({cls:"task-project-path"});l.textContent=t.file.path}}else s.textContent=t.name,(0,ze.setTooltip)(s,this.t("contextMenus.task.dependencies.notices.unresolved",{name:t.name}),{placement:"top"});let i=n.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,ze.setTooltip)(i,this.t("modals.task.projectsRemoveTooltip"),{placement:"top"}),i.addEventListener("click",()=>{this.removeProject(t)})}))}async openSubtaskSelector(){var t,n,a;try{let s=this.plugin.cacheManager,i=(n=await((t=s==null?void 0:s.getAllTasks)==null?void 0:t.call(s)))!=null?n:[],o=this.isEditMode()?(a=this.task)==null?void 0:a.path:void 0,l=i.filter(c=>o&&c.path===o?!1:!this.selectedSubtaskFiles.some(d=>d.path===c.path));if(l.length===0){new ze.Notice(this.t("modals.task.organization.notices.noEligibleSubtasks"));return}Zn(this.plugin,l,async c=>{if(!c)return;let d=this.app.vault.getAbstractFileByPath(c.path);d&&this.addSubtask(d)})}catch(s){console.error("Failed to open subtask selector:",s),new ze.Notice(this.t("modals.task.organization.notices.subtaskSelectFailed"))}}addSubtask(t){this.selectedSubtaskFiles.some(n=>n.path===t.path)||(this.selectedSubtaskFiles.push(t),this.renderSubtasksList())}removeSubtask(t){this.selectedSubtaskFiles=this.selectedSubtaskFiles.filter(n=>n.path!==t.path),this.renderSubtasksList()}renderSubtasksList(){this.subtasksList&&(this.subtasksList.empty(),this.selectedSubtaskFiles.length!==0&&this.selectedSubtaskFiles.forEach(t=>{if(!(t instanceof ze.TFile))return;let n=this.subtasksList.createDiv({cls:"task-project-item"}),a=n.createDiv({cls:"task-project-info"}),s=a.createDiv({cls:"task-project-name clickable-project"}),i=NI(this.app,t,this.getCurrentTaskPath()||"",t.name);if(this.renderProjectLinksWithoutPrefix(s,[i]),t.path!==t.name){let l=a.createDiv({cls:"task-project-path"});l.textContent=t.path}let o=n.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,ze.setTooltip)(o,this.t("modals.task.organization.removeSubtaskTooltip"),{placement:"top"}),o.addEventListener("click",()=>{this.removeSubtask(t)})}))}renderOrganizationLists(){this.renderProjectsList(),this.renderSubtasksList()}renderProjectLinksWithoutPrefix(t,n){let a={metadataCache:this.app.metadataCache,workspace:this.app.workspace};oD(t,n,a),Array.from(t.childNodes).forEach(s=>{var i;s.nodeType===Node.TEXT_NODE&&((i=s.textContent)==null?void 0:i.trim())==="+"&&s.remove()})}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(){setTimeout(()=>{this.contextsInput?this.contextsInput.focus():this.tagsInput?this.tagsInput.focus():this.timeEstimateInput&&this.timeEstimateInput.focus()},50)}createMarkdownEditor(t,n){try{return new Of(this.app,t,n)}catch(a){console.error("Failed to create markdown editor:",a);let s=t.createEl("textarea",{cls:n.cls+"-fallback",placeholder:n.placeholder});return s.value=n.value,s.addEventListener("input",i=>{n.onChange(i.target.value)}),s.addEventListener("keydown",i=>{i.key==="Enter"&&(i.ctrlKey||i.metaKey)?(i.preventDefault(),n.onSubmit()):i.key==="Escape"?(i.preventDefault(),n.onEscape()):i.key==="Tab"&&n.onTab()&&i.preventDefault()}),null}}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null),this.detailsMarkdownEditor&&(this.detailsMarkdownEditor.destroy(),this.detailsMarkdownEditor=null),super.onClose()}},cO=class extends ze.AbstractInputSuggest{constructor(e,t,n){super(e,t),this.plugin=n,this.input=t}async getSuggestions(e){let t=this.input.value.split(",").map(i=>i.trim()),n=t[t.length-1],a=this.plugin.cacheManager.getAllContexts(),s=t.slice(0,-1);return a.filter(i=>i&&typeof i=="string").filter(i=>!s.includes(i)&&(!n||i.toLowerCase().includes(n.toLowerCase()))).slice(0,10).map(i=>({value:i,display:i,type:"context",toString(){return this.value}}))}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){let t=this.input.value.split(",").map(n=>n.trim());t[t.length-1]=e.value,this.input.value=t.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},dO=class extends ze.AbstractInputSuggest{constructor(e,t,n){super(e,t),this.plugin=n,this.input=t}async getSuggestions(e){let t=this.input.value.split(",").map(i=>i.trim()),n=t[t.length-1],a=this.plugin.cacheManager.getAllTags(),s=t.slice(0,-1);return a.filter(i=>i&&typeof i=="string").filter(i=>!s.includes(i)&&(!n||i.toLowerCase().includes(n.toLowerCase()))).slice(0,10).map(i=>({value:i,display:i,type:"tag",toString(){return this.value}}))}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){let t=this.input.value.split(",").map(n=>n.trim());t[t.length-1]=e.value,this.input.value=t.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},LT=class extends ze.AbstractInputSuggest{constructor(e,t,n,a){super(e,t),this.plugin=n,this.input=t,this.fieldConfig=a}async getSuggestions(e){let t=this.fieldConfig.type==="list",n="",a=[];if(t?(a=this.input.value.split(",").map(o=>o.trim()),n=a[a.length-1]||""):n=this.input.value.trim(),!n)return[];let s=n.match(/\[\[([^\]]*)$/);if(s){let o=s[1]||"",{FileSuggestHelper:l}=await Promise.resolve().then(()=>(fD(),lO));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(n.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,s;let t=async()=>{try{let i=this.plugin.app.vault.getMarkdownFiles(),o=new Set;for(let l of i)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(i){return console.error("Error getting user field values:",i),[]}},n=(s=(a=this.plugin.settings)==null?void 0:a.suggestionDebounceMs)!=null?s:0;return n?new Promise(i=>{let o=this.plugin;o.__userFieldSuggestTimer&&clearTimeout(o.__userFieldSuggestTimer),o.__userFieldSuggestTimer=setTimeout(async()=>{let l=await t();i(l)},n)}):t()}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){var n;if(this.fieldConfig.type==="list"){let a=this.input.value.split(","),s=(n=a.pop())!=null?n:"",i=a.join(","),o=s.trim(),l=/\[\[/.test(o)?o.replace(/\[\[[^\]]*$/,`[[${e.value}]]`):e.value,c=(i?i+", ":"")+l;this.input.value=c.endsWith(",")?c+" ":c+", "}else{let a=this.input.value,s=a.replace(/\[\[[^\]]*$/,`[[${e.value}]]`);this.input.value=s===a?e.value:s}this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}}});function Ene(r,e){if(!r||!e)throw new Error("Invalid context or settings provided");if(!r.title||typeof r.title!="string")throw new Error("Context must have a valid title");if(r.title.trim().length===0)throw new Error("Title cannot be empty");let t=r.date||new Date;if(!(t instanceof Date)||isNaN(t.getTime()))throw new Error("Invalid date provided in context");try{let n=e.icsIntegration;if(n)switch(n.icsNoteFilenameFormat){case"title":return Vr(r.title);case"zettel":return Hp(t);case"timestamp":return xne(t);case"custom":{let a={icsEventTitle:r.icsEventTitle?Vr(r.icsEventTitle):Vr(r.title),icsEventLocation:r.icsEventLocation?Vr(r.icsEventLocation):"",icsEventDescription:r.icsEventDescription?Vr(r.icsEventDescription.substring(0,50)):"",icsEventTitleWithDate:Vr(`${r.icsEventTitle||r.title} - ${D(t,"PPP")}`)};return Dne(r,n.customICSNoteFilenameTemplate,t,a)}default:return Vr(r.title)}return Vr(r.title)}catch(n){return console.error("Error generating ICS note filename:",n),Vr(r.title)}}function gD(r,e){if(!r||!e)throw new Error("Invalid context or settings provided");if(!r.title||typeof r.title!="string")throw new Error("Context must have a valid title");if(r.title.trim().length===0)throw new Error("Title cannot be empty");let t=r.date||new Date;if(!(t instanceof Date)||isNaN(t.getTime()))throw new Error("Invalid date provided in context");if(e.storeTitleInFilename)return Vr(r.title);try{switch(e.taskFilenameFormat){case"title":return Vr(r.title);case"zettel":return Hp(t);case"timestamp":return xne(t);case"custom":return Dne(r,e.customFilenameTemplate,t);default:return Hp(t)}}catch(n){return console.error("Error generating filename:",n),Hp(t)}}function Hp(r){let e=D(r,"yyMMdd"),t=new Date(r);t.setHours(0,0,0,0);let a=Math.floor((r.getTime()-t.getTime())/1e3).toString(36);return`${e}${a}`}function xne(r){return D(r,"yyyy-MM-dd-HHmmss")}function Dne(r,e,t,n){var a;if(!r||!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 s=Vr(r.title),i=r.priority&&["low","normal","medium","high"].includes(r.priority)?r.priority:"normal",o=r.status?Vr(r.status):"open",l=Array.isArray(r.contexts)?r.contexts:[],c=Array.isArray(r.tags)?r.tags:[],d={title:s,date:D(t,"yyyy-MM-dd"),time:D(t,"HHmmss"),priority:i,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:r.dueDate||"",scheduledDate:r.scheduledDate||"",context:l[0]?Vr(l[0]):"",contexts:l.map(p=>Vr(p)).join("/"),tags:c.map(p=>Vr(p)).join(", "),hashtags:c.map(p=>`#${Vr(p)}`).join(" "),timeEstimate:((a=r.timeEstimate)==null?void 0:a.toString())||"",details:r.details?Vr(r.details.substring(0,50)):"",parentNote:r.parentNote?Vr(r.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:i.substring(0,1).toUpperCase(),statusShort:o.substring(0,1).toUpperCase(),titleLower:s.toLowerCase(),titleUpper:s.toUpperCase(),titleSnake:s.toLowerCase().replace(/\s+/g,"_"),titleKebab:s.toLowerCase().replace(/\s+/g,"-"),titleCamel:s.replace(/(?:^\w|[A-Z]|\b\w)/g,(p,m)=>m===0?p.toLowerCase():p.toUpperCase()).replace(/\s+/g,""),titlePascal:s.replace(/(?:^\w|[A-Z]|\b\w)/g,p=>p.toUpperCase()).replace(/\s+/g,""),zettel:Hp(t),nano:Date.now().toString()+Math.random().toString(36).substring(2,7),...n||{}},u=e;if(e.length>500)throw new Error("Template too long");return Object.entries(d).forEach(([p,m])=>{try{let h=new RegExp(`\\{\\{${p}\\}\\}`,"g");u=u.replace(h,m);let f=new RegExp(`\\{${p}\\}`,"g");u=u.replace(f,m)}catch(h){console.warn(`Error replacing template variable ${p}:`,h)}}),u=u.replace(/\{\{[^}]+\}\}/g,""),u=u.replace(/\{[^}]+\}/g,""),u.trim()||(u=s||Hp(t)),Vr(u)}catch(s){return console.error("Error generating custom filename:",s),Vr(r.title)||Hp(t)}}function Vr(r){if(!r||typeof r!="string")return"untitled";try{let e=r.trim().replace(/\s+/g," ").replace(/[<>:"/\\|?*#[\]]/g,"").replace(/./g,n=>{let a=n.charCodeAt(0);return a<=31||a>=127&&a<=159?"":n}).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 console.error("Error sanitizing filename:",e),"untitled"}}async function $T(r,e,t){if(!r||typeof r!="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 n=Vr(r);if(!n)throw new Error("Base filename cannot be sanitized to a valid name");let a=e.replace(/\.\./g,"").trim();try{let s=(0,pO.normalizePath)(`${a}/${n}.md`);if(s.length>260)throw new Error("Generated path too long");if(!t.getAbstractFileByPath(s))return n;for(let l=2;l<=999;l++){let c=`${n}-${l}`,d=(0,pO.normalizePath)(`${a}/${c}.md`);if(d.length>260)break;if(!t.getAbstractFileByPath(d))return c}let i=Date.now().toString(36),o=`${n.substring(0,50)}-${i}`;return Vr(o)}catch(s){return console.error("Error generating unique filename:",s),`task-${Date.now().toString(36)}`}}var pO,yD=b(()=>{Qr();pO=require("obsidian")});var vD,Cne=b(()=>{vD=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}}});function _ne(r){let e=(0,tl.autocompletion)({override:[async n=>{let a=new vD(r.settings.nlpTriggers,r.settings.userFields||[]),s=n.state.doc.lineAt(n.pos),i=s.text.slice(0,n.pos-s.from),o=(g,y)=>{if(g===-1)return!1;if(g===0)return!0;let k=y[g-1];return!/\w/.test(k)},l=a.getTriggersOrderedByLength(),c=[];for(let g of l){if(g.propertyId==="tags"&&g.trigger==="#")continue;let y=i.lastIndexOf(g.trigger);o(y,i)&&c.push({propertyId:g.propertyId,trigger:g.trigger,index:y,triggerLength:g.trigger.length})}if(c.length===0)return null;c.sort((g,y)=>y.index-g.index);let d=c[0],u=d.index+d.triggerLength,p=i.slice(u);if(d.propertyId==="projects"&&/^\[\[[^\]]*\]\]/.test(p)||d.propertyId!=="projects"&&(p.includes(" ")||p.includes(` `)))return null;let m=await hRe(d.propertyId,p,r,a);if(!m||m.length===0)return null;let h=s.from+d.index+d.triggerLength,f=n.pos;return{from:h,to:f,options:m,validFor:/^[\w\s-]*$/}}],activateOnTyping:!0,closeOnBlur:!0,maxRenderedOptions:10,addToOptions:[{render:(n,a,s)=>{if(!n.projectMetadata)return null;let i=document.createElement("div");i.className="cm-project-suggestion__metadata";let o=n.projectMetadata;for(let l of o){let c=document.createElement("div");c.className="cm-project-suggestion__meta",c.textContent=l,i.appendChild(c)}return i},position:100}]}),t=mO.Prec.high(Pne.keymap.of([{key:"ArrowDown",run:(0,tl.moveCompletionSelection)(!0)},{key:"ArrowUp",run:(0,tl.moveCompletionSelection)(!1)},{key:"Enter",run:tl.acceptCompletion},{key:"Tab",run:tl.acceptCompletion},{key:"Escape",run:tl.closeCompletion}]));return[mO.Prec.high(e),t]}async function hRe(r,e,t,n){switch(n.getSuggesterType(r)){case"list":return fRe(r,e,t);case"file":return gRe(r,e,t,n);case"status":return yRe(e,t);case"priority":return vRe(e,t);case"boolean":return bRe(e);case"native-tag":return null;default:return null}}function fRe(r,e,t){let n=[],a=r;switch(r){case"tags":n=t.cacheManager.getAllTags(),a="Tag";break;case"contexts":n=t.cacheManager.getAllContexts(),a="Context";break;default:n=[],a=r;break}return n.filter(s=>s&&typeof s=="string").filter(s=>s.toLowerCase().includes(e.toLowerCase())).slice(0,10).map(s=>({label:s,apply:s+" ",type:"text",info:a}))}async function gRe(r,e,t,n){var a,s,i;try{let o;if(r==="projects")o=t.settings.projectAutosuggest;else{let u=n.getUserField(r);o=u==null?void 0:u.autosuggestFilter}let l=(t.settings.excludedFolders||"").split(",").map(u=>u.trim()).filter(Boolean),d=(await oO.suggest(t,e,20,o)).filter(u=>{let p=t.app.vault.getMarkdownFiles().find(m=>m.basename===u.insertText);return p?!l.some(m=>p.path.startsWith(m)):!0});if(r==="projects"){let u=new ud({getFrontmatter:m=>m.frontmatter}),p=((i=(s=(a=t.settings)==null?void 0:a.projectAutosuggest)==null?void 0:s.rows)!=null?i:[]).slice(0,3);return d.map(m=>{var k;let h=m.displayText||m.insertText,f=m.insertText,g=t.app.vault.getMarkdownFiles().find(T=>T.basename===m.insertText),y=[];if(g&&p.length>0){let T=t.app.metadataCache.getFileCache(g),w=(T==null?void 0:T.frontmatter)||{},S=t.fieldMapper.mapFromFrontmatter(w,g.path,t.settings.storeTitleInFilename),x=typeof S.title=="string"?S.title:"",C=Array.isArray(w.aliases)?w.aliases.filter(N=>typeof N=="string"):[],M={basename:g.basename,name:g.name,path:g.path,parent:((k=g.parent)==null?void 0:k.path)||"",title:x,aliases:C,frontmatter:w};y=u.buildMetadataRows(p,M,Bo)}return{label:h,apply:`[[${f}]] `,type:"text",info:"Project",projectMetadata:y.length>0?y:void 0}})}return d.map(u=>{let p=u.displayText||u.insertText,m=u.insertText;return{label:p,apply:`[[${m}]] `,type:"text",info:r==="projects"?"Project":r}})}catch(o){return console.error(`Error getting file suggestions for ${r}:`,o),[]}}function yRe(r,e){return Ks.fromPlugin(e).getStatusSuggestions(r,10).map(a=>({label:a.display,apply:a.value+" ",type:"text",info:"Status"}))}function vRe(r,e){return(e.settings.customPriorities||[]).filter(n=>n.label.toLowerCase().includes(r.toLowerCase())).slice(0,10).map(n=>({label:n.label,apply:n.value+" ",type:"text",info:"Priority"}))}function bRe(r){return["true","false"].filter(t=>t.toLowerCase().includes(r.toLowerCase())).map(t=>({label:t,apply:t+" ",type:"text",info:"Boolean"}))}var tl,mO,Pne,Mne=b(()=>{tl=require("@codemirror/autocomplete"),mO=require("@codemirror/state"),Pne=require("@codemirror/view");Cf();Cne();fD();_E();Yy()});var bD={};Ke(bD,{convertDefaultRemindersToReminders:()=>TRe,hasAnyUserFieldsEnabled:()=>Ane,isUserFieldConfigComplete:()=>Ine,isUserFieldEnabled:()=>kRe});function TRe(r,e){return r.map(t=>{let n={id:`rem_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,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),n.relatedTo=t.relatedTo,n.offset=a}}else t.type==="absolute"&&t.absoluteDate&&t.absoluteTime&&(n.absoluteTime=`${t.absoluteDate}T${t.absoluteTime}:00`);return n}).filter(t=>t.type==="relative"?t.relatedTo&&t.offset:!!t.absoluteTime)}function Ane(r){let e=r.userFields;return!e||e.length===0?!1:e.some(t=>!!(t&&t.displayName&&t.key&&t.type))}function Ine(r){return!r||!r.enabled?!1:!!(r.displayName&&r.key&&r.type)}function kRe(r){return r.userFields&&r.userFields.length>0?Ane(r):Ine(r.userField)}var TD=b(()=>{});var Nne={};Ke(Nne,{TaskCreationModal:()=>Md});var va,hO,Md,kD=b(()=>{va=require("obsidian");uO();kt();yD();Fn();Cf();kt();ep();_E();Yy();iO();Mne();hO=class extends va.AbstractInputSuggest{constructor(t,n,a){super(t,n);this.currentTrigger=null;this.projectMetadataResolver=null;this.plugin=a,this.textarea=n,this.obsidianApp=t}isBoundary(t,n){if(n===-1)return!1;if(n===0)return!0;let a=t[n-1];return!/\w/.test(a)}findActiveTrigger(t){let n=t.lastIndexOf("@"),a=t.lastIndexOf("#"),s=t.lastIndexOf("+"),i=(this.plugin.settings.statusSuggestionTrigger||"").trim(),o=i?t.lastIndexOf(i):-1,l=[{type:"@",index:n},{type:"#",index:a},{type:"+",index:s},{type:"status",index:o}].filter(m=>this.isBoundary(t,m.index));if(l.length===0)return{trigger:null,triggerIndex:-1,queryAfterTrigger:""};l.sort((m,h)=>h.index-m.index);let c=l[0].index,d=l[0].type,u=d==="status"?(i==null?void 0:i.length)||0:1,p=t.slice(c+u);return{trigger:d,triggerIndex:c,queryAfterTrigger:p}}shouldEndSuggestionContext(t,n){return!!(t==="+"&&/^\[\[[^\]]*\]\]/.test(n)||(t==="@"||t==="#"||t==="status")&&(n.includes(" ")||n.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 Ks.fromPlugin(this.plugin).getStatusSuggestions(t,10).map(a=>({...a,type:"status",toString(){return this.value}}))}getTagSuggestions(t){return this.plugin.cacheManager.getAllTags().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,n,a;if(!this.projectMetadataResolver){let s=(a=(t=this.obsidianApp)!=null?t:this.app)!=null?a:(n=this.plugin)==null?void 0:n.app;this.projectMetadataResolver=new ud({getFrontmatter:i=>{let o=s==null?void 0:s.vault.getAbstractFileByPath(i.path),l=o?s==null?void 0:s.metadataCache.getFileCache(o):void 0;return(l==null?void 0:l.frontmatter)||{}}})}return this.projectMetadataResolver}async getProjectSuggestions(t){var l,c,d,u,p,m;let{FileSuggestHelper:n}=await Promise.resolve().then(()=>(fD(),lO)),a=(this.plugin.settings.excludedFolders||"").split(",").map(h=>h.trim()).filter(Boolean),s=await n.suggest(this.plugin,t,20,this.plugin.settings.projectAutosuggest),i=(d=(l=this.obsidianApp)!=null?l:this.app)!=null?d:(c=this.plugin)==null?void 0:c.app,o=s.filter(h=>{let f=i==null?void 0:i.vault.getMarkdownFiles().find(g=>g.basename===h.insertText);return f?!a.some(g=>f.path.startsWith(g)):!0});try{let h=this.getProjectMetadataResolver(),f=((m=(p=(u=this.plugin.settings)==null?void 0:u.projectAutosuggest)==null?void 0:p.rows)!=null?m:[]).slice(0,3);return o.map(g=>{var F;let y=i==null?void 0:i.vault.getMarkdownFiles().find(G=>G.basename===g.insertText);if(!y)return{basename:g.insertText,displayName:g.displayText,type:"project",toString(){return this.basename}};let k=i==null?void 0:i.metadataCache.getFileCache(y),T=(k==null?void 0:k.frontmatter)||{},w=this.plugin.fieldMapper.mapFromFrontmatter(T,y.path,this.plugin.settings.storeTitleInFilename),S=typeof w.title=="string"?w.title:"",x=(0,va.parseFrontMatterAliases)(T)||[],C=Array.isArray(x)?x.filter(G=>typeof G=="string"):[],M={basename:y.basename,name:y.name,path:y.path,parent:((F=y.parent)==null?void 0:F.path)||"",title:S,aliases:C,frontmatter:T},N=this.generateProjectDisplayName(f,M,h,y.basename);return{basename:g.insertText,displayName:N,type:"project",entry:{basename:M.basename,name:M.name,path:M.path,parent:M.parent,title:M.title,aliases:M.aliases,frontmatter:M.frontmatter},toString(){return this.basename}}})}catch(h){return console.error("Enhanced project autosuggest failed, falling back to basic suggestions",h),o.map(f=>({basename:f.insertText,displayName:f.displayText,type:"project",toString(){return this.basename}}))}}generateProjectDisplayName(t,n,a,s){var o;let i=[];for(let l of t)try{let c=Bo(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,n)||"";if(m)if(p.showName){let h=(o=p.displayName)!=null?o:p.property;d.push(`${h}: ${m}`)}else d.push(m)}let u=d.join(" ");u.trim()&&i.push(u)}catch(c){}return i.join(" | ")||s}async getSuggestions(t){let n=this.textarea.selectionStart,a=this.textarea.value.slice(0,n),{trigger:s,triggerIndex:i,queryAfterTrigger:o}=this.findActiveTrigger(a);if(!s||i===-1)return this.currentTrigger=null,[];if(this.shouldEndSuggestionContext(s,o))return this.currentTrigger=null,[];switch(this.currentTrigger=s,s){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,n){var c,d,u,p,m;n.setAttribute("role","option");let a=t.type==="project"?t.displayName:t.display;n.setAttribute("aria-label",`${t.type}: ${a}`);let s=n.createSpan("nlp-suggest-icon");s.textContent=this.currentTrigger==="status"?this.plugin.settings.statusSuggestionTrigger||"":this.currentTrigger||"",s.setAttribute("aria-hidden","true");let i=n.createSpan("nlp-suggest-text"),o=(h,f)=>{if(!f)return;let g=f.toLowerCase().split(/\s+/).filter(Boolean);if(!g.length)return;let y=k=>{var T;if(k.nodeType===Node.TEXT_NODE){let w=k.nodeValue||"",S=w.toLowerCase(),x=[];for(let F of g){let G=S.indexOf(F);for(;G!==-1;)x.push({start:G,end:G+F.length}),G=S.indexOf(F,G+1)}x.sort((F,G)=>F.start-G.start);let C=[];for(let F of x)(!C.length||F.start>=C[C.length-1].end)&&C.push(F);if(!C.length)return;let M=document.createDocumentFragment(),N=0;for(let F of C){F.start>N&&M.appendChild(document.createTextNode(w.slice(N,F.start)));let G=document.createElement("mark");G.textContent=w.slice(F.start,F.end),M.appendChild(G),N=F.end}N0&&t.entry){let g=this.getProjectMetadataResolver();for(let y=0;y0)&&this.renderProjectsList()}createNaturalLanguageInput(t){let n=t.createDiv("nl-input-container"),a=n.createDiv("nl-markdown-editor");a.setAttribute("role","textbox"),a.setAttribute("aria-label",this.t("modals.taskCreation.nlPlaceholder")),a.setAttribute("aria-multiline","true"),this.nlPreviewContainer=n.createDiv("nl-preview-container"),this.nlPreviewContainer.setAttribute("role","status"),this.nlPreviewContainer.setAttribute("aria-live","polite"),this.nlPreviewContainer.setAttribute("aria-label","Task preview");try{let s=_ne(this.plugin);this.nlMarkdownEditor=new Of(this.app,a,{value:"",placeholder:this.t("modals.taskCreation.nlPlaceholder"),cls:"nlp-editor",extensions:s,enterVimInsertMode:!0,onChange:i=>{i.trim()?this.updateNaturalLanguagePreview(i.trim()):this.clearNaturalLanguagePreview()},onSubmit:()=>{this.handleSave()},onEscape:()=>{this.close()},onTab:()=>(this.isExpanded||this.expandModal(),setTimeout(()=>{let i=this.modalEl.querySelector(".title-input-detailed");i&&i.focus()},50),!0),onEnter:(i,o,l)=>l?!1:!!o}),setTimeout(()=>{var i;if(this.nlMarkdownEditor){let o=(i=this.nlMarkdownEditor.editor)==null?void 0:i.cm;o&&(o.focus(),o.scrollDOM.scrollTop=0)}},100)}catch(s){console.error("Failed to create NLP markdown editor:",s),this.nlInput=a.createEl("textarea",{cls:"nl-input",attr:{placeholder:this.t("modals.taskCreation.nlPlaceholder"),rows:"3"}});let i=()=>{let l=this.nlInput.value.trim();l?this.updateNaturalLanguagePreview(l):this.clearNaturalLanguagePreview()};this.addTrackedEventListener(this.nlInput,"input",i);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.handleSave()):d.key==="Tab"&&d.shiftKey&&(d.preventDefault(),this.parseAndFillForm(c))};this.addTrackedEventListener(this.nlInput,"keydown",o),this.nlpSuggest=new hO(this.app,this.nlInput,this.plugin),setTimeout(()=>{this.nlInput.focus()},100)}}updateNaturalLanguagePreview(t){if(!this.nlPreviewContainer)return;let n=this.nlParser.parseInput(t),a=this.nlParser.getPreviewData(n);a.length>0&&n.title?(this.nlPreviewContainer.empty(),this.nlPreviewContainer.style.display="block",a.forEach(s=>{let i=this.nlPreviewContainer.createDiv("nl-preview-item");i.textContent=s.text})):this.clearNaturalLanguagePreview()}clearNaturalLanguagePreview(){this.nlPreviewContainer&&(this.nlPreviewContainer.empty(),this.nlPreviewContainer.style.display="none")}getNLPInputValue(){return this.nlMarkdownEditor?this.nlMarkdownEditor.value:this.nlInput?this.nlInput.value:""}createActionBar(t){if(this.actionBar=t.createDiv("action-bar"),this.plugin.settings.enableNaturalLanguageInput){this.createActionIcon(this.actionBar,"wand",this.t("modals.taskCreation.actions.fillFromNaturalLanguage"),(a,s)=>{let i=this.getNLPInputValue().trim();i&&this.parseAndFillForm(i)}),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,s)=>{this.toggleDetailedForm();let i=a.querySelector(".icon");i&&(0,va.setIcon)(i,this.isExpanded?"chevron-up":"chevron-down"),(0,va.setTooltip)(a,this.isExpanded?this.t("modals.taskCreation.actions.hideDetailedOptions"):this.t("modals.taskCreation.actions.showDetailedOptions"),{placement:"top"})});let n=this.actionBar.createDiv("action-separator");n.style.width="1px",n.style.height="24px",n.style.backgroundColor="var(--background-modifier-border)",n.style.margin="0 var(--size-4-2)"}this.createActionIcon(this.actionBar,"calendar",this.t("modals.task.actions.due"),(n,a)=>{this.showDateContextMenu(a,"due")},"due-date"),this.createActionIcon(this.actionBar,"calendar-clock",this.t("modals.task.actions.scheduled"),(n,a)=>{this.showDateContextMenu(a,"scheduled")},"scheduled-date"),this.createActionIcon(this.actionBar,"dot-square",this.t("modals.task.actions.status"),(n,a)=>{this.showStatusContextMenu(a)},"status"),this.createActionIcon(this.actionBar,"star",this.t("modals.task.actions.priority"),(n,a)=>{this.showPriorityContextMenu(a)},"priority"),this.createActionIcon(this.actionBar,"refresh-ccw",this.t("modals.task.actions.recurrence"),(n,a)=>{this.showRecurrenceContextMenu(a)},"recurrence"),this.createActionIcon(this.actionBar,"bell",this.t("modals.task.actions.reminders"),(n,a)=>{this.showReminderContextMenu(a)},"reminders"),this.updateIconStates()}parseAndFillForm(t){let n=this.nlParser.parseInput(t);this.applyParsedData(n),this.isExpanded||this.expandModal()}applyParsedData(t){var n;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?En(t.dueDate,t.dueTime):t.dueDate),t.scheduledDate&&(this.scheduledDate=t.scheduledTime?En(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=zs(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),this.detailsMarkdownEditor&&this.detailsMarkdownEditor.setValue(this.details),this.contextsInput&&(this.contextsInput.value=this.contexts),this.tagsInput&&(this.tagsInput.value=this.tags),t.projects&&t.projects.length>0&&(this.initializeProjectsFromStrings(t.projects),this.renderProjectsList()),t.userFields){console.debug("[TaskCreationModal] applyParsedData - parsed.userFields:",t.userFields),console.debug("[TaskCreationModal] applyParsedData - available user field definitions:",this.plugin.settings.userFields);for(let[a,s]of Object.entries(t.userFields)){let i=(n=this.plugin.settings.userFields)==null?void 0:n.find(o=>o.id===a);console.debug(`[TaskCreationModal] Looking for field ${a}, found:`,i),i?(Array.isArray(s)?this.userFields[i.key]=s.join(", "):this.userFields[i.key]=s,console.debug(`[TaskCreationModal] Applied user field ${i.displayName} (key: ${i.key}): ${s}`),console.debug("[TaskCreationModal] Current this.userFields:",this.userFields)):console.warn(`[TaskCreationModal] No user field definition found for field ID: ${a}`)}}else console.debug("[TaskCreationModal] applyParsedData - NO parsed.userFields");this.updateIconStates()}toggleDetailedForm(){this.isExpanded?(this.isExpanded=!1,this.detailsContainer.style.display="none",this.containerEl.removeClass("expanded")):this.expandModal()}async initializeFormData(){this.priority=this.plugin.settings.defaultTaskPriority,this.status=this.plugin.settings.defaultTaskStatus;let t=this.plugin.settings.taskCreationDefaults;if(this.dueDate=bi(t.defaultDueDate),this.scheduledDate=bi(t.defaultScheduledDate),this.contexts=t.defaultContexts||"",this.tags=t.defaultTags||"",t.defaultProjects){let n=hi(t.defaultProjects);n.length>0&&this.initializeProjectsFromStrings(n)}if(t.defaultTimeEstimate&&t.defaultTimeEstimate>0&&(this.timeEstimate=t.defaultTimeEstimate),t.defaultReminders&&t.defaultReminders.length>0){let{convertDefaultRemindersToReminders:n}=await Promise.resolve().then(()=>(TD(),bD));this.reminders=n(t.defaultReminders)}if(this.plugin.settings.userFields){for(let n of this.plugin.settings.userFields)if(n.defaultValue!==void 0)if(n.type==="date"&&typeof n.defaultValue=="string"){let a=n.defaultValue,s=bi(a);s&&(this.userFields[n.key]=s)}else this.userFields[n.key]=n.defaultValue}this.options.prePopulatedValues&&this.applyPrePopulatedValues(this.options.prePopulatedValues),this.details=this.normalizeDetails(this.details),this.originalDetails=this.details}applyPrePopulatedValues(t){t.title!==void 0&&(this.title=t.title),t.due!==void 0&&(this.dueDate=t.due),t.scheduled!==void 0&&(this.scheduledDate=t.scheduled),t.priority!==void 0&&(this.priority=t.priority),t.status!==void 0&&(this.status=t.status),t.contexts!==void 0&&(this.contexts=t.contexts.join(", ")),t.projects!==void 0&&(t.projects.filter(a=>a&&typeof a=="string"&&a.trim()!=="").length>0&&this.initializeProjectsFromStrings(t.projects),this.renderProjectsList()),t.tags!==void 0&&(this.tags=zs(t.tags.filter(n=>n!==this.plugin.settings.taskTag).join(", "))),t.timeEstimate!==void 0&&(this.timeEstimate=t.timeEstimate),t.recurrence!==void 0&&typeof t.recurrence=="string"&&(this.recurrenceRule=t.recurrence),t.recurrence_anchor!==void 0&&(this.recurrenceAnchor=t.recurrence_anchor)}async handleSave(){if(this.plugin.settings.enableNaturalLanguageInput){let t=this.getNLPInputValue().trim();if(t&&!this.title.trim()){let n=this.nlParser.parseInput(t);this.applyParsedData(n)}}if(!this.validateForm()){new va.Notice(this.t("modals.taskCreation.notices.titleRequired"));return}try{let t=this.buildTaskData(),n=await this.plugin.taskService.createTask(t,{applyDefaults:!1}),a=n.taskInfo,s=n.taskInfo.title.replace(/[<>:"/\\|?*]/g,"").trim(),i=n.file.basename;if(i.startsWith("task-")&&i!==s?new va.Notice(this.t("modals.taskCreation.notices.successShortened",{title:a.title})):new va.Notice(this.t("modals.taskCreation.notices.success",{title:a.title})),this.blockingItems.length>0){let o=[],l={},c=[];if(this.blockingItems.forEach(d=>{d.path?o.includes(d.path)||(o.push(d.path),l[d.path]={...d.dependency}):c.push(d.dependency.uid)}),o.length>0){await this.plugin.taskService.updateBlockingRelationships(a,o,[],l);let d=await this.plugin.cacheManager.getTaskInfo(a.path);d&&(a=d)}c.length>0&&new va.Notice(this.t("modals.taskCreation.notices.blockingUnresolved",{entries:c.join(", ")})),this.blockingItems=[]}this.selectedSubtaskFiles.length>0&&await this.applySubtaskAssignments(a),this.options.onTaskCreated&&this.options.onTaskCreated(a),this.close()}catch(t){console.error("Failed to create task:",t);let n=t instanceof Error&&t.message?t.message:String(t);new va.Notice(this.t("modals.taskCreation.notices.failure",{message:n}))}}buildTaskData(){let t=ct(),n=this.contexts.split(",").map(c=>c.trim()).filter(c=>c.length>0),a=hi(this.projects),s=zs(this.tags).split(",").map(c=>c.trim()).filter(c=>c.length>0);this.plugin.settings.taskIdentificationMethod==="tag"&&this.plugin.settings.taskTag&&!s.includes(this.plugin.settings.taskTag)&&s.push(this.plugin.settings.taskTag);let i={title:this.title.trim(),due:this.dueDate||void 0,scheduled:this.scheduledDate||void 0,priority:this.priority,status:this.status,contexts:n.length>0?n:void 0,projects:a.length>0?a:void 0,tags:s.length>0?s:void 0,timeEstimate:this.timeEstimate>0?this.timeEstimate:void 0,recurrence:this.recurrenceRule||void 0,recurrence_anchor:this.recurrenceRule?this.recurrenceAnchor:void 0,reminders:this.reminders.length>0?this.reminders:void 0,creationContext:this.options.creationContext||"manual-creation",dateCreated:t,dateModified:t,customFrontmatter:this.buildCustomFrontmatter()},o=this.blockedByItems.map(c=>({...c.dependency}));o.length>0&&(i.blockedBy=o);let l=this.normalizeDetails(this.details).trimEnd();return l.length>0&&(i.details=l),i}buildCustomFrontmatter(){let t={};console.debug("[TaskCreationModal] Building custom frontmatter from userFields:",this.userFields);for(let[n,a]of Object.entries(this.userFields))a!=null&&a!==""&&(t[n]=a,console.debug(`[TaskCreationModal] Adding to frontmatter: ${n} = ${a}`));return console.debug("[TaskCreationModal] Final custom frontmatter:",t),t}generateFilename(t){let n={title:t.title||"",status:t.status||"open",priority:t.priority||"normal",dueDate:t.due,scheduledDate:t.scheduled};return gD(n,this.plugin.settings)}createTitleInput(t){this.plugin.settings.enableNaturalLanguageInput||super.createTitleInput(t)}async applySubtaskAssignments(t){let n=this.app.vault.getAbstractFileByPath(t.path);if(n instanceof va.TFile)for(let a of this.selectedSubtaskFiles)try{let s=await this.plugin.cacheManager.getTaskInfo(a.path);if(!s)continue;let i=this.buildProjectReference(n,a.path),o=`[[${n.basename}]]`,l=Array.isArray(s.projects)?s.projects:[];if(l.includes(i)||l.includes(o))continue;let d=[...l.filter(u=>u!==o),i];await this.plugin.updateTaskProperty(s,"projects",d)}catch(s){console.error("Failed to assign subtask:",s)}}onClose(){this.nlMarkdownEditor&&(this.nlMarkdownEditor.destroy(),this.nlMarkdownEditor=null),this.nlpSuggest&&(this.nlpSuggest.close(),this.nlpSuggest=null),this.removeAllEventListeners(),super.onClose()}}});var zf,gO=b(()=>{zf=class r{constructor(e,t="open"){this.statuses=e;this.defaultStatus=t}getNextStatus(e){var s;let t=this.getStatusesByOrder(),n=t.findIndex(i=>i.value===e);if(n===-1)return((s=t[0])==null?void 0:s.value)||this.defaultStatus;let a=(n+1)%t.length;return t[a].value}getPreviousStatus(e){var s;let t=this.getStatusesByOrder(),n=t.findIndex(i=>i.value===e);if(n===-1)return((s=t[t.length-1])==null?void 0:s.value)||this.defaultStatus;let a=(n-1+t.length)%t.length;return t[a].value}getStatusConfig(e){return this.statuses.find(t=>t.value===e)}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}getStatusStyles(){let e=[];for(let t of this.statuses){let n=`--status-${t.value.replace(/[^a-zA-Z0-9-]/g,"-")}-color`;e.push(`${n}: ${t.color};`)}return`:root { ${e.join(" ")} }`}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),s=new Set(a);a.length!==s.size&&t.push("Status values must be unique");let i=e.map(l=>l.id),o=new Set(i);i.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(!l.color||!l.color.match(/^#[0-9a-fA-F]{6}$/)){t.push("Status colors must be valid hex colors (#rrggbb)");break}}return{valid:t.length===0,errors:t}}static generateStatusId(e){let t=new Set(e.map(s=>s.id)),n=1,a=`status-${n}`;for(;t.has(a);)n++,a=`status-${n}`;return a}static createDefaultStatus(e){let t=r.generateStatusId(e),n=Math.max(...e.map(a=>a.order),0)+1;return{id:t,value:"new-status",label:"New status",color:"#808080",isCompleted:!1,order:n,autoArchive:!1,autoArchiveDelay:5}}}});var Fne={};Ke(Fne,{HierarchicalGroupingService:()=>yO});var yO,Lne=b(()=>{yO=class{constructor(e){this.resolveUserFieldValues=e}group(e,t,n,a="asc",s=[]){let i=new Map,o=(c,d)=>{var p,m,h,f,g,y,k,T;if(!d||d==="none")return["all"];let u=w=>{let S=w.map(x=>String(x!=null?x:"").trim()).filter(x=>x!=="");return S.length?S:[]};if(d.startsWith("user:")){let w=d.slice(5);if(this.resolveUserFieldValues){let C=this.resolveUserFieldValues(c,w)||[],M=u(C);return M.length?M:[`No ${w}`]}let S=(p=c.customProperties)==null?void 0:p[w];if(Array.isArray(S)){let C=u(S);return C.length?C:[`No ${w}`]}let x=String(S!=null?S:"").trim();return x!==""?[x]:[`No ${w}`]}switch(d){case"status":return[((m=c.status)!=null?m:"").trim()||"No Status"];case"priority":return[((h=c.priority)!=null?h:"").trim()||"No Priority"];case"context":{let w=u((f=c.contexts)!=null?f:[]);return w.length?w:["No Context"]}case"project":{let w=u((g=c.projects)!=null?g:[]).map(C=>{let M=C.match(/^\[\[([^|\]]+)(?:\|([^\]]+))?\]\]$/);if(M){let N=M[1]||"";return M[2]||N.split("#")[0].split("/").pop()||N||C}return C}),S=[],x=new Set;for(let C of w)x.has(C)||(x.add(C),S.push(C));return S.length?S:["No Project"]}case"tags":{let w=u((y=c.tags)!=null?y:[]);return w.length?w:["No Tag"]}case"due":{let w=((k=c.due)!=null?k:"").trim();return w?[w.split("T")[0]]:["No Due Date"]}case"scheduled":{let w=((T=c.scheduled)!=null?T:"").trim();return w?[w.split("T")[0]]:["No Scheduled Date"]}default:{let S=c[d];if(Array.isArray(S)){let C=u(S);return C.length?C:[`No ${d}`]}let x=String(S!=null?S:"").trim();return x!==""?[x]:[`No ${d}`]}}};for(let c of e){let d=o(c,t),u=o(c,n);for(let p of d){i.has(p)||i.set(p,new Map);let m=i.get(p);for(let h of u)m.has(h)||m.set(h,[]),m.get(h).push(c)}}let l=new Map;for(let[c,d]of i){let u=this.sortSubgroups(d,n,a,s);l.set(c,u)}return l}sortSubgroups(e,t,n,a){let s=Array.from(e.keys()),i=this.sortSubgroupKeys(s,t,n,a),o=new Map;for(let l of i)o.set(l,e.get(l));return o}sortSubgroupKeys(e,t,n,a){let s=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(s(u)&&!s(p))return-1;if(!s(u)&&s(p))return 1;if((l==null?void 0:l.type)==="number"){let m=parseFloat(u),h=parseFloat(p),f=isNaN(m)?Number.POSITIVE_INFINITY:m,g=isNaN(h)?Number.POSITIVE_INFINITY:h;if(f!==g)return f-g}else if((l==null?void 0:l.type)==="boolean"){let m=u==="true"?0:u==="false"?1:2,h=p==="true"?0:p==="false"?1:2;if(m!==h)return m-h}else if((l==null?void 0:l.type)==="date"){let m=Date.parse(u),h=Date.parse(p),f=isNaN(m)?Number.POSITIVE_INFINITY:m,g=isNaN(h)?Number.POSITIVE_INFINITY:h;if(f!==g)return f-g}return u.localeCompare(p)},d=e.slice().sort(c);return n==="desc"?d.reverse():d}let i=e.slice().sort((o,l)=>s(o)&&!s(l)?-1:!s(o)&&s(l)?1:o.localeCompare(l));return n==="desc"?i.reverse():i}}});var qf,vO=b(()=>{qf=class{constructor(e,t){this.cache=e;this.statusManager=t}getStats(e){let t={},n={},a=0,s=0,i=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,n[u.priority]=(n[u.priority]||0)+1;let p=this.statusManager.isCompletedStatus(u.status);u.archived&&o++,p&&a++,!p&&!u.archived&&s++,u.due&&u.due0&&(l++,c+=u.totalTrackedTime||0)}return{total:e.length,statusCounts:t,priorityCounts:n,completed:a,active:s,overdue:i,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:n,end:a}=this.getDateRange(e),s=0;for(let[i,o]of t.entries()){let l=await this.cache.getTaskInfo(i);l&&this.isTaskInRange(l,n,a)&&(s+=o)}return s}isTaskInRange(e,t,n){let a=e.due||e.scheduled;if(!a)return!1;let s=new Date(a);return s>=t&&s<=n}getDateRange(e){if(typeof e!="string")return e;let t=new Date,n=new Date(t),a=new Date(t);switch(e){case"daily":n.setHours(0,0,0,0),a.setHours(23,59,59,999);break;case"weekly":{let s=t.getDay(),i=t.getDate()-s+(s===0?-6:1);n.setDate(i),n.setHours(0,0,0,0),a.setDate(n.getDate()+6),a.setHours(23,59,59,999);break}case"monthly":n.setDate(1),n.setHours(0,0,0,0),a.setMonth(n.getMonth()+1),a.setDate(0),a.setHours(23,59,59,999);break;case"yearly":n.setMonth(0,1),n.setHours(0,0,0,0),a.setFullYear(n.getFullYear()+1),a.setDate(0),a.setHours(23,59,59,999);break}return{start:n,end:a}}}});var jne={};Ke(jne,{TaskLinkDetectionService:()=>qT});var Wp,qT,bO=b(()=>{Wp=require("obsidian"),qT=class{constructor(e){this.linkCache=new Map;this.plugin=e}async detectTaskLink(e,t,n="wikilink"){let a=n==="wikilink"?this.parseWikilink(e):this.parseMarkdownLink(e);if(!a)return{isValidTaskLink:!1};let{linkPath:s,displayText:i}=a,o=`${t}:${s}`,l=this.linkCache.get(o);if(l){let p=this.plugin.app.vault.getAbstractFileByPath(s);if(p instanceof Wp.TFile&&p.stat.mtime===l.lastModified)return l.result}let c=this.resolveLinkPath(s,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 Wp.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={isValidTaskLink:!0,taskPath:c,taskInfo:p,displayText:i};return this.cacheResult(o,m,d.stat.mtime),m}}catch(p){console.debug("TaskLinkDetectionService: Error checking task info for link:",c,p)}let u={isValidTaskLink:!1};return this.cacheResult(o,u,d.stat.mtime),u}parseWikilink(e){let t=e.slice(2,-2).trim();if(!t)return null;let n=t.indexOf("|");if(n!==-1){let s=t.slice(0,n).trim(),i=t.slice(n+1).trim();return!s||!i?null:{linkPath:(0,Wp.parseLinktext)(s).path,displayText:i}}let a=(0,Wp.parseLinktext)(t);return{linkPath:a.path,displayText:a.subpath||void 0}}parseMarkdownLink(e){let t=e.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!t)return null;let n=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(i){console.debug("TaskLinkDetectionService: Failed to decode URI component:",a,i)}let s=(0,Wp.parseLinktext)(a);return{linkPath:s.path,displayText:n||s.subpath||void 0}}resolveLinkPath(e,t){try{let n=this.plugin.app.metadataCache.getFirstLinkpathDest(e,t);return(n==null?void 0:n.path)||null}catch(n){return console.debug("Error resolving link path:",e,n),null}}cacheResult(e,t,n){if(this.linkCache.set(e,{result:t,lastModified:n}),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=[],n=/\[\[([^\]]+)\]\]/g,a;for(;(a=n.exec(e))!==null;)t.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"wikilink"});let s=/\[([^\]]*)\]\(([^)]+)\)/g;for(n.lastIndex=0;(a=s.exec(e))!==null;)t.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"markdown"});return t.sort((i,o)=>i.start-o.start)}cleanup(){this.linkCache.clear()}}});var zne,Hf,TO=b(()=>{zne=require("@codemirror/view");FD();Kn();Pd();Hf=class r extends zne.WidgetType{constructor(e,t,n,a){super(),this.taskInfo=e,this.plugin=t,this.originalText=n,this.displayText=a}toDOM(e){let t=new Date,n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),a=this.plugin.settings.inlineVisibleProperties||["status","priority","due","scheduled","recurrence"],s=Ba(a,this.plugin),i=document.createElement("span");i.className="tasknotes-plugin tasknotes-inline-widget",i.style.display="inline",i.style.verticalAlign="baseline";let o=br(this.taskInfo,this.plugin,s,{layout:"inline",targetDate:n});return i.appendChild(o),o.dataset.originalText=this.originalText,o.addEventListener("tasknotes:task-updated",()=>{setTimeout(()=>{e&&typeof e.dispatch=="function"&&Id(e,this.taskInfo.path)},50)}),i}eq(e){return e instanceof r?this.taskInfo.path===e.taskInfo.path&&this.taskInfo.status===e.taskInfo.status&&this.taskInfo.title===e.taskInfo.title&&this.taskInfo.priority===e.taskInfo.priority&&this.taskInfo.archived===e.taskInfo.archived&&this.taskInfo.due===e.taskInfo.due&&this.taskInfo.scheduled===e.taskInfo.scheduled&&this.taskInfo.recurrence===e.taskInfo.recurrence&&JSON.stringify(this.taskInfo.complete_instances)===JSON.stringify(e.taskInfo.complete_instances)&&this.taskInfo.dateModified===e.taskInfo.dateModified:!1}ignoreEvent(e){return e.type==="mousedown"||e.type==="click"}get estimatedHeight(){return-1}get block(){return!1}}});function CRe(r){let e=new Map,t=new Map;return go.ViewPlugin.fromClass(class{constructor(n){this.eventListeners=[];this.view=n,this.decorations=this.buildDecorations(n),this.setupEventListeners()}destroy(){this.eventListeners.forEach(n=>{r.emitter.offref(n)}),this.eventListeners=[]}setupEventListeners(){let n=r.emitter.on(ao,()=>{this.refreshDecorations()}),a=r.emitter.on(er,()=>{this.refreshDecorations()}),s=r.emitter.on(Hh,l=>{l!=null&&l.path&&t.delete(l.path),this.refreshDecorations()}),i=r.emitter.on(sp,()=>{this.refreshDecorations()}),o=r.emitter.on("settings-changed",()=>{this.refreshDecorations()});this.eventListeners.push(n,a,s,i,o)}refreshDecorations(){this.view&&typeof this.view.dispatch=="function"&&queueMicrotask(()=>{try{e.clear(),this.view.dispatch({effects:[LD.of({})]})}catch(n){console.error("Error dispatching task link update:",n)}})}update(n){var s,i;if(this.view=n.view,!((s=r==null?void 0:r.settings)!=null&&s.enableTaskLinkOverlay)){this.decorations=go.Decoration.none;return}try{if(!n.state.field(yo.editorLivePreviewField)){this.decorations=go.Decoration.none;return}}catch(o){this.decorations=go.Decoration.none;return}let a=n.transactions.some(o=>o.effects.some(l=>l.is(LD)));if(n.docChanged||n.selectionSet||a){if(a){let o=(i=n.transactions.flatMap(l=>l.effects).find(l=>l.is(LD)))==null?void 0:i.value;if(o!=null&&o.taskPath)for(let[l]of e.entries())l.includes(o.taskPath)&&e.delete(l);else e.clear()}this.decorations=this.buildDecorations(n.view)}}buildDecorations(n){var a,s;try{if(!((a=r==null?void 0:r.settings)!=null&&a.enableTaskLinkOverlay))return go.Decoration.none;if(!n.state.field(yo.editorLivePreviewField))return go.Decoration.none;let o=n.state.field(yo.editorInfoField,!1),l=(s=o==null?void 0:o.file)==null?void 0:s.path;return PRe(n.state,r,e,l,t)}catch(i){return console.error("Error building task link decorations:",i),go.Decoration.none}}},{decorations:n=>n.decorations})}function PRe(r,e,t,n,a){var l,c;let s=new $D.RangeSetBuilder;if(!r||!e||!t)return s.finish();let i=r.doc;if(!i||!e.app||!e.app.workspace)return s.finish();let o=e.taskLinkDetectionService||new qT(e);if(!n){let d=e.app.workspace.getActiveViewOfType(yo.MarkdownView);if(!d)return s.finish();n=(l=d.file)==null?void 0:l.path}if(!n||typeof n!="string"||n.length===0)return s.finish();try{let d=i.toString();if(typeof d!="string"||d.length>1e5)return s.finish();let u=(c=r.selection)==null?void 0:c.main.head,p=o.findWikilinks(d);if(!Array.isArray(p))return s.finish();for(let m of p)try{if(!m||typeof m.match!="string"||typeof m.start!="number"||typeof m.end!="number"||m.start<0||m.end<=m.start||m.start>=d.length||m.end>d.length||e.settings.disableOverlayOnAlias&&m.type==="wikilink"&&m.match.includes("|"))continue;let h=m.type==="wikilink"?_Re(m.match):MRe(m.match);if(!h)continue;let{linkPath:f}=h;if(!f||typeof f!="string"||f.trim().length===0)continue;let g=ARe(f,n,e);if(!g)continue;let y=IRe(g,e);if(y){if(!y.title||typeof y.title!="string"||u!==void 0&&u>=m.start&&u=m.start&&u500)return null;let t=e.indexOf("|");if(t!==-1){let a=e.slice(0,t).trim(),s=e.slice(t+1).trim();if(!a||!s)return null;let i=(0,yo.parseLinktext)(a);return i.path?{linkPath:i.path,displayText:s}:null}let n=(0,yo.parseLinktext)(e);return n.path?{linkPath:n.path,displayText:n.subpath||void 0}:null}function MRe(r){if(!r||typeof r!="string")return null;let e=r.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!e)return null;let t=e[1].trim(),n=e[2].trim();if(n.startsWith("<")&&n.endsWith(">")&&(n=n.slice(1,-1).trim()),!n||n.length===0||n.length>500)return null;try{n=decodeURIComponent(n)}catch(s){}let a=(0,yo.parseLinktext)(n);return a.path?{linkPath:a.path,displayText:t||a.subpath||void 0}:null}function ARe(r,e,t){if(!r||typeof r!="string"||r.trim().length===0||!e||typeof e!="string"||!t||!t.app||!t.app.metadataCache)return null;try{let n=t.app.metadataCache.getFirstLinkpathDest(r,e);return!n||!n.path||typeof n.path!="string"?null:n.path}catch(n){return null}}function IRe(r,e){if(!r||typeof r!="string"||r.trim().length===0||!e)return null;try{let t=/[<>:"|?*]/,n=r.split("").some(i=>{let o=i.charCodeAt(0);return o<=31||o===127});if(t.test(r)||n)return null;let a=e.cacheManager;if(!a||!a.getCachedTaskInfoSync)return null;let s=a.getCachedTaskInfoSync(r);return s&&typeof s=="object"&&s.title?s:null}catch(t){return null}}function Bne(r){return CRe(r)}function Id(r,e){if(!r||typeof r.dispatch!="function"){console.warn("Invalid EditorView passed to dispatchTaskUpdate:",r);return}try{r.dispatch({effects:[LD.of({taskPath:e})]})}catch(t){console.error("Error dispatching task update:",t)}}var $D,go,yo,LD,FD=b(()=>{$D=require("@codemirror/state"),go=require("@codemirror/view"),yo=require("obsidian");Fs();bO();TO();LD=$D.StateEffect.define()});function Nd(r,e){for(var t in e)r[t]=e[t];return r}function sae(r){var e=r.parentNode;e&&e.removeChild(r)}function P(r,e,t){var n,a,s,i={};for(s in e)s=="key"?n=e[s]:s=="ref"?a=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?YD.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)i[s]===void 0&&(i[s]=r.defaultProps[s]);return HD(r,i,n,a,null)}function HD(r,e,t,n,a){var s={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a==null?++tae:a};return a==null&&Ae.vnode!=null&&Ae.vnode(s),s}function Wr(){return{current:null}}function At(r){return r.children}function FRe(r,e,t,n,a){var s;for(s in t)s==="children"||s==="key"||s in e||VD(r,s,null,t[s],n);for(s in e)a&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||t[s]===e[s]||VD(r,s,e[s],t[s],n)}function Jne(r,e,t){e[0]==="-"?r.setProperty(e,t==null?"":t):r[e]=t==null?"":typeof t!="number"||ORe.test(e)?t:t+"px"}function VD(r,e,t,n,a){var s;e:if(e==="style")if(typeof t=="string")r.style.cssText=t;else{if(typeof n=="string"&&(r.style.cssText=n=""),n)for(e in n)t&&e in t||Jne(r.style,e,"");if(t)for(e in t)n&&t[e]===n[e]||Jne(r.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in r?e.toLowerCase().slice(2):e.slice(2),r.l||(r.l={}),r.l[e+s]=t,t?n||r.addEventListener(e,s?eae:Xne,s):r.removeEventListener(e,s?eae:Xne,s);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 r)try{r[e]=t==null?"":t;break e}catch(i){}typeof t=="function"||(t==null||t===!1&&e.indexOf("-")==-1?r.removeAttribute(e):r.setAttribute(e,t))}}function Xne(r){Uf=!0;try{return this.l[r.type+!1](Ae.event?Ae.event(r):r)}finally{Uf=!1}}function eae(r){Uf=!0;try{return this.l[r.type+!0](Ae.event?Ae.event(r):r)}finally{Uf=!1}}function Qn(r,e){this.props=r,this.context=e}function HT(r,e){if(e==null)return r.__?HT(r.__,r.__.__k.indexOf(r)+1):null;for(var t;ee&&Yp.sort(function(l,c){return l.__v.__b-c.__v.__b}));WD.__r=0}function oae(r,e,t,n,a,s,i,o,l,c){var d,u,p,m,h,f,g,y=n&&n.__k||aae,k=y.length;for(t.__k=[],d=0;d0?HD(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=t,m.__b=t.__b+1,(p=y[d])===null||p&&m.key==p.key&&m.type===p.type)y[d]=void 0;else for(u=0;u=0;e--)if((t=r.__k[e])&&(n=dae(t)))return n}return null}function DO(r,e,t,n,a,s,i,o,l){var c,d,u,p,m,h,f,g,y,k,T,w,S,x,C,M=e.type;if(e.constructor!==void 0)return null;t.__h!=null&&(l=t.__h,o=e.__e=t.__e,e.__h=null,s=[o]),(c=Ae.__b)&&c(e);try{e:if(typeof M=="function"){if(g=e.props,y=(c=M.contextType)&&n[c.__c],k=c?y?y.props.value:c.__:n,t.__c?f=(d=e.__c=t.__c).__=d.__E:("prototype"in M&&M.prototype.render?e.__c=d=new M(g,k):(e.__c=d=new Qn(g,k),d.constructor=M,d.render=jRe),y&&y.sub(d),d.props=g,d.state||(d.state={}),d.context=k,d.__n=n,u=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),M.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Nd({},d.__s)),Nd(d.__s,M.getDerivedStateFromProps(g,d.__s))),p=d.props,m=d.state,d.__v=e,u)M.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(M.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(N){N&&(N.__=e)}),T=0;T{UD={},aae=[],ORe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;YD=aae.slice,Ae={__e:function(r,e,t,n){for(var a,s,i;e=e.__;)if((a=e.__c)&&!a.__)try{if((s=a.constructor)&&s.getDerivedStateFromError!=null&&(a.setState(s.getDerivedStateFromError(r)),i=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(r,n||{}),i=a.__d),i)return a.__E=a}catch(o){r=o}throw r}},tae=0,xO=function(r){return r!=null&&r.constructor===void 0},Uf=!1,Qn.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Nd({},this.state),typeof r=="function"&&(r=r(Nd({},t),this.props)),r&&Nd(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),EO(this))},Qn.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),EO(this))},Qn.prototype.render=At,Yp=[],rae=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,WD.__r=0,nae=0});function qRe(){for(var r;r=kae.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(ZD),r.__H.__h.forEach(_O),r.__H.__h=[]}catch(e){r.__H.__h=[],Ae.__e(e,r.__v)}}function HRe(r){var e,t=function(){clearTimeout(n),Tae&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);Tae&&(e=requestAnimationFrame(t))}function ZD(r){var e=sl,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),sl=e}function _O(r){var e=sl;r.__c=r.__(),sl=e}var BRe,sl,CO,hae,kae,PO,fae,gae,yae,vae,bae,Tae,MO=b(()=>{bc();kae=[],PO=[],fae=Ae.__b,gae=Ae.__r,yae=Ae.diffed,vae=Ae.__c,bae=Ae.unmount;Ae.__b=function(r){sl=null,fae&&fae(r)},Ae.__r=function(r){gae&&gae(r),BRe=0;var e=(sl=r.__c).__H;e&&(CO===sl?(e.__h=[],sl.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=PO,t.__N=t.i=void 0})):(e.__h.forEach(ZD),e.__h.forEach(_O),e.__h=[])),CO=sl},Ae.diffed=function(r){yae&&yae(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(kae.push(e)!==1&&hae===Ae.requestAnimationFrame||((hae=Ae.requestAnimationFrame)||HRe)(qRe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==PO&&(t.__=t.__V),t.i=void 0,t.__V=PO})),CO=sl=null},Ae.__c=function(r,e){e.some(function(t){try{t.__h.forEach(ZD),t.__h=t.__h.filter(function(n){return!n.__||_O(n)})}catch(n){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Ae.__e(n,t.__v)}}),vae&&vae(r,e)},Ae.unmount=function(r){bae&&bae(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{ZD(n)}catch(a){e=a}}),t.__H=void 0,e&&Ae.__e(e,t.__v))};Tae=typeof requestAnimationFrame=="function"});function URe(r,e){for(var t in e)r[t]=e[t];return r}function wae(r,e){for(var t in r)if(t!=="__source"&&!(t in e))return!0;for(var n in e)if(n!=="__source"&&r[n]!==e[n])return!0;return!1}function Sae(r){this.props=r}function Aae(r,e,t){return r&&(r.__c&&r.__c.__H&&(r.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),r.__c.__H=null),(r=URe({},r)).__c!=null&&(r.__c.__P===t&&(r.__c.__P=e),r.__c=null),r.__k=r.__k&&r.__k.map(function(n){return Aae(n,e,t)})),r}function Iae(r,e,t){return r&&(r.__v=null,r.__k=r.__k&&r.__k.map(function(n){return Iae(n,e,t)}),r.__c&&r.__c.__P===e&&(r.__e&&t.insertBefore(r.__e,r.__d),r.__c.__e=!0,r.__c.__P=t)),r}function AO(){this.__u=0,this.t=null,this.__b=null}function Nae(r){var e=r.__.__c;return e&&e.__a&&e.__a(r)}function KD(){this.u=null,this.o=null}function WRe(r){return this.getChildContext=function(){return r.context},r.children}function YRe(r){var e=this,t=r.i;e.componentWillUnmount=function(){Rd(null,e.l),e.l=null,e.i=null},e.i&&e.i!==t&&e.componentWillUnmount(),r.__v?(e.l||(e.i=t,e.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),Rd(P(WRe,{context:e.context},r.__v),e.l)):e.l&&e.componentWillUnmount()}function IO(r,e){var t=P(YRe,{__v:r,i:e});return t.containerInfo=e,t}function JRe(){}function XRe(){return this.cancelBubble}function eOe(){return this.defaultPrevented}var Eae,SUt,VRe,xae,Dae,GRe,ZRe,KRe,QRe,Cae,tOe,Pae,_ae,Mae,VT=b(()=>{bc();bc();MO();MO();(Sae.prototype=new Qn).isPureReactComponent=!0,Sae.prototype.shouldComponentUpdate=function(r,e){return wae(this.props,r)||wae(this.state,e)};Eae=Ae.__b;Ae.__b=function(r){r.type&&r.type.__f&&r.ref&&(r.props.ref=r.ref,r.ref=null),Eae&&Eae(r)};SUt=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,VRe=Ae.__e;Ae.__e=function(r,e,t,n){if(r.then){for(var a,s=e;s=s.__;)if((a=s.__c)&&a.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),a.__c(r,e)}VRe(r,e,t,n)};xae=Ae.unmount;Ae.unmount=function(r){var e=r.__c;e&&e.__R&&e.__R(),e&&r.__h===!0&&(r.type=null),xae&&xae(r)},(AO.prototype=new Qn).__c=function(r,e){var t=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(t);var a=Nae(n.__v),s=!1,i=function(){s||(s=!0,t.__R=null,a?a(o):o())};t.__R=i;var o=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=Iae(c,c.__c.__P,c.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.t.pop();)d.forceUpdate()}},l=e.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),r.then(i,i)},AO.prototype.componentWillUnmount=function(){this.t=[]},AO.prototype.render=function(r,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Aae(this.__b,t,n.__O=n.__P)}this.__b=null}var a=e.__a&&P(At,null,r.fallback);return a&&(a.__h=null),[P(At,null,e.__a?null:r.children),a]};Dae=function(r,e,t){if(++t[1]===t[0]&&r.o.delete(e),r.props.revealOrder&&(r.props.revealOrder[0]!=="t"||!r.o.size))for(t=r.u;t;){for(;t.length>3;)t.pop()();if(t[1]{Kae(e,r)})}function Gae(r){r.isConnected&&r.getRootNode&&Zae(r.getRootNode())}function Zae(r){let e=HO.get(r);if(!e||!e.isConnected){if(e=r.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");let t=nOe();t&&(e.nonce=t);let n=r===document?document.head:r,a=r===document?n.querySelector("script,link[rel=stylesheet],link[as=style],style"):n.firstChild;n.insertBefore(e,a)}HO.set(r,e),rOe(e)}}function rOe(r){for(let e of Yae)Kae(r,e)}function Kae(r,e){let{sheet:t}=r,n=t.cssRules.length;e.split("}").forEach((a,s)=>{a=a.trim(),a&&t.insertRule(a+"}",n+s)})}function nOe(){return NO===void 0&&(NO=aOe()),NO}function aOe(){let r=document.querySelector('meta[name="csp-nonce"]');if(r&&r.hasAttribute("content"))return r.getAttribute("content");let e=document.querySelector("script[nonce]");return e&&e.nonce||""}function ok(r){r.parentNode&&r.parentNode.removeChild(r)}function Cn(r,e){if(r.closest)return r.closest(e);if(!document.documentElement.contains(r))return null;do{if(mC(r,e))return r;r=r.parentElement||r.parentNode}while(r!==null&&r.nodeType===1);return null}function mC(r,e){return(r.matches||r.matchesSelector||r.msMatchesSelector).call(r,e)}function Qae(r,e){let t=r instanceof HTMLElement?[r]:r,n=[];for(let a=0;a{let n=Cn(t.target,r);n&&e.call(n,t,n)}}function eF(r,e,t,n){let a=oOe(t,n);return r.addEventListener(e,a),()=>{r.removeEventListener(e,a)}}function Jae(r,e,t,n){let a;return eF(r,"mouseover",e,(s,i)=>{if(i!==a){a=i,t(s,i);let o=l=>{a=null,n(l,i),i.removeEventListener("mouseleave",o)};i.addEventListener("mouseleave",o)}})}function tF(r,e){let t=n=>{e(n),Oae.forEach(a=>{r.removeEventListener(a,t)})};Oae.forEach(n=>{r.addEventListener(n,t)})}function Xae(r){return Object.assign({onClick:r},ese(r))}function ese(r){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(r(e),e.preventDefault())}}}function xc(){return Fae+=1,String(Fae)}function Kf(){document.body.classList.add("fc-not-allowed")}function Qf(){document.body.classList.remove("fc-not-allowed")}function rF(r){r.style.userSelect="none",r.style.webkitUserSelect="none",r.addEventListener("selectstart",lk)}function nF(r){r.style.userSelect="",r.style.webkitUserSelect="",r.removeEventListener("selectstart",lk)}function aF(r){r.addEventListener("contextmenu",lk)}function sF(r){r.removeEventListener("contextmenu",lk)}function tse(r){let e=[],t=[],n,a;for(typeof r=="string"?t=r.split(/\s*,\s*/):typeof r=="function"?t=[r]:Array.isArray(r)&&(t=r),n=0;nn.replace("$"+s,a||""),r):t}function iF(r,e){return r-e}function WT(r){return r%1===0}function cOe(r){let e=r.querySelector(".fc-scrollgrid-shrink-frame"),t=r.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 r.getBoundingClientRect().width-e.getBoundingClientRect().width+t.getBoundingClientRect().width}function tt(r,e){return typeof r=="string"?uOe(r):typeof r=="object"&&r?$ae(r):typeof r=="number"?$ae({[e||"milliseconds"]:r}):null}function uOe(r){let e=dOe.exec(r);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 $ae(r){let e={years:r.years||r.year||0,months:r.months||r.month||0,days:r.days||r.day||0,milliseconds:(r.hours||r.hour||0)*60*60*1e3+(r.minutes||r.minute||0)*60*1e3+(r.seconds||r.second||0)*1e3+(r.milliseconds||r.millisecond||r.ms||0)},t=r.weeks||r.week;return t&&(e.days+=t*7,e.specifiedWeeks=!0),e}function pOe(r,e){return r.years===e.years&&r.months===e.months&&r.days===e.days&&r.milliseconds===e.milliseconds}function ck(r,e){return{years:r.years+e.years,months:r.months+e.months,days:r.days+e.days,milliseconds:r.milliseconds+e.milliseconds}}function ase(r,e){return{years:r.years-e.years,months:r.months-e.months,days:r.days-e.days,milliseconds:r.milliseconds-e.milliseconds}}function oF(r,e){return{years:r.years*e,months:r.months*e,days:r.days*e,milliseconds:r.milliseconds*e}}function mOe(r){return Vf(r)/365}function hOe(r){return Vf(r)/30}function Vf(r){return Js(r)/864e5}function Js(r){return r.years*(365*864e5)+r.months*(30*864e5)+r.days*864e5+r.milliseconds}function dk(r,e){let t=null;for(let n=0;n=1?Math.min(a,s):a}function RO(r,e,t,n){let a=ps([e,0,1+SOe(e,t,n)]),s=Gt(r),i=Math.round(ul(a,s));return Math.floor(i/7)+1}function SOe(r,e,t){let n=7+e-t;return-((7+ps([r,0,n]).getUTCDay()-e)%7)+n-1}function jae(r){return[r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()]}function zae(r){return new Date(r[0],r[1]||0,r[2]==null?1:r[2],r[3]||0,r[4]||0,r[5]||0)}function Fd(r){return[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()]}function ps(r){return r.length===1&&(r=r.concat([0])),new Date(Date.UTC(...r))}function cF(r){return!isNaN(r.valueOf())}function Ld(r){return r.getUTCHours()*1e3*60*60+r.getUTCMinutes()*1e3*60+r.getUTCSeconds()*1e3+r.getUTCMilliseconds()}function gC(r,e,t=!1){let n=r.toISOString();return n=n.replace(".000",""),t&&(n=n.replace("T00:00:00Z","")),n.length>10&&(e==null?n=n.replace("Z",""):e!==0&&(n=n.replace("Z",uF(e,!0)))),n}function qd(r){return r.toISOString().replace(/T.*$/,"")}function Xf(r){return r.toISOString().match(/^\d{4}-\d{2}/)[0]}function dF(r){return Zp(r.getUTCHours(),2)+":"+Zp(r.getUTCMinutes(),2)+":"+Zp(r.getUTCSeconds(),2)}function uF(r,e=!1){let t=r<0?"-":"+",n=Math.abs(r),a=Math.floor(n/60),s=Math.round(n%60);return e?`${t+Zp(a,2)}:${Zp(s,2)}`:`GMT${t}${a}${s?`:${Zp(s,2)}`:""}`}function ke(r,e,t){let n,a;return function(...s){if(!n)a=r.apply(this,s);else if(!dl(n,s)){t&&t(a);let i=r.apply(this,s);(!e||!e(i,a))&&(a=i)}return n=s,a}}function eg(r,e,t){let n,a;return s=>{if(!n)a=r.call(this,s);else if(!ba(n,s)){t&&t(a);let i=r.call(this,s);(!e||!e(i,a))&&(a=i)}return n=s,a}}function Bae(r,e,t){let n=Object.keys(r).length;return n===1&&r.timeZoneName==="short"?a=>uF(a.timeZoneOffset):n===0&&e.week?a=>IOe(t.computeWeekNumber(a.marker),t.weekText,t.weekTextLong,t.locale,e.week):POe(r,e,t)}function POe(r,e,t){r=Object.assign({},r),e=Object.assign({},e),_Oe(r,e),r.timeZone="UTC";let n=new Intl.DateTimeFormat(t.locale.codes,r),a;if(e.omitZeroMinute){let s=Object.assign({},r);delete s.minute,a=new Intl.DateTimeFormat(t.locale.codes,s)}return s=>{let{marker:i}=s,o;a&&!i.getUTCMinutes()?o=a:o=n;let l=o.format(i);return MOe(l,s,r,e,t)}}function _Oe(r,e){r.timeZoneName&&(r.hour||(r.hour="2-digit"),r.minute||(r.minute="2-digit")),r.timeZoneName==="long"&&(r.timeZoneName="short"),e.omitZeroMinute&&(r.second||r.millisecond)&&delete e.omitZeroMinute}function MOe(r,e,t,n,a){return r=r.replace(DOe,""),t.timeZoneName==="short"&&(r=AOe(r,a.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":uF(e.timeZoneOffset))),n.omitCommas&&(r=r.replace(EOe,"").trim()),n.omitZeroMinute&&(r=r.replace(":00","")),n.meridiem===!1?r=r.replace(QD,"").trim():n.meridiem==="narrow"?r=r.replace(QD,(s,i)=>i.toLocaleLowerCase()):n.meridiem==="short"?r=r.replace(QD,(s,i)=>`${i.toLocaleLowerCase()}m`):n.meridiem==="lowercase"&&(r=r.replace(QD,s=>s.toLocaleLowerCase())),r=r.replace(xOe," "),r=r.trim(),r}function AOe(r,e){let t=!1;return r=r.replace(COe,()=>(t=!0,e)),t||(r+=` ${e}`),r}function IOe(r,e,t,n,a){let s=[];return a==="long"?s.push(t):(a==="short"||a==="narrow")&&s.push(e),(a==="long"||a==="short")&&s.push(" "),s.push(n.simpleNumberFormat.format(r)),n.options.direction==="rtl"&&s.reverse(),s.join("")}function NOe(r,e,t){return t.getMarkerYear(r)!==t.getMarkerYear(e)?5:t.getMarkerMonth(r)!==t.getMarkerMonth(e)?4:t.getMarkerDay(r)!==t.getMarkerDay(e)?2:Ld(r)!==Ld(e)?1:0}function ROe(r,e){let t={};for(let n in r)(!(n in aC)||aC[n]<=e)&&(t[n]=r[n]);return t}function OOe(r,e,t,n){let a=0;for(;a=0;s-=1){let i=r[s][n];if(typeof i=="object"&&i)a.unshift(i);else if(i!==void 0){t[n]=i;break}}a.length&&(t[n]=vC(a))}}for(let n=r.length-1;n>=0;n-=1){let a=r[n];for(let s in a)s in t||(t[s]=a[s])}return t}function Tc(r,e){let t={};for(let n in r)e(r[n],n)&&(t[n]=r[n]);return t}function Ni(r,e){let t={};for(let n in r)t[n]=e(r[n],n);return t}function fF(r){let e={};for(let t of r)e[t]=!0;return e}function bC(r){let e=[];for(let t in r)e.push(r[t]);return e}function ba(r,e){if(r===e)return!0;for(let t in r)if(iC.call(r,t)&&!(t in e))return!1;for(let t in e)if(iC.call(e,t)&&r[t]!==e[t])return!1;return!0}function LOe(r,e){let t=$Oe(r,e);for(let n of t)if(!FOe.test(n))return!1;return!0}function $Oe(r,e){let t=[];for(let n in r)iC.call(r,n)&&(n in e||t.push(n));for(let n in e)iC.call(e,n)&&r[n]!==e[n]&&t.push(n);return t}function rC(r,e,t={}){if(r===e)return!0;for(let n in e)if(!(n in r&&jOe(r[n],e[n],t[n])))return!1;for(let n in r)if(!(n in e))return!1;return!0}function jOe(r,e,t){return r===e||t===!0?!0:t?t(r,e):!1}function lse(r,e=0,t,n=1){let a=[];t==null&&(t=Object.keys(r).length);for(let s=e;s{this.props.value!==i.value&&s.forEach(o=>{o.context=i.value,o.forceUpdate()})},this.sub=i=>{s.push(i);let o=i.componentWillUnmount;i.componentWillUnmount=()=>{s.splice(s.indexOf(i),1),o&&o.call(i)}}}return a},e}function pse(r,e,t,n,a,s,i,o,l,c,d,u,p,m){return{dateEnv:a,nowManager:s,options:t,pluginHooks:o,emitter:d,dispatch:l,getCurrentData:c,calendarApi:u,viewSpec:r,viewApi:e,dateProfileGenerator:n,theme:i,isRtl:t.direction==="rtl",addResizeHandler(h){d.on("_resize",h)},removeResizeHandler(h){d.off("_resize",h)},createScrollResponder(h){return new oC(h,d,tt(t.scrollTime),t.scrollTimeReset)},registerInteractiveComponent:p,unregisterInteractiveComponent:m}}function HOe(r){let e=Object.create(this.prototype.propEquality);Object.assign(e,r),this.prototype.propEquality=e}function UOe(r){let e=Object.create(this.prototype.stateEquality);Object.assign(e,r),this.prototype.stateEquality=e}function ei(r,e){typeof r=="function"?r(e):r&&(r.current=e)}function ZO(r,e){var t;return!!(e.handleCustomRendering&&r&&(!((t=e.customRenderingMetaMap)===null||t===void 0)&&t[r]))}function gF(r,e,t){let n=Object.assign(Object.assign({},r.elAttrs),{ref:t});return(r.elClasses||e)&&(n.className=(r.elClasses||[]).concat(e||[]).concat(n.className||[]).filter(Boolean).join(" ")),r.elStyle&&(n.style=r.elStyle),n}function VOe(r){return!!r}function WOe(r,e){let t=r.props;return P(KT,Object.assign({renderProps:t.renderProps,generatorName:t.generatorName,customGenerator:t.customGenerator,defaultGenerator:t.defaultGenerator,renderId:r.context},e))}function YOe(r,e){let t=typeof r=="function"?r(e):r||[];return typeof t=="string"?[t]:t}function vF(r){return[`fc-${r.type}-view`,"fc-view"]}function GOe(r,e){let t=null,n=null;return r.start&&(t=e.createMarker(r.start)),r.end&&(n=e.createMarker(r.end)),!t&&!n||t&&n&&nn&&t.push({start:n,end:s.start}),s.end>n&&(n=s.end);return ne.start)&&(r.start===null||e.end===null||r.start=r.start)&&(r.end===null||e.end!==null&&e.end<=r.end)}function Ii(r,e){return(r.start===null||e>=r.start)&&(r.end===null||e=e.end?new Date(e.end.valueOf()-1):r}function hse(r){let e=Math.floor(ul(r.start,r.end))||1,t=Gt(r.start),n=Lr(t,e);return{start:t,end:n}}function kC(r,e=tt(0)){let t=null,n=null;if(r.end){n=Gt(r.end);let a=r.end.valueOf()-n.valueOf();a&&a>=Js(e)&&(n=Lr(n,1))}return r.start&&(t=Gt(r.start),n&&n<=t&&(n=Lr(t,1))),{start:t,end:n}}function bF(r){let e=kC(r);return ul(e.start,e.end)>1}function $d(r,e,t,n){return n==="year"?tt(t.diffWholeYears(r,e),"year"):n==="month"?tt(t.diffWholeMonths(r,e),"month"):sse(r,e)}function rg(r,e,t,n){return{instanceId:xc(),defId:r,range:e,forcedStartTzo:t==null?null:t,forcedEndTzo:n==null?null:n}}function QOe(r,e,t,n){for(let a=0;a!i[l.defId].recurringDef);for(let l in i){let c=i[l];if(c.recurringDef){let{duration:d}=c.recurringDef;d||(d=c.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let u=JOe(c,d,e,n,a.recurringTypes);for(let p of u){let m=rg(l,{start:p,end:n.add(p,d)});o[m.instanceId]=m}}}return{defs:i,instances:o}}function JOe(r,e,t,n,a){let i=a[r.recurringDef.typeId].expand(r.recurringDef.typeData,{start:n.subtract(t.start,e),end:t.end},n);return r.allDay&&(i=i.map(Gt)),i}function gse(r,e,t,n,a=TF(t),s,i){let{refined:o,extra:l}=pk(r,t,a),c=tFe(e,t),d=QOe(o,c,t.dateEnv,t.pluginHooks.recurringTypes);if(d){let p=Yf(o,l,e?e.sourceId:"",d.allDay,!!d.duration,t,s);return p.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:p,instance:null}}let u=eFe(o,c,t,n);if(u){let p=Yf(o,l,e?e.sourceId:"",u.allDay,u.hasEnd,t,s),m=rg(p.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return i&&p.publicId&&i[p.publicId]&&(m.instanceId=i[p.publicId]),{def:p,instance:m}}return null}function pk(r,e,t=TF(e)){return uk(r,t)}function TF(r){return Object.assign(Object.assign(Object.assign({},lC),XOe),r.pluginHooks.eventRefiners)}function Yf(r,e,t,n,a,s,i){let o={title:r.title||"",groupId:r.groupId||"",publicId:r.id||"",url:r.url||"",recurringDef:null,defId:(i&&r.id?i[r.id]:"")||xc(),sourceId:t,allDay:n,hasEnd:a,interactive:r.interactive,ui:ng(r,s),extendedProps:Object.assign(Object.assign({},r.extendedProps||{}),e)};for(let l of s.pluginHooks.eventDefMemberAdders)Object.assign(o,l(r));return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function eFe(r,e,t,n){let{allDay:a}=r,s,i=null,o=!1,l,c=null,d=r.start!=null?r.start:r.date;if(s=t.dateEnv.createMarkerMeta(d),s)i=s.marker;else if(!n)return null;return r.end!=null&&(l=t.dateEnv.createMarkerMeta(r.end)),a==null&&(e!=null?a=e:a=(!s||s.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),a&&i&&(i=Gt(i)),l&&(c=l.marker,a&&(c=Gt(c)),i&&c<=i&&(c=null)),c?o=!0:n||(o=t.options.forceEventDuration||!1,c=t.dateEnv.add(i,a?t.options.defaultAllDayEventDuration:t.options.defaultTimedEventDuration)),{allDay:a,hasEnd:o,range:{start:i,end:c},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function tFe(r,e){let t=null;return r&&(t=r.defaultAllDay),t==null&&(t=e.options.defaultAllDay),t}function QT(r,e,t,n,a,s){let i=Pn(),o=TF(t);for(let l of r){let c=gse(l,e,t,n,o,a,s);c&&Xp(c,i)}return i}function Xp(r,e=Pn()){return e.defs[r.def.defId]=r.def,r.instance&&(e.instances[r.instance.instanceId]=r.instance),e}function mk(r,e){let t=r.instances[e];if(t){let n=r.defs[t.defId],a=SC(r,s=>rFe(n,s));return a.defs[n.defId]=n,a.instances[t.instanceId]=t,a}return Pn()}function rFe(r,e){return!!(r.groupId&&r.groupId===e.groupId)}function Pn(){return{defs:{},instances:{}}}function wC(r,e){return{defs:Object.assign(Object.assign({},r.defs),e.defs),instances:Object.assign(Object.assign({},r.instances),e.instances)}}function SC(r,e){let t=Tc(r.defs,e),n=Tc(r.instances,a=>t[a.defId]);return{defs:t,instances:n}}function nFe(r,e){let{defs:t,instances:n}=r,a={},s={};for(let i in t)e.defs[i]||(a[i]=t[i]);for(let i in n)!e.instances[i]&&a[n[i].defId]&&(s[i]=n[i]);return{defs:a,instances:s}}function aFe(r,e){return Array.isArray(r)?QT(r,null,e,!0):typeof r=="object"&&r?QT([r],null,e,!0):r!=null?String(r):null}function KO(r){return Array.isArray(r)?r:typeof r=="string"?r.split(/\s+/):[]}function ng(r,e){let t=aFe(r.constraint,e);return{display:r.display||null,startEditable:r.startEditable!=null?r.startEditable:r.editable,durationEditable:r.durationEditable!=null?r.durationEditable:r.editable,constraints:t!=null?[t]:[],overlap:r.overlap!=null?r.overlap:null,allows:r.allow!=null?[r.allow]:[],backgroundColor:r.backgroundColor||r.color||"",borderColor:r.borderColor||r.color||"",textColor:r.textColor||"",classNames:(r.className||[]).concat(r.classNames||[])}}function kF(r){return r.reduce(iFe,sFe)}function iFe(r,e){return{display:e.display!=null?e.display:r.display,startEditable:e.startEditable!=null?e.startEditable:r.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:r.durationEditable,constraints:r.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:r.overlap,allows:r.allows.concat(e.allows),backgroundColor:e.backgroundColor||r.backgroundColor,borderColor:e.borderColor||r.borderColor,textColor:e.textColor||r.textColor,classNames:r.classNames.concat(e.classNames)}}function wF(r,e,t=SF(e)){let n;if(typeof r=="string"?n={url:r}:typeof r=="function"||Array.isArray(r)?n={events:r}:typeof r=="object"&&r&&(n=r),n){let{refined:a,extra:s}=uk(n,t),i=lFe(a,e);if(i)return{_raw:r,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:a.defaultAllDay,eventDataTransform:a.eventDataTransform,success:a.success,failure:a.failure,publicId:a.id||"",sourceId:xc(),sourceDefId:i.sourceDefId,meta:i.meta,ui:ng(a,e),extendedProps:s}}return null}function SF(r){return Object.assign(Object.assign(Object.assign({},lC),oFe),r.pluginHooks.eventSourceRefiners)}function lFe(r,e){let t=e.pluginHooks.eventSourceDefs;for(let n=t.length-1;n>=0;n-=1){let s=t[n].parseMeta(r);if(s)return{sourceDefId:n,meta:s}}return null}function yse(r,e,t,n,a){switch(e.type){case"RECEIVE_EVENTS":return cFe(r,t[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,a);case"RESET_RAW_EVENTS":return dFe(r,t[e.sourceId],e.rawEvents,n.activeRange,a);case"ADD_EVENTS":return uFe(r,e.eventStore,n?n.activeRange:null,a);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return wC(r,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Jp(r,n.activeRange,a):r;case"REMOVE_EVENTS":return nFe(r,e.eventStore);case"REMOVE_EVENT_SOURCE":return bse(r,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return SC(r,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return Pn();default:return r}}function cFe(r,e,t,n,a,s){if(e&&t===e.latestFetchId){let i=QT(vse(a,e,s),e,s);return n&&(i=Jp(i,n,s)),wC(bse(r,e.sourceId),i)}return r}function dFe(r,e,t,n,a){let{defIdMap:s,instanceIdMap:i}=mFe(r),o=QT(vse(t,e,a),e,a,!1,s,i);return Jp(o,n,a)}function vse(r,e,t){let n=t.options.eventDataTransform,a=e?e.eventDataTransform:null;return a&&(r=Uae(r,a)),n&&(r=Uae(r,n)),r}function Uae(r,e){let t;if(!e)t=r;else{t=[];for(let n of r){let a=e(n);a?t.push(a):a==null&&t.push(n)}}return t}function uFe(r,e,t,n){return t&&(e=Jp(e,t,n)),wC(r,e)}function EF(r,e,t){let{defs:n}=r,a=Ni(r.instances,s=>n[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:t.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:t.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:t.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:t.canComputeOffset?null:s.forcedEndTzo}));return{defs:n,instances:a}}function bse(r,e){return SC(r,t=>t.sourceId!==e)}function pFe(r,e){return{defs:r.defs,instances:Tc(r.instances,t=>!e[t.instanceId])}}function mFe(r){let{defs:e,instances:t}=r,n={},a={};for(let s in e){let i=e[s],{publicId:o}=i;o&&(n[o]=s)}for(let s in t){let i=t[s],o=e[i.defId],{publicId:l}=o;l&&(a[l]=s)}return{defIdMap:n,instanceIdMap:a}}function hFe(r,e,t){(r[e]||(r[e]=[])).push(t)}function fFe(r,e,t){t?r[e]&&(r[e]=r[e].filter(n=>n!==t)):delete r[e]}function xF(r,e){return QT(yFe(r),null,e)}function yFe(r){let e;return r===!0?e=[{}]:Array.isArray(r)?e=r.filter(t=>t.daysOfWeek):typeof r=="object"&&r?e=[r]:e=[],e=e.map(t=>Object.assign(Object.assign({},gFe),t)),e}function EC(r,e,t){t.emitter.trigger("select",Object.assign(Object.assign({},DF(r,t)),{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view}))}function vFe(r,e){e.emitter.trigger("unselect",{jsEvent:r?r.origEvent:null,view:e.viewApi||e.calendarApi.view})}function DF(r,e){let t={};for(let n of e.pluginHooks.dateSpanTransforms)Object.assign(t,n(r,e));return Object.assign(t,MFe(r,e.dateEnv)),t}function JT(r,e,t){let{dateEnv:n,options:a}=t,s=e;return r?(s=Gt(s),s=n.add(s,a.defaultAllDayEventDuration)):s=n.add(s,a.defaultTimedEventDuration),s}function hk(r,e,t,n){let a=cC(r.defs,e),s=Pn();for(let i in r.defs){let o=r.defs[i];s.defs[i]=bFe(o,a[i],t,n)}for(let i in r.instances){let o=r.instances[i],l=s.defs[o.defId];s.instances[i]=TFe(o,l,a[o.defId],t,n)}return s}function bFe(r,e,t,n){let a=t.standardProps||{};a.hasEnd==null&&e.durationEditable&&(t.startDelta||t.endDelta)&&(a.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},r),a),{ui:Object.assign(Object.assign({},r.ui),a.ui)});t.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),t.extendedProps));for(let i of n.pluginHooks.eventDefMutationAppliers)i(s,t,n);return!s.hasEnd&&n.options.forceEventDuration&&(s.hasEnd=!0),s}function TFe(r,e,t,n,a){let{dateEnv:s}=a,i=n.standardProps&&n.standardProps.allDay===!0,o=n.standardProps&&n.standardProps.hasEnd===!1,l=Object.assign({},r);return i&&(l.range=hse(l.range)),n.datesDelta&&t.startEditable&&(l.range={start:s.add(l.range.start,n.datesDelta),end:s.add(l.range.end,n.datesDelta)}),n.startDelta&&t.durationEditable&&(l.range={start:s.add(l.range.start,n.startDelta),end:l.range.end}),n.endDelta&&t.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,n.endDelta)}),o&&(l.range={start:l.range.start,end:JT(e.allDay,l.range.start,a)}),e.allDay&&(l.range={start:Gt(l.range.start),end:Gt(l.range.end)}),l.range.endkse(t,e))}function kse(r,e){let t=[];return e[""]&&t.push(e[""]),e[r.defId]&&t.push(e[r.defId]),t.push(r.ui),kF(t)}function lm(r,e){let t=r.map(kFe);return t.sort((n,a)=>rse(n,a,e)),t.map(n=>n._seg)}function kFe(r){let{eventRange:e}=r,t=e.def,n=e.instance?e.instance.range:e.range,a=n.start?n.start.valueOf():0,s=n.end?n.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},t.extendedProps),t),{id:t.publicId,start:a,end:s,duration:s-a,allDay:Number(t.allDay),_seg:r})}function wFe(r,e){let{pluginHooks:t}=e,n=t.isDraggableTransformers,{def:a,ui:s}=r.eventRange,i=s.startEditable;for(let o of n)i=o(i,a,s,e);return i}function SFe(r,e){return r.isStart&&r.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function EFe(r,e){return r.isEnd&&r.eventRange.ui.durationEditable}function Ud(r,e,t,n,a,s,i){let{dateEnv:o,options:l}=t,{displayEventTime:c,displayEventEnd:d}=l,u=r.eventRange.def,p=r.eventRange.instance;c==null&&(c=n!==!1),d==null&&(d=a!==!1);let m=p.range.start,h=p.range.end,f=s||r.start||r.eventRange.range.start,g=i||r.end||r.eventRange.range.end,y=Gt(m).valueOf()===Gt(f).valueOf(),k=Gt(il(h,-1)).valueOf()===Gt(il(g,-1)).valueOf();return c&&!u.allDay&&(y||k)?(f=y?m:f,g=k?h:g,d&&u.hasEnd?o.formatRange(f,g,e,{forcedStartTzo:s?null:p.forcedStartTzo,forcedEndTzo:i?null:p.forcedEndTzo}):o.format(f,e,{forcedTzo:s?null:p.forcedStartTzo})):""}function ti(r,e,t){let n=r.eventRange.range;return{isPast:n.end<=(t||e.start),isFuture:n.start>=(t||e.end),isToday:e&&Ii(e,n.start)}}function xFe(r){let e=["fc-event"];return r.isMirror&&e.push("fc-event-mirror"),r.isDraggable&&e.push("fc-event-draggable"),(r.isStartResizable||r.isEndResizable)&&e.push("fc-event-resizable"),r.isDragging&&e.push("fc-event-dragging"),r.isResizing&&e.push("fc-event-resizing"),r.isSelected&&e.push("fc-event-selected"),r.isStart&&e.push("fc-event-start"),r.isEnd&&e.push("fc-event-end"),r.isPast&&e.push("fc-event-past"),r.isToday&&e.push("fc-event-today"),r.isFuture&&e.push("fc-event-future"),e}function fk(r){return r.instance?r.instance.instanceId:`${r.def.defId}:${r.range.start.toISOString()}`}function ag(r,e){let{def:t,instance:n}=r.eventRange,{url:a}=t;if(a)return{href:a};let{emitter:s,options:i}=e,{eventInteractive:o}=i;return o==null&&(o=t.interactive,o==null&&(o=!!s.hasHandlers("eventClick"))),o?ese(l=>{s.trigger("eventClick",{el:l.target,event:new cr(e,t,n),jsEvent:l,view:e.viewApi})}):{}}function CFe(r,e,t){let n=PFe(r,e),{range:a}=n;if(!a.start)return null;if(!a.end){if(t==null)return null;a.end=e.add(a.start,t)}return n}function PFe(r,e){let{refined:t,extra:n}=uk(r,DFe),a=t.start?e.createMarkerMeta(t.start):null,s=t.end?e.createMarkerMeta(t.end):null,{allDay:i}=t;return i==null&&(i=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:i},n)}function PF(r,e){return mse(r.range,e.range)&&r.allDay===e.allDay&&_Fe(r,e)}function _Fe(r,e){for(let t in e)if(t!=="range"&&t!=="allDay"&&r[t]!==e[t])return!1;for(let t in r)if(!(t in e))return!1;return!0}function MFe(r,e){return Object.assign(Object.assign({},wse(r.range,e,r.allDay)),{allDay:r.allDay})}function _F(r,e,t){return Object.assign(Object.assign({},wse(r,e,t)),{timeZone:e.timeZone})}function wse(r,e,t){return{start:e.toDate(r.start),end:e.toDate(r.end),startStr:e.formatIso(r.start,{omitTime:t}),endStr:e.formatIso(r.end,{omitTime:t})}}function AFe(r,e,t){let n=pk({editable:!1},t),a=Yf(n.refined,n.extra,"",r.allDay,!0,t);return{def:a,ui:kse(a,e),instance:rg(a.defId,r.range),range:r.range,isStart:!0,isEnd:!0}}function MF(r,e,t){let n=!1,a=function(o){n||(n=!0,e(o))},s=function(o){n||(n=!0,t(o))},i=r(a,s);i&&typeof i.then=="function"&&i.then(a,s)}function AF(r,e,t){r=r.toUpperCase();let n={method:r};return r==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(t):(n.body=new URLSearchParams(t),n.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,n).then(a=>{if(a.ok)return a.json().then(s=>[s,a],()=>{throw new dC("Failure parsing JSON",a)});throw new dC("Request failed",a)})}function IF(){return FO==null&&(FO=IFe()),FO}function IFe(){if(typeof document=="undefined")return!0;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.innerHTML="
",r.querySelector("table").style.height="100px",r.querySelector("div").style.height="100%",document.body.appendChild(r);let t=r.querySelector("div").offsetHeight>0;return document.body.removeChild(r),t}function Sse(r,e){return{component:r,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function gk(r){return{[r.component.uid]:r}}function NFe(r){let e=Gt(r),t=Lr(e,1);return{start:e,end:t}}function NF(r,e){return r.left>=e.left&&r.left=e.top&&r.topt:e&&r>=e.end)}}function sg(r,e){let t=["fc-day",`fc-day-${fOe[r.dow]}`];return r.isDisabled?t.push("fc-day-disabled"):(r.isToday&&(t.push("fc-day-today"),t.push(e.getClass("today"))),r.isPast&&t.push("fc-day-past"),r.isFuture&&t.push("fc-day-future"),r.isOther&&t.push("fc-day-other")),t}function hl(r,e,t="day",n=!0){let{dateEnv:a,options:s,calendarApi:i}=r,o=a.format(e,t==="week"?FFe:OFe);if(s.navLinks){let l=a.toDate(e),c=d=>{let u=t==="day"?s.navLinkDayClick:t==="week"?s.navLinkWeekClick:null;typeof u=="function"?u.call(i,a.toDate(e),d):(typeof u=="string"&&(t=u),i.zoomTo(e,t))};return Object.assign({title:Jf(s.navLinkHint,[o,l],o),"data-navlink":""},n?Xae(c):{onClick:c})}return{"aria-label":o}}function Ese(){return $O===null&&($O=LFe()),$O}function LFe(){let r=document.createElement("div");om(r,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),r.innerHTML="
",document.body.appendChild(r);let t=r.firstChild.getBoundingClientRect().left>r.getBoundingClientRect().left;return ok(r),t}function xse(){return jO||(jO=$Fe()),jO}function $Fe(){let r=document.createElement("div");r.style.overflow="scroll",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",document.body.appendChild(r);let e=Dse(r);return document.body.removeChild(r),e}function Dse(r){return{x:r.offsetHeight-r.clientHeight,y:r.offsetWidth-r.clientWidth}}function Cse(r,e=!1){let t=window.getComputedStyle(r),n=parseInt(t.borderLeftWidth,10)||0,a=parseInt(t.borderRightWidth,10)||0,s=parseInt(t.borderTopWidth,10)||0,i=parseInt(t.borderBottomWidth,10)||0,o=Dse(r),l=o.y-n-a,c=o.x-s-i,d={borderLeft:n,borderRight:a,borderTop:s,borderBottom:i,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return Ese()&&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 LF(r,e=!1,t){let n=t?r.getBoundingClientRect():vk(r),a=Cse(r,e),s={left:n.left+a.borderLeft+a.scrollbarLeft,right:n.right-a.borderRight-a.scrollbarRight,top:n.top+a.borderTop,bottom:n.bottom-a.borderBottom-a.scrollbarBottom};return e&&(s.left+=a.paddingLeft,s.right-=a.paddingRight,s.top+=a.paddingTop,s.bottom-=a.paddingBottom),s}function vk(r){let e=r.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function jFe(r){let e=DC(r),t=r.getBoundingClientRect();for(let n of e){let a=xC(t,n.getBoundingClientRect());if(a)t=a;else return null}return t}function DC(r){let e=[];for(;r instanceof HTMLElement;){let t=window.getComputedStyle(r);if(t.position==="fixed")break;/(auto|scroll)/.test(t.overflow+t.overflowY+t.overflowX)&&e.push(r),r=r.parentNode}return e}function XD(r,e){let t=r.length;if(t!==e.length)return!1;for(let n=0;nt(r[a-1]))return[a,0];for(;ni)n=s+1;else return[s,1]}return[n,0]}function Tk(r){let{refined:e,extra:t}=uk(r,BFe);return{startTime:e.startTime||null,duration:e.duration||null,create:e.create!=null?e.create:!0,sourceId:e.sourceId,leftoverProps:t}}function Pse(r,e){return!r||e>10?It({weekday:"short"}):e>1?It({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):It({weekday:"long"})}function Mse(r){return r.text}function HFe(r,e,t){return r||Pse(e,t)}function eC(r,e){let t=r.activeRange;return e?t:{start:il(t.start,r.slotMinTime.milliseconds),end:il(t.end,r.slotMaxTime.milliseconds-864e5)}}function kk(r,e,t){let{instances:n}=r.mutatedEvents;for(let a in n)if(!tg(e.validRange,n[a].range))return!1;return Ase({eventDrag:r},t)}function jF(r,e,t){return tg(e.validRange,r.range)?Ase({dateSelection:r},t):!1}function Ase(r,e){let t=e.getCurrentData(),n=Object.assign({businessHours:t.businessHours,dateSelection:"",eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},r);return(e.pluginHooks.isPropsValid||Ise)(n,e)}function Ise(r,e,t={},n){return!(r.eventDrag&&!UFe(r,e,t,n)||r.dateSelection&&!VFe(r,e,t,n))}function UFe(r,e,t,n){let a=e.getCurrentData(),s=r.eventDrag,i=s.mutatedEvents,o=i.defs,l=i.instances,c=cC(o,s.isEvent?r.eventUiBases:{"":a.selectionConfig});n&&(c=Ni(c,n));let d=pFe(r.eventStore,s.affectedEvents.instances),u=d.defs,p=d.instances,m=cC(u,r.eventUiBases);for(let h in l){let f=l[h],g=f.range,y=c[f.defId],k=o[f.defId];if(!Nse(y.constraints,g,d,r.businessHours,e))return!1;let{eventOverlap:T}=e.options,w=typeof T=="function"?T:null;for(let x in p){let C=p[x];if(TC(g,C.range)&&(m[C.defId].overlap===!1&&s.isEvent||y.overlap===!1||w&&!w(new cr(e,u[C.defId],C),new cr(e,k,f))))return!1}let S=a.eventStore;for(let x of y.allows){let C=Object.assign(Object.assign({},t),{range:f.range,allDay:k.allDay}),M=S.defs[k.defId],N=S.instances[h],F;if(M?F=new cr(e,M,N):F=new cr(e,k),!x(DF(C,e),F))return!1}}return!0}function VFe(r,e,t,n){let a=r.eventStore,s=a.defs,i=a.instances,o=r.dateSelection,l=o.range,{selectionConfig:c}=e.getCurrentData();if(n&&(c=n(c)),!Nse(c.constraints,l,a,r.businessHours,e))return!1;let{selectOverlap:d}=e.options,u=typeof d=="function"?d:null;for(let p in i){let m=i[p];if(TC(l,m.range)&&(c.overlap===!1||u&&!u(new cr(e,s[m.defId],m),null)))return!1}for(let p of c.allows){let m=Object.assign(Object.assign({},t),o);if(!p(DF(m,e),null))return!1}return!0}function Nse(r,e,t,n,a){for(let s of r)if(!YFe(WFe(s,e,t,n,a),e))return!1;return!0}function WFe(r,e,t,n,a){return r==="businessHours"?BO(Jp(n,e,a)):typeof r=="string"?BO(SC(t,s=>s.groupId===r)):typeof r=="object"&&r?BO(Jp(r,e,a)):[]}function BO(r){let{instances:e}=r,t=[];for(let n in e)t.push(e[n].range);return t}function YFe(r,e){for(let t of r)if(tg(t,e))return!0;return!1}function Rse(r){let e=Qae(r,".fc-scrollgrid-shrink"),t=0;for(let n of e)t=Math.max(t,cOe(n));return Math.ceil(t)}function zF(r,e){return r.liquid&&e.liquid}function Ose(r,e){return e.maxHeight!=null||zF(r,e)}function Fse(r,e,t,n){let{expandRows:a}=t;return typeof e.content=="function"?e.content(t):P("table",{role:"presentation",className:[e.tableClassName,r.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:t.tableMinWidth,width:t.clientWidth,height:a?t.clientHeight:""}},t.tableColGroupNode,P(n?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(t):e.rowContent))}function Lse(r,e){return dl(r,e,ba)}function $se(r,e){let t=[];for(let n of r){let a=n.span||1;for(let s=0;se.eventRange.range.end?r:e}var Yae,HO,NO,sOe,Kp,iOe,Rae,Oae,Fae,Lae,dOe,fOe,OO,aC,QD,EOe,xOe,DOe,COe,UO,VO,WO,pF,pl,mF,hF,Hd,ose,iC,FOe,cse,YO,qOe,GT,kc,GO,oC,Ri,ol,dt,KT,yF,tn,Xs,Qp,nC,fse,XOe,lC,sFe,oFe,wc,gFe,Od,cr,DFe,dC,FO,XT,vo,cm,ms,ek,LO,tk,OFe,FFe,$O,jO,bo,em,rk,nk,yn,tm,ik,ig,BFe,_se,uC,qFe,pC,Sc,rm,nm,am,tC,Zf,hs,jd,Ec,zd,Sk,KFe,Bd,sm,xk,qO,QO,JO,im,BF=b(()=>{bc();bc();VT();Yae=[],HO=new Map;typeof document!="undefined"&&Zae(document);sOe=':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)}';cl(sOe);Kp=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:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[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()}};iOe=/(top|left|right|bottom|width|height)$/i;Rae=0;Oae=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];Fae=0;Lae=["years","months","days","milliseconds"],dOe=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;fOe=["sun","mon","tue","wed","thu","fri","sat"];OO={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},aC={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},QD=/\s*([ap])\.?m\.?/i,EOe=/,/g,xOe=/\s+/g,DOe=/\u200e/g,COe=/UTC|GMT/,UO=class{constructor(e){let t={},n={},a=9;for(let s in e)s in OO?(n[s]=e[s],OO[s]<9&&(a=Math.min(OO[s],a))):(t[s]=e[s],s in aC&&(a=Math.min(aC[s],a)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=a,this.buildFormattingFunc=ke(Bae)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,a){let{standardDateProps:s,extendedSettings:i}=this,o=NOe(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let l=o;l>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(l=1);let c=this.format(e,n),d=this.format(t,n);if(c===d)return c;let u=ROe(s,l),p=Bae(u,i,n),m=p(e),h=p(t),f=OOe(c,m,d,h),g=i.separator||a||n.defaultSeparator||"";return f?f.before+m+g+h+f.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"}}};VO=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,sC(e,null,t,n))}formatRange(e,t,n,a){return n.cmdFormatter(this.cmdStr,sC(e,t,n,a))}},WO=class{constructor(e){this.func=e}format(e,t,n){return this.func(sC(e,null,t,n))}formatRange(e,t,n,a){return this.func(sC(e,t,n,a))}};pF={navLinkDayClick:$,navLinkWeekClick:$,duration:tt,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:tt,defaultTimedEventDuration:tt,nextDayThreshold:tt,scrollTime:tt,scrollTimeReset:Boolean,slotMinTime:tt,slotMaxTime:tt,dayPopoverFormat:It,slotDuration:tt,snapDuration:tt,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:It,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:tse,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:It,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:tt,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:It,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:tt,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:It,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},pl={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",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"},mF={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},hF={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},Hd={headerToolbar:Gp,footerToolbar:Gp,buttonText:Gp,buttonHints:Gp,buttonIcons:Gp,dateIncrement:Gp,plugins:JD,events:JD,eventSources:JD,resources:JD};ose={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};({hasOwnProperty:iC}=Object.prototype);FOe=/^on[A-Z]/;cse={};YO=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return ps(e)}markerToArray(e){return Fd(e)}};zOe("gregory",YO);qOe=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;GT=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!=="local"&&t!=="UTC";e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!!(!n||this.namedTimeZoneImpl),this.calendarSystem=BOe(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()):ps(jae(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=ps(e)),t===null||!cF(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=dse(e);if(t===null)return null;let{marker:n}=t,a=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):a=t.timeZoneOffset),{marker:n,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 n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return Ld(e)===Ld(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return Ld(e)===Ld(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n!==null?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),n!==null?{unit:"month",value:n}:(n=ise(e,t),n!==null?{unit:"week",value:n}:(n=Wf(e,t),n!==null?{unit:"day",value:n}:(n=gOe(e,t),WT(n)?{unit:"hour",value:n}:(n=yOe(e,t),WT(n)?{unit:"minute",value:n}:(n=vOe(e,t),WT(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let a;return n.years&&(a=this.diffWholeYears(e,t),a!==null)?a/mOe(n):n.months&&(a=this.diffWholeMonths(e,t),a!==null)?a/hOe(n):n.days&&(a=Wf(e,t),a!==null)?a/Vf(n):(t.valueOf()-e.valueOf())/Js(n)}startOf(e,t){return t==="year"?this.startOfYear(e):t==="month"?this.startOfMonth(e):t==="week"?this.startOfWeek(e):t==="day"?Gt(e):t==="hour"?bOe(e):t==="minute"?TOe(e):t==="second"?kOe(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)):wOe(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo!=null?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,a={}){return a.isEndExclusive&&(t=il(t,-1)),n.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 n=null;return t.omitTimeZoneOffset||(t.forcedTzo!=null?n=t.forcedTzo:n=this.offsetForMarker(e)),gC(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone==="local"?ps(jae(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):ps(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-zae(Fd(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Fd(e)):null}toDate(e,t){return this.timeZone==="local"?zae(Fd(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Fd(e))*1e3*60):new Date(e.valueOf()-(t||0))}},kc=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e=="object"&&e){t=Object.assign({},this.iconClasses);for(n in e)t[n]=this.applyIconOverridePrefix(e[n]);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 n;return t&&this.rtlIconClasses?n=this.rtlIconClasses[e]||this.iconClasses[e]:n=this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}};kc.prototype.classes={};kc.prototype.iconClasses={};kc.prototype.baseIconClass="";kc.prototype.iconOverridePrefix="";GO=class extends Qn{render(){return P("div",{})}componentDidMount(){this.setState({})}};oC=class{constructor(e,t,n,a){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=a,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),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)}},Ri=use({});ol=class extends Qn{shouldComponentUpdate(e,t){return!rC(this.props,e,this.propEquality)||!rC(this.state,t,this.stateEquality)}safeSetState(e){rC(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};ol.addPropsEquality=HOe;ol.addStateEquality=UOe;ol.contextType=Ri;ol.prototype.propEquality={};ol.prototype.stateEquality={};dt=class extends ol{};dt.contextType=Ri;KT=class extends dt{constructor(){super(...arguments),this.id=xc(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;(!t.customRenderingReplaces||!ZO(n,t))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&ei(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:a,defaultGenerator:s,renderProps:i}=e,o=gF(e,[],this.handleEl),l=!1,c,d=[],u;if(a!=null){let p=typeof a=="function"?a(i,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?xO(p):typeof p!="function")?c=p:u=p}}else l=!ZO(e.generatorName,n);return l&&s&&(c=s(i)),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:n,context:a}=this,{handleCustomRendering:s,customRenderingMetaMap:i}=a.options;if(s){let o=(t=this.currentGeneratorMeta)!==null&&t!==void 0?t:i==null?void 0:i[n.generatorName];o&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:o},n),{elClasses:(n.elClasses||[]).filter(VOe)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!dl(e,t)){t.forEach(ok);for(let a of e)n.appendChild(a);this.currentDomNodes=e}}};KT.addPropsEquality({elClasses:dl,elStyle:ba,elAttrs:LOe,renderProps:ba});yF=use(0),tn=class extends Qn{constructor(){super(...arguments),this.InnerContent=WOe.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(ei(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=YOe(e.classNameGenerator,e.renderProps);if(e.children){let n=gF(e,t,this.handleEl),a=e.children(this.InnerContent,e.renderProps,n);return e.elTag?P(e.elTag,n,a):a}else return P(KT,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}))}};tn.contextType=yF;Xs=class extends dt{render(){let{props:e,context:t}=this,{options:n}=t,a={view:t.viewApi};return P(tn,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...vF(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};Qp=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:a}=this.props,s=a.subtract(a.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,n)}buildNext(e,t,n){let{dateEnv:a}=this.props,s=a.add(a.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,n)}build(e,t,n=!0){let{props:a}=this,s,i,o,l,c,d;return s=this.buildValidRange(),s=this.trimHiddenDays(s),n&&(e=KOe(e,s)),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),l=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),l=this.trimHiddenDays(l),c=l,a.showNonCurrentDates||(c=qa(c,i.range)),c=this.adjustActiveRange(c),c=qa(c,s),d=TC(i.range,s),Ii(l,e)||(e=l.start),{currentDate:e,validRange:s,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:c,renderRange:l,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,isValid:d,dateIncrement:this.buildDateIncrement(i.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:n}=this,a=null,s=null,i=null,o;return n.duration?(a=n.duration,s=n.durationUnit,i=this.buildRangeFromDuration(e,t,a,s)):(o=this.props.dayCount)?(s="day",i=this.buildRangeFromDayCount(e,t,o)):(i=this.buildCustomVisibleRange(e))?s=n.dateEnv.greatestWholeUnit(i.start,i.end).unit:(a=this.getFallbackDuration(),s=YT(a).unit,i=this.buildRangeFromDuration(e,t,a,s)),{duration:a,unit:s,range:i}}getFallbackDuration(){return tt({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:a,slotMaxTime:s}=this.props,{start:i,end:o}=e;return n&&(Vf(a)<0&&(i=Gt(i),i=t.add(i,a)),Vf(s)>1&&(o=Gt(o),o=Lr(o,-1),o=t.add(o,s))),{start:i,end:o}}buildRangeFromDuration(e,t,n,a){let{dateEnv:s,dateAlignment:i}=this.props,o,l,c;if(!i){let{dateIncrement:u}=this.props;u&&Js(u){ZT(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{ZT(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,a=n||t.height==="auto"||t.contentHeight==="auto",s=!a&&t.height!=null?t.height:"",i=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return IF()||i.push("fc-liquid-hack"),e.children(i,s,a,n)}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)}},vo=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};cm={},ms=class extends Qn{constructor(e,t){super(e,t),this.handleRefresh=()=>{let n=this.computeTiming();n.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(n.state),this.clearTimeout(),this.setTimeout(n.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,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:a}=t.options;a==="auto"&&(a=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let s,i;return a?(s=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(s,tt(1,e.unit)).valueOf()-n.valueOf()):(s=n,i=1e3*60),i=Math.min(1e3*60*60*24,i),{state:{nowDate:s,todayRange:NFe(s)},waitMs:i}}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)}};ms.contextType=Ri;ek=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:n}=this;n.currentCalendarOptionsRefiners[e]?n.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:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),a;t=t||"day",a=n.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:n}=this.getCurrentData(),a=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),s,i;for(let o in t)a.push(o);for(s=0;s{this.dispatch({type:"REMOVE_EVENTS",eventStore:Tse(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:a}=t.eventStore;e=String(e);for(let s in n){let i=n[s];if(i.publicId===e){if(i.recurringDef)return new cr(t,i,null);for(let o in a){let l=a[o];if(l.defId===i.defId)return new cr(t,i,l)}}}return null}getEvents(){let e=this.getCurrentData();return ml(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let a in t)n.push(new Od(e,t[a]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let a in n)if(n[a].publicId===e)return new Od(t,n[a]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Od)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=wF(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Od(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=tt(e);t&&this.trigger("_scrollRequest",{time:t})}};LO=Pn(),tk=class{constructor(){this.getKeysForEventDefs=ke(this._getKeysForEventDefs),this.splitDateSelection=ke(this._splitDateSpan),this.splitEventStore=ke(this._splitEventStore),this.splitIndividualUi=ke(this._splitIndividualUi),this.splitEventDrag=ke(this._splitInteraction),this.splitEventResize=ke(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),a=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,n),i=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=Ni(t,(d,u)=>this.eventUiBuilders[u]||ke(RFe));for(let d in t){let u=t[d],p=i[d]||LO,m=this.eventUiBuilders[d];c[d]={businessHours:u.businessHours||e.businessHours,dateSelection:a[d]||null,eventStore:p,eventUiBases:m(e.eventUiBases[""],u.ui,s[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 n=this.getKeysForDateSpan(e);for(let a of n)t[a]=e}return t}_getKeysForEventDefs(e){return Ni(e.defs,t=>this.getKeysForEventDef(t))}_splitEventStore(e,t){let{defs:n,instances:a}=e,s={};for(let i in n)for(let o of t[i])s[o]||(s[o]=Pn()),s[o].defs[i]=n[i];for(let i in a){let o=a[i];for(let l of t[o.defId])s[l]&&(s[l].instances[i]=o)}return s}_splitIndividualUi(e,t){let n={};for(let a in e)if(a)for(let s of t[a])n[s]||(n[s]={}),n[s][a]=e[a];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),a=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,a),i=o=>{t[o]||(t[o]={affectedEvents:n[o]||LO,mutatedEvents:s[o]||LO,isEvent:e.isEvent})};for(let o in n)i(o);for(let o in s)i(o)}return t}};OFe=It({year:"numeric",month:"long",day:"numeric"}),FFe=It({week:"long"});$O=null;bo=class{constructor(e,t,n,a){this.els=t;let s=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(s.left),a&&this.buildElVerticals(s.top)}buildElHorizontals(e){let t=[],n=[];for(let a of this.els){let s=a.getBoundingClientRect();t.push(s.left-e),n.push(s.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let a of this.els){let s=a.getBoundingClientRect();t.push(s.top-e),n.push(s.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,a=t.length,s;for(s=0;s=t[s]&&e=t[s]&&e0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()0}canScrollRight(){return this.getScrollLeft()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 n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnts.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:a.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:a}=this;t.lateral===-1?(zO(a,t.level,t.levelCoord),zO(n,t.level,[e])):zO(n[t.level],t.lateral,e),this.stackCnts[ll(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:a,stackCnts:s}=this,i=t.length,o=0,l=-1,c=-1,d=null,u=0;for(let h=0;h=o+this.getEntryThickness(e))break;let g=n[h],y,k=sk(g,e.span.start,ak),T=k[0]+k[1];for(;(y=g[T])&&y.span.starto&&(o=w,d=y,l=h,c=T),w===o&&(u=Math.max(u,s[ll(y)]+1)),T+=1}}let p=0;if(d)for(p=l+1;p1?hl(this.context,i):{},p=e.toDate(i);e.namedTimeZoneImpl&&(p=il(p,36e5));let m=Object.assign(Object.assign(Object.assign({date:p,view:a},s.extraRenderProps),{text:d}),l);return P(tn,{elTag:"th",elClasses:c,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":l.isDisabled?void 0:qd(i)},s.extraDataAttrs),renderProps:m,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Mse,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},h=>P("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&P(h,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}},qFe=It({weekday:"long"}),pC=class extends dt{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:a,options:s}=this.context,i=Lr(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=t.format(i,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:i},o),{view:a}),e.extraRenderProps),{text:l});return P(tn,{elTag:"th",elClasses:[_se,...sg(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:Mse,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.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(i,qFe)}})))}},Sc=class extends dt{constructor(){super(...arguments),this.createDayHeaderFormatter=ke(HFe)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:a,renderIntro:s}=this.props,i=this.createDayHeaderFormatter(e.options.dayHeaderFormat,a,t.length);return P(ms,{unit:"day"},(o,l)=>P("tr",{role:"row"},s&&s("day"),t.map(c=>a?P(uC,{key:c.toISOString(),date:c,dateProfile:n,todayRange:l,colCnt:t.length,dayHeaderFormat:i}):P(pC,{key:c.getUTCDay(),dow:c.getUTCDay(),dayHeaderFormat:i}))))}};rm=class{constructor(e,t){let n=e.start,{end:a}=e,s=[],i=[],o=-1;for(;n=t.length?t[t.length-1]+1:t[n]}},nm=class{constructor(e,t){let{dates:n}=e,a,s,i;if(t){for(s=n[0].getUTCDay(),a=1;a{this.el=e,ei(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,a=t&&n,s=["fc-scroller"];return t&&(n?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),P("div",{ref:this.handleEl,className:s.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(tC.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let a=0;at)return!0;return!1}needsYScrolling(){if(tC.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let a=0;at)return!0;return!1}getXScrollbarWidth(){return tC.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return tC.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},hs=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(t,n)=>{let{depths:a,currentMap:s}=this,i=!1,o=!1;t!==null?(i=n in s,s[n]=t,a[n]=(a[n]||0)+1,o=!0):(a[n]-=1,a[n]||(delete s[n],delete this.callbackMap[n],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(n)),o&&this.masterCallback(t,String(n)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=n=>{this.handleValue(n,String(e))}),t}collect(e,t,n){return lse(this.currentMap,e,t,n)}getAll(){return bC(this.currentMap)}};jd=class extends dt{constructor(){super(...arguments),this.processCols=ke(e=>e,Lse),this.renderMicroColGroup=ke($se),this.scrollerRefs=new hs,this.scrollerElRefs=new hs(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:n}=this,a=e.sections||[],s=this.processCols(e.cols),i=this.renderMicroColGroup(s,t.shrinkWidth),o=Bse(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let l=a.length,c=0,d,u=[],p=[],m=[];for(;c{}},a);return P(a?"th":"td",{ref:n.elRef,role:"presentation"},P("div",{className:`fc-scroller-harness${d?" fc-scroller-harness-liquid":""}`},P(Zf,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:u,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:d,liquidIsAbsolute:!0},m)))}_handleScrollerEl(e,t){let n=GFe(this.props.sections,t);n&&ei(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return zse(this.props.cols)?Rse(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=xse(),{scrollerRefs:t,scrollerElRefs:n}=this,a=!1,s={},i={};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=n.currentMap[l];if(c){let d=c.parentNode;s[l]=Math.floor(d.getBoundingClientRect().width-(a?e.y:0)),i[l]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:a,scrollerClientWidths:s,scrollerClientHeights:i}}};jd.addStateEquality({scrollerClientWidths:ba,scrollerClientHeights:ba});Ec=class extends dt{constructor(){super(...arguments),this.buildPublicEvent=ke((e,t,n)=>new cr(e,t,n)),this.handleEl=e=>{this.el=e,ei(this.props.elRef,e),e&&Vae(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:a}=e,{eventRange:s}=a,{ui:i}=s,o={event:this.buildPublicEvent(t,s.def,s.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&wFe(a,t),isStartResizable:!e.disableResizing&&SFe(a,t),isEndResizable:!e.disableResizing&&EFe(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(tn,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...xFe(o),...a.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Vae(this.el,this.props.seg)}},zd=class extends dt{render(){let{props:e,context:t}=this,{options:n}=t,{seg:a}=e,{ui:s}=a.eventRange,i=n.eventTimeFormat||e.defaultTimeFormat,o=Ud(a,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return P(Ec,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:ag(a,t),defaultGenerator:ZFe,timeText:o}),(l,c)=>P(At,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"})))}};zd.addPropsEquality({seg:ba});Sk=r=>P(Ri.Consumer,null,e=>{let{options:t}=e,n={isAxis:r.isAxis,date:e.dateEnv.toDate(r.date),view:e.viewApi};return P(tn,{elRef:r.elRef,elTag:r.elTag||"div",elAttrs:r.elAttrs,elClasses:r.elClasses,elStyle:r.elStyle,renderProps:n,generatorName:"nowIndicatorContent",customGenerator:t.nowIndicatorContent,classNameGenerator:t.nowIndicatorClassNames,didMount:t.nowIndicatorDidMount,willUnmount:t.nowIndicatorWillUnmount},r.children)}),KFe=It({day:"numeric"}),Bd=class extends dt{constructor(){super(...arguments),this.refineRenderProps=eg(QFe)}render(){let{props:e,context:t}=this,{options:n}=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:n.monthStartFormat});return P(tn,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),a.isDisabled?{}:{"data-date":qd(e.date)}),elClasses:[...sg(a,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:a.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};sm=class extends dt{render(){let{props:e}=this,{seg:t}=e;return P(Ec,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:JFe,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};xk=r=>P(Ri.Consumer,null,e=>{let{dateEnv:t,options:n}=e,{date:a}=r,s=n.weekNumberFormat||r.defaultFormat,i=t.computeWeekNumber(a),o=t.format(a,s),l={num:i,text:o,date:a};return P(tn,{elRef:r.elRef,elTag:r.elTag,elAttrs:r.elAttrs,elClasses:r.elClasses,elStyle:r.elStyle,renderProps:l,generatorName:"weekNumberContent",customGenerator:n.weekNumberContent,defaultGenerator:XFe,classNameGenerator:n.weekNumberClassNames,didMount:n.weekNumberDidMount,willUnmount:n.weekNumberWillUnmount},r.children)});qO=10,QO=class extends dt{constructor(){super(...arguments),this.state={titleId:fs()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&ei(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=hC(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:n,state:a}=this,s=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return IO(P("div",Object.assign({},n.extraAttrs,{id:n.id,className:s.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},n.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")},n.children)),n.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:n}=this.props,{rootEl:a}=this,s=jFe(t);if(s){let i=a.getBoundingClientRect(),o=n?Cn(t,".fc-scrollgrid").getBoundingClientRect().top:s.top,l=e?s.right-i.width:s.left;o=Math.max(o,qO),l=Math.min(l,document.documentElement.clientWidth-qO-i.width),l=Math.max(l,qO);let c=a.offsetParent.getBoundingClientRect();om(a,{top:o-c.top,left:l-c.left})}}},JO=class extends yn{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:n}=this,{startDate:a,todayRange:s,dateProfile:i}=n,o=t.format(a,e.dayPopoverFormat);return P(Bd,{elRef:this.handleRootEl,date:a,dateProfile:i,todayRange:s},(l,c,d)=>P(QO,{elRef:d.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(d.className||[]),extraAttrs:d,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},lg(e)&&P(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children))}queryHit(e,t,n,a){let{rootEl:s,props:i}=this;return e>=0&&e=0&&t{this.linkEl=e,this.props.elRef&&ei(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:a}=n.options,s=Wae(t).start;function i(o){let{def:l,instance:c,range:d}=o.eventRange;return{event:new cr(n,l,c),start:n.dateEnv.toDate(d.start),end:n.dateEnv.toDate(d.end),isStart:o.isStart,isEnd:o.isEnd}}typeof a=="function"&&(a=a({date:s,allDay:!!t.allDayDate,allSegs:t.allSegs.map(i),hiddenSegs:t.hiddenSegs.map(i),jsEvent:e,view:n.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&n.calendarApi.zoomTo(s,a)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return P(Ri.Consumer,null,n=>{let{viewApi:a,options:s,calendarApi:i}=n,{moreLinkText:o}=s,{moreCnt:l}=e,c=Wae(e),d=typeof o=="function"?o.call(i,l):`+${l} ${o}`,u=Jf(s.moreLinkHint,[l],d),p={num:l,shortText:`+${l}`,text:d,view:a};return P(At,null,!!e.moreCnt&&P(tn,{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),Xae(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:p,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||eLe,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),t.isPopoverOpen&&P(JO,{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=Cn(this.linkEl,".fc-view-harness"))}}});function sLe(r){let e=r.length>0?r[0].code:"en",t=aLe.concat(r),n={en:Kse};for(let a of t)n[a.code]=a;return{map:n,defaultCode:e}}function Qse(r,e){return typeof r=="object"&&!Array.isArray(r)?Jse(r.code,[r.code],r):iLe(r,e)}function iLe(r,e){let t=[].concat(r||[]),n=oLe(t,e)||Kse;return Jse(r,t,n)}function oLe(r,e){for(let t=0;t0;a-=1){let s=n.slice(0,a).join("-");if(e[s])return e[s]}}return null}function Jse(r,e,t){let n=vC([Zse,t],["buttonText"]);delete n.code;let{week:a}=n;return delete n.week,{codeArg:r,codes:e,week:a,simpleNumberFormat:new Intl.NumberFormat(r),options:n}}function Ta(r){return{id:xc(),name:r.name,premiumReleaseDate:r.premiumReleaseDate?new Date(r.premiumReleaseDate):void 0,deps:r.deps||[],reducers:r.reducers||[],isLoadingFuncs:r.isLoadingFuncs||[],contextInit:[].concat(r.contextInit||[]),eventRefiners:r.eventRefiners||{},eventDefMemberAdders:r.eventDefMemberAdders||[],eventSourceRefiners:r.eventSourceRefiners||{},isDraggableTransformers:r.isDraggableTransformers||[],eventDragMutationMassagers:r.eventDragMutationMassagers||[],eventDefMutationAppliers:r.eventDefMutationAppliers||[],dateSelectionTransformers:r.dateSelectionTransformers||[],datePointTransforms:r.datePointTransforms||[],dateSpanTransforms:r.dateSpanTransforms||[],views:r.views||{},viewPropsTransformers:r.viewPropsTransformers||[],isPropsValid:r.isPropsValid||null,externalDefTransforms:r.externalDefTransforms||[],viewContainerAppends:r.viewContainerAppends||[],eventDropTransformers:r.eventDropTransformers||[],componentInteractions:r.componentInteractions||[],calendarInteractions:r.calendarInteractions||[],themeClasses:r.themeClasses||{},eventSourceDefs:r.eventSourceDefs||[],cmdFormatter:r.cmdFormatter,recurringTypes:r.recurringTypes||[],namedTimeZonedImpl:r.namedTimeZonedImpl,initialView:r.initialView||"",elementDraggingImpl:r.elementDraggingImpl,optionChangeHandlers:r.optionChangeHandlers||{},scrollGridImpl:r.scrollGridImpl||null,listenerRefiners:r.listenerRefiners||{},optionRefiners:r.optionRefiners||{},propSetHandlers:r.propSetHandlers||{}}}function lLe(r,e){let t={},n={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(s){for(let i of s){let o=i.name,l=t[o];l===void 0?(t[o]=i.id,a(i.deps),n=dLe(n,i)):l!==i.id&&console.warn(`Duplicate plugin '${o}'`)}}return r&&a(r),a(e),n}function cLe(){let r=[],e=[],t;return(n,a)=>((!t||!dl(n,r)||!dl(a,e))&&(t=lLe(n,a)),r=n,e=a,t)}function dLe(r,e){return{premiumReleaseDate:uLe(r.premiumReleaseDate,e.premiumReleaseDate),reducers:r.reducers.concat(e.reducers),isLoadingFuncs:r.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:r.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},r.eventRefiners),e.eventRefiners),eventDefMemberAdders:r.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},r.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:r.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:r.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:r.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:r.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:r.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:r.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},r.views),e.views),viewPropsTransformers:r.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||r.isPropsValid,externalDefTransforms:r.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:r.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:r.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:r.calendarInteractions.concat(e.calendarInteractions),componentInteractions:r.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},r.themeClasses),e.themeClasses),eventSourceDefs:r.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||r.cmdFormatter,recurringTypes:r.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||r.namedTimeZonedImpl,initialView:r.initialView||e.initialView,elementDraggingImpl:r.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},r.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||r.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},r.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},r.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},r.propSetHandlers),e.propSetHandlers)}}function uLe(r,e){return r===void 0?e:e===void 0?r:new Date(Math.max(r.valueOf(),e.valueOf()))}function pLe(r,e){let t={},n;for(n in r)HF(n,t,r,e);for(n in e)HF(n,t,r,e);return t}function HF(r,e,t,n){if(e[r])return e[r];let a=mLe(r,e,t,n);return a&&(e[r]=a),a}function mLe(r,e,t,n){let a=t[r],s=n[r],i=d=>a&&a[d]!==null?a[d]:s&&s[d]!==null?s[d]:null,o=i("component"),l=i("superType"),c=null;if(l){if(l===r)throw new Error("Can't have a custom view type that references itself");c=HF(l,e,t,n)}return!o&&c&&(o=c.component),o?{type:r,component:o,defaults:Object.assign(Object.assign({},c?c.defaults:{}),a?a.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),s?s.rawOptions:{})}:null}function Hse(r){return Ni(r,hLe)}function hLe(r){let e=typeof r=="function"?{component:r}:r,{component:t}=e;return e.content?t=Use(e):t&&!(t.prototype instanceof dt)&&(t=Use(Object.assign(Object.assign({},e),{content:t}))),{superType:e.type,component:t,rawOptions:e}}function Use(r){return e=>P(Ri.Consumer,null,t=>P(tn,{elTag:"div",elClasses:vF(t.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:t.options.nextDayThreshold}),generatorName:void 0,customGenerator:r.content,classNameGenerator:r.classNames,didMount:r.didMount,willUnmount:r.willUnmount}))}function fLe(r,e,t,n){let a=Hse(r),s=Hse(e.views),i=pLe(a,s);return Ni(i,o=>gLe(o,s,e,t,n))}function gLe(r,e,t,n,a){let s=r.overrides.duration||r.defaults.duration||n.duration||t.duration,i=null,o="",l="",c={};if(s&&(i=yLe(s),i)){let p=YT(i);o=p.unit,p.value===1&&(l=o,c=e[o]?e[o].rawOptions:{})}let d=p=>{let m=p.buttonText||{},h=r.defaults.buttonTextKey;return h!=null&&m[h]!=null?m[h]:m[r.type]!=null?m[r.type]:m[l]!=null?m[l]:null},u=p=>{let m=p.buttonHints||{},h=r.defaults.buttonTextKey;return h!=null&&m[h]!=null?m[h]:m[r.type]!=null?m[r.type]:m[l]!=null?m[l]:null};return{type:r.type,component:r.component,duration:i,durationUnit:o,singleUnit:l,optionDefaults:r.defaults,optionOverrides:Object.assign(Object.assign({},c),r.overrides),buttonTextOverride:d(n)||d(t)||r.overrides.buttonText,buttonTextDefault:d(a)||r.defaults.buttonText||d(pl)||r.type,buttonTitleOverride:u(n)||u(t)||r.overrides.buttonHint,buttonTitleDefault:u(a)||r.defaults.buttonHint||u(pl)}}function yLe(r){let e=JSON.stringify(r),t=Vse[e];return t===void 0&&(t=tt(r),Vse[e]=t),t}function vLe(r,e){switch(e.type){case"CHANGE_VIEW_TYPE":r=e.viewType}return r}function bLe(r,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return r}}function TLe(r,e,t){let n=r.initialDate;return n!=null?e.createMarker(n):t.getDateMarker()}function kLe(r,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},r),{[e.optionName]:e.rawOptionValue});default:return r}}function wLe(r,e,t,n){let a;switch(e.type){case"CHANGE_VIEW_TYPE":return n.build(e.dateMarker||t);case"CHANGE_DATE":return n.build(e.dateMarker);case"PREV":if(a=n.buildPrev(r,t),a.isValid)return a;break;case"NEXT":if(a=n.buildNext(r,t),a.isValid)return a;break}return r}function SLe(r,e,t){let n=e?e.activeRange:null;return eie({},MLe(r,t),n,t)}function ELe(r,e,t,n){let a=t?t.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return eie(r,e.sources,a,n);case"REMOVE_EVENT_SOURCE":return DLe(r,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return t?tie(r,a,n):r;case"FETCH_EVENT_SOURCES":return JF(r,e.sourceIds?fF(e.sourceIds):rie(r,n),a,e.isRefetch||!1,n);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return _Le(r,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return r}}function xLe(r,e,t){let n=e?e.activeRange:null;return JF(r,rie(r,t),n,!0,t)}function Xse(r){for(let e in r)if(r[e].isFetching)return!0;return!1}function eie(r,e,t,n){let a={};for(let s of e)a[s.sourceId]=s;return t&&(a=tie(a,t,n)),Object.assign(Object.assign({},r),a)}function DLe(r,e){return Tc(r,t=>t.sourceId!==e)}function tie(r,e,t){return JF(r,Tc(r,n=>CLe(n,e,t)),e,!1,t)}function CLe(r,e,t){return nie(r,t)?!t.options.lazyFetching||!r.fetchRange||r.isFetching||e.startr.fetchRange.end:!r.latestFetchId}function JF(r,e,t,n,a){let s={};for(let i in r){let o=r[i];e[i]?s[i]=PLe(o,t,n,a):s[i]=o}return s}function PLe(r,e,t,n){let{options:a,calendarApi:s}=n,i=n.pluginHooks.eventSourceDefs[r.sourceDefId],o=xc();return i.fetch({eventSource:r,range:e,isRefetch:t,context:n},l=>{let{rawEvents:c}=l;a.eventSourceSuccess&&(c=a.eventSourceSuccess.call(s,c,l.response)||c),r.success&&(c=r.success.call(s,c,l.response)||c),n.dispatch({type:"RECEIVE_EVENTS",sourceId:r.sourceId,fetchId:o,fetchRange:e,rawEvents:c})},l=>{let c=!1;a.eventSourceFailure&&(a.eventSourceFailure.call(s,l),c=!0),r.failure&&(r.failure(l),c=!0),c||console.warn(l.message,l),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:r.sourceId,fetchId:o,fetchRange:e,error:l})}),Object.assign(Object.assign({},r),{isFetching:!0,latestFetchId:o})}function _Le(r,e,t,n){let a=r[e];return a&&t===a.latestFetchId?Object.assign(Object.assign({},r),{[e]:Object.assign(Object.assign({},a),{isFetching:!1,fetchRange:n})}):r}function rie(r,e){return Tc(r,t=>nie(t,e))}function MLe(r,e){let t=SF(e),n=[].concat(r.eventSources||[]),a=[];r.initialEvents&&n.unshift(r.initialEvents),r.events&&n.unshift(r.events);for(let s of n){let i=wF(s,e,t);i&&a.push(i)}return a}function nie(r,e){return!e.pluginHooks.eventSourceDefs[r.sourceDefId].ignoreRange}function ALe(r,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return r}}function ILe(r,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return r}}function NLe(r,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 r}}function RLe(r,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 r}}function OLe(r,e,t,n,a){let s=r.headerToolbar?Wse(r.headerToolbar,r,e,t,n,a):null,i=r.footerToolbar?Wse(r.footerToolbar,r,e,t,n,a):null;return{header:s,footer:i}}function Wse(r,e,t,n,a,s){let i={},o=[],l=!1;for(let c in r){let d=r[c],u=FLe(d,e,t,n,a,s);i[c]=u.widgets,o.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:i,viewsWithButtons:o,hasTitle:l}}function FLe(r,e,t,n,a,s){let i=e.direction==="rtl",o=e.customButtons||{},l=t.buttonText||{},c=e.buttonText||{},d=t.buttonHints||{},u=e.buttonHints||{},p=r?r.split(" "):[],m=[],h=!1;return{widgets:p.map(g=>g.split(",").map(y=>{if(y==="title")return h=!0,{buttonName:y};let k,T,w,S,x,C;if(k=o[y])w=M=>{k.click&&k.click.call(M.target,M,M.target)},(S=n.getCustomButtonIconClass(k))||(S=n.getIconClass(y,i))||(x=k.text),C=k.hint||k.text;else if(T=a[y]){m.push(y),w=()=>{s.changeView(y)},(x=T.buttonTextOverride)||(S=n.getIconClass(y,i))||(x=T.buttonTextDefault);let M=T.buttonTextOverride||T.buttonTextDefault;C=Jf(T.buttonTitleOverride||T.buttonTitleDefault||e.viewHint,[M,y],M)}else if(s[y])if(w=()=>{s[y]()},(x=l[y])||(S=n.getIconClass(y,i))||(x=c[y]),y==="prevYear"||y==="nextYear"){let M=y==="prevYear"?"prev":"next";C=Jf(d[M]||u[M],[c.year||"year","year"],c[y])}else C=M=>Jf(d[y]||u[y],[c[M]||M,M],c[y]);return{buttonName:y,buttonClick:w,buttonIcon:S,buttonText:x,buttonHint:C}})),viewsWithButtons:m,hasTitle:h}}function ULe(r,e,t){let{dateEnv:n,options:a}=t,s,i,o,l,c={};return s=r.startParam,s==null&&(s=a.startParam),i=r.endParam,i==null&&(i=a.endParam),o=r.timeZoneParam,o==null&&(o=a.timeZoneParam),typeof r.extraParams=="function"?l=r.extraParams():l=r.extraParams||{},Object.assign(c,l),c[s]=n.formatIso(e.start),c[i]=n.formatIso(e.end),n.timeZone!=="local"&&(c[o]=n.timeZone),c}function GLe(r,e,t,n,a){let s=r?fF(r):null,i=Gt(a.start),o=a.end,l=[];for(e&&(e.milliseconds<0?o=Lr(o,1):e.milliseconds>=1e3*60*60*24&&(i=Lr(i,-1)));i1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}function t1e(r,e,t,n,a,s,i,o){let l=Qse(e||i.defaultCode,i.map);return new GT({calendarSystem:"gregory",timeZone:r,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:t,firstDay:n,weekText:a,cmdFormatter:s.cmdFormatter,defaultSeparator:o})}function r1e(r,e){let t=e.themeClasses[r.themeSystem]||fl;return new t(r)}function n1e(r){let e=r.dateProfileGeneratorClass||Qp;return new e(r)}function a1e(r,e,t){return new UF(r,e,t)}function s1e(r){return Ni(r,e=>e.ui)}function i1e(r,e,t){let n={"":e};for(let a in r){let s=r[a];s.sourceId&&t[s.sourceId]&&(n[a]=t[s.sourceId])}return n}function o1e(r){let{options:e}=r;return{eventUiSingleBase:ng({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},r),selectionConfig:ng({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},r)}}function qF(r,e){for(let t of e.pluginHooks.isLoadingFuncs)if(t(r))return!0;return!1}function l1e(r){return xF(r.options.businessHours,r)}function Gse(r,e){for(let t in r)console.warn(`Unknown option '${t}'`+(e?` for view '${e}'`:""))}function c1e(r,e,t,n,a,s){let i=t.build(a,void 0,!1),o=t.buildPrev(e,n,!1),l=t.buildNext(e,n,!1);return{title:s,activeButton:r.type,navUnit:r.singleUnit,isTodayEnabled:i.isValid&&!Ii(e.currentRange,a),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}function d1e(r){return r.map(e=>new e)}var aLe,Zse,Kse,fl,Vse,UF,LLe,$Le,jLe,zLe,BLe,qLe,HLe,VLe,WLe,YLe,ZLe,JLe,VF,PC,WF,YF,_C,GF,ZF,KF,QF,MC,um=b(()=>{BF();bc();VT();aLe=[],Zse={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"},Kse=Object.assign(Object.assign({},Zse),{buttonHints:{prev:"Previous $0",next:"Next $0",today(r,e){return e==="day"?"Today":`This ${r}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(r){return`Show ${r} more event${r===1?"":"s"}`}});fl=class extends kc{};fl.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};fl.prototype.baseIconClass="fc-icon";fl.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"};fl.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};fl.prototype.iconOverrideOption="buttonIcons";fl.prototype.iconOverrideCustomButtonOption="icon";fl.prototype.iconOverridePrefix="fc-icon-";Vse={};UF=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}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]}},LLe={ignoreRange:!0,parseMeta(r){return Array.isArray(r.events)?r.events:null},fetch(r,e){e({rawEvents:r.eventSource.meta})}},$Le=Ta({name:"array-event-source",eventSourceDefs:[LLe]}),jLe={parseMeta(r){return typeof r.events=="function"?r.events:null},fetch(r,e,t){let{dateEnv:n}=r.context,a=r.eventSource.meta;MF(a.bind(null,_F(r.range,n)),s=>e({rawEvents:s}),t)}},zLe=Ta({name:"func-event-source",eventSourceDefs:[jLe]}),BLe={method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},qLe={parseMeta(r){return r.url&&(r.format==="json"||!r.format)?{url:r.url,format:"json",method:(r.method||"GET").toUpperCase(),extraParams:r.extraParams,startParam:r.startParam,endParam:r.endParam,timeZoneParam:r.timeZoneParam}:null},fetch(r,e,t){let{meta:n}=r.eventSource,a=ULe(n,r.range,r.context);AF(n.method,n.url,a).then(([s,i])=>{e({rawEvents:s,response:i})},t)}},HLe=Ta({name:"json-event-source",eventSourceRefiners:BLe,eventSourceDefs:[qLe]});VLe={daysOfWeek:$,startTime:tt,endTime:tt,duration:tt,startRecur:$,endRecur:$},WLe={parse(r,e){if(r.daysOfWeek||r.startTime||r.endTime||r.startRecur||r.endRecur){let t={daysOfWeek:r.daysOfWeek||null,startTime:r.startTime||null,endTime:r.endTime||null,startRecur:r.startRecur?e.createMarker(r.startRecur):null,endRecur:r.endRecur?e.createMarker(r.endRecur):null,dateEnv:e},n;return r.duration&&(n=r.duration),!n&&r.startTime&&r.endTime&&(n=ase(r.endTime,r.startTime)),{allDayGuess:!r.startTime&&!r.endTime,duration:n,typeData:t}}return null},expand(r,e,t){let n=qa(e,{start:r.startRecur,end:r.endRecur});return n?GLe(r.daysOfWeek,r.startTime,r.dateEnv,t,n):[]}},YLe=Ta({name:"simple-recurring-event",recurringTypes:[WLe],eventRefiners:VLe});ZLe=Ta({name:"change-handler",optionChangeHandlers:{events(r,e){Yse([r],e)},eventSources:Yse}});JLe=[$Le,zLe,HLe,YLe,ZLe,Ta({name:"misc",isLoadingFuncs:[r=>Xse(r.eventSources)],propSetHandlers:{dateProfile:KLe,eventStore:QLe}})],VF=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Kp(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=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};PC=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t=="function"?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))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)}},WF=class{constructor(e){this.computeCurrentViewData=ke(this._computeCurrentViewData),this.organizeRawLocales=ke(sLe),this.buildLocale=ke(Qse),this.buildPluginHooks=cLe(),this.buildDateEnv=ke(t1e),this.buildTheme=ke(r1e),this.parseToolbars=ke(OLe),this.buildViewSpecs=ke(fLe),this.buildDateProfileGenerator=eg(n1e),this.buildViewApi=ke(a1e),this.buildViewUiProps=eg(o1e),this.buildEventUiBySource=ke(s1e,ba),this.buildEventUiBases=ke(i1e),this.parseContextBusinessHours=eg(l1e),this.buildTitle=ke(XLe),this.nowManager=new PC,this.emitter=new wc,this.actionRunner=new VF(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 PC;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),a=n.calendarOptions.initialView||n.pluginHooks.initialView,s=this.computeCurrentViewData(a,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let i={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=TLe(n.calendarOptions,n.dateEnv,this.nowManager),l=s.dateProfileGenerator.build(o);Ii(l.activeRange,o)||(o=l.currentRange.start);for(let p of n.pluginHooks.contextInit)p(i);let c=SLe(n.calendarOptions,l,i),d={dynamicOptionOverrides:t,currentViewType:a,currentDate:o,dateProfile:l,businessHours:this.parseContextBusinessHours(i),eventSources:c,eventUiBases:{},eventStore:Pn(),renderableEventStore:Pn(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(i).selectionConfig},u=Object.assign(Object.assign({},i),d);for(let p of n.pluginHooks.reducers)Object.assign(d,p(null,null,u));qF(d,i)&&this.emitter.trigger("loading",!0),this.state=d,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:a}=this,s=kLe(n.dynamicOptionOverrides,e),i=this.computeOptionsData(t.optionOverrides,s,t.calendarApi),o=vLe(n.currentViewType,e),l=this.computeCurrentViewData(o,i,t.optionOverrides,s);t.calendarApi.currentDataManager=this,a.setThisContext(t.calendarApi),a.setOptions(l.options);let c={nowManager:this.nowManager,dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:a,getCurrentData:this.getCurrentData},{currentDate:d,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(u=l.dateProfileGenerator.build(d)),d=bLe(d,e),u=wLe(u,e,d,l.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!Ii(u.currentRange,d))&&(d=u.currentRange.start);let p=ELe(n.eventSources,e,u,c),m=yse(n.eventStore,e,p,u,c),f=Xse(p)&&!l.options.progressiveEventRendering&&n.renderableEventStore||m,{eventUiSingleBase:g,selectionConfig:y}=this.buildViewUiProps(c),k=this.buildEventUiBySource(p),T=this.buildEventUiBases(f.defs,g,k),w={dynamicOptionOverrides:s,currentViewType:o,currentDate:d,dateProfile:u,eventSources:p,eventStore:m,renderableEventStore:f,selectionConfig:y,eventUiBases:T,businessHours:this.parseContextBusinessHours(c),dateSelection:ALe(n.dateSelection,e),eventSelection:ILe(n.eventSelection,e),eventDrag:NLe(n.eventDrag,e),eventResize:RLe(n.eventResize,e)},S=Object.assign(Object.assign({},c),w);for(let M of i.pluginHooks.reducers)Object.assign(w,M(n,e,S));let x=qF(n,c),C=qF(w,c);!x&&C?a.trigger("loading",!0):x&&!C&&a.trigger("loading",!1),this.state=w,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,a=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(t.currentViewType,a,e.optionOverrides,t.dynamicOptionOverrides),i=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,s.options,a.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},a),s),t),o=a.pluginHooks.optionChangeHandlers,l=n&&n.calendarOptions,c=a.calendarOptions;if(l&&l!==c){l.timeZone!==c.timeZone&&(t.eventSources=i.eventSources=xLe(i.eventSources,t.dateProfile,i),t.eventStore=i.eventStore=EF(i.eventStore,n.dateEnv,i.dateEnv),t.renderableEventStore=i.renderableEventStore=EF(i.renderableEventStore,n.dateEnv,i.dateEnv));for(let d in o)(this.optionsForHandling.indexOf(d)!==-1||l[d]!==c[d])&&o[d](c[d],i)}this.optionsForHandling=[],e.onData&&e.onData(i)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:a,pluginHooks:s,localeDefaults:i,availableLocaleData:o,extra:l}=this.processRawCalendarOptions(e,t);Gse(l);let c=this.buildDateEnv(a.timeZone,a.locale,a.weekNumberCalculation,a.firstDay,a.weekText,s,o,a.defaultRangeSeparator),d=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,i),u=this.buildTheme(a,s),p=this.parseToolbars(a,this.stableOptionOverrides,u,d,n);return this.stableCalendarOptionsData={calendarOptions:a,pluginHooks:s,dateEnv:c,viewSpecs:d,theme:u,toolbarConfig:p,localeDefaults:i,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:a}=yC([pl,e,t]),s=this.organizeRawLocales(n),i=s.map,o=this.buildLocale(a||s.defaultCode,i).options,l=this.buildPluginHooks(e.plugins||[],JLe),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pF),mF),hF),l.listenerRefiners),l.optionRefiners),d={},u=yC([pl,o,e,t]),p={},m=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,f=!1;for(let g in u)this.optionsForRefining.indexOf(g)===-1&&(u[g]===m[g]||Hd[g]&&g in m&&Hd[g](m[g],u[g]))?p[g]=h[g]:c[g]?(p[g]=c[g](u[g]),f=!0):d[g]=m[g];return f&&(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:s,localeDefaults:o,extra:d}}_computeCurrentViewData(e,t,n,a){let s=t.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:i,extra:o}=this.processRawViewOptions(s,t.pluginHooks,t.localeDefaults,n,a);Gse(o),this.nowManager.handleInput(t.dateEnv,i.now);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,showNonCurrentDates:i.showNonCurrentDates,dayCount:i.dayCount,dateAlignment:i.dateAlignment,dateIncrement:i.dateIncrement,hiddenDays:i.hiddenDays,weekends:i.weekends,validRangeInput:i.validRange,visibleRangeInput:i.visibleRange,fixedWeekCount:i.fixedWeekCount}),c=this.buildViewApi(e,this.getCurrentData,t.dateEnv);return{viewSpec:s,options:i,dateProfileGenerator:l,viewApi:c}}processRawViewOptions(e,t,n,a,s){let i=yC([pl,e.optionDefaults,n,a,e.optionOverrides,s]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pF),mF),hF),ose),t.listenerRefiners),t.optionRefiners),l={},c=this.currentViewOptionsInput,d=this.currentViewOptionsRefined,u=!1,p={};for(let m in i)i[m]===c[m]||Hd[m]&&Hd[m](i[m],c[m])?l[m]=d[m]:(i[m]===this.currentCalendarOptionsInput[m]||Hd[m]&&Hd[m](i[m],this.currentCalendarOptionsInput[m])?m in this.currentCalendarOptionsRefined&&(l[m]=this.currentCalendarOptionsRefined[m]):o[m]?l[m]=o[m](i[m]):p[m]=i[m],u=!0);return u&&(this.currentViewOptionsInput=i,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}}};YF=class extends dt{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:n}=this.context,a=[],s=!0;for(let i of e){let{buttonName:o,buttonClick:l,buttonText:c,buttonIcon:d,buttonHint:u}=i;if(o==="title")s=!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",h=[`fc-${o}-button`,n.getClass("button")];p&&h.push(n.getClass("buttonActive")),a.push(P("button",{type:"button",title:typeof u=="function"?u(t.navUnit):u,disabled:m,"aria-pressed":p,className:h.join(" "),onClick:l},c||(d?P("span",{className:d,role:"img"}):"")))}}if(a.length>1){let i=s&&n.getClass("buttonGroup")||"";return P("div",{className:i},...a)}return a[0]}},_C=class extends dt{render(){let{model:e,extraClassName:t}=this.props,n=!1,a,s,i=e.sectionWidgets,o=i.center;return i.left?(n=!0,a=i.left):a=i.start,i.right?(n=!0,s=i.right):s=i.end,P("div",{className:[t||"","fc-toolbar",n?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",a||[]),this.renderSection("center",o||[]),this.renderSection("end",s||[]))}renderSection(e,t){let{props:n}=this;return P(YF,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},GF=class extends dt{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,ei(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,a=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",i="";return n?t.availableWidth!==null?s=t.availableWidth/n:i=`${1/n*100}%`:s=e.height||"",P("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:a.join(" "),style:{height:s,paddingBottom:i}},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})}},ZF=class extends vo{constructor(e){super(e),this.handleSegClick=(t,n)=>{let{component:a}=this,{context:s}=a,i=Dc(n);if(i&&a.isValidSegDownEl(t.target)){let o=Cn(t.target,".fc-event-forced-url"),l=o?o.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:n,event:new cr(a.context,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:s.viewApi}),l&&!t.defaultPrevented&&(window.location.href=l)}},this.destroy=eF(e.el,"click",".fc-event",this.handleSegClick)}},KF=class extends vo{constructor(e){super(e),this.handleEventElRemove=t=>{t===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(t,n)=>{Dc(n)&&(this.currentSegEl=n,this.triggerEvent("eventMouseEnter",t,n))},this.handleSegLeave=(t,n)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",t,n))},this.removeHoverListeners=Jae(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:a}=this,{context:s}=a,i=Dc(n);(!t||a.isValidSegDownEl(t.target))&&s.emitter.trigger(e,{el:n,event:new cr(s,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:s.viewApi})}},QF=class extends ol{constructor(){super(...arguments),this.buildViewContext=ke(pse),this.buildViewPropTransformers=ke(d1e),this.buildToolbarProps=ke(c1e),this.headerRef=Wr(),this.footerRef=Wr(),this.interactionsStore={},this.state={viewLabelId:fs()},this.registerInteractiveComponent=(e,t)=>{let n=Sse(e,t),i=[ZF,KF].concat(this.props.pluginHooks.componentInteractions).map(o=>new o(n));this.interactionsStore[e.uid]=i,cm[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let n of t)n.destroy();delete this.interactionsStore[e.uid]}delete cm[e.uid]},this.resizeRunner=new Kp(()=>{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:n}=e,a=!1,s="",i;e.isHeightAuto||e.forPrint?s="":n.height!=null?a=!0:n.contentHeight!=null?s=n.contentHeight:i=Math.max(n.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(Ri.Provider,{value:o},P(ms,{unit:"day"},c=>{let d=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,c,e.viewTitle);return P(At,null,t.header&&P(_C,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:t.header,titleId:l},d)),P(GF,{liquid:a,height:s,aspectRatio:i,labeledById:l},this.renderView(e),this.buildAppendContent()),t.footer&&P(_C,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(n=>new n(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let a in n)t[a]!==e[a]&&n[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(n=>n(e));return P(At,{},...t)}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=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},s=this.buildViewPropTransformers(t.viewPropsTransformers);for(let o of s)Object.assign(a,o.transform(a,e));let i=n.component;return P(i,Object.assign({},a))}};MC=class extends ek{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=n=>{switch(n.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=n=>{this.currentData=n,this.renderRunner.request(n.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:n}=this;ZT(()=>{Rd(P(XT,{options:n.calendarOptions,theme:n.theme,emitter:n.emitter},(a,s,i,o)=>(this.setClassNames(a),this.setHeight(s),P(yF.Provider,{value:this.customContentRenderId},P(QF,Object.assign({isHeightAuto:i,forPrint:o},n))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Rd(null,this.el),this.setClassNames([]),this.setHeight(""))},Gae(e),this.el=e,this.renderRunner=new Kp(this.handleRenderRequest),new WF({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(){ZT(()=>{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(!dl(e,this.currentClassNames)){let{classList:t}=this.el;for(let n of this.currentClassNames)t.remove(n);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){XO(this.el,"height",e)}}});var pm=b(()=>{BF();bc();VT()});function u1e(r){return r.button===0&&!r.ctrlKey}function p1e(){XF+=1,setTimeout(()=>{XF-=1},ig.touchMouseIgnoreWait)}function m1e(){AC+=1,AC===1&&window.addEventListener("touchmove",sie,{passive:!1})}function h1e(){AC-=1,AC||window.removeEventListener("touchmove",sie,{passive:!1})}function sie(r){eL&&r.preventDefault()}function f1e(r){let e=r.tagName;return e==="HTML"||e==="BODY"}function FC(r,e){return!r&&!e?!0:!!r!=!!e?!1:PF(r.dateSpan,e.dateSpan)}function dL(r,e){let t={};for(let n of e.pluginHooks.datePointTransforms)Object.assign(t,n(r,e));return Object.assign(t,g1e(r,e.dateEnv)),t}function g1e(r,e){return{date:e.toDate(r.range.start),dateStr:e.formatIso(r.range.start,{omitTime:r.allDay}),allDay:r.allDay}}function y1e(r){let{options:e}=r.context,t=e.selectLongPressDelay;return t==null&&(t=e.longPressDelay),t}function v1e(r,e,t){let n=r.dateSpan,a=e.dateSpan,s=[n.range.start,n.range.end,a.range.start,a.range.end];s.sort(iF);let i={};for(let o of t){let l=o(r,e);if(l===!1)return null;l&&Object.assign(i,l)}return i.range={start:s[0],end:s[3]},i.allDay=n.allDay,i}function b1e(r,e,t,n){let a=r.dateSpan,s=e.dateSpan,i=a.range.start,o=s.range.start,l={};a.allDay!==s.allDay&&(l.allDay=s.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,s.allDay?i=Gt(t):i=t);let c=$d(i,o,r.context.dateEnv,r.componentId===e.componentId?r.largeUnit:null);c.milliseconds&&(l.allDay=!1);let d={datesDelta:c,standardProps:l};for(let u of n)u(d,r,e);return d}function T1e(r){let{options:e}=r.context,t=e.eventLongPressDelay;return t==null&&(t=e.longPressDelay),t}function k1e(r,e,t,n){let a=r.context.dateEnv,s=r.dateSpan.range.start,i=e.dateSpan.range.start,o=$d(s,i,a,r.largeUnit);if(t){if(a.add(n.start,o)n.start)return{endDelta:o};return null}function E1e(r,e,t){let n=Object.assign({},e.leftoverProps);for(let d of t.pluginHooks.externalDefTransforms)Object.assign(n,d(r,e));let{refined:a,extra:s}=pk(n,t),i=Yf(a,s,e.sourceId,r.allDay,t.options.forceEventDuration||!!e.duration,t),o=r.range.start;r.allDay&&e.startTime&&(o=t.dateEnv.add(o,e.startTime));let l=e.duration?t.dateEnv.add(o,e.duration):JT(r.allDay,o,t),c=rg(i.defId,{start:o,end:l});return{def:i,instance:c}}function x1e(r){let e=D1e(r,"event"),t=e?JSON.parse(e):{create:!1};return Tk(t)}function D1e(r,e){let t=ig.dataAttrPrefix,n=(t?t+"-":"")+e;return r.getAttribute("data-"+n)||""}var XF,AC,eL,IC,tL,NC,RC,rL,aie,nL,Vd,aL,mm,sL,iL,Dk,oL,lL,w1e,S1e,cL,OC,iie,uL=b(()=>{um();pm();ig.touchMouseIgnoreWait=500;XF=0,AC=0,eL=!1,IC=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()&&u1e(t)&&this.tryStart(t)){let n=this.createEventFromMouse(t,!0);this.emitter.trigger("pointerdown",n),this.initScrollWatch(n),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=t=>{let n=this.createEventFromMouse(t);this.recordCoords(n),this.emitter.trigger("pointermove",n)},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 n=this.createEventFromTouch(t,!0);this.emitter.trigger("pointerdown",n),this.initScrollWatch(n);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 n=this.createEventFromTouch(t);this.recordCoords(n),this.emitter.trigger("pointermove",n)},this.handleTouchEnd=t=>{if(this.isDragging){let n=t.target;n.removeEventListener("touchmove",this.handleTouchMove),n.removeEventListener("touchend",this.handleTouchEnd),n.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(t)),this.cleanup(),this.isTouchDragging=!1,p1e()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=t=>{if(!this.shouldIgnoreMove){let n=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:n,pageY:a,deltaX:n-this.origPageX,deltaY:a-this.origPageY})}},this.containerEl=e,this.emitter=new wc,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),m1e()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),h1e()}tryStart(e){let t=this.querySubjectEl(e),n=e.target;return t&&(!this.handleSelector||Cn(n,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){eL=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?Cn(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return XF||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(eL=!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 n=0,a=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,a=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:a}}createEventFromTouch(e,t){let n=e.touches,a,s,i=0,o=0;return n&&n.length?(a=n[0].pageX,s=n[0].pageY):(a=e.pageX,s=e.pageY),t?(this.origPageX=a,this.origPageY=s):(i=a-this.origPageX,o=s-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:a,pageY:s,deltaX:i,deltaY:o}}};tL=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,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=n-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 n=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(n,this.revertDuration):setTimeout(n,0)}doRevertAnimation(e,t){let n=this.mirrorEl,a=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",om(n,{left:a.left,top:a.top}),tF(n,()=>{n.style.transition="",e()})}cleanup(){this.mirrorEl&&(ok(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&om(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"),om(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}},NC=class extends em{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(){}},RC=class extends NC{constructor(e,t){super(new rk(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return LF(this.scrollController.el)}},rL=class extends NC{constructor(e){super(new nk,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()}},aie=typeof performance=="function"?performance.now:Date.now,nL=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=aie();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),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 n=e-window.scrollX,a=t-window.scrollY,s=this.pointerScreenY===null?0:a-this.pointerScreenY,i=this.pointerScreenX===null?0:n-this.pointerScreenX;s<0?this.everMovedUp=!0:s>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=a,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(aie()))}}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:n}=e,{edgeThreshold:a}=this,s=a-e.distance,i=s*s/(a*a)*this.maxVelocity*t,o=1;switch(e.name){case"left":o=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*o);break;case"top":o=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*o);break}}computeBestEdge(e,t){let{edgeThreshold:n}=this,a=null,s=this.scrollCaches||[];for(let i of s){let o=i.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<=n&&this.everMovedUp&&i.canScrollUp()&&(!a||a.distance>d)&&(a={scrollCache:i,name:"top",distance:d}),u<=n&&this.everMovedDown&&i.canScrollDown()&&(!a||a.distance>u)&&(a={scrollCache:i,name:"bottom",distance:u}),l<=n&&this.everMovedLeft&&i.canScrollLeft()&&(!a||a.distance>l)&&(a={scrollCache:i,name:"left",distance:l}),c<=n&&this.everMovedRight&&i.canScrollRight()&&(!a||a.distance>c)&&(a={scrollCache:i,name:"right",distance:c}))}return a}buildCaches(e){return this.queryScrollEls(e).map(t=>t===window?new rL(!1):new RC(t,!1))}queryScrollEls(e){let t=[];for(let n of this.scrollQuery)typeof n=="object"?t.push(n):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(n)));return t}},Vd=class extends ik{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,rF(document.body),aF(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 s=this.minDistance,i,{deltaX:o,deltaY:l}=a;i=o*o+l*l,i>=s*s&&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,nF(document.body),sF(document.body),this.emitter.trigger("pointerup",a),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(a)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let n=this.pointer=new IC(e);n.emitter.on("pointerdown",this.onPointerDown),n.emitter.on("pointermove",this.onPointerMove),n.emitter.on("pointerup",this.onPointerUp),t&&(n.selector=t),this.mirror=new tL,this.autoScroller=new nL}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}},aL=class{constructor(e){this.el=e,this.origRect=vk(e),this.scrollCaches=DC(e).map(t=>new RC(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 n={left:e,top:t};for(let a of this.scrollCaches)if(!f1e(a.getEventTarget())&&!NF(n,a.clientRect))return!1;return!0}};mm=class{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=n=>{let{dragging:a}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(n),this.initialHit||!this.requireInitial?(a.setIgnoreMove(!1),this.emitter.trigger("pointerdown",n)):a.setIgnoreMove(!0)},this.handleDragStart=n=>{this.emitter.trigger("dragstart",n),this.handleMove(n,!0)},this.handleDragMove=n=>{this.emitter.trigger("dragmove",n),this.handleMove(n)},this.handlePointerUp=n=>{this.releaseHits(),this.emitter.trigger("pointerup",n)},this.handleDragEnd=n=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,n),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",n)},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 wc}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},n=t,a=e.subjectEl,s;a instanceof HTMLElement&&(s=vk(a),n=RF(n,s));let i=this.initialHit=this.queryHitForOffset(n.left,n.top);if(i){if(this.useSubjectCenter&&s){let o=xC(s,i.rect);o&&(n=OF(o))}this.coordAdjust=FF(n,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!FC(this.movingHit,n))&&(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))}prepareHits(){this.offsetTrackers=Ni(this.droppableStore,e=>(e.component.prepareHits(),new aL(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:n,offsetTrackers:a}=this,s=null;for(let i in n){let o=n[i].component,l=a[i];if(l&&l.isWithinClipping(e,t)){let c=l.computeLeft(),d=l.computeTop(),u=e-c,p=t-d,{origRect:m}=l,h=m.right-m.left,f=m.bottom-m.top;if(u>=0&&u=0&&ps.layer)&&(g.componentId=i,g.context=o.context,g.rect.left+=c,g.rect.right+=c,g.rect.top+=d,g.rect.bottom+=d,s=g)}}}return s}};sL=class extends vo{constructor(e){super(e),this.handlePointerDown=n=>{let{dragging:a}=this,s=n.origEvent.target;a.setIgnoreMove(!this.component.isValidDateDownEl(s))},this.handleDragEnd=n=>{let{component:a}=this,{pointer:s}=this.dragging;if(!s.wasTouchScroll){let{initialHit:i,finalHit:o}=this.hitDragging;if(i&&o&&FC(i,o)){let{context:l}=a,c=Object.assign(Object.assign({},dL(i.dateSpan,l)),{dayEl:i.dayEl,jsEvent:n.origEvent,view:l.viewApi||l.calendarApi.view});l.emitter.trigger("dateClick",c)}}},this.dragging=new Vd(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new mm(this.dragging,gk(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},iL=class extends vo{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=i=>{let{component:o,dragging:l}=this,{options:c}=o.context,d=c.selectable&&o.isValidDateDownEl(i.origEvent.target);l.setIgnoreMove(!d),l.delay=i.isTouch?y1e(o):null},this.handleDragStart=i=>{this.component.context.calendarApi.unselect(i)},this.handleHitUpdate=(i,o)=>{let{context:l}=this.component,c=null,d=!1;if(i){let u=this.hitDragging.initialHit;i.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,i)||(c=v1e(u,i,l.pluginHooks.dateSelectionTransformers)),(!c||!jF(c,i.dateProfile,l))&&(d=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),d?Kf():Qf(),o||(this.dragSelection=c)},this.handlePointerUp=i=>{this.dragSelection&&(EC(this.dragSelection,i,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:n}=t.context,a=this.dragging=new Vd(e.el);a.touchScrollAllowed=!1,a.minDistance=n.selectMinDistance||0,a.autoScroller.isEnabled=n.dragScroll;let s=this.hitDragging=new mm(this.dragging,gk(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}};Dk=class r extends vo{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=i=>{let o=i.origEvent.target,{component:l,dragging:c}=this,{mirror:d}=c,{options:u}=l.context,p=l.context;this.subjectEl=i.subjectEl;let m=this.subjectSeg=Dc(i.subjectEl),f=(this.eventRange=m.eventRange).instance.instanceId;this.relevantEvents=mk(p.getCurrentData().eventStore,f),c.minDistance=i.isTouch?0:u.eventDragMinDistance,c.delay=i.isTouch&&f!==l.props.eventSelection?T1e(l):null,u.fixedMirrorParent?d.parentNode=u.fixedMirrorParent:d.parentNode=Cn(o,".fc"),d.revertDuration=u.dragRevertDuration;let g=l.isValidSegDownEl(o)&&!Cn(o,".fc-event-resizer");c.setIgnoreMove(!g),this.isDragging=g&&i.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=i=>{let o=this.component.context,l=this.eventRange,c=l.instance.instanceId;i.isTouch?c!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(i),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new cr(o,l.def,l.instance),jsEvent:i.origEvent,view:o.viewApi}))},this.handleHitUpdate=(i,o)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,d=this.component.context,u=null,p=null,m=null,h=!1,f={affectedEvents:l,mutatedEvents:Pn(),isEvent:!0};if(i){u=i.context;let g=u.options;d===u||g.editable&&g.droppable?(p=b1e(c,i,this.eventRange.instance.range.start,u.getCurrentData().pluginHooks.eventDragMutationMassagers),p&&(m=hk(l,u.getCurrentData().eventUiBases,p,u),f.mutatedEvents=m,kk(f,i.dateProfile,u)||(h=!0,p=null,m=null,f.mutatedEvents=Pn()))):u=null}this.displayDrag(u,f),h?Kf():Qf(),o||(d===u&&FC(c,i)&&(p=null),this.dragging.setMirrorNeedsRevert(!p),this.dragging.setMirrorIsVisible(!i||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=u,this.validMutation=p,this.mutatedRelevantEvents=m)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=i=>{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 cr(o,u,p),h=this.relevantEvents,f=this.mutatedRelevantEvents,{finalHit:g}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:m,jsEvent:i.origEvent,view:l}),d){if(c===o){let y=new cr(o,f.defs[u.defId],p?f.instances[p.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:f});let k={oldEvent:m,event:y,relatedEvents:ml(f,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:h})}},T={};for(let w of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(T,w(d,o));o.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},k),T),{el:i.subjectEl,delta:d.datesDelta,jsEvent:i.origEvent,view:l})),o.emitter.trigger("eventChange",k)}else if(c){let y={event:m,relatedEvents:ml(h,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:h})}};o.emitter.trigger("eventLeave",Object.assign(Object.assign({},y),{draggedEl:i.subjectEl,view:l})),o.dispatch({type:"REMOVE_EVENTS",eventStore:h}),o.emitter.trigger("eventRemove",y);let k=f.defs[u.defId],T=f.instances[p.instanceId],w=new cr(c,k,T);c.dispatch({type:"MERGE_EVENTS",eventStore:f});let S={event:w,relatedEvents:ml(f,c,T),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:f})}};c.emitter.trigger("eventAdd",S),i.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:p.instanceId}),c.emitter.trigger("drop",Object.assign(Object.assign({},dL(g.dateSpan,c)),{draggedEl:i.subjectEl,jsEvent:i.origEvent,view:g.context.viewApi})),c.emitter.trigger("eventReceive",Object.assign(Object.assign({},S),{draggedEl:i.subjectEl,view:g.context.viewApi}))}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:n}=t.context,a=this.dragging=new Vd(e.el);a.pointer.selector=r.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=n.dragScroll;let s=this.hitDragging=new mm(this.dragging,cm);s.useSubjectCenter=e.useEventCenter,s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let n=this.component.context,a=this.receivingContext;a&&a!==e&&(a===n?a.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:Pn(),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}};Dk.SELECTOR=".fc-event-draggable, .fc-event-resizable";oL=class extends vo{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let{component:i}=this,o=this.querySegEl(s),l=Dc(o),c=this.eventRange=l.eventRange;this.dragging.minDistance=i.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(s.origEvent.target)||s.isTouch&&this.component.props.eventSelection!==c.instance.instanceId)},this.handleDragStart=s=>{let{context:i}=this.component,o=this.eventRange;this.relevantEvents=mk(i.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(s);this.draggingSegEl=l,this.draggingSeg=Dc(l),i.calendarApi.unselect(),i.emitter.trigger("eventResizeStart",{el:l,event:new cr(i,o.def,o.instance),jsEvent:s.origEvent,view:i.viewApi})},this.handleHitUpdate=(s,i,o)=>{let{context:l}=this.component,c=this.relevantEvents,d=this.hitDragging.initialHit,u=this.eventRange.instance,p=null,m=null,h=!1,f={affectedEvents:c,mutatedEvents:Pn(),isEvent:!0};s&&(s.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,s)||(p=k1e(d,s,o.subjectEl.classList.contains("fc-event-resizer-start"),u.range))),p&&(m=hk(c,l.getCurrentData().eventUiBases,p,l),f.mutatedEvents=m,kk(f,s.dateProfile,l)||(h=!0,p=null,m=null,f.mutatedEvents=null)),m?l.dispatch({type:"SET_EVENT_RESIZE",state:f}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),h?Kf():Qf(),i||(p&&FC(d,s)&&(p=null),this.validMutation=p,this.mutatedRelevantEvents=m)},this.handleDragEnd=s=>{let{context:i}=this.component,o=this.eventRange.def,l=this.eventRange.instance,c=new cr(i,o,l),d=this.relevantEvents,u=this.mutatedRelevantEvents;if(i.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:s.origEvent,view:i.viewApi}),this.validMutation){let p=new cr(i,u.defs[o.defId],l?u.instances[l.instanceId]:null);i.dispatch({type:"MERGE_EVENTS",eventStore:u});let m={oldEvent:c,event:p,relatedEvents:ml(u,i,l),revert(){i.dispatch({type:"MERGE_EVENTS",eventStore:d})}};i.emitter.trigger("eventResize",Object.assign(Object.assign({},m),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||tt(0),endDelta:this.validMutation.endDelta||tt(0),jsEvent:s.origEvent,view:i.viewApi})),i.emitter.trigger("eventChange",m)}else i.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,n=this.dragging=new Vd(e.el);n.pointer.selector=".fc-event-resizer",n.touchScrollAllowed=!1,n.autoScroller.isEnabled=t.context.options.dragScroll;let a=this.hitDragging=new mm(this.dragging,gk(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 Cn(e.subjectEl,".fc-event")}};lL=class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=n=>{n.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=n=>{let a=this.context.options.unselectCancel,s=hC(n.origEvent);this.matchesCancel=!!Cn(s,a),this.matchesEvent=!!Cn(s,Dk.SELECTOR)},this.onDocumentPointerUp=n=>{let{context:a}=this,{documentPointer:s}=this,i=a.getCurrentData();if(!s.wasTouchScroll){if(i.dateSelection&&!this.isRecentPointerDateSelect){let o=a.options.unselectAuto;o&&(!o||!this.matchesCancel)&&a.calendarApi.unselect(n)}i.eventSelection&&!this.matchesEvent&&a.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new IC(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()}},w1e={fixedMirrorParent:$},S1e={dateClick:$,eventDragStart:$,eventDragStop:$,eventDrop:$,eventResizeStart:$,eventResizeStop:$,eventResize:$,drop:$,eventReceive:$,eventLeave:$},cL=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,s,i)=>{let{dragging:o}=this.hitDragging,l=null,c=null,d=!1,u={affectedEvents:Pn(),mutatedEvents:Pn(),isEvent:this.dragMeta.create};a&&(l=a.context,this.canDropElOnCalendar(i.subjectEl,l)&&(c=E1e(a.dateSpan,this.dragMeta,l),u.mutatedEvents=Xp(c),d=!kk(u,a.dateProfile,l),d&&(u.mutatedEvents=Pn(),c=null))),this.displayDrag(l,u),o.setMirrorIsVisible(s||!c||!document.querySelector(".fc-event-mirror")),d?Kf():Qf(),s||(o.setMirrorNeedsRevert(!c),this.receivingContext=l,this.droppableEvent=c)},this.handleDragEnd=a=>{let{receivingContext:s,droppableEvent:i}=this;if(this.clearDrag(),s&&i){let o=this.hitDragging.finalHit,l=o.context.viewApi,c=this.dragMeta;if(s.emitter.trigger("drop",Object.assign(Object.assign({},dL(o.dateSpan,s)),{draggedEl:a.subjectEl,jsEvent:a.origEvent,view:l})),c.create){let d=Xp(i);s.dispatch({type:"MERGE_EVENTS",eventStore:d}),a.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:i.instance.instanceId}),s.emitter.trigger("eventReceive",{event:new cr(s,i.def,i.instance),relatedEvents:[],revert(){s.dispatch({type:"REMOVE_EVENTS",eventStore:d})},draggedEl:a.subjectEl,view:l})}}this.receivingContext=null,this.droppableEvent=null};let n=this.hitDragging=new mm(e,cm);n.requireInitial=!1,n.emitter.on("dragstart",this.handleDragStart),n.emitter.on("hitupdate",this.handleHitUpdate),n.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}buildDragMeta(e){return typeof this.suppliedDragMeta=="object"?Tk(this.suppliedDragMeta):typeof this.suppliedDragMeta=="function"?Tk(this.suppliedDragMeta(e)):x1e(e)}displayDrag(e,t){let n=this.receivingContext;n&&n!==e&&n.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 n=t.options.dropAccept;return typeof n=="function"?n.call(t.calendarApi,e):typeof n=="string"&&n?!!mC(e,n):!0}};ig.dataAttrPrefix="";OC=class{constructor(e,t={}){this.handlePointerDown=a=>{let{dragging:s}=this,{minDistance:i,longPressDelay:o}=this.settings;s.minDistance=i!=null?i:a.isTouch?0:pl.eventDragMinDistance,s.delay=a.isTouch?o!=null?o:pl.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 n=this.dragging=new Vd(e);n.touchScrollAllowed=!1,t.itemSelector!=null&&(n.pointer.selector=t.itemSelector),t.appendTo!=null&&(n.mirror.parentNode=t.appendTo),n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragstart",this.handleDragStart),new cL(n,t.eventData)}destroy(){this.dragging.destroy()}},iie=Ta({name:"@fullcalendar/interaction",componentInteractions:[sL,iL,Dk,oL],calendarInteractions:[lL],elementDraggingImpl:Vd,optionRefiners:w1e,listenerRefiners:S1e})});var it=E(He=>{"use strict";He.secondsInYear=He.secondsInWeek=He.secondsInQuarter=He.secondsInMonth=He.secondsInMinute=He.secondsInHour=He.secondsInDay=He.quartersInYear=He.monthsInYear=He.monthsInQuarter=He.minutesInYear=He.minutesInMonth=He.minutesInHour=He.minutesInDay=He.minTime=He.millisecondsInWeek=He.millisecondsInSecond=He.millisecondsInMinute=He.millisecondsInHour=He.millisecondsInDay=He.maxTime=He.daysInYear=He.daysInWeek=He.constructFromSymbol=void 0;var EVt=He.daysInWeek=7,a$e=He.daysInYear=365.2425,s$e=He.maxTime=Math.pow(10,8)*24*60*60*1e3,xVt=He.minTime=-s$e,DVt=He.millisecondsInWeek=6048e5,CVt=He.millisecondsInDay=864e5,PVt=He.millisecondsInMinute=6e4,_Vt=He.millisecondsInHour=36e5,MVt=He.millisecondsInSecond=1e3,AVt=He.minutesInYear=525600,IVt=He.minutesInMonth=43200,NVt=He.minutesInDay=1440,RVt=He.minutesInHour=60,OVt=He.monthsInQuarter=3,FVt=He.monthsInYear=12,LVt=He.quartersInYear=4,i$e=He.secondsInHour=3600,$Vt=He.secondsInMinute=60,Yie=He.secondsInDay=i$e*24,jVt=He.secondsInWeek=Yie*7,o$e=He.secondsInYear=Yie*a$e,l$e=He.secondsInMonth=o$e/12,zVt=He.secondsInQuarter=l$e*3,BVt=He.constructFromSymbol=Symbol.for("constructDateFrom")});var Oe=E(Zie=>{"use strict";Zie.constructFrom=c$e;var Gie=it();function c$e(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Gie.constructFromSymbol in r?r[Gie.constructFromSymbol](e):r instanceof Date?new r.constructor(e):new Date(e)}});var Q=E(Kie=>{"use strict";Kie.toDate=u$e;var d$e=Oe();function u$e(r,e){return(0,d$e.constructFrom)(e||r,r)}});var vl=E(Qie=>{"use strict";Qie.addDays=h$e;var p$e=Oe(),m$e=Q();function h$e(r,e,t){let n=(0,m$e.toDate)(r,t==null?void 0:t.in);return isNaN(e)?(0,p$e.constructFrom)((t==null?void 0:t.in)||r,NaN):(e&&n.setDate(n.getDate()+e),n)}});var Tg=E(Xie=>{"use strict";Xie.addMonths=g$e;var Jie=Oe(),f$e=Q();function g$e(r,e,t){let n=(0,f$e.toDate)(r,t==null?void 0:t.in);if(isNaN(e))return(0,Jie.constructFrom)((t==null?void 0:t.in)||r,NaN);if(!e)return n;let a=n.getDate(),s=(0,Jie.constructFrom)((t==null?void 0:t.in)||r,n.getTime());s.setMonth(n.getMonth()+e+1,0);let i=s.getDate();return a>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),a),n)}});var TL=E(eoe=>{"use strict";eoe.add=k$e;var y$e=vl(),v$e=Tg(),b$e=Oe(),T$e=Q();function k$e(r,e,t){let{years:n=0,months:a=0,weeks:s=0,days:i=0,hours:o=0,minutes:l=0,seconds:c=0}=e,d=(0,T$e.toDate)(r,t==null?void 0:t.in),u=a||n?(0,v$e.addMonths)(d,a+n*12):d,p=i||s?(0,y$e.addDays)(u,i+s*7):u,m=l+o*60,f=(c+m*60)*1e3;return(0,b$e.constructFrom)((t==null?void 0:t.in)||r,+p+f)}});var kL=E(toe=>{"use strict";toe.isSaturday=S$e;var w$e=Q();function S$e(r,e){return(0,w$e.toDate)(r,e==null?void 0:e.in).getDay()===6}});var wL=E(roe=>{"use strict";roe.isSunday=x$e;var E$e=Q();function x$e(r,e){return(0,E$e.toDate)(r,e==null?void 0:e.in).getDay()===0}});var Fk=E(noe=>{"use strict";noe.isWeekend=C$e;var D$e=Q();function C$e(r,e){let t=(0,D$e.toDate)(r,e==null?void 0:e.in).getDay();return t===0||t===6}});var EL=E(aoe=>{"use strict";aoe.addBusinessDays=I$e;var P$e=Oe(),_$e=kL(),M$e=wL(),SL=Fk(),A$e=Q();function I$e(r,e,t){let n=(0,A$e.toDate)(r,t==null?void 0:t.in),a=(0,SL.isWeekend)(n,t);if(isNaN(e))return(0,P$e.constructFrom)(t==null?void 0:t.in,NaN);let s=n.getHours(),i=e<0?-1:1,o=Math.trunc(e/5);n.setDate(n.getDate()+o*7);let l=Math.abs(e%5);for(;l>0;)n.setDate(n.getDate()+i),(0,SL.isWeekend)(n,t)||(l-=1);return a&&(0,SL.isWeekend)(n,t)&&e!==0&&((0,_$e.isSaturday)(n,t)&&n.setDate(n.getDate()+(i<0?2:-1)),(0,M$e.isSunday)(n,t)&&n.setDate(n.getDate()+(i<0?1:-2))),n.setHours(s),n}});var Lk=E(soe=>{"use strict";soe.addMilliseconds=O$e;var N$e=Oe(),R$e=Q();function O$e(r,e,t){return(0,N$e.constructFrom)((t==null?void 0:t.in)||r,+(0,R$e.toDate)(r)+e)}});var xL=E(ioe=>{"use strict";ioe.addHours=$$e;var F$e=Lk(),L$e=it();function $$e(r,e,t){return(0,F$e.addMilliseconds)(r,e*L$e.millisecondsInHour,t)}});var wa=E(DL=>{"use strict";DL.getDefaultOptions=j$e;DL.setDefaultOptions=z$e;var ooe={};function j$e(){return ooe}function z$e(r){ooe=r}});var wo=E(loe=>{"use strict";loe.startOfWeek=H$e;var B$e=wa(),q$e=Q();function H$e(r,e){var o,l,c,d,u,p,m,h;let t=(0,B$e.getDefaultOptions)(),n=(h=(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?h:0,a=(0,q$e.toDate)(r,e==null?void 0:e.in),s=a.getDay(),i=(s{"use strict";coe.startOfISOWeek=V$e;var U$e=wo();function V$e(r,e){return(0,U$e.startOfWeek)(r,{...e,weekStartsOn:1})}});var Jd=E(poe=>{"use strict";poe.getISOWeekYear=Y$e;var doe=Oe(),uoe=bl(),W$e=Q();function Y$e(r,e){let t=(0,W$e.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=(0,doe.constructFrom)(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let s=(0,uoe.startOfISOWeek)(a),i=(0,doe.constructFrom)(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let o=(0,uoe.startOfISOWeek)(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}});var Nc=E(moe=>{"use strict";moe.getTimezoneOffsetInMilliseconds=Z$e;var G$e=Q();function Z$e(r){let e=(0,G$e.toDate)(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}});var ir=E(hoe=>{"use strict";hoe.normalizeDates=Q$e;var K$e=Oe();function Q$e(r,...e){let t=K$e.constructFrom.bind(null,r||e.find(n=>typeof n=="object"));return e.map(t)}});var $k=E(foe=>{"use strict";foe.startOfDay=X$e;var J$e=Q();function X$e(r,e){let t=(0,J$e.toDate)(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}});var Rc=E(voe=>{"use strict";voe.differenceInCalendarDays=rje;var goe=Nc(),eje=ir(),tje=it(),yoe=$k();function rje(r,e,t){let[n,a]=(0,eje.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,yoe.startOfDay)(n),i=(0,yoe.startOfDay)(a),o=+s-(0,goe.getTimezoneOffsetInMilliseconds)(s),l=+i-(0,goe.getTimezoneOffsetInMilliseconds)(i);return Math.round((o-l)/tje.millisecondsInDay)}});var kg=E(boe=>{"use strict";boe.startOfISOWeekYear=ije;var nje=Oe(),aje=Jd(),sje=bl();function ije(r,e){let t=(0,aje.getISOWeekYear)(r,e),n=(0,nje.constructFrom)((e==null?void 0:e.in)||r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),(0,sje.startOfISOWeek)(n)}});var CL=E(koe=>{"use strict";koe.setISOWeekYear=dje;var oje=Oe(),lje=Rc(),Toe=kg(),cje=Q();function dje(r,e,t){let n=(0,cje.toDate)(r,t==null?void 0:t.in),a=(0,lje.differenceInCalendarDays)(n,(0,Toe.startOfISOWeekYear)(n,t)),s=(0,oje.constructFrom)((t==null?void 0:t.in)||r,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),n=(0,Toe.startOfISOWeekYear)(s),n.setDate(n.getDate()+a),n}});var PL=E(woe=>{"use strict";woe.addISOWeekYears=mje;var uje=Jd(),pje=CL();function mje(r,e,t){return(0,pje.setISOWeekYear)(r,(0,uje.getISOWeekYear)(r,t)+e,t)}});var u0=E(Soe=>{"use strict";Soe.addMinutes=gje;var hje=it(),fje=Q();function gje(r,e,t){let n=(0,fje.toDate)(r,t==null?void 0:t.in);return n.setTime(n.getTime()+e*hje.millisecondsInMinute),n}});var p0=E(Eoe=>{"use strict";Eoe.addQuarters=vje;var yje=Tg();function vje(r,e,t){return(0,yje.addMonths)(r,e*3,t)}});var _L=E(xoe=>{"use strict";xoe.addSeconds=Tje;var bje=Lk();function Tje(r,e,t){return(0,bje.addMilliseconds)(r,e*1e3,t)}});var jk=E(Doe=>{"use strict";Doe.addWeeks=wje;var kje=vl();function wje(r,e,t){return(0,kje.addDays)(r,e*7,t)}});var ML=E(Coe=>{"use strict";Coe.addYears=Eje;var Sje=Tg();function Eje(r,e,t){return(0,Sje.addMonths)(r,e*12,t)}});var _oe=E(Poe=>{"use strict";Poe.areIntervalsOverlapping=xje;var m0=Q();function xje(r,e,t){let[n,a]=[+(0,m0.toDate)(r.start,t==null?void 0:t.in),+(0,m0.toDate)(r.end,t==null?void 0:t.in)].sort((o,l)=>o-l),[s,i]=[+(0,m0.toDate)(e.start,t==null?void 0:t.in),+(0,m0.toDate)(e.end,t==null?void 0:t.in)].sort((o,l)=>o-l);return t!=null&&t.inclusive?n<=i&&s<=a:n{"use strict";Aoe.max=Cje;var Moe=Oe(),Dje=Q();function Cje(r,e){let t,n=e==null?void 0:e.in;return r.forEach(a=>{!n&&typeof a=="object"&&(n=Moe.constructFrom.bind(null,a));let s=(0,Dje.toDate)(a,n);(!t||t{"use strict";Noe.min=_je;var Ioe=Oe(),Pje=Q();function _je(r,e){let t,n=e==null?void 0:e.in;return r.forEach(a=>{!n&&typeof a=="object"&&(n=Ioe.constructFrom.bind(null,a));let s=(0,Pje.toDate)(a,n);(!t||t>s||isNaN(+s))&&(t=s)}),(0,Ioe.constructFrom)(n,t||NaN)}});var Ooe=E(Roe=>{"use strict";Roe.clamp=Nje;var Mje=ir(),Aje=AL(),Ije=IL();function Nje(r,e,t){let[n,a,s]=(0,Mje.normalizeDates)(t==null?void 0:t.in,r,e.start,e.end);return(0,Ije.min)([(0,Aje.max)([n,a],t),s],t)}});var NL=E(Loe=>{"use strict";Loe.closestIndexTo=Rje;var Foe=Q();function Rje(r,e){let t=+(0,Foe.toDate)(r);if(isNaN(t))return NaN;let n,a;return e.forEach((s,i)=>{let o=(0,Foe.toDate)(s);if(isNaN(+o)){n=NaN,a=NaN;return}let l=Math.abs(t-+o);(n==null||l{"use strict";$oe.closestTo=$je;var Oje=ir(),Fje=NL(),Lje=Oe();function $je(r,e,t){let[n,...a]=(0,Oje.normalizeDates)(t==null?void 0:t.in,r,...e),s=(0,Fje.closestIndexTo)(n,a);if(typeof s=="number"&&isNaN(s))return(0,Lje.constructFrom)(n,NaN);if(s!==void 0)return a[s]}});var km=E(Boe=>{"use strict";Boe.compareAsc=jje;var zoe=Q();function jje(r,e){let t=+(0,zoe.toDate)(r)-+(0,zoe.toDate)(e);return t<0?-1:t>0?1:t}});var Uoe=E(Hoe=>{"use strict";Hoe.compareDesc=zje;var qoe=Q();function zje(r,e){let t=+(0,qoe.toDate)(r)-+(0,qoe.toDate)(e);return t>0?-1:t<0?1:t}});var _n=E(Voe=>{"use strict";Voe.constructNow=qje;var Bje=Oe();function qje(r){return(0,Bje.constructFrom)(r,Date.now())}});var Yoe=E(Woe=>{"use strict";Woe.daysToWeeks=Uje;var Hje=it();function Uje(r){let e=Math.trunc(r/Hje.daysInWeek);return e===0?0:e}});var wg=E(Zoe=>{"use strict";Zoe.isSameDay=Wje;var Vje=ir(),Goe=$k();function Wje(r,e,t){let[n,a]=(0,Vje.normalizeDates)(t==null?void 0:t.in,r,e);return+(0,Goe.startOfDay)(n)==+(0,Goe.startOfDay)(a)}});var RL=E(Koe=>{"use strict";Koe.isDate=Yje;function Yje(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}});var Oc=E(Qoe=>{"use strict";Qoe.isValid=Kje;var Gje=RL(),Zje=Q();function Kje(r){return!(!(0,Gje.isDate)(r)&&typeof r!="number"||isNaN(+(0,Zje.toDate)(r)))}});var tle=E(ele=>{"use strict";ele.differenceInBusinessDays=tze;var Qje=ir(),Joe=vl(),Jje=Rc(),Xje=wg(),Xoe=Oc(),eze=Fk();function tze(r,e,t){let[n,a]=(0,Qje.normalizeDates)(t==null?void 0:t.in,r,e);if(!(0,Xoe.isValid)(n)||!(0,Xoe.isValid)(a))return NaN;let s=(0,Jje.differenceInCalendarDays)(n,a),i=s<0?-1:1,o=Math.trunc(s/7),l=o*5,c=(0,Joe.addDays)(a,o*7);for(;!(0,Xje.isSameDay)(n,c);)l+=(0,eze.isWeekend)(c,t)?0:i,c=(0,Joe.addDays)(c,i);return l===0?0:l}});var OL=E(nle=>{"use strict";nle.differenceInCalendarISOWeekYears=nze;var rze=ir(),rle=Jd();function nze(r,e,t){let[n,a]=(0,rze.normalizeDates)(t==null?void 0:t.in,r,e);return(0,rle.getISOWeekYear)(n,t)-(0,rle.getISOWeekYear)(a,t)}});var ole=E(ile=>{"use strict";ile.differenceInCalendarISOWeeks=ize;var ale=Nc(),aze=ir(),sze=it(),sle=bl();function ize(r,e,t){let[n,a]=(0,aze.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,sle.startOfISOWeek)(n),i=(0,sle.startOfISOWeek)(a),o=+s-(0,ale.getTimezoneOffsetInMilliseconds)(s),l=+i-(0,ale.getTimezoneOffsetInMilliseconds)(i);return Math.round((o-l)/sze.millisecondsInWeek)}});var h0=E(lle=>{"use strict";lle.differenceInCalendarMonths=lze;var oze=ir();function lze(r,e,t){let[n,a]=(0,oze.normalizeDates)(t==null?void 0:t.in,r,e),s=n.getFullYear()-a.getFullYear(),i=n.getMonth()-a.getMonth();return s*12+i}});var FL=E(cle=>{"use strict";cle.getQuarter=dze;var cze=Q();function dze(r,e){let t=(0,cze.toDate)(r,e==null?void 0:e.in);return Math.trunc(t.getMonth()/3)+1}});var LL=E(ule=>{"use strict";ule.differenceInCalendarQuarters=pze;var uze=ir(),dle=FL();function pze(r,e,t){let[n,a]=(0,uze.normalizeDates)(t==null?void 0:t.in,r,e),s=n.getFullYear()-a.getFullYear(),i=(0,dle.getQuarter)(n)-(0,dle.getQuarter)(a);return s*4+i}});var f0=E(hle=>{"use strict";hle.differenceInCalendarWeeks=fze;var ple=Nc(),mze=ir(),hze=it(),mle=wo();function fze(r,e,t){let[n,a]=(0,mze.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,mle.startOfWeek)(n,t),i=(0,mle.startOfWeek)(a,t),o=+s-(0,ple.getTimezoneOffsetInMilliseconds)(s),l=+i-(0,ple.getTimezoneOffsetInMilliseconds)(i);return Math.round((o-l)/hze.millisecondsInWeek)}});var g0=E(fle=>{"use strict";fle.differenceInCalendarYears=yze;var gze=ir();function yze(r,e,t){let[n,a]=(0,gze.normalizeDates)(t==null?void 0:t.in,r,e);return n.getFullYear()-a.getFullYear()}});var y0=E(yle=>{"use strict";yle.differenceInDays=Tze;var vze=ir(),bze=Rc();function Tze(r,e,t){let[n,a]=(0,vze.normalizeDates)(t==null?void 0:t.in,r,e),s=gle(n,a),i=Math.abs((0,bze.differenceInCalendarDays)(n,a));n.setDate(n.getDate()-s*i);let o=+(gle(n,a)===-s),l=s*(i-o);return l===0?0:l}function gle(r,e){let t=r.getFullYear()-e.getFullYear()||r.getMonth()-e.getMonth()||r.getDate()-e.getDate()||r.getHours()-e.getHours()||r.getMinutes()-e.getMinutes()||r.getSeconds()-e.getSeconds()||r.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}});var Fc=E(vle=>{"use strict";vle.getRoundingMethod=kze;function kze(r){return e=>{let n=(r?Math[r]:Math.trunc)(e);return n===0?0:n}}});var v0=E(ble=>{"use strict";ble.differenceInHours=xze;var wze=Fc(),Sze=ir(),Eze=it();function xze(r,e,t){let[n,a]=(0,Sze.normalizeDates)(t==null?void 0:t.in,r,e),s=(+n-+a)/Eze.millisecondsInHour;return(0,wze.getRoundingMethod)(t==null?void 0:t.roundingMethod)(s)}});var $L=E(Tle=>{"use strict";Tle.subISOWeekYears=Cze;var Dze=PL();function Cze(r,e,t){return(0,Dze.addISOWeekYears)(r,-e,t)}});var Sle=E(wle=>{"use strict";wle.differenceInISOWeekYears=Aze;var Pze=ir(),kle=km(),_ze=OL(),Mze=$L();function Aze(r,e,t){let[n,a]=(0,Pze.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,kle.compareAsc)(n,a),i=Math.abs((0,_ze.differenceInCalendarISOWeekYears)(n,a,t)),o=(0,Mze.subISOWeekYears)(n,s*i,t),l=+((0,kle.compareAsc)(o,a)===-s),c=s*(i-l);return c===0?0:c}});var b0=E(xle=>{"use strict";xle.differenceInMilliseconds=Ize;var Ele=Q();function Ize(r,e){return+(0,Ele.toDate)(r)-+(0,Ele.toDate)(e)}});var T0=E(Dle=>{"use strict";Dle.differenceInMinutes=Fze;var Nze=Fc(),Rze=it(),Oze=b0();function Fze(r,e,t){let n=(0,Oze.differenceInMilliseconds)(r,e)/Rze.millisecondsInMinute;return(0,Nze.getRoundingMethod)(t==null?void 0:t.roundingMethod)(n)}});var k0=E(Cle=>{"use strict";Cle.endOfDay=$ze;var Lze=Q();function $ze(r,e){let t=(0,Lze.toDate)(r,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}});var w0=E(Ple=>{"use strict";Ple.endOfMonth=zze;var jze=Q();function zze(r,e){let t=(0,jze.toDate)(r,e==null?void 0:e.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}});var jL=E(_le=>{"use strict";_le.isLastDayOfMonth=Uze;var Bze=k0(),qze=w0(),Hze=Q();function Uze(r,e){let t=(0,Hze.toDate)(r,e==null?void 0:e.in);return+(0,Bze.endOfDay)(t,e)==+(0,qze.endOfMonth)(t,e)}});var zk=E(Mle=>{"use strict";Mle.differenceInMonths=Gze;var Vze=ir(),zL=km(),Wze=h0(),Yze=jL();function Gze(r,e,t){let[n,a,s]=(0,Vze.normalizeDates)(t==null?void 0:t.in,r,r,e),i=(0,zL.compareAsc)(a,s),o=Math.abs((0,Wze.differenceInCalendarMonths)(a,s));if(o<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*o);let l=(0,zL.compareAsc)(a,s)===-i;(0,Yze.isLastDayOfMonth)(n)&&o===1&&(0,zL.compareAsc)(n,s)===1&&(l=!1);let c=i*(o-+l);return c===0?0:c}});var Ile=E(Ale=>{"use strict";Ale.differenceInQuarters=Qze;var Zze=Fc(),Kze=zk();function Qze(r,e,t){let n=(0,Kze.differenceInMonths)(r,e,t)/3;return(0,Zze.getRoundingMethod)(t==null?void 0:t.roundingMethod)(n)}});var Bk=E(Nle=>{"use strict";Nle.differenceInSeconds=eBe;var Jze=Fc(),Xze=b0();function eBe(r,e,t){let n=(0,Xze.differenceInMilliseconds)(r,e)/1e3;return(0,Jze.getRoundingMethod)(t==null?void 0:t.roundingMethod)(n)}});var Ole=E(Rle=>{"use strict";Rle.differenceInWeeks=nBe;var tBe=Fc(),rBe=y0();function nBe(r,e,t){let n=(0,rBe.differenceInDays)(r,e,t)/7;return(0,tBe.getRoundingMethod)(t==null?void 0:t.roundingMethod)(n)}});var BL=E(Lle=>{"use strict";Lle.differenceInYears=iBe;var aBe=ir(),Fle=km(),sBe=g0();function iBe(r,e,t){let[n,a]=(0,aBe.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,Fle.compareAsc)(n,a),i=Math.abs((0,sBe.differenceInCalendarYears)(n,a));n.setFullYear(1584),a.setFullYear(1584);let o=(0,Fle.compareAsc)(n,a)===-s,l=s*(i-+o);return l===0?0:l}});var Tl=E($le=>{"use strict";$le.normalizeInterval=lBe;var oBe=ir();function lBe(r,e){let[t,n]=(0,oBe.normalizeDates)(r,e.start,e.end);return{start:t,end:n}}});var qL=E(jle=>{"use strict";jle.eachDayOfInterval=uBe;var cBe=Tl(),dBe=Oe();function uBe(r,e){var c;let{start:t,end:n}=(0,cBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?+t:+n,i=a?n:t;i.setHours(0,0,0,0);let o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,dBe.constructFrom)(t,i)),i.setDate(i.getDate()+o),i.setHours(0,0,0,0);return a?l.reverse():l}});var Ble=E(zle=>{"use strict";zle.eachHourOfInterval=hBe;var pBe=Tl(),mBe=Oe();function hBe(r,e){var c;let{start:t,end:n}=(0,pBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?+t:+n,i=a?n:t;i.setMinutes(0,0,0);let o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,mBe.constructFrom)(t,i)),i.setHours(i.getHours()+o);return a?l.reverse():l}});var Hle=E(qle=>{"use strict";qle.eachMinuteOfInterval=vBe;var fBe=Tl(),gBe=u0(),yBe=Oe();function vBe(r,e){var c;let{start:t,end:n}=(0,fBe.normalizeInterval)(e==null?void 0:e.in,r);t.setSeconds(0,0);let a=+t>+n,s=a?+t:+n,i=a?n:t,o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,yBe.constructFrom)(t,i)),i=(0,gBe.addMinutes)(i,o);return a?l.reverse():l}});var Vle=E(Ule=>{"use strict";Ule.eachMonthOfInterval=kBe;var bBe=Tl(),TBe=Oe();function kBe(r,e){var c;let{start:t,end:n}=(0,bBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?+t:+n,i=a?n:t;i.setHours(0,0,0,0),i.setDate(1);let o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,TBe.constructFrom)(t,i)),i.setMonth(i.getMonth()+o);return a?l.reverse():l}});var S0=E(Wle=>{"use strict";Wle.startOfQuarter=SBe;var wBe=Q();function SBe(r,e){let t=(0,wBe.toDate)(r,e==null?void 0:e.in),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}});var Gle=E(Yle=>{"use strict";Yle.eachQuarterOfInterval=CBe;var EBe=Tl(),xBe=p0(),DBe=Oe(),E0=S0();function CBe(r,e){var c;let{start:t,end:n}=(0,EBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?+(0,E0.startOfQuarter)(t):+(0,E0.startOfQuarter)(n),i=a?(0,E0.startOfQuarter)(n):(0,E0.startOfQuarter)(t),o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,DBe.constructFrom)(t,i)),i=(0,xBe.addQuarters)(i,o);return a?l.reverse():l}});var Kle=E(Zle=>{"use strict";Zle.eachWeekOfInterval=ABe;var PBe=Tl(),_Be=jk(),MBe=Oe(),x0=wo();function ABe(r,e){var u;let{start:t,end:n}=(0,PBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?(0,x0.startOfWeek)(n,e):(0,x0.startOfWeek)(t,e),i=a?(0,x0.startOfWeek)(t,e):(0,x0.startOfWeek)(n,e);s.setHours(15),i.setHours(15);let o=+i.getTime(),l=s,c=(u=e==null?void 0:e.step)!=null?u:1;if(!c)return[];c<0&&(c=-c,a=!a);let d=[];for(;+l<=o;)l.setHours(0),d.push((0,MBe.constructFrom)(t,l)),l=(0,_Be.addWeeks)(l,c),l.setHours(15);return a?d.reverse():d}});var D0=E(Qle=>{"use strict";Qle.eachWeekendOfInterval=FBe;var IBe=Tl(),NBe=Oe(),RBe=qL(),OBe=Fk();function FBe(r,e){let{start:t,end:n}=(0,IBe.normalizeInterval)(e==null?void 0:e.in,r),a=(0,RBe.eachDayOfInterval)({start:t,end:n},e),s=[],i=0;for(;i{"use strict";Jle.startOfMonth=$Be;var LBe=Q();function $Be(r,e){let t=(0,LBe.toDate)(r,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}});var ece=E(Xle=>{"use strict";Xle.eachWeekendOfMonth=qBe;var jBe=D0(),zBe=w0(),BBe=qk();function qBe(r,e){let t=(0,BBe.startOfMonth)(r,e),n=(0,zBe.endOfMonth)(r,e);return(0,jBe.eachWeekendOfInterval)({start:t,end:n},e)}});var HL=E(tce=>{"use strict";tce.endOfYear=UBe;var HBe=Q();function UBe(r,e){let t=(0,HBe.toDate)(r,e==null?void 0:e.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}});var C0=E(rce=>{"use strict";rce.startOfYear=WBe;var VBe=Q();function WBe(r,e){let t=(0,VBe.toDate)(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}});var ace=E(nce=>{"use strict";nce.eachWeekendOfYear=KBe;var YBe=D0(),GBe=HL(),ZBe=C0();function KBe(r,e){let t=(0,ZBe.startOfYear)(r,e),n=(0,GBe.endOfYear)(r,e);return(0,YBe.eachWeekendOfInterval)({start:t,end:n},e)}});var ice=E(sce=>{"use strict";sce.eachYearOfInterval=XBe;var QBe=Tl(),JBe=Oe();function XBe(r,e){var c;let{start:t,end:n}=(0,QBe.normalizeInterval)(e==null?void 0:e.in,r),a=+t>+n,s=a?+t:+n,i=a?n:t;i.setHours(0,0,0,0),i.setMonth(0,1);let o=(c=e==null?void 0:e.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+i<=s;)l.push((0,JBe.constructFrom)(t,i)),i.setFullYear(i.getFullYear()+o);return a?l.reverse():l}});var lce=E(oce=>{"use strict";oce.endOfDecade=tqe;var eqe=Q();function tqe(r,e){let t=(0,eqe.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=9+Math.floor(n/10)*10;return t.setFullYear(a,11,31),t.setHours(23,59,59,999),t}});var dce=E(cce=>{"use strict";cce.endOfHour=nqe;var rqe=Q();function nqe(r,e){let t=(0,rqe.toDate)(r,e==null?void 0:e.in);return t.setMinutes(59,59,999),t}});var UL=E(uce=>{"use strict";uce.endOfWeek=iqe;var aqe=wa(),sqe=Q();function iqe(r,e){var o,l,c,d,u,p,m,h;let t=(0,aqe.getDefaultOptions)(),n=(h=(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?h:0,a=(0,sqe.toDate)(r,e==null?void 0:e.in),s=a.getDay(),i=(s{"use strict";pce.endOfISOWeek=lqe;var oqe=UL();function lqe(r,e){return(0,oqe.endOfWeek)(r,{...e,weekStartsOn:1})}});var fce=E(hce=>{"use strict";hce.endOfISOWeekYear=pqe;var cqe=Oe(),dqe=Jd(),uqe=bl();function pqe(r,e){let t=(0,dqe.getISOWeekYear)(r,e),n=(0,cqe.constructFrom)((e==null?void 0:e.in)||r,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);let a=(0,uqe.startOfISOWeek)(n,e);return a.setMilliseconds(a.getMilliseconds()-1),a}});var yce=E(gce=>{"use strict";gce.endOfMinute=hqe;var mqe=Q();function hqe(r,e){let t=(0,mqe.toDate)(r,e==null?void 0:e.in);return t.setSeconds(59,999),t}});var bce=E(vce=>{"use strict";vce.endOfQuarter=gqe;var fqe=Q();function gqe(r,e){let t=(0,fqe.toDate)(r,e==null?void 0:e.in),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}});var kce=E(Tce=>{"use strict";Tce.endOfSecond=vqe;var yqe=Q();function vqe(r,e){let t=(0,yqe.toDate)(r,e==null?void 0:e.in);return t.setMilliseconds(999),t}});var Sce=E(wce=>{"use strict";wce.endOfToday=Tqe;var bqe=k0();function Tqe(r){return(0,bqe.endOfDay)(Date.now(),r)}});var Dce=E(xce=>{"use strict";xce.endOfTomorrow=kqe;var Ece=_n();function kqe(r){let e=(0,Ece.constructNow)(r==null?void 0:r.in),t=e.getFullYear(),n=e.getMonth(),a=e.getDate(),s=(0,Ece.constructNow)(r==null?void 0:r.in);return s.setFullYear(t,n,a+1),s.setHours(23,59,59,999),r!=null&&r.in?r.in(s):s}});var Pce=E(Cce=>{"use strict";Cce.endOfYesterday=Eqe;var wqe=Oe(),Sqe=_n();function Eqe(r){let e=(0,Sqe.constructNow)(r==null?void 0:r.in),t=(0,wqe.constructFrom)(r==null?void 0:r.in,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()-1),t.setHours(23,59,59,999),t}});var _ce=E(VL=>{"use strict";VL.formatDistance=void 0;var xqe={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"}},Dqe=(r,e,t)=>{let n,a=xqe[r];return typeof a=="string"?n=a:e===1?n=a.one:n=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};VL.formatDistance=Dqe});var Ace=E(Mce=>{"use strict";Mce.buildFormatLongFn=Cqe;function Cqe(r){return(e={})=>{let t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}});var Ice=E(YL=>{"use strict";YL.formatLong=void 0;var WL=Ace(),Pqe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_qe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mqe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DYt=YL.formatLong={date:(0,WL.buildFormatLongFn)({formats:Pqe,defaultWidth:"full"}),time:(0,WL.buildFormatLongFn)({formats:_qe,defaultWidth:"full"}),dateTime:(0,WL.buildFormatLongFn)({formats:Mqe,defaultWidth:"full"})}});var Nce=E(GL=>{"use strict";GL.formatRelative=void 0;var Aqe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Iqe=(r,e,t,n)=>Aqe[r];GL.formatRelative=Iqe});var Oce=E(Rce=>{"use strict";Rce.buildLocalizeFn=Nqe;function Nqe(r){return(e,t)=>{let n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&r.formattingValues){let i=r.defaultFormattingWidth||r.defaultWidth,o=t!=null&&t.width?String(t.width):i;a=r.formattingValues[o]||r.formattingValues[i]}else{let i=r.defaultWidth,o=t!=null&&t.width?String(t.width):r.defaultWidth;a=r.values[o]||r.values[i]}let s=r.argumentCallback?r.argumentCallback(e):e;return a[s]}}});var Fce=E(ZL=>{"use strict";ZL.localize=void 0;var Hk=Oce(),Rqe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Oqe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fqe={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"]},Lqe={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"]},$qe={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"}},jqe={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"}},zqe=(r,e)=>{let t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},MYt=ZL.localize={ordinalNumber:zqe,era:(0,Hk.buildLocalizeFn)({values:Rqe,defaultWidth:"wide"}),quarter:(0,Hk.buildLocalizeFn)({values:Oqe,defaultWidth:"wide",argumentCallback:r=>r-1}),month:(0,Hk.buildLocalizeFn)({values:Fqe,defaultWidth:"wide"}),day:(0,Hk.buildLocalizeFn)({values:Lqe,defaultWidth:"wide"}),dayPeriod:(0,Hk.buildLocalizeFn)({values:$qe,defaultWidth:"wide",formattingValues:jqe,defaultFormattingWidth:"wide"})}});var $ce=E(Lce=>{"use strict";Lce.buildMatchFn=Bqe;function Bqe(r){return(e,t={})=>{let n=t.width,a=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(a);if(!s)return null;let i=s[0],o=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(o)?Hqe(o,u=>u.test(i)):qqe(o,u=>u.test(i)),c;c=r.valueCallback?r.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;let d=e.slice(i.length);return{value:c,rest:d}}}function qqe(r,e){for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function Hqe(r,e){for(let t=0;t{"use strict";jce.buildMatchPatternFn=Uqe;function Uqe(r){return(e,t={})=>{let n=e.match(r.matchPattern);if(!n)return null;let a=n[0],s=e.match(r.parsePattern);if(!s)return null;let i=r.valueCallback?r.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;let o=e.slice(a.length);return{value:i,rest:o}}}});var Bce=E(KL=>{"use strict";KL.match=void 0;var Uk=$ce(),Vqe=zce(),Wqe=/^(\d+)(th|st|nd|rd)?/i,Yqe=/\d+/i,Gqe={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},Zqe={any:[/^b/i,/^(a|c)/i]},Kqe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Qqe={any:[/1/i,/2/i,/3/i,/4/i]},Jqe={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},Xqe={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]},eHe={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},tHe={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]},rHe={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},nHe={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}},RYt=KL.match={ordinalNumber:(0,Vqe.buildMatchPatternFn)({matchPattern:Wqe,parsePattern:Yqe,valueCallback:r=>parseInt(r,10)}),era:(0,Uk.buildMatchFn)({matchPatterns:Gqe,defaultMatchWidth:"wide",parsePatterns:Zqe,defaultParseWidth:"any"}),quarter:(0,Uk.buildMatchFn)({matchPatterns:Kqe,defaultMatchWidth:"wide",parsePatterns:Qqe,defaultParseWidth:"any",valueCallback:r=>r+1}),month:(0,Uk.buildMatchFn)({matchPatterns:Jqe,defaultMatchWidth:"wide",parsePatterns:Xqe,defaultParseWidth:"any"}),day:(0,Uk.buildMatchFn)({matchPatterns:eHe,defaultMatchWidth:"wide",parsePatterns:tHe,defaultParseWidth:"any"}),dayPeriod:(0,Uk.buildMatchFn)({matchPatterns:rHe,defaultMatchWidth:"any",parsePatterns:nHe,defaultParseWidth:"any"})}});var qce=E(QL=>{"use strict";QL.enUS=void 0;var aHe=_ce(),sHe=Ice(),iHe=Nce(),oHe=Fce(),lHe=Bce(),FYt=QL.enUS={code:"en-US",formatDistance:aHe.formatDistance,formatLong:sHe.formatLong,formatRelative:iHe.formatRelative,localize:oHe.localize,match:lHe.match,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var wm=E(Hce=>{"use strict";Object.defineProperty(Hce,"defaultLocale",{enumerable:!0,get:function(){return cHe.enUS}});var cHe=qce()});var JL=E(Uce=>{"use strict";Uce.getDayOfYear=mHe;var dHe=Rc(),uHe=C0(),pHe=Q();function mHe(r,e){let t=(0,pHe.toDate)(r,e==null?void 0:e.in);return(0,dHe.differenceInCalendarDays)(t,(0,uHe.startOfYear)(t))+1}});var P0=E(Vce=>{"use strict";Vce.getISOWeek=vHe;var hHe=it(),fHe=bl(),gHe=kg(),yHe=Q();function vHe(r,e){let t=(0,yHe.toDate)(r,e==null?void 0:e.in),n=+(0,fHe.startOfISOWeek)(t)-+(0,gHe.startOfISOWeekYear)(t);return Math.round(n/hHe.millisecondsInWeek)+1}});var Vk=E(Gce=>{"use strict";Gce.getWeekYear=kHe;var bHe=wa(),Wce=Oe(),Yce=wo(),THe=Q();function kHe(r,e){var d,u,p,m,h,f,g,y;let t=(0,THe.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=(0,bHe.getDefaultOptions)(),s=(y=(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:(f=(h=a.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)!=null?y:1,i=(0,Wce.constructFrom)((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let o=(0,Yce.startOfWeek)(i,e),l=(0,Wce.constructFrom)((e==null?void 0:e.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);let c=(0,Yce.startOfWeek)(l,e);return+t>=+o?n+1:+t>=+c?n:n-1}});var _0=E(Zce=>{"use strict";Zce.startOfWeekYear=DHe;var wHe=wa(),SHe=Oe(),EHe=Vk(),xHe=wo();function DHe(r,e){var o,l,c,d,u,p,m,h;let t=(0,wHe.getDefaultOptions)(),n=(h=(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?h:1,a=(0,EHe.getWeekYear)(r,e),s=(0,SHe.constructFrom)((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),(0,xHe.startOfWeek)(s,e)}});var M0=E(Kce=>{"use strict";Kce.getWeek=AHe;var CHe=it(),PHe=wo(),_He=_0(),MHe=Q();function AHe(r,e){let t=(0,MHe.toDate)(r,e==null?void 0:e.in),n=+(0,PHe.startOfWeek)(t,e)-+(0,_He.startOfWeekYear)(t,e);return Math.round(n/CHe.millisecondsInWeek)+1}});var Sm=E(Qce=>{"use strict";Qce.addLeadingZeros=IHe;function IHe(r,e){let t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}});var e1=E(XL=>{"use strict";XL.lightFormatters=void 0;var Xd=Sm(),VYt=XL.lightFormatters={y(r,e){let t=r.getFullYear(),n=t>0?t:1-t;return(0,Xd.addLeadingZeros)(e==="yy"?n%100:n,e.length)},M(r,e){let t=r.getMonth();return e==="M"?String(t+1):(0,Xd.addLeadingZeros)(t+1,2)},d(r,e){return(0,Xd.addLeadingZeros)(r.getDate(),e.length)},a(r,e){let t=r.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(r,e){return(0,Xd.addLeadingZeros)(r.getHours()%12||12,e.length)},H(r,e){return(0,Xd.addLeadingZeros)(r.getHours(),e.length)},m(r,e){return(0,Xd.addLeadingZeros)(r.getMinutes(),e.length)},s(r,e){return(0,Xd.addLeadingZeros)(r.getSeconds(),e.length)},S(r,e){let t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return(0,Xd.addLeadingZeros)(a,e.length)}}});var ede=E(t1=>{"use strict";t1.formatters=void 0;var NHe=JL(),RHe=P0(),OHe=Jd(),FHe=M0(),LHe=Vk(),dn=Sm(),eu=e1(),Sg={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},YYt=t1.formatters={G:function(r,e,t){let n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){let n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return eu.lightFormatters.y(r,e)},Y:function(r,e,t,n){let a=(0,LHe.getWeekYear)(r,n),s=a>0?a:1-a;if(e==="YY"){let i=s%100;return(0,dn.addLeadingZeros)(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):(0,dn.addLeadingZeros)(s,e.length)},R:function(r,e){let t=(0,OHe.getISOWeekYear)(r);return(0,dn.addLeadingZeros)(t,e.length)},u:function(r,e){let t=r.getFullYear();return(0,dn.addLeadingZeros)(t,e.length)},Q:function(r,e,t){let n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return(0,dn.addLeadingZeros)(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){let n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return(0,dn.addLeadingZeros)(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){let n=r.getMonth();switch(e){case"M":case"MM":return eu.lightFormatters.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){let n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return(0,dn.addLeadingZeros)(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){let a=(0,FHe.getWeek)(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):(0,dn.addLeadingZeros)(a,e.length)},I:function(r,e,t){let n=(0,RHe.getISOWeek)(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):(0,dn.addLeadingZeros)(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):eu.lightFormatters.d(r,e)},D:function(r,e,t){let n=(0,NHe.getDayOfYear)(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):(0,dn.addLeadingZeros)(n,e.length)},E:function(r,e,t){let n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){let a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return(0,dn.addLeadingZeros)(s,2);case"eo":return t.ordinalNumber(s,{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(r,e,t,n){let a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return(0,dn.addLeadingZeros)(s,e.length);case"co":return t.ordinalNumber(s,{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(r,e,t){let n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return(0,dn.addLeadingZeros)(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){let a=r.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(r,e,t){let n=r.getHours(),a;switch(n===12?a=Sg.noon:n===0?a=Sg.midnight:a=n/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(r,e,t){let n=r.getHours(),a;switch(n>=17?a=Sg.evening:n>=12?a=Sg.afternoon:n>=4?a=Sg.morning:a=Sg.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(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return eu.lightFormatters.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):eu.lightFormatters.H(r,e)},K:function(r,e,t){let n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):(0,dn.addLeadingZeros)(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):(0,dn.addLeadingZeros)(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):eu.lightFormatters.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):eu.lightFormatters.s(r,e)},S:function(r,e){return eu.lightFormatters.S(r,e)},X:function(r,e,t){let n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Xce(n);case"XXXX":case"XX":return Em(n);case"XXXXX":case"XXX":default:return Em(n,":")}},x:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"x":return Xce(n);case"xxxx":case"xx":return Em(n);case"xxxxx":case"xxx":default:return Em(n,":")}},O:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Jce(n,":");case"OOOO":default:return"GMT"+Em(n,":")}},z:function(r,e,t){let n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Jce(n,":");case"zzzz":default:return"GMT"+Em(n,":")}},t:function(r,e,t){let n=Math.trunc(+r/1e3);return(0,dn.addLeadingZeros)(n,e.length)},T:function(r,e,t){return(0,dn.addLeadingZeros)(+r,e.length)}};function Jce(r,e=""){let t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+(0,dn.addLeadingZeros)(s,2)}function Xce(r,e){return r%60===0?(r>0?"-":"+")+(0,dn.addLeadingZeros)(Math.abs(r)/60,2):Em(r,e)}function Em(r,e=""){let t=r>0?"-":"+",n=Math.abs(r),a=(0,dn.addLeadingZeros)(Math.trunc(n/60),2),s=(0,dn.addLeadingZeros)(n%60,2);return t+a+e+s}});var n1=E(r1=>{"use strict";r1.longFormatters=void 0;var tde=(r,e)=>{switch(r){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"})}},rde=(r,e)=>{switch(r){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"})}},$He=(r,e)=>{let t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return tde(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",tde(n,e)).replace("{{time}}",rde(a,e))},ZYt=r1.longFormatters={p:rde,P:$He}});var a1=E(A0=>{"use strict";A0.isProtectedDayOfYearToken=qHe;A0.isProtectedWeekYearToken=HHe;A0.warnOrThrowProtectedError=UHe;var jHe=/^D+$/,zHe=/^Y+$/,BHe=["D","DD","YY","YYYY"];function qHe(r){return jHe.test(r)}function HHe(r){return zHe.test(r)}function UHe(r,e,t){let n=VHe(r,e,t);if(console.warn(n),BHe.includes(r))throw new RangeError(n)}function VHe(r,e,t){let n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}});var o1=E(Wk=>{"use strict";Wk.format=Wk.formatDate=tUe;Object.defineProperty(Wk,"formatters",{enumerable:!0,get:function(){return i1.formatters}});Object.defineProperty(Wk,"longFormatters",{enumerable:!0,get:function(){return nde.longFormatters}});var WHe=wm(),YHe=wa(),i1=ede(),nde=n1(),s1=a1(),GHe=Oc(),ZHe=Q(),KHe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QHe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JHe=/^'([^]*?)'?$/,XHe=/''/g,eUe=/[a-zA-Z]/;function tUe(r,e,t){var d,u,p,m,h,f,g,y,k,T,w,S,x,C,M,N,F,G;let n=(0,YHe.getDefaultOptions)(),a=(u=(d=t==null?void 0:t.locale)!=null?d:n.locale)!=null?u:WHe.defaultLocale,s=(T=(k=(f=(h=t==null?void 0:t.firstWeekContainsDate)!=null?h:(m=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:n.firstWeekContainsDate)!=null?k:(y=(g=n.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)!=null?T:1,i=(G=(F=(C=(x=t==null?void 0:t.weekStartsOn)!=null?x:(S=(w=t==null?void 0:t.locale)==null?void 0:w.options)==null?void 0:S.weekStartsOn)!=null?C:n.weekStartsOn)!=null?F:(N=(M=n.locale)==null?void 0:M.options)==null?void 0:N.weekStartsOn)!=null?G:0,o=(0,ZHe.toDate)(r,t==null?void 0:t.in);if(!(0,GHe.isValid)(o))throw new RangeError("Invalid time value");let l=e.match(QHe).map(R=>{let A=R[0];if(A==="p"||A==="P"){let I=nde.longFormatters[A];return I(R,a.formatLong)}return R}).join("").match(KHe).map(R=>{if(R==="''")return{isToken:!1,value:"'"};let A=R[0];if(A==="'")return{isToken:!1,value:rUe(R)};if(i1.formatters[A])return{isToken:!0,value:R};if(A.match(eUe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:R}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(R=>{if(!R.isToken)return R.value;let A=R.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&(0,s1.isProtectedWeekYearToken)(A)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&(0,s1.isProtectedDayOfYearToken)(A))&&(0,s1.warnOrThrowProtectedError)(A,e,String(r));let I=i1.formatters[A[0]];return I(o,A,a.localize,c)}).join("")}function rUe(r){let e=r.match(JHe);return e?e[1].replace(XHe,"'"):r}});var l1=E(sde=>{"use strict";sde.formatDistance=cUe;var nUe=wm(),aUe=wa(),ade=Nc(),sUe=ir(),iUe=km(),Eg=it(),oUe=zk(),lUe=Bk();function cUe(r,e,t){var h,f;let n=(0,aUe.getDefaultOptions)(),a=(f=(h=t==null?void 0:t.locale)!=null?h:n.locale)!=null?f:nUe.defaultLocale,s=2520,i=(0,iUe.compareAsc)(r,e);if(isNaN(i))throw new RangeError("Invalid time value");let o=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:i}),[l,c]=(0,sUe.normalizeDates)(t==null?void 0:t.in,...i>0?[e,r]:[r,e]),d=(0,lUe.differenceInSeconds)(c,l),u=((0,ade.getTimezoneOffsetInMilliseconds)(c)-(0,ade.getTimezoneOffsetInMilliseconds)(l))/1e3,p=Math.round((d-u)/60),m;if(p<2)return t!=null&&t.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,o):d<10?a.formatDistance("lessThanXSeconds",10,o):d<20?a.formatDistance("lessThanXSeconds",20,o):d<40?a.formatDistance("halfAMinute",0,o):d<60?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",1,o):p===0?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",p,o);if(p<45)return a.formatDistance("xMinutes",p,o);if(p<90)return a.formatDistance("aboutXHours",1,o);if(p{"use strict";ode.formatDistanceStrict=fUe;var dUe=wm(),uUe=wa(),pUe=Fc(),ide=Nc(),mUe=ir(),hUe=km(),tu=it();function fUe(r,e,t){var g,y,k;let n=(0,uUe.getDefaultOptions)(),a=(y=(g=t==null?void 0:t.locale)!=null?g:n.locale)!=null?y:dUe.defaultLocale,s=(0,hUe.compareAsc)(r,e);if(isNaN(s))throw new RangeError("Invalid time value");let i=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:s}),[o,l]=(0,mUe.normalizeDates)(t==null?void 0:t.in,...s>0?[e,r]:[r,e]),c=(0,pUe.getRoundingMethod)((k=t==null?void 0:t.roundingMethod)!=null?k:"round"),d=l.getTime()-o.getTime(),u=d/tu.millisecondsInMinute,p=(0,ide.getTimezoneOffsetInMilliseconds)(l)-(0,ide.getTimezoneOffsetInMilliseconds)(o),m=(d-p)/tu.millisecondsInMinute,h=t==null?void 0:t.unit,f;if(h?f=h:u<1?f="second":u<60?f="minute":u{"use strict";lde.formatDistanceToNow=vUe;var gUe=_n(),yUe=l1();function vUe(r,e){return(0,yUe.formatDistance)(r,(0,gUe.constructNow)(r),e)}});var ude=E(dde=>{"use strict";dde.formatDistanceToNowStrict=kUe;var bUe=_n(),TUe=c1();function kUe(r,e){return(0,TUe.formatDistanceStrict)(r,(0,bUe.constructNow)(r),e)}});var mde=E(pde=>{"use strict";pde.formatDuration=xUe;var wUe=wm(),SUe=wa(),EUe=["years","months","weeks","days","hours","minutes","seconds"];function xUe(r,e){var l,c,d,u,p;let t=(0,SUe.getDefaultOptions)(),n=(c=(l=e==null?void 0:e.locale)!=null?l:t.locale)!=null?c:wUe.defaultLocale,a=(d=e==null?void 0:e.format)!=null?d:EUe,s=(u=e==null?void 0:e.zero)!=null?u:!1,i=(p=e==null?void 0:e.delimiter)!=null?p:" ";return n.formatDistance?a.reduce((m,h)=>{let f=`x${h.replace(/(^.)/,y=>y.toUpperCase())}`,g=r[h];return g!==void 0&&(s||r[h])?m.concat(n.formatDistance(f,g)):m},[]).join(i):""}});var fde=E(hde=>{"use strict";hde.formatISO=CUe;var ru=Sm(),DUe=Q();function CUe(r,e){var c,d;let t=(0,DUe.toDate)(r,e==null?void 0:e.in);if(isNaN(+t))throw new RangeError("Invalid time value");let n=(c=e==null?void 0:e.format)!=null?c:"extended",a=(d=e==null?void 0:e.representation)!=null?d:"complete",s="",i="",o=n==="extended"?"-":"",l=n==="extended"?":":"";if(a!=="time"){let u=(0,ru.addLeadingZeros)(t.getDate(),2),p=(0,ru.addLeadingZeros)(t.getMonth()+1,2);s=`${(0,ru.addLeadingZeros)(t.getFullYear(),4)}${o}${p}${o}${u}`}if(a!=="date"){let u=t.getTimezoneOffset();if(u!==0){let y=Math.abs(u),k=(0,ru.addLeadingZeros)(Math.trunc(y/60),2),T=(0,ru.addLeadingZeros)(y%60,2);i=`${u<0?"+":"-"}${k}:${T}`}else i="Z";let p=(0,ru.addLeadingZeros)(t.getHours(),2),m=(0,ru.addLeadingZeros)(t.getMinutes(),2),h=(0,ru.addLeadingZeros)(t.getSeconds(),2),f=s===""?"":"T",g=[p,m,h].join(l);s=`${s}${f}${g}${i}`}return s}});var yde=E(gde=>{"use strict";gde.formatISO9075=MUe;var xg=Sm(),PUe=Oc(),_Ue=Q();function MUe(r,e){var l,c;let t=(0,_Ue.toDate)(r,e==null?void 0:e.in);if(!(0,PUe.isValid)(t))throw new RangeError("Invalid time value");let n=(l=e==null?void 0:e.format)!=null?l:"extended",a=(c=e==null?void 0:e.representation)!=null?c:"complete",s="",i=n==="extended"?"-":"",o=n==="extended"?":":"";if(a!=="time"){let d=(0,xg.addLeadingZeros)(t.getDate(),2),u=(0,xg.addLeadingZeros)(t.getMonth()+1,2);s=`${(0,xg.addLeadingZeros)(t.getFullYear(),4)}${i}${u}${i}${d}`}if(a!=="date"){let d=(0,xg.addLeadingZeros)(t.getHours(),2),u=(0,xg.addLeadingZeros)(t.getMinutes(),2),p=(0,xg.addLeadingZeros)(t.getSeconds(),2);s=`${s}${s===""?"":" "}${d}${o}${u}${o}${p}`}return s}});var bde=E(vde=>{"use strict";vde.formatISODuration=AUe;function AUe(r){let{years:e=0,months:t=0,days:n=0,hours:a=0,minutes:s=0,seconds:i=0}=r;return`P${e}Y${t}M${n}DT${a}H${s}M${i}S`}});var kde=E(Tde=>{"use strict";Tde.formatRFC3339=RUe;var nu=Sm(),IUe=Oc(),NUe=Q();function RUe(r,e){var m;let t=(0,NUe.toDate)(r,e==null?void 0:e.in);if(!(0,IUe.isValid)(t))throw new RangeError("Invalid time value");let n=(m=e==null?void 0:e.fractionDigits)!=null?m:0,a=(0,nu.addLeadingZeros)(t.getDate(),2),s=(0,nu.addLeadingZeros)(t.getMonth()+1,2),i=t.getFullYear(),o=(0,nu.addLeadingZeros)(t.getHours(),2),l=(0,nu.addLeadingZeros)(t.getMinutes(),2),c=(0,nu.addLeadingZeros)(t.getSeconds(),2),d="";if(n>0){let h=t.getMilliseconds(),f=Math.trunc(h*Math.pow(10,n-3));d="."+(0,nu.addLeadingZeros)(f,n)}let u="",p=t.getTimezoneOffset();if(p!==0){let h=Math.abs(p),f=(0,nu.addLeadingZeros)(Math.trunc(h/60),2),g=(0,nu.addLeadingZeros)(h%60,2);u=`${p<0?"+":"-"}${f}:${g}`}else u="Z";return`${i}-${s}-${a}T${o}:${l}:${c}${d}${u}`}});var Sde=E(wde=>{"use strict";wde.formatRFC7231=jUe;var I0=Sm(),OUe=Oc(),FUe=Q(),LUe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],$Ue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jUe(r){let e=(0,FUe.toDate)(r);if(!(0,OUe.isValid)(e))throw new RangeError("Invalid time value");let t=LUe[e.getUTCDay()],n=(0,I0.addLeadingZeros)(e.getUTCDate(),2),a=$Ue[e.getUTCMonth()],s=e.getUTCFullYear(),i=(0,I0.addLeadingZeros)(e.getUTCHours(),2),o=(0,I0.addLeadingZeros)(e.getUTCMinutes(),2),l=(0,I0.addLeadingZeros)(e.getUTCSeconds(),2);return`${t}, ${n} ${a} ${s} ${i}:${o}:${l} GMT`}});var xde=E(Ede=>{"use strict";Ede.formatRelative=VUe;var zUe=wm(),BUe=wa(),qUe=ir(),HUe=Rc(),UUe=o1();function VUe(r,e,t){var u,p,m,h,f,g,y,k,T,w;let[n,a]=(0,qUe.normalizeDates)(t==null?void 0:t.in,r,e),s=(0,BUe.getDefaultOptions)(),i=(p=(u=t==null?void 0:t.locale)!=null?u:s.locale)!=null?p:zUe.defaultLocale,o=(w=(T=(g=(f=t==null?void 0:t.weekStartsOn)!=null?f:(h=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:h.weekStartsOn)!=null?g:s.weekStartsOn)!=null?T:(k=(y=s.locale)==null?void 0:y.options)==null?void 0:k.weekStartsOn)!=null?w:0,l=(0,HUe.differenceInCalendarDays)(n,a);if(isNaN(l))throw new RangeError("Invalid time value");let c;l<-6?c="other":l<-1?c="lastWeek":l<0?c="yesterday":l<1?c="today":l<2?c="tomorrow":l<7?c="nextWeek":c="other";let d=i.formatRelative(c,n,a,{locale:i,weekStartsOn:o});return(0,UUe.format)(n,d,{locale:i,weekStartsOn:o})}});var Cde=E(Dde=>{"use strict";Dde.fromUnixTime=YUe;var WUe=Q();function YUe(r,e){return(0,WUe.toDate)(r*1e3,e==null?void 0:e.in)}});var d1=E(Pde=>{"use strict";Pde.getDate=ZUe;var GUe=Q();function ZUe(r,e){return(0,GUe.toDate)(r,e==null?void 0:e.in).getDate()}});var Yk=E(_de=>{"use strict";_de.getDay=QUe;var KUe=Q();function QUe(r,e){return(0,KUe.toDate)(r,e==null?void 0:e.in).getDay()}});var u1=E(Mde=>{"use strict";Mde.getDaysInMonth=e2e;var JUe=Oe(),XUe=Q();function e2e(r,e){let t=(0,XUe.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=t.getMonth(),s=(0,JUe.constructFrom)(t,0);return s.setFullYear(n,a+1,0),s.setHours(0,0,0,0),s.getDate()}});var p1=E(Ade=>{"use strict";Ade.isLeapYear=r2e;var t2e=Q();function r2e(r,e){let n=(0,t2e.toDate)(r,e==null?void 0:e.in).getFullYear();return n%400===0||n%4===0&&n%100!==0}});var Nde=E(Ide=>{"use strict";Ide.getDaysInYear=s2e;var n2e=p1(),a2e=Q();function s2e(r,e){let t=(0,a2e.toDate)(r,e==null?void 0:e.in);return Number.isNaN(+t)?NaN:(0,n2e.isLeapYear)(t)?366:365}});var Ode=E(Rde=>{"use strict";Rde.getDecade=o2e;var i2e=Q();function o2e(r,e){let n=(0,i2e.toDate)(r,e==null?void 0:e.in).getFullYear();return Math.floor(n/10)*10}});var m1=E(Fde=>{"use strict";Fde.getDefaultOptions=c2e;var l2e=wa();function c2e(){return Object.assign({},(0,l2e.getDefaultOptions)())}});var $de=E(Lde=>{"use strict";Lde.getHours=u2e;var d2e=Q();function u2e(r,e){return(0,d2e.toDate)(r,e==null?void 0:e.in).getHours()}});var h1=E(jde=>{"use strict";jde.getISODay=m2e;var p2e=Q();function m2e(r,e){let t=(0,p2e.toDate)(r,e==null?void 0:e.in).getDay();return t===0?7:t}});var qde=E(Bde=>{"use strict";Bde.getISOWeeksInYear=g2e;var h2e=jk(),f2e=it(),zde=kg();function g2e(r,e){let t=(0,zde.startOfISOWeekYear)(r,e),a=+(0,zde.startOfISOWeekYear)((0,h2e.addWeeks)(t,60))-+t;return Math.round(a/f2e.millisecondsInWeek)}});var Ude=E(Hde=>{"use strict";Hde.getMilliseconds=v2e;var y2e=Q();function v2e(r){return(0,y2e.toDate)(r).getMilliseconds()}});var Wde=E(Vde=>{"use strict";Vde.getMinutes=T2e;var b2e=Q();function T2e(r,e){return(0,b2e.toDate)(r,e==null?void 0:e.in).getMinutes()}});var Gde=E(Yde=>{"use strict";Yde.getMonth=w2e;var k2e=Q();function w2e(r,e){return(0,k2e.toDate)(r,e==null?void 0:e.in).getMonth()}});var Qde=E(Kde=>{"use strict";Kde.getOverlappingDaysInIntervals=E2e;var Zde=Nc(),S2e=it(),N0=Q();function E2e(r,e){let[t,n]=[+(0,N0.toDate)(r.start),+(0,N0.toDate)(r.end)].sort((u,p)=>u-p),[a,s]=[+(0,N0.toDate)(e.start),+(0,N0.toDate)(e.end)].sort((u,p)=>u-p);if(!(tn?n:s,d=c-(0,Zde.getTimezoneOffsetInMilliseconds)(c);return Math.ceil((d-l)/S2e.millisecondsInDay)}});var Xde=E(Jde=>{"use strict";Jde.getSeconds=D2e;var x2e=Q();function D2e(r){return(0,x2e.toDate)(r).getSeconds()}});var tue=E(eue=>{"use strict";eue.getTime=P2e;var C2e=Q();function P2e(r){return+(0,C2e.toDate)(r)}});var nue=E(rue=>{"use strict";rue.getUnixTime=M2e;var _2e=Q();function M2e(r){return Math.trunc(+(0,_2e.toDate)(r)/1e3)}});var sue=E(aue=>{"use strict";aue.getWeekOfMonth=F2e;var A2e=wa(),I2e=d1(),N2e=Yk(),R2e=qk(),O2e=Q();function F2e(r,e){var l,c,d,u,p,m,h,f;let t=(0,A2e.getDefaultOptions)(),n=(f=(h=(u=(d=e==null?void 0:e.weekStartsOn)!=null?d:(c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)!=null?u:t.weekStartsOn)!=null?h:(m=(p=t.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)!=null?f:0,a=(0,I2e.getDate)((0,O2e.toDate)(r,e==null?void 0:e.in));if(isNaN(a))return NaN;let s=(0,N2e.getDay)((0,R2e.startOfMonth)(r,e)),i=n-s;i<=0&&(i+=7);let o=a-i;return Math.ceil(o/7)+1}});var f1=E(oue=>{"use strict";oue.lastDayOfMonth=L2e;var iue=Q();function L2e(r,e){let t=(0,iue.toDate)(r,e==null?void 0:e.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),(0,iue.toDate)(t,e==null?void 0:e.in)}});var cue=E(lue=>{"use strict";lue.getWeeksInMonth=q2e;var $2e=f0(),j2e=f1(),z2e=qk(),B2e=Q();function q2e(r,e){let t=(0,B2e.toDate)(r,e==null?void 0:e.in);return(0,$2e.differenceInCalendarWeeks)((0,j2e.lastDayOfMonth)(t,e),(0,z2e.startOfMonth)(t,e),e)+1}});var uue=E(due=>{"use strict";due.getYear=U2e;var H2e=Q();function U2e(r,e){return(0,H2e.toDate)(r,e==null?void 0:e.in).getFullYear()}});var mue=E(pue=>{"use strict";pue.hoursToMilliseconds=W2e;var V2e=it();function W2e(r){return Math.trunc(r*V2e.millisecondsInHour)}});var fue=E(hue=>{"use strict";hue.hoursToMinutes=G2e;var Y2e=it();function G2e(r){return Math.trunc(r*Y2e.minutesInHour)}});var yue=E(gue=>{"use strict";gue.hoursToSeconds=K2e;var Z2e=it();function K2e(r){return Math.trunc(r*Z2e.secondsInHour)}});var bue=E(vue=>{"use strict";vue.interval=J2e;var Q2e=ir();function J2e(r,e,t){let[n,a]=(0,Q2e.normalizeDates)(t==null?void 0:t.in,r,e);if(isNaN(+n))throw new TypeError("Start date is invalid");if(isNaN(+a))throw new TypeError("End date is invalid");if(t!=null&&t.assertPositive&&+n>+a)throw new TypeError("End date must be after start date");return{start:n,end:a}}});var kue=E(Tue=>{"use strict";Tue.intervalToDuration=iVe;var X2e=Tl(),Gk=TL(),eVe=y0(),tVe=v0(),rVe=T0(),nVe=zk(),aVe=Bk(),sVe=BL();function iVe(r,e){let{start:t,end:n}=(0,X2e.normalizeInterval)(e==null?void 0:e.in,r),a={},s=(0,sVe.differenceInYears)(n,t);s&&(a.years=s);let i=(0,Gk.add)(t,{years:a.years}),o=(0,nVe.differenceInMonths)(n,i);o&&(a.months=o);let l=(0,Gk.add)(i,{months:a.months}),c=(0,eVe.differenceInDays)(n,l);c&&(a.days=c);let d=(0,Gk.add)(l,{days:a.days}),u=(0,tVe.differenceInHours)(n,d);u&&(a.hours=u);let p=(0,Gk.add)(d,{hours:a.hours}),m=(0,rVe.differenceInMinutes)(n,p);m&&(a.minutes=m);let h=(0,Gk.add)(p,{minutes:a.minutes}),f=(0,aVe.differenceInSeconds)(n,h);return f&&(a.seconds=f),a}});var Sue=E(wue=>{"use strict";wue.intlFormat=lVe;var oVe=Q();function lVe(r,e,t){let n;return cVe(e)?n=e:t=e,new Intl.DateTimeFormat(t==null?void 0:t.locale,n).format((0,oVe.toDate)(r))}function cVe(r){return r!==void 0&&!("locale"in r)}});var _ue=E(Pue=>{"use strict";Pue.intlFormatDistance=uVe;var dVe=ir(),xm=it(),g1=Rc(),Eue=h0(),y1=LL(),xue=f0(),v1=g0(),Due=v0(),Cue=T0(),b1=Bk();function uVe(r,e,t){let n=0,a,[s,i]=(0,dVe.normalizeDates)(t==null?void 0:t.in,r,e);if(t!=null&&t.unit)a=t==null?void 0:t.unit,a==="second"?n=(0,b1.differenceInSeconds)(s,i):a==="minute"?n=(0,Cue.differenceInMinutes)(s,i):a==="hour"?n=(0,Due.differenceInHours)(s,i):a==="day"?n=(0,g1.differenceInCalendarDays)(s,i):a==="week"?n=(0,xue.differenceInCalendarWeeks)(s,i):a==="month"?n=(0,Eue.differenceInCalendarMonths)(s,i):a==="quarter"?n=(0,y1.differenceInCalendarQuarters)(s,i):a==="year"&&(n=(0,v1.differenceInCalendarYears)(s,i));else{let l=(0,b1.differenceInSeconds)(s,i);Math.abs(l){"use strict";Aue.isAfter=pVe;var Mue=Q();function pVe(r,e){return+(0,Mue.toDate)(r)>+(0,Mue.toDate)(e)}});var Oue=E(Rue=>{"use strict";Rue.isBefore=mVe;var Nue=Q();function mVe(r,e){return+(0,Nue.toDate)(r)<+(0,Nue.toDate)(e)}});var $ue=E(Lue=>{"use strict";Lue.isEqual=hVe;var Fue=Q();function hVe(r,e){return+(0,Fue.toDate)(r)==+(0,Fue.toDate)(e)}});var zue=E(jue=>{"use strict";jue.isExists=fVe;function fVe(r,e,t){let n=new Date(r,e,t);return n.getFullYear()===r&&n.getMonth()===e&&n.getDate()===t}});var que=E(Bue=>{"use strict";Bue.isFirstDayOfMonth=yVe;var gVe=Q();function yVe(r,e){return(0,gVe.toDate)(r,e==null?void 0:e.in).getDate()===1}});var Uue=E(Hue=>{"use strict";Hue.isFriday=bVe;var vVe=Q();function bVe(r,e){return(0,vVe.toDate)(r,e==null?void 0:e.in).getDay()===5}});var Wue=E(Vue=>{"use strict";Vue.isFuture=kVe;var TVe=Q();function kVe(r){return+(0,TVe.toDate)(r)>Date.now()}});var T1=E(Yue=>{"use strict";Yue.transpose=SVe;var wVe=Oe();function SVe(r,e){let t=EVe(e)?new e(0):(0,wVe.constructFrom)(e,0);return t.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),t.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),t}function EVe(r){var e;return typeof r=="function"&&((e=r.prototype)==null?void 0:e.constructor)===r}});var S1=E(Dm=>{"use strict";Dm.ValueSetter=Dm.Setter=Dm.DateTimezoneSetter=void 0;var Gue=Oe(),xVe=T1(),DVe=10,Zk=class{constructor(){_(this,"subPriority",0)}validate(e,t){return!0}};Dm.Setter=Zk;var k1=class extends Zk{constructor(e,t,n,a,s){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=a,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}};Dm.ValueSetter=k1;var w1=class extends Zk{constructor(t,n){super();_(this,"priority",DVe);_(this,"subPriority",-1);this.context=t||(a=>(0,Gue.constructFrom)(n,a))}set(t,n){return n.timestampIsSet?t:(0,Gue.constructFrom)(t,(0,xVe.transpose)(t,this.context))}};Dm.DateTimezoneSetter=w1});var Zt=E(x1=>{"use strict";x1.Parser=void 0;var CVe=S1(),E1=class{run(e,t,n,a){let s=this.parse(e,t,n,a);return s?{setter:new CVe.ValueSetter(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,n){return!0}};x1.Parser=E1});var Zue=E(C1=>{"use strict";C1.EraParser=void 0;var PVe=Zt(),D1=class extends PVe.Parser{constructor(){super(...arguments);_(this,"priority",140);_(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,n,a){return n.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}};C1.EraParser=D1});var Sa=E(Kk=>{"use strict";Kk.timezonePatterns=Kk.numericPatterns=void 0;var JGt=Kk.numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},XGt=Kk.timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/}});var nr=E(kl=>{"use strict";kl.dayPeriodEnumToHours=RVe;kl.isLeapYearIndex=FVe;kl.mapValue=_Ve;kl.normalizeTwoDigitYear=OVe;kl.parseAnyDigitsSigned=AVe;kl.parseNDigits=IVe;kl.parseNDigitsSigned=NVe;kl.parseNumericPattern=$i;kl.parseTimezonePattern=MVe;var P1=it(),Lc=Sa();function _Ve(r,e){return r&&{value:e(r.value),rest:r.rest}}function $i(r,e){let t=e.match(r);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function MVe(r,e){let t=e.match(r);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};let n=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:n*(a*P1.millisecondsInHour+s*P1.millisecondsInMinute+i*P1.millisecondsInSecond),rest:e.slice(t[0].length)}}function AVe(r){return $i(Lc.numericPatterns.anyDigitsSigned,r)}function IVe(r,e){switch(r){case 1:return $i(Lc.numericPatterns.singleDigit,e);case 2:return $i(Lc.numericPatterns.twoDigits,e);case 3:return $i(Lc.numericPatterns.threeDigits,e);case 4:return $i(Lc.numericPatterns.fourDigits,e);default:return $i(new RegExp("^\\d{1,"+r+"}"),e)}}function NVe(r,e){switch(r){case 1:return $i(Lc.numericPatterns.singleDigitSigned,e);case 2:return $i(Lc.numericPatterns.twoDigitsSigned,e);case 3:return $i(Lc.numericPatterns.threeDigitsSigned,e);case 4:return $i(Lc.numericPatterns.fourDigitsSigned,e);default:return $i(new RegExp("^-?\\d{1,"+r+"}"),e)}}function RVe(r){switch(r){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function OVe(r,e){let t=e>0,n=t?e:1-e,a;if(n<=50)a=r||100;else{let s=n+50,i=Math.trunc(s/100)*100,o=r>=s%100;a=r+i-(o?100:0)}return t?a:1-a}function FVe(r){return r%400===0||r%4===0&&r%100!==0}});var Kue=E(M1=>{"use strict";M1.YearParser=void 0;var LVe=Zt(),Dg=nr(),_1=class extends LVe.Parser{constructor(){super(...arguments);_(this,"priority",130);_(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,a){let s=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return(0,Dg.mapValue)((0,Dg.parseNDigits)(4,t),s);case"yo":return(0,Dg.mapValue)(a.ordinalNumber(t,{unit:"year"}),s);default:return(0,Dg.mapValue)((0,Dg.parseNDigits)(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a){let s=t.getFullYear();if(a.isTwoDigitYear){let o=(0,Dg.normalizeTwoDigitYear)(a.year,s);return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}let i=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}};M1.YearParser=_1});var Jue=E(I1=>{"use strict";I1.LocalWeekYearParser=void 0;var $Ve=Vk(),Que=wo(),jVe=Zt(),Cg=nr(),A1=class extends jVe.Parser{constructor(){super(...arguments);_(this,"priority",130);_(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,a){let s=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return(0,Cg.mapValue)((0,Cg.parseNDigits)(4,t),s);case"Yo":return(0,Cg.mapValue)(a.ordinalNumber(t,{unit:"year"}),s);default:return(0,Cg.mapValue)((0,Cg.parseNDigits)(n.length,t),s)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,s){let i=(0,$Ve.getWeekYear)(t,s);if(a.isTwoDigitYear){let l=(0,Cg.normalizeTwoDigitYear)(a.year,i);return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),(0,Que.startOfWeek)(t,s)}let o=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(o,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),(0,Que.startOfWeek)(t,s)}};I1.LocalWeekYearParser=A1});var epe=E(R1=>{"use strict";R1.ISOWeekYearParser=void 0;var zVe=bl(),BVe=Oe(),qVe=Zt(),Xue=nr(),N1=class extends qVe.Parser{constructor(){super(...arguments);_(this,"priority",130);_(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return n==="R"?(0,Xue.parseNDigitsSigned)(4,t):(0,Xue.parseNDigitsSigned)(n.length,t)}set(t,n,a){let s=(0,BVe.constructFrom)(t,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),(0,zVe.startOfISOWeek)(s)}};R1.ISOWeekYearParser=N1});var rpe=E(F1=>{"use strict";F1.ExtendedYearParser=void 0;var HVe=Zt(),tpe=nr(),O1=class extends HVe.Parser{constructor(){super(...arguments);_(this,"priority",130);_(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return n==="u"?(0,tpe.parseNDigitsSigned)(4,t):(0,tpe.parseNDigitsSigned)(n.length,t)}set(t,n,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}};F1.ExtendedYearParser=O1});var npe=E($1=>{"use strict";$1.QuarterParser=void 0;var UVe=Zt(),VVe=nr(),L1=class extends UVe.Parser{constructor(){super(...arguments);_(this,"priority",120);_(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"Q":case"QQ":return(0,VVe.parseNDigits)(n.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}};$1.QuarterParser=L1});var ape=E(z1=>{"use strict";z1.StandAloneQuarterParser=void 0;var WVe=Zt(),YVe=nr(),j1=class extends WVe.Parser{constructor(){super(...arguments);_(this,"priority",120);_(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"q":case"qq":return(0,YVe.parseNDigits)(n.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}};z1.StandAloneQuarterParser=j1});var spe=E(q1=>{"use strict";q1.MonthParser=void 0;var GVe=Sa(),ZVe=Zt(),Qk=nr(),B1=class extends ZVe.Parser{constructor(){super(...arguments);_(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);_(this,"priority",110)}parse(t,n,a){let s=i=>i-1;switch(n){case"M":return(0,Qk.mapValue)((0,Qk.parseNumericPattern)(GVe.numericPatterns.month,t),s);case"MM":return(0,Qk.mapValue)((0,Qk.parseNDigits)(2,t),s);case"Mo":return(0,Qk.mapValue)(a.ordinalNumber(t,{unit:"month"}),s);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}};q1.MonthParser=B1});var ipe=E(U1=>{"use strict";U1.StandAloneMonthParser=void 0;var KVe=Sa(),QVe=Zt(),Jk=nr(),H1=class extends QVe.Parser{constructor(){super(...arguments);_(this,"priority",110);_(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,a){let s=i=>i-1;switch(n){case"L":return(0,Jk.mapValue)((0,Jk.parseNumericPattern)(KVe.numericPatterns.month,t),s);case"LL":return(0,Jk.mapValue)((0,Jk.parseNDigits)(2,t),s);case"Lo":return(0,Jk.mapValue)(a.ordinalNumber(t,{unit:"month"}),s);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}};U1.StandAloneMonthParser=H1});var V1=E(lpe=>{"use strict";lpe.setWeek=XVe;var JVe=M0(),ope=Q();function XVe(r,e,t){let n=(0,ope.toDate)(r,t==null?void 0:t.in),a=(0,JVe.getWeek)(n,t)-e;return n.setDate(n.getDate()-a*7),(0,ope.toDate)(n,t==null?void 0:t.in)}});var dpe=E(Y1=>{"use strict";Y1.LocalWeekParser=void 0;var eWe=V1(),tWe=wo(),rWe=Sa(),nWe=Zt(),cpe=nr(),W1=class extends nWe.Parser{constructor(){super(...arguments);_(this,"priority",100);_(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,a){switch(n){case"w":return(0,cpe.parseNumericPattern)(rWe.numericPatterns.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return(0,cpe.parseNDigits)(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,s){return(0,tWe.startOfWeek)((0,eWe.setWeek)(t,a,s),s)}};Y1.LocalWeekParser=W1});var G1=E(upe=>{"use strict";upe.setISOWeek=iWe;var aWe=P0(),sWe=Q();function iWe(r,e,t){let n=(0,sWe.toDate)(r,t==null?void 0:t.in),a=(0,aWe.getISOWeek)(n,t)-e;return n.setDate(n.getDate()-a*7),n}});var mpe=E(K1=>{"use strict";K1.ISOWeekParser=void 0;var oWe=G1(),lWe=bl(),cWe=Sa(),dWe=Zt(),ppe=nr(),Z1=class extends dWe.Parser{constructor(){super(...arguments);_(this,"priority",100);_(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,a){switch(n){case"I":return(0,ppe.parseNumericPattern)(cWe.numericPatterns.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return(0,ppe.parseNDigits)(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return(0,lWe.startOfISOWeek)((0,oWe.setISOWeek)(t,a))}};K1.ISOWeekParser=Z1});var hpe=E(X1=>{"use strict";X1.DateParser=void 0;var uWe=Sa(),pWe=Zt(),Q1=nr(),mWe=[31,28,31,30,31,30,31,31,30,31,30,31],hWe=[31,29,31,30,31,30,31,31,30,31,30,31],J1=class extends pWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"subPriority",1);_(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"d":return(0,Q1.parseNumericPattern)(uWe.numericPatterns.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return(0,Q1.parseNDigits)(n.length,t)}}validate(t,n){let a=t.getFullYear(),s=(0,Q1.isLeapYearIndex)(a),i=t.getMonth();return s?n>=1&&n<=hWe[i]:n>=1&&n<=mWe[i]}set(t,n,a){return t.setDate(a),t.setHours(0,0,0,0),t}};X1.DateParser=J1});var fpe=E(r$=>{"use strict";r$.DayOfYearParser=void 0;var fWe=Sa(),gWe=Zt(),e$=nr(),t$=class extends gWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"subpriority",1);_(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,a){switch(n){case"D":case"DD":return(0,e$.parseNumericPattern)(fWe.numericPatterns.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return(0,e$.parseNDigits)(n.length,t)}}validate(t,n){let a=t.getFullYear();return(0,e$.isLeapYearIndex)(a)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}};r$.DayOfYearParser=t$});var Xk=E(gpe=>{"use strict";gpe.setDay=TWe;var yWe=wa(),vWe=vl(),bWe=Q();function TWe(r,e,t){var u,p,m,h,f,g,y,k;let n=(0,yWe.getDefaultOptions)(),a=(k=(y=(h=(m=t==null?void 0:t.weekStartsOn)!=null?m:(p=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:n.weekStartsOn)!=null?y:(g=(f=n.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)!=null?k:0,s=(0,bWe.toDate)(r,t==null?void 0:t.in),i=s.getDay(),l=(e%7+7)%7,c=7-a,d=e<0||e>6?e-(i+c)%7:(l+c)%7-(i+c)%7;return(0,vWe.addDays)(s,d,t)}});var ype=E(a$=>{"use strict";a$.DayParser=void 0;var kWe=Xk(),wWe=Zt(),n$=class extends wWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,s){return t=(0,kWe.setDay)(t,a,s),t.setHours(0,0,0,0),t}};a$.DayParser=n$});var vpe=E(o$=>{"use strict";o$.LocalDayParser=void 0;var SWe=Xk(),EWe=Zt(),s$=nr(),i$=class extends EWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,a,s){let i=o=>{let l=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return(0,s$.mapValue)((0,s$.parseNDigits)(n.length,t),i);case"eo":return(0,s$.mapValue)(a.ordinalNumber(t,{unit:"day"}),i);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,s){return t=(0,SWe.setDay)(t,a,s),t.setHours(0,0,0,0),t}};o$.LocalDayParser=i$});var bpe=E(d$=>{"use strict";d$.StandAloneLocalDayParser=void 0;var xWe=Xk(),DWe=Zt(),l$=nr(),c$=class extends DWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,a,s){let i=o=>{let l=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return(0,l$.mapValue)((0,l$.parseNDigits)(n.length,t),i);case"co":return(0,l$.mapValue)(a.ordinalNumber(t,{unit:"day"}),i);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,s){return t=(0,xWe.setDay)(t,a,s),t.setHours(0,0,0,0),t}};d$.StandAloneLocalDayParser=c$});var u$=E(Tpe=>{"use strict";Tpe.setISODay=MWe;var CWe=vl(),PWe=h1(),_We=Q();function MWe(r,e,t){let n=(0,_We.toDate)(r,t==null?void 0:t.in),a=(0,PWe.getISODay)(n,t),s=e-a;return(0,CWe.addDays)(n,s,t)}});var kpe=E(m$=>{"use strict";m$.ISODayParser=void 0;var AWe=u$(),IWe=Zt(),ew=nr(),p$=class extends IWe.Parser{constructor(){super(...arguments);_(this,"priority",90);_(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,a){let s=i=>i===0?7:i;switch(n){case"i":case"ii":return(0,ew.parseNDigits)(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return(0,ew.mapValue)(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return(0,ew.mapValue)(a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return(0,ew.mapValue)(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return(0,ew.mapValue)(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,n){return n>=1&&n<=7}set(t,n,a){return t=(0,AWe.setISODay)(t,a),t.setHours(0,0,0,0),t}};m$.ISODayParser=p$});var wpe=E(f$=>{"use strict";f$.AMPMParser=void 0;var NWe=Zt(),RWe=nr(),h$=class extends NWe.Parser{constructor(){super(...arguments);_(this,"priority",80);_(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours((0,RWe.dayPeriodEnumToHours)(a),0,0,0),t}};f$.AMPMParser=h$});var Spe=E(y$=>{"use strict";y$.AMPMMidnightParser=void 0;var OWe=Zt(),FWe=nr(),g$=class extends OWe.Parser{constructor(){super(...arguments);_(this,"priority",80);_(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours((0,FWe.dayPeriodEnumToHours)(a),0,0,0),t}};y$.AMPMMidnightParser=g$});var Epe=E(b$=>{"use strict";b$.DayPeriodParser=void 0;var LWe=Zt(),$We=nr(),v$=class extends LWe.Parser{constructor(){super(...arguments);_(this,"priority",80);_(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours((0,$We.dayPeriodEnumToHours)(a),0,0,0),t}};b$.DayPeriodParser=v$});var Dpe=E(k$=>{"use strict";k$.Hour1to12Parser=void 0;var jWe=Sa(),zWe=Zt(),xpe=nr(),T$=class extends zWe.Parser{constructor(){super(...arguments);_(this,"priority",70);_(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,a){switch(n){case"h":return(0,xpe.parseNumericPattern)(jWe.numericPatterns.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return(0,xpe.parseNDigits)(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,a){let s=t.getHours()>=12;return s&&a<12?t.setHours(a+12,0,0,0):!s&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}};k$.Hour1to12Parser=T$});var Ppe=E(S$=>{"use strict";S$.Hour0to23Parser=void 0;var BWe=Sa(),qWe=Zt(),Cpe=nr(),w$=class extends qWe.Parser{constructor(){super(...arguments);_(this,"priority",70);_(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,a){switch(n){case"H":return(0,Cpe.parseNumericPattern)(BWe.numericPatterns.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return(0,Cpe.parseNDigits)(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,a){return t.setHours(a,0,0,0),t}};S$.Hour0to23Parser=w$});var Mpe=E(x$=>{"use strict";x$.Hour0To11Parser=void 0;var HWe=Sa(),UWe=Zt(),_pe=nr(),E$=class extends UWe.Parser{constructor(){super(...arguments);_(this,"priority",70);_(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,a){switch(n){case"K":return(0,_pe.parseNumericPattern)(HWe.numericPatterns.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return(0,_pe.parseNDigits)(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}};x$.Hour0To11Parser=E$});var Ipe=E(C$=>{"use strict";C$.Hour1To24Parser=void 0;var VWe=Sa(),WWe=Zt(),Ape=nr(),D$=class extends WWe.Parser{constructor(){super(...arguments);_(this,"priority",70);_(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,a){switch(n){case"k":return(0,Ape.parseNumericPattern)(VWe.numericPatterns.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return(0,Ape.parseNDigits)(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,a){let s=a<=24?a%24:a;return t.setHours(s,0,0,0),t}};C$.Hour1To24Parser=D$});var Rpe=E(_$=>{"use strict";_$.MinuteParser=void 0;var YWe=Sa(),GWe=Zt(),Npe=nr(),P$=class extends GWe.Parser{constructor(){super(...arguments);_(this,"priority",60);_(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"m":return(0,Npe.parseNumericPattern)(YWe.numericPatterns.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return(0,Npe.parseNDigits)(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setMinutes(a,0,0),t}};_$.MinuteParser=P$});var Fpe=E(A$=>{"use strict";A$.SecondParser=void 0;var ZWe=Sa(),KWe=Zt(),Ope=nr(),M$=class extends KWe.Parser{constructor(){super(...arguments);_(this,"priority",50);_(this,"incompatibleTokens",["t","T"])}parse(t,n,a){switch(n){case"s":return(0,Ope.parseNumericPattern)(ZWe.numericPatterns.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return(0,Ope.parseNDigits)(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setSeconds(a,0),t}};A$.SecondParser=M$});var $pe=E(N$=>{"use strict";N$.FractionOfSecondParser=void 0;var QWe=Zt(),Lpe=nr(),I$=class extends QWe.Parser{constructor(){super(...arguments);_(this,"priority",30);_(this,"incompatibleTokens",["t","T"])}parse(t,n){let a=s=>Math.trunc(s*Math.pow(10,-n.length+3));return(0,Lpe.mapValue)((0,Lpe.parseNDigits)(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}};N$.FractionOfSecondParser=I$});var jpe=E(O$=>{"use strict";O$.ISOTimezoneWithZParser=void 0;var JWe=Oe(),XWe=Nc(),tw=Sa(),eYe=Zt(),rw=nr(),R$=class extends eYe.Parser{constructor(){super(...arguments);_(this,"priority",10);_(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return(0,rw.parseTimezonePattern)(tw.timezonePatterns.basicOptionalMinutes,t);case"XX":return(0,rw.parseTimezonePattern)(tw.timezonePatterns.basic,t);case"XXXX":return(0,rw.parseTimezonePattern)(tw.timezonePatterns.basicOptionalSeconds,t);case"XXXXX":return(0,rw.parseTimezonePattern)(tw.timezonePatterns.extendedOptionalSeconds,t);case"XXX":default:return(0,rw.parseTimezonePattern)(tw.timezonePatterns.extended,t)}}set(t,n,a){return n.timestampIsSet?t:(0,JWe.constructFrom)(t,t.getTime()-(0,XWe.getTimezoneOffsetInMilliseconds)(t)-a)}};O$.ISOTimezoneWithZParser=R$});var zpe=E(L$=>{"use strict";L$.ISOTimezoneParser=void 0;var tYe=Oe(),rYe=Nc(),nw=Sa(),nYe=Zt(),aw=nr(),F$=class extends nYe.Parser{constructor(){super(...arguments);_(this,"priority",10);_(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return(0,aw.parseTimezonePattern)(nw.timezonePatterns.basicOptionalMinutes,t);case"xx":return(0,aw.parseTimezonePattern)(nw.timezonePatterns.basic,t);case"xxxx":return(0,aw.parseTimezonePattern)(nw.timezonePatterns.basicOptionalSeconds,t);case"xxxxx":return(0,aw.parseTimezonePattern)(nw.timezonePatterns.extendedOptionalSeconds,t);case"xxx":default:return(0,aw.parseTimezonePattern)(nw.timezonePatterns.extended,t)}}set(t,n,a){return n.timestampIsSet?t:(0,tYe.constructFrom)(t,t.getTime()-(0,rYe.getTimezoneOffsetInMilliseconds)(t)-a)}};L$.ISOTimezoneParser=F$});var Bpe=E(j$=>{"use strict";j$.TimestampSecondsParser=void 0;var aYe=Oe(),sYe=Zt(),iYe=nr(),$$=class extends sYe.Parser{constructor(){super(...arguments);_(this,"priority",40);_(this,"incompatibleTokens","*")}parse(t){return(0,iYe.parseAnyDigitsSigned)(t)}set(t,n,a){return[(0,aYe.constructFrom)(t,a*1e3),{timestampIsSet:!0}]}};j$.TimestampSecondsParser=$$});var qpe=E(B$=>{"use strict";B$.TimestampMillisecondsParser=void 0;var oYe=Oe(),lYe=Zt(),cYe=nr(),z$=class extends lYe.Parser{constructor(){super(...arguments);_(this,"priority",20);_(this,"incompatibleTokens","*")}parse(t){return(0,cYe.parseAnyDigitsSigned)(t)}set(t,n,a){return[(0,oYe.constructFrom)(t,a),{timestampIsSet:!0}]}};B$.TimestampMillisecondsParser=z$});var Hpe=E(q$=>{"use strict";q$.parsers=void 0;var dYe=Zue(),uYe=Kue(),pYe=Jue(),mYe=epe(),hYe=rpe(),fYe=npe(),gYe=ape(),yYe=spe(),vYe=ipe(),bYe=dpe(),TYe=mpe(),kYe=hpe(),wYe=fpe(),SYe=ype(),EYe=vpe(),xYe=bpe(),DYe=kpe(),CYe=wpe(),PYe=Spe(),_Ye=Epe(),MYe=Dpe(),AYe=Ppe(),IYe=Mpe(),NYe=Ipe(),RYe=Rpe(),OYe=Fpe(),FYe=$pe(),LYe=jpe(),$Ye=zpe(),jYe=Bpe(),zYe=qpe(),p3t=q$.parsers={G:new dYe.EraParser,y:new uYe.YearParser,Y:new pYe.LocalWeekYearParser,R:new mYe.ISOWeekYearParser,u:new hYe.ExtendedYearParser,Q:new fYe.QuarterParser,q:new gYe.StandAloneQuarterParser,M:new yYe.MonthParser,L:new vYe.StandAloneMonthParser,w:new bYe.LocalWeekParser,I:new TYe.ISOWeekParser,d:new kYe.DateParser,D:new wYe.DayOfYearParser,E:new SYe.DayParser,e:new EYe.LocalDayParser,c:new xYe.StandAloneLocalDayParser,i:new DYe.ISODayParser,a:new CYe.AMPMParser,b:new PYe.AMPMMidnightParser,B:new _Ye.DayPeriodParser,h:new MYe.Hour1to12Parser,H:new AYe.Hour0to23Parser,K:new IYe.Hour0To11Parser,k:new NYe.Hour1To24Parser,m:new RYe.MinuteParser,s:new OYe.SecondParser,S:new FYe.FractionOfSecondParser,X:new LYe.ISOTimezoneWithZParser,x:new $Ye.ISOTimezoneParser,t:new jYe.TimestampSecondsParser,T:new zYe.TimestampMillisecondsParser}});var U$=E(O0=>{"use strict";Object.defineProperty(O0,"longFormatters",{enumerable:!0,get:function(){return H$.longFormatters}});O0.parse=QYe;Object.defineProperty(O0,"parsers",{enumerable:!0,get:function(){return Vpe.parsers}});var BYe=wm(),H$=n1(),R0=a1(),qYe=Oe(),HYe=m1(),Upe=Q(),UYe=S1(),Vpe=Hpe(),VYe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WYe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YYe=/^'([^]*?)'?$/,GYe=/''/g,ZYe=/\S/,KYe=/[a-zA-Z]/;function QYe(r,e,t,n){var g,y,k,T,w,S,x,C,M,N,F,G,R,A,I,L,V,W;let a=()=>(0,qYe.constructFrom)((n==null?void 0:n.in)||t,NaN),s=(0,HYe.getDefaultOptions)(),i=(y=(g=n==null?void 0:n.locale)!=null?g:s.locale)!=null?y:BYe.defaultLocale,o=(N=(M=(S=(w=n==null?void 0:n.firstWeekContainsDate)!=null?w:(T=(k=n==null?void 0:n.locale)==null?void 0:k.options)==null?void 0:T.firstWeekContainsDate)!=null?S:s.firstWeekContainsDate)!=null?M:(C=(x=s.locale)==null?void 0:x.options)==null?void 0:C.firstWeekContainsDate)!=null?N:1,l=(W=(V=(A=(R=n==null?void 0:n.weekStartsOn)!=null?R:(G=(F=n==null?void 0:n.locale)==null?void 0:F.options)==null?void 0:G.weekStartsOn)!=null?A:s.weekStartsOn)!=null?V:(L=(I=s.locale)==null?void 0:I.options)==null?void 0:L.weekStartsOn)!=null?W:0;if(!e)return r?a():(0,Upe.toDate)(t,n==null?void 0:n.in);let c={firstWeekContainsDate:o,weekStartsOn:l,locale:i},d=[new UYe.DateTimezoneSetter(n==null?void 0:n.in,t)],u=e.match(WYe).map(H=>{let K=H[0];if(K in H$.longFormatters){let le=H$.longFormatters[K];return le(H,i.formatLong)}return H}).join("").match(VYe),p=[];for(let H of u){!(n!=null&&n.useAdditionalWeekYearTokens)&&(0,R0.isProtectedWeekYearToken)(H)&&(0,R0.warnOrThrowProtectedError)(H,e,r),!(n!=null&&n.useAdditionalDayOfYearTokens)&&(0,R0.isProtectedDayOfYearToken)(H)&&(0,R0.warnOrThrowProtectedError)(H,e,r);let K=H[0],le=Vpe.parsers[K];if(le){let{incompatibleTokens:ge}=le;if(Array.isArray(ge)){let vt=p.find(Ar=>ge.includes(Ar.token)||Ar.token===K);if(vt)throw new RangeError(`The format string mustn't contain \`${vt.fullToken}\` and \`${H}\` at the same time`)}else if(le.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${H}\` and any other token at the same time`);p.push({token:K,fullToken:H});let te=le.run(r,H,i.match,c);if(!te)return a();d.push(te.setter),r=te.rest}else{if(K.match(KYe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");if(H==="''"?H="'":K==="'"&&(H=JYe(H)),r.indexOf(H)===0)r=r.slice(H.length);else return a()}}if(r.length>0&&ZYe.test(r))return a();let m=d.map(H=>H.priority).sort((H,K)=>K-H).filter((H,K,le)=>le.indexOf(H)===K).map(H=>d.filter(K=>K.priority===H).sort((K,le)=>le.subPriority-K.subPriority)).map(H=>H[0]),h=(0,Upe.toDate)(t,n==null?void 0:n.in);if(isNaN(+h))return a();let f={};for(let H of m){if(!H.validate(h,c))return a();let K=H.set(h,f,c);Array.isArray(K)?(h=K[0],Object.assign(f,K[1])):h=K}return h}function JYe(r){return r.match(YYe)[1].replace(GYe,"'")}});var Ype=E(Wpe=>{"use strict";Wpe.isMatch=tGe;var XYe=Oc(),eGe=U$();function tGe(r,e,t){return(0,XYe.isValid)((0,eGe.parse)(r,e,new Date,t))}});var Zpe=E(Gpe=>{"use strict";Gpe.isMonday=nGe;var rGe=Q();function nGe(r,e){return(0,rGe.toDate)(r,e==null?void 0:e.in).getDay()===1}});var Qpe=E(Kpe=>{"use strict";Kpe.isPast=sGe;var aGe=Q();function sGe(r){return+(0,aGe.toDate)(r){"use strict";Jpe.startOfHour=oGe;var iGe=Q();function oGe(r,e){let t=(0,iGe.toDate)(r,e==null?void 0:e.in);return t.setMinutes(0,0,0),t}});var W$=E(eme=>{"use strict";eme.isSameHour=cGe;var lGe=ir(),Xpe=V$();function cGe(r,e,t){let[n,a]=(0,lGe.normalizeDates)(t==null?void 0:t.in,r,e);return+(0,Xpe.startOfHour)(n)==+(0,Xpe.startOfHour)(a)}});var F0=E(rme=>{"use strict";rme.isSameWeek=uGe;var dGe=ir(),tme=wo();function uGe(r,e,t){let[n,a]=(0,dGe.normalizeDates)(t==null?void 0:t.in,r,e);return+(0,tme.startOfWeek)(n,t)==+(0,tme.startOfWeek)(a,t)}});var Y$=E(nme=>{"use strict";nme.isSameISOWeek=mGe;var pGe=F0();function mGe(r,e,t){return(0,pGe.isSameWeek)(r,e,{...t,weekStartsOn:1})}});var ime=E(sme=>{"use strict";sme.isSameISOWeekYear=fGe;var ame=kg(),hGe=ir();function fGe(r,e,t){let[n,a]=(0,hGe.normalizeDates)(t==null?void 0:t.in,r,e);return+(0,ame.startOfISOWeekYear)(n)==+(0,ame.startOfISOWeekYear)(a)}});var G$=E(ome=>{"use strict";ome.startOfMinute=yGe;var gGe=Q();function yGe(r,e){let t=(0,gGe.toDate)(r,e==null?void 0:e.in);return t.setSeconds(0,0),t}});var Z$=E(cme=>{"use strict";cme.isSameMinute=vGe;var lme=G$();function vGe(r,e){return+(0,lme.startOfMinute)(r)==+(0,lme.startOfMinute)(e)}});var K$=E(dme=>{"use strict";dme.isSameMonth=TGe;var bGe=ir();function TGe(r,e,t){let[n,a]=(0,bGe.normalizeDates)(t==null?void 0:t.in,r,e);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}});var Q$=E(pme=>{"use strict";pme.isSameQuarter=wGe;var kGe=ir(),ume=S0();function wGe(r,e,t){let[n,a]=(0,kGe.normalizeDates)(t==null?void 0:t.in,r,e);return+(0,ume.startOfQuarter)(n)==+(0,ume.startOfQuarter)(a)}});var J$=E(mme=>{"use strict";mme.startOfSecond=EGe;var SGe=Q();function EGe(r,e){let t=(0,SGe.toDate)(r,e==null?void 0:e.in);return t.setMilliseconds(0),t}});var X$=E(fme=>{"use strict";fme.isSameSecond=xGe;var hme=J$();function xGe(r,e){return+(0,hme.startOfSecond)(r)==+(0,hme.startOfSecond)(e)}});var ej=E(gme=>{"use strict";gme.isSameYear=CGe;var DGe=ir();function CGe(r,e,t){let[n,a]=(0,DGe.normalizeDates)(t==null?void 0:t.in,r,e);return n.getFullYear()===a.getFullYear()}});var vme=E(yme=>{"use strict";yme.isThisHour=AGe;var PGe=_n(),_Ge=W$(),MGe=Q();function AGe(r,e){return(0,_Ge.isSameHour)((0,MGe.toDate)(r,e==null?void 0:e.in),(0,PGe.constructNow)((e==null?void 0:e.in)||r))}});var Tme=E(bme=>{"use strict";bme.isThisISOWeek=OGe;var IGe=Oe(),NGe=_n(),RGe=Y$();function OGe(r,e){return(0,RGe.isSameISOWeek)((0,IGe.constructFrom)((e==null?void 0:e.in)||r,r),(0,NGe.constructNow)((e==null?void 0:e.in)||r))}});var wme=E(kme=>{"use strict";kme.isThisMinute=$Ge;var FGe=_n(),LGe=Z$();function $Ge(r){return(0,LGe.isSameMinute)(r,(0,FGe.constructNow)(r))}});var Eme=E(Sme=>{"use strict";Sme.isThisMonth=qGe;var jGe=Oe(),zGe=_n(),BGe=K$();function qGe(r,e){return(0,BGe.isSameMonth)((0,jGe.constructFrom)((e==null?void 0:e.in)||r,r),(0,zGe.constructNow)((e==null?void 0:e.in)||r))}});var Dme=E(xme=>{"use strict";xme.isThisQuarter=WGe;var HGe=Oe(),UGe=_n(),VGe=Q$();function WGe(r,e){return(0,VGe.isSameQuarter)((0,HGe.constructFrom)((e==null?void 0:e.in)||r,r),(0,UGe.constructNow)((e==null?void 0:e.in)||r))}});var Pme=E(Cme=>{"use strict";Cme.isThisSecond=ZGe;var YGe=_n(),GGe=X$();function ZGe(r){return(0,GGe.isSameSecond)(r,(0,YGe.constructNow)(r))}});var Mme=E(_me=>{"use strict";_me.isThisWeek=XGe;var KGe=Oe(),QGe=_n(),JGe=F0();function XGe(r,e){return(0,JGe.isSameWeek)((0,KGe.constructFrom)((e==null?void 0:e.in)||r,r),(0,QGe.constructNow)((e==null?void 0:e.in)||r),e)}});var Ime=E(Ame=>{"use strict";Ame.isThisYear=n4e;var e4e=Oe(),t4e=_n(),r4e=ej();function n4e(r,e){return(0,r4e.isSameYear)((0,e4e.constructFrom)((e==null?void 0:e.in)||r,r),(0,t4e.constructNow)((e==null?void 0:e.in)||r))}});var Rme=E(Nme=>{"use strict";Nme.isThursday=s4e;var a4e=Q();function s4e(r,e){return(0,a4e.toDate)(r,e==null?void 0:e.in).getDay()===4}});var Fme=E(Ome=>{"use strict";Ome.isToday=c4e;var i4e=Oe(),o4e=_n(),l4e=wg();function c4e(r,e){return(0,l4e.isSameDay)((0,i4e.constructFrom)((e==null?void 0:e.in)||r,r),(0,o4e.constructNow)((e==null?void 0:e.in)||r))}});var $me=E(Lme=>{"use strict";Lme.isTomorrow=m4e;var d4e=vl(),u4e=_n(),p4e=wg();function m4e(r,e){return(0,p4e.isSameDay)(r,(0,d4e.addDays)((0,u4e.constructNow)((e==null?void 0:e.in)||r),1),e)}});var zme=E(jme=>{"use strict";jme.isTuesday=f4e;var h4e=Q();function f4e(r,e){return(0,h4e.toDate)(r,e==null?void 0:e.in).getDay()===2}});var qme=E(Bme=>{"use strict";Bme.isWednesday=y4e;var g4e=Q();function y4e(r,e){return(0,g4e.toDate)(r,e==null?void 0:e.in).getDay()===3}});var Ume=E(Hme=>{"use strict";Hme.isWithinInterval=v4e;var tj=Q();function v4e(r,e,t){let n=+(0,tj.toDate)(r,t==null?void 0:t.in),[a,s]=[+(0,tj.toDate)(e.start,t==null?void 0:t.in),+(0,tj.toDate)(e.end,t==null?void 0:t.in)].sort((i,o)=>i-o);return n>=a&&n<=s}});var sw=E(Vme=>{"use strict";Vme.subDays=T4e;var b4e=vl();function T4e(r,e,t){return(0,b4e.addDays)(r,-e,t)}});var Yme=E(Wme=>{"use strict";Wme.isYesterday=x4e;var k4e=Oe(),w4e=_n(),S4e=wg(),E4e=sw();function x4e(r,e){return(0,S4e.isSameDay)((0,k4e.constructFrom)((e==null?void 0:e.in)||r,r),(0,E4e.subDays)((0,w4e.constructNow)((e==null?void 0:e.in)||r),1))}});var Kme=E(Zme=>{"use strict";Zme.lastDayOfDecade=D4e;var Gme=Q();function D4e(r,e){let t=(0,Gme.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=9+Math.floor(n/10)*10;return t.setFullYear(a+1,0,0),t.setHours(0,0,0,0),(0,Gme.toDate)(t,e==null?void 0:e.in)}});var rj=E(Qme=>{"use strict";Qme.lastDayOfWeek=_4e;var C4e=wa(),P4e=Q();function _4e(r,e){var o,l,c,d,u,p,m,h;let t=(0,C4e.getDefaultOptions)(),n=(h=(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?h:0,a=(0,P4e.toDate)(r,e==null?void 0:e.in),s=a.getDay(),i=(s{"use strict";Jme.lastDayOfISOWeek=A4e;var M4e=rj();function A4e(r,e){return(0,M4e.lastDayOfWeek)(r,{...e,weekStartsOn:1})}});var the=E(ehe=>{"use strict";ehe.lastDayOfISOWeekYear=O4e;var I4e=Oe(),N4e=Jd(),R4e=bl();function O4e(r,e){let t=(0,N4e.getISOWeekYear)(r,e),n=(0,I4e.constructFrom)((e==null?void 0:e.in)||r,0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);let a=(0,R4e.startOfISOWeek)(n,e);return a.setDate(a.getDate()-1),a}});var nhe=E(rhe=>{"use strict";rhe.lastDayOfQuarter=L4e;var F4e=Q();function L4e(r,e){let t=(0,F4e.toDate)(r,e==null?void 0:e.in),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(0,0,0,0),t}});var she=E(ahe=>{"use strict";ahe.lastDayOfYear=j4e;var $4e=Q();function j4e(r,e){let t=(0,$4e.toDate)(r,e==null?void 0:e.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}});var ohe=E(nj=>{"use strict";nj.lightFormat=W4e;Object.defineProperty(nj,"lightFormatters",{enumerable:!0,get:function(){return ihe.lightFormatters}});var ihe=e1(),z4e=Oc(),B4e=Q(),q4e=/(\w)\1*|''|'(''|[^'])+('|$)|./g,H4e=/^'([^]*?)'?$/,U4e=/''/g,V4e=/[a-zA-Z]/;function W4e(r,e){let t=(0,B4e.toDate)(r);if(!(0,z4e.isValid)(t))throw new RangeError("Invalid time value");let n=e.match(q4e);return n?n.map(s=>{if(s==="''")return"'";let i=s[0];if(i==="'")return Y4e(s);let o=ihe.lightFormatters[i];if(o)return o(t,s);if(i.match(V4e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return s}).join(""):""}function Y4e(r){let e=r.match(H4e);return e?e[1].replace(U4e,"'"):r}});var dhe=E(che=>{"use strict";che.milliseconds=G4e;var lhe=it();function G4e({years:r,months:e,weeks:t,days:n,hours:a,minutes:s,seconds:i}){let o=0;r&&(o+=r*lhe.daysInYear),e&&(o+=e*(lhe.daysInYear/12)),t&&(o+=t*7),n&&(o+=n);let l=o*24*60*60;return a&&(l+=a*60*60),s&&(l+=s*60),i&&(l+=i),Math.trunc(l*1e3)}});var phe=E(uhe=>{"use strict";uhe.millisecondsToHours=K4e;var Z4e=it();function K4e(r){let e=r/Z4e.millisecondsInHour;return Math.trunc(e)}});var hhe=E(mhe=>{"use strict";mhe.millisecondsToMinutes=J4e;var Q4e=it();function J4e(r){let e=r/Q4e.millisecondsInMinute;return Math.trunc(e)}});var ghe=E(fhe=>{"use strict";fhe.millisecondsToSeconds=e3e;var X4e=it();function e3e(r){let e=r/X4e.millisecondsInSecond;return Math.trunc(e)}});var vhe=E(yhe=>{"use strict";yhe.minutesToHours=r3e;var t3e=it();function r3e(r){let e=r/t3e.minutesInHour;return Math.trunc(e)}});var The=E(bhe=>{"use strict";bhe.minutesToMilliseconds=a3e;var n3e=it();function a3e(r){return Math.trunc(r*n3e.millisecondsInMinute)}});var whe=E(khe=>{"use strict";khe.minutesToSeconds=i3e;var s3e=it();function i3e(r){return Math.trunc(r*s3e.secondsInMinute)}});var Ehe=E(She=>{"use strict";She.monthsToQuarters=l3e;var o3e=it();function l3e(r){let e=r/o3e.monthsInQuarter;return Math.trunc(e)}});var Dhe=E(xhe=>{"use strict";xhe.monthsToYears=d3e;var c3e=it();function d3e(r){let e=r/c3e.monthsInYear;return Math.trunc(e)}});var $c=E(Che=>{"use strict";Che.nextDay=m3e;var u3e=vl(),p3e=Yk();function m3e(r,e,t){let n=e-(0,p3e.getDay)(r,t);return n<=0&&(n+=7),(0,u3e.addDays)(r,n,t)}});var _he=E(Phe=>{"use strict";Phe.nextFriday=f3e;var h3e=$c();function f3e(r,e){return(0,h3e.nextDay)(r,5,e)}});var Ahe=E(Mhe=>{"use strict";Mhe.nextMonday=y3e;var g3e=$c();function y3e(r,e){return(0,g3e.nextDay)(r,1,e)}});var Nhe=E(Ihe=>{"use strict";Ihe.nextSaturday=b3e;var v3e=$c();function b3e(r,e){return(0,v3e.nextDay)(r,6,e)}});var Ohe=E(Rhe=>{"use strict";Rhe.nextSunday=k3e;var T3e=$c();function k3e(r,e){return(0,T3e.nextDay)(r,0,e)}});var Lhe=E(Fhe=>{"use strict";Fhe.nextThursday=S3e;var w3e=$c();function S3e(r,e){return(0,w3e.nextDay)(r,4,e)}});var jhe=E($he=>{"use strict";$he.nextTuesday=x3e;var E3e=$c();function x3e(r,e){return(0,E3e.nextDay)(r,2,e)}});var Bhe=E(zhe=>{"use strict";zhe.nextWednesday=C3e;var D3e=$c();function C3e(r,e){return(0,D3e.nextDay)(r,3,e)}});var Vhe=E(Uhe=>{"use strict";Uhe.parseISO=_3e;var $0=it(),P3e=Oe(),qhe=Q();function _3e(r,e){var c;let t=()=>(0,P3e.constructFrom)(e==null?void 0:e.in,NaN),n=(c=e==null?void 0:e.additionalDigits)!=null?c:2,a=N3e(r),s;if(a.date){let d=R3e(a.date,n);s=O3e(d.restDateString,d.year)}if(!s||isNaN(+s))return t();let i=+s,o=0,l;if(a.time&&(o=F3e(a.time),isNaN(o)))return t();if(a.timezone){if(l=L3e(a.timezone),isNaN(l))return t()}else{let d=new Date(i+o),u=(0,qhe.toDate)(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(0,qhe.toDate)(i+o+l,e==null?void 0:e.in)}var L0={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},M3e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,A3e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,I3e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function N3e(r){let e={},t=r.split(L0.dateTimeDelimiter),n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],L0.timeZoneDelimiter.test(e.date)&&(e.date=r.split(L0.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){let a=L0.timezone.exec(n);a?(e.time=n.replace(a[1],""),e.timezone=a[1]):e.time=n}return e}function R3e(r,e){let t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};let a=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:s===null?a:s*100,restDateString:r.slice((n[1]||n[2]).length)}}function O3e(r,e){if(e===null)return new Date(NaN);let t=r.match(M3e);if(!t)return new Date(NaN);let n=!!t[4],a=iw(t[1]),s=iw(t[2])-1,i=iw(t[3]),o=iw(t[4]),l=iw(t[5])-1;if(n)return q3e(e,o,l)?$3e(e,o,l):new Date(NaN);{let c=new Date(0);return!z3e(e,s,i)||!B3e(e,a)?new Date(NaN):(c.setUTCFullYear(e,s,Math.max(a,i)),c)}}function iw(r){return r?parseInt(r):1}function F3e(r){let e=r.match(A3e);if(!e)return NaN;let t=aj(e[1]),n=aj(e[2]),a=aj(e[3]);return H3e(t,n,a)?t*$0.millisecondsInHour+n*$0.millisecondsInMinute+a*1e3:NaN}function aj(r){return r&&parseFloat(r.replace(",","."))||0}function L3e(r){if(r==="Z")return 0;let e=r.match(I3e);if(!e)return 0;let t=e[1]==="+"?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return U3e(n,a)?t*(n*$0.millisecondsInHour+a*$0.millisecondsInMinute):NaN}function $3e(r,e,t){let n=new Date(0);n.setUTCFullYear(r,0,4);let a=n.getUTCDay()||7,s=(e-1)*7+t+1-a;return n.setUTCDate(n.getUTCDate()+s),n}var j3e=[31,null,31,30,31,30,31,31,30,31,30,31];function Hhe(r){return r%400===0||r%4===0&&r%100!==0}function z3e(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(j3e[e]||(Hhe(r)?29:28))}function B3e(r,e){return e>=1&&e<=(Hhe(r)?366:365)}function q3e(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function H3e(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function U3e(r,e){return e>=0&&e<=59}});var Ghe=E(Yhe=>{"use strict";Yhe.parseJSON=V3e;var Whe=Q();function V3e(r,e){let t=r.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return t?(0,Whe.toDate)(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4]-(+t[9]||0)*(t[8]=="-"?-1:1),+t[5]-(+t[10]||0)*(t[8]=="-"?-1:1),+t[6],+((t[7]||"0")+"00").substring(0,3)),e==null?void 0:e.in):(0,Whe.toDate)(NaN,e==null?void 0:e.in)}});var jc=E(Zhe=>{"use strict";Zhe.previousDay=G3e;var W3e=Yk(),Y3e=sw();function G3e(r,e,t){let n=(0,W3e.getDay)(r,t)-e;return n<=0&&(n+=7),(0,Y3e.subDays)(r,n,t)}});var Qhe=E(Khe=>{"use strict";Khe.previousFriday=K3e;var Z3e=jc();function K3e(r,e){return(0,Z3e.previousDay)(r,5,e)}});var Xhe=E(Jhe=>{"use strict";Jhe.previousMonday=J3e;var Q3e=jc();function J3e(r,e){return(0,Q3e.previousDay)(r,1,e)}});var tfe=E(efe=>{"use strict";efe.previousSaturday=e6e;var X3e=jc();function e6e(r,e){return(0,X3e.previousDay)(r,6,e)}});var nfe=E(rfe=>{"use strict";rfe.previousSunday=r6e;var t6e=jc();function r6e(r,e){return(0,t6e.previousDay)(r,0,e)}});var sfe=E(afe=>{"use strict";afe.previousThursday=a6e;var n6e=jc();function a6e(r,e){return(0,n6e.previousDay)(r,4,e)}});var ofe=E(ife=>{"use strict";ife.previousTuesday=i6e;var s6e=jc();function i6e(r,e){return(0,s6e.previousDay)(r,2,e)}});var cfe=E(lfe=>{"use strict";lfe.previousWednesday=l6e;var o6e=jc();function l6e(r,e){return(0,o6e.previousDay)(r,3,e)}});var ufe=E(dfe=>{"use strict";dfe.quartersToMonths=d6e;var c6e=it();function d6e(r){return Math.trunc(r*c6e.monthsInQuarter)}});var mfe=E(pfe=>{"use strict";pfe.quartersToYears=p6e;var u6e=it();function p6e(r){let e=r/u6e.quartersInYear;return Math.trunc(e)}});var ffe=E(hfe=>{"use strict";hfe.roundToNearestHours=g6e;var m6e=Fc(),h6e=Oe(),f6e=Q();function g6e(r,e){var u,p;let t=(u=e==null?void 0:e.nearestTo)!=null?u:1;if(t<1||t>12)return(0,h6e.constructFrom)((e==null?void 0:e.in)||r,NaN);let n=(0,f6e.toDate)(r,e==null?void 0:e.in),a=n.getMinutes()/60,s=n.getSeconds()/60/60,i=n.getMilliseconds()/1e3/60/60,o=n.getHours()+a+s+i,l=(p=e==null?void 0:e.roundingMethod)!=null?p:"round",d=(0,m6e.getRoundingMethod)(l)(o/t)*t;return n.setHours(d,0,0,0),n}});var yfe=E(gfe=>{"use strict";gfe.roundToNearestMinutes=T6e;var y6e=Fc(),v6e=Oe(),b6e=Q();function T6e(r,e){var d,u;let t=(d=e==null?void 0:e.nearestTo)!=null?d:1;if(t<1||t>30)return(0,v6e.constructFrom)(r,NaN);let n=(0,b6e.toDate)(r,e==null?void 0:e.in),a=n.getSeconds()/60,s=n.getMilliseconds()/1e3/60,i=n.getMinutes()+a+s,o=(u=e==null?void 0:e.roundingMethod)!=null?u:"round",c=(0,y6e.getRoundingMethod)(o)(i/t)*t;return n.setMinutes(c,0,0),n}});var bfe=E(vfe=>{"use strict";vfe.secondsToHours=w6e;var k6e=it();function w6e(r){let e=r/k6e.secondsInHour;return Math.trunc(e)}});var kfe=E(Tfe=>{"use strict";Tfe.secondsToMilliseconds=E6e;var S6e=it();function E6e(r){return r*S6e.millisecondsInSecond}});var Sfe=E(wfe=>{"use strict";wfe.secondsToMinutes=D6e;var x6e=it();function D6e(r){let e=r/x6e.secondsInMinute;return Math.trunc(e)}});var j0=E(Efe=>{"use strict";Efe.setMonth=M6e;var C6e=Oe(),P6e=u1(),_6e=Q();function M6e(r,e,t){let n=(0,_6e.toDate)(r,t==null?void 0:t.in),a=n.getFullYear(),s=n.getDate(),i=(0,C6e.constructFrom)((t==null?void 0:t.in)||r,0);i.setFullYear(a,e,15),i.setHours(0,0,0,0);let o=(0,P6e.getDaysInMonth)(i);return n.setMonth(e,Math.min(s,o)),n}});var Dfe=E(xfe=>{"use strict";xfe.set=R6e;var A6e=Oe(),I6e=j0(),N6e=Q();function R6e(r,e,t){let n=(0,N6e.toDate)(r,t==null?void 0:t.in);return isNaN(+n)?(0,A6e.constructFrom)((t==null?void 0:t.in)||r,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=(0,I6e.setMonth)(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}});var Pfe=E(Cfe=>{"use strict";Cfe.setDate=F6e;var O6e=Q();function F6e(r,e,t){let n=(0,O6e.toDate)(r,t==null?void 0:t.in);return n.setDate(e),n}});var Mfe=E(_fe=>{"use strict";_fe.setDayOfYear=$6e;var L6e=Q();function $6e(r,e,t){let n=(0,L6e.toDate)(r,t==null?void 0:t.in);return n.setMonth(0),n.setDate(e),n}});var Nfe=E(Ife=>{"use strict";Ife.setDefaultOptions=j6e;var Afe=wa();function j6e(r){let e={},t=(0,Afe.getDefaultOptions)();for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(r[n]===void 0?delete e[n]:e[n]=r[n]);(0,Afe.setDefaultOptions)(e)}});var Ofe=E(Rfe=>{"use strict";Rfe.setHours=B6e;var z6e=Q();function B6e(r,e,t){let n=(0,z6e.toDate)(r,t==null?void 0:t.in);return n.setHours(e),n}});var Lfe=E(Ffe=>{"use strict";Ffe.setMilliseconds=H6e;var q6e=Q();function H6e(r,e,t){let n=(0,q6e.toDate)(r,t==null?void 0:t.in);return n.setMilliseconds(e),n}});var jfe=E($fe=>{"use strict";$fe.setMinutes=V6e;var U6e=Q();function V6e(r,e,t){let n=(0,U6e.toDate)(r,t==null?void 0:t.in);return n.setMinutes(e),n}});var Bfe=E(zfe=>{"use strict";zfe.setQuarter=G6e;var W6e=j0(),Y6e=Q();function G6e(r,e,t){let n=(0,Y6e.toDate)(r,t==null?void 0:t.in),a=Math.trunc(n.getMonth()/3)+1,s=e-a;return(0,W6e.setMonth)(n,n.getMonth()+s*3)}});var Hfe=E(qfe=>{"use strict";qfe.setSeconds=K6e;var Z6e=Q();function K6e(r,e,t){let n=(0,Z6e.toDate)(r,t==null?void 0:t.in);return n.setSeconds(e),n}});var Wfe=E(Vfe=>{"use strict";Vfe.setWeekYear=tZe;var Q6e=wa(),J6e=Oe(),X6e=Rc(),Ufe=_0(),eZe=Q();function tZe(r,e,t){var l,c,d,u,p,m,h,f;let n=(0,Q6e.getDefaultOptions)(),a=(f=(h=(u=(d=t==null?void 0:t.firstWeekContainsDate)!=null?d:(c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)!=null?u:n.firstWeekContainsDate)!=null?h:(m=(p=n.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:1,s=(0,X6e.differenceInCalendarDays)((0,eZe.toDate)(r,t==null?void 0:t.in),(0,Ufe.startOfWeekYear)(r,t),t),i=(0,J6e.constructFrom)((t==null?void 0:t.in)||r,0);i.setFullYear(e,0,a),i.setHours(0,0,0,0);let o=(0,Ufe.startOfWeekYear)(i,t);return o.setDate(o.getDate()+s),o}});var Gfe=E(Yfe=>{"use strict";Yfe.setYear=aZe;var rZe=Oe(),nZe=Q();function aZe(r,e,t){let n=(0,nZe.toDate)(r,t==null?void 0:t.in);return isNaN(+n)?(0,rZe.constructFrom)((t==null?void 0:t.in)||r,NaN):(n.setFullYear(e),n)}});var Kfe=E(Zfe=>{"use strict";Zfe.startOfDecade=iZe;var sZe=Q();function iZe(r,e){let t=(0,sZe.toDate)(r,e==null?void 0:e.in),n=t.getFullYear(),a=Math.floor(n/10)*10;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}});var Jfe=E(Qfe=>{"use strict";Qfe.startOfToday=lZe;var oZe=$k();function lZe(r){return(0,oZe.startOfDay)(Date.now(),r)}});var ege=E(Xfe=>{"use strict";Xfe.startOfTomorrow=uZe;var cZe=Oe(),dZe=_n();function uZe(r){let e=(0,dZe.constructNow)(r==null?void 0:r.in),t=e.getFullYear(),n=e.getMonth(),a=e.getDate(),s=(0,cZe.constructFrom)(r==null?void 0:r.in,0);return s.setFullYear(t,n,a+1),s.setHours(0,0,0,0),s}});var nge=E(rge=>{"use strict";rge.startOfYesterday=pZe;var tge=_n();function pZe(r){let e=(0,tge.constructNow)(r==null?void 0:r.in),t=e.getFullYear(),n=e.getMonth(),a=e.getDate(),s=(0,tge.constructNow)(r==null?void 0:r.in);return s.setFullYear(t,n,a-1),s.setHours(0,0,0,0),s}});var sj=E(age=>{"use strict";age.subMonths=hZe;var mZe=Tg();function hZe(r,e,t){return(0,mZe.addMonths)(r,-e,t)}});var ige=E(sge=>{"use strict";sge.sub=vZe;var fZe=Oe(),gZe=sw(),yZe=sj();function vZe(r,e,t){let{years:n=0,months:a=0,weeks:s=0,days:i=0,hours:o=0,minutes:l=0,seconds:c=0}=e,d=(0,yZe.subMonths)(r,a+n*12,t),u=(0,gZe.subDays)(d,i+s*7,t),p=l+o*60,h=(c+p*60)*1e3;return(0,fZe.constructFrom)((t==null?void 0:t.in)||r,+u-h)}});var lge=E(oge=>{"use strict";oge.subBusinessDays=TZe;var bZe=EL();function TZe(r,e,t){return(0,bZe.addBusinessDays)(r,-e,t)}});var dge=E(cge=>{"use strict";cge.subHours=wZe;var kZe=xL();function wZe(r,e,t){return(0,kZe.addHours)(r,-e,t)}});var pge=E(uge=>{"use strict";uge.subMilliseconds=EZe;var SZe=Lk();function EZe(r,e,t){return(0,SZe.addMilliseconds)(r,-e,t)}});var hge=E(mge=>{"use strict";mge.subMinutes=DZe;var xZe=u0();function DZe(r,e,t){return(0,xZe.addMinutes)(r,-e,t)}});var gge=E(fge=>{"use strict";fge.subQuarters=PZe;var CZe=p0();function PZe(r,e,t){return(0,CZe.addQuarters)(r,-e,t)}});var vge=E(yge=>{"use strict";yge.subSeconds=MZe;var _Ze=_L();function MZe(r,e,t){return(0,_Ze.addSeconds)(r,-e,t)}});var Tge=E(bge=>{"use strict";bge.subWeeks=IZe;var AZe=jk();function IZe(r,e,t){return(0,AZe.addWeeks)(r,-e,t)}});var wge=E(kge=>{"use strict";kge.subYears=RZe;var NZe=ML();function RZe(r,e,t){return(0,NZe.addYears)(r,-e,t)}});var Ege=E(Sge=>{"use strict";Sge.weeksToDays=FZe;var OZe=it();function FZe(r){return Math.trunc(r*OZe.daysInWeek)}});var Dge=E(xge=>{"use strict";xge.yearsToDays=$Ze;var LZe=it();function $Ze(r){return Math.trunc(r*LZe.daysInYear)}});var Pge=E(Cge=>{"use strict";Cge.yearsToMonths=zZe;var jZe=it();function zZe(r){return Math.trunc(r*jZe.monthsInYear)}});var Mge=E(_ge=>{"use strict";_ge.yearsToQuarters=qZe;var BZe=it();function qZe(r){return Math.trunc(r*BZe.quartersInYear)}});var OH=E(v=>{"use strict";var ij=TL();Object.keys(ij).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===ij[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return ij[r]}})});var oj=EL();Object.keys(oj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===oj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return oj[r]}})});var lj=vl();Object.keys(lj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===lj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return lj[r]}})});var cj=xL();Object.keys(cj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===cj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return cj[r]}})});var dj=PL();Object.keys(dj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===dj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return dj[r]}})});var uj=Lk();Object.keys(uj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===uj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return uj[r]}})});var pj=u0();Object.keys(pj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===pj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return pj[r]}})});var mj=Tg();Object.keys(mj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===mj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return mj[r]}})});var hj=p0();Object.keys(hj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===hj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return hj[r]}})});var fj=_L();Object.keys(fj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===fj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return fj[r]}})});var gj=jk();Object.keys(gj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===gj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return gj[r]}})});var yj=ML();Object.keys(yj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===yj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return yj[r]}})});var vj=_oe();Object.keys(vj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===vj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return vj[r]}})});var bj=Ooe();Object.keys(bj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===bj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return bj[r]}})});var Tj=NL();Object.keys(Tj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Tj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Tj[r]}})});var kj=joe();Object.keys(kj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===kj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return kj[r]}})});var wj=km();Object.keys(wj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===wj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return wj[r]}})});var Sj=Uoe();Object.keys(Sj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Sj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Sj[r]}})});var Ej=Oe();Object.keys(Ej).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Ej[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Ej[r]}})});var xj=_n();Object.keys(xj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===xj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return xj[r]}})});var Dj=Yoe();Object.keys(Dj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Dj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Dj[r]}})});var Cj=tle();Object.keys(Cj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Cj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Cj[r]}})});var Pj=Rc();Object.keys(Pj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Pj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Pj[r]}})});var _j=OL();Object.keys(_j).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===_j[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return _j[r]}})});var Mj=ole();Object.keys(Mj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Mj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Mj[r]}})});var Aj=h0();Object.keys(Aj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Aj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Aj[r]}})});var Ij=LL();Object.keys(Ij).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Ij[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Ij[r]}})});var Nj=f0();Object.keys(Nj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Nj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Nj[r]}})});var Rj=g0();Object.keys(Rj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Rj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Rj[r]}})});var Oj=y0();Object.keys(Oj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Oj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Oj[r]}})});var Fj=v0();Object.keys(Fj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Fj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Fj[r]}})});var Lj=Sle();Object.keys(Lj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Lj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Lj[r]}})});var $j=b0();Object.keys($j).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===$j[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return $j[r]}})});var jj=T0();Object.keys(jj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===jj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return jj[r]}})});var zj=zk();Object.keys(zj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===zj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return zj[r]}})});var Bj=Ile();Object.keys(Bj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Bj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Bj[r]}})});var qj=Bk();Object.keys(qj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===qj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return qj[r]}})});var Hj=Ole();Object.keys(Hj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Hj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Hj[r]}})});var Uj=BL();Object.keys(Uj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Uj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Uj[r]}})});var Vj=qL();Object.keys(Vj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Vj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Vj[r]}})});var Wj=Ble();Object.keys(Wj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Wj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Wj[r]}})});var Yj=Hle();Object.keys(Yj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Yj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Yj[r]}})});var Gj=Vle();Object.keys(Gj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Gj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Gj[r]}})});var Zj=Gle();Object.keys(Zj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Zj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Zj[r]}})});var Kj=Kle();Object.keys(Kj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Kj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Kj[r]}})});var Qj=D0();Object.keys(Qj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Qj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Qj[r]}})});var Jj=ece();Object.keys(Jj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Jj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Jj[r]}})});var Xj=ace();Object.keys(Xj).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Xj[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Xj[r]}})});var ez=ice();Object.keys(ez).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===ez[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return ez[r]}})});var tz=k0();Object.keys(tz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===tz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return tz[r]}})});var rz=lce();Object.keys(rz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===rz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return rz[r]}})});var nz=dce();Object.keys(nz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===nz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return nz[r]}})});var az=mce();Object.keys(az).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===az[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return az[r]}})});var sz=fce();Object.keys(sz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===sz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return sz[r]}})});var iz=yce();Object.keys(iz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===iz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return iz[r]}})});var oz=w0();Object.keys(oz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===oz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return oz[r]}})});var lz=bce();Object.keys(lz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===lz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return lz[r]}})});var cz=kce();Object.keys(cz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===cz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return cz[r]}})});var dz=Sce();Object.keys(dz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===dz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return dz[r]}})});var uz=Dce();Object.keys(uz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===uz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return uz[r]}})});var pz=UL();Object.keys(pz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===pz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return pz[r]}})});var mz=HL();Object.keys(mz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===mz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return mz[r]}})});var hz=Pce();Object.keys(hz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===hz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return hz[r]}})});var fz=o1();Object.keys(fz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===fz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return fz[r]}})});var gz=l1();Object.keys(gz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===gz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return gz[r]}})});var yz=c1();Object.keys(yz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===yz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return yz[r]}})});var vz=cde();Object.keys(vz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===vz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return vz[r]}})});var bz=ude();Object.keys(bz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===bz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return bz[r]}})});var Tz=mde();Object.keys(Tz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Tz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Tz[r]}})});var kz=fde();Object.keys(kz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===kz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return kz[r]}})});var wz=yde();Object.keys(wz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===wz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return wz[r]}})});var Sz=bde();Object.keys(Sz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Sz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Sz[r]}})});var Ez=kde();Object.keys(Ez).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Ez[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Ez[r]}})});var xz=Sde();Object.keys(xz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===xz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return xz[r]}})});var Dz=xde();Object.keys(Dz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Dz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Dz[r]}})});var Cz=Cde();Object.keys(Cz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Cz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Cz[r]}})});var Pz=d1();Object.keys(Pz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Pz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Pz[r]}})});var _z=Yk();Object.keys(_z).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===_z[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return _z[r]}})});var Mz=JL();Object.keys(Mz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Mz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Mz[r]}})});var Az=u1();Object.keys(Az).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Az[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Az[r]}})});var Iz=Nde();Object.keys(Iz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Iz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Iz[r]}})});var Nz=Ode();Object.keys(Nz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Nz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Nz[r]}})});var Rz=m1();Object.keys(Rz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Rz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Rz[r]}})});var Oz=$de();Object.keys(Oz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Oz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Oz[r]}})});var Fz=h1();Object.keys(Fz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Fz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Fz[r]}})});var Lz=P0();Object.keys(Lz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Lz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Lz[r]}})});var $z=Jd();Object.keys($z).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===$z[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return $z[r]}})});var jz=qde();Object.keys(jz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===jz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return jz[r]}})});var zz=Ude();Object.keys(zz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===zz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return zz[r]}})});var Bz=Wde();Object.keys(Bz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Bz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Bz[r]}})});var qz=Gde();Object.keys(qz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===qz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return qz[r]}})});var Hz=Qde();Object.keys(Hz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Hz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Hz[r]}})});var Uz=FL();Object.keys(Uz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Uz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Uz[r]}})});var Vz=Xde();Object.keys(Vz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Vz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Vz[r]}})});var Wz=tue();Object.keys(Wz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Wz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Wz[r]}})});var Yz=nue();Object.keys(Yz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Yz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Yz[r]}})});var Gz=M0();Object.keys(Gz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Gz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Gz[r]}})});var Zz=sue();Object.keys(Zz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Zz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Zz[r]}})});var Kz=Vk();Object.keys(Kz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Kz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Kz[r]}})});var Qz=cue();Object.keys(Qz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Qz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Qz[r]}})});var Jz=uue();Object.keys(Jz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Jz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Jz[r]}})});var Xz=mue();Object.keys(Xz).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Xz[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Xz[r]}})});var eB=fue();Object.keys(eB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===eB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return eB[r]}})});var tB=yue();Object.keys(tB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===tB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return tB[r]}})});var rB=bue();Object.keys(rB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===rB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return rB[r]}})});var nB=kue();Object.keys(nB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===nB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return nB[r]}})});var aB=Sue();Object.keys(aB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===aB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return aB[r]}})});var sB=_ue();Object.keys(sB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===sB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return sB[r]}})});var iB=Iue();Object.keys(iB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===iB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return iB[r]}})});var oB=Oue();Object.keys(oB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===oB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return oB[r]}})});var lB=RL();Object.keys(lB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===lB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return lB[r]}})});var cB=$ue();Object.keys(cB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===cB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return cB[r]}})});var dB=zue();Object.keys(dB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===dB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return dB[r]}})});var uB=que();Object.keys(uB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===uB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return uB[r]}})});var pB=Uue();Object.keys(pB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===pB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return pB[r]}})});var mB=Wue();Object.keys(mB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===mB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return mB[r]}})});var hB=jL();Object.keys(hB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===hB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return hB[r]}})});var fB=p1();Object.keys(fB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===fB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return fB[r]}})});var gB=Ype();Object.keys(gB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===gB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return gB[r]}})});var yB=Zpe();Object.keys(yB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===yB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return yB[r]}})});var vB=Qpe();Object.keys(vB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===vB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return vB[r]}})});var bB=wg();Object.keys(bB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===bB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return bB[r]}})});var TB=W$();Object.keys(TB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===TB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return TB[r]}})});var kB=Y$();Object.keys(kB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===kB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return kB[r]}})});var wB=ime();Object.keys(wB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===wB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return wB[r]}})});var SB=Z$();Object.keys(SB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===SB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return SB[r]}})});var EB=K$();Object.keys(EB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===EB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return EB[r]}})});var xB=Q$();Object.keys(xB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===xB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return xB[r]}})});var DB=X$();Object.keys(DB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===DB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return DB[r]}})});var CB=F0();Object.keys(CB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===CB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return CB[r]}})});var PB=ej();Object.keys(PB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===PB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return PB[r]}})});var _B=kL();Object.keys(_B).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===_B[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return _B[r]}})});var MB=wL();Object.keys(MB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===MB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return MB[r]}})});var AB=vme();Object.keys(AB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===AB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return AB[r]}})});var IB=Tme();Object.keys(IB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===IB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return IB[r]}})});var NB=wme();Object.keys(NB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===NB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return NB[r]}})});var RB=Eme();Object.keys(RB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===RB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return RB[r]}})});var OB=Dme();Object.keys(OB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===OB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return OB[r]}})});var FB=Pme();Object.keys(FB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===FB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return FB[r]}})});var LB=Mme();Object.keys(LB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===LB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return LB[r]}})});var $B=Ime();Object.keys($B).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===$B[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return $B[r]}})});var jB=Rme();Object.keys(jB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===jB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return jB[r]}})});var zB=Fme();Object.keys(zB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===zB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return zB[r]}})});var BB=$me();Object.keys(BB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===BB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return BB[r]}})});var qB=zme();Object.keys(qB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===qB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return qB[r]}})});var HB=Oc();Object.keys(HB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===HB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return HB[r]}})});var UB=qme();Object.keys(UB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===UB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return UB[r]}})});var VB=Fk();Object.keys(VB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===VB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return VB[r]}})});var WB=Ume();Object.keys(WB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===WB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return WB[r]}})});var YB=Yme();Object.keys(YB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===YB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return YB[r]}})});var GB=Kme();Object.keys(GB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===GB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return GB[r]}})});var ZB=Xme();Object.keys(ZB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===ZB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return ZB[r]}})});var KB=the();Object.keys(KB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===KB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return KB[r]}})});var QB=f1();Object.keys(QB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===QB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return QB[r]}})});var JB=nhe();Object.keys(JB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===JB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return JB[r]}})});var XB=rj();Object.keys(XB).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===XB[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return XB[r]}})});var eq=she();Object.keys(eq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===eq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return eq[r]}})});var tq=ohe();Object.keys(tq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===tq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return tq[r]}})});var rq=AL();Object.keys(rq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===rq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return rq[r]}})});var nq=dhe();Object.keys(nq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===nq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return nq[r]}})});var aq=phe();Object.keys(aq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===aq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return aq[r]}})});var sq=hhe();Object.keys(sq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===sq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return sq[r]}})});var iq=ghe();Object.keys(iq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===iq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return iq[r]}})});var oq=IL();Object.keys(oq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===oq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return oq[r]}})});var lq=vhe();Object.keys(lq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===lq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return lq[r]}})});var cq=The();Object.keys(cq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===cq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return cq[r]}})});var dq=whe();Object.keys(dq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===dq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return dq[r]}})});var uq=Ehe();Object.keys(uq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===uq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return uq[r]}})});var pq=Dhe();Object.keys(pq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===pq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return pq[r]}})});var mq=$c();Object.keys(mq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===mq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return mq[r]}})});var hq=_he();Object.keys(hq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===hq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return hq[r]}})});var fq=Ahe();Object.keys(fq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===fq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return fq[r]}})});var gq=Nhe();Object.keys(gq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===gq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return gq[r]}})});var yq=Ohe();Object.keys(yq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===yq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return yq[r]}})});var vq=Lhe();Object.keys(vq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===vq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return vq[r]}})});var bq=jhe();Object.keys(bq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===bq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return bq[r]}})});var Tq=Bhe();Object.keys(Tq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Tq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Tq[r]}})});var kq=U$();Object.keys(kq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===kq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return kq[r]}})});var wq=Vhe();Object.keys(wq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===wq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return wq[r]}})});var Sq=Ghe();Object.keys(Sq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Sq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Sq[r]}})});var Eq=jc();Object.keys(Eq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Eq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Eq[r]}})});var xq=Qhe();Object.keys(xq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===xq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return xq[r]}})});var Dq=Xhe();Object.keys(Dq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Dq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Dq[r]}})});var Cq=tfe();Object.keys(Cq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Cq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Cq[r]}})});var Pq=nfe();Object.keys(Pq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Pq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Pq[r]}})});var _q=sfe();Object.keys(_q).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===_q[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return _q[r]}})});var Mq=ofe();Object.keys(Mq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Mq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Mq[r]}})});var Aq=cfe();Object.keys(Aq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Aq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Aq[r]}})});var Iq=ufe();Object.keys(Iq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Iq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Iq[r]}})});var Nq=mfe();Object.keys(Nq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Nq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Nq[r]}})});var Rq=ffe();Object.keys(Rq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Rq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Rq[r]}})});var Oq=yfe();Object.keys(Oq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Oq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Oq[r]}})});var Fq=bfe();Object.keys(Fq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Fq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Fq[r]}})});var Lq=kfe();Object.keys(Lq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Lq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Lq[r]}})});var $q=Sfe();Object.keys($q).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===$q[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return $q[r]}})});var jq=Dfe();Object.keys(jq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===jq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return jq[r]}})});var zq=Pfe();Object.keys(zq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===zq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return zq[r]}})});var Bq=Xk();Object.keys(Bq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Bq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Bq[r]}})});var qq=Mfe();Object.keys(qq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===qq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return qq[r]}})});var Hq=Nfe();Object.keys(Hq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Hq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Hq[r]}})});var Uq=Ofe();Object.keys(Uq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Uq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Uq[r]}})});var Vq=u$();Object.keys(Vq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Vq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Vq[r]}})});var Wq=G1();Object.keys(Wq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Wq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Wq[r]}})});var Yq=CL();Object.keys(Yq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Yq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Yq[r]}})});var Gq=Lfe();Object.keys(Gq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Gq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Gq[r]}})});var Zq=jfe();Object.keys(Zq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Zq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Zq[r]}})});var Kq=j0();Object.keys(Kq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Kq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Kq[r]}})});var Qq=Bfe();Object.keys(Qq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Qq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Qq[r]}})});var Jq=Hfe();Object.keys(Jq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Jq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Jq[r]}})});var Xq=V1();Object.keys(Xq).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===Xq[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return Xq[r]}})});var eH=Wfe();Object.keys(eH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===eH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return eH[r]}})});var tH=Gfe();Object.keys(tH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===tH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return tH[r]}})});var rH=$k();Object.keys(rH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===rH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return rH[r]}})});var nH=Kfe();Object.keys(nH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===nH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return nH[r]}})});var aH=V$();Object.keys(aH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===aH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return aH[r]}})});var sH=bl();Object.keys(sH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===sH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return sH[r]}})});var iH=kg();Object.keys(iH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===iH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return iH[r]}})});var oH=G$();Object.keys(oH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===oH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return oH[r]}})});var lH=qk();Object.keys(lH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===lH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return lH[r]}})});var cH=S0();Object.keys(cH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===cH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return cH[r]}})});var dH=J$();Object.keys(dH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===dH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return dH[r]}})});var uH=Jfe();Object.keys(uH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===uH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return uH[r]}})});var pH=ege();Object.keys(pH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===pH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return pH[r]}})});var mH=wo();Object.keys(mH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===mH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return mH[r]}})});var hH=_0();Object.keys(hH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===hH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return hH[r]}})});var fH=C0();Object.keys(fH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===fH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return fH[r]}})});var gH=nge();Object.keys(gH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===gH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return gH[r]}})});var yH=ige();Object.keys(yH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===yH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return yH[r]}})});var vH=lge();Object.keys(vH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===vH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return vH[r]}})});var bH=sw();Object.keys(bH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===bH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return bH[r]}})});var TH=dge();Object.keys(TH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===TH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return TH[r]}})});var kH=$L();Object.keys(kH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===kH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return kH[r]}})});var wH=pge();Object.keys(wH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===wH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return wH[r]}})});var SH=hge();Object.keys(SH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===SH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return SH[r]}})});var EH=sj();Object.keys(EH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===EH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return EH[r]}})});var xH=gge();Object.keys(xH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===xH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return xH[r]}})});var DH=vge();Object.keys(DH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===DH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return DH[r]}})});var CH=Tge();Object.keys(CH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===CH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return CH[r]}})});var PH=wge();Object.keys(PH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===PH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return PH[r]}})});var _H=Q();Object.keys(_H).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===_H[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return _H[r]}})});var MH=T1();Object.keys(MH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===MH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return MH[r]}})});var AH=Ege();Object.keys(AH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===AH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return AH[r]}})});var IH=Dge();Object.keys(IH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===IH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return IH[r]}})});var NH=Pge();Object.keys(NH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===NH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return NH[r]}})});var RH=Mge();Object.keys(RH).forEach(function(r){r==="default"||r==="__esModule"||r in v&&v[r]===RH[r]||Object.defineProperty(v,r,{enumerable:!0,get:function(){return RH[r]}})})});var Ige={};Ke(Ige,{TaskSelectionService:()=>LH});var LH,Nge=b(()=>{LH=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 n=t.indexOf(this.lastSelectedPath),a=t.indexOf(e);if(n===-1||a===-1){this.toggleSelection(e);return}let s=Math.min(n,a),i=Math.max(n,a);for(let o=s;o<=i;o++)this.selectedTaskPaths.add(t[o]);this.lastSelectedPath=e,this.notifySelectionChange()}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 n=await this.plugin.cacheManager.getTaskInfo(t);n&&e.push(n)}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(n){console.error("[TaskSelectionService] Error in selection mode listener:",n)}}notifySelectionChange(){let e=this.getSelectedPaths();for(let t of this.selectionChangeListeners)try{t(e)}catch(n){console.error("[TaskSelectionService] Error in selection change listener:",n)}}destroy(){this.selectedTaskPaths.clear(),this.selectionModeListeners=[],this.selectionChangeListeners=[]}}});var Rge={};Ke(Rge,{BasesFilterConverter:()=>$H});var $H,Oge=b(()=>{$H=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 console.error("Error converting TaskNotes filter to Bases:",t),new Error(`Failed to convert filter: ${t.message}`)}}convertNodeToObject(e){return e.type=="group"?this.convertGroupToObject(e):e.type=="condition"?this.convertConditionToString(e):null}convertGroupToObject(e){let t=e.children.filter(s=>s.type=="condition"?this.isConditionComplete(s):!0);if(t.length==0)return null;let n=t.map(s=>this.convertNodeToObject(s)).filter(s=>s!==null);return n.length==0?null:n.length===1?n[0]:{[e.conjunction=="and"?"and":"or"]:n}}convertConditionToString(e){let{property:t,operator:n,value:a}=e;if(t=="status.isCompleted")return this.convertCompletedStatusCondition(n,a);if(t=="archived")return this.convertArchivedCondition(n);if(t=="dependencies.isBlocked")return this.convertIsBlockedCondition(n);if(t.startsWith("user:"))return this.convertUserFieldCondition(t,n,a);let s=this.getBasesPropertyPath(t);return this.convertOperator(s,n,a,t)}isConditionComplete(e){let{property:t,operator:n,value:a}=e;return!t||!n?!1:["is-empty","is-not-empty","is-checked","is-not-checked"].includes(n)?!0:a!=null&&a!==""}convertCompletedStatusCondition(e,t){let n=this.statusManager.getCompletedStatuses(),a=this.plugin.fieldMapper,s=a.toUserField("status"),i=n.map(u=>`note.${s} == "${this.escapeString(u)}"`).join(" || "),o=n.length>1?`(${i})`:i,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 n=this.plugin.fieldMapper.toUserField("archiveTag"),a=`file.tags.contains("${this.escapeString(n)}")`;return e=="is-not-checked"||e=="is-not"?`!${a}`:a}convertIsBlockedCondition(e){let n=this.plugin.fieldMapper.toUserField("blockedBy"),a=`(note.${n} && list(note.${n}).length > 0)`;return e=="is-not-checked"||e=="is-not"?`!(${a})`:a}convertUserFieldCondition(e,t,n){let a=e.slice(5),i=(this.plugin.settings.userFields||[]).find(l=>(l.id||l.key)===a||l.key===a);if(!i)return console.warn(`User field not found: ${a}`),"true";let o=`note.${i.key}`;return this.convertOperator(o,t,n,e,i.type)}getBasesPropertyPath(e){let t=this.plugin.fieldMapper,n;switch(e){case"title":return"file.name";case"status":n=t.toUserField("status");break;case"priority":n=t.toUserField("priority");break;case"due":n=t.toUserField("due");break;case"scheduled":n=t.toUserField("scheduled");break;case"contexts":n=t.toUserField("contexts");break;case"projects":n=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":n=t.toUserField("timeEstimate");break;case"completedDate":n=t.toUserField("completedDate");break;case"recurrence":n=t.toUserField("recurrence");break;case"blockedBy":n=t.toUserField("blockedBy");break;case"blocking":n="blocking";break;default:n=e}return`note.${n}`}convertOperator(e,t,n,a,s){switch(t){case"is":return this.convertIsOperator(e,n,s);case"is-not":return`!(${this.convertIsOperator(e,n,s)})`;case"contains":return this.convertContainsOperator(e,n,a);case"does-not-contain":return`!(${this.convertContainsOperator(e,n,a)})`;case"is-before":return`${e} < "${this.escapeString(String(n))}"`;case"is-after":return`${e} > "${this.escapeString(String(n))}"`;case"is-on-or-before":return`${e} <= "${this.escapeString(String(n))}"`;case"is-on-or-after":return`${e} >= "${this.escapeString(String(n))}"`;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(n)}`;case"is-less-than":return`${e} < ${this.formatNumericValue(n)}`;case"is-greater-than-or-equal":return`${e} >= ${this.formatNumericValue(n)}`;case"is-less-than-or-equal":return`${e} <= ${this.formatNumericValue(n)}`;default:return console.warn(`Unknown operator: ${t}`),"true"}}convertIsOperator(e,t,n){if(Array.isArray(t)){if(t.length==0)return`(!${e} || ${e}.length == 0)`;let a=t.map(s=>`${e}.contains("${this.escapeString(String(s))}")`);return a.length>1?`(${a.join(" || ")})`:a[0]}return n=="list"?`${e}.contains("${this.escapeString(String(t))}")`:typeof t=="boolean"||n=="boolean"?`${e} == ${t}`:typeof t=="number"||n=="number"?`${e} == ${t}`:t==null||t==""?`(!${e} || ${e} == "" || ${e} == null)`:`${e} == "${this.escapeString(String(t))}"`}convertContainsOperator(e,t,n){if(["tags","contexts","projects"].includes(n)){if(Array.isArray(t)){let s=t.map(i=>`${e}.contains("${this.escapeString(String(i))}")`);return s.length>1?`(${s.join(" || ")})`:s[0]}if(n=="projects"){let s=String(t);return s.startsWith("[[")&&s.endsWith("]]")?`${e}.contains("${this.escapeString(s)}")`:`(${e}.contains("[[${this.escapeString(s)}]]") || ${e}.contains("${this.escapeString(s)}"))`}return`${e}.contains("${this.escapeString(String(t))}")`}return`${e}.lower().contains("${this.escapeString(String(t).toLowerCase())}")`}formatNumericValue(e){if(typeof e=="number")return String(e);let t=parseFloat(String(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 n=" ".repeat(t);if(typeof e=="string")return`'${e.replace(/'/g,"\\'")}'`;if(Array.isArray(e))return e.map(a=>` ${n}- ${this.filterObjectToYAML(a,t+1)}`).join("");if(typeof e=="object"&&e!==null){let a=Object.keys(e)[0],s=e[a];return Array.isArray(s)?` ${n}${a}:${s.map(i=>` ${n} - ${this.filterObjectToYAML(i,t+2)}`).join("")}`:` ${n}${a}: ${this.filterObjectToYAML(s,t+1)}`}return String(e)}convertSavedViewToBasesFile(e,t="tasknotesTaskList"){let n=this.convertToBasesFilter(e.query),a=`# ${e.name} `;if(n&&(a+=`filters:${this.filterObjectToYAML(n,1)} `),a+=`views: `,a+=` - type: ${t} `,a+=` name: "${e.name}" `,e.query.sortKey&&e.query.sortKey!=="none"){let s=this.mapSortKeyToBasesColumn(e.query.sortKey),i=(e.query.sortDirection||"asc").toUpperCase();a+=` sort: `,a+=` - column: ${s} `,a+=` direction: ${i} `}if(e.query.groupKey&&e.query.groupKey!=="none"){let s=this.mapGroupKeyToBasesColumn(e.query.groupKey),i=(e.query.sortDirection||"asc").toUpperCase();a+=` groupBy: `,a+=` property: ${s} `,a+=` direction: ${i} `}return e.viewOptions&&Object.keys(e.viewOptions).length>0&&(a+=` options: `,Object.entries(e.viewOptions).forEach(([s,i])=>{let o;typeof i=="boolean"||typeof i=="number"?o=String(i):typeof i=="string"?o=`"${this.escapeString(i)}"`:o=JSON.stringify(i),a+=` ${s}: ${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 n=e.slice(5),s=(this.plugin.settings.userFields||[]).find(i=>(i.id||i.key)===n||i.key===n);return(s==null?void 0:s.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 n=[];for(let a of e){let s=this.detectViewType(a),i=this.convertToBasesFilter(a.query),o=` - type: ${s} `;if(o+=` name: "${a.name}" `,i&&(o+=` filters:${this.filterObjectToYAML(i,3)} `),a.query.sortKey&&a.query.sortKey!=="none"){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} `})),n.push(o)}return t+=`views: `,t+=n.join(` `),t}detectViewType(e){let t=e.viewOptions||{};return["showScheduled","showDue","showRecurring","showTimeEntries","showTimeblocks","showPropertyBasedEvents","calendarView","customDayCount","firstDay","slotMinTime","slotMaxTime","slotDuration"].some(o=>o in t)?"tasknotesCalendar":["columnWidth","hideEmptyColumns"].some(o=>o in t)?"tasknotesKanban":"tasknotesTaskList"}}});var Fge={};Ke(Fge,{MdbaseSpecService:()=>jH});function U0(r){return`"${r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function GZe(r){return U0(r)}function ZZe(r){let e=r.toLowerCase();return e==="true"||e==="false"?e:U0(r)}var jH,Lge=b(()=>{jH=class{constructor(e){this.plugin=e}async onSettingsChanged(){this.plugin.settings.enableMdbaseSpec&&await this.generate()}async generate(){try{let e=this.plugin.app.vault;await e.adapter.exists("_types")||await e.createFolder("_types");let n=this.buildTaskTypeDef();if(await this.writeFile("_types/task.md",n),!await e.adapter.exists("mdbase.yaml")){let s=this.buildMdbaseYaml();await this.writeFile("mdbase.yaml",s)}console.debug("[TaskNotes][mdbase-spec] Generated mdbase.yaml and _types/task.md")}catch(e){console.error("[TaskNotes][mdbase-spec] Failed to generate files:",e)}}async writeFile(e,t){let n=this.plugin.app.vault;await n.adapter.exists(e)?await n.adapter.write(e,t):await n.create(e,t)}buildMdbaseYaml(){return['spec_version: "0.2.0"','name: "TaskNotes"','description: "Task collection managed by TaskNotes for Obsidian"',"settings:",' types_folder: "_types"'," default_strict: false"," exclude:",' - "_types"',""].join(` `)}buildTaskTypeDef(){let e=this.plugin.settings,t=this.plugin.fieldMapper,n=[];if(n.push("---"),n.push("name: task"),n.push("description: A task managed by the TaskNotes plugin for Obsidian."),n.push(`display_name_key: ${t.toUserField("title")}`),n.push("strict: false"),n.push(""),n.push("match:"),this.addMatchRules(n),n.push(""),n.push("fields:"),this.addRoleField(n,"title",{type:"string",required:!0,description:"Short summary of the task."}),this.addRoleField(n,"status",{type:"enum",required:!0,values:e.customStatuses.map(a=>a.value),default:e.defaultTaskStatus,tn_completed_values:e.customStatuses.filter(a=>a.isCompleted).map(a=>a.value)}),this.addRoleField(n,"priority",{type:"enum",values:e.customPriorities.map(a=>a.value),default:e.defaultTaskPriority}),this.addRoleField(n,"due",{type:"date"}),this.addRoleField(n,"scheduled",{type:"date"}),this.addRoleField(n,"contexts",{type:"list",items:{type:"string"}}),this.addRoleField(n,"projects",{type:"list",items:{type:"link"},description:"Wikilinks to related project notes."}),this.addRoleField(n,"timeEstimate",{type:"integer",min:0,description:"Estimated time in minutes."}),this.addRoleField(n,"completedDate",{type:"date"}),this.addRoleField(n,"dateCreated",{type:"datetime",required:!0}),this.addRoleField(n,"dateModified",{type:"datetime"}),this.addRoleField(n,"recurrence",{type:"string"}),this.addRoleField(n,"recurrenceAnchor",{type:"enum",values:["scheduled","completion"],default:"scheduled"}),this.addField(n,"tags",{type:"list",items:{type:"string"},tn_role:"tags"}),this.addRoleField(n,"timeEntries",{type:"list",items:{type:"object",fields:{startTime:{type:"datetime"},endTime:{type:"datetime"},description:{type:"string"},duration:{type:"integer"}}}}),this.addRoleField(n,"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(n,"blockedBy",{type:"list",items:{type:"object",fields:{uid:{type:"link",required:!0},reltype:{type:"string"},gap:{type:"string"}}}}),this.addRoleField(n,"completeInstances",{type:"list",items:{type:"date"}}),this.addRoleField(n,"skippedInstances",{type:"list",items:{type:"date"}}),this.addRoleField(n,"icsEventId",{type:"list",items:{type:"string"}}),this.addRoleField(n,"googleCalendarEventId",{type:"string"}),e.userFields&&e.userFields.length>0)for(let a of e.userFields)this.addField(n,a.key,this.mapUserFieldType(a));return n.push("---"),n.push(""),n.push("# Task"),n.push(""),n.push("This type definition describes the data schema for tasks managed by"),n.push("[TaskNotes](https://github.com/callumalpass/tasknotes), an Obsidian plugin"),n.push("for note-based task management."),n.push(""),n.push("It conforms to [mdbase-spec](https://github.com/callumalpass/mdbase-spec) v0.2.0,"),n.push("a specification for typed markdown collections."),n.push(""),n.push("TaskNotes also adds a non-standard `tn_role` field annotation on schema"),n.push("fields. This maps each field to its TaskNotes semantic role so custom"),n.push("frontmatter field names can still be interpreted consistently."),n.push("The status field also includes `tn_completed_values`, listing"),n.push("which status values count as completed."),n.push(""),n.push("This file is automatically generated from TaskNotes settings and should not be"),n.push("edited manually. Changes to TaskNotes settings (statuses, priorities, field"),n.push("mappings, user fields) will cause this file to be regenerated."),n.push(""),n.join(` `)}addField(e,t,n,a=2){let s=" ".repeat(a);e.push(`${s}${t}:`),this.writeFieldProps(e,n,a+2)}addRoleField(e,t,n,a=2){let s=this.plugin.fieldMapper.toUserField(t);this.addField(e,s,{...n,tn_role:t},a)}writeFieldProps(e,t,n){let a=" ".repeat(n);if(e.push(`${a}type: ${t.type}`),t.required&&e.push(`${a}required: true`),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: ${U0(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[s,i]of Object.entries(t.items.fields))this.addField(e,s,i,n+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 n,a;let t=this.plugin.settings;if(t.taskIdentificationMethod==="property"){let s=(n=t.taskPropertyName)==null?void 0:n.trim(),i=(a=t.taskPropertyValue)==null?void 0:a.trim();if(!s){this.addTagMatchRule(e);return}e.push(" where:"),e.push(` ${GZe(s)}:`),i?e.push(` eq: ${ZZe(i)}`):e.push(" exists: true");return}this.addTagMatchRule(e)}addTagMatchRule(e){var n;let t=((n=this.plugin.settings.taskTag)==null?void 0:n.trim())||"task";e.push(" where:"),e.push(" tags:"),e.push(` contains: ${U0(t)}`)}}});var V0,$ge=b(()=>{V0=class{constructor(e){this.basesView=e}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 n=e.getValue(t);return this.convertValueToNative(n)}catch(n){return console.warn(`[BasesDataAdapter] Failed to get property ${t}:`,n),null}}convertValueToNative(e){var t,n;if(e==null||((t=e.constructor)==null?void 0:t.name)==="NullValue")return null;if(typeof e.data!="undefined")return e.data;if(typeof e.length=="function"){let a=e.length(),s=[];for(let i=0;i0?t.join(", "):"None":String(t)}extractEntryProperties(e){let n={...e.frontmatter||e.properties||{}},a=e.file;return a&&(a.name!==void 0&&(n["file.name"]=a.name),a.basename!==void 0&&(n["file.basename"]=a.basename),a.extension!==void 0&&(n["file.extension"]=a.extension),a.path!==void 0&&(n["file.path"]=a.path),a.stat&&(a.stat.size!==void 0&&(n["file.size"]=a.stat.size),a.stat.ctime!==void 0&&(n["file.ctime"]=a.stat.ctime),a.stat.mtime!==void 0&&(n["file.mtime"]=a.stat.mtime))),n}getComputedProperty(e,t){if(!e)return null;try{let n=e.getValue(t);return this.convertValueToNative(n)}catch(n){return null}}stripPropertyPrefix(e){let t=e.split(".");return t.length>1&&["note","file","formula"].includes(t[0])?t.slice(1).join("."):e}}});var W0,jge=b(()=>{W0=class{constructor(e,t){this.plugin=e;this.fieldMapper=t}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.fromUserField(e)||e}basesToUserProperty(e){let t=this.basesToInternal(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\.)/,""),n=(a=this.fieldMapper)==null?void 0:a.fromUserField(t);return n||(t==="ctime"||e==="file.ctime"?"dateCreated":t==="mtime"||e==="file.mtime"?"dateModified":t==="name"||t==="basename"?"title":t)}mapVisibleProperties(e){return e.map(t=>this.basesToTaskCardProperty(t))}}});var zge,Y0,Bge=b(()=>{zge=require("obsidian");Wl();Y0=class{constructor(e,t,n=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=n,this.debouncedSearch=Rh(a=>{this.destroyed||this.onSearch(a)},this.debounceMs,!1)}render(){let e=this.container.ownerDocument;this.searchBoxEl=e.createElement("div"),this.searchBoxEl.className="tn-search-box";let t=e.createElement("div");t.className="tn-search-box__input-wrapper";let n=e.createElement("div");n.className="tn-search-box__icon",(0,zge.setIcon)(n,"search"),this.inputEl=e.createElement("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=e.createElement("button");return a.type="button",a.className="tn-search-box__clear",a.textContent="\xD7",a.setAttribute("aria-label","Clear search"),this.clearBtnEl=a,t.appendChild(n),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 G0,qge=b(()=>{G0=class{constructor(e){this.visibleProperties=e||[]}filterTasks(e,t){let n=this.normalizeSearchTerm(t);return n?e.filter(a=>this.extractSearchableText(a).includes(n)):e}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 n of this.visibleProperties){let a=e.customProperties[n];a!=null&&(Array.isArray(a)?t.push(a.join(" ")):t.push(String(a)))}return t.join(" ").toLowerCase()}normalizeSearchTerm(e){return e.trim().toLowerCase()}}});var Z0,El,ow=b(()=>{Z0=require("obsidian");$ge();jge();Fs();Pd();Vu();Bge();qge();aD();El=class extends Z0.Component{constructor(t,n,a){super();this.rootElement=null;this.taskUpdateListener=null;this.updateDebounceTimer=null;this.dataUpdateDebounceTimer=null;this.relevantPathsCache=new Set;this.enableSearch=!1;this.searchBox=null;this.searchFilter=null;this.currentSearchTerm="";this.selectionModeCleanup=null;this.selectionIndicatorEl=null;this.plugin=a,this.containerEl=n,this.dataAdapter=new V0(this),this.propertyMapper=new W0(a,a.fieldMapper),this.createFileForView=this.createFileForView.bind(this)}onload(){this.setupContainer(),this.setupTaskUpdateListener(),this.setupSelectionHandling(),this.updateRelevantPathsCache(),this.render()}onDataUpdated(){var n;if(!((n=this.rootElement)!=null&&n.isConnected))return;this.dataUpdateDebounceTimer&&clearTimeout(this.dataUpdateDebounceTimer);let t=this.containerEl.ownerDocument.defaultView||window;this.dataUpdateDebounceTimer=t.setTimeout(()=>{this.dataUpdateDebounceTimer=null;try{this.render()}catch(a){console.error(`[TaskNotes][${this.type}] Render error:`,a),this.renderError(a)}},500)}updateRelevantPathsCache(){this.relevantPathsCache.clear();try{let t=this.dataAdapter.extractDataItems();for(let n of t)n.path&&this.relevantPathsCache.add(n.path)}catch(t){}}getEphemeralState(){var t;return{scrollTop:((t=this.rootElement)==null?void 0:t.scrollTop)||0}}setEphemeralState(t){if(!(!t||!this.rootElement||!this.rootElement.isConnected))try{t.scrollTop!==void 0&&(this.rootElement.scrollTop=t.scrollTop)}catch(n){console.debug("[TaskNotes][Bases] Failed to restore ephemeral state:",n)}}focus(){var t;try{(t=this.rootElement)!=null&&t.isConnected&&typeof this.rootElement.focus=="function"&&this.rootElement.focus()}catch(n){console.debug("[TaskNotes][Bases] Failed to focus view:",n)}}refresh(){this.render()}onResize(){}setupContainer(){this.containerEl.empty();let n=this.containerEl.ownerDocument.createElement("div");n.className=`tn-bases-integration tasknotes-plugin tasknotes-container tn-${this.type}`,n.tabIndex=-1,this.containerEl.appendChild(n),this.rootElement=n,this.setupNewTaskButton()}setupNewTaskButton(){setTimeout(()=>this.injectNewTaskButton(),100),this.register(()=>this.cleanupNewTaskButton())}cleanupNewTaskButton(){let t=this.containerEl.closest(".bases-view"),n=t==null?void 0:t.parentElement;n==null||n.classList.remove("tasknotes-view-active")}injectNewTaskButton(){let t=this.containerEl.closest(".bases-view");if(!t){console.debug("[TaskNotes][Bases] No .bases-view found");return}let n=t.parentElement;if(!n){console.debug("[TaskNotes][Bases] No parent element found");return}n.classList.add("tasknotes-view-active");let a=n.querySelector(".bases-toolbar");if(!a){console.debug("[TaskNotes][Bases] No .bases-toolbar found in parent");return}if(a.querySelector(".tn-bases-new-task-btn"))return;let s=this.containerEl.ownerDocument,i=s.createElement("div");i.className="bases-toolbar-item tn-bases-new-task-btn";let o=s.createElement("div");o.className="text-icon-button",o.tabIndex=0;let l=s.createElement("span");l.className="text-button-icon",(0,Z0.setIcon)(l,"plus"),o.appendChild(l);let c=s.createElement("span");c.className="text-button-label",c.textContent=this.plugin.i18n.translate("common.new"),o.appendChild(c),i.appendChild(o),i.addEventListener("click",()=>{this.createFileForView("New Task")});let d=a.querySelector(".bases-toolbar-new-item-menu");d?d.before(i):a.appendChild(i),console.debug("[TaskNotes][Bases] Injected New Task button into toolbar")}setupTaskUpdateListener(){this.taskUpdateListener||(this.taskUpdateListener=this.plugin.emitter.on(er,async t=>{var n;try{let a=(t==null?void 0:t.task)||(t==null?void 0:t.taskInfo);if(!(a!=null&&a.path)||!((n=this.rootElement)!=null&&n.isConnected))return;this.relevantPathsCache.has(a.path)&&await this.handleTaskUpdate(a)}catch(a){console.error("[TaskNotes][Bases] Error in task update handler:",a),this.debouncedRefresh()}}),this.register(()=>{this.taskUpdateListener&&(this.plugin.emitter.offref(this.taskUpdateListener),this.taskUpdateListener=null)}))}debouncedRefresh(){this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer);let t=this.containerEl.ownerDocument.defaultView||window;this.updateDebounceTimer=t.setTimeout(()=>{this.render(),this.updateDebounceTimer=null},300)}async createFileForView(t,n){let{TaskCreationModal:a}=await Promise.resolve().then(()=>(kD(),Nne)),s={},i={};if(n){let d={};n(d);let u=this.plugin.fieldMapper;if(d[u.toUserField("title")]&&(s.title=String(d[u.toUserField("title")])),d[u.toUserField("status")]&&(s.status=String(d[u.toUserField("status")])),d[u.toUserField("priority")]&&(s.priority=String(d[u.toUserField("priority")])),d[u.toUserField("due")]&&(s.due=String(d[u.toUserField("due")])),d[u.toUserField("scheduled")]&&(s.scheduled=String(d[u.toUserField("scheduled")])),d[u.toUserField("contexts")]){let h=d[u.toUserField("contexts")];s.contexts=Array.isArray(h)?h:[h]}if(d[u.toUserField("projects")]){let h=d[u.toUserField("projects")];s.projects=Array.isArray(h)?h:[h]}if(d.tags){let h=d.tags;s.tags=Array.isArray(h)?h:[h]}if(d.tags&&Array.isArray(d.tags)){let h=u.toUserField("archiveTag");s.archived=d.tags.includes(h)}if(d[u.toUserField("timeEstimate")]&&(s.timeEstimate=Number(d[u.toUserField("timeEstimate")])),d[u.toUserField("recurrence")]&&(s.recurrence=String(d[u.toUserField("recurrence")])),d[u.toUserField("completedDate")]&&(s.completedDate=String(d[u.toUserField("completedDate")])),d[u.toUserField("dateCreated")]&&(s.dateCreated=String(d[u.toUserField("dateCreated")])),d[u.toUserField("blockedBy")]){let h=d[u.toUserField("blockedBy")];s.blockedBy=Array.isArray(h)?h:[h]}let p=this.plugin.settings.userFields||[];for(let h of p)d[h.key]!==void 0&&(i[h.key]=d[h.key]);let m=new Set([u.toUserField("title"),u.toUserField("status"),u.toUserField("priority"),u.toUserField("due"),u.toUserField("scheduled"),u.toUserField("contexts"),u.toUserField("projects"),"tags",u.toUserField("archiveTag"),u.toUserField("timeEstimate"),u.toUserField("recurrence"),u.toUserField("completedDate"),u.toUserField("dateCreated"),u.toUserField("blockedBy"),...p.map(h=>h.key)]);for(let[h,f]of Object.entries(d))m.has(h)||(i[h]=f)}let o={...s};Object.keys(i).length>0&&(o.customFrontmatter=i);let l=this.app||this.plugin.app;new a(l,this.plugin,{prePopulatedValues:o,onTaskCreated:d=>{this.refresh()}}).open()}getVisibleProperties(){let t=this.config.getOrder(),n=this.propertyMapper.mapVisibleProperties(t);if(!n||n.length===0){let a=this.plugin.settings.defaultVisibleProperties||[...Nh,"tags"];n=Ba(a,this.plugin)}return n}setupSearch(t){if(this.searchBox){this.currentSearchTerm&&this.searchBox.getValue()!==this.currentSearchTerm&&this.searchBox.setValue(this.currentSearchTerm);return}if(!this.enableSearch)return;let a=this.containerEl.ownerDocument.createElement("div");a.className="tn-search-container",t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a);let s=[];try{this.config&&(s=this.getVisibleProperties())}catch(i){console.debug(`[${this.type}] Could not get visible properties during search setup:`,i)}this.searchFilter=new G0(s),this.searchBox=new Y0(a,i=>this.handleSearch(i),300),this.searchBox.render(),this.currentSearchTerm&&this.searchBox.setValue(this.currentSearchTerm),this.register(()=>{this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.searchFilter=null,this.currentSearchTerm=""})}handleSearch(t){let n=performance.now();this.currentSearchTerm=t,this.render();let a=performance.now()-n;a>200&&console.warn(`[${this.type}] Slow search: ${a.toFixed(2)}ms for search term "${t}"`)}applySearchFilter(t){if(!this.searchFilter||!this.currentSearchTerm)return t;let n=performance.now(),a=this.searchFilter.filterTasks(t,this.currentSearchTerm),s=performance.now()-n;return s>100&&console.warn(`[${this.type}] Filter operation took ${s.toFixed(2)}ms for ${t.length} tasks`),a}isSearchWithNoResults(t,n){return this.currentSearchTerm.length>0&&t.length===0&&n>0}renderSearchNoResults(t){let n=t.ownerDocument,a=n.createElement("div");a.className="tn-search-no-results";let s=n.createElement("div");s.className="tn-search-no-results__text",s.textContent=`No tasks match "${this.currentSearchTerm}"`;let i=n.createElement("div");i.className="tn-search-no-results__hint",i.textContent="Try a different search term or clear the search",a.appendChild(s),a.appendChild(i),t.appendChild(a)}setupSelectionHandling(){if(!this.rootElement)return;let t=this.plugin.taskSelectionService;if(!t)return;let n=i=>{if(i.key==="Escape"&&t.isSelectionModeActive()&&(t.exitSelectionMode(!0),this.updateSelectionModeUI(!1)),(i.ctrlKey||i.metaKey)&&i.key==="a"&&t.isSelectionModeActive()){i.preventDefault();let o=this.getVisibleTaskPaths();t.selectAll(o),this.updateSelectionVisuals()}};this.rootElement.addEventListener("keydown",n);let a=t.onSelectionChange(i=>{this.updateSelectionVisuals(),this.updateSelectionIndicator(i.length)}),s=t.onSelectionModeChange(i=>{this.updateSelectionModeUI(i)});this.register(()=>{var i;(i=this.rootElement)==null||i.removeEventListener("keydown",n),a(),s()})}updateSelectionModeUI(t){this.rootElement&&(t?(this.rootElement.classList.add("tn-selection-mode"),this.rootElement.setAttribute("data-selection-mode","true")):(this.rootElement.classList.remove("tn-selection-mode"),this.rootElement.removeAttribute("data-selection-mode"),this.clearSelectionVisuals()))}updateSelectionVisuals(){if(!this.rootElement)return;let t=this.plugin.taskSelectionService;if(!t)return;let n=t.getPrimarySelectedPath(),a=this.rootElement.querySelectorAll(".task-card");for(let i of a){let o=i.dataset.taskPath;o&&(t.isSelected(o)?(i.classList.add("task-card--selected"),o===n?i.classList.add("task-card--selected-primary"):i.classList.remove("task-card--selected-primary")):(i.classList.remove("task-card--selected"),i.classList.remove("task-card--selected-primary")))}let s=this.rootElement.querySelectorAll(".kanban-view__card-wrapper");for(let i of s){let o=i.dataset.taskPath;o&&(t.isSelected(o)?(i.classList.add("kanban-view__card-wrapper--selected"),o===n?i.classList.add("kanban-view__card-wrapper--selected-primary"):i.classList.remove("kanban-view__card-wrapper--selected-primary")):(i.classList.remove("kanban-view__card-wrapper--selected"),i.classList.remove("kanban-view__card-wrapper--selected-primary")))}}clearSelectionVisuals(){if(!this.rootElement)return;let t=this.rootElement.querySelectorAll(".task-card--selected");for(let a of t)a.classList.remove("task-card--selected"),a.classList.remove("task-card--selected-primary");let n=this.rootElement.querySelectorAll(".kanban-view__card-wrapper--selected");for(let a of n)a.classList.remove("kanban-view__card-wrapper--selected"),a.classList.remove("kanban-view__card-wrapper--selected-primary")}updateSelectionIndicator(t){if(this.rootElement)if(t>0){if(!this.selectionIndicatorEl){let n=this.rootElement.ownerDocument;this.selectionIndicatorEl=n.createElement("div"),this.selectionIndicatorEl.className="tn-selection-indicator",this.selectionIndicatorEl.addEventListener("click",()=>{var a,s;(a=this.plugin.taskSelectionService)==null||a.clearSelection(),(s=this.plugin.taskSelectionService)==null||s.exitSelectionMode()}),this.rootElement.appendChild(this.selectionIndicatorEl)}this.selectionIndicatorEl.textContent=`${t} selected`,this.selectionIndicatorEl.style.display="block"}else this.selectionIndicatorEl&&(this.selectionIndicatorEl.style.display="none")}handleSelectionClick(t,n){let a=this.plugin.taskSelectionService;if(!a||!a.isSelectionModeActive()&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return!1;if(t.shiftKey&&!a.isSelectionModeActive()&&a.enterSelectionMode(),t.shiftKey){let s=this.getVisibleTaskPaths();a.selectRange(n,s)}else(t.ctrlKey||t.metaKey||a.isSelectionModeActive())&&a.toggleSelection(n);return this.updateSelectionVisuals(),!0}showBatchContextMenu(t){let n=this.plugin.taskSelectionService;if(!n)return;let a=n.getSelectedPaths();if(a.length===0)return;new IT({plugin:this.plugin,selectedPaths:a,onUpdate:()=>{this.render()}}).show(t)}getVisibleTaskPaths(){if(!this.rootElement)return[];let t=this.rootElement.querySelectorAll(".task-card[data-task-path]"),n=[];for(let a of t){let s=a.dataset.taskPath;s&&n.push(s)}return n}}});function Hge(r,e,t){var c,d,u;let n=new Set(["title","status","priority","archived","due","scheduled","contexts","projects","tags","timeEstimate","completedDate","recurrence","dateCreated","dateModified","timeEntries","reminders","icsEventId","complete_instances","skipped_instances","blockedBy","blocking"]),a={};Object.keys(r).forEach(p=>{n.has(p)||(a[p]=r[p])});let s=r.timeEntries?ha(r.timeEntries):0,i=!1,o=[],l=!1;return t!=null&&t.dependencyCache&&e.path?(i=t.dependencyCache.isTaskBlocked(e.path),o=t.dependencyCache.getBlockedTaskPaths(e.path),l=o.length>0):i=Array.isArray(r.blockedBy)&&r.blockedBy.length>0,{title:r.title||e.name||((d=(c=e.path)==null?void 0:c.split("/").pop())==null?void 0:d.replace(".md",""))||"Untitled",status:r.status||((u=t==null?void 0:t.settings)==null?void 0:u.defaultTaskStatus)||"open",priority:r.priority||"normal",path:e.path||"",archived:r.archived||!1,due:r.due,scheduled:r.scheduled,contexts:Array.isArray(r.contexts)?r.contexts:r.contexts?[r.contexts]:void 0,projects:Array.isArray(r.projects)?r.projects:r.projects?[r.projects]:void 0,tags:Array.isArray(r.tags)?r.tags:r.tags?[r.tags]:void 0,timeEstimate:r.timeEstimate,completedDate:r.completedDate,recurrence:r.recurrence,dateCreated:r.dateCreated,dateModified:r.dateModified,timeEntries:r.timeEntries,totalTrackedTime:s,reminders:r.reminders,icsEventId:r.icsEventId,complete_instances:r.complete_instances,skipped_instances:r.skipped_instances,blockedBy:r.blockedBy,blocking:o.length>0?o:void 0,isBlocked:i,isBlocking:l,customProperties:Object.keys(a).length>0?a:void 0,basesData:e.basesData}}function QZe(r,e){if(!(r!=null&&r.path))return null;let t=r.properties||r.frontmatter||{};if(e!=null&&e.fieldMapper){let n=e.fieldMapper.mapFromFrontmatter(t,r.path,e.settings.storeTitleInFilename),a=Hge(n,r,e),s={};return Object.keys(t).forEach(i=>{i.startsWith("file.")&&(s[i]=t[i])}),{...a,customProperties:{...n.customProperties,...a.customProperties,...s}}}else return Hge(t,r,e)}async function Cm(r,e,t){let n=t||QZe,a=[];for(let s of r)if(s!=null&&s.path)try{let i=n(s,e);i&&a.push(i)}catch(i){console.warn("[TaskNotes][BasesPOC] Error converting Bases item to TaskInfo:",i)}return a}var KZe,K0=b(()=>{KZe=require("obsidian");Fn();Pd();Vu()});function zH(r,e,t){var c,d;let n=(c=t.sourcePath)!=null?c:"",a=cn(r),s=t.metadataCache.getFirstLinkpathDest(a,n)||t.metadataCache.getFirstLinkpathDest(a,"");if(!(s instanceof lw.TFile))return e;let i=t.metadataCache.getCache(s.path),o=(d=i==null?void 0:i.frontmatter)==null?void 0:d.title;if(typeof o!="string"||o.trim().length===0)return e;let l=(e==null?void 0:e.trim())||"";return l===""||l===s.name||l===s.basename||l===s.path||l===a?o:e}function Q0(r,e,t){let n=e.match(/^\[\[([^\]]+)\]\]$/),a=e.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(n){let o=n[1],l=o,c=o;if(o.includes("|")){let u=o.split("|");l=u[0].trim(),c=u[1].trim()}else{let u=(0,lw.parseLinktext)(o);l=u.path,c=u.path}let d=zH(l,c,t);Xo(r,l,d,t,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}if(a){let o=a[1].trim(),l=a[2].trim(),c=zH(l,o,t);Xo(r,l,c,t,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}let s=e.endsWith(".md")?e.replace(/\.md$/,""):e,i=t.metadataCache.getFirstLinkpathDest(s,"");if(i instanceof lw.TFile){let o=zH(s,i.basename,t);Xo(r,s,o,t,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}r.textContent=e}var lw,BH=b(()=>{lw=require("obsidian");lD();io()});var au,qH=b(()=>{au=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.handleScroll=()=>{this.scrollRAF===null&&(this.scrollRAF=requestAnimationFrame(()=>{this.updateVisibleRange(),this.scrollRAF=null}))};var t,n,a;this.container=e.container,this.items=e.items,this.estimatedHeight=(t=e.itemHeight)!=null?t:0,this.overscan=(n=e.overscan)!=null?n:5,this.renderItem=e.renderItem,this.getItemKey=(a=e.getItemKey)!=null?a:((s,i)=>String(i)),this.setupDOM(),this.attachScrollListener(),this.setupResizeObserver(),!e.itemHeight&&this.items.length>0&&this.calculateEstimatedHeight(),this.rebuildPositionCache(),this.updateVisibleRange()}setupDOM(){this.container.empty(),this.container.style.position="relative",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=[],n=this.contentContainer.createDiv({cls:"virtual-scroller__sample"});n.style.cssText=` position: absolute; visibility: hidden; pointer-events: none; `;for(let a=0;a0&&t.push(i)}if(n.remove(),t.length>0){let a=t.reduce((s,i)=>s+i,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}updateSpacerHeight(){this.spacer.style.height=`${this.totalHeight}px`}binarySearchPosition(e){if(this.positionCache.length===0)return 0;let t=0,n=this.positionCache.length-1;for(;t=this.positionCache.length?0:this.positionCache[e]}rebuildPositionCache(){this.positionCache=[];let e=0;for(let t=0;t{for(let t of e){let n=t.target,a=parseInt(n.dataset.virtualIndex||"-1",10);a>=0&&a{this.processPendingMeasurements(),this.measurementRAF=null}))})}processPendingMeasurements(){if(this.pendingMeasurements.size===0)return;let e=!1;for(let t of this.pendingMeasurements){let n=this.contentContainer.querySelector(`[data-virtual-index="${t}"]`);if(n){let a=n.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 n of e){let a=parseInt(n.dataset.virtualIndex||"-1",10);if(a>=0&&a0&&(this.itemHeights.set(a,s),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,console.warn("[VirtualScroller] Using window height as fallback:",t));let n=Math.max(0,this.binarySearchPosition(e)-this.overscan),a=n,s=e+t;for(;as);)a++;a=Math.min(this.items.length-1,a+this.overscan);let i=this.getItemPosition(n);(n!==this.state.startIndex||a!==this.state.endIndex||this.items.length!==this.state.totalItems)&&(this.state={startIndex:n,endIndex:a,totalItems:this.items.length,offsetY:i},this.renderVisibleItems())}renderVisibleItems(){let{startIndex:e,endIndex:t,offsetY:n}=this.state,a=new Set;this.contentContainer.style.transform=`translateY(${n}px)`;let s=new Map;for(let[o,l]of this.renderedElements)l.parentElement===this.contentContainer&&s.set(o,l);let i=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?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)),i?d.previousElementSibling!==i&&i.after(d):this.contentContainer.firstChild!==d&&this.contentContainer.prepend(d),i=d}for(let[o,l]of this.renderedElements)a.has(o)||(this.resizeObserver&&this.resizeObserver.unobserve(l),l.remove(),this.renderedElements.delete(o));requestAnimationFrame(()=>{this.measureRenderedItems()})}updateItems(e){let t=this.scrollContainer.scrollTop;this.items=e,this.state.totalItems=e.length;let n=this.itemHeights.size;for(let a=e.length;a=0&&this.itemHeights.delete(n),this.renderedElements.delete(e),t.remove()}this.rebuildPositionCache(),this.updateVisibleRange()}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()}}});function Uge(r){return function(e,t){if(!t)throw console.error("[TaskNotes][TaskListView] No containerEl provided"),new Error("TaskListView requires a containerEl");return new HH(e,t,r)}}var Ts,HH,Vge=b(()=>{Ts=require("obsidian");ow();K0();Kn();BH();Bp();AT();Mf();Pf();kt();qH();HH=class extends El{constructor(t,n,a){super(t,n,a);this.type="tasknotesTaskList";this.itemsContainer=null;this.currentTaskElements=new Map;this.lastRenderWasGrouped=!1;this.lastFlatPaths=[];this.lastTaskSignatures=new Map;this.taskInfoCache=new Map;this.clickTimeouts=new Map;this.currentTargetDate=Rr(new Date);this.containerListenersRegistered=!1;this.virtualScroller=null;this.useVirtualScrolling=!1;this.collapsedGroups=new Set;this.collapsedSubGroups=new Set;this.subGroupPropertyId=null;this.configLoaded=!1;this.VIRTUAL_SCROLL_THRESHOLD=100;this.handleItemClick=async t=>{let n=t.target,a=n.closest(".task-group-header");if(a){let s=a.closest(".task-group"),i=s==null?void 0:s.dataset.groupKey;if(i){if(n.closest("a"))return;t.preventDefault(),t.stopPropagation(),await this.handleGroupToggle(i);return}}};this.handleItemContextMenu=async t=>{let n=this.getTaskContextFromEvent(t);if(!n)return;t.preventDefault(),t.stopPropagation();let a=this.plugin.taskSelectionService;if(a&&a.getSelectionCount()>1){a.isSelected(n.task.path)||a.addToSelection(n.task.path),this.showBatchContextMenu(t);return}await Nf(t,n.task.path,this.plugin,this.currentTargetDate)};this.handleItemPointerOver=t=>{if("pointerType"in t&&t.pointerType!=="mouse")return;let n=this.getTaskContextFromEvent(t);if(!n)return;let a=t.relatedTarget;if(a&&n.card.contains(a))return;let s=this.app||this.plugin.app;s.vault.getAbstractFileByPath(n.task.path)&&s.workspace.trigger("hover-link",{event:t,source:"tasknotes-task-card",hoverParent:n.card,targetEl:n.card,linktext:n.task.path,sourcePath:n.task.path})};this.dataAdapter.basesView=this}onload(){this.readViewOptions(),super.onload()}readViewOptions(){if(!this.config||typeof this.config.get!="function"){console.debug("[TaskListView] Config not available yet in readViewOptions");return}try{this.subGroupPropertyId=this.config.getAsPropertyId("subGroup");let t=this.config.get("enableSearch");this.enableSearch=t!=null?t:!1,this.configLoaded=!0}catch(t){console.warn("[TaskListView] Failed to parse config:",t)}}setupContainer(){var a;super.setupContainer(),this.rootElement&&(this.rootElement.style.cssText="display: flex; flex-direction: column; height: 100%;");let n=this.containerEl.ownerDocument.createElement("div");n.className="tn-bases-items-container",n.style.cssText="margin-top: 12px; flex: 1; max-height: 100vh; overflow-y: auto; position: relative;",(a=this.rootElement)==null||a.appendChild(n),this.itemsContainer=n,this.registerContainerListeners()}async render(){var t;if(!(!this.itemsContainer||!this.rootElement)){!this.configLoaded&&this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{if(!((t=this.data)!=null&&t.data))return;let n=this.dataAdapter.extractDataItems();await this.computeFormulas(n);let a=await Cm(n,this.plugin);if(a.length===0){this.clearAllTaskElements(),this.renderEmptyState(),this.lastRenderWasGrouped=!1;return}let s=this.dataAdapter.isGrouped();!s&&this.subGroupPropertyId?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGroupedBySubProperty(a),this.lastRenderWasGrouped=!0):s?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGrouped(a),this.lastRenderWasGrouped=!0):(this.lastRenderWasGrouped&&this.clearAllTaskElements(),await this.renderFlat(a),this.lastRenderWasGrouped=!1)}catch(n){console.error("[TaskNotes][TaskListView] Error rendering:",n),this.clearAllTaskElements(),this.renderError(n)}}}async computeFormulas(t){var a,s,i;let n=(s=(a=this.data)==null?void 0:a.ctx)==null?void 0:s.formulas;if(!(!n||typeof n!="object"||t.length===0))for(let o=0;o0){let f=p.frontmatter;p.frontmatter={...f,...m},h=u.getValue(p),p.frontmatter=f}else h=u.getValue(p);h!==void 0&&(c.cachedFormulaOutputs[d]=h)}catch(p){}}}}async renderFlat(t){let n=this.getVisibleProperties(),a=this.applySearchFilter(t);if(this.isSearchWithNoResults(a,t.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let s=Rr(new Date);this.currentTargetDate=s;let i=this.getCardOptions(s),o=a.length>=this.VIRTUAL_SCROLL_THRESHOLD;o&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!o&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderFlatVirtual(a,n,i):await this.renderFlatNormal(a,n,i)}async renderFlatVirtual(t,n,a){this.itemsContainer&&(this.virtualScroller?this.virtualScroller.updateItems(t):(this.virtualScroller=new au({container:this.itemsContainer,items:t,overscan:5,renderItem:(s,i)=>{let o=br(s,this.plugin,n,a);return this.taskInfoCache.set(s.path,s),this.lastTaskSignatures.set(s.path,this.buildTaskSignature(s)),o},getItemKey:s=>s.path}),setTimeout(()=>{var s;(s=this.virtualScroller)==null||s.recalculate()},0)),this.lastFlatPaths=t.map(s=>s.path))}async renderFlatNormal(t,n,a){if(!this.itemsContainer)return;let s=new Set,i=!this.arePathArraysEqual(t,this.lastFlatPaths);i&&(this.itemsContainer.empty(),this.currentTaskElements.clear());for(let o of t){let l=i?null:this.currentTaskElements.get(o.path)||null,c=this.buildTaskSignature(o),d=this.lastTaskSignatures.get(o.path);if(!l||(c!==d||!l)){let p=br(o,this.plugin,n,a);l&&l.isConnected&&l.replaceWith(p),l=p}l.isConnected||this.itemsContainer.appendChild(l),this.currentTaskElements.set(o.path,l),this.taskInfoCache.set(o.path,o),this.lastTaskSignatures.set(o.path,c),s.add(o.path)}if(!i&&s.size!==this.currentTaskElements.size){for(let[o,l]of this.currentTaskElements)if(!s.has(o)){l.remove(),this.currentTaskElements.delete(o);let c=this.clickTimeouts.get(o);c&&(clearTimeout(c),this.clickTimeouts.delete(o)),this.taskInfoCache.delete(o),this.lastTaskSignatures.delete(o)}}this.lastFlatPaths=t.map(o=>o.path)}buildGroupedRenderItems(t,n){let a=[],s=this.subGroupPropertyId?this.buildPathToPropsMap():new Map;for(let i of t){let o=this.dataAdapter.convertGroupKeyToString(i.key),l=new Set(i.entries.map(u=>u.file.path)),c=n.filter(u=>l.has(u.path));if(c.length===0)continue;let d=this.collapsedGroups.has(o);if(a.push({type:"primary-header",groupKey:o,groupTitle:o,taskCount:c.length,groupEntries:i.entries,isCollapsed:d}),!d)if(this.subGroupPropertyId){let u=this.groupTasksBySubProperty(c,this.subGroupPropertyId,s);for(let[p,m]of u){if(m.length===0)continue;let h=`${o}:${p}`,f=this.collapsedSubGroups.has(h);if(a.push({type:"sub-header",groupKey:o,subGroupKey:p,subGroupTitle:p,taskCount:m.length,isCollapsed:f,parentKey:o}),!f)for(let g of m)a.push({type:"task",task:g,groupKey:o,subGroupKey:p})}}else for(let u of c)a.push({type:"task",task:u,groupKey:o})}return a}async renderGroupedBySubProperty(t){let n=this.getVisibleProperties(),a=this.applySearchFilter(t);if(this.isSearchWithNoResults(a,t.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let s=Rr(new Date);this.currentTargetDate=s;let i=this.getCardOptions(s),o=this.buildPathToPropsMap(),l=this.groupTasksBySubProperty(a,this.subGroupPropertyId,o),c=[];for(let[u,p]of l){if(p.length===0)continue;let m=this.collapsedGroups.has(u);if(c.push({type:"primary-header",groupKey:u,groupTitle:u,taskCount:p.length,groupEntries:[],isCollapsed:m}),!m)for(let h of p)c.push({type:"task",task:h,groupKey:u})}let d=c.length>=this.VIRTUAL_SCROLL_THRESHOLD;if(this.useVirtualScrolling&&d&&this.virtualScroller){this.virtualScroller.updateItems(c),this.lastFlatPaths=t.map(u=>u.path);return}this.itemsContainer.empty(),this.currentTaskElements.clear(),this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),d&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!d&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderGroupedVirtual(c,n,i):await this.renderGroupedNormal(c,n,i),this.lastFlatPaths=t.map(u=>u.path)}async renderGrouped(t){let n=this.getVisibleProperties(),a=this.dataAdapter.getGroupedData(),s=this.applySearchFilter(t);if(this.isSearchWithNoResults(s,t.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let i=Rr(new Date);this.currentTargetDate=i;let o=this.getCardOptions(i),l=this.buildGroupedRenderItems(a,s),c=l.length>=this.VIRTUAL_SCROLL_THRESHOLD;if(this.useVirtualScrolling&&c&&this.virtualScroller){this.virtualScroller.updateItems(l),this.lastFlatPaths=t.map(d=>d.path);return}this.itemsContainer.empty(),this.currentTaskElements.clear(),this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),c&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!c&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderGroupedVirtual(l,n,o):await this.renderGroupedNormal(l,n,o),this.lastFlatPaths=t.map(d=>d.path)}async renderGroupedVirtual(t,n,a){this.virtualScroller?this.virtualScroller.updateItems(t):(this.virtualScroller=new au({container:this.itemsContainer,items:t,overscan:5,renderItem:s=>{if(s.type==="primary-header"||s.type==="sub-header")return this.createGroupHeader(s);{let i=br(s.task,this.plugin,n,a);return this.taskInfoCache.set(s.task.path,s.task),this.lastTaskSignatures.set(s.task.path,this.buildTaskSignature(s.task)),i}},getItemKey:s=>s.type==="primary-header"?`primary-${s.groupKey}`:s.type==="sub-header"?`sub-${s.groupKey}:${s.subGroupKey}`:s.task.path}),setTimeout(()=>{var s;(s=this.virtualScroller)==null||s.recalculate()},0))}async renderGroupedNormal(t,n,a){for(let s of t)if(s.type==="primary-header"||s.type==="sub-header"){let i=this.createGroupHeader(s);this.itemsContainer.appendChild(i)}else{let i=br(s.task,this.plugin,n,a);this.itemsContainer.appendChild(i),this.currentTaskElements.set(s.task.path,i),this.taskInfoCache.set(s.task.path,s.task),this.lastTaskSignatures.set(s.task.path,this.buildTaskSignature(s.task))}}createGroupHeader(t){let n=this.containerEl.ownerDocument,a=n.createElement("div");a.className="task-section task-group";let s=t.type==="sub-header",i=s?"sub":"primary";a.dataset.level=i,s?(a.dataset.groupKey=`${t.groupKey}:${t.subGroupKey}`,a.dataset.parentKey=t.parentKey):a.dataset.groupKey=t.groupKey,t.isCollapsed&&a.classList.add("is-collapsed");let o=n.createElement("h3");o.className="task-group-header task-list-view__group-header",a.appendChild(o);let l=n.createElement("button");l.className="task-group-toggle",l.setAttribute("aria-label","Toggle group"),l.setAttribute("aria-expanded",String(!t.isCollapsed)),l.dataset.groupKey=a.dataset.groupKey,o.appendChild(l),(0,Ts.setIcon)(l,"chevron-right");let c=l.querySelector("svg");c&&(c.classList.add("chevron"),c.setAttribute("width","16"),c.setAttribute("height","16"));let d=o.createSpan({cls:"task-group-title"}),u=s?t.subGroupTitle:t.groupTitle;return this.renderGroupTitle(d,u),o.createSpan({text:` (${t.taskCount})`,cls:"agenda-view__item-count"}),a}async handleTaskUpdate(t){if(this.taskInfoCache.set(t.path,t),this.lastTaskSignatures.set(t.path,this.buildTaskSignature(t)),this.useVirtualScrolling)this.debouncedRefresh();else{let n=this.currentTaskElements.get(t.path);if(n&&n.isConnected){let a=this.getVisibleProperties(),s=br(t,this.plugin,a,this.getCardOptions(this.currentTargetDate));n.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 n=this.containerEl.ownerDocument.createElement("div");n.className="tn-bases-empty",n.style.cssText="padding: 20px; text-align: center; color: #666;",n.textContent="No TaskNotes tasks found for this Base.",this.itemsContainer.appendChild(n)}renderError(t){let a=this.containerEl.ownerDocument.createElement("div");a.className="tn-bases-error",a.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",a.textContent=`Error loading tasks: ${t.message||"Unknown error"}`,this.itemsContainer.appendChild(a)}renderGroupTitle(t,n){let a=this.app||this.plugin.app,s={metadataCache:a.metadataCache,workspace:a.workspace};Q0(t,n,s)}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()}getEphemeralState(){var t;return{scrollTop:((t=this.rootElement)==null?void 0:t.scrollTop)||0,collapsedGroups:Array.from(this.collapsedGroups),collapsedSubGroups:Array.from(this.collapsedSubGroups)}}setEphemeralState(t){t&&(t.collapsedGroups&&Array.isArray(t.collapsedGroups)&&(this.collapsedGroups=new Set(t.collapsedGroups)),t.collapsedSubGroups&&Array.isArray(t.collapsedSubGroups)&&(this.collapsedSubGroups=new Set(t.collapsedSubGroups)),t.scrollTop!==void 0&&this.rootElement&&requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=t.scrollTop)}))}clearAllTaskElements(){var t;this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),(t=this.itemsContainer)==null||t.empty(),this.currentTaskElements.forEach(n=>n.remove()),this.currentTaskElements.clear(),this.lastFlatPaths=[],this.lastTaskSignatures.clear(),this.taskInfoCache.clear(),this.clearClickTimeouts()}getCardOptions(t){return{targetDate:t}}clearClickTimeouts(){for(let t of this.clickTimeouts.values())t&&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 n=t.target;if(!n)return null;let a=n.closest(".task-card");if(!a)return null;let s=a.dataset.taskPath;if(!s)return null;let i=this.taskInfoCache.get(s);return i?{task:i,card:a}:null}async handleGroupToggle(t){t.includes(":")?this.collapsedSubGroups.has(t)?this.collapsedSubGroups.delete(t):this.collapsedSubGroups.add(t):this.collapsedGroups.has(t)?this.collapsedGroups.delete(t):this.collapsedGroups.add(t),this.lastRenderWasGrouped&&await this.refreshGroupedView()}async refreshGroupedView(){var i;if(!((i=this.data)!=null&&i.data))return;let t=this.dataAdapter.extractDataItems();await this.computeFormulas(t);let n=await Cm(t,this.plugin),a=this.dataAdapter.getGroupedData(),s=this.buildGroupedRenderItems(a,n);this.useVirtualScrolling&&this.virtualScroller?this.virtualScroller.updateItems(s):await this.render()}async handleActionClick(t,n,a,s){switch(t){case"toggle-status":await this.handleToggleStatus(n,s);return;case"priority-menu":this.showPriorityMenu(n,s);return;case"recurrence-menu":this.showRecurrenceMenu(n,s);return;case"reminder-menu":this.showReminderModal(n);return;case"task-context-menu":await Nf(s,n.path,this.plugin,this.getTaskActionDate(n));return;case"edit-date":await this.openDateContextMenu(n,a.dataset.tnDateType,s);return;case"filter-project-subtasks":await this.filterProjectSubtasks(n);return;case"toggle-subtasks":await this.toggleSubtasks(n,a);return;case"toggle-blocking-tasks":await this.toggleBlockingTasks(n,a);return;default:await this.handleCardClick(n,s)}}async handleToggleStatus(t,n){try{if(t.recurrence){let a=this.getTaskActionDate(t);await this.plugin.toggleRecurringTaskComplete(t,a)}else await this.plugin.toggleTaskStatus(t)}catch(a){let s=a instanceof Error?a.message:String(a);console.error("[TaskNotes][TaskListView] Failed to toggle status",{error:s,taskPath:t.path}),new Ts.Notice(`Failed to toggle task status: ${s}`)}}getTaskActionDate(t){let n=Xe(t.scheduled||t.due||"");return n?nt(n):this.currentTargetDate}showPriorityMenu(t,n){new mo({currentValue:t.priority,onSelect:async s=>{try{await this.plugin.updateTaskProperty(t,"priority",s)}catch(i){console.error("[TaskNotes][TaskListView] Failed to update priority",i),new Ts.Notice("Failed to update priority")}},plugin:this.plugin}).show(n)}showRecurrenceMenu(t,n){new po({currentValue:typeof t.recurrence=="string"?t.recurrence:void 0,currentAnchor:t.recurrence_anchor||"scheduled",scheduledDate:t.scheduled,onSelect:async(s,i)=>{try{await this.plugin.updateTaskProperty(t,"recurrence",s||void 0),i!==void 0&&await this.plugin.updateTaskProperty(t,"recurrence_anchor",i)}catch(o){console.error("[TaskNotes][TaskListView] Failed to update recurrence",o),new Ts.Notice("Failed to update recurrence")}},app:this.plugin.app,plugin:this.plugin}).show(n)}showReminderModal(t){new uo(this.plugin.app,this.plugin,t,async a=>{try{await this.plugin.updateTaskProperty(t,"reminders",a.length>0?a:void 0)}catch(s){console.error("[TaskNotes][TaskListView] Failed to update reminders",s),new Ts.Notice("Failed to update reminders")}}).open()}async openDateContextMenu(t,n,a){if(!n)return;let s=n==="due"?t.due:t.scheduled;new ds({currentValue:Xe(s||""),currentTime:la(s||""),onSelect:async(o,l)=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await this.plugin.updateTaskProperty(t,n,c)}catch(c){let d=c instanceof Error?c.message:String(c);console.error("[TaskNotes][TaskListView] Failed to update date",{error:d,taskPath:t.path,dateType:n}),new Ts.Notice(`Failed to update ${n} date: ${d}`)}},plugin:this.plugin,app:this.app||this.plugin.app}).show(a)}async handleCardClick(t,n){if(this.handleSelectionClick(n,t.path))return;if(this.plugin.settings.doubleClickAction==="none"){await this.executeSingleClickAction(t,n);return}let a=this.clickTimeouts.get(t.path);if(a)clearTimeout(a),this.clickTimeouts.delete(t.path),await this.executeDoubleClickAction(t,n);else{let i=(this.containerEl.ownerDocument.defaultView||window).setTimeout(async()=>{this.clickTimeouts.delete(t.path),await this.executeSingleClickAction(t,n)},250);this.clickTimeouts.set(t.path,i)}}async executeSingleClickAction(t,n){if(n.ctrlKey||n.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,n){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,n){let a=this.app||this.plugin.app,s=a.vault.getAbstractFileByPath(t.path);s instanceof Ts.TFile&&(n?a.workspace.openLinkText(t.path,"",!0):a.workspace.getLeaf(!1).openFile(s))}async filterProjectSubtasks(t){try{await this.plugin.applyProjectSubtaskFilter(t)}catch(n){console.error("[TaskNotes][TaskListView] Failed to filter project subtasks",n),new Ts.Notice("Failed to filter project subtasks")}}async toggleSubtasks(t,n){try{if(!this.plugin.expandedProjectsService){console.error("[TaskNotes][TaskListView] ExpandedProjectsService not initialized"),new Ts.Notice("Service not available. Please try reloading the plugin.");return}let a=this.plugin.expandedProjectsService.toggle(t.path);n.classList.toggle("task-card__chevron--expanded",a),n.setAttribute("aria-label",a?"Collapse subtasks":"Expand subtasks");let s=n.closest(".task-card");if(s){let{toggleSubtasks:i}=await Promise.resolve().then(()=>(Kn(),fc));await i(s,t,this.plugin,a)}}catch(a){console.error("[TaskNotes][TaskListView] Failed to toggle subtasks",a),new Ts.Notice("Failed to toggle subtasks")}}async toggleBlockingTasks(t,n){try{let a=n.classList.toggle("task-card__blocking-toggle--expanded"),s=n.closest(".task-card");if(s){let{toggleBlockingTasks:i}=await Promise.resolve().then(()=>(Kn(),fc));await i(s,t,this.plugin,a)}}catch(a){console.error("[TaskNotes][TaskListView] Failed to toggle blocking tasks",a),new Ts.Notice("Failed to toggle blocking tasks")}}arePathArraysEqual(t,n){if(t.length!==n.length)return!1;for(let a=0;athis.valueToString(o)).join(", ")}return t.toString()||"None"}return typeof t=="string"?t||"None":typeof t=="number"?String(t):typeof t=="boolean"?t?"True":"False":Array.isArray(t)?t.length>0?t.map(s=>this.valueToString(s)).join(", "):"None":String(t)}groupTasksBySubProperty(t,n,a){let s=new Map;for(let i of t){let o=a.get(i.path)||{},l=this.getPropertyValue(o,n),c=this.valueToString(l);s.has(c)||s.set(c,[]),s.get(c).push(i)}return s}buildTaskSignature(t){var n,a,s,i;return`${t.path}|${t.title}|${t.status}|${t.priority}|${t.due}|${t.scheduled}|${t.recurrence}|${t.archived}|${(n=t.complete_instances)==null?void 0:n.join(",")}|${(a=t.reminders)==null?void 0:a.length}|${(s=t.blocking)==null?void 0:s.length}|${(i=t.blockedBy)==null?void 0:i.length}`}}});function Wge(r){return function(e,t){if(!t)throw console.error("[TaskNotes][KanbanView] No containerEl provided"),new Error("KanbanView requires a containerEl");return new UH(e,t,r)}}var ai,UH,Yge=b(()=>{ai=require("obsidian");ow();K0();Kn();BH();qH();kt();UH=class extends El{constructor(t,n,a){super(t,n,a);this.type="tasknotesKanban";this.boardEl=null;this.currentTaskElements=new Map;this.draggedTaskPath=null;this.draggedTaskPaths=[];this.draggedFromColumn=null;this.draggedFromSwimlane=null;this.draggedSourceColumns=new Map;this.draggedSourceSwimlanes=new Map;this.taskInfoCache=new Map;this.containerListenersRegistered=!1;this.columnScrollers=new Map;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.swimLanePropertyId=null;this.columnWidth=280;this.maxSwimlaneHeight=600;this.hideEmptyColumns=!1;this.explodeListColumns=!0;this.consolidateStatusIcon=!1;this.columnOrders={};this.configLoaded=!1;this.VIRTUAL_SCROLL_THRESHOLD=15;this.handleBoardClick=async t=>{let n=this.getTaskContextFromEvent(t);if(!n)return;let{task:a,card:s}=n,o=t.target.closest("[data-tn-action]");if(o&&o!==s){let l=o.dataset.tnAction;if(l){t.preventDefault(),t.stopPropagation(),await this.handleCardAction(l,a,o,t);return}}};this.handleBoardContextMenu=async t=>{let n=this.getTaskContextFromEvent(t);if(!n)return;t.preventDefault(),t.stopPropagation();let{showTaskContextMenu:a}=await Promise.resolve().then(()=>(Kn(),fc));await a(t,n.task.path,this.plugin,this.getTaskActionDate(n.task))};this.basesController=t,this.dataAdapter.basesView=this}onload(){this.readViewOptions(),super.onload()}onDataUpdated(){let t=this.getEphemeralState();try{this.render()}catch(n){console.error(`[TaskNotes][${this.type}] Render error:`,n),this.renderError(n)}this.setEphemeralState(t)}readViewOptions(){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 t=this.config.get("explodeListColumns");this.explodeListColumns=t!==!1;let n=this.config.get("consolidateStatusIcon");this.consolidateStatusIcon=n===!0;let a=this.config.get("columnOrder")||"{}";this.columnOrders=JSON.parse(a);let s=this.config.get("enableSearch");this.enableSearch=s!=null?s:!1,this.configLoaded=!0}catch(t){console.warn("[KanbanView] Failed to parse config:",t)}}getEphemeralState(){var n;let t={};for(let[a,s]of this.columnScrollers){let i=s.scrollContainer;i&&(t[a]=i.scrollTop)}return this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(i=>{let o=i.getAttribute("data-group"),l=i.querySelector(".kanban-view__cards");o&&l&&!(o in t)&&(t[o]=l.scrollTop)}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(i=>{let o=i.getAttribute("data-column"),l=i.getAttribute("data-swimlane");if(o&&l){let c=`${l}:${o}`,d=i.querySelector(".kanban-view__tasks-container");d&&!(c in t)&&(t[c]=d.scrollTop)}})),{scrollTop:((n=this.rootElement)==null?void 0:n.scrollTop)||0,columnScroll:t}}setEphemeralState(t){t&&(t.scrollTop!==void 0&&this.rootElement&&requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=t.scrollTop)}),t.columnScroll&&typeof t.columnScroll=="object"&&requestAnimationFrame(()=>{for(let[n,a]of this.columnScrollers){let s=t.columnScroll[n];if(s!==void 0){let i=a.scrollContainer;i&&(i.scrollTop=s)}}this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(s=>{let i=s.getAttribute("data-group");if(i&&t.columnScroll[i]!==void 0){let o=s.querySelector(".kanban-view__cards");o&&!this.columnScrollers.has(i)&&(o.scrollTop=t.columnScroll[i])}}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(s=>{let i=s.getAttribute("data-column"),o=s.getAttribute("data-swimlane");if(i&&o){let l=`${o}:${i}`;if(t.columnScroll[l]!==void 0){let c=s.querySelector(".kanban-view__tasks-container");c&&!this.columnScrollers.has(l)&&(c.scrollTop=t.columnScroll[l])}}}))}))}async render(){var t;if(!(!this.boardEl||!this.rootElement)&&(t=this.data)!=null&&t.data){this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{let n=this.dataAdapter.extractDataItems();await this.computeFormulas(n);let a=await Cm(n,this.plugin),s=this.applySearchFilter(a);if(this.destroyColumnScrollers(),this.boardEl.empty(),s.length===0){this.isSearchWithNoResults(s,a.length)?this.renderSearchNoResults(this.boardEl):this.renderEmptyState();return}let i=this.buildPathToPropsMap(),o=this.getGroupByPropertyId();if(!o){this.renderNoGroupByError();return}let l=this.groupTasks(s,o,i);this.swimLanePropertyId?await this.renderWithSwimLanes(l,s,i,o):await this.renderFlat(l)}catch(n){console.error("[TaskNotes][KanbanView] Error rendering:",n),this.renderError(n)}}}getGroupByPropertyId(){var n;let t=this.basesController;if((n=t==null?void 0:t.query)!=null&&n.views&&(t!=null&&t.viewName)){let a=t.query.views,s=t.viewName;for(let i=0;i0)for(let d of c){let u=String(d)||"None";s.has(u)||s.set(u,[]),s.get(u).push(l)}else{let d="None";s.has(d)||s.set(d,[]),s.get(d).push(l)}}else{let l=this.dataAdapter.getGroupedData(),c=new Map(t.map(d=>[d.path,d]));for(let d of l){let u=this.dataAdapter.convertGroupKeyToString(d.key),p=[];for(let m of d.entries){let h=c.get(m.file.path);h&&p.push(h)}s.set(u,p)}}return this.augmentWithEmptyStatusColumns(s,n),this.augmentWithEmptyPriorityColumns(s,n),s}isListTypeProperty(t){let n=this.plugin.app.metadataTypeManager;if(n!=null&&n.properties){let o=n.properties[t.toLowerCase()];if(o!=null&&o.type&&new Set(["multitext","tags","aliases"]).has(o.type))return!0}let a=this.plugin.fieldMapper.toUserField("contexts"),s=this.plugin.fieldMapper.toUserField("projects");return new Set(["contexts",a,"projects",s,"tags","aliases"]).has(t)}getListPropertyValue(t,n,a){let s=this.plugin.fieldMapper.toUserField("contexts"),i=this.plugin.fieldMapper.toUserField("projects");return n==="contexts"||n===s?t.contexts:n==="projects"||n===i?t.projects:n==="tags"?t.tags:(a.get(t.path)||{})[n]}augmentWithEmptyStatusColumns(t,n){let a=this.plugin.fieldMapper.toUserField("status");if(n.replace(/^(note\.|file\.|task\.)/,"")!==a)return;let i=this.plugin.settings.customStatuses;if(!(!i||i.length===0))for(let o of i){let l=o.value;t.has(l)||t.set(l,[])}}augmentWithEmptyPriorityColumns(t,n){let a=this.plugin.fieldMapper.toUserField("priority");if(n.replace(/^(note\.|file\.|task\.)/,"")!==a)return;let i=this.plugin.priorityManager.getAllPriorities();if(!(!i||i.length===0))for(let o of i){let l=o.value;t.has(l)||t.set(l,[])}}async renderFlat(t){if(!this.boardEl)return;this.boardEl.style.setProperty("--kanban-column-width",`${this.columnWidth}px`);let n=this.getVisibleProperties(),a=this.getGroupByPropertyId(),s=Array.from(t.keys()),i=a?this.applyColumnOrder(a,s):s;for(let o of i){let l=t.get(o)||[];if(this.hideEmptyColumns&&l.length===0)continue;let c=await this.createColumn(o,l,n);this.boardEl&&this.boardEl.appendChild(c)}}async renderWithSwimLanes(t,n,a,s){if(!this.swimLanePropertyId)return;let i=new Map,o=new Set;for(let d of n){let u=a.get(d.path)||{},p=this.getPropertyValue(u,this.swimLanePropertyId),m=this.valueToString(p);o.add(m)}for(let d of o){let u=new Map;i.set(d,u);for(let[p]of t)u.set(p,[])}for(let[d,u]of t)for(let p of u){let m=a.get(p.path)||{},h=this.getPropertyValue(m,this.swimLanePropertyId),f=this.valueToString(h),g=i.get(f);g&&g.has(d)&&g.get(d).push(p)}let l=Array.from(t.keys()),c=this.applyColumnOrder(s,l);await this.renderSwimLaneTable(i,c,a)}async renderSwimLaneTable(t,n,a){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.createEl("div",{cls:"kanban-view__swimlane-row kanban-view__swimlane-row--header"});s.createEl("div",{cls:"kanban-view__swimlane-label"});for(let o of n){let l=s.createEl("div",{cls:"kanban-view__column-header-cell"});l.setAttribute("draggable","true"),l.setAttribute("data-column-key",o);let c=l.createSpan({cls:"kanban-view__drag-handle"});if(c.textContent="\u22EE\u22EE",this.consolidateStatusIcon&&this.isGroupedByStatus()){let u=this.plugin.statusManager.getStatusConfig(o);if(u!=null&&u.icon){let p=l.createSpan({cls:"kanban-view__column-icon"});p.style.color=u.color,(0,ai.setIcon)(p,u.icon)}}let d=l.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(d,o,!1,!0),this.setupColumnHeaderDragHandlers(l)}let i=this.getVisibleProperties();for(let[o,l]of t){let c=this.boardEl.createEl("div",{cls:"kanban-view__swimlane-row"}),d=c.createEl("div",{cls:"kanban-view__swimlane-label"}),u=d.createEl("div",{cls:"kanban-view__swimlane-title"});this.renderGroupTitleWrapper(u,o,!0);let p=Array.from(l.values()).reduce((m,h)=>m+h.length,0);d.createEl("div",{cls:"kanban-view__swimlane-count",text:`${p}`});for(let m of n){let h=l.get(m)||[],f=c.createEl("div",{cls:"kanban-view__swimlane-column",attr:{"data-column":m,"data-swimlane":o}});this.setupSwimLaneCellDragDrop(f,m,o);let g=f.createDiv({cls:"kanban-view__tasks-container"});if(h.length>=this.VIRTUAL_SCROLL_THRESHOLD)await this.createVirtualSwimLaneCell(g,`${o}:${m}`,h,i);else{let y=this.getCardOptions();for(let k of h){let T=g.createDiv({cls:"kanban-view__card-wrapper"});T.setAttribute("draggable","true"),T.setAttribute("data-task-path",k.path);let w=br(k,this.plugin,i,y);T.appendChild(w),this.currentTaskElements.set(k.path,T),this.taskInfoCache.set(k.path,k),this.setupCardDragHandlers(T,k)}}}}}async createColumn(t,n,a){let i=this.containerEl.ownerDocument.createElement("div");i.className="kanban-view__column",i.style.width=`${this.columnWidth}px`,i.setAttribute("data-group",t);let o=i.createDiv({cls:"kanban-view__column-header"});o.setAttribute("draggable","true"),o.setAttribute("data-column-key",t);let l=o.createSpan({cls:"kanban-view__drag-handle"});if(l.textContent="\u22EE\u22EE",this.consolidateStatusIcon&&this.isGroupedByStatus()){let p=this.plugin.statusManager.getStatusConfig(t);if(p!=null&&p.icon){let m=o.createSpan({cls:"kanban-view__column-icon"});m.style.color=p.color,(0,ai.setIcon)(m,p.icon)}}let c=o.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(c,t,!1,!0),o.createSpan({cls:"kanban-view__column-count",text:` (${n.length})`}),this.setupColumnHeaderDragHandlers(o);let d=i.createDiv({cls:"kanban-view__cards"});this.setupColumnDragDrop(i,d,t);let u=this.getCardOptions();return n.length>=this.VIRTUAL_SCROLL_THRESHOLD?this.createVirtualColumn(d,t,n,a,u):this.createNormalColumn(d,n,a,u),i}createVirtualColumn(t,n,a,s,i){t.style.cssText="overflow-y: auto; max-height: 100vh; position: relative;";let o=this.containerEl.ownerDocument,l=new au({container:t,items:a,overscan:3,renderItem:c=>{let d=o.createElement("div");d.className="kanban-view__card-wrapper",d.setAttribute("draggable","true"),d.setAttribute("data-task-path",c.path);let u=br(c,this.plugin,s,i);return d.appendChild(u),this.taskInfoCache.set(c.path,c),this.setupCardDragHandlers(d,c),d},getItemKey:c=>c.path});this.columnScrollers.set(n,l)}async createVirtualSwimLaneCell(t,n,a,s){t.style.cssText="overflow-y: auto; height: 100%; position: relative;";let i=this.getCardOptions(),o=this.containerEl.ownerDocument,l=new au({container:t,items:a,overscan:3,renderItem:c=>{let d=o.createElement("div");d.className="kanban-view__card-wrapper",d.setAttribute("draggable","true"),d.setAttribute("data-task-path",c.path);let u=br(c,this.plugin,s,i);return d.appendChild(u),this.taskInfoCache.set(c.path,c),this.setupCardDragHandlers(d,c),d},getItemKey:c=>c.path});this.columnScrollers.set(n,l)}createNormalColumn(t,n,a,s){for(let i of n){let o=t.createDiv({cls:"kanban-view__card-wrapper"});o.setAttribute("draggable","true"),o.setAttribute("data-task-path",i.path);let l=br(i,this.plugin,a,s);o.appendChild(l),this.currentTaskElements.set(i.path,o),this.taskInfoCache.set(i.path,i),this.setupCardDragHandlers(o,i)}}setupColumnHeaderDragHandlers(t){let n=t.dataset.columnKey;if(!n)return;let a=t.classList.contains("kanban-view__column-header-cell"),s=a?"kanban-view__column-header-cell--dragging":"kanban-view__column-header--dragging";t.addEventListener("dragstart",i=>{i.dataTransfer&&(i.dataTransfer.effectAllowed="move",i.dataTransfer.setData("text/x-kanban-column",n),t.classList.add(s))}),t.addEventListener("dragover",i=>{var o;(o=i.dataTransfer)!=null&&o.types.includes("text/x-kanban-column")&&(i.preventDefault(),i.stopPropagation(),i.dataTransfer.dropEffect="move",t.classList.add("kanban-view__column-header--dragover"))}),t.addEventListener("dragleave",i=>{var o;(o=i.dataTransfer)!=null&&o.types.includes("text/x-kanban-column")&&i.target===t&&t.classList.remove("kanban-view__column-header--dragover")}),t.addEventListener("drop",async i=>{var f;if(!((f=i.dataTransfer)!=null&&f.types.includes("text/x-kanban-column")))return;i.preventDefault(),i.stopPropagation(),t.classList.remove("kanban-view__column-header--dragover");let o=i.dataTransfer.getData("text/x-kanban-column"),l=t.dataset.columnKey;if(!l||!o||o===l)return;let c=this.getGroupByPropertyId();if(!c)return;let d=a?".kanban-view__column-header-cell":".kanban-view__column-header",u=Array.from(this.boardEl.querySelectorAll(d)).map(g=>g.dataset.columnKey).filter(Boolean),p=u.indexOf(o),m=u.indexOf(l),h=[...u];h.splice(p,1),h.splice(m,0,o),await this.saveColumnOrder(c,h),await this.render()}),t.addEventListener("dragend",()=>{t.classList.remove(s)}),this.setupColumnHeaderTouchHandlers(t,n,a,s)}setupColumnHeaderTouchHandlers(t,n,a,s){ai.Platform.isMobile&&(t.addEventListener("contextmenu",i=>{(this.longPressTimer||this.touchDragActive)&&(i.preventDefault(),i.stopPropagation())}),t.addEventListener("touchstart",i=>{if(i.touches.length!==1)return;let o=i.touches[0];this.touchStartX=o.clientX,this.touchStartY=o.clientY,this.longPressTimer=setTimeout(()=>{var l;this.touchDragActive=!0,this.touchDragType="column",this.draggedColumnKey=n,this.containerEl.ownerDocument.addEventListener("contextmenu",this.boundContextMenuBlocker,!0),t.classList.add(s),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",i=>{if(i.touches.length!==1)return;let o=i.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)&&(clearTimeout(this.longPressTimer),this.longPressTimer=null);return}this.touchDragActive&&this.touchDragType==="column"&&(i.preventDefault(),this.updateTouchDragGhost(o.clientX,o.clientY),this.updateDropTargetFeedback(o.clientX,o.clientY),this.handleAutoScroll(o.clientX))},{passive:!1}),t.addEventListener("touchend",async i=>{if(this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=null),t.classList.remove(s),!this.touchDragActive||this.touchDragType!=="column")return;let o=i.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(h=>h.dataset.columnKey).filter(Boolean),p=u.indexOf(this.draggedColumnKey),m=u.indexOf(l.groupKey);if(p!==-1&&m!==-1){let h=[...u];h.splice(p,1),h.splice(m,0,this.draggedColumnKey),await this.saveColumnOrder(c,h),await this.render()}}}this.clearTouchDragState()}),t.addEventListener("touchcancel",()=>{t.classList.remove(s),this.clearTouchDragState()}))}setupColumnDragDrop(t,n,a){t.addEventListener("dragover",s=>{var i;(i=s.dataTransfer)!=null&&i.types.includes("text/x-kanban-column")||(s.preventDefault(),s.stopPropagation(),s.dataTransfer&&(s.dataTransfer.dropEffect="move"),t.classList.add("kanban-view__column--dragover"))}),t.addEventListener("dragleave",s=>{let i=t.getBoundingClientRect(),o=s.clientX,l=s.clientY;(o=i.right||l=i.bottom)&&t.classList.remove("kanban-view__column--dragover")}),t.addEventListener("drop",async s=>{var i;(i=s.dataTransfer)!=null&&i.types.includes("text/x-kanban-column")||(s.preventDefault(),s.stopPropagation(),t.classList.remove("kanban-view__column--dragover"),this.draggedTaskPath&&(await this.handleTaskDrop(this.draggedTaskPath,a,null),this.draggedTaskPath=null,this.draggedFromColumn=null))}),t.addEventListener("dragend",()=>{t.classList.remove("kanban-view__column--dragover")})}setupSwimLaneCellDragDrop(t,n,a){t.addEventListener("dragover",s=>{s.preventDefault(),s.stopPropagation(),s.dataTransfer&&(s.dataTransfer.dropEffect="move"),t.classList.add("kanban-view__swimlane-column--dragover")}),t.addEventListener("dragleave",s=>{let i=t.getBoundingClientRect(),o=s.clientX,l=s.clientY;(o=i.right||l=i.bottom)&&t.classList.remove("kanban-view__swimlane-column--dragover")}),t.addEventListener("drop",async s=>{s.preventDefault(),s.stopPropagation(),t.classList.remove("kanban-view__swimlane-column--dragover"),this.draggedTaskPath&&(await this.handleTaskDrop(this.draggedTaskPath,n,a),this.draggedTaskPath=null,this.draggedFromColumn=null)}),t.addEventListener("dragend",()=>{t.classList.remove("kanban-view__swimlane-column--dragover")})}createTouchDragGhost(t,n,a){let s=t.cloneNode(!0);return s.classList.add("kanban-view__touch-ghost"),s.style.cssText=` position: fixed; left: ${n}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(s),s}updateTouchDragGhost(t,n){this.touchDragGhost&&(this.touchDragGhost.style.left=`${t}px`,this.touchDragGhost.style.top=`${n}px`)}removeTouchDragGhost(){this.touchDragGhost&&(this.touchDragGhost.remove(),this.touchDragGhost=null)}findDropTargetAt(t,n){this.touchDragGhost&&(this.touchDragGhost.style.display="none");let s=this.containerEl.ownerDocument.elementFromPoint(t,n);if(this.touchDragGhost&&(this.touchDragGhost.style.display=""),!s)return{type:null,groupKey:null,swimLaneKey:null,element:null};let i=s.closest("[data-column][data-swimlane]");if(i)return{type:"swimlane",groupKey:i.dataset.column||null,swimLaneKey:i.dataset.swimlane||null,element:i};let o=s.closest("[data-group]");if(o)return{type:"column",groupKey:o.dataset.group||null,swimLaneKey:null,element:o};let l=s.closest("[data-column-key]");return l?{type:"columnHeader",groupKey:l.dataset.columnKey||null,swimLaneKey:null,element:l}:{type:null,groupKey:null,swimLaneKey:null,element:null}}clearDragoverFeedback(){var t,n,a;(t=this.boardEl)==null||t.querySelectorAll(".kanban-view__column--dragover").forEach(s=>{s.classList.remove("kanban-view__column--dragover")}),(n=this.boardEl)==null||n.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")})}updateDropTargetFeedback(t,n){this.clearDragoverFeedback();let a=this.findDropTargetAt(t,n);a.element&&(a.type==="column"?a.element.classList.add("kanban-view__column--dragover"):a.type==="swimlane"?a.element.classList.add("kanban-view__swimlane-column--dragover"):a.type==="columnHeader"&&this.touchDragType==="column"&&a.element.classList.add("kanban-view__column-header--dragover"))}clearTouchDragState(){var t;this.touchDragActive=!1,this.containerEl.ownerDocument.removeEventListener("contextmenu",this.boundContextMenuBlocker,!0),this.removeTouchDragGhost(),this.stopAutoScroll(),this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=null),this.clearDragoverFeedback();for(let n of this.draggedTaskPaths)(t=this.currentTaskElements.get(n))==null||t.classList.remove("kanban-view__card--dragging");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 n=this.boardEl.getBoundingClientRect(),a=n.left+this.AUTO_SCROLL_EDGE,s=n.right-this.AUTO_SCROLL_EDGE,i=0;ts&&(i=1),i!==this.autoScrollDirection&&(this.stopAutoScroll(),this.autoScrollDirection=i,i!==0&&(this.autoScrollTimer=setInterval(()=>{this.boardEl&&(this.boardEl.scrollLeft+=this.autoScrollDirection*this.AUTO_SCROLL_SPEED)},16)))}stopAutoScroll(){this.autoScrollTimer&&(clearInterval(this.autoScrollTimer),this.autoScrollTimer=null),this.autoScrollDirection=0}setupCardDragHandlers(t,n){t.addEventListener("click",a=>{if(this.handleSelectionClick(a,n.path)){a.stopPropagation();return}}),t.addEventListener("contextmenu",a=>{if(a.preventDefault(),a.stopPropagation(),this.longPressTimer||this.touchDragActive)return;let s=this.plugin.taskSelectionService;if(s&&s.getSelectionCount()>1){s.isSelected(n.path)||s.addToSelection(n.path),this.showBatchContextMenu(a);return}let{showTaskContextMenu:i}=(Kn(),Lo(fc));i(a,n.path,this.plugin,new Date)}),t.addEventListener("dragstart",a=>{let s=this.plugin.taskSelectionService;if(s&&s.isSelected(n.path)&&s.getSelectionCount()>1){this.draggedTaskPaths=s.getSelectedPaths(),this.draggedTaskPath=n.path,this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear();for(let c of this.draggedTaskPaths){let d=this.currentTaskElements.get(c);if(d){d.classList.add("kanban-view__card--dragging");let u=d.closest("[data-group]"),p=d.closest("[data-column]"),m=d.closest("[data-swimlane]"),h=(u==null?void 0:u.dataset.group)||(p==null?void 0:p.dataset.column),f=m==null?void 0:m.dataset.swimlane;h&&this.draggedSourceColumns.set(c,h),f&&this.draggedSourceSwimlanes.set(c,f)}}a.dataTransfer&&(a.dataTransfer.effectAllowed="move",a.dataTransfer.setData("text/plain",this.draggedTaskPaths.join(",")),a.dataTransfer.setData("text/x-batch-drag","true"))}else this.draggedTaskPath=n.path,this.draggedTaskPaths=[n.path],t.classList.add("kanban-view__card--dragging"),a.dataTransfer&&(a.dataTransfer.effectAllowed="move",a.dataTransfer.setData("text/plain",n.path));let i=t.closest("[data-group]"),o=t.closest("[data-column]"),l=t.closest("[data-swimlane]");this.draggedFromColumn=(i==null?void 0:i.dataset.group)||(o==null?void 0:o.dataset.column)||null,this.draggedFromSwimlane=(l==null?void 0:l.dataset.swimlane)||null}),t.addEventListener("dragend",()=>{var a,s;for(let i of this.draggedTaskPaths){let o=this.currentTaskElements.get(i);o&&o.classList.remove("kanban-view__card--dragging")}t.classList.remove("kanban-view__card--dragging"),this.draggedFromColumn=null,this.draggedFromSwimlane=null,this.draggedTaskPaths=[],this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear(),(a=this.boardEl)==null||a.querySelectorAll(".kanban-view__column--dragover").forEach(i=>{i.classList.remove("kanban-view__column--dragover")}),(s=this.boardEl)==null||s.querySelectorAll(".kanban-view__swimlane-column--dragover").forEach(i=>{i.classList.remove("kanban-view__swimlane-column--dragover")})}),this.setupCardTouchHandlers(t,n)}setupCardTouchHandlers(t,n){ai.Platform.isMobile&&(t.addEventListener("touchstart",a=>{if(a.touches.length!==1)return;let s=a.touches[0];this.touchStartX=s.clientX,this.touchStartY=s.clientY,this.longPressTimer=setTimeout(()=>{this.initiateTouchDrag(t,n,s.clientX,s.clientY)},this.LONG_PRESS_DELAY)},{passive:!0}),t.addEventListener("touchmove",a=>{if(a.touches.length!==1)return;let s=a.touches[0];if(!this.touchDragActive&&this.longPressTimer){let i=Math.abs(s.clientX-this.touchStartX),o=Math.abs(s.clientY-this.touchStartY);(i>this.TOUCH_MOVE_THRESHOLD||o>this.TOUCH_MOVE_THRESHOLD)&&(clearTimeout(this.longPressTimer),this.longPressTimer=null);return}this.touchDragActive&&this.touchDragType==="task"&&(a.preventDefault(),this.updateTouchDragGhost(s.clientX,s.clientY),this.updateDropTargetFeedback(s.clientX,s.clientY),this.handleAutoScroll(s.clientX))},{passive:!1}),t.addEventListener("touchend",async a=>{if(this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=null),!this.touchDragActive||this.touchDragType!=="task")return;let s=a.changedTouches[0];if(!s){this.clearTouchDragState();return}let i=this.findDropTargetAt(s.clientX,s.clientY);if(i.groupKey&&this.draggedTaskPath)for(let o of this.draggedTaskPaths)await this.handleTaskDrop(o,i.groupKey,i.swimLaneKey);this.clearTouchDragState()}),t.addEventListener("touchcancel",()=>{this.clearTouchDragState()}))}initiateTouchDrag(t,n,a,s){var d;this.touchDragActive=!0,this.touchDragType="task",this.containerEl.ownerDocument.addEventListener("contextmenu",this.boundContextMenuBlocker,!0);let i=this.plugin.taskSelectionService;if(i!=null&&i.isSelected(n.path)&&i.getSelectionCount()>1){this.draggedTaskPaths=i.getSelectedPaths(),this.draggedTaskPath=n.path,this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear();for(let u of this.draggedTaskPaths){let p=this.currentTaskElements.get(u);if(p){p.classList.add("kanban-view__card--dragging");let m=p.closest("[data-group]"),h=p.closest("[data-column]"),f=p.closest("[data-swimlane]"),g=(m==null?void 0:m.dataset.group)||(h==null?void 0:h.dataset.column),y=f==null?void 0:f.dataset.swimlane;g&&this.draggedSourceColumns.set(u,g),y&&this.draggedSourceSwimlanes.set(u,y)}}}else this.draggedTaskPath=n.path,this.draggedTaskPaths=[n.path],t.classList.add("kanban-view__card--dragging");let o=t.closest("[data-group]"),l=t.closest("[data-column]"),c=t.closest("[data-swimlane]");this.draggedFromColumn=(o==null?void 0:o.dataset.group)||(l==null?void 0:l.dataset.column)||null,this.draggedFromSwimlane=(c==null?void 0:c.dataset.swimlane)||null,this.touchDragGhost=this.createTouchDragGhost(t,a,s),(d=navigator.vibrate)==null||d.call(navigator,50)}async handleTaskDrop(t,n,a){var s,i,o;try{let l=this.getGroupByPropertyId();if(!l)return;if(l.startsWith("formula.")){new ai.Notice(this.plugin.i18n.translate("views.kanban.errors.formulaGroupingReadOnly")||"Cannot move tasks between formula-based columns. Formula values are computed and cannot be directly modified.");return}if(a!==null&&((s=this.swimLanePropertyId)!=null&&s.startsWith("formula."))){new ai.Notice(this.plugin.i18n.translate("views.kanban.errors.formulaSwimlaneReadOnly")||"Cannot move tasks between formula-based swimlanes. Formula values are computed and cannot be directly modified.");return}let c=this.stripPropertyPrefix(l),d=this.explodeListColumns&&this.isListTypeProperty(c),u=this.swimLanePropertyId?this.stripPropertyPrefix(this.swimLanePropertyId):null,p=u&&this.isListTypeProperty(u),m=this.draggedTaskPaths.length>1?this.draggedTaskPaths:[t],h=m.length>1;for(let f of m){let g=h?this.draggedSourceColumns.get(f):this.draggedFromColumn,y=h?this.draggedSourceSwimlanes.get(f):this.draggedFromSwimlane;d&&g?await this.updateListPropertyOnDrop(f,l,g,n):await this.updateTaskFrontmatterProperty(f,l,n),a!==null&&this.swimLanePropertyId&&(p&&y?await this.updateListPropertyOnDrop(f,this.swimLanePropertyId,y,a):await this.updateTaskFrontmatterProperty(f,this.swimLanePropertyId,a))}h&&((i=this.plugin.taskSelectionService)==null||i.clearSelection(),(o=this.plugin.taskSelectionService)==null||o.exitSelectionMode()),this.debouncedRefresh()}catch(l){console.error("[TaskNotes][KanbanView] Error updating task:",l)}}async updateListPropertyOnDrop(t,n,a,s){if(a===s)return;let i=this.plugin.app.vault.getAbstractFileByPath(t);if(!i||!(i instanceof ai.TFile))throw new Error(`Cannot find task file: ${t}`);let o=n.replace(/^(note\.|file\.|task\.)/,"");await this.plugin.app.fileManager.processFrontMatter(i,l=>{let c=l[o];Array.isArray(c)||(c=c?[c]:[]);let d=c.filter(u=>u!==a);!d.includes(s)&&s!=="None"&&d.push(s),l[o]=d.length>0?d:[]})}async updateTaskFrontmatterProperty(t,n,a){let s=this.plugin.app.vault.getAbstractFileByPath(t);if(!s||!(s instanceof ai.TFile))throw new Error(`Cannot find task file: ${t}`);let i=n.replace(/^(note\.|file\.|task\.)/,""),o=await this.plugin.cacheManager.getTaskInfo(t),l=this.plugin.fieldMapper.lookupMappingKey(i);o&&l?await this.plugin.taskService.updateProperty(o,l,a):await this.plugin.app.fileManager.processFrontMatter(s,c=>{c[i]=a})}setupContainer(){var a;super.setupContainer();let n=this.containerEl.ownerDocument.createElement("div");n.className="kanban-view__board",(a=this.rootElement)==null||a.appendChild(n),this.boardEl=n,this.registerBoardListeners()}async handleTaskUpdate(t){this.debouncedRefresh()}debouncedRefresh(){this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer);let t=this.getEphemeralState(),n=this.containerEl.ownerDocument.defaultView||window;this.updateDebounceTimer=n.setTimeout(async()=>{await this.render(),this.updateDebounceTimer=null,this.setEphemeralState(t)},150)}renderEmptyState(){if(!this.boardEl)return;let n=this.containerEl.ownerDocument.createElement("div");n.className="tn-bases-empty",n.style.cssText="padding: 20px; text-align: center; color: var(--text-muted);",n.textContent="No TaskNotes tasks found for this Base.",this.boardEl.appendChild(n)}renderNoGroupByError(){if(!this.boardEl)return;let n=this.containerEl.ownerDocument.createElement("div");n.className="tn-bases-error",n.style.cssText="padding: 20px; text-align: center; color: var(--text-error);",n.textContent=this.plugin.i18n.translate("views.kanban.errors.noGroupBy"),this.boardEl.appendChild(n)}renderError(t){if(!this.boardEl)return;let a=this.containerEl.ownerDocument.createElement("div");a.className="tn-bases-error",a.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",a.textContent=`Error loading kanban: ${t.message||"Unknown error"}`,this.boardEl.appendChild(a)}async computeFormulas(t){var a,s,i;let n=(s=(a=this.data)==null?void 0:a.ctx)==null?void 0:s.formulas;if(!(!n||typeof n!="object"||t.length===0))for(let o=0;o0){let f=p.frontmatter;p.frontmatter={...f,...m},h=u.getValue(p),p.frontmatter=f}else h=u.getValue(p);h!==void 0&&(c.cachedFormulaOutputs[d]=h)}catch(p){}}}}buildPathToPropsMap(){var a,s;let t=this.dataAdapter.extractDataItems(),n=new Map;for(let i of t){if(!i.path)continue;let o={...i.properties||{}},l=(s=(a=i.basesData)==null?void 0:a.formulaResults)==null?void 0:s.cachedFormulaOutputs;if(l&&typeof l=="object")for(let[c,d]of Object.entries(l))o[`formula.${c}`]=d;n.set(i.path,o)}return n}getPropertyValue(t,n){var s;if(n.startsWith("formula."))return(s=t[n])!=null?s:null;let a=this.stripPropertyPrefix(n);return t[n]!==void 0?t[n]:t[a]!==void 0?t[a]:null}stripPropertyPrefix(t){let n=t.split(".");return n.length>1&&["note","file","formula","task"].includes(n[0])?n.slice(1).join("."):t}valueToString(t){var n,a;if(t==null)return"None";if(typeof t=="object"&&t!==null&&typeof t.toString=="function"){if(((n=t.constructor)==null?void 0:n.name)==="NullValue"||t.isTruthy&&!t.isTruthy())return"None";if(((a=t.constructor)==null?void 0:a.name)==="ListValue"||Array.isArray(t.value)){let i=t.value||[];return i.length===0?"None":i.map(o=>this.valueToString(o)).join(", ")}return t.toString()||"None"}return typeof t=="string"?t||"None":typeof t=="number"?String(t):typeof t=="boolean"?t?"True":"False":Array.isArray(t)?t.length>0?t.map(s=>this.valueToString(s)).join(", "):"None":String(t)}getGroupDisplayTitle(t,n){if(!n)return t;let a=this.stripPropertyPrefix(n),s=this.plugin.fieldMapper.toUserField("status");if(a===s){let o=this.plugin.statusManager.getStatusConfig(t);if(o!=null&&o.label)return o.label}let i=this.plugin.fieldMapper.toUserField("priority");if(a===i){let o=this.plugin.priorityManager.getPriorityConfig(t);if(o!=null&&o.label)return o.label}return t}renderGroupTitleWrapper(t,n,a=!1,s=!1){if(a?this.isSwimLaneByStatus():this.isGroupedByStatus()){let u=this.plugin.statusManager.getStatusConfig(n);if(u){if(this.consolidateStatusIcon&&!s&&u.icon){let p=t.createSpan({cls:"kanban-view__column-icon"});p.style.color=u.color,(0,ai.setIcon)(p,u.icon)}t.createSpan({text:u.label});return}}let o=a?this.swimLanePropertyId:this.getGroupByPropertyId(),l=this.getGroupDisplayTitle(n,o),c=this.app||this.plugin.app,d={metadataCache:c.metadataCache,workspace:c.workspace};Q0(t,l,d)}applyColumnOrder(t,n){let a=this.columnOrders[t];if(!a||a.length===0)return n.sort();let s=[],i=[];for(let o of a)n.includes(o)&&s.push(o);for(let o of n)a.includes(o)||i.push(o);return[...s,...i.sort()]}async saveColumnOrder(t,n){this.columnOrders[t]=n;try{let a=JSON.stringify(this.columnOrders);this.config.set("columnOrder",a)}catch(a){console.error("[KanbanView] Failed to save column order:",a)}}getCardOptions(){let t=new Date,n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),a=this.consolidateStatusIcon&&this.isGroupedByStatus();return{targetDate:n,hideStatusIndicator:a}}isGroupedByStatus(){let t=this.getGroupByPropertyId();if(!t)return!1;let n=this.plugin.fieldMapper.toUserField("status");return t.replace(/^(note\.|file\.|task\.)/,"")===n}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 n=t.target;if(!n)return null;let a=n.closest(".task-card");if(!a)return null;let s=a.closest(".kanban-view__card-wrapper");if(!s)return null;let i=s.dataset.taskPath;if(!i)return null;let o=this.taskInfoCache.get(i);return o?{task:o,card:a}:null}async handleCardAction(t,n,a,s){let[{DateContextMenu:i},{PriorityContextMenu:o},{RecurrenceContextMenu:l},{ReminderModal:c},{showTaskContextMenu:d}]=await Promise.all([Promise.resolve().then(()=>(Bp(),Bre)),Promise.resolve().then(()=>(AT(),Vre)),Promise.resolve().then(()=>(Mf(),qre)),Promise.resolve().then(()=>(Pf(),Lre)),Promise.resolve().then(()=>(Kn(),fc))]);switch(t){case"toggle-status":await this.handleToggleStatus(n,s);return;case"priority-menu":this.showPriorityMenu(n,s,o);return;case"recurrence-menu":this.showRecurrenceMenu(n,s,l);return;case"reminder-menu":this.showReminderModal(n,c);return;case"task-context-menu":await d(s,n.path,this.plugin,this.getTaskActionDate(n));return;case"edit-date":await this.openDateContextMenu(n,a.dataset.tnDateType,s,i);return;case"toggle-subtasks":await this.handleToggleSubtasks(n,a);return;case"toggle-blocking-tasks":await this.handleToggleBlockingTasks(n,a);return}}async handleToggleStatus(t,n){try{if(t.recurrence){let a=this.getTaskActionDate(t);await this.plugin.toggleRecurringTaskComplete(t,a)}else await this.plugin.toggleTaskStatus(t)}catch(a){console.error("[TaskNotes][KanbanView] Failed to toggle status",a)}}getTaskActionDate(t){let n=Xe(t.scheduled||t.due||"");return n?nt(n):Rr(new Date)}showPriorityMenu(t,n,a){new a({currentValue:t.priority,onSelect:async i=>{try{await this.plugin.updateTaskProperty(t,"priority",i)}catch(o){console.error("[TaskNotes][KanbanView] Failed to update priority",o)}},plugin:this.plugin}).show(n)}showRecurrenceMenu(t,n,a){new a({currentValue:typeof t.recurrence=="string"?t.recurrence:void 0,currentAnchor:t.recurrence_anchor||"scheduled",scheduledDate:t.scheduled,onSelect:async(i,o)=>{try{await this.plugin.updateTaskProperty(t,"recurrence",i||void 0),o!==void 0&&await this.plugin.updateTaskProperty(t,"recurrence_anchor",o)}catch(l){console.error("[TaskNotes][KanbanView] Failed to update recurrence",l)}},app:this.plugin.app,plugin:this.plugin}).show(n)}showReminderModal(t,n){new n(this.plugin.app,this.plugin,t,async s=>{try{await this.plugin.updateTaskProperty(t,"reminders",s.length>0?s:void 0)}catch(i){console.error("[TaskNotes][KanbanView] Failed to update reminders",i)}}).open()}async openDateContextMenu(t,n,a,s){if(!n)return;let{getDatePart:i,getTimePart:o}=await Promise.resolve().then(()=>(kt(),I8)),l=n==="due"?t.due:t.scheduled;new s({currentValue:i(l||""),currentTime:o(l||""),onSelect:async(d,u)=>{try{let p;d?u?p=`${d}T${u}`:p=d:p=void 0,await this.plugin.updateTaskProperty(t,n,p)}catch(p){console.error("[TaskNotes][KanbanView] Failed to update date",p)}},plugin:this.plugin,app:this.app||this.plugin.app}).show(a)}async handleToggleSubtasks(t,n){var l,c,d;let{toggleSubtasks:a}=await Promise.resolve().then(()=>(Kn(),fc)),s=n.closest(".task-card");if(!s)return;let o=!(((l=this.plugin.expandedProjectsService)==null?void 0:l.isExpanded(t.path))||!1);o?(c=this.plugin.expandedProjectsService)==null||c.setExpanded(t.path,!0):(d=this.plugin.expandedProjectsService)==null||d.setExpanded(t.path,!1),n.classList.toggle("is-rotated",o),await a(s,t,this.plugin,o)}async handleToggleBlockingTasks(t,n){let{toggleBlockingTasks:a}=await Promise.resolve().then(()=>(Kn(),fc)),s=n.closest(".task-card");if(!s)return;let i=n.classList.toggle("task-card__blocking-toggle--expanded");await a(s,t,this.plugin,i)}destroyColumnScrollers(){for(let t of this.columnScrollers.values())t.destroy();this.columnScrollers.clear()}onunload(){this.unregisterBoardListeners(),this.destroyColumnScrollers(),this.currentTaskElements.clear(),this.taskInfoCache.clear(),this.boardEl=null}}});var cw=b(()=>{bc();VT()});function X0(r,e){let t=[];for(let n=0;n{let k=r[y.index].eventRange.instance.instanceId+":"+y.span.start+":"+(y.span.end-1);return a[k]||1});o.allowReslicing=!0,o.strictOrder=n,e===!0||t===!0?(o.maxCoord=s,o.hiddenConsumes=!0):typeof e=="number"?o.maxStackCnt=e:typeof t=="number"&&(o.maxStackCnt=t,o.hiddenConsumes=!0);let l=[],c=[];for(let y=0;y1,g=m.span.start===o;u+=m.levelCoord-d,d=m.levelCoord+m.thickness,f?(u+=m.thickness,g&&p.push({seg:Pg(h,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!0,absoluteTop:m.levelCoord,marginTop:0})):g&&(p.push({seg:Pg(h,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:u}),u=0)}a.push(c),s.push(p),i.push(u)}return{singleColPlacements:a,multiColPlacements:s,leftoverMargins:i}}function sKe(r,e){let t=[];for(let n=0;n({seg:n,isVisible:!0,isAbsolute:!0,absoluteTop:t[n.eventRange.instance.instanceId],marginTop:0}))}function oKe(r){let e={};for(let t of r)for(let n of t)e[n.seg.eventRange.instance.instanceId]=n.absoluteTop;return e}function lKe(r,e){return X0(r.filter(cKe),e)}function cKe(r){return r.eventRange.def.allDay}function dKe(r,e){let t;return e.currentRangeUnit.match(/year|month/)&&(t=r.querySelector(`[data-date="${Xf(e.currentDate)}-01"]`)),t||(t=r.querySelector(`[data-date="${qd(e.currentDate)}"]`)),t}function KH(r,e){let t=new rm(r.renderRange,e);return new nm(t,/year|month|week/.test(r.currentRangeUnit))}function QH(r){let{dateEnv:e,currentRange:t}=r,{start:n,end:a}=t,s;if(r.snapToWeek&&(n=e.startOfWeek(n),s=e.startOfWeek(a),s.valueOf()!==a.valueOf()&&(a=fC(s,1))),r.fixedWeekCount){let i=e.startOfWeek(e.startOfMonth(Lr(t.end,-1))),o=Math.ceil(lF(i,a));a=fC(a,6-o)}return{start:n,end:a}}var VH,Zge,eP,tP,WH,eKe,YH,GH,rP,dw,ZH,uw,pw,nP,_g,uKe,aP=b(()=>{pm();cw();VH=class extends yn{constructor(){super(...arguments),this.headerElRef=Wr()}renderSimpleLayout(e,t){let{props:n,context:a}=this,s=[],i=dm(a.options);return e&&s.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),P(Xs,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},P(jd,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,t,n,a){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:i,context:o}=this,l=!i.forPrint&&dm(o.options),c=!i.forPrint&&wk(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:og}]}),P(Xs,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},P(s,{liquid:!i.isHeightAuto&&!i.forPrint,forPrint:i.forPrint,collapsibleWidth:i.forPrint,colGroups:[{cols:[{span:n,minWidth:a}]}],sections:d}))}};Zge=It({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});eP=class extends dt{render(){let{props:e}=this;return P(zd,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Zge,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},tP=class extends dt{render(){let{props:e,context:t}=this,{options:n}=t,{seg:a}=e,s=n.eventTimeFormat||Zge,i=Ud(a,s,t,!0,e.defaultDisplayEventEnd);return P(Ec,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:ag(e.seg,t),defaultGenerator:JZe,timeText:i,isResizing:!1,isDateSelecting:!1}))}};WH=class extends dt{constructor(){super(...arguments),this.compileSegs=ke(XZe)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return P(im,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,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(At,null,t.map(s=>{let i=s.eventRange.instance.instanceId;return P("div",{className:"fc-daygrid-event-harness",key:i,style:{visibility:a[i]?"hidden":""}},Kge(s)?P(tP,Object.assign({seg:s,isDragging:!1,isSelected:i===e.eventSelection,defaultDisplayEventEnd:!1},ti(s,e.todayRange))):P(eP,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===e.eventSelection,defaultDisplayEventEnd:!1},ti(s,e.todayRange))))}))}})}};eKe=It({week:"narrow"}),YH=class extends yn{constructor(){super(...arguments),this.rootElRef=Wr(),this.state={dayNumberId:fs()},this.handleRootEl=e=>{ei(this.rootElRef,e),ei(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:a}=this,{options:s,dateEnv:i}=e,{date:o,dateProfile:l}=t,c=t.showDayNumber&&rKe(o,l.currentRange,i);return P(Bd,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:tKe,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(xk,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:hl(e,o,"week"),date:o,defaultFormat:eKe}),!u.isDisabled&&(t.showDayNumber||lg(s)||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({},hl(e,o)),{id:n.dayNumberId})})):t.showDayNumber?P("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},P("a",{className:"fc-daygrid-day-number"},"\xA0")):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(WH,{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)))}};GH=class extends tm{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,a=s=>!this.forceHidden[ll(s)];for(let s=0;s{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:a}=n,s=e.cells.length,i=J0(e.businessHourSegs,s),o=J0(e.bgEventSegs,s),l=J0(this.getHighlightSegs(),s),c=J0(this.getMirrorSegs(),s),{singleColPlacements:d,multiColPlacements:u,moreCnts:p,moreMarginTops:m}=nKe(lm(e.fgEventSegs,a.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,a.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=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((f,g)=>{let y=this.renderFgSegs(g,e.forPrint?d[g]:u[g],e.todayRange,h),k=this.renderFgSegs(g,iKe(c[g],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return P(YH,{key:f.key,elRef:this.cellElRefs.createRef(f.key),innerElRef:this.frameElRefs.createRef(f.key),dateProfile:e.dateProfile,date:f.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:f.extraRenderProps,extraDataAttrs:f.extraDataAttrs,extraClassNames:f.extraClassNames,extraDateSpan:f.extraDateSpan,moreCnt:p[g],moreMarginTop:m[g],singlePlacements:d[g],fgContentElRef:this.fgElRefs.createRef(f.key),fgContent:P(At,null,P(At,null,y),P(At,null,k)),bgContent:P(At,null,this.renderFillSegs(l[g],"highlight"),this.renderFillSegs(i[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 n=this.props;this.updateSizing(!ba(e,n))}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,n,a,s,i,o){let{context:l}=this,{eventSelection:c}=this.props,{framePositions:d}=this.state,u=this.props.cells.length===1,p=s||i||o,m=[];if(d)for(let h of t){let{seg:f}=h,{instanceId:g}=f.eventRange.instance,y=h.isVisible&&!a[g],k=h.isAbsolute,T="",w="";k&&(l.isRtl?(w=0,T=d.lefts[f.lastCol]-d.lefts[f.firstCol]):(T=0,w=d.rights[f.firstCol]-d.rights[f.lastCol])),m.push(P("div",{className:"fc-daygrid-event-harness"+(k?" fc-daygrid-event-harness-abs":""),key:Qge(f),ref:p?null:this.segHarnessRefs.createRef(Jge(f)),style:{visibility:y?"":"hidden",marginTop:k?"":h.marginTop,top:k?h.absoluteTop:"",left:T,right:w}},Kge(f)?P(tP,Object.assign({seg:f,isDragging:s,isSelected:g===c,defaultDisplayEventEnd:u},ti(f,n))):P(eP,Object.assign({seg:f,isDragging:s,isResizing:i,isDateSelecting:o,isSelected:g===c,defaultDisplayEventEnd:u},ti(f,n)))))}return m}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:a}=this.props,{framePositions:s}=this.state,i=[];if(s)for(let o of e){let l=n?{right:0,left:s.lefts[o.lastCol]-s.lefts[o.firstCol]}:{left:0,right:s.rights[o.firstCol]-s.rights[o.lastCol]};i.push(P("div",{key:fk(o.eventRange),className:"fc-daygrid-bg-harness",style:l},t==="bg-event"?P(sm,Object.assign({seg:o},ti(o,a))):Ek(t)))}return P(At,{},...i)}updateSizing(e){let{props:t,state:n,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 bo(c,l,!0,!1);(!n.framePositions||!n.framePositions.similarTo(d))&&this.setState({framePositions:new bo(c,l,!0,!1)})}}let s=this.state.segHeights,i=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},s),i),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let a=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,a)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};rP.addStateEquality({segHeights:ba});dw=class extends yn{constructor(){super(...arguments),this.splitBusinessHourSegs=ke(X0),this.splitBgEventSegs=ke(lKe),this.splitFgEventSegs=ke(X0),this.splitDateSelectionSegs=ke(X0),this.splitEventDrag=ke(Gge),this.splitEventResize=ke(Gge),this.rowRefs=new hs}render(){let{props:e,context:t}=this,n=e.cells.length,a=this.splitBusinessHourSegs(e.businessHourSegs,n),s=this.splitBgEventSegs(e.bgEventSegs,n),i=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),l=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),d=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return P(ms,{unit:"day"},(u,p)=>P(At,null,e.cells.map((m,h)=>P(rP,{ref:this.rowRefs.createRef(h),key:m.length?m[0].date.toISOString():h,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:p,dateProfile:e.dateProfile,cells:m,renderIntro:e.renderRowIntro,businessHourSegs:a[h],eventSelection:e.eventSelection,bgEventSegs:s[h],fgEventSegs:i[h],dateSelectionSegs:o[h],eventDrag:l[h],eventResize:c[h],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 bo(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new bo(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:a}=this,s=n.leftToIndex(e),i=a.topToIndex(t);if(i!=null&&s!=null){let o=this.props.cells[i][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(i,s),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(i,s),rect:{left:n.lefts[s],right:n.rights[s],top:a.tops[i],bottom:a.bottoms[i]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date,a=Lr(n,1);return{start:n,end:a}}};ZH=class extends yn{constructor(){super(...arguments),this.elRef=Wr(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:a}=e,s=n===!0||t===!0;s&&!a&&(s=!1,t=null,n=null);let i=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",a?"":"fc-daygrid-body-natural"];return P("div",{ref:this.elRef,className:i.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(dw,{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:n,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=dKe(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),a=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=a?a+1:0}this.needsScrollReset=!1}}};uw=class extends am{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},pw=class extends yn{constructor(){super(...arguments),this.slicer=new uw,this.tableRef=Wr()}render(){let{props:e,context:t}=this;return P(ZH,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}))}},nP=class extends VH{constructor(){super(...arguments),this.buildDayTableModel=ke(KH),this.headerRef=Wr(),this.tableRef=Wr()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,a=this.buildDayTableModel(n.dateProfile,t),s=e.dayHeaders&&P(Sc,{ref:this.headerRef,dateProfile:n.dateProfile,dates:a.headerDates,datesRepDistinctDays:a.rowCnt===1}),i=o=>P(pw,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:a,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,i,a.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,i)}};_g=class extends Qp{buildRenderRange(e,t,n){let a=super.buildRenderRange(e,t,n),{props:s}=this;return QH({currentRange:a,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}};uKe=':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}';cl(uKe)});var Xge,eye=b(()=>{um();aP();Xge=Ta({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:nP,dateProfileGeneratorClass:_g},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 sye(r){let e=["fc-timegrid-slot","fc-timegrid-slot-label",r.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return P(Ri.Consumer,null,t=>{if(!r.isLabeled)return P("td",{className:e.join(" "),"data-time":r.isoTimeStr});let{dateEnv:n,options:a,viewApi:s}=t,i=a.slotLabelFormat==null?pKe:Array.isArray(a.slotLabelFormat)?It(a.slotLabelFormat[0]):It(a.slotLabelFormat),o={level:0,time:r.time,date:n.toDate(r.date),view:s,text:n.format(r.date,i)};return P(tn,{elTag:"td",elClasses:e,elAttrs:{"data-time":r.isoTimeStr},renderProps:o,generatorName:"slotLabelContent",customGenerator:a.slotLabelContent,defaultGenerator:mKe,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 mKe(r){return r.text}function gKe(r){return r.text}function yKe(r,e){return e.map(t=>r[t.key])}function mw(r,e){let t=[],n;for(n=0;nn+":"+a,(n,a)=>{let s=SKe(r,n,a),i=rye(s,t),o=e[n][a];return[Object.assign(Object.assign({},o),{nextLevelNodes:i[0]}),o.thickness+i[1]]});return rye(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,t)[0]}function rye(r,e){if(!r)return[[],0];let{level:t,lateralStart:n,lateralEnd:a}=r,s=n,i=[];for(;sll(n),(n,a,s)=>{let{nextLevelNodes:i,thickness:o}=n,l=o+s,c=o/l,d,u=[];if(!i.length)d=e;else for(let m of i)if(d===void 0){let h=t(m,a,l);d=h[0],u.push(h[1])}else{let h=t(m,d,0);u.push(h[1])}let p=(d-a)*c;return[d-p,Object.assign(Object.assign({},n),{thickness:p,nextLevelNodes:u})]});return r.map(n=>t(n,0,0)[1])}function xKe(r){let e=[],t=uU((a,s,i)=>ll(a),(a,s,i)=>{let o=Object.assign(Object.assign({},a),{levelCoord:s,stackDepth:i,stackForward:0});return e.push(o),o.stackForward=n(a.nextLevelNodes,s+a.thickness,i+1)+1});function n(a,s,i){let o=0;for(let l of a)o=Math.max(t(l,s,i),o);return o}return n(r,0,0),e}function uU(r,e){let t={};return(...n)=>{let a=r(...n);return a in t?t[a]:t[a]=e(...n)}}function nye(r,e,t=null,n=0){let a=[];if(t)for(let s=0;s{let l=o.eventRange.instance.instanceId;return P("div",{key:l,style:{visibility:i[l]?"hidden":""}},P(sP,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===n,isShort:!1},ti(o,e,t))))}))}function JH(r){return r?{top:r.start,bottom:-r.end}:{top:"",bottom:""}}function PKe(r,e){return r.map(t=>e[t.index])}function _Ke(r,e){return e.map(t=>r[t.key])}function MKe(r,e){let t=e||r,n=dk(r,t);return n===null&&(t=r,n=1),{snapDuration:t,snapsPerSlot:n}}function AKe(r,e,t){let n=[];for(let a of r.headerDates)n.push({start:t.add(a,e.slotMinTime),end:t.add(a,e.slotMaxTime)});return n}function IKe(r,e,t,n,a){let s=new Date(0),i=r,o=tt(0),l=t||NKe(n),c=[];for(;Js(i)=0;e-=1)if(t=tt(aye[e]),n=dk(t,r),n!==null&&n>1)return t;return r}function RKe(r,e){let t=new rm(r.renderRange,e);return new nm(t,!1)}var XH,pKe,eU,hKe,fKe,tU,rU,nU,aU,sU,CKe,sP,iU,oU,lU,cU,dU,aye,iP,OKe,oye=b(()=>{pm();cw();aP();XH=class extends tk{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?CF(e)?["timed","allDay"]:["allDay"]:["timed"]}},pKe=It({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});eU=class extends dt{render(){return this.props.slatMetas.map(e=>P("tr",{key:e.key},P(sye,Object.assign({},e))))}},hKe=It({week:"short"}),fKe=5,tU=class extends yn{constructor(){super(...arguments),this.allDaySplitter=new XH,this.headerElRef=Wr(),this.rootElRef=Wr(),this.scrollerElRef=Wr(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:a}=this.props,s=a.renderRange,o=ul(s.start,s.end)===1?hl(this.context,s.start,"week"):{};return n.weekNumbers&&e==="day"?P(xk,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:hKe},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:n}=this.context,a={text:t.allDayText,view:n};return P(tn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:a,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:gKe,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},s=>P("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},P(s,{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,n){let{context:a,props:s}=this,i=[],o=dm(a.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.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")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:!!a.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:n}}),P(Xs,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:a.viewSpec},P(jd,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:i}))}renderHScrollLayout(e,t,n,a,s,i,o){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:c,props:d}=this,u=!d.forPrint&&dm(c.options),p=!d.forPrint&&wk(c.options),m=[];e&&m.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:f=>P("tr",{role:"presentation"},this.renderHeadAxis("day",f.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:f=>P("tr",{role:"presentation"},this.renderTableRowAxis(f.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 h=c.options.nowIndicator;return m.push({type:"body",key:"body",liquid:!0,expandRows:!!c.options.expandRows,chunks:[{key:"axis",content:f=>P("div",{className:"fc-timegrid-axis-chunk"},P("table",{"aria-hidden":!0,style:{height:f.expandRows?f.clientHeight:""}},f.tableColGroupNode,P("tbody",null,P(eU,{slatMetas:i}))),P("div",{className:"fc-timegrid-now-indicator-container"},P(ms,{unit:h?"minute":"day"},g=>{let y=h&&o&&o.safeComputeTop(g);return typeof y=="number"?P(Sk,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:y},isAxis:!0,date:g}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&m.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:og},{key:"cols",content:og}]}),P(Xs,{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:s}]}],sections:m}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=fKe),{dayMaxEvents:e,dayMaxEventRows:t}}};rU=class{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Ii(t.currentRange,e)){let n=Gt(e),a=e.valueOf()-n.valueOf();if(a>=Js(t.slotMinTime)&&a{let o={time:s.time,date:t.dateEnv.toDate(s.date),view:t.viewApi};return P("tr",{key:s.key,ref:a.createRef(s.key)},e.axis&&P(sye,Object.assign({},s)),P(tn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))}))}},aU=class extends dt{constructor(){super(...arguments),this.rootElRef=Wr(),this.slatElRefs=new hs}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(nU,{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 rU(new bo(this.rootElRef.current,yKe(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}};sU=class extends dt{render(){let{props:e}=this;return P(im,{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:()=>iye(e.hiddenSegs,e),defaultGenerator:vKe,forceTimed:!0},t=>P(t,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}};CKe=It({hour:"numeric",minute:"2-digit",meridiem:!1}),sP=class extends dt{render(){return P(zd,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:CKe}))}},iU=class extends dt{constructor(){super(...arguments),this.sortEventSegs=ke(lm)}render(){let{props:e,context:t}=this,{options:n}=t,a=n.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||a&&e.dateSelectionSegs||[],i=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return P(Bd,{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,i,!1,!1,!1)),P("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},!!e.eventDrag,!!e.eventResize,!!a,"mirror")),P("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),lg(n)&&P(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,t,n,a,s,i){let{props:o}=this;return o.forPrint?iye(e,o):this.renderPositionedFgSegs(e,t,n,a,s,i)}renderPositionedFgSegs(e,t,n,a,s,i){let{eventMaxStack:o,eventShortHeight:l,eventOrderStrict:c,eventMinHeight:d}=this.context.options,{date:u,slatCoords:p,eventSelection:m,todayRange:h,nowDate:f}=this.props,g=n||a||s,y=nye(e,u,p,d),{segPlacements:k,hiddenGroups:T}=DKe(e,y,c,o);return P(At,null,this.renderHiddenGroups(T,e),k.map(w=>{let{seg:S,rect:x}=w,C=S.eventRange.instance.instanceId,M=g||!!(!t[C]&&x),N=JH(x&&x.span),F=!g&&x?this.computeSegHStyle(x):{left:0,right:0},G=!!x&&x.stackForward>0,R=!!x&&x.span.end-x.span.start{let u=JH(d.span),p=PKe(d.entries,t);return P(sU,{key:gC(CC(p)),hiddenSegs:p,top:u.top,bottom:u.bottom,extraDateSpan:n,dateProfile:a,todayRange:s,nowDate:i,eventSelection:o,eventDrag:l,eventResize:c})}))}renderFillSegs(e,t){let{props:n,context:a}=this,i=nye(e,n.date,n.slatCoords,a.options.eventMinHeight).map((o,l)=>{let c=e[l];return P("div",{key:fk(c.eventRange),className:"fc-timegrid-bg-harness",style:JH(o)},t==="bg-event"?P(sm,Object.assign({seg:c},ti(c,n.todayRange,n.nowDate))):Ek(t))});return P(At,null,i)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map((a,s)=>P(Sk,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(a.start,n)},isAxis:!1,date:n})):null}computeSegHStyle(e){let{isRtl:t,options:n}=this.context,a=n.slotEventOverlap,s=e.levelCoord,i=e.levelCoord+e.thickness,o,l;a&&(i=Math.min(1,s+(i-s)*2)),t?(o=1-i,l=s):(o=s,l=1-i);let c={zIndex:e.stackDepth+1,left:o*100+"%",right:l*100+"%"};return a&&!e.stackForward&&(c[t?"marginLeft":"marginRight"]=20),c}};oU=class extends dt{constructor(){super(...arguments),this.splitFgEventSegs=ke(mw),this.splitBgEventSegs=ke(mw),this.splitBusinessHourSegs=ke(mw),this.splitNowIndicatorSegs=ke(mw),this.splitDateSelectionSegs=ke(mw),this.splitEventDrag=ke(tye),this.splitEventResize=ke(tye),this.rootElRef=Wr(),this.cellElRefs=new hs}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),a=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,a),i=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 n=="number"&&P(Sk,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map((p,m)=>P(iU,{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:s[m],bgEventSegs:i[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 bo(this.rootElRef.current,_Ke(this.cellElRefs.currentMap,e.cells),!0,!1))}};lU=class extends yn{constructor(){super(...arguments),this.processSlotOptions=ke(MKe),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:n}=this.state;if(t&&n){if(e.time){let a=n.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(aU,{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(oU,{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:n,options:a}=this.context,{colCoords:s}=this,{dateProfile:i}=this.props,{slatCoords:o}=this.state,{snapDuration:l,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,a.snapDuration),d=s.leftToIndex(e),u=o.positions.topToIndex(t);if(d!=null&&u!=null){let p=this.props.cells[d],m=o.positions.tops[u],h=o.positions.getHeight(u),f=(t-m)/h,g=Math.floor(f*c),y=u*c+g,k=this.props.cells[d].date,T=ck(i.slotMinTime,oF(l,y)),w=n.add(k,T),S=n.add(w,l);return{dateProfile:i,dateSpan:Object.assign({range:{start:w,end:S},allDay:!1},p.extraDateSpan),dayEl:s.els[d],rect:{left:s.lefts[d],right:s.rights[d],top:m,bottom:m+h},layer:0}}return null}};cU=class extends am{sliceRange(e,t){let n=[];for(let a=0;aP(lU,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,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:s&&this.slicer.sliceNowDate(l,n,i,t,o),todayRange:c,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}};aye=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];iP=class extends tU{constructor(){super(...arguments),this.buildTimeColsModel=ke(RKe),this.buildSlatMetas=ke(IKe)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:a}=this,{dateProfile:s}=a,i=this.buildTimeColsModel(s,n),o=this.allDaySplitter.splitProps(a),l=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:c}=e,d=!c,u=c,p=e.dayHeaders&&P(Sc,{dates:i.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:d?this.renderHeadAxis:null}),m=e.allDaySlot!==!1&&(f=>P(pw,Object.assign({},o.allDay,{dateProfile:s,dayTableModel:i,nextDayThreshold:e.nextDayThreshold,tableMinWidth:f.tableMinWidth,colGroupNode:f.tableColGroupNode,renderRowIntro:d?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:f.clientWidth,clientHeight:f.clientHeight,forPrint:a.forPrint},this.getAllDayMaxEventProps()))),h=f=>P(dU,Object.assign({},o.timed,{dayTableModel:i,dateProfile:s,axis:d,slotDuration:e.slotDuration,slatMetas:l,forPrint:a.forPrint,tableColGroupNode:f.tableColGroupNode,tableMinWidth:f.tableMinWidth,clientWidth:f.clientWidth,clientHeight:f.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:f.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return u?this.renderHScrollLayout(p,m,h,i.colCnt,c,l,this.state.slatCoords):this.renderSimpleLayout(p,m,h)}};OKe='.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}';cl(OKe)});var FKe,lye,cye=b(()=>{um();oye();FKe={allDaySlot:Boolean},lye=Ta({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:FKe,views:{timeGrid:{component:iP,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}})});function LKe(r){return P(At,null,r.text&&P("a",Object.assign({id:r.textId,className:"fc-list-day-text"},r.navLinkAttrs),r.text),r.sideText&&P("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},r.sideNavLinkAttrs),r.sideText))}function jKe(r,e){let t=ag(r,e);return P("a",Object.assign({},t),r.eventRange.def.title)}function zKe(r,e,t,n,a){let{options:s}=t;if(s.displayEventTime!==!1){let i=r.eventRange.def,o=r.eventRange.instance,l=!1,c;if(i.allDay?l=!0:bF(r.eventRange.range)?r.isStart?c=Ud(r,e,t,null,null,o.range.start,r.end):r.isEnd?c=Ud(r,e,t,null,null,r.start,o.range.end):l=!0:c=Ud(r,e,t),l){let d={text:t.options.allDayText,view:t.viewApi};return P(tn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${n} ${a}`},renderProps:d,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:BKe,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return P("td",{className:"fc-list-event-time"},c)}return null}function BKe(r){return r.text}function qKe(r){return r.text}function HKe(r){let e=Gt(r.renderRange.start),t=r.renderRange.end,n=[],a=[];for(;e{pm();cw();pU=class extends dt{constructor(){super(...arguments),this.state={textId:fs()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:a}=this.context,{cellId:s,dayDate:i,todayRange:o}=this.props,{textId:l}=this.state,c=yk(i,o),d=n.listDayFormat?t.format(i,n.listDayFormat):"",u=n.listDaySideFormat?t.format(i,n.listDaySideFormat):"",p=Object.assign({date:t.toDate(i),view:a,textId:l,text:d,sideText:u,navLinkAttrs:hl(this.context,i),sideNavLinkAttrs:hl(this.context,i,"day",!1)},c);return P(tn,{elTag:"tr",elClasses:["fc-list-day",...sg(c,e)],elAttrs:{"data-date":qd(i)},renderProps:p,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:LKe,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},m=>P("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":l},P(m,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}};$Ke=It({hour:"numeric",minute:"2-digit",meridiem:"short"}),mU=class extends dt{render(){let{props:e,context:t}=this,{options:n}=t,{seg:a,timeHeaderId:s,eventHeaderId:i,dateHeaderId:o}=e,l=n.eventTimeFormat||$Ke;return P(Ec,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",a.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>jKe(a,t),seg:a,timeText:"",disableDragging:!0,disableResizing:!0}),(c,d)=>P(At,null,zKe(a,l,t,s,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:`${i} ${o}`}})))}};oP=class extends yn{constructor(){super(...arguments),this.computeDateVars=ke(HKe),this.eventStoreToSegs=ke(this._eventStoreToSegs),this.state={timeHeaderId:fs(),eventHeaderId:fs(),dateHeaderIdRoot:fs()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:a}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,a);return P(Xs,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),t.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:t.viewSpec},P(Zf,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return P(tn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:qKe,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},a=>P(a,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,t){let{theme:n,options:a}=this.context,{timeHeaderId:s,eventHeaderId:i,dateHeaderIdRoot:o}=this.state,l=UKe(e);return P(ms,{unit:"day"},(c,d)=>{let u=[];for(let p=0;p{um();dye();pm();WKe={listDayFormat:uye,listDaySideFormat:uye,noEventsClassNames:$,noEventsContent:$,noEventsDidMount:$,noEventsWillUnmount:$};pye=Ta({name:"@fullcalendar/list",optionRefiners:WKe,views:{list:{component:oP,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 GKe(r,e,t,n,a){let{start:s,end:i}=e.currentRange,o=s,l=[];for(;o.valueOf(){um();aP();pm();cw();hU=class extends yn{constructor(){super(...arguments),this.buildDayTableModel=ke(KH),this.slicer=new uw,this.state={labelId:fs()}}render(){let{props:e,state:t,context:n}=this,{dateProfile:a,forPrint:s}=e,{options:i}=n,o=this.buildDayTableModel(a,n.dateProfileGenerator),l=this.slicer.sliceProps(e,a,i.nextDayThreshold,n,o),c=e.tableWidth!=null?e.tableWidth/i.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},n.dateEnv.format(e.dateProfile.currentRange.start,e.titleFormat)),P("table",{className:["fc-multimonth-header-table",n.theme.getClass("table")].join(" "),role:"presentation"},P("thead",{role:"rowgroup"},P(Sc,{dateProfile:e.dateProfile,dates:o.headerDates,datesRepDistinctDays:!1})))),P("div",{className:["fc-multimonth-daygrid","fc-daygrid","fc-daygrid-body",!s&&"fc-daygrid-body-balanced",s&&"fc-daygrid-body-unbalanced",s&&"fc-daygrid-body-natural"].join(" "),style:{marginTop:-u}},P("table",{className:["fc-multimonth-daygrid-table",n.theme.getClass("table")].join(" "),style:{height:s?"":c},role:"presentation"},P("tbody",{role:"rowgroup"},P(dw,Object.assign({},l,{dateProfile:a,cells:o.cells,eventSelection:e.eventSelection,dayMaxEvents:!s,dayMaxEventRows:!s,showWeekNumbers:i.weekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:s}))))))}},fU=class extends yn{constructor(){super(...arguments),this.splitDateProfileByMonth=ke(GKe),this.buildMonthFormat=ke(QKe),this.scrollElRef=Wr(),this.firstMonthElRef=Wr(),this.needsScrollReset=!1,this.handleSizing=e=>{e&&this.updateSize()}}render(){let{context:e,props:t,state:n}=this,{options:a}=e,{clientWidth:s,clientHeight:i}=n,o=n.monthHPadding||0,l=Math.min(s!=null?Math.floor(s/(a.multiMonthMinWidth+o)):1,a.multiMonthMaxColumns)||1,c=100/l+"%",d=s==null?null:s/l-o,u=s!=null&&l===1,p=this.splitDateProfileByMonth(e.dateProfileGenerator,t.dateProfile,e.dateEnv,u?!1:a.fixedWeekCount,a.showNonCurrentDates),m=this.buildMonthFormat(a.multiMonthTitleFormat,p),h=["fc-multimonth",u?"fc-multimonth-singlecol":"fc-multimonth-multicol",d!=null&&d<400?"fc-multimonth-compact":"",t.isHeightAuto?"":"fc-scroller"];return P(Xs,{elRef:this.scrollElRef,elClasses:h,viewSpec:e.viewSpec},p.map((f,g)=>{let y=Xf(f.currentRange.start);return P(hU,Object.assign({},t,{key:y,isoDateStr:y,elRef:g===0?this.firstMonthElRef:void 0,titleFormat:m,dateProfile:f,width:c,tableWidth:d,clientWidth:s,clientHeight:i}))}))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleSizing),this.requestScrollReset()}componentDidUpdate(e){ba(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,n=t.querySelector(`[data-date="${Xf(e)}"]`);t.scrollTop=n.getBoundingClientRect().top-this.firstMonthElRef.current.getBoundingClientRect().top,this.needsScrollReset=!1}}shouldComponentUpdate(){return!0}},YKe=tt(1,"month");ZKe=It({year:"numeric",month:"long"}),KKe=It({month:"long"});JKe={multiMonthTitleFormat:It,multiMonthMaxColumns:Number,multiMonthMinWidth:Number},XKe=".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}";cl(XKe);hye=Ta({name:"@fullcalendar/multimonth",initialView:"multiMonthYear",optionRefiners:JKe,views:{multiMonth:{component:fU,dateProfileGeneratorClass:_g,multiMonthMinWidth:350,multiMonthMaxColumns:3},multiMonthYear:{type:"multiMonth",duration:{years:1},fixedWeekCount:!0,showNonCurrentDates:!1}}})});function su(r,e,t){new gU(r.app,r,{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,onResult:a=>{a.type==="selected"||a.type==="created"?e(a.file):e(null)}}).open()}var ks,gU,hw=b(()=>{ks=require("obsidian"),gU=class extends ks.SuggestModal{constructor(t,n,a){super(t);this.currentQuery="";this.resultHandled=!1;this.createFooterEl=null;this.handleInputChange=()=>{this.currentQuery=this.inputEl.value.trim(),this.updateCreateFooter()};this.plugin=n,this.options=a,this.setPlaceholder(a.placeholder||"Search files or type to create new..."),this.setInstructions([{command:"\u2191\u2193",purpose:"to navigate"},{command:"\u21B5",purpose:"to select"},{command:"\u21E7\u21B5",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),setTimeout(()=>this.createFooter(),0)}createFooter(){var n;let t=this.modalEl.querySelector(".prompt");t&&(this.createFooterEl=((n=t.parentElement)==null?void 0:n.createDiv({cls:"file-selector-create-footer"}))||null,this.createFooterEl&&(this.createFooterEl.style.display="none"))}updateCreateFooter(){if(!this.createFooterEl)return;if(!this.currentQuery){this.createFooterEl.style.display="none";return}this.createFooterEl.empty(),this.createFooterEl.style.display="flex";let n=this.createFooterEl.createDiv({cls:"file-selector-create-footer__content"}).createDiv({cls:"file-selector-create-footer__title-line"}),a=n.createSpan({cls:"file-selector-create-footer__shortcut",text:"\u21E7\u21B5"});n.createSpan({cls:"file-selector-create-footer__hint-text",text:" to create: "}),n.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 ks.Notice("Please enter a file name");return}try{let t=this.currentQuery;t.toLowerCase().endsWith(".md")&&(t=t.slice(0,-3));let n=this.options.newFileFolder||"",a=n?`${n}/${t}.md`:`${t}.md`;if(this.app.vault.getAbstractFileByPath(a)){new ks.Notice(`File "${a}" already exists`);return}n&&!await this.app.vault.adapter.exists(n)&&await this.app.vault.createFolder(n);let i=await this.app.vault.create(a,"");this.resultHandled=!0,this.close(),this.options.onResult({type:"created",file:i})}catch(t){console.error("Error creating file:",t),new ks.Notice("Failed to create file")}}getSuggestions(t){this.currentQuery=t.trim(),this.updateCreateFooter();let n=this.app.vault.getAllLoadedFiles(),a=t.toLowerCase(),s,i=this.options.filter||"markdown";return typeof i=="function"?s=n.filter(i):i==="markdown"?s=n.filter(o=>o instanceof ks.TFile&&o.extension==="md"&&!o.path.includes(".trash")):s=n.filter(o=>o instanceof ks.TFile&&!o.path.includes(".trash")),t?s.filter(o=>this.getSearchText(o).toLowerCase().includes(a)).slice(0,50):s.slice(0,50)}getSearchText(t){let n=`${t.name} ${t.path}`;if(t instanceof ks.TFile){let a=this.app.metadataCache.getFileCache(t);if(a!=null&&a.frontmatter){let s=this.plugin.fieldMapper.toUserField("title"),i=a.frontmatter[s];i&&(n+=` ${i}`);let o=(0,ks.parseFrontMatterAliases)(a.frontmatter);o&&o.length>0&&(n+=` ${o.join(" ")}`)}}return n}renderSuggestion(t,n){let a=n.createDiv({cls:"file-selector-suggestion"});if(a.createDiv({cls:"file-selector-suggestion__name",text:t.name}),t instanceof ks.TFile){let s=this.app.metadataCache.getFileCache(t);if(s!=null&&s.frontmatter){let i=this.plugin.fieldMapper.toUserField("title"),o=s.frontmatter[i];if(o)a.createDiv({cls:"file-selector-suggestion__title",text:o});else{let l=(0,ks.parseFrontMatterAliases)(s.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,n){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),setTimeout(()=>{this.resultHandled||this.options.onResult({type:"cancelled"})},0),super.onClose()}}});var Gr,iu,lP,gye=b(()=>{Gr=require("obsidian");Fn();hw();kt();iu=We(Vl()),lP=class extends Gr.Modal{constructor(t,n,a){super(t);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=n,this.options=a,this.translate=n.i18n.translate.bind(n.i18n)}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("timeblock-creation-modal"),this.keyboardHandler=c=>{c.key==="Enter"&&(c.ctrlKey||c.metaKey)&&(c.preventDefault(),this.handleSubmit())},this.containerEl.addEventListener("keydown",this.keyboardHandler),new Gr.Setting(t).setName(this.translate("modals.timeblockCreation.heading")).setHeading();let n=t.createDiv({cls:"timeblock-date-display"});n.createEl("strong",{text:this.translate("modals.timeblockCreation.dateLabel")});let a=Ku(this.options.date);n.createSpan({text:a.toLocaleDateString()}),new Gr.Setting(t).setName(this.translate("modals.timeblockCreation.titleLabel")).setDesc(this.translate("modals.timeblockCreation.titleDesc")).addText(c=>{this.titleInput=c.inputEl,c.setPlaceholder(this.translate("modals.timeblockCreation.titlePlaceholder")).setValue(this.options.prefilledTitle||"").onChange(()=>this.validateForm()),window.setTimeout(()=>this.titleInput.focus(),100)});let s=t.createDiv({cls:"timeblock-time-container"});new Gr.Setting(s).setName(this.translate("modals.timeblockCreation.startTimeLabel")).setDesc(this.translate("modals.timeblockCreation.startTimeDesc")).addText(c=>{this.startTimeInput=c.inputEl,c.setPlaceholder(this.translate("modals.timeblockCreation.startTimePlaceholder")).setValue(this.options.startTime||"").onChange(()=>this.validateForm()),this.startTimeInput.type="time"}),new Gr.Setting(s).setName(this.translate("modals.timeblockCreation.endTimeLabel")).setDesc(this.translate("modals.timeblockCreation.endTimeDesc")).addText(c=>{this.endTimeInput=c.inputEl,c.setPlaceholder(this.translate("modals.timeblockCreation.endTimePlaceholder")).setValue(this.options.endTime||"").onChange(()=>{this.endTimeInput.value==="00:00"&&(this.endTimeInput.value="23:59"),this.validateForm()}),this.endTimeInput.type="time"}),new Gr.Setting(t).setName(this.translate("modals.timeblockCreation.descriptionLabel")).setDesc(this.translate("modals.timeblockCreation.descriptionDesc")).addTextArea(c=>{this.descriptionInput=c.inputEl,c.setPlaceholder(this.translate("modals.timeblockCreation.descriptionPlaceholder")).setValue(""),this.descriptionInput.rows=3}),new Gr.Setting(t).setName(this.translate("modals.timeblockCreation.colorLabel")).setDesc(this.translate("modals.timeblockCreation.colorDesc")).addText(c=>{this.colorInput=c.inputEl,c.setPlaceholder(this.translate("modals.timeblockCreation.colorPlaceholder")).setValue(this.plugin.settings.calendarViewSettings.defaultTimeblockColor),this.colorInput.type="color"}),new Gr.Setting(t).setName(this.translate("modals.timeblockCreation.attachmentsLabel")).setDesc(this.translate("modals.timeblockCreation.attachmentsDesc")).addButton(c=>{c.setButtonText(this.translate("modals.timeblockCreation.addAttachmentButton")).setTooltip(this.translate("modals.timeblockCreation.addAttachmentTooltip")).onClick(()=>{su(this.plugin,d=>{d&&this.addAttachment(d)},{placeholder:"Search files or type to create new...",filter:"all"})})}),this.attachmentsList=t.createDiv({cls:"timeblock-attachments-list"}),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 n=(o=this.titleInput)==null?void 0:o.value.trim(),a=(l=this.startTimeInput)==null?void 0:l.value,s=(c=this.endTimeInput)==null?void 0:c.value,i=!!(n&&a&&s);if(i&&a&&s){let[d,u]=a.split(":").map(Number),[p,m]=s.split(":").map(Number),h=d*60+u,f=p*60+m;f===0&&(f=1439),f<=h&&(i=!1)}t.disabled=!i,t.style.opacity=i?"1":"0.5"}async handleSubmit(){try{let t=this.titleInput.value.trim(),n=this.startTimeInput.value,a=this.endTimeInput.value,s=this.descriptionInput.value.trim(),i=this.colorInput.value;if(!t||!n||!a){new Gr.Notice(this.translate("notices.timeblockRequiredFieldsMissing"));return}a==="00:00"&&(a="23:59");let o=this.selectedAttachments.map(c=>`[[${c.path}]]`),l={id:$I(),title:t,startTime:n,endTime:a};s&&(l.description=s),i&&(l.color=i),o.length>0&&(l.attachments=o),await this.saveTimeblockToDailyNote(l),this.plugin.emitter.trigger("data-changed"),new Gr.Notice(`Timeblock "${t}" created successfully`),this.close()}catch(t){console.error("Error creating timeblock:",t),new Gr.Notice("Failed to create timeblock. Check console for details.")}}async saveTimeblockToDailyNote(t){if(!(0,iu.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let n=window.moment(this.options.date),a=(0,iu.getAllDailyNotes)(),s=(0,iu.getDailyNote)(n,a);if(!s){try{s=await(0,iu.createDailyNote)(n)}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(!s)throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.")}let i=await this.app.vault.read(s),o={},l=i;if(i.startsWith("---")){let u=i.indexOf("---",3);if(u!==-1){let p=i.substring(3,u);l=i.substring(u+3);try{o=(0,Gr.parseYaml)(p)||{}}catch(m){console.error("Error parsing existing frontmatter:",m),o={}}}}o.timeblocks||(o.timeblocks=[]),o.timeblocks.push(t);let d=`--- ${(0,Gr.stringifyYaml)(o)}---${l}`;await this.app.vault.modify(s,d)}addAttachment(t){if(this.selectedAttachments.some(n=>n.path===t.path)){new Gr.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:t.name}));return}this.selectedAttachments.push(t),this.renderAttachmentsList(),new Gr.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:t.name}))}removeAttachment(t){this.selectedAttachments=this.selectedAttachments.filter(n=>n.path!==t.path),this.renderAttachmentsList(),new Gr.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 n=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=n.createDiv({cls:"timeblock-attachment-info"}),s=a.createSpan({cls:"timeblock-attachment-name"});if(s.textContent=t.name,t.path!==t.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=t.path}let i=n.createEl("button",{cls:"timeblock-attachment-remove",text:"\xD7"});(0,Gr.setTooltip)(i,"Remove attachment",{placement:"top"}),i.addEventListener("click",()=>{this.removeAttachment(t)})})}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}}});var ar,Bc,cP,yye=b(()=>{ar=require("obsidian");hw();Bc=We(Vl());kt();cP=class extends ar.Modal{constructor(t,n,a,s,i,o){super(t);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=n,this.timeblock={...a},this.originalTimeblock=a,this.eventDate=s,this.timeblockDate=i||me(s),this.translate=n.i18n.translate.bind(n.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 ar.Setting(t).setName(this.translate("modals.timeblockInfo.editHeading")).setHeading();let n=t.createDiv({cls:"timeblock-date-display"});n.createEl("strong",{text:this.translate("modals.timeblockInfo.dateTimeLabel")});let a=`${this.eventDate.toLocaleDateString()} from ${this.timeblock.startTime} to ${this.timeblock.endTime}`;n.createSpan({text:a}),new ar.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 ar.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 ar.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(this.timeblock.color||this.plugin.settings.calendarViewSettings.defaultTimeblockColor),this.colorInput.type="color"}),new ar.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(()=>{su(this.plugin,u=>{u&&this.addAttachment(u)},{placeholder:"Search files or type to create new...",filter:"all"})})}),this.attachmentsList=t.createDiv({cls:"timeblock-attachments-list"}),await this.initializeAttachments(),this.renderAttachmentsList();let s=t.createDiv({cls:"timeblock-modal-buttons"});s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center",s.style.marginTop="20px",s.createEl("button",{text:this.translate("modals.timeblockInfo.deleteButton"),cls:"mod-warning timeblock-delete-button"}).addEventListener("click",()=>this.handleDelete());let o=s.createDiv({cls:"timeblock-modal-buttons-right"});o.style.display="flex",o.style.gap="8px",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 s;let t=this.contentEl.querySelector(".timeblock-save-button");if(!t)return;let a=!!((s=this.titleInput)==null?void 0:s.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 n=t.replace(/^\[\[|\]\]$/g,""),a=this.app.vault.getAbstractFileByPath(n);a&&this.selectedAttachments.push(a)}}addAttachment(t){if(this.selectedAttachments.some(n=>n.path===t.path)){new ar.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:t.name}));return}this.selectedAttachments.push(t),this.renderAttachmentsList(),new ar.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:t.name}))}removeAttachment(t){this.selectedAttachments=this.selectedAttachments.filter(n=>n.path!==t.path),this.renderAttachmentsList(),new ar.Notice(this.translate("notices.timeblockAttachmentRemoved",{fileName:t.name}))}openAttachment(t){t instanceof ar.TFile?this.app.workspace.getLeaf(!1).openFile(t):new ar.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 n=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=n.createDiv({cls:"timeblock-attachment-info"});a.style.cursor="pointer",(0,ar.setTooltip)(a,"Click to open",{placement:"top"}),a.addEventListener("click",()=>this.openAttachment(t));let s=a.createSpan({cls:"timeblock-attachment-name"});if(s.textContent=t.name,t.path!==t.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=t.path}let i=n.createEl("button",{cls:"timeblock-attachment-remove",text:"\xD7"});(0,ar.setTooltip)(i,"Remove attachment",{placement:"top"}),i.addEventListener("click",o=>{o.stopPropagation(),this.removeAttachment(t)})})}async handleSave(){var t;try{let n=this.titleInput.value.trim();if(!n){new ar.Notice(this.translate("notices.timeblockTitleRequired"));return}this.timeblock.title=n,this.timeblock.description=this.descriptionInput.value.trim()||void 0,this.timeblock.color=this.colorInput.value||void 0;let a=this.selectedAttachments.map(s=>`[[${s.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 ar.Notice(this.translate("notices.timeblockUpdatedSuccess",{title:n})),this.close()}catch(n){console.error("Error updating timeblock:",n),new ar.Notice(this.translate("notices.timeblockUpdateFailed"))}}async updateTimeblockInDailyNote(){if(!(0,Bc.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let t=this.timeblockDate,n=window.moment(t,"YYYY-MM-DD"),a=(0,Bc.getAllDailyNotes)(),s=(0,Bc.getDailyNote)(n,a);if(!s)throw new Error("Daily note not found");let i=await this.app.vault.read(s),o={},l=i;if(i.startsWith("---")){let u=i.indexOf("---",3);if(u!==-1){let p=i.substring(3,u);l=i.substring(u+3);try{o=(0,ar.parseYaml)(p)||{}}catch(m){console.error("Error parsing existing frontmatter:",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,ar.stringifyYaml)(o)}---${l}`;await this.app.vault.modify(s,d)}async handleDelete(){var n;if(await this.showDeleteConfirmation())try{await this.deleteTimeblockFromDailyNote(),(n=this.onChange)==null||n.call(this),this.plugin.emitter.trigger("data-changed"),new ar.Notice(this.translate("notices.timeblockDeletedSuccess",{title:this.timeblock.title})),this.close()}catch(a){console.error("Error deleting timeblock:",a),new ar.Notice(this.translate("notices.timeblockDeleteFailed"))}}async showDeleteConfirmation(){return new Promise(t=>{let n=new ar.Modal(this.app);n.titleEl.setText(this.translate("modals.timeblockInfo.deleteConfirmationTitle"));let a=n.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 s=a.createDiv({cls:"modal-button-container"});s.style.display="flex",s.style.justifyContent="flex-end",s.style.gap="8px",s.style.marginTop="20px";let i=s.createEl("button",{text:this.translate("common.cancel")});i.addEventListener("click",()=>{n.close(),t(!1)}),s.createEl("button",{text:"Delete",cls:"mod-warning"}).addEventListener("click",()=>{n.close(),t(!0)}),n.open(),setTimeout(()=>i.focus(),50)})}async deleteTimeblockFromDailyNote(){if(!(0,Bc.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let t=this.timeblockDate,n=window.moment(t,"YYYY-MM-DD"),a=(0,Bc.getAllDailyNotes)(),s=(0,Bc.getDailyNote)(n,a);if(!s)throw new Error("Daily note not found");let i=await this.app.vault.read(s),o={},l=i;if(i.startsWith("---")){let u=i.indexOf("---",3);if(u!==-1){let p=i.substring(3,u);l=i.substring(u+3);try{o=(0,ar.parseYaml)(p)||{}}catch(m){console.error("Error parsing existing frontmatter:",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,ar.stringifyYaml)(o):"",d=c?`--- ${c}---${l}`:l.trim();await this.app.vault.modify(s,d)}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}}});function Ag(r,e){if(r.startsWith("var("))return r;if(r=r.replace("#",""),!/^[0-9A-Fa-f]{6}$/.test(r))return`rgba(128, 128, 128, ${e})`;let t=parseInt(r.substring(0,2),16),n=parseInt(r.substring(2,4),16),a=parseInt(r.substring(4,6),16);return`rgba(${t}, ${n}, ${a}, ${e})`}function e5e(){return activeDocument.body.classList.contains("theme-dark")}function Pm(r=!1){return r?e5e()?"#e8eaed":"#202124":""}function fw(r){return r.startsWith("var(")}function bye(r,e){let t=r.title;if(r.projects&&r.projects.length>0&&(t+=` Project: ${r.projects[0]}`),r.priority){let n=e.priorityManager.getPriorityConfig(r.priority);t+=` Priority: ${(n==null?void 0:n.label)||r.priority}`}if(r.status){let n=e.statusManager.getStatusConfig(r.status);t+=` Status: ${(n==null?void 0:n.label)||r.status}`}if(r.timeEstimate){let n=Math.floor(r.timeEstimate/60),a=r.timeEstimate%60;t+=` Estimate: ${n>0?`${n}h `:""}${a}m`}return t}function Tye(r,e){let{isNextScheduledOccurrence:t=!1,isPatternInstance:n=!1,isRecurringInstance:a=!1,isCompleted:s=!1}=e;if(t?(r.style.borderStyle="solid",r.style.borderWidth="2px",r.setAttribute("data-next-scheduled","true"),r.classList.add("fc-next-scheduled-event"),s&&(r.style.opacity="0.6")):n?(r.style.borderStyle="dashed",r.style.borderWidth="2px",r.style.opacity=s?"0.4":"0.7",r.setAttribute("data-pattern-instance","true"),r.classList.add("fc-pattern-instance-event")):a&&(r.style.borderStyle="dashed",r.style.borderWidth="2px",r.setAttribute("data-recurring","true"),r.classList.add("fc-recurring-event"),s&&(r.style.opacity="0.6")),s){let i=r.querySelector(".fc-event-title, .fc-event-title-container");i?i.style.textDecoration="line-through":r.style.textDecoration="line-through",r.classList.add("fc-completed-event")}}async function t5e(r,e,t,n){try{if(!r.recurrence||typeof r.recurrence!="string")throw new Error("Task does not have a valid RRULE string");let a=r.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/),s;if(a){let i=a[1],o;if(t)o=i.slice(0,8);else{let l=i.slice(0,8),c=String(e.getHours()).padStart(2,"0"),d=String(e.getMinutes()).padStart(2,"0");o=`${l}T${c}${d}00Z`}s=r.recurrence.replace(/DTSTART:[^;]+/,`DTSTART:${o}`),new Mn.Notice("Updated recurring pattern time. All future instances now appear at this time.")}else{let i=BI(r,e,t);if(!i)throw new Error("Failed to add DTSTART to recurrence rule");s=i,new Mn.Notice("Added time information to recurring pattern. All future instances now appear at this time.")}await n.taskService.updateProperty(r,"recurrence",s)}catch(a){throw console.error("Error updating pattern instance time:",a),a}}async function kye(r,e,t){let{isRecurringInstance:n,isNextScheduledOccurrence:a,isPatternInstance:s}=r.event.extendedProps,i=r.event.start,o=r.event.allDay;if(a){let l;o?l=D(i,"yyyy-MM-dd"):l=D(i,"yyyy-MM-dd'T'HH:mm"),await t.taskService.updateProperty(e,"scheduled",l),new Mn.Notice("Rescheduled next occurrence. This does not change the recurrence pattern.")}else if(s)await t5e(e,i,o,t);else if(n){let l=Xe(e.scheduled),c;if(o)c=l,new Mn.Notice("Updated recurring task to all-day. This affects all future instances.");else{let d=D(i,"HH:mm");c=`${l}T${d}`,new Mn.Notice(`Updated recurring task time to ${d}. This affects all future instances.`)}await t.taskService.updateProperty(e,"scheduled",c)}}function vU(r){let e=r.event||r,t=e.extendedProps||{},{isRecurringInstance:n,isNextScheduledOccurrence:a,isPatternInstance:s,instanceDate:i}=t;if((n||a||s)&&i)return nt(i);let o=e.start;if(o){let l=D(o,"yyyy-MM-dd");return nt(l)}return Jt()}function bU(r,e){if(!e)return;let t=Math.ceil(e/1440),n=nt(r),a=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()+t));return me(a)}function r5e(r,e){if(!r.scheduled)return null;let t=Ir(r.scheduled),n=r.scheduled,a;if(t&&r.timeEstimate){let c=Nr(n),d=new Date(c.getTime()+r.timeEstimate*60*1e3);a=D(d,"yyyy-MM-dd'T'HH:mm")}else t||(a=bU(n,r.timeEstimate));let s=e.priorityManager.getPriorityConfig(r.priority),i=(s==null?void 0:s.color)||"var(--color-accent)",o=e.statusManager.isCompletedStatus(r.status),l=fw(i)?Pm(!0):i;return{id:`scheduled-${r.path}`,title:r.title,start:n,end:a,allDay:!t,backgroundColor:"transparent",borderColor:i,textColor:l,editable:!0,extendedProps:{taskInfo:r,eventType:"scheduled",isCompleted:o}}}function n5e(r,e){if(!r.due)return null;let t=Ir(r.due),n=r.due,a;if(t){let d=Nr(n),u=new Date(d.getTime()+1800*1e3);a=D(u,"yyyy-MM-dd'T'HH:mm")}let s=e.priorityManager.getPriorityConfig(r.priority),i=(s==null?void 0:s.color)||"var(--color-orange)",o=Ag(i,.15),l=e.statusManager.isCompletedStatus(r.status),c=fw(i)?Pm(!0):i;return{id:`due-${r.path}`,title:`DUE: ${r.title}`,start:n,end:a,allDay:!t,backgroundColor:o,borderColor:i,textColor:c,editable:!0,extendedProps:{taskInfo:r,eventType:"due",isCompleted:l}}}function a5e(r,e){if(!r.scheduled||!r.due)return null;let t=Nr(r.scheduled),n=Nr(r.due);if(n<=t)return null;let a=new Date(n);a.setDate(a.getDate()+1);let s=e.priorityManager.getPriorityConfig(r.priority),i=(s==null?void 0:s.color)||"var(--color-accent)",o=Ag(i,.2),l=e.statusManager.isCompletedStatus(r.status),c=fw(i)?Pm(!0):i;return{id:`span-${r.path}`,title:r.title,start:D(t,"yyyy-MM-dd"),end:D(a,"yyyy-MM-dd"),allDay:!0,backgroundColor:o,borderColor:i,textColor:c,editable:!0,extendedProps:{taskInfo:r,eventType:"scheduledToDueSpan",isCompleted:l}}}function s5e(r,e){if(!r.timeEntries)return[];let t=e.statusManager.isCompletedStatus(r.status);return r.timeEntries.filter(n=>n.endTime).map((n,a)=>({id:`timeentry-${r.path}-${a}`,title:r.title,start:n.startTime,end:n.endTime,allDay:!1,editable:!0,extendedProps:{taskInfo:r,eventType:"timeEntry",isCompleted:t,timeEntryIndex:a}}))}function gw(r,e){var t;try{let n=r.subscriptionId.startsWith("google-"),a=r.subscriptionId.startsWith("microsoft-"),s,i,o,l;if(n)i=r.color||"#4285F4",s=Ag(i,.2),o=Pm(!0),l="Google Calendar";else if(a)i=r.color||"#0078D4",s=Ag(i,.2),o=Pm(!0),l="Microsoft Calendar";else{let c=(t=e.icsSubscriptionService)==null?void 0:t.getSubscriptions().find(d=>d.id===r.subscriptionId);if(!c||!c.enabled)return null;s=Ag(c.color,.2),i=c.color,o=i,l=c.name}return{id:r.id,title:r.title,start:r.start,end:r.end,allDay:r.allDay,backgroundColor:s,borderColor:i,textColor:o,editable:n||a,extendedProps:{icsEvent:r,eventType:"ics",subscriptionName:l,isGoogleCalendar:n,isMicrosoftCalendar:a}}}catch(n){return console.error("Error creating ICS event:",n),null}}function i5e(r){if(r.recurrence&&typeof r.recurrence=="string"){let e=r.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 n=t.slice(0,2),a=t.slice(2,4);return`${n}:${a}`}}}if(r.scheduled){let e=la(r.scheduled);if(e)return e}return"09:00"}function o5e(r,e,t,n,a){var m,h;let s=Ir(e),i;if(s&&r.timeEstimate){let f=Nr(e),g=new Date(f.getTime()+r.timeEstimate*60*1e3);i=D(g,"yyyy-MM-dd'T'HH:mm")}else s||(i=bU(e,r.timeEstimate));let o=a.priorityManager.getPriorityConfig(r.priority),l=(o==null?void 0:o.color)||"var(--color-accent)",c=((m=r.complete_instances)==null?void 0:m.includes(t))||!1,d=((h=r.skipped_instances)==null?void 0:h.includes(t))||!1,u=fw(l)?Pm(!0):l,p="transparent";return c?p="rgba(0,0,0,0.3)":d&&(p="rgba(128,128,128,0.2)"),{id:`next-scheduled-${r.path}-${t}`,title:r.title,start:e,end:i,allDay:!s,backgroundColor:p,borderColor:l,textColor:u,editable:!0,extendedProps:{taskInfo:r,eventType:"scheduled",isCompleted:c,isSkipped:d,isNextScheduledOccurrence:!0,instanceDate:t,recurringTemplateTime:n}}}function l5e(r,e,t,n,a){var h,f;let s=Ir(e),i;if(s&&r.timeEstimate){let g=Nr(e),y=new Date(g.getTime()+r.timeEstimate*60*1e3);i=D(y,"yyyy-MM-dd'T'HH:mm")}else s||(i=bU(e,r.timeEstimate));let o=a.priorityManager.getPriorityConfig(r.priority),l=(o==null?void 0:o.color)||"var(--color-accent)",c=((h=r.complete_instances)==null?void 0:h.includes(t))||!1,d=((f=r.skipped_instances)==null?void 0:f.includes(t))||!1,u=Ag(l,.5),p=fw(l)?Pm(!0):u,m="transparent";return c?m="rgba(0,0,0,0.2)":d&&(m="rgba(128,128,128,0.15)"),{id:`recurring-${r.path}-${t}`,title:r.title,start:e,end:i,allDay:!s,backgroundColor:m,borderColor:u,textColor:p,editable:!0,extendedProps:{taskInfo:r,eventType:"recurring",isCompleted:c,isSkipped:d,isPatternInstance:!0,instanceDate:t,recurringTemplateTime:n}}}function c5e(r,e,t,n){if(!r.recurrence||!r.scheduled)return[];let a=[],s=Ir(r.scheduled),i=i5e(r),o=Xe(r.scheduled),l=s?la(r.scheduled):null,c=l?`${o}T${l}`:o,d=o5e(r,c,o,l||"09:00",n);d&&a.push(d);let u=t;typeof r.recurrence=="string"&&r.recurrence.includes("FREQ=YEARLY")&&(u=new Date(e.getTime()+800*24*60*60*1e3));let p=gp(r,e,u),m=me(t);for(let h of p){let f=me(h);if(f>m||f===o)continue;let g=s?`${f}T${i}`:f,y=l5e(r,g,f,i,n);y&&a.push(y)}return a}function d5e(r,e,t="#6366f1"){let n=`${e}T${r.startTime}:00`,a=`${e}T${r.endTime}:00`,s=r.color||t,i=r.color||t;return{id:`timeblock-${r.id}`,title:r.title,start:n,end:a,allDay:!1,backgroundColor:s,borderColor:i,textColor:"var(--text-on-accent)",editable:!0,extendedProps:{eventType:"timeblock",timeblock:r,originalDate:e}}}function u5e(r,e){if(!(r!=null&&r.timeblocks)||!Array.isArray(r.timeblocks))return[];let t=[];for(let n of r.timeblocks)n&&typeof n.id=="string"&&typeof n.startTime=="string"&&typeof n.endTime=="string"&&t.push(n);return t}async function m5e(r,e,t){try{let n=Date.now();(!yU||n-vye>p5e)&&(yU=(0,xl.getAllDailyNotes)(),vye=n);let a=yU,s=[];for(let i=new Date(e);i<=t;i.setUTCDate(i.getUTCDate()+1)){let o=me(i),l=new Date(`${o}T12:00:00`),c=window.moment(l),d=(0,xl.getDailyNote)(c,a);if(d){let u=r.app.metadataCache.getFileCache(d);if(u!=null&&u.frontmatter){let p=u5e(u.frontmatter,d.path);for(let m of p)s.push(d5e(m,o,r.settings.calendarViewSettings.defaultTimeblockColor))}}}return s}catch(n){return console.error("Error getting timeblock events:",n),[]}}function Mg(r,e,t,n){if(!e||!t)return!0;try{let s=Nr(r).getTime();if(isNaN(s))return!0;let i=s;return n&&(i=s+n*60*1e3),s=e.getTime()}catch(a){return!0}}async function wye(r,e,t={}){let{showScheduled:n=!0,showDue:a=!0,showScheduledToDueSpan:s=!1,showTimeEntries:i=!0,showRecurring:o=!0,showICSEvents:l=!0,showTimeblocks:c=!1,visibleStart:d,visibleEnd:u}=t,p=[];for(let m of r)try{if(m.recurrence){if(!m.scheduled)continue;if(o&&d&&u){let h=c5e(m,d,u,e);p.push(...h)}}else{let h=!1;if(s&&m.scheduled&&m.due){let f=a5e(m,e);f&&(Mg(m.scheduled,d,u)||Mg(m.due,d,u))&&(p.push(f),h=!0)}if(!h){if(n&&m.scheduled&&Mg(m.scheduled,d,u,m.timeEstimate)){let f=r5e(m,e);f&&p.push(f)}if(a&&m.due&&Mg(m.due,d,u)){let f=n5e(m,e);f&&p.push(f)}}}if(i&&m.timeEntries){let h=s5e(m,e);for(let f of h)Mg(f.start,d,u)&&p.push(f)}}catch(h){console.warn(`[TaskNotes][Calendar] Error processing task "${m.title}" (${m.path}):`,h)}if(l&&e.icsSubscriptionService){let m=e.icsSubscriptionService.getAllEvents();for(let h of m)if(Mg(h.start,d,u)){let f=gw(h,e);f&&p.push(f)}}if(c&&d&&u){let m=await m5e(e,d,u);p.push(...m)}return p}async function Sye(r,e,t,n){if(t){new Mn.Notice("Timeblocks must have specific times. Please select a time range in week or day view.");return}let a=D(r,"yyyy-MM-dd"),s=D(r,"HH:mm"),i=D(e,"HH:mm");new lP(n.app,n,{date:a,startTime:s,endTime:i}).open()}async function Eye(r,e,t,n){if(t){new Mn.Notice(n.i18n.translate("modals.timeEntry.mustHaveSpecificTime"));return}try{let s=(await n.cacheManager.getAllTasks()).filter(i=>!i.archived);if(s.length===0){new Mn.Notice(n.i18n.translate("modals.timeEntry.noTasksAvailable"));return}Zn(n,s,async i=>{if(i)try{let o=Math.round((e.getTime()-r.getTime())/6e4),l={startTime:r.toISOString(),endTime:e.toISOString(),description:""},c=[...i.timeEntries||[],l].map(d=>{let u={...d};return delete u.duration,u});await n.taskService.updateTask(i,{timeEntries:c}),n.emitter.trigger(ao),new Mn.Notice(n.i18n.translate("modals.timeEntry.created",{taskTitle:i.title,duration:o.toString()}))}catch(o){console.error("Error creating time entry:",o),new Mn.Notice(n.i18n.translate("modals.timeEntry.createFailed"))}})}catch(a){console.error("Error opening task selector for time entry:",a),new Mn.Notice(n.i18n.translate("modals.timeEntry.createFailed"))}}async function xye(r,e,t,n){try{let a=r.event.start,s=r.event.end,i=D(a,"yyyy-MM-dd"),o=D(a,"HH:mm"),l=D(s,"HH:mm");await px(n.app,e.id,t,i,o,l),new Mn.Notice("Timeblock moved successfully")}catch(a){console.error("Error moving timeblock:",a),new Mn.Notice(`Failed to move timeblock: ${a.message}`),r.revert()}}async function Dye(r,e,t,n){try{let a=r.event.start,s=r.event.end;if(!a||!s){r.revert();return}let i=D(a,"HH:mm"),o=D(s,"HH:mm");await px(n.app,e.id,t,t,i,o),new Mn.Notice("Timeblock duration updated")}catch(a){console.error("Error resizing timeblock:",a),new Mn.Notice(`Failed to resize timeblock: ${a.message}`),r.revert()}}async function dP(r,e,t,n,a){new cP(n.app,n,r,e,t,a).open()}function Cye(r,e){r.setAttribute("data-timeblock-id",e.id||""),r.style.borderStyle="solid",r.style.borderWidth="2px",r.classList.add("fc-timeblock-event")}function Pye(r){var t;let e=((t=r.attachments)==null?void 0:t.length)||0;return`${r.title||"Timeblock"}${r.description?` - ${r.description}`:""}${e>0?` (${e} attachment${e>1?"s":""})`:""}`}function _ye(r,e,t,n="tasknotes-calendar"){r.addEventListener("mouseover",a=>{t.app.vault.getAbstractFileByPath(e.path)&&t.app.workspace.trigger("hover-link",{event:a,source:n,hoverParent:r,targetEl:r,linktext:e.path,sourcePath:e.path})})}async function Mye(r,e){try{if(!(0,xl.appHasDailyNotesPluginLoaded)()){new Mn.Notice("Daily Notes core plugin is not enabled. Please enable it in Settings > Core plugins.");return}let t=window.moment(r),n=(0,xl.getAllDailyNotes)(),a=(0,xl.getDailyNote)(t,n);if(!a)try{a=await(0,xl.createDailyNote)(t)}catch(s){let i=s instanceof Error?s.message:String(s);console.error("Failed to create daily note:",s),new Mn.Notice(`Failed to create daily note: ${i}`);return}a&&await e.app.workspace.getLeaf(!1).openFile(a)}catch(t){let n=t instanceof Error?t.message:String(t);console.error("Failed to navigate to daily note:",t),new Mn.Notice(`Failed to navigate to daily note: ${n}`)}}function Aye(r,e,t,n){let a=t?D(r,"yyyy-MM-dd"):D(r,"yyyy-MM-dd'T'HH:mm"),s=Math.round((e.getTime()-r.getTime())/(1e3*60)),i=!t&&s>n,o={scheduled:a};if(t){let c=Math.round((e.getTime()-r.getTime())/864e5);c>1&&(o.timeEstimate=c*1440)}else i&&(o.timeEstimate=s);return o}var Mn,xl,yU,vye,p5e,TU=b(()=>{Qr();Fs();kt();Fn();Mn=require("obsidian"),xl=We(Vl());gye();Dd();yye();yU=null,vye=0,p5e=5e3});var si,uP,Iye=b(()=>{si=require("obsidian");Qr();uP=class extends si.Modal{constructor(t,n,a){super(t);this.writableCalendars=[];this.keyboardHandler=null;this.plugin=n,this.options=a,this.translate=n.i18n.translate.bind(n.i18n),this.writableCalendars=this.getWritableCalendars()}getWritableCalendars(){let t=[],n=this.plugin.calendarProviderRegistry;if(!n)return t;for(let a of n.getAllProviders())for(let s of a.getAvailableCalendars())t.push({provider:a,calendar:s});return t}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("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 si.Setting(t).setName(this.translate("modals.calendarEventCreation.heading")).setHeading();let n=t.createDiv({cls:"calendar-event-date-display"});n.createEl("strong",{text:this.translate("modals.calendarEventCreation.dateTimeLabel")});let a=this.options.allDay?D(this.options.start,"PPP"):`${D(this.options.start,"PPP p")} \u2013 ${D(this.options.end,"p")}`;n.createSpan({text:a}),new si.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 si.Setting(t).setName(this.translate("modals.calendarEventCreation.calendarLabel")).setDesc(this.translate("modals.calendarEventCreation.calendarDesc")).addDropdown(l=>{this.calendarDropdown=l.selectEl;for(let d=0;dd.calendar.primary);c>=0&&l.setValue(String(c))}),new si.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 si.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 s=t.createDiv({cls:"calendar-event-modal-buttons"});s.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),s.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 n=!!((a=this.titleInput)!=null&&a.value.trim());t.disabled=!n,t.style.opacity=n?"1":"0.5"}async handleSubmit(){var s,i,o,l;let t=this.titleInput.value.trim();if(!t){new si.Notice(this.translate("modals.calendarEventCreation.titleRequired"));return}let n=this.calendarDropdown?parseInt(this.calendarDropdown.value):0,a=this.writableCalendars[n];if(!a){new si.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}},h=(s=this.descriptionInput)==null?void 0:s.value.trim();h&&(m.description=h);let f=(i=this.locationInput)==null?void 0:i.value.trim();f&&(m.location=f),await a.provider.createEvent(a.calendar.id,m),new si.Notice(this.translate("modals.calendarEventCreation.success",{title:t})),(l=(o=this.options).onEventCreated)==null||l.call(o),this.close()}catch(c){console.error("[TaskNotes] Error creating calendar event:",c),new si.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()}}});var pP,ws,mP=b(()=>{pP=require("obsidian"),ws=class{static async execute(e,t={}){let{fallback:n,errorMessage:a="An error occurred",showNotice:s=!0,logError:i=!0}=t;try{return await e()}catch(o){if(i&&console.error(a,o),s){let l=o instanceof Error?o.message:String(o);new pP.Notice(`${a}: ${l}`)}return n}}static async executeWithRetry(e,t={}){let{maxRetries:n=3,retryDelay:a=1e3,errorMessage:s="Operation failed",showNotice:i=!0}=t,o;for(let l=0;l<=n;l++)try{return await e()}catch(c){if(o=c instanceof Error?c:new Error(String(c)),lsetTimeout(d,a));continue}console.error(`${s} after ${n+1} attempts:`,o),i&&new pP.Notice(`${s}: ${o.message}`);return}}static async executeWithValidation(e,t,n={}){let{showNotice:a=!0}=n;for(let s of t)if(!s.condition){a&&new pP.Notice(s.message);return}return this.execute(e,n)}}});var qc,Ig,kU=b(()=>{qc=require("obsidian");Qr();mP();Ig=class extends qc.Modal{constructor(t,n,a){super(t);this.title="";this.folder="";this.template="";this.useTemplate=!1;this.keyboardHandler=null;this.plugin=n,this.options=a,this.translate=n.i18n.translate.bind(n.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 qc.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 qc.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 s=t.createDiv("modal-button-container"),i=s.createEl("button",{text:this.translate("modals.icsNoteCreation.createButton"),cls:"mod-cta"});i.onclick=l=>{l.preventDefault(),l.stopPropagation(),console.log("Create button clicked"),this.handleCreate()};let o=s.createEl("button",{text:this.translate("common.cancel")});o.onclick=l=>{l.preventDefault(),l.stopPropagation(),console.log("Cancel button clicked"),this.close()},setTimeout(()=>{var l;return(l=this.titleInput)==null?void 0:l.focus()},100)}createEventPreview(t){let{icsEvent:n,subscriptionName:a}=this.options;t.createEl("h3",{text:n.title});let s=t.createDiv("event-details");if(n.start){let o=n.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(n.start)?n.start+"T00:00:00":n.start,l=new Date(o),c=s.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.startLabel")}),c.appendText(D(l,"PPPp"))}if(n.end&&!n.allDay){let o=/^\d{4}-\d{2}-\d{2}$/.test(n.end)?n.end+"T00:00:00":n.end,l=new Date(o),c=s.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.endLabel")}),c.appendText(D(l,"PPPp"))}if(n.location){let o=s.createDiv();o.createEl("strong",{text:this.translate("modals.icsNoteCreation.locationLabel")}),o.appendText(n.location)}let i=s.createDiv();i.createEl("strong",{text:this.translate("modals.icsNoteCreation.calendarLabel")}),i.appendText(a)}createTemplateSettings(){this.templateContainer.empty(),new qc.Setting(this.templateContainer).setName(this.translate("modals.icsNoteCreation.useTemplateLabel")).setDesc(this.translate("modals.icsNoteCreation.useTemplateDesc")).addToggle(t=>{t.setValue(this.useTemplate).onChange(n=>{this.useTemplate=n,this.updateTemplateInput(),this.updatePreview()})}),this.useTemplate&&new qc.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(n=>{this.template=n,this.updatePreview()})})}updateDefaultsForContentType(){var t,n;this.folder=((t=this.plugin.settings.icsIntegration)==null?void 0:t.defaultNoteFolder)||"",this.template=((n=this.plugin.settings.icsIntegration)==null?void 0:n.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"),n=t.createDiv();n.createEl("strong",{text:"Type: "}),n.appendText("Note");let a=t.createDiv();a.createEl("strong",{text:"Title: "}),a.appendText(this.title||"Untitled");let s=t.createDiv();if(s.createEl("strong",{text:"Folder: "}),s.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 i=this.previewContainer.createDiv("template-variables");i.createEl("h5",{text:"Available Template Variables"});let o=["{{title}}","{{icsEventTitle}}","{{icsEventStart}}","{{icsEventEnd}}","{{icsEventLocation}}","{{icsEventDescription}}","{{icsEventUrl}}","{{icsEventSubscription}}","{{icsEventId}}","{{date}}","{{time}}"],l=i.createDiv("variables-list");o.forEach(c=>{l.createSpan({text:c,cls:"template-variable"})})}generateDefaultTitle(){let{icsEvent:t}=this.options,n=t.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(t.start)?t.start+"T00:00:00":t.start,a=new Date(n);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 ws.executeWithValidation(async()=>{var a,s;let{icsEvent:t}=this.options,n=await this.plugin.icsNoteService.createNoteFromICS(t,{title:this.title,folder:this.folder||void 0,template:this.useTemplate&&this.template?this.template:void 0});new qc.Notice(`Note created: ${this.title}`),(s=(a=this.options).onContentCreated)==null||s.call(a,n.file,n.noteInfo),this.close()},[{condition:!!this.title.trim(),message:"Title is required"}],{errorMessage:"Failed to create note from ICS event"})}}});var Tr,ou,hP=b(()=>{Tr=require("obsidian");kU();hw();mP();ou=class extends Tr.Modal{constructor(t,n,a,s){super(t);this.relatedNotes=[];this.plugin=n,this.icsEvent=a,this.subscriptionName=s,this.translate=n.i18n.translate.bind(n.i18n)}async onOpen(){await this.renderContent()}async renderContent(){let{contentEl:t}=this;t.empty(),await this.loadRelatedNotes(),new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.calendarEventHeading")).setHeading(),new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.titleLabel")).setDesc(this.icsEvent.title||this.translate("ui.icsCard.untitledEvent")),this.subscriptionName&&new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.calendarLabel")).setDesc(this.subscriptionName);let n=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(n),s=a.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});if(!this.icsEvent.allDay&&(s+=` at ${a.toLocaleTimeString()}`,this.icsEvent.end)){let i=/^\d{4}-\d{2}-\d{2}$/.test(this.icsEvent.end)?this.icsEvent.end+"T00:00:00":this.icsEvent.end,o=new Date(i);s+=` - ${o.toLocaleTimeString()}`}new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.dateTimeLabel")).setDesc(s),this.icsEvent.location&&new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.locationLabel")).setDesc(this.icsEvent.location),this.icsEvent.description&&new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.descriptionLabel")).setDesc(this.icsEvent.description),this.icsEvent.url&&new Tr.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 Tr.Setting(t).setName(this.translate("modals.icsEventInfo.relatedNotesHeading")).setHeading(),this.relatedNotes.length===0?new Tr.Setting(t).setDesc(this.translate("modals.icsEventInfo.noRelatedItems")):this.relatedNotes.forEach(i=>{let l=this.isTaskNote(i)?this.translate("modals.icsEventInfo.typeTask"):this.translate("modals.icsEventInfo.typeNote");new Tr.Setting(t).setName(i.title).setDesc(`Type: ${l}`).addButton(c=>{c.setButtonText("Open").onClick(async()=>{await this.safeOpenFile(i.path),this.close()})})}),new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.actionsHeading")).setHeading(),new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.createFromEventLabel")).setDesc(this.translate("modals.icsEventInfo.createFromEventDesc")).addButton(i=>{i.setButtonText("Create Note").onClick(()=>{console.log("Create Note clicked"),this.openCreationModal()})}).addButton(i=>{i.setButtonText("Create Task").onClick(async()=>{console.log("Create Task clicked"),await this.createTaskDirectly()})}),new Tr.Setting(t).setName(this.translate("modals.icsEventInfo.linkExistingLabel")).setDesc(this.translate("modals.icsEventInfo.linkExistingDesc")).addButton(i=>{i.setButtonText("Link Note").onClick(()=>{console.log("Link Note clicked"),this.linkExistingNote()})}).addButton(i=>{i.setButtonText("Refresh").onClick(()=>{console.log("Refresh clicked"),this.refreshRelatedNotes()})})}async loadRelatedNotes(){let t=await ws.execute(()=>this.plugin.icsNoteService.findRelatedNotes(this.icsEvent),{fallback:[],errorMessage:"Failed to load related notes",showNotice:!1});this.relatedNotes=t||[]}openCreationModal(){console.log("Opening note creation modal");try{new Ig(this.app,this.plugin,{icsEvent:this.icsEvent,subscriptionName:this.subscriptionName||"Unknown Calendar",onContentCreated:async(n,a)=>{new Tr.Notice(this.translate("notices.icsNoteCreatedSuccess")),this.refreshRelatedNotes(),await this.safeOpenFile(n.path)}}).open()}catch(t){console.error("Error opening creation modal:",t),new Tr.Notice(this.translate("notices.icsCreationModalOpenFailed"))}}async linkExistingNote(){await ws.execute(async()=>{su(this.plugin,async t=>{t&&await ws.execute(async()=>{await this.plugin.icsNoteService.linkNoteToICS(t.path,this.icsEvent),new Tr.Notice(this.translate("notices.icsNoteLinkSuccess",{fileName:t.name})),this.refreshRelatedNotes()},{errorMessage:"Failed to link note"})},{placeholder:"Search notes to link...",filter:"markdown"})},{errorMessage:"Failed to open note selection"})}async createTaskDirectly(){await ws.execute(async()=>{let t=await this.plugin.icsNoteService.createTaskFromICS(this.icsEvent);new Tr.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"})}async refreshRelatedNotes(){await ws.execute(async()=>{await this.loadRelatedNotes(),await this.renderContent(),new Tr.Notice(this.translate("notices.icsRelatedItemsRefreshed"))},{errorMessage:"Failed to refresh related notes"})}isTaskNote(t){var a;let n=this.plugin.settings.taskTag;return((a=t.tags)==null?void 0:a.includes(n))||!1}async safeOpenFile(t){try{let n=this.app.vault.getAbstractFileByPath(t);n instanceof Tr.TFile?await this.app.workspace.getLeaf().openFile(n):(new Tr.Notice(this.translate("notices.icsFileNotFound")),console.error("Invalid file path or file not found:",t))}catch(n){console.error("Error opening file:",n),new Tr.Notice(this.translate("notices.icsFileOpenFailed"))}}onClose(){let{contentEl:t}=this;t.empty()}}});var Ua,Ng,wU=b(()=>{Ua=require("obsidian");hP();kU();hw();mP();mc();Ng=class{constructor(e){this.menu=new Bn,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:n}=this.options;this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.showDetails")).setIcon("info").onClick(()=>{new ou(t.app,t,e,n).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 Ua.Notice(this.t("contextMenus.ics.notices.copyTitleSuccess"))}catch(s){new Ua.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 Ua.Notice(this.t("contextMenus.ics.notices.copyLocationSuccess"))}catch(s){new Ua.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 Ua.Notice(this.t("contextMenus.ics.notices.copyUrlSuccess"))}catch(s){new Ua.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyMarkdown")).setIcon("file-text").onClick(async()=>{let s=this.formatEventAsMarkdown();try{await navigator.clipboard.writeText(s),new Ua.Notice(this.t("contextMenus.ics.notices.copyMarkdownSuccess"))}catch(i){new Ua.Notice(this.t("contextMenus.ics.notices.copyFailure"))}}))}async createTaskFromEvent(){await ws.execute(async()=>{let e=await this.options.plugin.icsNoteService.createTaskFromICS(this.options.icsEvent);new Ua.Notice(this.t("contextMenus.ics.notices.taskCreated",{title:e.taskInfo.title}));let t=this.options.plugin.app.vault.getAbstractFileByPath(e.file.path);t instanceof Ua.TFile&&await this.options.plugin.app.workspace.getLeaf().openFile(t),this.options.onUpdate&&this.options.onUpdate()},{errorMessage:this.t("contextMenus.ics.notices.taskCreateFailure")})}createNoteFromEvent(){try{new Ig(this.options.plugin.app,this.options.plugin,{icsEvent:this.options.icsEvent,subscriptionName:this.options.subscriptionName||this.t("contextMenus.ics.subscriptionUnknown"),onContentCreated:async t=>{new Ua.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){console.error("Error opening creation modal:",e),new Ua.Notice(this.t("contextMenus.ics.notices.creationFailure"))}}async linkExistingNote(){await ws.execute(async()=>{su(this.options.plugin,async e=>{e&&await ws.execute(async()=>{await this.options.plugin.icsNoteService.linkNoteToICS(e.path,this.options.icsEvent),new Ua.Notice(this.t("contextMenus.ics.notices.linkSuccess",{name:e.name})),this.options.onUpdate&&this.options.onUpdate()},{errorMessage:this.t("contextMenus.ics.notices.linkFailure")})},{placeholder:"Search notes to link...",filter:"markdown"})},{errorMessage:this.t("contextMenus.ics.notices.linkSelectionFailure")})}formatEventAsMarkdown(){let{icsEvent:e,subscriptionName:t}=this.options,n=[],a=e.title||this.t("contextMenus.ics.markdown.titleFallback");n.push(`## ${a}`),n.push(""),t&&n.push(this.t("contextMenus.ics.markdown.calendar",{value:t}));let s=this.getLocale(),i=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,o=new Date(i),l=new Intl.DateTimeFormat(s,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),c=new Intl.DateTimeFormat(s,{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 n.push(this.t("contextMenus.ics.markdown.date",{value:d})),e.location&&n.push(this.t("contextMenus.ics.markdown.location",{value:e.location})),e.description&&(n.push(""),n.push(this.t("contextMenus.ics.markdown.descriptionHeading")),n.push(e.description)),e.url&&(n.push(""),n.push(this.t("contextMenus.ics.markdown.url",{value:e.url}))),n.join(` `)}show(e){this.menu.showAtMouseEvent(e)}showAtElement(e){this.menu.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4})}}});function h5e(r,e){try{if(!r.start)return"";let t=new Date(r.start);if(r.allDay)return e.i18n.translate("ui.icsCard.allDay");let n=e.settings.calendarViewSettings.timeFormat,a=$h(t,n);if(r.end){let s=new Date(r.end),i=$h(s,n);return`${a} \u2013 ${i}`}return a}catch(t){return""}}function Rye(r,e,t={}){var f;let n=document.createElement("div");n.className="task-card task-card--ics",n.dataset.key=r.id;let a=(f=e.icsSubscriptionService)==null?void 0:f.getSubscriptions().find(g=>g.id===r.subscriptionId),s=r.color||(a==null?void 0:a.color)||"var(--color-accent)",i=(a==null?void 0:a.name)||e.i18n.translate("ui.icsCard.calendarFallback"),o=n.createEl("div",{cls:"task-card__main-row"}),l=o.createEl("span",{cls:"ics-card__icon"}),c=l.createDiv({attr:{"aria-label":e.i18n.translate("ui.icsCard.calendarEvent")}});(0,Nye.setIcon)(c,"calendar");let d=l;d.style.display="inline-flex",d.style.width="16px",d.style.height="16px",d.style.marginRight="8px",d.style.alignItems="center",d.style.justifyContent="center",d.style.flexShrink="0",c.style.width="100%",c.style.height="100%",c.style.color=s;let u=o.createEl("div",{cls:"task-card__content"});u.createEl("div",{cls:"task-card__title",text:r.title||e.i18n.translate("ui.icsCard.untitledEvent")});let p=u.createEl("div",{cls:"task-card__metadata"}),m=[],h=h5e(r,e);return h&&m.push(h),r.location&&m.push(r.location),m.push(i),p.textContent=m.join(" \u2022 "),n.addEventListener("click",()=>{new ou(e.app,e,r,i).open()}),n.addEventListener("contextmenu",g=>{g.preventDefault(),g.stopPropagation(),new Ng({icsEvent:r,plugin:e,subscriptionName:i,onUpdate:()=>{e.app.workspace.trigger("tasknotes:refresh-views")}}).show(g)}),n.style.setProperty("--current-status-color",s),n}var Nye,Oye=b(()=>{Nye=require("obsidian");wU();kt();hP()});function Lye(r,e,t,n={}){var u,p,m,h,f;let a={...f5e,...n},s=document.createElement("div");s.className="task-card task-card--property-event";let i=r.file;if(!i)return s.textContent=e.i18n.translate("ui.propertyEventCard.unknownFile"),s;s.dataset.key=`property-${i.path}`,s.dataset.filePath=i.path;let o=s.createEl("div",{cls:"task-card__main-row"}),l=o.createEl("span",{cls:"property-event-card__icon"}),c=l.createDiv();(0,Fye.setIcon)(c,"file-text"),l.style.display="inline-flex",l.style.width="16px",l.style.height="16px",l.style.marginRight="8px",l.style.alignItems="center",l.style.justifyContent="center",l.style.flexShrink="0",c.style.width="100%",c.style.height="100%",c.style.color="var(--color-accent)";let d=o.createEl("div",{cls:"task-card__content"});if(d.createEl("div",{cls:"task-card__title",text:i.basename||i.name}),a.showProperties&&t){let g=d.createEl("div",{cls:"task-card__metadata"}),y=[];try{let k=((u=t.getOrder)==null?void 0:u.call(t))||[],T=(p=t.getAsPropertyId)==null?void 0:p.call(t,"startDateProperty"),w=(m=t.getAsPropertyId)==null?void 0:m.call(t,"endDateProperty");for(let S of k){if(S===T||S===w)continue;let x=(h=r.getValue)==null?void 0:h.call(r,S);if(x&&x.data!==null&&x.data!==void 0){let C=((f=t.getDisplayName)==null?void 0:f.call(t,S))||S,M=String(x.data);M.length>30&&(M=M.substring(0,27)+"..."),y.push(`${C}: ${M}`)}}}catch(k){console.debug("[TaskNotes][PropertyEventCard] Error reading properties:",k)}y.length>0?g.textContent=y.join(" \u2022 "):g.textContent=i.path}return s.addEventListener("click",g=>{let y=g.ctrlKey||g.metaKey;e.app.workspace.openLinkText(i.path,"",y)}),s.addEventListener("mouseover",g=>{e.app.workspace.trigger("hover-link",{event:g,source:"tasknotes-property-event-card",hoverParent:s,targetEl:s,linktext:i.path,sourcePath:i.path})}),s.style.setProperty("--current-status-color","var(--color-accent)"),s}var Fye,f5e,$ye=b(()=>{Fye=require("obsidian"),f5e={showProperties:!0}});function zye(r,e,t={}){let n={...g5e,...t},a=document.createElement("div");a.className="task-card task-card--timeblock",a.dataset.key=`timeblock-${r.id}`;let s=a.createEl("div",{cls:"task-card__main-row"}),i=s.createEl("span",{cls:"timeblock-card__icon"}),o=i.createDiv();(0,jye.setIcon)(o,"clock"),i.style.display="inline-flex",i.style.width="16px",i.style.height="16px",i.style.marginRight="8px",i.style.alignItems="center",i.style.justifyContent="center",i.style.flexShrink="0",o.style.width="100%",o.style.height="100%",o.style.color=r.color||"var(--color-accent)";let l=s.createEl("div",{cls:"task-card__content"}),c=r.title||"Timeblock",d=`${r.startTime} - ${r.endTime}`;l.createEl("div",{cls:"task-card__title",text:c});let u=l.createEl("div",{cls:"task-card__metadata"});if(u.textContent=d,n.showDescription&&r.description){let p=l.createEl("div",{cls:"task-card__description",text:r.description});p.style.fontSize="var(--tn-font-size-sm)",p.style.color="var(--tn-text-muted)",p.style.marginTop="4px"}if(n.showAttachments&&r.attachments&&r.attachments.length>0){let p=l.createEl("div",{cls:"timeblock-card__attachments"});p.style.fontSize="var(--tn-font-size-sm)",p.style.color="var(--tn-text-muted)",p.style.marginTop="4px";let m=r.attachments.length===1?"1 attachment":`${r.attachments.length} attachments`;p.textContent=`\u{1F4CE} ${m}`}return a.addEventListener("click",p=>{n.eventDate&&n.originalDate&&dP(r,n.eventDate,n.originalDate,e)}),r.color?a.style.setProperty("--current-status-color",r.color):a.style.setProperty("--current-status-color","var(--color-accent)"),a}var jye,g5e,Bye=b(()=>{jye=require("obsidian");TU();g5e={showDescription:!0,showAttachments:!0}});function fP(r){if(typeof r=="string"){let e=r.trim();if(!e)return null;if(Ir(e)){let t=Nr(e);return isNaN(t.getTime())?null:{value:D(t,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}}try{let t=nt(e);return{value:me(t),isAllDay:!0}}catch(t){return null}}if(typeof r=="number"){let e=new Date(r);return isNaN(e.getTime())?null:{value:me(e),isAllDay:!0}}return r instanceof Date?isNaN(r.getTime())?null:r.getHours()!==0||r.getMinutes()!==0||r.getSeconds()!==0||r.getMilliseconds()!==0?{value:D(r,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}:{value:me(r),isAllDay:!0}:null}function qye(r){return function(e,t){if(!t)throw console.error("[TaskNotes][CalendarView] No containerEl provided"),new Error("CalendarView requires a containerEl");return new SU(e,t,r)}}var Va,SU,Hye=b(()=>{ow();K0();um();eye();cye();mye();uL();fye();TU();eO();kD();Iye();hP();Va=require("obsidian");Qr();Kn();Oye();$ye();Bye();QR();wU();kt();SU=class extends El{constructor(t,n,a){super(t,n,a);this.type="tasknotesCalendar";this.calendar=null;this.calendarEl=null;this.currentTasks=[];this.basesEntryByPath=new Map;this._isRendering=!1;this._pendingRender=!1;this._expectingImmediateUpdate=!1;this._isFirstDataUpdate=!0;this._previousConfigSnapshot=null;this._saveViewTypeTimer=null;this._configChangedNeedsRecreate=!1;this.icsCalendarToggles=new Map;this.googleCalendarToggles=new Map;this.microsoftCalendarToggles=new Map;this.configLoaded=!1;this.dataAdapter.basesView=this;let s=this.plugin.settings.calendarViewSettings;this.viewOptions={showScheduled:s.defaultShowScheduled,showDue:s.defaultShowDue,showScheduledToDueSpan:s.defaultShowScheduledToDueSpan,showRecurring:s.defaultShowRecurring,showTimeEntries:s.defaultShowTimeEntries,showTimeblocks:s.defaultShowTimeblocks,showPropertyBasedEvents:!0,initialDate:"",initialDateProperty:null,initialDateStrategy:"first",calendarView:s.defaultView,customDayCount:s.customDayCount,listDayCount:7,slotMinTime:this.validateTimeValue(s.slotMinTime,"00:00:00",!1),slotMaxTime:this.validateTimeValue(s.slotMaxTime,"24:00:00",!0),slotDuration:this.validateTimeValue(s.slotDuration,"00:30:00",!1),scrollTime:this.validateTimeValue(s.scrollTime,"08:00:00",!1),firstDay:s.firstDay,weekNumbers:s.weekNumbers,nowIndicator:s.nowIndicator,showWeekends:s.showWeekends,showAllDaySlot:!0,showTodayHighlight:s.showTodayHighlight,selectMirror:s.selectMirror,timeFormat:s.timeFormat,eventMinHeight:s.eventMinHeight,slotEventOverlap:s.slotEventOverlap,eventMaxStack:s.eventMaxStack,dayMaxEvents:s.dayMaxEvents,dayMaxEventRows:s.dayMaxEventRows,locale:s.locale,startDateProperty:null,endDateProperty:null,titleProperty:null}}onload(){this.readViewOptions(),this._previousConfigSnapshot=this.getConfigSnapshot(),super.onload()}onResize(){this.calendar&&this.calendar.updateSize()}onDataUpdated(){var n;if(!((n=this.rootElement)!=null&&n.isConnected))return;if(this.dataUpdateDebounceTimer&&(clearTimeout(this.dataUpdateDebounceTimer),this.dataUpdateDebounceTimer=null),this._isFirstDataUpdate){this._isFirstDataUpdate=!1,this.render();return}if(this._expectingImmediateUpdate){this._expectingImmediateUpdate=!1,this.render();return}if(this.hasConfigChanged()){this._configChangedNeedsRecreate=!0,this.render();return}let t=this.containerEl.ownerDocument.defaultView||window;this.dataUpdateDebounceTimer=t.setTimeout(()=>{this.dataUpdateDebounceTimer=null,this.render()},5e3)}expectImmediateUpdate(){this._expectingImmediateUpdate=!0,setTimeout(()=>{this._expectingImmediateUpdate=!1},2e3)}getConfigSnapshot(){if(!this.config||typeof this.config.get!="function")return"";let t=[this.config.get("showScheduled"),this.config.get("showDue"),this.config.get("showScheduledToDueSpan"),this.config.get("showRecurring"),this.config.get("showTimeEntries"),this.config.get("showTimeblocks"),this.config.get("showPropertyBasedEvents"),this.config.get("calendarView"),this.config.get("customDayCount"),this.config.get("listDayCount"),this.config.get("slotMinTime"),this.config.get("slotMaxTime"),this.config.get("slotDuration"),this.config.get("firstDay"),this.config.get("weekNumbers"),this.config.get("nowIndicator"),this.config.get("showWeekends"),this.config.get("showAllDaySlot"),this.config.get("showTodayHighlight"),this.config.get("selectMirror"),this.config.get("timeFormat"),this.config.get("scrollTime"),this.config.get("eventMinHeight"),this.config.get("slotEventOverlap"),this.config.get("eventMaxStack"),this.config.get("dayMaxEvents"),this.config.get("dayMaxEventRows"),this.config.get("startDateProperty"),this.config.get("endDateProperty"),this.config.get("titleProperty"),this.config.get("initialDate"),this.config.get("initialDateProperty"),this.config.get("initialDateStrategy")];if(this.plugin.icsSubscriptionService)for(let n of this.plugin.icsSubscriptionService.getSubscriptions())t.push(this.config.get(`showICS_${n.id}`));if(this.plugin.googleCalendarService)for(let n of this.plugin.googleCalendarService.getAvailableCalendars())t.push(this.config.get(`showGoogleCalendar_${n.id}`));if(this.plugin.microsoftCalendarService)for(let n of this.plugin.microsoftCalendarService.getAvailableCalendars())t.push(this.config.get(`showMicrosoftCalendar_${n.id}`));return JSON.stringify(t)}hasConfigChanged(){let t=this.getConfigSnapshot();return this._previousConfigSnapshot===null?(this._previousConfigSnapshot=t,!1):t!==this._previousConfigSnapshot?(this._previousConfigSnapshot=t,!0):!1}validateTimeValue(t,n,a=!1){if(!t)return n;if(/^\d{2}:\d{2}:\d{2}$/.test(t)){let[s,i]=t.split(":").map(Number),o=a?24:23;return s<0||s>o||i<0||i>59?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${t}, using default: ${n}`),n):s===24&&i!==0?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${t}, using default: ${n}`),n):t}if(/^\d{2}:\d{2}$/.test(t)){let[s,i]=t.split(":").map(Number),o=a?24:23;return s<0||s>o||i<0||i>59?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${t}, using default: ${n}`),n):s===24&&i!==0?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${t}, using default: ${n}`),n):`${t}:00`}return console.warn(`[TaskNotes][CalendarView] Invalid time format: ${t}, using default: ${n}`),n}readEventToggles(){var t,n,a,s,i,o,l,c,d,u;if(!(!this.config||typeof this.config.get!="function"))try{if(this.viewOptions.showScheduled=(t=this.config.get("showScheduled"))!=null?t:this.viewOptions.showScheduled,this.viewOptions.showDue=(n=this.config.get("showDue"))!=null?n:this.viewOptions.showDue,this.viewOptions.showScheduledToDueSpan=(a=this.config.get("showScheduledToDueSpan"))!=null?a:this.viewOptions.showScheduledToDueSpan,this.viewOptions.showRecurring=(s=this.config.get("showRecurring"))!=null?s:this.viewOptions.showRecurring,this.viewOptions.showTimeEntries=(i=this.config.get("showTimeEntries"))!=null?i:this.viewOptions.showTimeEntries,this.viewOptions.showTimeblocks=(o=this.config.get("showTimeblocks"))!=null?o:this.viewOptions.showTimeblocks,this.viewOptions.showPropertyBasedEvents=(l=this.config.get("showPropertyBasedEvents"))!=null?l:this.viewOptions.showPropertyBasedEvents,this.plugin.icsSubscriptionService){let p=this.plugin.icsSubscriptionService.getSubscriptions();for(let m of p){let h=`showICS_${m.id}`;this.icsCalendarToggles.set(m.id,(c=this.config.get(h))!=null?c:!0)}}if(this.plugin.googleCalendarService){let p=this.plugin.googleCalendarService.getAvailableCalendars();for(let m of p){let h=`showGoogleCalendar_${m.id}`;this.googleCalendarToggles.set(m.id,(d=this.config.get(h))!=null?d:!0)}}if(this.plugin.microsoftCalendarService){let p=this.plugin.microsoftCalendarService.getAvailableCalendars();for(let m of p){let h=`showMicrosoftCalendar_${m.id}`;this.microsoftCalendarToggles.set(m.id,(u=this.config.get(h))!=null?u:!0)}}}catch(p){console.error("[TaskNotes][CalendarView] Error reading event toggles:",p)}}readViewOptions(){var t,n,a,s,i,o,l,c,d,u,p,m,h,f,g,y,k,T,w;if(!(!this.config||typeof this.config.get!="function"))try{this.readEventToggles(),this.viewOptions.initialDate=(t=this.config.get("initialDate"))!=null?t:this.viewOptions.initialDate,this.viewOptions.initialDateProperty=(n=this.config.get("initialDateProperty"))!=null?n:this.viewOptions.initialDateProperty,this.viewOptions.initialDateStrategy=(a=this.config.get("initialDateStrategy"))!=null?a:this.viewOptions.initialDateStrategy,this.viewOptions.calendarView=(s=this.config.get("calendarView"))!=null?s:this.viewOptions.calendarView,this.viewOptions.customDayCount=(i=this.config.get("customDayCount"))!=null?i:this.viewOptions.customDayCount,this.viewOptions.listDayCount=(o=this.config.get("listDayCount"))!=null?o:this.viewOptions.listDayCount,this.viewOptions.slotMinTime=this.validateTimeValue(this.config.get("slotMinTime"),this.viewOptions.slotMinTime,!1),this.viewOptions.slotMaxTime=this.validateTimeValue(this.config.get("slotMaxTime"),this.viewOptions.slotMaxTime,!0),this.viewOptions.slotDuration=this.validateTimeValue(this.config.get("slotDuration"),this.viewOptions.slotDuration,!1),this.viewOptions.scrollTime=this.validateTimeValue(this.config.get("scrollTime"),this.viewOptions.scrollTime,!1),this.viewOptions.firstDay=Number((l=this.config.get("firstDay"))!=null?l:this.viewOptions.firstDay),this.viewOptions.weekNumbers=(c=this.config.get("weekNumbers"))!=null?c:this.viewOptions.weekNumbers,this.viewOptions.nowIndicator=(d=this.config.get("nowIndicator"))!=null?d:this.viewOptions.nowIndicator,this.viewOptions.showWeekends=(u=this.config.get("showWeekends"))!=null?u:this.viewOptions.showWeekends,this.viewOptions.showAllDaySlot=(p=this.config.get("showAllDaySlot"))!=null?p:this.viewOptions.showAllDaySlot,this.viewOptions.showTodayHighlight=(m=this.config.get("showTodayHighlight"))!=null?m:this.viewOptions.showTodayHighlight,this.viewOptions.selectMirror=(h=this.config.get("selectMirror"))!=null?h:this.viewOptions.selectMirror,this.viewOptions.timeFormat=(f=this.config.get("timeFormat"))!=null?f:this.viewOptions.timeFormat,this.viewOptions.eventMinHeight=(g=this.config.get("eventMinHeight"))!=null?g:this.viewOptions.eventMinHeight,this.viewOptions.slotEventOverlap=(y=this.config.get("slotEventOverlap"))!=null?y:this.viewOptions.slotEventOverlap;let S=this.config.get("eventMaxStack");S!==void 0&&(this.viewOptions.eventMaxStack=S===0?null:S);let x=this.config.get("dayMaxEvents");x!==void 0&&(this.viewOptions.dayMaxEvents=x===0?!0:x);let C=this.config.get("dayMaxEventRows");C!==void 0&&(this.viewOptions.dayMaxEventRows=C===0?!1:C),this.viewOptions.startDateProperty=(k=this.config.get("startDateProperty"))!=null?k:this.viewOptions.startDateProperty,this.viewOptions.endDateProperty=(T=this.config.get("endDateProperty"))!=null?T:this.viewOptions.endDateProperty,this.viewOptions.titleProperty=(w=this.config.get("titleProperty"))!=null?w:this.viewOptions.titleProperty;let M=this.config.get("enableSearch");this.enableSearch=M!=null?M:!1,this.configLoaded=!0,this.calendar&&this.applyTodayHighlightStyling()}catch(S){console.error("[TaskNotes][CalendarView] Error reading view options:",S)}}async render(){var t,n,a;if(this._isRendering){this._pendingRender=!0;return}if(this._isRendering=!0,this._pendingRender=!1,!this.calendarEl||!this.rootElement){this._isRendering=!1;return}if(!((t=this.data)!=null&&t.data)){this._isRendering=!1;return}!this.configLoaded&&this.config?this.readViewOptions():this.config&&(this._configChangedNeedsRecreate?(this._configChangedNeedsRecreate=!1,this.readViewOptions(),this.calendar&&(this.calendar.destroy(),this.calendar=null)):this.readEventToggles()),this.rootElement&&this.setupSearch(this.rootElement);try{let s=this.dataAdapter.extractDataItems(),i=await Cm(s,this.plugin),o=this.applySearchFilter(i);if(this.currentTasks=o,this.basesEntryByPath.clear(),(n=this.data)!=null&&n.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(i):await this.initializeCalendar(i)}catch(s){console.error("[TaskNotes][CalendarView] Error rendering:",s),this.renderError(s)}finally{this._isRendering=!1}this._pendingRender&&(this._pendingRender=!1,setTimeout(()=>this.render(),0))}async initializeCalendar(t){var s;if(!this.calendarEl)return;let n=this.determineInitialDate(t),a={plugins:[Xge,lye,pye,iie,hye],initialView:this.viewOptions.calendarView,initialDate:n,headerToolbar:{left:"prev,next today refreshCalendars",center:"title",right:"multiMonthYear,dayGridMonth,timeGridWeek,timeGridCustom,timeGridDay,listWeekButton"},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:{listWeekButton:{text:this.plugin.i18n.translate("views.basesCalendar.buttonText.list"),hint:this.plugin.i18n.translate("views.basesCalendar.hints.list")||"List view",click:()=>{var i;this.calendar&&((i=this.calendar.view)==null?void 0:i.type)!=="listWeek"&&this.calendar.changeView("listWeek")}},refreshCalendars:{text:this.plugin.i18n.translate("views.basesCalendar.buttonText.refresh")||"Refresh",hint:this.plugin.i18n.translate("views.basesCalendar.hints.refresh")||"Refresh calendar subscriptions",click:async()=>{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(),this.calendar&&this.calendar.refetchEvents()}catch(i){console.error("[TaskNotes][CalendarView] Error refreshing calendars:",i)}}}},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.listDays",{count:this.viewOptions.listDayCount.toString()})||`${this.viewOptions.listDayCount}d List`}},height:"100%",expandRows:!0,handleWindowResize:!0,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,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:i=>Mye(i,this.plugin),editable:!0,selectable:!0,selectMirror:this.viewOptions.selectMirror,eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:this.viewOptions.timeFormat==="12"},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,events:(i,o,l)=>{this.fetchEvents(i,o,l)},eventDidMount:i=>this.handleEventDidMount(i),eventClick:i=>this.handleEventClick(i),eventDrop:i=>this.handleEventDrop(i),eventResize:i=>this.handleEventResize(i),select:i=>this.handleDateSelect(i),viewDidMount:i=>{let o=i.view.type;o&&o!==this.viewOptions.calendarView&&(this.viewOptions.calendarView=o,this.debouncedSaveViewType(o))}};this.calendar=new MC(this.calendarEl,a),this.calendar.render(),this.applyTodayHighlightStyling()}applyTodayHighlightStyling(){this.calendarEl&&(this.viewOptions.showTodayHighlight?this.calendarEl.classList.remove("hide-today-highlight"):this.calendarEl.classList.add("hide-today-highlight"))}debouncedSaveViewType(t){this._saveViewTypeTimer&&clearTimeout(this._saveViewTypeTimer),this._saveViewTypeTimer=setTimeout(()=>{this._saveViewTypeTimer=null;try{this.config&&typeof this.config.set=="function"&&(this.config.set("calendarView",t),console.debug("[TaskNotes][CalendarView] View type saved to config:",t))}catch(n){console.error("[TaskNotes][CalendarView] Failed to save view type:",n)}},1e3)}determineInitialDate(t){var n;if(this.viewOptions.initialDate){let a=fP(this.viewOptions.initialDate);return(n=a==null?void 0:a.value)!=null?n:this.viewOptions.initialDate}if(this.viewOptions.initialDateProperty){let a=this.viewOptions.initialDateProperty,s=this.propertyMapper.basesToInternal(a),i=[];for(let o of t){let l=o[s],c=fP(l);if(!c)continue;let d=c.isAllDay?nt(c.value):new Date(c.value);isNaN(d.getTime())||i.push({compare:d,value:c.value})}if(i.length>0)return this.viewOptions.initialDateStrategy==="earliest"?i.reduce((l,c)=>c.compare.getTime()c.compare.getTime()>l.compare.getTime()?c:l).value:i[0].value}}async fetchEvents(t,n,a){try{let s=await this.buildAllEvents(t);n(s)}catch(s){console.error("[TaskNotes][CalendarView] Error fetching events:",s),a(s)}}async buildAllEvents(t){let n=[],a={showScheduled:this.viewOptions.showScheduled,showDue:this.viewOptions.showDue,showScheduledToDueSpan:this.viewOptions.showScheduledToDueSpan,showRecurring:this.viewOptions.showRecurring,showTimeEntries:this.viewOptions.showTimeEntries,showTimeblocks:this.viewOptions.showTimeblocks,showICSEvents:!1,visibleStart:t.start,visibleEnd:t.end},s=await wye(this.currentTasks,this.plugin,a);if(n.push(...s),this.viewOptions.showPropertyBasedEvents&&this.viewOptions.startDateProperty){let i=await this.buildPropertyBasedEvents();n.push(...i)}if(this.plugin.icsSubscriptionService){let i=await this.buildICSEvents();n.push(...i)}if(this.plugin.googleCalendarService){let i=await this.buildGoogleCalendarEvents();n.push(...i)}if(this.plugin.microsoftCalendarService){let i=await this.buildMicrosoftCalendarEvents();n.push(...i)}return n}async buildPropertyBasedEvents(){var n;if(!((n=this.data)!=null&&n.data))return[];if(!this.viewOptions.startDateProperty)return[];let t=[];for(let a of this.data.data)try{let s=a.file;if(!s)continue;let i=this.dataAdapter.getPropertyValue(a,this.viewOptions.startDateProperty),o=fP(i);if(!o)continue;let l=typeof o.value=="string"?o.value:D(o.value,"yyyy-MM-dd'T'HH:mm"),c,d=o.isAllDay;if(this.viewOptions.endDateProperty){let m=this.dataAdapter.getPropertyValue(a,this.viewOptions.endDateProperty),h=fP(m);h&&(c=typeof h.value=="string"?h.value:D(h.value,"yyyy-MM-dd'T'HH:mm"),d=h.isAllDay)}let u;if(this.viewOptions.titleProperty){let m=this.dataAdapter.getPropertyValue(a,this.viewOptions.titleProperty);m&&typeof m=="string"&&m.trim()&&(u=m.trim())}let p=o.isAllDay&&(c?d:!0);t.push({id:`property-${s.path}`,title:u||s.basename||s.name,start:l,end:c,allDay:p,backgroundColor:"var(--color-accent)",borderColor:"var(--color-accent)",textColor:"var(--text-on-accent)",editable:!0,extendedProps:{eventType:"property-based",filePath:s.path,file:s,basesEntry:a}})}catch(s){console.warn("[TaskNotes][CalendarView] Error processing property-based entry:",s)}return t}async buildICSEvents(){if(!this.plugin.icsSubscriptionService)return[];let t=[],n=this.plugin.icsSubscriptionService.getAllEvents();for(let a of n){if(this.icsCalendarToggles.get(a.subscriptionId)===!1)continue;let s=gw(a,this.plugin);s&&t.push(s)}return t}async buildGoogleCalendarEvents(){if(!this.plugin.googleCalendarService)return[];let t=[],n=this.plugin.googleCalendarService.getAllEvents();for(let a of n){let s=a.subscriptionId.replace("google-","");if(this.googleCalendarToggles.get(s)===!1)continue;let i=gw(a,this.plugin);i&&t.push(i)}return t}async buildMicrosoftCalendarEvents(){if(!this.plugin.microsoftCalendarService)return[];let t=[],n=this.plugin.microsoftCalendarService.getAllEvents();for(let a of n){let s=a.subscriptionId.replace("microsoft-","");if(this.microsoftCalendarToggles.get(s)===!1)continue;let i=gw(a,this.plugin);i&&t.push(i)}return t}async updateCalendarEvents(t){this.calendar&&this.calendar.refetchEvents()}async refreshCalendarWithFreshData(){if(this.calendar)try{let t=[];for(let n of this.currentTasks){let a=this.plugin.cacheManager.getCachedTaskInfoSync(n.path);a&&(a.basesData=n.basesData,t.push(a))}this.currentTasks=t,this.calendar.refetchEvents()}catch(t){console.error("[TaskNotes][CalendarView] Error refreshing calendar:",t)}}async handleEventClick(t){let{taskInfo:n,timeblock:a,eventType:s,filePath:i,icsEvent:o,subscriptionName:l}=t.event.extendedProps||{},c=t.jsEvent;if(s==="timeblock"&&a){let d=D(t.event.start,"yyyy-MM-dd");dP(a,t.event.start,d,this.plugin,()=>this.expectImmediateUpdate());return}if(s==="timeEntry"&&n&&c.button===0){this.plugin.openTimeEntryEditor(n,()=>this.expectImmediateUpdate());return}if(s==="ics"&&o){new ou(this.plugin.app,this.plugin,o,l).open();return}if(s==="property-based"&&i){let d=this.plugin.app.vault.getAbstractFileByPath(i);if(d instanceof Va.TFile){let p=c.ctrlKey||c.metaKey||c.button===1;this.plugin.app.workspace.getLeaf(p).openFile(d)}return}n!=null&&n.path&&c.button===0&&Gre(n,this.plugin,c,t.event.id,()=>this.expectImmediateUpdate())}async handleEventDrop(t){var u,p;if(this.expectImmediateUpdate(),!((u=t==null?void 0:t.event)!=null&&u.extendedProps)){console.warn("[TaskNotes][CalendarView] Event dropped without extendedProps");return}let{taskInfo:n,timeblock:a,eventType:s,isRecurringInstance:i,isNextScheduledOccurrence:o,isPatternInstance:l,filePath:c,icsEvent:d}=t.event.extendedProps;if(s==="timeblock"){let m=D(t.oldEvent.start,"yyyy-MM-dd");await xye(t,a,m,this.plugin);return}if(s==="property-based"&&c){try{let m=this.plugin.app.vault.getAbstractFileByPath(c);if(!m||!(m instanceof Va.TFile)){t.revert();return}let h=this.viewOptions.startDateProperty,f=this.viewOptions.endDateProperty;if(!h){t.revert();return}let g=h.includes(".")?h.split(".").pop():h,y=f&&f.includes(".")?f.split(".").pop():f;if(!g){t.revert();return}let k=t.oldEvent.start,w=t.event.start.getTime()-k.getTime();await this.plugin.app.fileManager.processFrontMatter(m,S=>{let x=S[g];if(x){let C=new Date(x);if(isNaN(C.getTime()))return;let M=new Date(C.getTime()+w);if(isNaN(M.getTime()))return;S[g]=D(M,t.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm")}if(y){let C=S[y];if(C){let M=new Date(C);if(isNaN(M.getTime()))return;let N=new Date(M.getTime()+w);if(isNaN(N.getTime()))return;S[y]=D(N,t.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm")}}})}catch(m){console.error("[TaskNotes][CalendarView] Error updating property-based event:",m),t.revert()}return}if(s==="ics"&&d){let m=(p=this.plugin.calendarProviderRegistry)==null?void 0:p.findProviderForEvent(d);if(m){try{let{calendarId:h,eventId:f}=m.extractEventIds(d),g=t.event.start,y=t.event.allDay,k=t.event.end;k||(k=new Date(g),y?k.setDate(k.getDate()+1):k.setHours(k.getHours()+1));let T={};if(y)T.start={date:D(g,"yyyy-MM-dd")},T.end={date:D(k,"yyyy-MM-dd")};else{let w=Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC";T.start={dateTime:D(g,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:w},T.end={dateTime:D(k,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:w}}await m.updateEvent(h,f,T)}catch(h){console.error(`[TaskNotes][CalendarView] Error updating ${m.providerName} event:`,h),t.revert()}return}else{t.revert();return}}if(s==="timeEntry"){let m=t.event.extendedProps.timeEntryIndex;if(typeof m!="number"){t.revert();return}try{let h=t.event.start,f=t.event.end;if(!h||!f){t.revert();return}let g=t.oldEvent.start,y=h.getTime()-g.getTime(),k=[...n.timeEntries||[]],T=k[m];if(T){let w=new Date(T.startTime);if(!T.endTime){t.revert();return}let S=new Date(T.endTime);T.startTime=new Date(w.getTime()+y).toISOString(),T.endTime=new Date(S.getTime()+y).toISOString(),delete T.duration;let x=k.map(C=>{let M={...C};return delete M.duration,M});await this.plugin.taskService.updateTask(n,{timeEntries:x})}}catch(h){console.error("Error updating time entry:",h),t.revert()}return}if(n&&(i||o||l)){await kye(t,n,this.plugin);return}if(n)try{if(s==="scheduled"||s==="due"){let m=t.event.start,f=t.event.allDay?D(m,"yyyy-MM-dd"):D(m,"yyyy-MM-dd'T'HH:mm"),g=s==="scheduled"?"scheduled":"due";await this.plugin.taskService.updateProperty(n,g,f)}else if(s==="scheduledToDueSpan"){let m=t.oldEvent.start,h=t.event.start;if(!m||!h){t.revert();return}let f=h.getTime()-m.getTime(),g,y;if(n.scheduled){let T=new Date(n.scheduled),w=new Date(T.getTime()+f);g=D(w,"yyyy-MM-dd")}if(n.due){let T=new Date(n.due),w=new Date(T.getTime()+f);y=D(w,"yyyy-MM-dd")}let k=this.plugin.app.vault.getAbstractFileByPath(n.path);if(k instanceof Va.TFile){let T=this.plugin.fieldMapper.toUserField("scheduled"),w=this.plugin.fieldMapper.toUserField("due");await this.plugin.app.fileManager.processFrontMatter(k,S=>{g&&(S[T]=g),y&&(S[w]=y)})}}}catch(m){console.error("[TaskNotes][CalendarView] Error updating task date:",m),t.revert()}}async handleEventResize(t){var c,d;if(this.expectImmediateUpdate(),!((c=t==null?void 0:t.event)!=null&&c.extendedProps)){console.warn("[TaskNotes][CalendarView] Event resized without extendedProps");return}let{taskInfo:n,timeblock:a,eventType:s,filePath:i,timeEntryIndex:o,icsEvent:l}=t.event.extendedProps;if(s==="timeEntry"){if(typeof o!="number"){t.revert();return}try{let u=t.event.start,p=t.event.end;if(!u||!p){t.revert();return}let m=[...n.timeEntries||[]],h=m[o];if(h){h.startTime=u.toISOString(),h.endTime=p.toISOString(),delete h.duration;let f=m.map(g=>{let y={...g};return delete y.duration,y});await this.plugin.taskService.updateTask(n,{timeEntries:f})}}catch(u){console.error("Error resizing time entry:",u),t.revert()}return}if(s==="timeblock"){let u=D(t.event.start,"yyyy-MM-dd");await Dye(t,a,u,this.plugin);return}if(s==="property-based"&&i){try{let u=this.plugin.app.vault.getAbstractFileByPath(i);if(!u||!(u instanceof Va.TFile)){t.revert();return}let p=this.viewOptions.endDateProperty;if(!p){t.revert();return}let m=p.includes(".")?p.split(".").pop():p;if(!m){t.revert();return}let h=t.event.end;if(!h){t.revert();return}await this.plugin.app.fileManager.processFrontMatter(u,f=>{isNaN(h.getTime())||(f[m]=D(h,t.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm"))})}catch(u){console.error("[TaskNotes][CalendarView] Error resizing property-based event:",u),t.revert()}return}if(s==="ics"&&l){let u=(d=this.plugin.calendarProviderRegistry)==null?void 0:d.findProviderForEvent(l);if(u){try{let{calendarId:p,eventId:m}=u.extractEventIds(l),h=t.event.start,f=t.event.end;if(!f){t.revert();return}let g=t.event.allDay,y={};if(g)y.start={date:D(h,"yyyy-MM-dd")},y.end={date:D(f,"yyyy-MM-dd")};else{let k=Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC";y.start={dateTime:D(h,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:k},y.end={dateTime:D(f,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:k}}await u.updateEvent(p,m,y)}catch(p){console.error(`[TaskNotes][CalendarView] Error resizing ${u.providerName} event:`,p),t.revert()}return}}if(s!=="scheduled"&&s!=="recurring"){t.revert();return}try{let u=t.event.start,p=t.event.end;if(u&&p){let m;t.event.allDay?m=Math.round((p.getTime()-u.getTime())/864e5)*1440:m=Math.round((p.getTime()-u.getTime())/(1e3*60)),await this.plugin.taskService.updateProperty(n,"timeEstimate",m)}}catch(u){console.error("[TaskNotes][CalendarView] Error updating task duration:",u),t.revert()}}async handleDateSelect(t){let n=new Va.Menu;n.addItem(s=>{s.setTitle("Create task").setIcon("check-square").onClick(async()=>{let i=this.viewOptions.slotDuration.split(":"),o=parseInt(i[0])*60+parseInt(i[1]||"0"),l=Aye(t.start,t.end,t.allDay,o);new Md(this.plugin.app,this.plugin,{prePopulatedValues:l,onTaskCreated:()=>this.expectImmediateUpdate()}).open()})}),this.plugin.settings.calendarViewSettings.enableTimeblocking&&n.addItem(s=>{s.setTitle("Create timeblock").setIcon("clock").onClick(async()=>{this.expectImmediateUpdate(),await Sye(t.start,t.end,t.allDay,this.plugin)})}),n.addItem(s=>{s.setTitle("Create time entry").setIcon("play").onClick(async()=>{this.expectImmediateUpdate(),await Eye(t.start,t.end,t.allDay,this.plugin)})});let a=this.plugin.calendarProviderRegistry;a&&a.getAllProviders().some(i=>i.getAvailableCalendars().length>0)&&(n.addSeparator(),n.addItem(i=>{i.setTitle("Create external calendar event").setIcon("calendar-plus").onClick(()=>{new uP(this.plugin.app,this.plugin,{start:t.start,end:t.end,allDay:t.allDay,onEventCreated:()=>{this.expectImmediateUpdate(),a.refreshAll()}}).open()})})),n.showAtMouseEvent(t.jsEvent),this.calendar&&this.calendar.unselect()}handleEventDidMount(t){var l,c,d,u,p;if(!((l=t==null?void 0:t.event)!=null&&l.extendedProps))return;let{taskInfo:n,timeblock:a,icsEvent:s,eventType:i,basesEntry:o}=t.event.extendedProps;if(s&&t.view.type!=="listWeek"&&((c=this.plugin.calendarProviderRegistry)==null?void 0:c.findProviderForEvent(s))){let h=t.el.querySelector(".fc-event-title");if(h){let f=t.el.ownerDocument,g=f.createElement("span");g.style.marginRight="4px",g.style.display="inline-flex",g.style.alignItems="center";let y=f.createElement("span");y.style.width="12px",y.style.height="12px",y.style.display="inline-flex",y.style.flexShrink="0",(0,Va.setIcon)(y,"calendar"),g.appendChild(y),h.insertBefore(g,h.firstChild)}}if(t.view.type==="listWeek"){t.el.innerHTML="";let m=null,h=this.getVisibleProperties();if(n&&i!=="ics"&&i!=="property-based"){let f={...n},g=this.basesEntryByPath.get(n.path);if(g){if(f.basesData=g,h){for(let k of h)if(k.startsWith("formula."))try{(d=g.getValue)==null||d.call(g,k)}catch(T){console.debug("[TaskNotes][CalendarView] Error getting formula:",k,T)}}if(!f.dateCreated)try{let k=(u=g.getValue)==null?void 0:u.call(g,"file.ctime");k!=null&&k.data&&(f.dateCreated=k.data)}catch(k){console.debug("[TaskNotes][CalendarView] Error getting file.ctime:",k)}if(!f.dateModified)try{let k=(p=g.getValue)==null?void 0:p.call(g,"file.mtime");k!=null&&k.data&&(f.dateModified=k.data)}catch(k){console.debug("[TaskNotes][CalendarView] Error getting file.mtime:",k)}}let y=vU(t);m=br(f,this.plugin,h,{targetDate:y})}else if(s&&i==="ics")m=Rye(s,this.plugin);else if(i==="property-based"&&o)m=Lye(o,this.plugin,this.config);else if(i==="timeblock"&&a){let f=t.event.start?D(t.event.start,"yyyy-MM-dd"):void 0;m=zye(a,this.plugin,{eventDate:t.event.start,originalDate:f})}if(m){t.el.appendChild(m),t.el.classList.remove("fc-event","fc-event-start","fc-event-end");return}else t.el.classList.add("fc-event-default-list")}if(t.el.setAttribute("data-event-type",i||"unknown"),i==="timeblock"&&a){Cye(t.el,a),t.event.setProp&&t.event.setProp("editable",!0);let m=Pye(a);(0,Va.setTooltip)(t.el,m,{placement:"top"});return}if(n&&n.path){if(t.el.setAttribute("data-task-path",n.path),t.el.classList.add("fc-task-event"),n.tags&&n.tags.length>0&&n.tags.forEach(m=>{let h=m.replace(/[^a-zA-Z0-9-_]/g,"");h&&t.el.classList.add(`fc-tag-${h}`)}),t.event.setProp)switch(i){case"scheduled":case"recurring":case"timeEntry":case"due":case"scheduledToDueSpan":t.event.setProp("editable",!0);break;default:break}Tye(t.el,t.event.extendedProps)}if(n){let m=bye(n,this.plugin);(0,Va.setTooltip)(t.el,m)}else if(s){let m=s.description?`${s.title} ${s.description}`:s.title;(0,Va.setTooltip)(t.el,m)}n&&i!=="ics"&&_ye(t.el,n,this.plugin,"tasknotes-bases-calendar"),n&&t.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=vU(t);new Af({task:n,plugin:this.plugin,targetDate:h,onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(m)}),s&&i==="ics"&&t.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=t.event.extendedProps.subscriptionName;new Ng({icsEvent:s,plugin:this.plugin,subscriptionName:h,onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(m)}),i==="property-based"&&t.event.extendedProps.filePath&&t.el.addEventListener("mouseover",m=>{this.plugin.app.vault.getAbstractFileByPath(t.event.extendedProps.filePath)&&this.plugin.app.workspace.trigger("hover-link",{event:m,source:"tasknotes-bases-calendar",hoverParent:t.el,targetEl:t.el,linktext:t.event.extendedProps.filePath,sourcePath:t.event.extendedProps.filePath})}),i==="property-based"&&t.event.extendedProps.filePath&&t.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=this.plugin.app.vault.getAbstractFileByPath(t.event.extendedProps.filePath);if(h instanceof Va.TFile){let f=new Va.Menu;this.plugin.app.workspace.trigger("file-menu",f,h,"tasknotes-bases-calendar"),f.showAtPosition({x:m.clientX,y:m.clientY})}})}setupContainer(){if(super.setupContainer(),this.rootElement){this.rootElement.className="tn-bases-integration tasknotes-plugin advanced-calendar-view",this.rootElement.style.cssText="min-height: 800px; height: 100%; display: flex; flex-direction: column;";let n=this.containerEl.ownerDocument.createElement("div");n.id="bases-calendar",n.style.cssText="flex: 1; min-height: 700px; overflow: auto;",this.rootElement.appendChild(n),this.calendarEl=n}}async handleTaskUpdate(t){this.debouncedRefresh()}renderError(t){if(!this.calendarEl)return;let a=this.calendarEl.ownerDocument.createElement("div");a.className="tn-bases-error",a.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",a.textContent=`Error loading calendar: ${t.message||"Unknown error"}`,this.calendarEl.appendChild(a)}onunload(){this._saveViewTypeTimer&&(clearTimeout(this._saveViewTypeTimer),this._saveViewTypeTimer=null),this.calendar&&(this.calendar.destroy(),this.calendar=null),this.calendarEl=null,this.currentTasks=[]}getEphemeralState(){var n;let t=super.getEphemeralState();if(this.calendar){let a=this.calendar.getDate(),s=(n=this.calendar.view)==null?void 0:n.type;return{...t,calendarDate:a?a.toISOString():null,calendarView:s||null}}return t}setEphemeralState(t){var n;if(super.setEphemeralState(t),!!t&&this.calendar){if(t.calendarDate)try{this.calendar.gotoDate(new Date(t.calendarDate))}catch(a){console.debug("[CalendarView] Failed to restore calendar date:",a)}if(t.calendarView&&t.calendarView!==((n=this.calendar.view)==null?void 0:n.type))try{this.calendar.changeView(t.calendarView)}catch(a){console.debug("[CalendarView] Failed to restore calendar view:",a)}}}}});function Uye(r){return function(e,t){if(!t)throw console.error("[TaskNotes][MiniCalendarView] No containerEl provided"),new Error("MiniCalendarView requires a containerEl");return new EU(e,t,r)}}var lu,cu,EU,gP,Vye=b(()=>{lu=require("obsidian");ow();Qr();kt();Fn();cu=We(Vl()),EU=class extends El{constructor(t,n,a){super(t,n,a);this.type="tasknotesMiniCalendar";this.calendarEl=null;this.dateProperty=null;this.titleProperty=null;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 s=Jt(),i=Rr(s);this.selectedDate=i,this.displayedMonth=i.getUTCMonth(),this.displayedYear=i.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.configLoaded=!0}catch(t){console.error("[TaskNotes][MiniCalendarView] Error reading view options:",t)}}async render(){var t;if(!(!this.calendarEl||!this.rootElement)&&(t=this.data)!=null&&t.data){this.config&&this.readViewOptions();try{let n=this.containerEl.ownerDocument,a=this.calendarEl.querySelector(".mini-calendar-view__grid")===n.activeElement;this.calendarEl.empty();let s=this.data.data;this.indexNotesByDate(s),this.renderCalendarControls(),this.renderCalendarGrid(),(this.isInitialRender||this.shouldRestoreFocus||a)&&(this.isInitialRender&&(this.isInitialRender=!1),this.shouldRestoreFocus=!1,setTimeout(()=>{var l;let o=(l=this.calendarEl)==null?void 0:l.querySelector(".mini-calendar-view__grid");o&&o.focus()},10))}catch(n){console.error("[TaskNotes][MiniCalendarView] Error rendering:",n),this.renderError(n)}}}indexNotesByDate(t){var n;if(this.notesByDate.clear(),!!this.dateProperty)for(let a of t)try{let s=a.file;if(!s)continue;let i=this.getDateValueFromProperty(a,this.dateProperty);if(!i)continue;let o=Xe(i);if(!o)continue;let l=s.basename||s.name;if(this.titleProperty)try{let u=(n=a.getValue)==null?void 0:n.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=String(u);p&&p!=="null"&&p!==""&&(l=p)}else{let p=this.dataAdapter.getPropertyValue(a,this.titleProperty);if(p!=null)if(typeof p=="object"&&p.toString){let m=p.toString();m&&m!=="null"&&m!==""&&(l=m)}else if(typeof p=="string")l=p;else{let m=String(p);m&&m!=="null"&&m!==""&&(l=m)}}}catch(u){console.warn("[TaskNotes][MiniCalendarView] Error getting title property:",u)}let c={file:s,title:l,path:s.path,dateValue:i,basesEntry:a};this.notesByDate.has(o)||this.notesByDate.set(o,[]);let d=this.notesByDate.get(o);d&&d.push(c)}catch(s){console.warn("[TaskNotes][MiniCalendarView] Error indexing note:",s)}}getDateValueFromProperty(t,n){try{let a=this.dataAdapter.getPropertyValue(t,n);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 s=a.date;if(s instanceof Date)return this.toAnchoredDateString(s);let i=a.toISOString;if(typeof i=="function")return this.extractDateFromString(i.call(a))}return null}catch(a){return console.warn("[TaskNotes][MiniCalendarView] Error getting date value:",a),null}}extractDateFromString(t){let n=t==null?void 0:t.trim();if(!n)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(n))return this.validateCalendarDate(n);if(n.includes("T")||/\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}/.test(n)||/[+-]\d{2}:\d{2}$/.test(n)){let i=n.includes(" ")&&!n.includes("T")?n.replace(" ","T"):n,o=new Date(i);if(!isNaN(o.getTime()))return this.toAnchoredDateString(o)}let a=n.match(/^(\d{4})[/.](\d{2})[/.](\d{2})$/);if(a){let[,i,o,l]=a;return this.validateCalendarDate(`${i}-${o}-${l}`)}let s=n.match(/(\d{4}-\d{2}-\d{2})/);return s?this.validateCalendarDate(s[1]):null}toAnchoredDateString(t){if(!(t instanceof Date)||isNaN(t.getTime()))return null;let n=Rr(t);return me(n)}validateCalendarDate(t){if(!t)return null;let a=t.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!a)return null;let[,s,i,o]=a,l=Number(s),c=Number(i)-1,d=Number(o);if(Number.isNaN(l)||Number.isNaN(c)||Number.isNaN(d))return null;let u=QA(l,c,d);return u.getUTCFullYear()!==l||u.getUTCMonth()!==c||u.getUTCDate()!==d?null:me(u)}renderCalendarControls(){if(!this.calendarEl)return;let n=this.calendarEl.createDiv({cls:"mini-calendar-view__controls"}).createDiv({cls:"mini-calendar-view__header"}),a=n.createDiv({cls:"mini-calendar-view__navigation"});a.createEl("button",{text:"\u2039",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(pd(this.selectedDate),"MMMM yyyy")}),a.createEl("button",{text:"\u203A",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()),n.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"}),n=this.displayedMonth,a=this.displayedYear,s=new Date(Date.UTC(a,n,1)),i=new Date(Date.UTC(a,n+1,0)),o=this.plugin.settings.calendarViewSettings.firstDay||0,l=(s.getUTCDay()-o+7)%7,c=t.createDiv({cls:"mini-calendar-view__grid",attr:{role:"grid","aria-label":`Calendar for ${D(pd(new Date(Date.UTC(a,n,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(w=>{d.createDiv({text:w,cls:"mini-calendar-view__day-header",attr:{role:"columnheader","aria-label":w}})});let m=l,h=42,f=i.getUTCDate(),g=h-f-m,y=new Date(Date.UTC(a,n,0)).getUTCDate(),k=[],T=[];for(let w=0;w0&&k.push(T),k.forEach(w=>{this.renderWeekRow(c,w)})}renderWeekRow(t,n){let a=t.createDiv({cls:"mini-calendar-view__week",attr:{role:"row"}}),s=this.getWeekNumber(n[0]);a.createDiv({cls:"mini-calendar-week-number",text:`W${s}`}).addEventListener("click",o=>{var c;o.preventDefault(),o.stopPropagation(),this.selectWeek(n);let l=(c=this.calendarEl)==null?void 0:c.querySelector(".mini-calendar-view__grid");l&&l.focus()}),n.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,n,a,s){let i=Jt(),o=Rr(i),l=ux(n,o),c=ux(n,this.selectedDate),d="mini-calendar-view__day";l&&(d+=" mini-calendar-view__day--today"),c&&(d+=" mini-calendar-view__day--selected"),s&&(d+=" mini-calendar-view__day--outside-month");let u=t.createDiv({cls:d,text:a.toString(),attr:{role:"gridcell","aria-label":D(pd(n),"EEEE, MMMM d, yyyy")+(l?" (Today)":""),"aria-selected":c?"true":"false","aria-current":l?"date":null}}),p=me(n),m=this.notesByDate.get(p);if(m&&m.length>0){let h=this.getHeatMapIntensity(m.length);u.addClass(`mini-calendar-view__day--intensity-${h}`);let f=this.createNotePreviewText(m);(0,lu.setTooltip)(u,f,{placement:"top"})}u.addEventListener("click",h=>{var g;h.preventDefault(),h.stopPropagation(),this.handleDayClick(n,h);let f=(g=this.calendarEl)==null?void 0:g.querySelector(".mini-calendar-view__grid");f&&f.focus()})}async handleDayClick(t,n){if(this.selectedDate=t,n&&(n.ctrlKey||n.metaKey)){await this.openDailyNoteForDate(t);return}this.refresh();let a=me(t),s=this.notesByDate.get(a);s&&s.length>0&&new gP(this.plugin.app,this.plugin,s,o=>{o&&this.plugin.app.workspace.getLeaf(!1).openFile(o.file)}).open()}async openDailyNoteForDate(t){if(!(0,cu.appHasDailyNotesPluginLoaded)()){new lu.Notice("Daily Notes core plugin is not enabled. Please enable it in Settings > Core plugins.");return}let n=pd(t),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,0),s=window.moment(a),i=(0,cu.getAllDailyNotes)(),o=(0,cu.getDailyNote)(s,i);if(!o)try{o=await(0,cu.createDailyNote)(s)}catch(l){let c=l instanceof Error?l.message:String(l);console.error("Failed to create daily note:",l),new lu.Notice(`Failed to create daily 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=Jt(),n=Rr(t);this.selectedDate=n,this.displayedMonth=n.getUTCMonth(),this.displayedYear=n.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}setupKeyboardNavigation(t){this.keyboardHandler&&t.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=async n=>{if(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"){n.preventDefault(),this.navigateByArrowKey(n.key);return}if(n.key==="PageUp"){n.preventDefault(),n.shiftKey?this.navigateToYear(-1):this.navigateToPreviousMonth();return}if(n.key==="PageDown"){n.preventDefault(),n.shiftKey?this.navigateToYear(1):this.navigateToNextMonth();return}if(n.key==="Home"){n.preventDefault(),n.ctrlKey||n.metaKey?this.navigateToStartOfMonth():this.navigateToStartOfWeek();return}if(n.key==="End"){n.preventDefault(),n.ctrlKey||n.metaKey?this.navigateToEndOfMonth():this.navigateToEndOfWeek();return}if(n.key==="t"||n.key==="T"){n.preventDefault(),this.navigateToToday();return}if(n.key==="Escape"){this.multiSelectMode&&(n.preventDefault(),this.multiSelectMode=!1,this.selectedDates.clear(),this.refresh());return}if(n.key==="Enter"||n.key===" "){n.preventDefault(),n.ctrlKey||n.metaKey?await this.openDailyNoteForDate(this.selectedDate):await this.handleDayClick(this.selectedDate);return}},t.addEventListener("keydown",this.keyboardHandler)}navigateByArrowKey(t){let n=new Date(this.selectedDate.getTime());switch(t){case"ArrowLeft":n.setUTCDate(n.getUTCDate()-1);break;case"ArrowRight":n.setUTCDate(n.getUTCDate()+1);break;case"ArrowUp":n.setUTCDate(n.getUTCDate()-7);break;case"ArrowDown":n.setUTCDate(n.getUTCDate()+7);break}this.selectedDate=n,(n.getUTCMonth()!==this.displayedMonth||n.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=n.getUTCMonth(),this.displayedYear=n.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,s=new Date(this.selectedDate.getTime());s.setUTCDate(s.getUTCDate()-a),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()}navigateToEndOfWeek(){let t=this.plugin.settings.calendarViewSettings.firstDay||0,n=this.selectedDate.getUTCDay(),s=((t+6)%7-n+7)%7,i=new Date(this.selectedDate.getTime());i.setUTCDate(i.getUTCDate()+s),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()}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 n=new Date(this.selectedDate.getTime());n.setUTCFullYear(n.getUTCFullYear()+t),this.selectedDate=n,this.displayedMonth=n.getUTCMonth(),this.displayedYear=n.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}getWeekNumber(t){let n=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())),a=n.getUTCDay()||7;n.setUTCDate(n.getUTCDate()+4-a);let s=new Date(Date.UTC(n.getUTCFullYear(),0,1));return Math.ceil(((n.getTime()-s.getTime())/864e5+1)/7)}selectWeek(t){this.multiSelectMode=!0,this.selectedDates.clear(),t.forEach(n=>{this.selectedDates.add(me(n))}),this.shouldRestoreFocus=!0,this.refresh(),this.showCombinedNotes()}showCombinedNotes(){let t=[];this.selectedDates.forEach(n=>{let a=this.notesByDate.get(n);a&&t.push(...a)}),t.length>0?new gP(this.plugin.app,this.plugin,t,a=>{a&&this.plugin.app.workspace.getLeaf(!1).openFile(a.file)}).open():new lu.Notice("No notes found for selected dates")}createNotePreviewText(t){let n=[];return n.push(`${t.length} note${t.length>1?"s":""}`),n.push(""),t.slice(0,5).forEach(a=>{var o,l;let s=`\u2022 ${a.title}`,i=(l=(o=a.basesEntry)==null?void 0:o.getValue)==null?void 0:l.call(o,"type");if(i){let c=null;if(typeof i=="object"&&i.toString){let d=i.toString();d&&d!=="null"&&d!==""&&(c=d)}else typeof i=="string"&&(c=i);c&&(s+=` (${c})`)}n.push(s)}),t.length>5&&n.push(`+ ${t.length-5} more...`),n.join(` `)}getHeatMapIntensity(t){return t===0?"none":t===1?"low":t<=3?"medium":t<=5?"high":"very-high"}setupContainer(){var a;super.setupContainer();let n=this.containerEl.ownerDocument.createElement("div");n.className="mini-calendar-bases-view",(a=this.rootElement)==null||a.appendChild(n),this.calendarEl=n}async handleTaskUpdate(t){this.debouncedRefresh()}renderError(t){if(!this.calendarEl)return;let a=this.calendarEl.ownerDocument.createElement("div");a.className="tn-bases-error",a.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",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}},gP=class extends lu.FuzzySuggestModal{constructor(e,t,n,a){super(e),this.plugin=t,this.notes=n,this.onChooseNote=a,this.setPlaceholder("Select a note to open"),this.setInstructions([{command:"\u2191\u2193",purpose:"Navigate"},{command:"\u21B5",purpose:"Open note"},{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 n=e.item,a=t.createDiv({cls:"note-selector-modal__suggestion"});a.createDiv({cls:"note-selector-modal__title",text:n.title}),n.path!==n.title&&a.createDiv({cls:"note-selector-modal__path",text:n.path})}onChooseItem(e,t){this.onChooseNote(e)}}});function y5e(r){var e,t;try{let n=r.internalPlugins;if(!n)return console.debug("[TaskNotes][Bases] Internal plugins manager not available"),null;let a=(e=n.getEnabledPluginById)==null?void 0:e.call(n,"bases");return a?!a.registrations||typeof a.registrations!="object"?(console.warn("[TaskNotes][Bases] Bases plugin found but registrations API not available"),null):{registrations:a.registrations,isEnabled:!0,version:((t=a.manifest)==null?void 0:t.version)||"unknown"}:(console.debug("[TaskNotes][Bases] Bases plugin not found or not enabled"),null)}catch(n){return console.warn("[TaskNotes][Bases] Error accessing Bases plugin API:",n),null}}function yw(r,e,t){var n;if(typeof r.registerBasesView=="function")try{return r.registerBasesView(e,t)?(console.debug(`[TaskNotes][Bases] Successfully registered view via public API: ${e}`),!0):(console.debug("[TaskNotes][Bases] Public API returned false (Bases may be disabled)"),!1)}catch(a){return(n=a==null?void 0:a.message)!=null&&n.includes("already exists")?(console.debug(`[TaskNotes][Bases] View ${e} already registered via public API`),!0):(console.warn(`[TaskNotes][Bases] Public API registration failed for ${e}:`,a),!1)}return console.warn("[TaskNotes][Bases] Cannot register view: Bases public API not available (requires Obsidian 1.10.0+)"),!1}function vw(r,e){let t=y5e(r.app);if(!t)return!0;try{return t.registrations[e]&&delete t.registrations[e],!0}catch(n){return console.error(`[TaskNotes][Bases] Error unregistering view ${e}:`,n),!1}}var Wye=b(()=>{});var yP={};Ke(yP,{registerBasesTaskList:()=>v5e,unregisterBasesViews:()=>b5e});async function v5e(r){if(!r.settings.enableBases||!(0,Yye.requireApiVersion)("1.10.1"))return;let e=async()=>{try{let t=yw(r,"tasknotesTaskList",{name:"TaskNotes Task List",icon:"tasknotes-simple",factory:Uge(r),options:()=>[{type:"property",key:"subGroup",displayName:"Sub-group by",placeholder:"Select property for sub-grouping (optional)",filter:i=>i.startsWith("note.")||i.startsWith("task.")||i.startsWith("formula.")},{type:"toggle",key:"enableSearch",displayName:"Enable search box",default:!1}]}),n=yw(r,"tasknotesKanban",{name:"TaskNotes Kanban",icon:"tasknotes-simple",factory:Wge(r),options:()=>[{type:"property",key:"swimLane",displayName:"Swim Lane",placeholder:"Select property for swim lanes (optional)",filter:i=>i.startsWith("note.")||i.startsWith("task.")||i.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:"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:"multitext",key:"columnOrder",displayName:"Column Order (Advanced)",placeholder:"Auto-managed when dragging columns",default:"{}"}]}),a=yw(r,"tasknotesCalendar",{name:"TaskNotes Calendar",icon:"tasknotes-simple",factory:qye(r),options:()=>{var c;let i=r.settings.calendarViewSettings,o=d=>r.i18n.translate(`views.basesCalendar.settings.${d}`),l=[{type:"group",displayName:o("groups.events"),items:[{type:"toggle",key:"showScheduled",displayName:o("events.showScheduledTasks"),default:i.defaultShowScheduled},{type:"toggle",key:"showDue",displayName:o("events.showDueTasks"),default:i.defaultShowDue},{type:"toggle",key:"showRecurring",displayName:o("events.showRecurringTasks"),default:i.defaultShowRecurring},{type:"toggle",key:"showTimeEntries",displayName:o("events.showTimeEntries"),default:i.defaultShowTimeEntries},{type:"toggle",key:"showTimeblocks",displayName:o("events.showTimeblocks"),default:i.defaultShowTimeblocks},{type:"toggle",key:"showPropertyBasedEvents",displayName:o("events.showPropertyBasedEvents"),default:!0}]},{type:"group",displayName:o("groups.dateNavigation"),items:[{type:"text",key:"initialDate",displayName:o("dateNavigation.navigateToDate"),default:"",placeholder:o("dateNavigation.navigateToDatePlaceholder")},{type:"property",key:"initialDateProperty",displayName:o("dateNavigation.navigateToDateFromProperty"),placeholder:o("dateNavigation.navigateToDateFromPropertyPlaceholder"),filter:d=>d.startsWith("note.")||d.startsWith("file.")},{type:"dropdown",key:"initialDateStrategy",displayName:o("dateNavigation.propertyNavigationStrategy"),default:"first",options:{first:o("dateNavigation.strategies.first"),earliest:o("dateNavigation.strategies.earliest"),latest:o("dateNavigation.strategies.latest")}}]},{type:"group",displayName:o("groups.layout"),items:[{type:"dropdown",key:"calendarView",displayName:o("layout.calendarView"),default:i.defaultView,options:{dayGridMonth:"Month",timeGridWeek:"Week",timeGridCustom:"Custom days",timeGridDay:"Day",listWeek:"List",multiMonthYear:"Year"}},{type:"slider",key:"customDayCount",displayName:o("layout.customDayCount"),default:i.customDayCount||3,min:1,max:14,step:1},{type:"slider",key:"listDayCount",displayName:o("layout.listDayCount"),default:7,min:1,max:30,step:1},{type:"text",key:"slotMinTime",displayName:o("layout.dayStartTime"),default:i.slotMinTime,placeholder:o("layout.dayStartTimePlaceholder")},{type:"text",key:"slotMaxTime",displayName:o("layout.dayEndTime"),default:i.slotMaxTime,placeholder:o("layout.dayEndTimePlaceholder")},{type:"text",key:"slotDuration",displayName:o("layout.timeSlotDuration"),default:i.slotDuration,placeholder:o("layout.timeSlotDurationPlaceholder")},{type:"dropdown",key:"firstDay",displayName:o("layout.weekStartsOn"),default:String(i.firstDay),options:{0:r.i18n.translate("common.weekdays.sunday"),1:r.i18n.translate("common.weekdays.monday"),2:r.i18n.translate("common.weekdays.tuesday"),3:r.i18n.translate("common.weekdays.wednesday"),4:r.i18n.translate("common.weekdays.thursday"),5:r.i18n.translate("common.weekdays.friday"),6:r.i18n.translate("common.weekdays.saturday")}},{type:"toggle",key:"weekNumbers",displayName:o("layout.showWeekNumbers"),default:i.weekNumbers},{type:"toggle",key:"nowIndicator",displayName:o("layout.showNowIndicator"),default:i.nowIndicator},{type:"toggle",key:"showWeekends",displayName:o("layout.showWeekends"),default:i.showWeekends},{type:"toggle",key:"showAllDaySlot",displayName:o("layout.showAllDaySlot"),default:!0},{type:"toggle",key:"showTodayHighlight",displayName:o("layout.showTodayHighlight"),default:i.showTodayHighlight},{type:"toggle",key:"selectMirror",displayName:o("layout.showSelectionPreview"),default:i.selectMirror},{type:"toggle",key:"slotEventOverlap",displayName:o("layout.slotEventOverlap"),default:i.slotEventOverlap},{type:"toggle",key:"enableSearch",displayName:o("layout.enableSearch"),default:!1},{type:"dropdown",key:"timeFormat",displayName:o("layout.timeFormat"),default:i.timeFormat,options:{12:o("layout.timeFormat12"),24:o("layout.timeFormat24")}},{type:"text",key:"scrollTime",displayName:o("layout.initialScrollTime"),default:i.scrollTime,placeholder:o("layout.initialScrollTimePlaceholder")},{type:"slider",key:"eventMinHeight",displayName:o("layout.minimumEventHeight"),default:i.eventMinHeight,min:15,max:100,step:5},{type:"slider",key:"eventMaxStack",displayName:o("layout.eventMaxStack"),default:(c=i.eventMaxStack)!=null?c:0,min:0,max:10,step:1},{type:"slider",key:"dayMaxEvents",displayName:o("layout.dayMaxEvents"),default:typeof i.dayMaxEvents=="number"?i.dayMaxEvents:0,min:0,max:20,step:1},{type:"slider",key:"dayMaxEventRows",displayName:o("layout.dayMaxEventRows"),default:typeof i.dayMaxEventRows=="number"?i.dayMaxEventRows:0,min:0,max:10,step:1},{type:"toggle",key:"showScheduledToDueSpan",displayName:o("layout.spanScheduledToDue"),default:i.defaultShowScheduledToDueSpan}]},{type:"group",displayName:o("groups.propertyBasedEvents"),items:[{type:"property",key:"startDateProperty",displayName:o("propertyBasedEvents.startDateProperty"),placeholder:o("propertyBasedEvents.startDatePropertyPlaceholder"),filter:d=>d.startsWith("note.")||d.startsWith("file.")},{type:"property",key:"endDateProperty",displayName:o("propertyBasedEvents.endDateProperty"),placeholder:o("propertyBasedEvents.endDatePropertyPlaceholder"),filter:d=>d.startsWith("note.")||d.startsWith("file.")},{type:"property",key:"titleProperty",displayName:o("propertyBasedEvents.titleProperty"),placeholder:o("propertyBasedEvents.titlePropertyPlaceholder"),filter:d=>d.startsWith("note.")||d.startsWith("formula.")||d.startsWith("file.")}]}];if(r.icsSubscriptionService){let d=r.icsSubscriptionService.getSubscriptions();if(d.length>0){let u=d.map(p=>({type:"toggle",key:`showICS_${p.id}`,displayName:p.name,default:!0}));l.push({type:"group",displayName:o("groups.calendarSubscriptions"),items:u})}}if(r.googleCalendarService){let d=r.googleCalendarService.getAvailableCalendars();if(d.length>0){let u=d.map(p=>({type:"toggle",key:`showGoogleCalendar_${p.id}`,displayName:p.summary||p.id,default:!0}));l.push({type:"group",displayName:o("groups.googleCalendars")||"Google Calendars",items:u})}}if(r.microsoftCalendarService){let d=r.microsoftCalendarService.getAvailableCalendars();if(d.length>0){let u=d.map(p=>({type:"toggle",key:`showMicrosoftCalendar_${p.id}`,displayName:p.summary||p.id,default:!0}));l.push({type:"group",displayName:o("groups.microsoftCalendars")||"Microsoft Calendars",items:u})}}return l}}),s=yw(r,"tasknotesMiniCalendar",{name:"TaskNotes Mini Calendar",icon:"tasknotes-simple",factory:Uye(r),options:()=>[{type:"property",key:"dateProperty",displayName:"Date Property",placeholder:"Select property to show on calendar",default:"file.ctime",filter:i=>i.startsWith("note.")||i.startsWith("file.")||i.startsWith("task.")},{type:"property",key:"titleProperty",displayName:"Title Property",placeholder:"Select property to use as title",default:"file.name",filter:i=>i.startsWith("note.")||i.startsWith("formula.")||i.startsWith("file.")}]});return!t&&!n&&!a&&!s?(console.debug("[TaskNotes][Bases] Bases plugin not available for registration"),!1):(r.app.workspace.iterateAllLeaves(i=>{var o,l;if(((l=(o=i.view)==null?void 0:o.getViewType)==null?void 0:l.call(o))==="bases"){let c=i.view;if(typeof c.refresh=="function")try{c.refresh()}catch(d){console.debug("[TaskNotes][Bases] Error refreshing view:",d)}}}),!0)}catch(t){return console.warn("[TaskNotes][Bases] Registration attempt failed:",t),!1}};if(!await e()){for(let t=0;t<5;t++)if(await new Promise(n=>setTimeout(n,200)),await e())return;console.warn("[TaskNotes][Bases] Failed to register views after multiple attempts")}}function b5e(r){try{vw(r,"tasknotesTaskList"),vw(r,"tasknotesKanban"),vw(r,"tasknotesCalendar"),vw(r,"tasknotesMiniCalendar")}catch(e){console.error("[TaskNotes][Bases] Error during view unregistration:",e)}}var Yye,vP=b(()=>{Yye=require("obsidian");Vge();Yge();Hye();Vye();Wye()});var Zye=E(()=>{var Gye;(function(r){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:o(),n=a(r);typeof t.Reflect!="undefined"&&(n=a(t.Reflect,n)),e(n,t),typeof t.Reflect=="undefined"&&(t.Reflect=r);function a(l,c){return function(d,u){Object.defineProperty(l,d,{configurable:!0,writable:!0,value:u}),c&&c(d,u)}}function s(){try{return Function("return this;")()}catch(l){}}function i(){try{return(0,eval)("(function() { return this; })()")}catch(l){}}function o(){return s()||i()}})(function(e,t){var n=Object.prototype.hasOwnProperty,a=typeof Symbol=="function",s=a&&typeof Symbol.toPrimitive!="undefined"?Symbol.toPrimitive:"@@toPrimitive",i=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 pA(Object.create(null))}:l?function(){return pA({__proto__:null})}:function(){return pA({})},has:c?function(O,z){return n.call(O,z)}:function(O,z){return z in O},get:c?function(O,z){return n.call(O,z)?O[z]:void 0}:function(O,z){return O[z]}},u=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:SCe(),m=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ECe(),h=typeof WeakMap=="function"?WeakMap:xCe(),f=a?Symbol.for("@reflect-metadata:registry"):void 0,g=TCe(),y=kCe(g);function k(O,z,Y,ie){if(te(Y)){if(!lr(O))throw new TypeError;if(!Nn(z))throw new TypeError;return R(O,z)}else{if(!lr(O))throw new TypeError;if(!xt(z))throw new TypeError;if(!xt(ie)&&!te(ie)&&!vt(ie))throw new TypeError;return vt(ie)&&(ie=void 0),Y=Ve(Y),A(O,z,Y,ie)}}e("decorate",k);function T(O,z){function Y(ie,Re){if(!xt(ie))throw new TypeError;if(!te(Re)&&!od(Re))throw new TypeError;H(O,z,ie,Re)}return Y}e("metadata",T);function w(O,z,Y,ie){if(!xt(Y))throw new TypeError;return te(ie)||(ie=Ve(ie)),H(O,z,Y,ie)}e("defineMetadata",w);function S(O,z,Y){if(!xt(z))throw new TypeError;return te(Y)||(Y=Ve(Y)),I(O,z,Y)}e("hasMetadata",S);function x(O,z,Y){if(!xt(z))throw new TypeError;return te(Y)||(Y=Ve(Y)),L(O,z,Y)}e("hasOwnMetadata",x);function C(O,z,Y){if(!xt(z))throw new TypeError;return te(Y)||(Y=Ve(Y)),V(O,z,Y)}e("getMetadata",C);function M(O,z,Y){if(!xt(z))throw new TypeError;return te(Y)||(Y=Ve(Y)),W(O,z,Y)}e("getOwnMetadata",M);function N(O,z){if(!xt(O))throw new TypeError;return te(z)||(z=Ve(z)),K(O,z)}e("getMetadataKeys",N);function F(O,z){if(!xt(O))throw new TypeError;return te(z)||(z=Ve(z)),le(O,z)}e("getOwnMetadataKeys",F);function G(O,z,Y){if(!xt(z))throw new TypeError;if(te(Y)||(Y=Ve(Y)),!xt(z))throw new TypeError;te(Y)||(Y=Ve(Y));var ie=Ry(z,Y,!1);return te(ie)?!1:ie.OrdinaryDeleteMetadata(O,z,Y)}e("deleteMetadata",G);function R(O,z){for(var Y=O.length-1;Y>=0;--Y){var ie=O[Y],Re=ie(z);if(!te(Re)&&!vt(Re)){if(!Nn(Re))throw new TypeError;z=Re}}return z}function A(O,z,Y,ie){for(var Re=O.length-1;Re>=0;--Re){var nn=O[Re],Tn=nn(z,Y,ie);if(!te(Tn)&&!vt(Tn)){if(!xt(Tn))throw new TypeError;ie=Tn}}return ie}function I(O,z,Y){var ie=L(O,z,Y);if(ie)return!0;var Re=uA(z);return vt(Re)?!1:I(O,Re,Y)}function L(O,z,Y){var ie=Ry(z,Y,!1);return te(ie)?!1:ae(ie.OrdinaryHasOwnMetadata(O,z,Y))}function V(O,z,Y){var ie=L(O,z,Y);if(ie)return W(O,z,Y);var Re=uA(z);if(!vt(Re))return V(O,Re,Y)}function W(O,z,Y){var ie=Ry(z,Y,!1);if(!te(ie))return ie.OrdinaryGetOwnMetadata(O,z,Y)}function H(O,z,Y,ie){var Re=Ry(Y,ie,!0);Re.OrdinaryDefineOwnMetadata(O,z,Y,ie)}function K(O,z){var Y=le(O,z),ie=uA(O);if(ie===null)return Y;var Re=K(ie,z);if(Re.length<=0)return Y;if(Y.length<=0)return Re;for(var nn=new m,Tn=[],bt=0,de=Y;bt=0&&de=this._keys.length?(this._index=-1,this._keys=z,this._values=z):this._index++,{value:ye,done:!1}}return{value:void 0,done:!0}},bt.prototype.throw=function(de){throw this._index>=0&&(this._index=-1,this._keys=z,this._values=z),de},bt.prototype.return=function(de){return this._index>=0&&(this._index=-1,this._keys=z,this._values=z),{value:de,done:!0}},bt})(),ie=(function(){function bt(){this._keys=[],this._values=[],this._cacheKey=O,this._cacheIndex=-2}return Object.defineProperty(bt.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),bt.prototype.has=function(de){return this._find(de,!1)>=0},bt.prototype.get=function(de){var ye=this._find(de,!1);return ye>=0?this._values[ye]:void 0},bt.prototype.set=function(de,ye){var Te=this._find(de,!0);return this._values[Te]=ye,this},bt.prototype.delete=function(de){var ye=this._find(de,!1);if(ye>=0){for(var Te=this._keys.length,Ee=ye+1;EeTw,Get:()=>mr,OpenAPI:()=>T5e,OpenAPIController:()=>DU,Post:()=>un,Put:()=>CU,Route:()=>bw,generateOpenAPISpec:()=>PU,getOpenAPIOperation:()=>E5e,getRouteInfo:()=>S5e,getRoutes:()=>bP,hasOpenAPIEndpoints:()=>x5e});function DU(r){return Reflect.hasMetadata(Rg,r)||Reflect.defineMetadata(Rg,[],r),r}function bw(r,e){return function(t,n,a){Reflect.defineMetadata(xU,{method:r.toLowerCase(),path:e,handler:n},t,n);let s=Reflect.getMetadata("routes",t.constructor)||[];s.push({method:r.toLowerCase(),path:e,handler:n}),Reflect.defineMetadata("routes",s,t.constructor)}}function mr(r){return bw("GET",r)}function un(r){return bw("POST",r)}function CU(r){return bw("PUT",r)}function Tw(r){return bw("DELETE",r)}function T5e(r){return function(e,t,n){Reflect.defineMetadata(Kye,r,e,t);let a=Reflect.getMetadata(Rg,e.constructor)||[],s=Reflect.getMetadata(xU,e,t),{path:i,method:o}=s||k5e(t);a.push({path:i,method:o,operation:r}),Reflect.defineMetadata(Rg,a,e.constructor)}}function k5e(r){return console.warn(`extractPathAndMethod is deprecated. Use @Route decorators on method: ${r}`),{path:"/api/unknown",method:"get"}}function PU(r){let e=Reflect.getMetadata(Rg,r.constructor)||[],t=bP(r.constructor)||[],n={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:w5e()}};for(let a of e)n.paths[a.path]||(n.paths[a.path]={}),n.paths[a.path][a.method.toLowerCase()]=a.operation;for(let a of t)n.paths[a.path]||(n.paths[a.path]={}),n.paths[a.path][a.method.toLowerCase()]||(n.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 n}function w5e(){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},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"}},required:["title"]},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 S5e(r,e){return Reflect.getMetadata(xU,r,e)}function bP(r){return Reflect.getMetadata("routes",r)||[]}function E5e(r,e){return Reflect.getMetadata(Kye,r,e)}function x5e(r){return(Reflect.getMetadata(Rg,r)||[]).length>0}var P9t,Kye,Rg,xU,Dl=b(()=>{P9t=We(Zye()),Kye=Symbol("openapi:operation"),Rg=Symbol("openapi:endpoints"),xU=Symbol("route")});var Jye,TP,Xye=b(()=>{Jye=require("url");Dl();TP=class{constructor(){this.routes=[]}compilePattern(e){let t=[],n=e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(s,i)=>(t.push(i),"([^/]+)"));return{regex:new RegExp(`^${n}$`),paramNames:t}}register(e,t,n){let{regex:a,paramNames:s}=this.compilePattern(t);this.routes.push({method:e,pattern:t,handler:n,regex:a,paramNames:s})}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 a=(0,Jye.parse)(e.url||"",!0).pathname||"",s=e.method;for(let i of this.routes)if(i.method===s){let o=a.match(i.regex);if(o){let l={};for(let c=0;c{let n="";r.on("data",a=>{n+=a.toString()}),r.on("end",()=>{try{e(n?JSON.parse(n):{})}catch(a){t(new Error("Invalid JSON"))}}),r.on("error",t)})}var D5e,C5e,MU=b(()=>{D5e="GET, POST, PUT, DELETE, OPTIONS",C5e="Content-Type, Authorization"});var Ss,_m=b(()=>{MU();Ss=class{sendResponse(e,t,n){kP(e,t,n)}successResponse(e,t){return{success:!0,data:e,message:t}}errorResponse(e){return{success:!1,error:e}}async parseRequestBody(e){return wP(e)}}});var eve,Wa,tve=b(()=>{eve=require("url");_m();Dl();Wa=class extends Ss{constructor(t,n,a,s,i){super();this.plugin=t;this.taskService=n;this.filterService=a;this.cacheManager=s;this.taskStatsService=i}async getTasks(t,n){try{let s=(0,eve.parse)(t.url||"",!0).query;if(["status","priority","project","tag","overdue","completed","archived","due_before","due_after","sort"].some(h=>s[h])){this.sendResponse(n,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 l=await this.cacheManager.getAllTasks(),c=0,d=50;s.offset&&(c=parseInt(s.offset,10),(isNaN(c)||c<0)&&(c=0)),s.limit&&(d=parseInt(s.limit,10),(isNaN(d)||d<1)&&(d=50),d>200&&(d=200));let u=l.slice(c,c+d),p=this.plugin.app.vault.adapter,m=null;try{"basePath"in p&&typeof p.basePath=="string"?m=p.basePath:"path"in p&&typeof p.path=="string"&&(m=p.path)}catch(h){}this.sendResponse(n,200,this.successResponse({tasks:u,pagination:{total:l.length,offset:c,limit:d,hasMore:c+d{if(t.endTime){let n=new Date(t.endTime).getTime()-new Date(t.startTime).getTime();return e+Math.floor(n/(1e3*60))}else{let n=Date.now()-new Date(t.startTime).getTime();return e+Math.floor(n/(1e3*60))}},0)}function SP(r,e){let t=[];for(let n of r){let a=e(n);if(a){let s=new Date(a.startTime),i=Math.floor((Date.now()-s.getTime())/(1e3*60));t.push({task:{id:n.path,title:n.title,status:n.status,priority:n.priority,tags:n.tags||[],projects:n.projects||[]},session:{startTime:a.startTime,description:a.description,elapsedMinutes:i},elapsedMinutes:i})}}return{activeSessions:t,totalActiveSessions:t.length,totalElapsedMinutes:t.reduce((n,a)=>n+a.elapsedMinutes,0)}}function _5e(r){let e,t=new Date;switch(r.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:r.fromDate?(e=r.fromDate,r.toDate&&(t=r.toDate)):(e=new Date,e.setHours(0,0,0,0))}return{startDate:e,endDate:t}}function EP(r,e,t){let{startDate:n,endDate:a}=_5e(e),s=0,i=0,o=0,l=[],c=new Map,d=e.includeTags?new Map:null;for(let m of r){if(!m.timeEntries||m.timeEntries.length===0)continue;let h=0,f=!1;for(let g of m.timeEntries){let y=new Date(g.startTime);if(y>=n&&y<=a)if(!g.endTime)h+=Math.floor((Date.now()-y.getTime())/(1e3*60)),f=!0;else{let k=new Date(g.endTime);h+=Math.floor((k.getTime()-y.getTime())/(1e3*60))}}if(h>0){if(s+=h,l.push({task:m.path,title:m.title,minutes:h}),f?o++:t(m.status)&&i++,m.projects)for(let g of m.projects)c.set(g,(c.get(g)||0)+h);if(d&&m.tags)for(let g of m.tags)d.set(g,(d.get(g)||0)+h)}}l.sort((m,h)=>h.minutes-m.minutes);let u=Array.from(c.entries()).sort((m,h)=>h[1]-m[1]).slice(0,10).map(([m,h])=>({project:m,minutes:h})),p={period:e.period,dateRange:{from:n.toISOString(),to:a.toISOString()},summary:{totalMinutes:s,totalHours:Math.round(s/60*100)/100,tasksWithTime:l.length,activeTasks:o,completedTasks:i},topTasks:l.slice(0,10),topProjects:u};return d&&(p.topTags=Array.from(d.entries()).sort((m,h)=>h[1]-m[1]).slice(0,10).map(([m,h])=>({tag:m,minutes:h}))),p}function xP(r,e){let t=r.timeEntries||[],n=e(r),a=P5e(t),s=t.filter(l=>l.endTime).length,i=t.filter(l=>l.endTime),o=i.length>0?Math.round(i.reduce((l,c)=>l+Math.floor((new Date(c.endTime).getTime()-new Date(c.startTime).getTime())/(1e3*60)),0)/i.length*100)/100:0;return{task:{id:r.path,title:r.title,status:r.status,priority:r.priority},summary:{totalMinutes:a,totalHours:Math.round(a/60*100)/100,totalSessions:t.length,completedSessions:s,activeSessions:n?1:0,averageSessionMinutes:o},activeSession:n?{startTime:n.startTime,description:n.description,elapsedMinutes:Math.floor((Date.now()-new Date(n.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 AU=b(()=>{});var rve,Cl,nve=b(()=>{rve=require("url");_m();Dl();AU();Cl=class extends Ss{constructor(t,n,a,s){super();this.plugin=t;this.taskService=n;this.cacheManager=a;this.statusManager=s}async startTimeTracking(t,n,a){try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(n,400,this.errorResponse("Task ID is required"));return}let i=await this.cacheManager.getTaskInfo(s);if(!i){this.sendResponse(n,404,this.errorResponse("Task not found"));return}let o=await this.taskService.startTimeTracking(i);this.sendResponse(n,200,this.successResponse(o))}catch(s){this.sendResponse(n,400,this.errorResponse(s.message))}}async stopTimeTracking(t,n,a){try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(n,400,this.errorResponse("Task ID is required"));return}let i=await this.cacheManager.getTaskInfo(s);if(!i){this.sendResponse(n,404,this.errorResponse("Task not found"));return}let o=await this.taskService.stopTimeTracking(i);this.sendResponse(n,200,this.successResponse(o))}catch(s){this.sendResponse(n,400,this.errorResponse(s.message))}}async startTimeTrackingWithDescription(t,n,a){try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(n,400,this.errorResponse("Task ID is required"));return}let i=await this.cacheManager.getTaskInfo(s);if(!i){this.sendResponse(n,404,this.errorResponse("Task not found"));return}let l=(await this.parseRequestBody(t)).description||"",c=await this.taskService.startTimeTracking(i);if(l&&c.timeEntries&&c.timeEntries.length>0){let d=c.timeEntries[c.timeEntries.length-1];d&&!d.endTime&&(d.description=l,c=await this.taskService.updateTask(c,{timeEntries:c.timeEntries}))}this.sendResponse(n,200,this.successResponse({task:c,message:l?`Time tracking started with description: ${l}`:"Time tracking started"}))}catch(s){this.sendResponse(n,400,this.errorResponse(s.message))}}async getActiveTimeSessions(t,n){try{let a=await this.cacheManager.getAllTasks(),s=SP(a,i=>this.plugin.getActiveTimeSession(i));this.sendResponse(n,200,this.successResponse(s))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}async getTimeSummary(t,n){try{let s=(0,rve.parse)(t.url||"",!0).query,i=await this.cacheManager.getAllTasks(),o=s.period||"today",l=s.from?new Date(s.from):null,c=s.to?new Date(s.to):null,d=EP(i,{period:o,fromDate:l,toDate:c,includeTags:!0},u=>this.statusManager.isCompletedStatus(u));this.sendResponse(n,200,this.successResponse(d))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}async getTaskTimeData(t,n,a){try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(n,400,this.errorResponse("Task ID is required"));return}let i=await this.cacheManager.getTaskInfo(s);if(!i){this.sendResponse(n,404,this.errorResponse("Task not found"));return}let o=xP(i,l=>this.plugin.getActiveTimeSession(l));this.sendResponse(n,200,this.successResponse(o))}catch(s){this.sendResponse(n,500,this.errorResponse(s.message))}}};Ye([un("/api/tasks/:id/time/start")],Cl.prototype,"startTimeTracking",1),Ye([un("/api/tasks/:id/time/stop")],Cl.prototype,"stopTimeTracking",1),Ye([un("/api/tasks/:id/time/start-with-description")],Cl.prototype,"startTimeTrackingWithDescription",1),Ye([mr("/api/time/active")],Cl.prototype,"getActiveTimeSessions",1),Ye([mr("/api/time/summary")],Cl.prototype,"getTimeSummary",1),Ye([mr("/api/tasks/:id/time")],Cl.prototype,"getTaskTimeData",1)});var IU,So,ave=b(()=>{IU=require("url");_m();Dl();So=class extends Ss{constructor(t,n){super();this.plugin=t;this.cacheManager=n}async startPomodoro(t,n){try{let a=await this.parseRequestBody(t),s;if(a.taskId){let c=await this.cacheManager.getTaskInfo(a.taskId);if(!c){this.sendResponse(n,404,this.errorResponse("Task not found"));return}s=c}if(this.plugin.pomodoroService.getState().isRunning){this.sendResponse(n,400,this.errorResponse("Pomodoro session is already running. Stop or pause the current session first."));return}let o=a.duration?parseInt(a.duration):void 0;await this.plugin.pomodoroService.startPomodoro(s,o);let l=this.plugin.pomodoroService.getState();this.sendResponse(n,200,this.successResponse({session:l.currentSession,task:s||null,message:"Pomodoro session started"}))}catch(a){this.sendResponse(n,400,this.errorResponse(a.message))}}async stopPomodoro(t,n){try{if(!this.plugin.pomodoroService.getState().currentSession){this.sendResponse(n,400,this.errorResponse("No active pomodoro session to stop"));return}await this.plugin.pomodoroService.stopPomodoro(),this.sendResponse(n,200,this.successResponse({message:"Pomodoro session stopped and reset"}))}catch(a){this.sendResponse(n,400,this.errorResponse(a.message))}}async pausePomodoro(t,n){try{let a=this.plugin.pomodoroService.getState();if(!a.isRunning||!a.currentSession){this.sendResponse(n,400,this.errorResponse("No running pomodoro session to pause"));return}await this.plugin.pomodoroService.pausePomodoro();let s=this.plugin.pomodoroService.getState();this.sendResponse(n,200,this.successResponse({timeRemaining:s.timeRemaining,message:"Pomodoro session paused"}))}catch(a){this.sendResponse(n,400,this.errorResponse(a.message))}}async resumePomodoro(t,n){try{let a=this.plugin.pomodoroService.getState();if(a.isRunning){this.sendResponse(n,400,this.errorResponse("Pomodoro session is already running"));return}if(!a.currentSession){this.sendResponse(n,400,this.errorResponse("No paused session to resume"));return}await this.plugin.pomodoroService.resumePomodoro();let s=this.plugin.pomodoroService.getState();this.sendResponse(n,200,this.successResponse({timeRemaining:s.timeRemaining,message:"Pomodoro session resumed"}))}catch(a){this.sendResponse(n,400,this.errorResponse(a.message))}}async getPomodoroStatus(t,n){try{let s={...this.plugin.pomodoroService.getState(),totalPomodoros:await this.plugin.pomodoroService.getPomodorosCompleted(),currentStreak:await this.plugin.pomodoroService.getCurrentStreak(),totalMinutesToday:await this.plugin.pomodoroService.getTotalMinutesToday()};this.sendResponse(n,200,this.successResponse(s))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}async getPomodoroSessions(t,n){try{let s=(0,IU.parse)(t.url||"",!0).query,i=await this.plugin.pomodoroService.getSessionHistory();if(s.date&&typeof s.date=="string"){let l=s.date;i=i.filter(c=>new Date(c.startTime).toISOString().split("T")[0]===l)}let o=i.length;if(s.limit&&typeof s.limit=="string"){let l=parseInt(s.limit);l>0&&(i=i.slice(-l))}this.sendResponse(n,200,this.successResponse({sessions:i,total:o}))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}async getPomodoroStats(t,n){try{let s=(0,IU.parse)(t.url||"",!0).query,i;if(s.date&&typeof s.date=="string"){let o=new Date(s.date);i=await this.plugin.pomodoroService.getStatsForDate(o)}else i=await this.plugin.pomodoroService.getTodayStats();this.sendResponse(n,200,this.successResponse(i))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}};Ye([un("/api/pomodoro/start")],So.prototype,"startPomodoro",1),Ye([un("/api/pomodoro/stop")],So.prototype,"stopPomodoro",1),Ye([un("/api/pomodoro/pause")],So.prototype,"pausePomodoro",1),Ye([un("/api/pomodoro/resume")],So.prototype,"resumePomodoro",1),Ye([mr("/api/pomodoro/status")],So.prototype,"getPomodoroStatus",1),Ye([mr("/api/pomodoro/sessions")],So.prototype,"getPomodoroSessions",1),Ye([mr("/api/pomodoro/stats")],So.prototype,"getPomodoroStats",1)});var Hc,sve=b(()=>{_m();Dl();Hc=class extends Ss{constructor(t,n,a,s){super();this.plugin=t;this.taskService=n;this.nlParser=a;this.httpAPIService=s}async healthCheck(t,n){let a=this.plugin.app.vault.getName(),s=this.plugin.app.vault.adapter,i=null;try{"basePath"in s&&typeof s.basePath=="string"?i=s.basePath:"path"in s&&typeof s.path=="string"&&(i=s.path)}catch(o){}this.sendResponse(n,200,this.successResponse({status:"ok",timestamp:new Date().toISOString(),vault:{name:a,path:i}}))}async handleNLPParse(t,n){try{let a=await this.parseRequestBody(t);if(!a.text||typeof a.text!="string"){this.sendResponse(n,400,this.errorResponse("Text field is required and must be a string"));return}let s=this.nlParser.parseInput(a.text),i={title:s.title,details:s.details,priority:s.priority,status:s.status||this.getDefaultStatus(),tags:s.tags,contexts:s.contexts,projects:s.projects,recurrence:s.recurrence,timeEstimate:s.estimate};s.dueDate&&(i.due=s.dueDate,s.dueTime&&(i.due=`${s.dueDate} ${s.dueTime}`)),s.scheduledDate&&(i.scheduled=s.scheduledDate,s.scheduledTime&&(i.scheduled=`${s.scheduledDate} ${s.scheduledTime}`)),this.sendResponse(n,200,this.successResponse({parsed:s,taskData:i}))}catch(a){this.sendResponse(n,500,this.errorResponse(a.message))}}async handleNLPCreate(t,n){try{let a=await this.parseRequestBody(t);if(!a.text||typeof a.text!="string"){this.sendResponse(n,400,this.errorResponse("Text field is required and must be a string"));return}let s=this.nlParser.parseInput(a.text),i={title:s.title,details:s.details,priority:s.priority,status:s.status||this.getDefaultStatus(),tags:s.tags,contexts:s.contexts,projects:s.projects,recurrence:s.recurrence,timeEstimate:s.estimate,creationContext:"api"};s.dueDate&&(i.due=s.dueDate,s.dueTime&&(i.due=`${s.dueDate} ${s.dueTime}`)),s.scheduledDate&&(i.scheduled=s.scheduledDate,s.scheduledTime&&(i.scheduled=`${s.scheduledDate} ${s.scheduledTime}`));let o=await this.taskService.createTask(i);this.sendResponse(n,201,this.successResponse({task:o.taskInfo,parsed:s}))}catch(a){this.sendResponse(n,400,this.errorResponse(a.message))}}async handleOpenAPISpec(t,n){try{let a=this.httpAPIService&&this.httpAPIService.generateOpenAPISpec?this.httpAPIService.generateOpenAPISpec():PU(this);n.statusCode=200,n.setHeader("Content-Type","application/json"),n.setHeader("Access-Control-Allow-Origin","*"),n.end(JSON.stringify(a,null,2))}catch(a){console.error("OpenAPI spec generation error:",a),this.sendResponse(n,500,this.errorResponse("Failed to generate API specification"))}}async handleSwaggerUI(t,n){try{let a=this.generateSwaggerUIHTML();n.statusCode=200,n.setHeader("Content-Type","text/html"),n.setHeader("Access-Control-Allow-Origin","*"),n.end(a)}catch(a){console.error("Swagger UI generation error:",a),this.sendResponse(n,500,this.errorResponse("Failed to generate API documentation"))}}getDefaultStatus(){let t=this.plugin.settings.customStatuses;return t&&t.length>0?[...t].sort((a,s)=>a.order-s.order)[0].value:"open"}generateSwaggerUIHTML(){return` TaskNotes API Documentation