diff --git a/content/.obsidian/community-plugins.json b/content/.obsidian/community-plugins.json index ebdc00e..81bd5e7 100644 --- a/content/.obsidian/community-plugins.json +++ b/content/.obsidian/community-plugins.json @@ -10,5 +10,6 @@ "agent-client", "manual-sorting", "obsidian-icon-folder", - "image-converter" + "image-converter", + "tasknotes" ] \ No newline at end of file diff --git a/content/.obsidian/plugins/tasknotes/data.json b/content/.obsidian/plugins/tasknotes/data.json new file mode 100644 index 0000000..3e8ca51 --- /dev/null +++ b/content/.obsidian/plugins/tasknotes/data.json @@ -0,0 +1,292 @@ +{ + "tasksFolder": "TaskNotes/Tasks", + "moveArchivedTasks": false, + "archiveFolder": "TaskNotes/Archive", + "taskTag": "task", + "taskIdentificationMethod": "tag", + "hideIdentifyingTagsInCards": false, + "taskPropertyName": "", + "taskPropertyValue": "", + "excludedFolders": "", + "defaultTaskPriority": "normal", + "defaultTaskStatus": "open", + "taskOrgFiltersCollapsed": false, + "taskFilenameFormat": "zettel", + "storeTitleInFilename": true, + "customFilenameTemplate": "{title}", + "taskCreationDefaults": { + "defaultContexts": "", + "defaultTags": "", + "defaultProjects": "", + "useParentNoteAsProject": false, + "defaultTimeEstimate": 0, + "defaultRecurrence": "none", + "defaultDueDate": "none", + "defaultScheduledDate": "today", + "bodyTemplate": "", + "useBodyTemplate": false, + "defaultReminders": [] + }, + "calendarViewSettings": { + "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": true, + "locale": "", + "defaultShowScheduled": true, + "defaultShowDue": true, + "defaultShowDueWhenScheduled": true, + "defaultShowTimeEntries": false, + "defaultShowRecurring": true, + "defaultShowICSEvents": true, + "enableTimeblocking": false, + "defaultShowTimeblocks": true, + "nowIndicator": true, + "selectMirror": true, + "weekNumbers": false, + "showTodayHighlight": true, + "eventMinHeight": 15, + "slotEventOverlap": true, + "eventMaxStack": null, + "dayMaxEvents": true, + "dayMaxEventRows": false + }, + "pomodoroWorkDuration": 25, + "pomodoroShortBreakDuration": 5, + "pomodoroLongBreakDuration": 15, + "pomodoroLongBreakInterval": 4, + "pomodoroAutoStartBreaks": true, + "pomodoroAutoStartWork": false, + "pomodoroNotifications": true, + "pomodoroSoundEnabled": true, + "pomodoroSoundVolume": 50, + "pomodoroStorageLocation": "plugin", + "enableTaskLinkOverlay": true, + "enableInstantTaskConvert": true, + "useDefaultsOnInstantConvert": true, + "enableNaturalLanguageInput": true, + "nlpDefaultToScheduled": true, + "nlpLanguage": "en", + "uiLanguage": "system", + "statusSuggestionTrigger": "*", + "nlpTriggers": { + "triggers": [ + { + "propertyId": "tags", + "trigger": "#", + "enabled": true + }, + { + "propertyId": "contexts", + "trigger": "@", + "enabled": true + }, + { + "propertyId": "projects", + "trigger": "+", + "enabled": true + }, + { + "propertyId": "status", + "trigger": "*", + "enabled": true + }, + { + "propertyId": "priority", + "trigger": "!", + "enabled": false + } + ] + }, + "singleClickAction": "edit", + "doubleClickAction": "openNote", + "projectAutosuggest": { + "enableFuzzy": false, + "rows": [ + "{title|n(Title)}", + "{aliases|n(Aliases)}", + "{file.path|n(Path)}" + ], + "showAdvanced": false, + "requiredTags": [], + "includeFolders": [], + "propertyKey": "", + "propertyValue": "" + }, + "inlineTaskConvertFolder": "{{currentNotePath}}", + "disableNoteIndexing": false, + "suggestionDebounceMs": 0, + "fieldMapping": { + "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", + "reminders": "reminders" + }, + "customStatuses": [ + { + "id": "none", + "value": "none", + "label": "None", + "color": "#cccccc", + "isCompleted": false, + "order": 0, + "autoArchive": false, + "autoArchiveDelay": 5 + }, + { + "id": "open", + "value": "open", + "label": "Open", + "color": "#808080", + "isCompleted": false, + "order": 1, + "autoArchive": false, + "autoArchiveDelay": 5 + }, + { + "id": "in-progress", + "value": "in-progress", + "label": "In progress", + "color": "#0066cc", + "isCompleted": false, + "order": 2, + "autoArchive": false, + "autoArchiveDelay": 5 + }, + { + "id": "done", + "value": "done", + "label": "Done", + "color": "#00aa00", + "isCompleted": true, + "order": 3, + "autoArchive": false, + "autoArchiveDelay": 5 + } + ], + "customPriorities": [ + { + "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 + } + ], + "recurrenceMigrated": false, + "showReleaseNotesOnUpdate": true, + "showTrackedTasksInStatusBar": false, + "autoStopTimeTrackingOnComplete": true, + "autoStopTimeTrackingNotification": false, + "showRelationships": true, + "relationshipsPosition": "bottom", + "showTaskCardInNote": true, + "showExpandableSubtasks": true, + "subtaskChevronPosition": "right", + "viewsButtonAlignment": "right", + "hideCompletedFromOverdue": true, + "icsIntegration": { + "defaultNoteTemplate": "", + "defaultNoteFolder": "", + "icsNoteFilenameFormat": "title", + "customICSNoteFilenameTemplate": "{title}", + "enableAutoExport": false, + "autoExportPath": "tasknotes-calendar.ics", + "autoExportInterval": 60 + }, + "savedViews": [], + "enableNotifications": true, + "notificationType": "system", + "enableAPI": false, + "apiPort": 8080, + "apiAuthToken": "", + "webhooks": [], + "userFields": [], + "enableModalSplitLayout": true, + "defaultVisibleProperties": [ + "status", + "priority", + "due", + "scheduled", + "projects", + "contexts", + "tags", + "blocked", + "blocking" + ], + "inlineVisibleProperties": [ + "status", + "priority", + "due", + "scheduled", + "recurrence" + ], + "enableBases": true, + "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": false, + "useFrontmatterMarkdownLinks": false, + "oauthSetupMode": "advanced", + "lemonSqueezyLicenseKey": "", + "googleOAuthClientId": "", + "googleOAuthClientSecret": "", + "microsoftOAuthClientId": "", + "microsoftOAuthClientSecret": "", + "enableGoogleCalendar": false, + "enableMicrosoftCalendar": false, + "enabledGoogleCalendars": [], + "googleCalendarSyncTokens": {}, + "enabledMicrosoftCalendars": [], + "microsoftCalendarSyncTokens": {}, + "lastSeenVersion": "4.1.3" +} \ No newline at end of file diff --git a/content/.obsidian/plugins/tasknotes/main.js b/content/.obsidian/plugins/tasknotes/main.js new file mode 100644 index 0000000..483ff1b --- /dev/null +++ b/content/.obsidian/plugins/tasknotes/main.js @@ -0,0 +1,1883 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var Yee=Object.create;var Wc=Object.defineProperty;var FF=Object.getOwnPropertyDescriptor;var Gee=Object.getOwnPropertyNames;var Kee=Object.getPrototypeOf,Qee=Object.prototype.hasOwnProperty;var OF=n=>{throw TypeError(n)};var Zee=(n,t,e)=>t in n?Wc(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var b=(n,t)=>()=>(n&&(t=n(n=0)),t);var D=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Be=(n,t)=>{for(var e in t)Wc(n,e,{get:t[e],enumerable:!0})},LF=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Gee(t))!Qee.call(n,a)&&a!==e&&Wc(n,a,{get:()=>t[a],enumerable:!(r=FF(t,a))||r.enumerable});return n};var Ie=(n,t,e)=>(e=n!=null?Yee(Kee(n)):{},LF(t||!n||!n.__esModule?Wc(e,"default",{value:n,enumerable:!0}):e,n)),Wa=n=>LF(Wc({},"__esModule",{value:!0}),n),He=(n,t,e,r)=>{for(var a=r>1?void 0:r?FF(t,e):t,i=n.length-1,s;i>=0;i--)(s=n[i])&&(a=(r?s(t,e,a):s(a))||a);return r&&a&&Wc(t,e,a),a};var C=(n,t,e)=>Zee(n,typeof t!="symbol"?t+"":t,e),BF=(n,t,e)=>t.has(n)||OF("Cannot "+e);var sl=(n,t,e)=>(BF(n,t,"read from private field"),e?e.call(n):t.get(n)),Qg=(n,t,e)=>t.has(n)?OF("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Zg=(n,t,e,r)=>(BF(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e);var Jee,zMe,Jg,jF,pw,mw,Xee,HF,UMe,ete,tte,WMe,hw,qc=b(()=>{Jee=Math.pow(10,8)*24*60*60*1e3,zMe=-Jee,Jg=6048e5,jF=864e5,pw=6e4,mw=36e5,Xee=3600,HF=Xee*24,UMe=HF*7,ete=HF*365.2425,tte=ete/12,WMe=tte*3,hw=Symbol.for("constructDateFrom")});function jt(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&hw in n?n[hw](t):n instanceof Date?new n.constructor(t):new Date(t)}var ua=b(()=>{qc()});function Fe(n,t){return jt(t||n,n)}var qt=b(()=>{ua()});function Zi(n,t,e){let r=Fe(n,e==null?void 0:e.in);return isNaN(t)?jt((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}var ap=b(()=>{ua();qt()});function Vc(n,t,e){let r=Fe(n,e==null?void 0:e.in);if(isNaN(t))return jt((e==null?void 0:e.in)||n,NaN);if(!t)return r;let a=r.getDate(),i=jt((e==null?void 0:e.in)||n,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return a>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}var Xg=b(()=>{ua();qt()});function $c(n,t,e){let{years:r=0,months:a=0,weeks:i=0,days:s=0,hours:o=0,minutes:l=0,seconds:c=0}=t,d=Fe(n,e==null?void 0:e.in),u=a||r?Vc(d,a+r*12):d,p=s||i?Zi(u,s+i*7):u,m=l+o*60,f=(c+m*60)*1e3;return jt((e==null?void 0:e.in)||n,+p+f)}var zF=b(()=>{ap();Xg();ua();qt()});var UF=b(()=>{});var WF=b(()=>{});var qF=b(()=>{});var VF=b(()=>{});var $F=b(()=>{});var YF=b(()=>{});function pi(){return rte}var rte,Yc=b(()=>{rte={}});function nn(n,t){var o,l,c,d,u,p,m,h;let e=pi(),r=(h=(m=(d=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:e.weekStartsOn)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:0,a=Fe(n,t==null?void 0:t.in),i=a.getDay(),s=(i{Yc();qt()});function ol(n,t){return nn(n,{...t,weekStartsOn:1})}var ip=b(()=>{Gc()});function ey(n,t){let e=Fe(n,t==null?void 0:t.in),r=e.getFullYear(),a=jt(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=ol(a),s=jt(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let o=ol(s);return e.getTime()>=i.getTime()?r+1:e.getTime()>=o.getTime()?r:r-1}var ty=b(()=>{ua();ip();qt()});function fw(n){let t=Fe(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}var GF=b(()=>{qt()});function ry(n,...t){let e=jt.bind(null,n||t.find(r=>typeof r=="object"));return t.map(e)}var gw=b(()=>{ua()});function pa(n,t){let e=Fe(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}var ny=b(()=>{qt()});function KF(n,t,e){let[r,a]=ry(e==null?void 0:e.in,n,t),i=pa(r),s=pa(a),o=+i-fw(i),l=+s-fw(s);return Math.round((o-l)/jF)}var yw=b(()=>{GF();gw();qc();ny()});function QF(n,t){let e=ey(n,t),r=jt((t==null?void 0:t.in)||n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),ol(r)}var vw=b(()=>{ua();ty();ip()});var ZF=b(()=>{});var JF=b(()=>{});var XF=b(()=>{});var eO=b(()=>{});var tO=b(()=>{});function rO(n,t,e){return Zi(n,t*7,e)}var nO=b(()=>{ap()});function aO(n,t,e){return Vc(n,t*12,e)}var iO=b(()=>{Xg()});var sO=b(()=>{});var oO=b(()=>{});var lO=b(()=>{});var cO=b(()=>{});var dO=b(()=>{});var uO=b(()=>{});var pO=b(()=>{});var mO=b(()=>{});var hO=b(()=>{});var fO=b(()=>{});function bw(n,t,e){let[r,a]=ry(e==null?void 0:e.in,n,t);return+pa(r)==+pa(a)}var gO=b(()=>{gw();ny()});function yO(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}var Tw=b(()=>{});function wr(n){return!(!yO(n)&&typeof n!="number"||isNaN(+Fe(n)))}var kw=b(()=>{Tw();qt()});var vO=b(()=>{});var bO=b(()=>{});var TO=b(()=>{});var kO=b(()=>{});var wO=b(()=>{});var SO=b(()=>{});var DO=b(()=>{});var EO=b(()=>{});var xO=b(()=>{});var CO=b(()=>{});var PO=b(()=>{});var MO=b(()=>{});var AO=b(()=>{});var IO=b(()=>{});var _O=b(()=>{});function ay(n,t){let e=Fe(n,t==null?void 0:t.in),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}var NO=b(()=>{qt()});var RO=b(()=>{});var FO=b(()=>{});var OO=b(()=>{});var LO=b(()=>{});var BO=b(()=>{});var jO=b(()=>{});var HO=b(()=>{});var zO=b(()=>{});var UO=b(()=>{});var WO=b(()=>{});var qO=b(()=>{});var VO=b(()=>{});var $O=b(()=>{});var YO=b(()=>{});function iy(n,t){let e=Fe(n,t==null?void 0:t.in);return e.setDate(1),e.setHours(0,0,0,0),e}var GO=b(()=>{qt()});var KO=b(()=>{});function QO(n,t){let e=Fe(n,t==null?void 0:t.in),r=e.getFullYear();return e.setFullYear(r+1,0,0),e.setHours(23,59,59,999),e}var ZO=b(()=>{qt()});function sy(n,t){let e=Fe(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}var ww=b(()=>{qt()});var JO=b(()=>{});var XO=b(()=>{});var eL=b(()=>{});var tL=b(()=>{});function Kc(n,t){var o,l,c,d,u,p,m,h;let e=pi(),r=(h=(m=(d=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:e.weekStartsOn)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:0,a=Fe(n,t==null?void 0:t.in),i=a.getDay(),s=(i{Yc();qt()});var nL=b(()=>{});var aL=b(()=>{});var iL=b(()=>{});var sL=b(()=>{});var oL=b(()=>{});var lL=b(()=>{});var cL=b(()=>{});var dL=b(()=>{});var nte,uL,pL=b(()=>{nte={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"}},uL=(n,t,e)=>{let r,a=nte[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r}});function oy(n){return(t={})=>{let e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}var mL=b(()=>{});var ate,ite,ste,hL,fL=b(()=>{mL();ate={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ite={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ste={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hL={date:oy({formats:ate,defaultWidth:"full"}),time:oy({formats:ite,defaultWidth:"full"}),dateTime:oy({formats:ste,defaultWidth:"full"})}});var ote,gL,yL=b(()=>{ote={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gL=(n,t,e,r)=>ote[n]});function Qc(n){return(t,e)=>{let r=e!=null&&e.context?String(e.context):"standalone",a;if(r==="formatting"&&n.formattingValues){let s=n.defaultFormattingWidth||n.defaultWidth,o=e!=null&&e.width?String(e.width):s;a=n.formattingValues[o]||n.formattingValues[s]}else{let s=n.defaultWidth,o=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[o]||n.values[s]}let i=n.argumentCallback?n.argumentCallback(t):t;return a[i]}}var vL=b(()=>{});var lte,cte,dte,ute,pte,mte,hte,bL,TL=b(()=>{vL();lte={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},cte={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},dte={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"]},ute={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"]},pte={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"}},mte={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"}},hte=(n,t)=>{let e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},bL={ordinalNumber:hte,era:Qc({values:lte,defaultWidth:"wide"}),quarter:Qc({values:cte,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Qc({values:dte,defaultWidth:"wide"}),day:Qc({values:ute,defaultWidth:"wide"}),dayPeriod:Qc({values:pte,defaultWidth:"wide",formattingValues:mte,defaultFormattingWidth:"wide"})}});function Zc(n){return(t,e={})=>{let r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],i=t.match(a);if(!i)return null;let s=i[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?gte(o,u=>u.test(s)):fte(o,u=>u.test(s)),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;let d=t.slice(s.length);return{value:c,rest:d}}}function fte(n,t){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function gte(n,t){for(let e=0;e{});function wL(n){return(t,e={})=>{let r=t.match(n.matchPattern);if(!r)return null;let a=r[0],i=t.match(n.parsePattern);if(!i)return null;let s=n.valueCallback?n.valueCallback(i[0]):i[0];s=e.valueCallback?e.valueCallback(s):s;let o=t.slice(a.length);return{value:s,rest:o}}}var SL=b(()=>{});var yte,vte,bte,Tte,kte,wte,Ste,Dte,Ete,xte,Cte,Pte,DL,EL=b(()=>{kL();SL();yte=/^(\d+)(th|st|nd|rd)?/i,vte=/\d+/i,bte={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},Tte={any:[/^b/i,/^(a|c)/i]},kte={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wte={any:[/1/i,/2/i,/3/i,/4/i]},Ste={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},Dte={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]},Ete={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},xte={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]},Cte={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},Pte={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}},DL={ordinalNumber:wL({matchPattern:yte,parsePattern:vte,valueCallback:n=>parseInt(n,10)}),era:Zc({matchPatterns:bte,defaultMatchWidth:"wide",parsePatterns:Tte,defaultParseWidth:"any"}),quarter:Zc({matchPatterns:kte,defaultMatchWidth:"wide",parsePatterns:wte,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Zc({matchPatterns:Ste,defaultMatchWidth:"wide",parsePatterns:Dte,defaultParseWidth:"any"}),day:Zc({matchPatterns:Ete,defaultMatchWidth:"wide",parsePatterns:xte,defaultParseWidth:"any"}),dayPeriod:Zc({matchPatterns:Cte,defaultMatchWidth:"any",parsePatterns:Pte,defaultParseWidth:"any"})}});var Sw,xL=b(()=>{pL();fL();yL();TL();EL();Sw={code:"en-US",formatDistance:uL,formatLong:hL,formatRelative:gL,localize:bL,match:DL,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var CL=b(()=>{xL()});function PL(n,t){let e=Fe(n,t==null?void 0:t.in);return KF(e,sy(e))+1}var Dw=b(()=>{yw();ww();qt()});function ML(n,t){let e=Fe(n,t==null?void 0:t.in),r=+ol(e)-+QF(e);return Math.round(r/Jg)+1}var Ew=b(()=>{qc();ip();vw();qt()});function ly(n,t){var d,u,p,m,h,f,g,v;let e=Fe(n,t==null?void 0:t.in),r=e.getFullYear(),a=pi(),i=(v=(g=(m=(p=t==null?void 0:t.firstWeekContainsDate)!=null?p:(u=(d=t==null?void 0:t.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?v:1,s=jt((t==null?void 0:t.in)||n,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let o=nn(s,t),l=jt((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);let c=nn(l,t);return+e>=+o?r+1:+e>=+c?r:r-1}var cy=b(()=>{Yc();ua();Gc();qt()});function AL(n,t){var o,l,c,d,u,p,m,h;let e=pi(),r=(h=(m=(d=(c=t==null?void 0:t.firstWeekContainsDate)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)!=null?d:e.firstWeekContainsDate)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)!=null?h:1,a=ly(n,t),i=jt((t==null?void 0:t.in)||n,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),nn(i,t)}var xw=b(()=>{Yc();ua();cy();Gc()});function IL(n,t){let e=Fe(n,t==null?void 0:t.in),r=+nn(e,t)-+AL(e,t);return Math.round(r/Jg)+1}var Cw=b(()=>{qc();Gc();xw();qt()});function ut(n,t){let e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}var Pw=b(()=>{});var Ji,_L=b(()=>{Pw();Ji={y(n,t){let e=n.getFullYear(),r=e>0?e:1-e;return ut(t==="yy"?r%100:r,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):ut(e+1,2)},d(n,t){return ut(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return ut(n.getHours()%12||12,t.length)},H(n,t){return ut(n.getHours(),t.length)},m(n,t){return ut(n.getMinutes(),t.length)},s(n,t){return ut(n.getSeconds(),t.length)},S(n,t){let e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return ut(a,t.length)}}});function NL(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),i=r%60;return i===0?e+String(a):e+String(a)+t+ut(i,2)}function RL(n,t){return n%60===0?(n>0?"-":"+")+ut(Math.abs(n)/60,2):ll(n,t)}function ll(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=ut(Math.trunc(r/60),2),i=ut(r%60,2);return e+a+t+i}var Jc,Mw,FL=b(()=>{Dw();Ew();ty();Cw();cy();Pw();_L();Jc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mw={G:function(n,t,e){let r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return Ji.y(n,t)},Y:function(n,t,e,r){let a=ly(n,r),i=a>0?a:1-a;if(t==="YY"){let s=i%100;return ut(s,2)}return t==="Yo"?e.ordinalNumber(i,{unit:"year"}):ut(i,t.length)},R:function(n,t){let e=ey(n);return ut(e,t.length)},u:function(n,t){let e=n.getFullYear();return ut(e,t.length)},Q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ut(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ut(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){let r=n.getMonth();switch(t){case"M":case"MM":return Ji.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){let r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return ut(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){let a=IL(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):ut(a,t.length)},I:function(n,t,e){let r=ML(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):ut(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Ji.d(n,t)},D:function(n,t,e){let r=PL(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):ut(r,t.length)},E:function(n,t,e){let r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ut(i,2);case"eo":return e.ordinalNumber(i,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ut(i,t.length);case"co":return e.ordinalNumber(i,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){let r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return ut(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){let a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){let r=n.getHours(),a;switch(r===12?a=Jc.noon:r===0?a=Jc.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){let r=n.getHours(),a;switch(r>=17?a=Jc.evening:r>=12?a=Jc.afternoon:r>=4?a=Jc.morning:a=Jc.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Ji.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Ji.H(n,t)},K:function(n,t,e){let r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):ut(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):ut(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ji.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Ji.s(n,t)},S:function(n,t){return Ji.S(n,t)},X:function(n,t,e){let r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return RL(r);case"XXXX":case"XX":return ll(r);case"XXXXX":case"XXX":default:return ll(r,":")}},x:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"x":return RL(r);case"xxxx":case"xx":return ll(r);case"xxxxx":case"xxx":default:return ll(r,":")}},O:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+NL(r,":");case"OOOO":default:return"GMT"+ll(r,":")}},z:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+NL(r,":");case"zzzz":default:return"GMT"+ll(r,":")}},t:function(n,t,e){let r=Math.trunc(+n/1e3);return ut(r,t.length)},T:function(n,t,e){return ut(+n,t.length)}}});var OL,LL,Mte,BL,jL=b(()=>{OL=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},LL=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Mte=(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return OL(n,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",OL(r,t)).replace("{{time}}",LL(a,t))},BL={p:LL,P:Mte}});function HL(n){return Ate.test(n)}function zL(n){return Ite.test(n)}function UL(n,t,e){let r=Nte(n,t,e);if(console.warn(r),_te.includes(n))throw new RangeError(r)}function Nte(n,t,e){let r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ate,Ite,_te,WL=b(()=>{Ate=/^D+$/,Ite=/^Y+$/,_te=["D","DD","YY","YYYY"]});function M(n,t,e){var d,u,p,m,h,f,g,v,T,k,w,S,x,I,A,B,z,U;let r=pi(),a=(u=(d=e==null?void 0:e.locale)!=null?d:r.locale)!=null?u:Sw,i=(k=(T=(f=(h=e==null?void 0:e.firstWeekContainsDate)!=null?h:(m=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:r.firstWeekContainsDate)!=null?T:(v=(g=r.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)!=null?k:1,s=(U=(z=(I=(x=e==null?void 0:e.weekStartsOn)!=null?x:(S=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:S.weekStartsOn)!=null?I:r.weekStartsOn)!=null?z:(B=(A=r.locale)==null?void 0:A.options)==null?void 0:B.weekStartsOn)!=null?U:0,o=Fe(n,e==null?void 0:e.in);if(!wr(o))throw new RangeError("Invalid time value");let l=t.match(Fte).map(N=>{let P=N[0];if(P==="p"||P==="P"){let _=BL[P];return _(N,a.formatLong)}return N}).join("").match(Rte).map(N=>{if(N==="''")return{isToken:!1,value:"'"};let P=N[0];if(P==="'")return{isToken:!1,value:jte(N)};if(Mw[P])return{isToken:!0,value:N};if(P.match(Bte))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return{isToken:!1,value:N}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));let c={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return l.map(N=>{if(!N.isToken)return N.value;let P=N.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&zL(P)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&HL(P))&&UL(P,t,String(n));let _=Mw[P[0]];return _(o,P,a.localize,c)}).join("")}function jte(n){let t=n.match(Ote);return t?t[1].replace(Lte,"'"):n}var Rte,Fte,Ote,Lte,Bte,qL=b(()=>{CL();Yc();FL();jL();WL();kw();qt();Rte=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fte=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ote=/^'([^]*?)'?$/,Lte=/''/g,Bte=/[a-zA-Z]/});var VL=b(()=>{});var $L=b(()=>{});var YL=b(()=>{});var GL=b(()=>{});var KL=b(()=>{});var QL=b(()=>{});var ZL=b(()=>{});var JL=b(()=>{});var XL=b(()=>{});var e1=b(()=>{});var t1=b(()=>{});var r1=b(()=>{});var n1=b(()=>{});var a1=b(()=>{});var i1=b(()=>{});var s1=b(()=>{});var o1=b(()=>{});var l1=b(()=>{});var c1=b(()=>{});var d1=b(()=>{});var u1=b(()=>{});var p1=b(()=>{});var m1=b(()=>{});var h1=b(()=>{});var f1=b(()=>{});var g1=b(()=>{});var y1=b(()=>{});var v1=b(()=>{});var b1=b(()=>{});var T1=b(()=>{});var k1=b(()=>{});var w1=b(()=>{});var S1=b(()=>{});var D1=b(()=>{});var E1=b(()=>{});var x1=b(()=>{});var C1=b(()=>{});var P1=b(()=>{});var M1=b(()=>{});var A1=b(()=>{});var I1=b(()=>{});function Aw(n,t){return+Fe(n)<+Fe(t)}var _1=b(()=>{qt()});var N1=b(()=>{});var R1=b(()=>{});var F1=b(()=>{});var O1=b(()=>{});var L1=b(()=>{});var B1=b(()=>{});var j1=b(()=>{});var H1=b(()=>{});var z1=b(()=>{});var U1=b(()=>{});var W1=b(()=>{});var q1=b(()=>{});var V1=b(()=>{});var $1=b(()=>{});var Y1=b(()=>{});var G1=b(()=>{});var K1=b(()=>{});var Q1=b(()=>{});var Z1=b(()=>{});var J1=b(()=>{});var X1=b(()=>{});var eB=b(()=>{});var tB=b(()=>{});var rB=b(()=>{});var nB=b(()=>{});var aB=b(()=>{});var iB=b(()=>{});var sB=b(()=>{});var oB=b(()=>{});var lB=b(()=>{});var cB=b(()=>{});var dB=b(()=>{});var uB=b(()=>{});var pB=b(()=>{});var mB=b(()=>{});var hB=b(()=>{});var fB=b(()=>{});var gB=b(()=>{});var yB=b(()=>{});var vB=b(()=>{});function Xc(n,t,e){return Zi(n,-t,e)}var bB=b(()=>{ap()});var TB=b(()=>{});var kB=b(()=>{});var wB=b(()=>{});var SB=b(()=>{});var DB=b(()=>{});var EB=b(()=>{});var xB=b(()=>{});var CB=b(()=>{});var PB=b(()=>{});var MB=b(()=>{});var AB=b(()=>{});var IB=b(()=>{});var _B=b(()=>{});var NB=b(()=>{});var RB=b(()=>{});var FB=b(()=>{});var OB=b(()=>{});var LB=b(()=>{});var BB=b(()=>{});var jB=b(()=>{});var HB=b(()=>{});var zB=b(()=>{});var UB=b(()=>{});var WB=b(()=>{});var qB=b(()=>{});function qa(n,t){var c;let e=()=>jt(t==null?void 0:t.in,NaN),r=(c=t==null?void 0:t.additionalDigits)!=null?c:2,a=Wte(n),i;if(a.date){let d=qte(a.date,r);i=Vte(d.restDateString,d.year)}if(!i||isNaN(+i))return e();let s=+i,o=0,l;if(a.time&&(o=$te(a.time),isNaN(o)))return e();if(a.timezone){if(l=Yte(a.timezone),isNaN(l))return e()}else{let d=new Date(s+o),u=Fe(0,t==null?void 0:t.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return Fe(s+o+l,t==null?void 0:t.in)}function Wte(n){let t={},e=n.split(dy.dateTimeDelimiter),r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],dy.timeZoneDelimiter.test(t.date)&&(t.date=n.split(dy.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){let a=dy.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function qte(n,t){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};let a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:n.slice((r[1]||r[2]).length)}}function Vte(n,t){if(t===null)return new Date(NaN);let e=n.match(Hte);if(!e)return new Date(NaN);let r=!!e[4],a=sp(e[1]),i=sp(e[2])-1,s=sp(e[3]),o=sp(e[4]),l=sp(e[5])-1;if(r)return Jte(t,o,l)?Gte(t,o,l):new Date(NaN);{let c=new Date(0);return!Qte(t,i,s)||!Zte(t,a)?new Date(NaN):(c.setUTCFullYear(t,i,Math.max(a,s)),c)}}function sp(n){return n?parseInt(n):1}function $te(n){let t=n.match(zte);if(!t)return NaN;let e=Iw(t[1]),r=Iw(t[2]),a=Iw(t[3]);return Xte(e,r,a)?e*mw+r*pw+a*1e3:NaN}function Iw(n){return n&&parseFloat(n.replace(",","."))||0}function Yte(n){if(n==="Z")return 0;let t=n.match(Ute);if(!t)return 0;let e=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return ere(r,a)?e*(r*mw+a*pw):NaN}function Gte(n,t,e){let r=new Date(0);r.setUTCFullYear(n,0,4);let a=r.getUTCDay()||7,i=(t-1)*7+e+1-a;return r.setUTCDate(r.getUTCDate()+i),r}function VB(n){return n%400===0||n%4===0&&n%100!==0}function Qte(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(Kte[t]||(VB(n)?29:28))}function Zte(n,t){return t>=1&&t<=(VB(n)?366:365)}function Jte(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function Xte(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function ere(n,t){return t>=0&&t<=59}var dy,Hte,zte,Ute,Kte,$B=b(()=>{qc();ua();qt();dy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Hte=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,zte=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ute=/^([+-])(\d{2})(?::?(\d{2}))?$/;Kte=[31,null,31,30,31,30,31,31,30,31,30,31]});var YB=b(()=>{});var GB=b(()=>{});var KB=b(()=>{});var QB=b(()=>{});var ZB=b(()=>{});var JB=b(()=>{});var XB=b(()=>{});var ej=b(()=>{});var tj=b(()=>{});var rj=b(()=>{});var nj=b(()=>{});var aj=b(()=>{});var ij=b(()=>{});var sj=b(()=>{});var oj=b(()=>{});var lj=b(()=>{});var cj=b(()=>{});var dj=b(()=>{});var uj=b(()=>{});var pj=b(()=>{});var mj=b(()=>{});var hj=b(()=>{});var fj=b(()=>{});var gj=b(()=>{});var yj=b(()=>{});var vj=b(()=>{});var bj=b(()=>{});var Tj=b(()=>{});var kj=b(()=>{});var wj=b(()=>{});var Sj=b(()=>{});var Dj=b(()=>{});var Ej=b(()=>{});var xj=b(()=>{});var Cj=b(()=>{});var Pj=b(()=>{});var Mj=b(()=>{});var Aj=b(()=>{});var Ij=b(()=>{});var _j=b(()=>{});var Nj=b(()=>{});var Rj=b(()=>{});var Fj=b(()=>{});var Oj=b(()=>{});var Lj=b(()=>{});var Bj=b(()=>{});var rr=b(()=>{zF();VF();ap();YF();JF();$F();XF();Xg();eO();tO();nO();iO();sO();cO();dO();uO();pO();mO();ua();hO();fO();vO();yw();bO();TO();kO();SO();DO();EO();xO();CO();MO();AO();IO();FO();OO();LO();BO();jO();HO();zO();UO();WO();VO();$O();YO();KO();JO();XO();_O();eL();tL();nL();aL();iL();NO();sL();oL();lL();cL();rL();ZO();dL();qL();VL();$L();YL();GL();KL();QL();ZL();JL();XL();e1();t1();r1();n1();a1();Dw();i1();o1();l1();c1();d1();u1();Ew();ty();p1();m1();h1();f1();g1();wO();y1();v1();b1();Cw();T1();cy();w1();S1();D1();E1();x1();C1();P1();M1();A1();I1();_1();Tw();N1();R1();F1();O1();L1();RO();s1();q1();V1();$1();gO();G1();Q1();Z1();X1();eB();tB();nB();K1();aB();UF();WF();iB();sB();oB();lB();cB();dB();uB();pB();mB();hB();fB();gB();kw();yB();qF();vB();TB();kB();SB();DB();k1();EB();wB();xB();CB();oO();PB();MB();AB();IB();lO();_B();NB();RB();FB();OB();LB();BB();jB();HB();zB();UB();WB();qB();W1();$B();YB();GB();KB();QB();ZB();JB();XB();ej();tj();rj();nj();aj();ij();sj();oj();lj();dj();uj();z1();pj();mj();hj();U1();H1();ZF();fj();gj();cj();yj();vj();j1();bj();Tj();ny();kj();Y1();ip();vw();J1();GO();qO();rB();wj();Sj();Gc();xw();ww();Dj();xj();Cj();bB();Pj();PO();Mj();Aj();Ej();Ij();_j();Nj();Rj();qt();B1();Fj();Oj();Lj();Bj()});var Xi=D(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});var Ht=require("obsidian"),_w="YYYY-MM-DD",Nw="gggg-[W]ww",jj="YYYY-MM",Hj="YYYY-[Q]Q",zj="YYYY";function op(n){var e,r;let t=window.app.plugins.getPlugin("periodic-notes");return t&&((r=(e=t.settings)==null?void 0:e[n])==null?void 0:r.enabled)}function lp(){var n,t,e,r;try{let{internalPlugins:a,plugins:i}=window.app;if(op("daily")){let{format:c,folder:d,template:u}=((t=(n=i.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:t.daily)||{};return{format:c||_w,folder:(d==null?void 0:d.trim())||"",template:(u==null?void 0:u.trim())||""}}let{folder:s,format:o,template:l}=((r=(e=a.getPluginById("daily-notes"))==null?void 0:e.instance)==null?void 0:r.options)||{};return{format:o||_w,folder:(s==null?void 0:s.trim())||"",template:(l==null?void 0:l.trim())||""}}catch(a){console.info("No custom daily note settings found!",a)}}function cp(){var n,t,e,r,a,i,s;try{let o=window.app.plugins,l=(n=o.getPlugin("calendar"))==null?void 0:n.options,c=(e=(t=o.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:e.weekly;if(op("weekly"))return{format:c.format||Nw,folder:((r=c.folder)==null?void 0:r.trim())||"",template:((a=c.template)==null?void 0:a.trim())||""};let d=l||{};return{format:d.weeklyNoteFormat||Nw,folder:((i=d.weeklyNoteFolder)==null?void 0:i.trim())||"",template:((s=d.weeklyNoteTemplate)==null?void 0:s.trim())||""}}catch(o){console.info("No custom weekly note settings found!",o)}}function dp(){var t,e,r,a;let n=window.app.plugins;try{let i=op("monthly")&&((e=(t=n.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:e.monthly)||{};return{format:i.format||jj,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom monthly note settings found!",i)}}function up(){var t,e,r,a;let n=window.app.plugins;try{let i=op("quarterly")&&((e=(t=n.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:e.quarterly)||{};return{format:i.format||Hj,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom quarterly note settings found!",i)}}function pp(){var t,e,r,a;let n=window.app.plugins;try{let i=op("yearly")&&((e=(t=n.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:e.yearly)||{};return{format:i.format||zj,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom yearly note settings found!",i)}}function Uj(...n){let t=[];for(let r=0,a=n.length;r{let T=r(),k=n.clone().set({hour:T.get("hour"),minute:T.get("minute"),second:T.get("second")});return h&&k.add(parseInt(f,10),g),v?k.format(v.substring(1).trim()):k.format(i)}).replace(/{{\s*yesterday\s*}}/gi,n.clone().subtract(1,"day").format(i)).replace(/{{\s*tomorrow\s*}}/gi,n.clone().add(1,"d").format(i)));return t.foldManager.save(u,l),u}catch(u){console.error(`Failed to create file: '${d}'`,u),new Ht.Notice("Unable to create new file.")}}function ire(n,t){var e;return(e=t[Va(n,"day")])!=null?e:null}function sre(){let{vault:n}=window.app,{folder:t}=lp(),e=n.getAbstractFileByPath(Ht.normalizePath(t));if(!e)throw new Rw("Failed to find daily notes folder");let r={};return Ht.Vault.recurseChildren(e,a=>{if(a instanceof Ht.TFile){let i=td(a,"day");if(i){let s=Va(i,"day");r[s]=a}}}),r}var Fw=class extends Error{};function ore(){let{moment:n}=window,t=n.localeData()._week.dow,e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)e.push(e.shift()),t--;return e}function lre(n){return ore().indexOf(n.toLowerCase())}async function $j(n){let{vault:t}=window.app,{template:e,format:r,folder:a}=cp(),[i,s]=await ed(e),o=n.format(r),l=await mp(a,o);try{let c=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),h),f?v.format(f.substring(1).trim()):v.format(r)}).replace(/{{\s*title\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,u,p)=>{let m=lre(u);return n.weekday(m).format(p.trim())}));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ht.Notice("Unable to create new file.")}}function cre(n,t){var e;return(e=t[Va(n,"week")])!=null?e:null}function dre(){let n={};if(!Gj())return n;let{vault:t}=window.app,{folder:e}=cp(),r=t.getAbstractFileByPath(Ht.normalizePath(e));if(!r)throw new Fw("Failed to find weekly notes folder");return Ht.Vault.recurseChildren(r,a=>{if(a instanceof Ht.TFile){let i=td(a,"week");if(i){let s=Va(i,"week");n[s]=a}}}),n}var Ow=class extends Error{};async function Yj(n){let{vault:t}=window.app,{template:e,format:r,folder:a}=dp(),[i,s]=await ed(e),o=n.format(r),l=await mp(a,o);try{let c=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),h),f?v.format(f.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ht.Notice("Unable to create new file.")}}function ure(n,t){var e;return(e=t[Va(n,"month")])!=null?e:null}function pre(){let n={};if(!Kj())return n;let{vault:t}=window.app,{folder:e}=dp(),r=t.getAbstractFileByPath(Ht.normalizePath(e));if(!r)throw new Ow("Failed to find monthly notes folder");return Ht.Vault.recurseChildren(r,a=>{if(a instanceof Ht.TFile){let i=td(a,"month");if(i){let s=Va(i,"month");n[s]=a}}}),n}var Lw=class extends Error{};async function mre(n){let{vault:t}=window.app,{template:e,format:r,folder:a}=up(),[i,s]=await ed(e),o=n.format(r),l=await mp(a,o);try{let c=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),h),f?v.format(f.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ht.Notice("Unable to create new file.")}}function hre(n,t){var e;return(e=t[Va(n,"quarter")])!=null?e:null}function fre(){let n={};if(!Qj())return n;let{vault:t}=window.app,{folder:e}=up(),r=t.getAbstractFileByPath(Ht.normalizePath(e));if(!r)throw new Lw("Failed to find quarterly notes folder");return Ht.Vault.recurseChildren(r,a=>{if(a instanceof Ht.TFile){let i=td(a,"quarter");if(i){let s=Va(i,"quarter");n[s]=a}}}),n}var Bw=class extends Error{};async function gre(n){let{vault:t}=window.app,{template:e,format:r,folder:a}=pp(),[i,s]=await ed(e),o=n.format(r),l=await mp(a,o);try{let c=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,h,f)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),h),f?v.format(f.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new Ht.Notice("Unable to create new file.")}}function yre(n,t){var e;return(e=t[Va(n,"year")])!=null?e:null}function vre(){let n={};if(!Zj())return n;let{vault:t}=window.app,{folder:e}=pp(),r=t.getAbstractFileByPath(Ht.normalizePath(e));if(!r)throw new Bw("Failed to find yearly notes folder");return Ht.Vault.recurseChildren(r,a=>{if(a instanceof Ht.TFile){let i=td(a,"year");if(i){let s=Va(i,"year");n[s]=a}}}),n}function bre(){var r,a;let{app:n}=window,t=n.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;let e=n.plugins.getPlugin("periodic-notes");return e&&((a=(r=e.settings)==null?void 0:r.daily)==null?void 0:a.enabled)}function Gj(){var e,r;let{app:n}=window;if(n.plugins.getPlugin("calendar"))return!0;let t=n.plugins.getPlugin("periodic-notes");return t&&((r=(e=t.settings)==null?void 0:e.weekly)==null?void 0:r.enabled)}function Kj(){var e,r;let{app:n}=window,t=n.plugins.getPlugin("periodic-notes");return t&&((r=(e=t.settings)==null?void 0:e.monthly)==null?void 0:r.enabled)}function Qj(){var e,r;let{app:n}=window,t=n.plugins.getPlugin("periodic-notes");return t&&((r=(e=t.settings)==null?void 0:e.quarterly)==null?void 0:r.enabled)}function Zj(){var e,r;let{app:n}=window,t=n.plugins.getPlugin("periodic-notes");return t&&((r=(e=t.settings)==null?void 0:e.yearly)==null?void 0:r.enabled)}function Tre(n){let t={day:lp,week:cp,month:dp,quarter:up,year:pp}[n];return t()}function kre(n,t){return{day:Vj,month:Yj,week:$j}[n](t)}We.DEFAULT_DAILY_NOTE_FORMAT=_w;We.DEFAULT_MONTHLY_NOTE_FORMAT=jj;We.DEFAULT_QUARTERLY_NOTE_FORMAT=Hj;We.DEFAULT_WEEKLY_NOTE_FORMAT=Nw;We.DEFAULT_YEARLY_NOTE_FORMAT=zj;We.appHasDailyNotesPluginLoaded=bre;We.appHasMonthlyNotesPluginLoaded=Kj;We.appHasQuarterlyNotesPluginLoaded=Qj;We.appHasWeeklyNotesPluginLoaded=Gj;We.appHasYearlyNotesPluginLoaded=Zj;We.createDailyNote=Vj;We.createMonthlyNote=Yj;We.createPeriodicNote=kre;We.createQuarterlyNote=mre;We.createWeeklyNote=$j;We.createYearlyNote=gre;We.getAllDailyNotes=sre;We.getAllMonthlyNotes=pre;We.getAllQuarterlyNotes=fre;We.getAllWeeklyNotes=dre;We.getAllYearlyNotes=vre;We.getDailyNote=ire;We.getDailyNoteSettings=lp;We.getDateFromFile=td;We.getDateFromPath=are;We.getDateUID=Va;We.getMonthlyNote=ure;We.getMonthlyNoteSettings=dp;We.getPeriodicNoteSettings=Tre;We.getQuarterlyNote=hre;We.getQuarterlyNoteSettings=up;We.getTemplateInfo=ed;We.getWeeklyNote=cre;We.getWeeklyNoteSettings=cp;We.getYearlyNote=yre;We.getYearlyNoteSettings=pp});var jw={};Be(jw,{DEFAULT_CALENDAR_VIEW_SETTINGS:()=>tH,DEFAULT_FIELD_MAPPING:()=>uy,DEFAULT_ICS_INTEGRATION_SETTINGS:()=>rH,DEFAULT_INTERNAL_VISIBLE_PROPERTIES:()=>rd,DEFAULT_NLP_TRIGGERS:()=>aH,DEFAULT_PRIORITIES:()=>Xj,DEFAULT_PROJECT_AUTOSUGGEST:()=>nH,DEFAULT_SETTINGS:()=>dr,DEFAULT_STATUSES:()=>Jj,DEFAULT_TASK_CREATION_DEFAULTS:()=>eH});var rd,uy,Jj,Xj,eH,tH,rH,nH,aH,dr,to=b(()=>{rd=["status","priority","due","scheduled","projects","contexts"],uy={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",reminders:"reminders"},Jj=[{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}],Xj=[{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}],eH={defaultContexts:"",defaultTags:"",defaultProjects:"",useParentNoteAsProject:!1,defaultTimeEstimate:0,defaultRecurrence:"none",defaultDueDate:"none",defaultScheduledDate:"today",bodyTemplate:"",useBodyTemplate:!1,defaultReminders:[]},tH={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,defaultShowTimeEntries:!1,defaultShowRecurring:!0,defaultShowICSEvents:!0,enableTimeblocking:!1,defaultShowTimeblocks:!0,nowIndicator:!0,selectMirror:!0,weekNumbers:!1,showTodayHighlight:!0,eventMinHeight:15,slotEventOverlap:!0,eventMaxStack:null,dayMaxEvents:!0,dayMaxEventRows:!1},rH={defaultNoteTemplate:"",defaultNoteFolder:"",icsNoteFilenameFormat:"title",customICSNoteFilenameTemplate:"{title}",enableAutoExport:!1,autoExportPath:"tasknotes-calendar.ics",autoExportInterval:60},nH={enableFuzzy:!1,rows:["{title|n(Title)}","{aliases|n(Aliases)}","{file.path|n(Path)}"],showAdvanced:!1,requiredTags:[],includeFolders:[],propertyKey:"",propertyValue:""},aH={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}]},dr={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:eH,calendarViewSettings:tH,pomodoroWorkDuration:25,pomodoroShortBreakDuration:5,pomodoroLongBreakDuration:15,pomodoroLongBreakInterval:4,pomodoroAutoStartBreaks:!0,pomodoroAutoStartWork:!1,pomodoroNotifications:!0,pomodoroSoundEnabled:!0,pomodoroSoundVolume:50,pomodoroStorageLocation:"plugin",enableTaskLinkOverlay:!0,enableInstantTaskConvert:!0,useDefaultsOnInstantConvert:!0,enableNaturalLanguageInput:!0,nlpDefaultToScheduled:!0,nlpLanguage:"en",uiLanguage:"system",statusSuggestionTrigger:"*",nlpTriggers:aH,singleClickAction:"edit",doubleClickAction:"openNote",projectAutosuggest:nH,inlineTaskConvertFolder:"{{currentNotePath}}",disableNoteIndexing:!1,suggestionDebounceMs:0,fieldMapping:uy,customStatuses:Jj,customPriorities:Xj,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:rH,savedViews:[],enableNotifications:!0,notificationType:"system",enableAPI:!1,apiPort:8080,apiAuthToken:"",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,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,useFrontmatterMarkdownLinks:!1,oauthSetupMode:"advanced",lemonSqueezyLicenseKey:"",googleOAuthClientId:"",googleOAuthClientSecret:"",microsoftOAuthClientId:"",microsoftOAuthClientSecret:"",enableGoogleCalendar:!1,enableMicrosoftCalendar:!1,enabledGoogleCalendars:[],googleCalendarSyncTokens:{},enabledMicrosoftCalendars:[],microsoftCalendarSyncTokens:{}}});function Me(n,t){return new cl.Setting(n).setName(t.name).setDesc(t.desc).addToggle(e=>{e.setValue(t.getValue()).onChange(t.setValue)})}function nr(n,t){return new cl.Setting(n).setName(t.name).setDesc(t.desc).addText(e=>{if(e.setValue(t.getValue()),t.debounceMs&&t.debounceMs>0){let r=nd(t.setValue,t.debounceMs);e.onChange(r)}else e.onChange(t.setValue);return t.placeholder&&e.setPlaceholder(t.placeholder),t.ariaLabel&&e.inputEl.setAttribute("aria-label",t.ariaLabel),e.inputEl.addClass("settings-view__input"),e})}function ur(n,t){return new cl.Setting(n).setName(t.name).setDesc(t.desc).addDropdown(e=>(t.options.forEach(r=>{e.addOption(r.value,r.label)}),e.setValue(t.getValue()).onChange(t.setValue),t.ariaLabel&&e.selectEl.setAttribute("aria-label",t.ariaLabel),e))}function zn(n,t){let e=t.debounceMs?nd(t.setValue,t.debounceMs):t.setValue;return new cl.Setting(n).setName(t.name).setDesc(t.desc).addText(r=>(r.setValue(t.getValue().toString()).onChange(a=>{let i=parseInt(a);if(!isNaN(i)){if(t.min!==void 0&&it.max)return;e(i)}}),r.inputEl.type="number",t.placeholder&&r.setPlaceholder(t.placeholder),t.min!==void 0&&r.inputEl.setAttribute("min",t.min.toString()),t.max!==void 0&&r.inputEl.setAttribute("max",t.max.toString()),t.ariaLabel&&r.inputEl.setAttribute("aria-label",t.ariaLabel),r.inputEl.addClass("settings-view__input"),r))}function hp(n,t){return new cl.Setting(n).setName(t.name).setDesc(t.desc).addButton(e=>(e.setButtonText(t.buttonText).onClick(t.onClick),t.buttonClass?e.buttonEl.addClass(t.buttonClass):e.buttonEl.addClasses(["tn-btn","tn-btn--ghost"]),e))}function Ae(n,t){return new cl.Setting(n).setName(t).setHeading()}function Pe(n,t){return n.createEl("p",{text:t,cls:"settings-view__help-note"})}function nd(n,t,e=!1){let r;return function(...a){let i=()=>{r=void 0,e||n.apply(this,a)},s=e&&!r;clearTimeout(r),r=setTimeout(i,t),s&&n.apply(this,a)}}var cl,es=b(()=>{cl=require("obsidian")});async function $a(n,t){return new fp(n,t).show()}var py,fp,dl=b(()=>{py=require("obsidian"),fp=class extends py.Modal{constructor(t,e){super(t),this.options={confirmText:"Confirm",cancelText:"Cancel",isDestructive:!1,...e}}show(){return new Promise(t=>{this.resolve=t,this.open()})}onOpen(){let{contentEl:t}=this;t.empty(),new py.Setting(t).setName(this.options.title).setHeading(),t.createEl("p",{text:this.options.message});let e=t.createEl("div",{cls:"modal-button-container"});e.style.display="flex",e.style.gap="10px",e.style.justifyContent="flex-end",e.style.marginTop="20px";let r=null;this.options.thirdButtonText&&(r=e.createEl("button",{text:this.options.thirdButtonText}),r.addEventListener("click",()=>{this.options.onThirdButton&&this.options.onThirdButton(),this.close()}));let a=e.createEl("button",{text:this.options.cancelText});a.addEventListener("click",()=>{this.resolve(!1),this.close()});let i=e.createEl("button",{text:this.options.confirmText,cls:this.options.isDestructive?"mod-warning":"mod-cta"});this.options.isDestructive&&(i.style.backgroundColor="var(--color-red)",i.style.color="white"),i.addEventListener("click",()=>{this.resolve(!0),this.close()}),setTimeout(()=>{this.options.defaultToConfirm?i.focus():a.focus()},0)}onClose(){let{contentEl:t}=this;t.empty(),this.resolve&&this.resolve(!1)}}});var no,yy=b(()=>{no=class{constructor(t){this.deps=t}buildMetadataRows(t,e,r){var s;let a=[],i=Math.min(t.length,3);for(let o=0;o0&&a.push(d.join(" "))}catch(c){}}return a}stringifyFmValue(t){if(t==null)return"";if(Array.isArray(t))return t.map(a=>this.stringifyFmValue(a)).filter(Boolean).join(", ");let e=typeof t;if(e==="string"){let a=t.trim(),i=a.match(/^\[\[([^\]]+)\]\]$/);if(i){let l=i[1].split("|");if(l.length>1&&l[1].trim())return l[1].trim();let c=l[0].split("#")[0].trim();return(c.split("/").pop()||c).replace(/\.md$/i,"")}let s=a.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return s?s[1].trim():a}if(e==="number"||e==="boolean")return String(t);if(e==="object"){let r=t;if(typeof r.path=="string"){let a=r.path;return(a.split("/").pop()||a).replace(/\.md$/i,"")}return""}return""}resolve(t,e){if(!t)return"";if(t.startsWith("file."))switch(t){case"file.basename":return e.basename||"";case"file.name":return e.name||"";case"file.path":return e.path||"";case"file.parent":return e.parent||"";default:return""}if(t==="title")return e.title||"";if(t==="aliases"){let i=e.aliases||[];return i.length?i.join(", "):""}let r=t;t.startsWith("frontmatter:")&&(r=t.slice(12));let a=this.deps.getFrontmatter(e)||{};return this.stringifyFmValue(a[r])}}});function Sre(n){let t=[],e="",r=0;for(;ra.length>0)}function Dre(n){return n.replace(/\\\|/g,"|").replace(/\\\)/g,")")}function hi(n){let t=[];if(!n)return t;let e=/\{([^}]*)\}/g,r,a=0;for(;(r=e.exec(n))!==null;){let s=n.slice(a,r.index);s.length>0&&t.push({property:`literal:${s}`,showName:!1}),a=e.lastIndex;let o=r[1].trim();if(!o)continue;let l=Sre(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&&t.push({property:`literal:${i}`,showName:!1}),t}var gp=b(()=>{});function cH(n){return n!=null?n.trim():""}function Ere(n){return n?n.trim():""}function vy(n){let t=Ere(n==null?void 0:n.propertyKey),e=cH(n==null?void 0:n.propertyValue);return{key:t,value:e,enabled:t.length>0}}function by(n,t){if(!t.enabled)return!0;if(!n||typeof n!="object"||!(t.key in n))return!1;let e=n[t.key],r=cH(t.value);if(r.length===0)return e!=null;let a=r.toLowerCase(),i=s=>{if(s==null)return!1;if(Array.isArray(s))return s.some(o=>i(o));if(typeof s=="string")return s.trim().toLowerCase()===a;if(typeof s=="number"||typeof s=="boolean")return String(s).toLowerCase()===a;if(typeof s=="object")try{return JSON.stringify(s).toLowerCase()===a}catch(o){return!1}return String(s).toLowerCase()===a};return i(e)}var Yw=b(()=>{});var pH={};Be(pH,{NATURAL_LANGUAGE_DATE_PATTERNS:()=>yp,addDaysToDateString:()=>pl,addDaysToDateTime:()=>Bre,addMonthsToDateString:()=>Pre,addWeeksToDateString:()=>Kw,addYearsToDateString:()=>Mre,combineDateAndTime:()=>hr,convertUTCToLocalCalendarDate:()=>ao,createSafeDate:()=>Cre,createSafeUTCDate:()=>Qw,createTimeFormatHelper:()=>Ore,createUTCDateForRRule:()=>Tn,createUTCDateFromLocalCalendarDate:()=>mt,formatDateAsUTCString:()=>Xw,formatDateForDisplay:()=>as,formatDateForStorage:()=>le,formatDateStringTime:()=>uH,formatDateTime:()=>dH,formatDateTimeForDisplay:()=>kn,formatTime:()=>od,formatTimestampForDisplay:()=>ky,generateUTCCalendarDates:()=>eS,getCurrentDateString:()=>Tp,getCurrentDateTimeString:()=>Lre,getCurrentTimestamp:()=>Oe,getDatePart:()=>_e,getEndOfMonthString:()=>Nre,getEndOfWeekString:()=>Ire,getEndOfYearString:()=>Fre,getNaturalLanguageDateSuggestions:()=>zre,getStartOfMonthString:()=>_re,getStartOfWeekString:()=>Are,getStartOfYearString:()=>Rre,getTimePart:()=>Hr,getTodayLocal:()=>ft,getTodayString:()=>Vt,getUTCEndOfMonth:()=>xy,getUTCEndOfWeek:()=>tS,getUTCStartOfMonth:()=>Ey,getUTCStartOfWeek:()=>Dy,hasTimeComponent:()=>Ft,isBeforeDateSafe:()=>ns,isBeforeDateTimeAware:()=>is,isNaturalLanguageDate:()=>Cy,isOverdueTimeAware:()=>on,isPastDate:()=>Zw,isSameDateSafe:()=>mr,isToday:()=>bp,isTodayTimeAware:()=>wy,isTodayUTC:()=>Jw,isValidDateInput:()=>Hre,normalizeCalendarBoundariesToUTC:()=>jre,normalizeDateString:()=>xre,parseDate:()=>zr,parseDateAsLocal:()=>ml,parseDateToLocal:()=>$t,parseDateToUTC:()=>je,parseTimestamp:()=>Ty,resolveNaturalLanguageDate:()=>hl,startOfDayForDateString:()=>vp,validateCompleteInstances:()=>Sy,validateDateInput:()=>Gw,validateDateTimeInput:()=>kp});function zr(n){if(!n){let e=new Error("Date string cannot be empty");throw console.error("Date parsing error:",{dateString:n,error:e.message}),e}let t=n.trim();try{let e=t.match(/^(\d{4}-\d{2}-\d{2})\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$/i);if(e){let r=e[1];return zr(r)}if(t.startsWith("T")&&/^T\d{2}:\d{2}(:\d{2})?/.test(t)){let r=new Error(`Invalid date format - time without date: ${n}`);throw console.warn("Date parsing error - incomplete time format:",{original:n,trimmed:t,error:r.message}),r}if(/^\d{4}-W\d{2}$/.test(t)){let[r,a]=t.split("-W"),i=parseInt(r,10),s=parseInt(a,10);if(isNaN(i)||isNaN(s)){let u=new Error(`Invalid numeric values in ISO week format: ${n}`);throw console.warn("Date parsing error - invalid ISO week numbers:",{original:n,year:r,week:a,yearNum:i,weekNum:s}),u}if(s<1||s>53){let u=new Error(`Invalid week number in ISO week format: ${n} (week must be 1-53)`);throw console.warn("Date parsing error - week number out of range:",{original:n,weekNum:s,error:u.message}),u}let o=new Date(i,0,4),l=o.getDay(),c=new Date(o);c.setDate(o.getDate()-(l===0?6:l-1));let d=new Date(c);if(d.setDate(c.getDate()+(s-1)*7),!wr(d)){let u=new Error(`Failed to calculate date from ISO week format: ${n}`);throw console.error("Date parsing error - ISO week calculation failed:",{original:n,yearNum:i,weekNum:s,jan4:o.toISOString(),targetWeekMonday:d.toString()}),u}return d}if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(:\d{2})?/.test(t)){let r=t.replace(" ","T"),a=qa(r);if(!wr(a)){let i=new Error(`Invalid space-separated datetime: ${n}`);throw console.warn("Date parsing error - space-separated datetime invalid:",{original:n,converted:r,error:i.message}),i}return a}if(t.includes("T")||t.includes("Z")||t.match(/[+-]\d{2}:\d{2}$/)){let r=qa(t);if(!wr(r)){let a=new Error(`Invalid timezone-aware date: ${n}`);throw console.warn("Date parsing error - timezone-aware format invalid:",{original:n,trimmed:t,error:a.message}),a}return r}else{let r=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!r){let l=new Error(`Invalid date-only string: ${n} (expected format: yyyy-MM-dd)`);throw console.warn("Date parsing error - date-only format invalid:",{original:n,trimmed:t,expectedFormat:"yyyy-MM-dd",error:l.message}),l}let[,a,i,s]=r,o=new Date(parseInt(a,10),parseInt(i,10)-1,parseInt(s,10));if(!wr(o)||o.getFullYear()!==parseInt(a,10)||o.getMonth()!==parseInt(i,10)-1||o.getDate()!==parseInt(s,10)){let l=new Error(`Invalid date values: ${n}`);throw console.warn("Date parsing error - invalid date values:",{original:n,year:a,month:i,day:s,error:l.message}),l}return o}}catch(e){if(e instanceof Error&&e.message.includes("Invalid date"))throw e;let r=new Error(`Unexpected error parsing date "${n}": ${e instanceof Error?e.message:String(e)}`);throw console.error("Unexpected date parsing error:",{original:n,trimmed:t,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0}),r}}function je(n){if(!n){let e=new Error("Date string cannot be empty");throw console.error("Date parsing error:",{dateString:n,error:e.message}),e}let t=n.trim();try{let e=t.match(/^(\d{4}-\d{2}-\d{2})\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$/i);if(e){let a=e[1];return je(a)}let r=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(r){let[,a,i,s]=r,o=parseInt(a,10),l=parseInt(i,10),c=parseInt(s,10);if(l<1||l>12)throw new Error(`Invalid month in date: ${n}`);if(c<1||c>31)throw new Error(`Invalid day in date: ${n}`);let d=new Date(Date.UTC(o,l-1,c));if(d.getUTCFullYear()!==o||d.getUTCMonth()!==l-1||d.getUTCDate()!==c)throw new Error(`Invalid date values: ${n}`);return d}return $t(t)}catch(e){let r=new Error(`Failed to parse date to UTC: ${t}`);throw console.error("Date parsing error:",{dateString:n,trimmed:t,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0}),r}}function mr(n,t){try{let e=_e(n),r=_e(t),a=je(e),i=je(r);return a.getTime()===i.getTime()}catch(e){return console.error("Error comparing dates:",{date1:n,date2:t,error:e}),!1}}function ns(n,t){try{let e=_e(n),r=_e(t),a=je(e),i=je(r);return a.getTime()=0?"+":"-",r=m=>String(Math.abs(m)).padStart(2,"0"),a=r(Math.floor(Math.abs(t)/60)),i=r(Math.abs(t)%60),s=n.getFullYear(),o=r(n.getMonth()+1),l=r(n.getDate()),c=r(n.getHours()),d=r(n.getMinutes()),u=r(n.getSeconds()),p=String(n.getMilliseconds()).padStart(3,"0");return`${s}-${o}-${l}T${c}:${d}:${u}.${p}${e}${a}:${i}`}function Tp(){let n=new Date,t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${t}-${e}-${r}`}function Ty(n){try{if(!n)throw new Error("Timestamp string cannot be empty");let t=qa(n);if(!wr(t))throw new Error(`Invalid timestamp: ${n}`);return t}catch(t){throw console.error("Error parsing timestamp:",{timestampString:n,error:t}),t}}function ky(n,t,e="24"){if(!n)return n;try{let r=Ty(n);return wr(r)?M(r,t||(e==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm")):n}catch(r){return console.error("Error formatting timestamp for display:",{timestampString:n,error:r}),n}}function Ft(n){return n?/T\d{2}:\d{2}/.test(n):!1}function _e(n){if(!n)return"";try{if(/^\d{4}-\d{2}-\d{2}$/.test(n))return n;let t=n.indexOf("T");if(t>-1)return n.substring(0,t);let e=je(n);return le(e)}catch(t){return console.error("Error extracting date part:",{dateString:n,error:t}),n}}function Hr(n){if(!n||!Ft(n))return null;try{let t=zr(n);return M(t,"HH:mm")}catch(t){return console.error("Error extracting time part:",{dateString:n,error:t}),null}}function od(n,t="24"){return wr(n)?M(n,t==="12"?"h:mm a":"HH:mm"):(console.warn("Invalid date provided to formatTime:",n),"")}function dH(n,t="24"){return wr(n)?M(n,t==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm"):(console.warn("Invalid date provided to formatDateTime:",n),"")}function uH(n,t="24"){if(!n||!Ft(n))return n;try{let e=$t(n);return od(e,t)}catch(e){return console.error("Error formatting date string time:",{dateString:n,error:e}),n}}function Ore(n){return{formatDateTimeForDisplay:(t,e={})=>kn(t,{...e,userTimeFormat:n}),formatTime:t=>od(t,n),formatDateTime:t=>dH(t,n),formatDateStringTime:t=>uH(t,n)}}function hr(n,t){if(!n)return"";if(!t)return n;try{let e=n.match(/^(\d{4}-\d{2}-\d{2})$/);if(e)return/^\d{2}:\d{2}$/.test(t)?`${e[1]}T${t}`:(console.warn("Invalid time format, expected HH:mm:",t),n);let r=_e(n);return!r||!/^\d{4}-\d{2}-\d{2}$/.test(r)?(console.warn("Invalid date part from dateString:",{dateString:n,datePart:r}),n):/^\d{2}:\d{2}$/.test(t)?`${r}T${t}`:(console.warn("Invalid time format, expected HH:mm:",t),n)}catch(e){return console.error("Error combining date and time:",{dateString:n,timeString:t,error:e}),n}}function kn(n,t={}){if(!n)return"";let{dateFormat:e="MMM d, yyyy",timeFormat:r,showTime:a=!0,userTimeFormat:i="24"}=t,s=r||(i==="12"?"h:mm a":"HH:mm");try{let o=zr(n);return Ft(n)&&a?!e||e.trim()===""?M(o,s):M(o,`${e} ${s}`):!e||e.trim()===""?"":M(o,e)}catch(o){return console.error("Error formatting datetime for display:",{dateString:n,error:o}),n}}function is(n,t){try{let e=je(n),r=je(t),a=e,i=r;if(Ft(n)){let s=Hr(n);if(s){let[o,l]=s.split(":").map(Number);a=new Date(e),a.setUTCHours(o,l,0,0)}}if(Ft(t)){let s=Hr(t);if(s){let[o,l]=s.split(":").map(Number);i=new Date(r),i.setUTCHours(o,l,0,0)}}return Ft(n)&&!Ft(t)?(i=new Date(r),i.setUTCHours(23,59,59,999)):!Ft(n)&&Ft(t)&&(a=new Date(e),a.setUTCHours(23,59,59,999)),a.getTime(){if(typeof t!="string"||!t.trim())return!1;let e=t.trim();if(e.startsWith("T")&&/^T\d{2}:\d{2}(:\d{2})?/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;try{return zr(e),!0}catch(r){return console.warn("Invalid complete_instances entry (date parsing failed):",t,r),!1}}).map(t=>t.trim()):[]}function Lre(){return M(new Date,"yyyy-MM-dd'T'HH:mm")}function Bre(n,t){try{let e=zr(n),r=Zi(e,t);return Ft(n)?M(r,"yyyy-MM-dd'T'HH:mm"):M(r,"yyyy-MM-dd")}catch(e){throw console.error("Error adding days to datetime:",{dateString:n,days:t,error:e}),e}}function Tn(n){try{let t=n.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!t)throw new Error(`Invalid date format for RRULE: ${n}`);let[,e,r,a]=t,i=parseInt(e,10),s=parseInt(r,10),o=parseInt(a,10);if(s<1||s>12)throw new Error(`Invalid month in date: ${n}`);if(o<1||o>31)throw new Error(`Invalid day in date: ${n}`);let l=new Date(Date.UTC(i,s-1,o));if(l.getUTCFullYear()!==i||l.getUTCMonth()!==s-1||l.getUTCDate()!==o)throw new Error(`Invalid date values: ${n}`);return l}catch(t){throw console.error("Error creating UTC date for RRULE:",{dateString:n,error:t}),t}}function mt(n){let t=n.getFullYear(),e=n.getMonth(),r=n.getDate();return new Date(Date.UTC(t,e,r,0,0,0,0))}function Jw(n){try{let t=ft(),e=mt(t);return n.getUTCFullYear()===e.getUTCFullYear()&&n.getUTCMonth()===e.getUTCMonth()&&n.getUTCDate()===e.getUTCDate()}catch(t){return console.error("Error in isTodayUTC:",t),!1}}function jre(n,t){try{let e=M(n,"yyyy-MM-dd"),r=M(t,"yyyy-MM-dd"),a=Tn(e),i=Tn(r);return{utcStart:a,utcEnd:i}}catch(e){throw console.error("Error normalizing calendar boundaries to UTC:",{startDate:n,endDate:t,error:e}),e}}function Xw(n){try{let t=n.getUTCFullYear(),e=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${t}-${e}-${r}`}catch(t){return console.error("Error formatting date as UTC string:",{date:n,error:t}),n.toISOString().split("T")[0]}}function le(n){try{if(!n||!(n instanceof Date)||isNaN(n.getTime()))return console.warn("formatDateForStorage received invalid date:",n),"";let t=n.getUTCFullYear(),e=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${t}-${e}-${r}`}catch(t){return console.error("Error formatting date for storage:",{date:n,error:t}),""}}function eS(n,t){let e=[],r=le(n),a=le(t),i=Tn(r),s=Tn(a);for(;i<=s;)e.push(new Date(i)),i.setUTCDate(i.getUTCDate()+1);return e}function Dy(n,t=1){let e=Tn(le(n)),a=(e.getUTCDay()-t+7)%7,i=new Date(e);return i.setUTCDate(i.getUTCDate()-a),i}function tS(n,t=1){let e=Dy(n,t),r=new Date(e);return r.setUTCDate(r.getUTCDate()+6),r}function Ey(n){let t=Tn(le(n));return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1))}function xy(n){let t=Tn(le(n));return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,0))}function Cy(n){if(!n||typeof n!="string")return!1;let t=n.toLowerCase().trim().replace(/\s+/g," ");return t in yp?!0:[/^in\s+(\d+)\s+(days?)$/,/^(\d+)\s+(days?)\s+ago$/,/^in\s+(\d+)\s+(weeks?)$/,/^(\d+)\s+(weeks?)\s+ago$/].some(r=>r.test(t))}function Hre(n){if(typeof n!="string")return!1;let t=n.trim();if(t===""||Cy(t))return!0;try{let e=zr(t);return wr(e)}catch(e){return!1}}function hl(n){if(!n||typeof n!="string")return n;let t=n.toLowerCase().trim().replace(/\s+/g," ");if(t in yp)try{return yp[t]()}catch(e){return console.error("Error resolving natural language date:",{value:n,error:e}),n}try{let e=t.match(/^in\s+(\d+)\s+(days?)$/);if(e){let r=parseInt(e[1],10);return pl(Vt(),r)}if(e=t.match(/^(\d+)\s+(days?)\s+ago$/),e){let r=parseInt(e[1],10);return pl(Vt(),-r)}if(e=t.match(/^in\s+(\d+)\s+(weeks?)$/),e){let r=parseInt(e[1],10);return Kw(Vt(),r)}if(e=t.match(/^(\d+)\s+(weeks?)\s+ago$/),e){let r=parseInt(e[1],10);return Kw(Vt(),-r)}}catch(e){console.error("Error parsing relative natural language date:",{value:n,error:e})}return n}function zre(){let n=Object.keys(yp),t=["in 3 days","2 days ago","in 1 week","2 weeks ago"];return[...n,...t].sort()}var $t,yp,Ke=b(()=>{rr();$t=zr;yp={today:()=>Vt(),tomorrow:()=>pl(Vt(),1),yesterday:()=>pl(Vt(),-1),"next week":()=>pl(Vt(),7),"last week":()=>pl(Vt(),-7)}});var _r,ss,fl,kt,gl=b(()=>{Ke();_r=class extends Error{constructor(e,r,a){super(e);this.field=r;this.nodeId=a;this.name="FilterValidationError"}},ss=class extends Error{constructor(e,r){super(e);this.nodeId=r;this.name="FilterEvaluationError"}},fl=class fl{static generateId(){return`filter_${Date.now()}_${++this.idCounter}`}static deepCloneFilterQuery(t){return JSON.parse(JSON.stringify(t))}static validateFilterNode(t,e=!0){if(!t||typeof t!="object")throw new _r("Filter node must be an object");if(!("id"in t)||!t.id||typeof t.id!="string")throw new _r("Filter node must have a valid string ID",void 0,"id"in t?String(t.id):"unknown");if(t.type==="condition")this.validateCondition(t,e);else if(t.type==="group")this.validateGroup(t,e);else throw new _r(`Unknown filter node type: ${t.type}`,void 0,t.id)}static validateCondition(t,e=!0){if(typeof t.property!="string")throw new _r("Condition must have a valid property","property",t.id);if(e&&t.property==="")throw new _r("Property must be selected","property",t.id);if(t.property==="")return;if(!t.operator||typeof t.operator!="string")throw new _r("Condition must have a valid operator","operator",t.id);if(!this.getValidOperatorsForProperty(t.property).includes(t.operator))throw new _r(`Operator '${t.operator}' is not valid for property '${t.property}'`,"operator",t.id);if(e&&this.operatorRequiresValue(t.operator)&&(t.value===null||t.value===void 0||t.value===""))throw new _r(`Operator '${t.operator}' requires a value`,"value",t.id)}static validateGroup(t,e=!0){if(!t.conjunction||!["and","or"].includes(t.conjunction))throw new _r("Group must have a valid conjunction (and/or)","conjunction",t.id);if(!Array.isArray(t.children))throw new _r("Group must have a children array","children",t.id);t.children.forEach((r,a)=>{try{this.validateFilterNode(r,e)}catch(i){throw i instanceof _r?new _r(`Child ${a}: ${i.message}`,i.field,t.id):i}})}static getValidOperatorsForProperty(t){return typeof t=="string"&&t.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"]}[t]||[]}static isFilterNodeComplete(t){try{return this.validateFilterNode(t,!0),!0}catch(e){return!1}}static operatorRequiresValue(t){return!["is-empty","is-not-empty","is-checked","is-not-checked"].includes(t)}static getTaskPropertyValue(t,e){var r;switch(e){case"title":return t.title;case"path":return t.path;case"status":return t.status;case"priority":return t.priority;case"tags":return t.tags||[];case"contexts":return t.contexts||[];case"projects":return t.projects||[];case"blockedBy":return((r=t.blockedBy)==null?void 0:r.map(a=>a.uid))||[];case"blocking":return t.blocking||[];case"due":return t.due;case"scheduled":return t.scheduled;case"completedDate":return t.completedDate;case"dateCreated":return t.dateCreated;case"dateModified":return t.dateModified;case"archived":return t.archived;case"timeEstimate":return t.timeEstimate;case"recurrence":return t.recurrence;case"status.isCompleted":return;case"dependencies.isBlocked":return t.isBlocked===!0;case"dependencies.isBlocking":return t.isBlocking===!0;default:throw new ss(`Unknown property: ${e}`)}}static applyOperator(t,e,r,a,i){try{switch(e){case"is":return this.isEqual(t,r,i);case"is-not":return!this.isEqual(t,r,i);case"contains":return this.contains(t,r,i);case"does-not-contain":return!this.contains(t,r,i);case"is-before":return this.isBefore(t,r);case"is-after":return this.isAfter(t,r);case"is-on-or-before":return this.isOnOrBefore(t,r);case"is-on-or-after":return this.isOnOrAfter(t,r);case"is-empty":return this.isEmpty(t);case"is-not-empty":return!this.isEmpty(t);case"is-checked":return t===!0;case"is-not-checked":return t!==!0;case"is-greater-than":return this.isGreaterThan(t,r);case"is-less-than":return this.isLessThan(t,r);case"is-greater-than-or-equal":return this.isGreaterThanOrEqual(t,r);case"is-less-than-or-equal":return this.isLessThanOrEqual(t,r);default:throw new ss(`Unknown operator: ${e}`,a)}}catch(s){throw s instanceof ss?s:new ss(`Error applying operator '${e}': ${s.message}`,a)}}static isEqual(t,e,r){return r&&this.isDateProperty(r)&&typeof t=="string"&&typeof e=="string"&&(t||Cy(e))?this.isEqualDate(t,e):Array.isArray(t)?Array.isArray(e)?t.some(a=>e.includes(a)):t.includes(e):Array.isArray(e)?e.includes(t):t===e}static matchesHierarchicalTag(t,e){if(!t||!e)return!1;let r=t.toLowerCase(),a=e.toLowerCase();return!!(r===a||r.startsWith(a+"/")||r.includes(a))}static matchesHierarchicalTagExact(t,e){if(!t||!e)return!1;let r=t.toLowerCase(),a=e.toLowerCase();return!!(r===a||r.startsWith(a+"/"))}static matchesTagConditions(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(e.length===0)return!0;let r=[],a=[];for(let i of e)if(typeof i=="string"&&i.startsWith("-")){let s=i.slice(1);s&&a.push(s)}else typeof i=="string"&&r.push(i);for(let i of a)if(t.some(o=>this.matchesHierarchicalTag(o,i)))return!1;return r.length>0?r.some(i=>t.some(s=>this.matchesHierarchicalTag(s,i))):!0}static contains(t,e,r){if(Array.isArray(t))if(Array.isArray(e))if(r==="tags"){let a=t.filter(s=>typeof s=="string"),i=e.filter(s=>typeof s=="string");return fl.matchesTagConditions(a,i)}else return e.some(a=>t.some(i=>typeof i=="string"&&typeof a=="string"&&i.toLowerCase().includes(a.toLowerCase())));else{let a=typeof e=="string"?e:String(e!=null?e:"");if(r==="tags"){let i=t.filter(s=>typeof s=="string");return fl.matchesTagConditions(i,[a])}else{let i=a.toLowerCase();return t.some(s=>typeof s=="string"&&s.toLowerCase().includes(i))}}else if(typeof t=="string")if(Array.isArray(e))if(r==="tags"){let a=e.filter(i=>typeof i=="string");return fl.matchesTagConditions([t],a)}else return e.some(a=>typeof a=="string"&&t.toLowerCase().includes(a.toLowerCase()));else return r==="tags"&&typeof e=="string"?fl.matchesTagConditions([t],[e]):typeof e=="string"&&t.toLowerCase().includes(e.toLowerCase());return!1}static isBefore(t,e){if(!t||!e)return!1;try{let r=hl(e);return is(t,r)}catch(r){return!1}}static isAfter(t,e){if(!t||!e)return!1;try{let r=hl(e);return is(r,t)}catch(r){return!1}}static isOnOrBefore(t,e){if(!t||!e)return!1;try{let r=hl(e);return is(t,r)||mr(_e(t),_e(r))}catch(r){return!1}}static isOnOrAfter(t,e){if(!t||!e)return!1;try{let r=hl(e);return is(r,t)||mr(_e(t),_e(r))}catch(r){return!1}}static isDateProperty(t){return["due","scheduled","completedDate","dateCreated","dateModified"].includes(t)}static isEqualDate(t,e){try{let r=hl(e);return mr(_e(t),_e(r))}catch(r){return!1}}static isEmpty(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0?!0:t.every(e=>{if(typeof e!="string")return!1;let r=e.trim();return r.length===0||r==='""'||r==="''"}):!1}static isGreaterThan(t,e){let r=typeof t=="number"?t:parseFloat(t),a=typeof e=="number"?e:parseFloat(e);return isNaN(r)||isNaN(a)?!1:r>a}static isLessThan(t,e){let r=typeof t=="number"?t:parseFloat(t),a=typeof e=="number"?e:parseFloat(e);return isNaN(r)||isNaN(a)?!1:r=a}static isLessThanOrEqual(t,e){let r=typeof t=="number"?t:parseFloat(t),a=typeof e=="number"?e:parseFloat(e);return isNaN(r)||isNaN(a)?!1:r<=a}};fl.idCounter=0;kt=fl});var fi,io,Py=b(()=>{fi=require("obsidian");yy();gp();Yw();gl();io=class extends fi.FuzzySuggestModal{constructor(t,e,r){super(t),this.plugin=e,this.onChoose=r,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 i,s,o,l,c,d,u;let t=this.app.vault.getAllLoadedFiles().filter(p=>p instanceof fi.TFile&&p.extension==="md"&&!p.path.includes(".trash")),e=(o=(s=(i=this.plugin.settings)==null?void 0:i.projectAutosuggest)==null?void 0:s.requiredTags)!=null?o:[],r=(d=(c=(l=this.plugin.settings)==null?void 0:l.projectAutosuggest)==null?void 0:c.includeFolders)!=null?d:[],a=vy((u=this.plugin.settings)==null?void 0:u.projectAutosuggest);return e.length===0&&r.length===0&&!a.enabled?t:t.filter(p=>{var h,f;if(!(p instanceof fi.TFile))return!1;let m=this.app.metadataCache.getFileCache(p);if(e.length>0){let g=((h=m==null?void 0:m.tags)==null?void 0:h.map(k=>k.tag.replace("#","")))||[],v=((f=m==null?void 0:m.frontmatter)==null?void 0:f.tags)||[],T=[...g,...Array.isArray(v)?v:[v].filter(Boolean)];if(!kt.matchesTagConditions(T,e))return!1}if(r.length>0&&!r.some(v=>p.path.startsWith(v)||p.path.startsWith(v+"/")))return!1;if(a.enabled){let g=m==null?void 0:m.frontmatter;if(!by(g,a))return!1}return!0})}getItemText(t){var s,o,l,c;if(!(t instanceof fi.TFile))return t.name;let e=`${t.name} ${t.path}`,r=(l=(o=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:o.rows)!=null?l:[],a=new Set;for(let d of r)try{let u=hi(d);for(let p of u)p.searchable&&!p.property.startsWith("literal:")&&a.add(p.property)}catch(u){}let i=this.app.metadataCache.getFileCache(t);if(i!=null&&i.frontmatter){let d=this.plugin.fieldMapper.mapFromFrontmatter(i.frontmatter,t.path,this.plugin.settings.storeTitleInFilename),u=typeof d.title=="string"?d.title:"";u&&(e+=` ${u}`);let p=(0,fi.parseFrontMatterAliases)(i.frontmatter)||[];Array.isArray(p)&&p.length>0&&(e+=` ${p.join(" ")}`);for(let m of a){let h="";switch(m){case"file.path":h=t.path;break;case"file.parent":h=((c=t.parent)==null?void 0:c.name)||"";break;case"file.basename":h=t.basename;break;case"title":case"aliases":break;default:{let f=i.frontmatter[m];f!=null&&(h=Array.isArray(f)?f.join(" "):String(f));break}}h&&(e+=` ${h}`)}}return e}renderSuggestion(t,e){var s,o,l,c;let r=t.item;if(e.empty(),!(r instanceof fi.TFile)){e.textContent=r.name;return}let a=e.createDiv({cls:"project-suggestion"}),i=((l=(o=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:o.rows)!=null?l:[]).slice(0,3);if(i.length===0){a.createSpan({cls:"project-name",text:r.basename});return}try{let d=this.app.metadataCache.getFileCache(r),u=(d==null?void 0:d.frontmatter)||{},p=this.plugin.fieldMapper.mapFromFrontmatter(u,r.path,this.plugin.settings.storeTitleInFilename),m=typeof p.title=="string"?p.title:"",h=(0,fi.parseFrontMatterAliases)(u)||[],f=Array.isArray(h)?h.filter(k=>typeof k=="string"):[],g={basename:r.basename,name:r.name,path:r.path,parent:((c=r.parent)==null?void 0:c.path)||"",title:m,aliases:f,frontmatter:u},v=new no({getFrontmatter:()=>u});a.createDiv({cls:"project-name",text:r.basename});let T=v.buildMetadataRows(i,g,hi);for(let k of T){let w=a.createDiv({cls:"project-meta"});w.textContent=k}}catch(d){console.error("Error rendering project suggestion:",d),a.createSpan({cls:"project-name",text:r.basename})}}onChooseItem(t,e){this.onChoose(t)}}});function ha(n){if(n==null)return[];let t=[],e="",r=0,a=null;for(let s=0;s0){r--,e+="]]",s++;continue}if(!r&&(o==='"'||o==="'")){a===null?a=o:a===o&&(a=null),e+=o;continue}if(o===","&&r===0&&a===null){let c=e.trim();c&&t.push(c),e="";continue}e+=o}let i=e.trim();return i&&t.push(i),t}var yl=b(()=>{});var sS={};Be(sS,{DEFAULT_CORE_FIELDS:()=>fH,DEFAULT_FIELD_GROUPS:()=>hH,createDefaultFieldConfig:()=>gH,getFieldsByGroup:()=>Vre,getFieldsForModal:()=>yH,initializeFieldConfig:()=>vl,migrateUserFieldsToFieldConfig:()=>vH});function gH(){return{version:1,fields:[...fH],groups:[...hH]}}function yH(n,t){return n.fields.filter(e=>e.enabled).filter(e=>t?e.visibleInCreation:e.visibleInEdit).sort((e,r)=>{var o,l;let a=n.groups.find(c=>c.id===e.group),i=n.groups.find(c=>c.id===r.group),s=((o=a==null?void 0:a.order)!=null?o:0)-((l=i==null?void 0:i.order)!=null?l:0);return s!==0?s:e.order-r.order})}function Vre(n,t){let e=yH(n,t),r=new Map;for(let a of e){let i=r.get(a.group)||[];i.push(a),r.set(a.group,i)}return r}function vH(n){return!n||n.length===0?[]:n.map((t,e)=>({id:t.id||`user-${e}`,fieldType:"user",group:"custom",displayName:t.displayName||`Field ${e+1}`,visibleInCreation:!0,visibleInEdit:!0,order:e,enabled:!0}))}function vl(n,t){if(n)return n;let e=gH();if(t&&t.length>0){let r=vH(t);e.fields.push(...r)}return e}var hH,fH,wp=b(()=>{hH=[{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}],fH=[{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 SH,DH=b(()=>{SH={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 EH,xH=b(()=>{EH={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 CH,PH=b(()=>{CH={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 MH,AH=b(()=>{MH={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 IH,_H=b(()=>{IH={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 NH,RH=b(()=>{NH={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 FH,OH=b(()=>{FH={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 LH,BH=b(()=>{LH={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 jH,HH=b(()=>{jH={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 zH,UH=b(()=>{zH={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 WH,qH=b(()=>{WH={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 VH,$H=b(()=>{VH={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 YH=b(()=>{});function GH(){return Object.values(uS).map(n=>({value:n.code,label:n.name}))}function KH(n){return uS[n]||uS.en}var uS,pS=b(()=>{DH();xH();PH();AH();_H();RH();OH();BH();HH();UH();qH();$H();YH();uS={en:SH,es:EH,fr:CH,de:MH,ru:IH,zh:NH,ja:FH,it:LH,nl:jH,pt:zH,sv:WH,uk:VH}});var JH,XH,Pp,Mp,Ap,Ga,gt,pd,Oy,Ly,By,Ka,kl,Wn=b(()=>{JH="tasknotes-mini-calendar-view",XH="tasknotes-agenda-view",Pp="tasknotes-pomodoro-view",Mp="tasknotes-pomodoro-stats-view",Ap="tasknotes-stats-view",Ga="data-changed",gt="task-updated",pd="task-deleted",Oy="pomodoro-start",Ly="pomodoro-complete",By="pomodoro-interrupt",Ka="pomodoro-tick",kl="date-changed"});var Ip,ar,wl=b(()=>{Ip=["MO","TU","WE","TH","FR","SA","SU"],ar=(function(){function n(t,e){if(e===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return n.fromStr=function(t){return new n(Ip.indexOf(t))},n.prototype.nth=function(t){return this.n===t?this:new n(this.weekday,t)},n.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},n.prototype.toString=function(){var t=Ip[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n})()});function Sl(n,t,e){e===void 0&&(e=" ");var r=String(n);return t=t>>0,r.length>t?String(r):(t=t-r.length,t>e.length&&(e+=Qe(e,t/e.length)),e.slice(0,t)+String(r))}var Et,qn,gS,Nr,ga,Qe,ez,tz,Ur,jy,Vn,Jt,Xe,cn=b(()=>{wl();Et=function(n){return n!=null},qn=function(n){return typeof n=="number"},gS=function(n){return typeof n=="string"&&Ip.includes(n)},Nr=Array.isArray,ga=function(n,t){t===void 0&&(t=n),arguments.length===1&&(t=n,n=0);for(var e=[],r=n;r{cn();gi=function(n,t,e,r,a,i){return r===void 0&&(r=0),a===void 0&&(a=0),i===void 0&&(i=0),new Date(Date.UTC(n,t-1,e,r,a,i))},nne=[31,28,31,30,31,30,31,31,30,31,30,31],nz=1e3*60*60*24,Hy=9999,az=gi(1970,1,1),ane=[6,0,1,2,3,4,5],md=function(n){return n%4===0&&n%100!==0||n%400===0},yS=function(n){return n instanceof Date},Dl=function(n){return yS(n)&&!isNaN(n.getTime())},ine=function(n,t){var e=n.getTime(),r=t.getTime(),a=e-r;return Math.round(a/nz)},_p=function(n){return ine(n,az)},zy=function(n){return new Date(az.getTime()+n*nz)},sne=function(n){var t=n.getUTCMonth();return t===1&&md(n.getUTCFullYear())?29:nne[t]},os=function(n){return ane[n.getUTCDay()]},vS=function(n,t){var e=gi(n,t+1,1);return[os(e),sne(e)]},Uy=function(n,t){return t=t||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Wy=function(n){var t=new Date(n.getTime());return t},bS=function(n){for(var t=[],e=0;e{one=(function(){function n(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,t==="between"?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):t==="before"?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):t==="after"&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return n.prototype.accept=function(t){++this.total;var e=this.minDate&&tthis.maxDate;if(this.method==="between"){if(e)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return e?!0:(this.add(t),!1);return this.add(t)},n.prototype.add=function(t){return this._result.push(t),!0},n.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n})(),cs=one});function fd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");TS(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function te(n,t,e){if(e||arguments.length===2)for(var r=0,a=t.length,i;r{TS=function(n,t){return TS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])},TS(n,t)};Rr=function(){return Rr=Object.assign||function(t){for(var e,r=1,a=arguments.length;r{ds();qy();lne=(function(n){fd(t,n);function t(e,r,a){var i=n.call(this,e,r)||this;return i.iterator=a,i}return t.prototype.add=function(e){return this.iterator(e,this._result.length)?(this._result.push(e),!0):!1},t})(cs),kS=lne});var cne,El,Vy=b(()=>{cne={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}},El=cne});var oz,dne,une,pne,yi,lz=b(()=>{Vy();ya();cn();oz=function(n,t){return n.indexOf(t)!==-1},dne=function(n){return n.toString()},une=function(n,t,e){return"".concat(t," ").concat(e,", ").concat(n)},pne=(function(){function n(t,e,r,a){if(e===void 0&&(e=dne),r===void 0&&(r=El),a===void 0&&(a=une),this.text=[],this.language=r||El,this.gettext=e,this.dateFormatter=a,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);i.sort(function(d,u){return d-u}),s.sort(function(d,u){return u-d}),this.bymonthday=i.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(Et(this.origOptions.byweekday)){var o=Nr(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(o);this.byweekday={allWeeks:o.filter(function(d){return!d.n}),someWeeks:o.filter(function(d){return!!d.n}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var c=function(d,u){return d.weekday-u.weekday};this.byweekday.allWeeks.sort(c),this.byweekday.someWeeks.sort(c),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(t){var e=!0;if(!(t.options.freq in n.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var r in t.origOptions){if(oz(["dtstart","tzid","wkst","freq"],r))return!0;if(!oz(n.IMPLEMENTED[t.options.freq],r))return!1}return e},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[ce.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var e=this.options.until;this.add(this.dateFormatter(e.getUTCFullYear(),this.language.monthNames[e.getUTCMonth()],e.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},n.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},n.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},n.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},n.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},n.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},n.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,r=this.gettext;if(t===-1)return r("last");var a=Math.abs(t);switch(a){case 1:case 21:case 31:e=a+r("st");break;case 2:case 22:e=a+r("nd");break;case 3:case 23:e=a+r("rd");break;default:e=a+r("th")}return t<0?e+" "+r("last"):e},n.prototype.monthtext=function(t){return this.language.monthNames[t-1]},n.prototype.weekdaytext=function(t){var e=qn(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},n.prototype.plural=function(t){return t%100!==1},n.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},n.prototype.list=function(t,e,r,a){var i=this;a===void 0&&(a=","),Nr(t)||(t=[t]);var s=function(l,c,d){for(var u="",p=0;p366)throw new Error("Nth out of range: "+p);return r.nextSymbol(),r.accept("last")?-p:p;default:return!1}}function d(){r.accept("on"),r.accept("the");var p=c();if(p)for(e.bymonthday=[p],r.nextSymbol();r.accept("comma");){if(p=c(),!p)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.bymonthday.push(p),r.nextSymbol()}}function u(){if(r.symbol==="until"){var p=Date.parse(r.text);if(!p)throw new Error("Cannot parse until date:"+r.text);e.until=new Date(p)}else r.accept("for")&&(e.count=parseInt(r.value[0],10),r.expect("number"))}}var mne,cz=b(()=>{Vy();ya();mne=(function(){function n(t){this.done=!0,this.rules=t}return n.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&this.symbol===null},n.prototype.nextSymbol=function(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;var r=void 0;t=null;for(var a in this.rules){r=this.rules[a];var i=r.exec(this.text);i&&(t===null||i[0].length>t[0].length)&&(t=i,e=a)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(e==="SKIP");return this.symbol=e,this.value=t,!0},n.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},n})()});function Fp(n){return n{(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(qe||(qe={}))});var dz,gd,uz,pz,mz=b(()=>{lz();cz();ya();us();Vy();dz=function(n,t){return t===void 0&&(t=El),new ce(Rp(n,t)||void 0)},gd=["count","until","interval","byweekday","bymonthday","bymonth"];yi.IMPLEMENTED=[];yi.IMPLEMENTED[qe.HOURLY]=gd;yi.IMPLEMENTED[qe.MINUTELY]=gd;yi.IMPLEMENTED[qe.DAILY]=["byhour"].concat(gd);yi.IMPLEMENTED[qe.WEEKLY]=gd;yi.IMPLEMENTED[qe.MONTHLY]=gd;yi.IMPLEMENTED[qe.YEARLY]=["byweekno","byyearday"].concat(gd);uz=function(n,t,e,r){return new yi(n,t,e,r).toString()},pz=yi.isFullyConvertible});var yd,hz,$y=b(()=>{ds();us();cn();Wr();yd=(function(){function n(t,e,r,a){this.hour=t,this.minute=e,this.second=r,this.millisecond=a||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},n})(),hz=(function(n){fd(t,n);function t(e,r,a,i,s,o,l){var c=n.call(this,i,s,o,l)||this;return c.year=e,c.month=r,c.day=a,c}return t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return os(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var r=Math.floor(this.month/12),a=Ur(this.month,12);this.month=a,this.year+=r,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+e*7:this.day+=-(this.getWeekday()-r)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,r,a){for(r&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var i=jy(this.hour,24),s=i.div,o=i.mod;if(s&&(this.hour=o,this.addDaily(s)),Vn(a)||Xe(a,this.hour))break}},t.prototype.addMinutes=function(e,r,a,i){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var s=jy(this.minute,60),o=s.div,l=s.mod;if(o&&(this.minute=l,this.addHours(o,!1,a)),(Vn(a)||Xe(a,this.hour))&&(Vn(i)||Xe(i,this.minute)))break}},t.prototype.addSeconds=function(e,r,a,i,s){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var o=jy(this.second,60),l=o.div,c=o.mod;if(l&&(this.second=c,this.addMinutes(l,!1,a,i)),(Vn(a)||Xe(a,this.hour))&&(Vn(i)||Xe(i,this.minute))&&(Vn(s)||Xe(s,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=vS(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Hy))return;e=vS(this.year,this.month-1)[1]}}},t.prototype.add=function(e,r){var a=e.freq,i=e.interval,s=e.wkst,o=e.byhour,l=e.byminute,c=e.bysecond;switch(a){case qe.YEARLY:return this.addYears(i);case qe.MONTHLY:return this.addMonths(i);case qe.WEEKLY:return this.addWeekly(i,s);case qe.DAILY:return this.addDaily(i);case qe.HOURLY:return this.addHours(i,r,o);case qe.MINUTELY:return this.addMinutes(i,r,o,l);case qe.SECONDLY:return this.addSeconds(i,r,o,l,c)}},t})(yd)});function wS(n){for(var t=[],e=Object.keys(n),r=0,a=e;r=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||Jt(t.byweekno)||Jt(t.byyearday)||t.bymonthday||Jt(t.bymonthday)||Et(t.byweekday)||Et(t.byeaster)))switch(t.freq){case ce.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case ce.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case ce.WEEKLY:t.byweekday=[os(t.dtstart)];break}if(Et(t.bymonth)&&!Nr(t.bymonth)&&(t.bymonth=[t.bymonth]),Et(t.byyearday)&&!Nr(t.byyearday)&&qn(t.byyearday)&&(t.byyearday=[t.byyearday]),!Et(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(Nr(t.bymonthday)){for(var a=[],i=[],e=0;e0?a.push(r):r<0&&i.push(r)}t.bymonthday=a,t.bynmonthday=i}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Et(t.byweekno)&&!Nr(t.byweekno)&&(t.byweekno=[t.byweekno]),!Et(t.byweekday))t.bynweekday=null;else if(qn(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(gS(t.byweekday))t.byweekday=[ar.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof ar)!t.byweekday.n||t.freq>ce.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var s=[],o=[],e=0;ece.MONTHLY?s.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=Jt(s)?s:null,t.bynweekday=Jt(o)?o:null}return Et(t.byhour)?qn(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq{ds();us();cn();ya();Wr();wl();$y()});function Bp(n){var t=n.split(` +`).map(hne).filter(function(e){return e!==null});return Rr(Rr({},t[0]),t[1])}function Lp(n){var t={},e=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!e)return t;var r=e[1],a=e[2];return r&&(t.tzid=r),t.dtstart=Np(a),t}function hne(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var t=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!t)return vz(n);var e=t[1];switch(e.toUpperCase()){case"RRULE":case"EXRULE":return vz(n);case"DTSTART":return Lp(n);default:throw new Error("Unsupported RFC prop ".concat(e," in ").concat(n))}}function vz(n){var t=n.replace(/^RRULE:/i,""),e=Lp(t),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(a){var i=a.split("="),s=i[0],o=i[1];switch(s.toUpperCase()){case"FREQ":e.freq=qe[o.toUpperCase()];break;case"WKST":e.wkst=va[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=fne(o),c=s.toLowerCase();e[c]=l;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=gne(o);break;case"DTSTART":case"TZID":var d=Lp(n);e.tzid=d.tzid,e.dtstart=d.dtstart;break;case"UNTIL":e.until=Np(o);break;case"BYEASTER":e.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+s+"'")}}),e}function fne(n){if(n.indexOf(",")!==-1){var t=n.split(",");return t.map(bz)}return bz(n)}function bz(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function gne(n){var t=n.split(",");return t.map(function(e){if(e.length===2)return va[e];var r=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!r||r.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var a=Number(r[1]),i=r[2],s=va[i].weekday;return new ar(s,a)})}var DS=b(()=>{ds();us();wl();Wr();ya()});var xl,Yy=b(()=>{Wr();xl=(function(){function n(t,e){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var t=hd(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:iz(this.date,this.tzid)},n})()});function jp(n){for(var t=[],e="",r=Object.keys(n),a=Object.keys(Op),i=0;i{ya();cn();wl();Wr();Yy()});function vne(n,t){return Array.isArray(n)?!Array.isArray(t)||n.length!==t.length?!1:n.every(function(e,r){return e.getTime()===t[r].getTime()}):n instanceof Date?t instanceof Date&&n.getTime()===t.getTime():n===t}var Tz,kz=b(()=>{qy();Wr();cn();Tz=(function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(t,e,r){e&&(e=e instanceof Date?Wy(e):bS(e)),t==="all"?this.all=e:(r._value=e,this[t].push(r))},n.prototype._cacheGet=function(t,e){var r=!1,a=e?Object.keys(e):[],i=function(d){for(var u=0;u{ds();cn();wz=te(te(te(te(te(te(te(te(te(te(te(te(te([],Qe(1,31),!0),Qe(2,28),!0),Qe(3,31),!0),Qe(4,30),!0),Qe(5,31),!0),Qe(6,30),!0),Qe(7,31),!0),Qe(8,31),!0),Qe(9,30),!0),Qe(10,31),!0),Qe(11,30),!0),Qe(12,31),!0),Qe(1,7),!0),Sz=te(te(te(te(te(te(te(te(te(te(te(te(te([],Qe(1,31),!0),Qe(2,29),!0),Qe(3,31),!0),Qe(4,30),!0),Qe(5,31),!0),Qe(6,30),!0),Qe(7,31),!0),Qe(8,31),!0),Qe(9,30),!0),Qe(10,31),!0),Qe(11,30),!0),Qe(12,31),!0),Qe(1,7),!0),bne=ga(1,29),Tne=ga(1,30),so=ga(1,31),qr=ga(1,32),Dz=te(te(te(te(te(te(te(te(te(te(te(te(te([],qr,!0),Tne,!0),qr,!0),so,!0),qr,!0),so,!0),qr,!0),qr,!0),so,!0),qr,!0),so,!0),qr,!0),qr.slice(0,7),!0),Ez=te(te(te(te(te(te(te(te(te(te(te(te(te([],qr,!0),bne,!0),qr,!0),so,!0),qr,!0),so,!0),qr,!0),qr,!0),so,!0),qr,!0),so,!0),qr,!0),qr.slice(0,7),!0),kne=ga(-28,0),wne=ga(-29,0),oo=ga(-30,0),Vr=ga(-31,0),xz=te(te(te(te(te(te(te(te(te(te(te(te(te([],Vr,!0),wne,!0),Vr,!0),oo,!0),Vr,!0),oo,!0),Vr,!0),Vr,!0),oo,!0),Vr,!0),oo,!0),Vr,!0),Vr.slice(0,7),!0),Cz=te(te(te(te(te(te(te(te(te(te(te(te(te([],Vr,!0),kne,!0),Vr,!0),oo,!0),Vr,!0),oo,!0),Vr,!0),Vr,!0),oo,!0),Vr,!0),oo,!0),Vr,!0),Vr.slice(0,7),!0),Pz=[0,31,60,91,121,152,182,213,244,274,305,335,366],Mz=[0,31,59,90,120,151,181,212,243,273,304,334,365],xS=(function(){for(var n=[],t=0;t<55;t++)n=n.concat(ga(7));return n})()});function Iz(n,t){var e=gi(n,1,1),r=md(n)?366:365,a=md(n+1)?366:365,i=_p(e),s=os(e),o=Rr(Rr({yearlen:r,nextyearlen:a,yearordinal:i,yearweekday:s},Sne(n)),{wnomask:null});if(Vn(t.byweekno))return o;o.wnomask=Qe(0,r+7);var l,c,d=l=Ur(7-s+t.wkst,7);d>=4?(d=0,c=o.yearlen+Ur(s-t.wkst,7)):c=r-d;for(var u=Math.floor(c/7),p=Ur(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 v=0;v<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==t.wkst);v++);}}if(Xe(t.byweekno,1)){var g=d+m*7;if(d!==l&&(g-=7-l),g=4?(w=0,x=S+Ur(k-t.wkst,7)):x=r-d,T=Math.floor(52+Ur(x,7)/4)}if(Xe(t.byweekno,T))for(var g=0;g{ds();Wr();cn();Az()});function Nz(n,t,e,r,a,i){var s={lastyear:n,lastmonth:t,nwdaymask:[]},o=[];if(i.freq===ce.YEARLY)if(Vn(i.bymonth))o=[[0,e]];else for(var l=0;l{ya();cn()});function Fz(n,t){t===void 0&&(t=0);var e=n%19,r=Math.floor(n/100),a=n%100,i=Math.floor(r/4),s=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),c=Math.floor(19*e+r-i-l+15)%30,d=Math.floor(a/4),u=a%4,p=Math.floor(32+2*s+2*d-c-u)%7,m=Math.floor((e+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(n,h-1,f+t),v=Date.UTC(n,0,1);return[Math.ceil((g-v)/(1e3*60*60*24))]}var Oz=b(()=>{});var Dne,Lz,Bz=b(()=>{cn();us();_z();Rz();Oz();$y();Wr();Dne=(function(){function n(t){this.options=t}return n.prototype.rebuild=function(t,e){var r=this.options;if(t!==this.lastyear&&(this.yearinfo=Iz(t,r)),Jt(r.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var a=this.yearinfo,i=a.yearlen,s=a.mrange,o=a.wdaymask;this.monthinfo=Nz(t,e,i,s,o,r)}Et(r.byeaster)&&(this.eastermask=Fz(t,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[ga(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(t,e){for(var r=this.mrange[e-1],a=this.mrange[e],i=Qe(null,this.yearlen),s=r;s{Wr();cn()});function Gy(n,t){var e=t.dtstart,r=t.freq,a=t.interval,i=t.until,s=t.bysetpos,o=t.count;if(o===0||a===0)return ps(n);var l=hz.fromDate(e),c=new Lz(t);c.rebuild(l.year,l.month);for(var d=Cne(c,l,t);;){var u=c.getdayset(r)(l.year,l.month,l.day),p=u[0],m=u[1],h=u[2],f=xne(p,m,h,c,t);if(Jt(s))for(var g=jz(s,d,m,h,c,p),v=0;vi)return ps(n);if(T>=e){var k=zz(T,t);if(!n.accept(k)||o&&(--o,!o))return ps(n)}}else for(var v=m;vi)return ps(n);if(T>=e){var k=zz(T,t);if(!n.accept(k)||o&&(--o,!o))return ps(n)}}}if(t.interval===0||(l.add(t,f),l.year>Hy))return ps(n);Fp(r)||(d=c.gettimeset(r)(l.hour,l.minute,l.second,0)),c.rebuild(l.year,l.month)}}function Ene(n,t,e){var r=e.bymonth,a=e.byweekno,i=e.byweekday,s=e.byeaster,o=e.bymonthday,l=e.bynmonthday,c=e.byyearday;return Jt(r)&&!Xe(r,n.mmask[t])||Jt(a)&&!n.wnomask[t]||Jt(i)&&!Xe(i,n.wdaymask[t])||Jt(n.nwdaymask)&&!n.nwdaymask[t]||s!==null&&!Xe(n.eastermask,t)||(Jt(o)||Jt(l))&&!Xe(o,n.mdaymask[t])&&!Xe(l,n.nmdaymask[t])||Jt(c)&&(t=n.yearlen&&!Xe(c,t+1-n.yearlen)&&!Xe(c,-n.nextyearlen+t-n.yearlen))}function zz(n,t){return new xl(n,t.tzid).rezonedDate()}function ps(n){return n.getValue()}function xne(n,t,e,r,a){for(var i=!1,s=t;s=ce.HOURLY&&Jt(a)&&!Xe(a,t.hour)||r>=ce.MINUTELY&&Jt(i)&&!Xe(i,t.minute)||r>=ce.SECONDLY&&Jt(s)&&!Xe(s,t.second)?[]:n.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}var CS=b(()=>{us();Wr();Bz();ya();SS();cn();Yy();Hz();$y()});var va,Op,yz,ce,ya=b(()=>{Wr();qy();sz();mz();us();SS();DS();ES();kz();wl();CS();va={MO:new ar(0),TU:new ar(1),WE:new ar(2),TH:new ar(3),FR:new ar(4),SA:new ar(5),SU:new ar(6)},Op={freq:qe.YEARLY,dtstart:null,interval:1,wkst:va.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},yz=Object.keys(Op),ce=(function(){function n(t,e){t===void 0&&(t={}),e===void 0&&(e=!1),this._cache=e?null:new Tz,this.origOptions=wS(t);var r=fz(t).parsedOptions;this.options=r}return n.parseText=function(t,e){return Rp(t,e)},n.fromText=function(t,e){return dz(t,e)},n.fromString=function(t){return new n(n.parseString(t)||void 0)},n.prototype._iter=function(t){return Gy(t,this.options)},n.prototype._cacheGet=function(t,e){return this._cache?this._cache._cacheGet(t,e):!1},n.prototype._cacheAdd=function(t,e,r){if(this._cache)return this._cache._cacheAdd(t,e,r)},n.prototype.all=function(t){if(t)return this._iter(new kS("all",{},t));var e=this._cacheGet("all");return e===!1&&(e=this._iter(new cs("all",{})),this._cacheAdd("all",e)),e},n.prototype.between=function(t,e,r,a){if(r===void 0&&(r=!1),!Dl(t)||!Dl(e))throw new Error("Invalid date passed in to RRule.between");var i={before:e,after:t,inc:r};if(a)return this._iter(new kS("between",i,a));var s=this._cacheGet("between",i);return s===!1&&(s=this._iter(new cs("between",i)),this._cacheAdd("between",s,i)),s},n.prototype.before=function(t,e){if(e===void 0&&(e=!1),!Dl(t))throw new Error("Invalid date passed in to RRule.before");var r={dt:t,inc:e},a=this._cacheGet("before",r);return a===!1&&(a=this._iter(new cs("before",r)),this._cacheAdd("before",a,r)),a},n.prototype.after=function(t,e){if(e===void 0&&(e=!1),!Dl(t))throw new Error("Invalid date passed in to RRule.after");var r={dt:t,inc:e},a=this._cacheGet("after",r);return a===!1&&(a=this._iter(new cs("after",r)),this._cacheAdd("after",a,r)),a},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return jp(this.origOptions)},n.prototype.toText=function(t,e,r){return uz(this,t,e,r)},n.prototype.isFullyConvertibleToText=function(){return pz(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=qe.YEARLY,n.MONTHLY=qe.MONTHLY,n.WEEKLY=qe.WEEKLY,n.DAILY=qe.DAILY,n.HOURLY=qe.HOURLY,n.MINUTELY=qe.MINUTELY,n.SECONDLY=qe.SECONDLY,n.MO=va.MO,n.TU=va.TU,n.WE=va.WE,n.TH=va.TH,n.FR=va.FR,n.SA=va.SA,n.SU=va.SU,n.parseString=Bp,n.optionsToString=jp,n})()});function Uz(n,t,e,r,a,i){var s={},o=n.accept;function l(p,m){e.forEach(function(h){h.between(p,m,!0).forEach(function(f){s[Number(f)]=!0})})}a.forEach(function(p){var m=new xl(p,i).rezonedDate();s[Number(m)]=!0}),n.accept=function(p){var m=Number(p);return isNaN(m)?o.call(this,p):!s[m]&&(l(new Date(m-1),new Date(m+1)),!s[m])?(s[m]=!0,o.call(this,p)):!0},n.method==="between"&&(l(n.args.after,n.args.before),n.accept=function(p){var m=Number(p);return s[m]?!0:(s[m]=!0,o.call(this,p))});for(var c=0;c{Yy();CS();Wr()});function Pne(n,t){var e=[],r=[],a=[],i=[],s=Lp(n),o=s.dtstart,l=s.tzid,c=Nne(n,t.unfold);return c.forEach(function(d){var u;if(d){var p=_ne(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(",")));e.push(Bp(d));break;case"RDATE":var g=(u=/RDATE(?:;TZID=([^:=]+))?/i.exec(d))!==null&&u!==void 0?u:[],v=g[1];v&&!l&&(l=v),r=r.concat(Vz(f,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: ".concat(h.join(",")));a.push(Bp(f));break;case"EXDATE":i=i.concat(Vz(f,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+m)}}}),{dtstart:o,tzid:l,rrulevals:e,rdatevals:r,exrulevals:a,exdatevals:i}}function Mne(n,t){var e=Pne(n,t),r=e.rrulevals,a=e.rdatevals,i=e.exrulevals,s=e.exdatevals,o=e.dtstart,l=e.tzid,c=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||a.length||i.length||s.length){var d=new AS(c);return d.dtstart(o),d.tzid(l||void 0),r.forEach(function(p){d.rrule(new ce(PS(p,o,l),c))}),a.forEach(function(p){d.rdate(p)}),i.forEach(function(p){d.exrule(new ce(PS(p,o,l),c))}),s.forEach(function(p){d.exdate(p)}),t.compatible&&t.dtstart&&d.rdate(o),d}var u=r[0]||{};return new ce(PS(u,u.dtstart||t.dtstart||o,u.tzid||t.tzid||l),c)}function Ky(n,t){return t===void 0&&(t={}),Mne(n,Ane(t))}function PS(n,t,e){return Rr(Rr({},n),{dtstart:t,tzid:e})}function Ane(n){var t=[],e=Object.keys(n),r=Object.keys(qz);if(e.forEach(function(a){Xe(r,a)||t.push(a)}),t.length)throw new Error("Invalid options: "+t.join(", "));return Rr(Rr({},qz),n)}function Ine(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var t=tz(n,":",1),e=t[0],r=t[1];return{name:e,value:r}}function _ne(n){var t=Ine(n),e=t.name,r=t.value,a=e.split(";");if(!a)throw new Error("empty property name");return{name:a[0].toUpperCase(),parms:a.slice(1),value:r}}function Nne(n,t){if(t===void 0&&(t=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!t)return n.split(/\s/);for(var e=n.split(` +`),r=0;r0&&a[0]===" "?(e[r-1]+=a.slice(1),e.splice(r,1)):r+=1:e.splice(r,1)}return e}function Rne(n){n.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function Vz(n,t){return Rne(t),n.split(",").map(function(e){return Np(e)})}var qz,MS=b(()=>{ds();ya();IS();Wr();cn();DS();qz={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function $z(n){var t=this;return function(e){if(e!==void 0&&(t["_".concat(n)]=e),t["_".concat(n)]!==void 0)return t["_".concat(n)];for(var r=0;r{ds();ya();Wr();cn();Wz();MS();ES();AS=(function(n){fd(t,n);function t(e){e===void 0&&(e=!1);var r=n.call(this,{},e)||this;return r.dtstart=$z.apply(r,["dtstart"]),r.tzid=$z.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return t.prototype._iter=function(e){return Uz(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){Yz(e,this._rrule)},t.prototype.exrule=function(e){Yz(e,this._exrule)},t.prototype.rdate=function(e){Gz(e,this._rdate)},t.prototype.exdate=function(e){Gz(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return Ky(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return Ky(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(jp({dtstart:this._dtstart}))),this._rrule.forEach(function(r){e=e.concat(r.toString().split(` +`))}),this._exrule.forEach(function(r){e=e.concat(r.toString().split(` +`).map(function(a){return a.replace(/^RRULE:/,"EXRULE:")}).filter(function(a){return!/^DTSTART/.test(a)}))}),this._rdate.length&&e.push(Kz("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(Kz("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(` +`)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(r){return e.rrule(r.clone())}),this._exrule.forEach(function(r){return e.exrule(r.clone())}),this._rdate.forEach(function(r){return e.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return e.exdate(new Date(r.getTime()))}),e},t})(ce)});var _S=b(()=>{ya();IS();MS();us();wl();Wr()});function Cl(n){if(!n)return n;let t=n.trim();if(t.startsWith("[[")&&t.endsWith("]]")){let r=t.slice(2,-2).trim(),a=r.indexOf("|"),i=a!==-1?r.substring(0,a):r;return(0,NS.parseLinktext)(i).path}let e=t.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(e){let r=e[2].trim();try{r=decodeURIComponent(r)}catch(i){console.debug("Failed to decode URI component:",r,i)}return(0,NS.parseLinktext)(r).path}return t}function vi(n,t,e,r,a,i){if(i)return n.fileManager.generateMarkdownLink(t,e,r||"",a||"");let o=`[[${n.metadataCache.fileToLinktext(t,e,!0)}`;return r&&(o+=r),a&&(o+=`|${a}`),o+="]]",o}function RS(n,t,e,r,a){return vi(n,t,e,"",r,a)}var NS,Hp=b(()=>{NS=require("obsidian")});function One(n){return Fne.includes(n)}function Lne(n){return typeof n=="string"?n:n.uid}function lo(n){if(typeof n=="string"){let t=n.trim();return t?{uid:t,reltype:$n}:null}if(typeof n=="object"&&n!==null){let t=n,e=typeof t.uid=="string"?t.uid.trim():"";if(!e)return null;let r=typeof t.reltype=="string"?t.reltype.trim().toUpperCase():"",a=One(r)?r:$n,i=typeof t.gap=="string"&&t.gap.trim().length>0?t.gap.trim():void 0;return i?{uid:e,reltype:a,gap:i}:{uid:e,reltype:a}}return null}function Zy(n){if(n==null)return;let t=Array.isArray(n)?n:[n],e=[];for(let r of t){let a=lo(r);a&&e.push(a)}return e.length>0?e:void 0}function Qz(n){return n.map(t=>{let e={uid:t.uid,reltype:t.reltype};return t.gap&&t.gap.trim().length>0&&(e.gap=t.gap),e})}function Pl(n,t,e){let r=Lne(e);if(!r)return null;let a=Cl(r);if(!a)return null;let i=n.metadataCache.getFirstLinkpathDest(a,t);if(i instanceof Qy.TFile)return{path:i.path,file:i};let s=n.vault.getAbstractFileByPath(a);return s instanceof Qy.TFile?{path:s.path,file:s}:null}function Yn(n,t,e,r){let a=n.vault.getAbstractFileByPath(e);return a instanceof Qy.TFile?vi(n,a,t,"","",r):`[[${(e.split("/").pop()||e).replace(/\.md$/i,"")}]]`}var Qy,$n,Fne,vd=b(()=>{Qy=require("obsidian");yl();Hp();$n="FINISHTOSTART",Fne=["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"]});var bd,FS=b(()=>{vd();Ke();bd=class{constructor(t){this.mapping=t}toUserField(t){return this.mapping[t]}normalizeTitle(t){if(typeof t=="string")return t;if(Array.isArray(t))return t.map(e=>String(e)).join(", ");if(t!=null)return typeof t=="object"?"":String(t)}mapFromFrontmatter(t,e,r){var i;if(!t)return{};let a={path:e};if(t[this.mapping.title]!==void 0){let s=t[this.mapping.title],o=this.normalizeTitle(s);o!==void 0&&(a.title=o)}else if(r){let s=(i=e.split("/").pop())==null?void 0:i.replace(".md","");s&&(a.title=s)}if(t[this.mapping.status]!==void 0){let s=t[this.mapping.status];typeof s=="boolean"?a.status=s?"true":"false":a.status=s}if(t[this.mapping.priority]!==void 0&&(a.priority=t[this.mapping.priority]),t[this.mapping.due]!==void 0&&(a.due=t[this.mapping.due]),t[this.mapping.scheduled]!==void 0&&(a.scheduled=t[this.mapping.scheduled]),t[this.mapping.contexts]!==void 0){let s=t[this.mapping.contexts];a.contexts=Array.isArray(s)?s:[s]}if(t[this.mapping.projects]!==void 0){let s=t[this.mapping.projects];a.projects=Array.isArray(s)?s:[s]}if(t[this.mapping.timeEstimate]!==void 0&&(a.timeEstimate=t[this.mapping.timeEstimate]),t[this.mapping.completedDate]!==void 0&&(a.completedDate=t[this.mapping.completedDate]),t[this.mapping.recurrence]!==void 0&&(a.recurrence=t[this.mapping.recurrence]),t[this.mapping.recurrenceAnchor]!==void 0){let s=t[this.mapping.recurrenceAnchor];s==="scheduled"||s==="completion"?a.recurrence_anchor=s:(console.warn(`Invalid recurrence_anchor value: ${s}, defaulting to 'scheduled'`),a.recurrence_anchor="scheduled")}if(t[this.mapping.dateCreated]!==void 0&&(a.dateCreated=t[this.mapping.dateCreated]),t[this.mapping.dateModified]!==void 0&&(a.dateModified=t[this.mapping.dateModified]),t[this.mapping.timeEntries]!==void 0){let s=t[this.mapping.timeEntries];a.timeEntries=Array.isArray(s)?s:[]}if(t[this.mapping.completeInstances]!==void 0&&(a.complete_instances=Sy(t[this.mapping.completeInstances])),t[this.mapping.skippedInstances]!==void 0&&(a.skipped_instances=Sy(t[this.mapping.skippedInstances])),this.mapping.blockedBy&&t[this.mapping.blockedBy]!==void 0){let s=Zy(t[this.mapping.blockedBy]);s&&(a.blockedBy=s)}if(t[this.mapping.icsEventId]!==void 0){let s=t[this.mapping.icsEventId];a.icsEventId=Array.isArray(s)?s:[s]}if(t[this.mapping.reminders]!==void 0){let s=t[this.mapping.reminders];if(Array.isArray(s)){let o=s.filter(l=>l!=null);o.length>0&&(a.reminders=o)}else s!=null&&(a.reminders=[s])}return t.tags&&Array.isArray(t.tags)&&(a.tags=t.tags,a.archived=t.tags.includes(this.mapping.archiveTag)),a}mapToFrontmatter(t,e,r){let a={};if(t.title!==void 0&&(a[this.mapping.title]=t.title),r&&delete a[this.mapping.title],t.status!==void 0){let s=t.status.toLowerCase(),o=s==="true"||s==="false"?s==="true":t.status;a[this.mapping.status]=o}if(t.priority!==void 0&&(a[this.mapping.priority]=t.priority),t.due!==void 0&&(a[this.mapping.due]=t.due),t.scheduled!==void 0&&(a[this.mapping.scheduled]=t.scheduled),t.contexts!==void 0&&(!Array.isArray(t.contexts)||t.contexts.length>0)&&(a[this.mapping.contexts]=t.contexts),t.projects!==void 0&&(!Array.isArray(t.projects)||t.projects.length>0)&&(a[this.mapping.projects]=t.projects),t.timeEstimate!==void 0&&(a[this.mapping.timeEstimate]=t.timeEstimate),t.completedDate!==void 0&&(a[this.mapping.completedDate]=t.completedDate),t.recurrence!==void 0&&(a[this.mapping.recurrence]=t.recurrence),t.recurrence_anchor!==void 0&&(a[this.mapping.recurrenceAnchor]=t.recurrence_anchor),t.dateCreated!==void 0&&(a[this.mapping.dateCreated]=t.dateCreated),t.dateModified!==void 0&&(a[this.mapping.dateModified]=t.dateModified),t.timeEntries!==void 0&&(a[this.mapping.timeEntries]=t.timeEntries),t.complete_instances!==void 0&&(a[this.mapping.completeInstances]=t.complete_instances),t.skipped_instances!==void 0&&t.skipped_instances.length>0&&(a[this.mapping.skippedInstances]=t.skipped_instances),t.blockedBy!==void 0)if(Array.isArray(t.blockedBy)){let s=t.blockedBy.map(o=>lo(o)).filter(o=>!!o);s.length>0&&(a[this.mapping.blockedBy]=Qz(s))}else a[this.mapping.blockedBy]=t.blockedBy;t.icsEventId!==void 0&&t.icsEventId.length>0&&(a[this.mapping.icsEventId]=t.icsEventId),t.reminders!==void 0&&t.reminders.length>0&&(a[this.mapping.reminders]=t.reminders);let i=t.tags?[...t.tags]:[];return e&&!i.includes(e)&&i.push(e),t.archived===!0&&!i.includes(this.mapping.archiveTag)?i.push(this.mapping.archiveTag):t.archived===!1&&(i=i.filter(s=>s!==this.mapping.archiveTag)),i.length>0&&(a.tags=i),a}updateMapping(t){this.mapping=t}getMapping(){return{...this.mapping}}lookupMappingKey(t){for(let[e,r]of Object.entries(this.mapping))if(r===t)return e;return null}isRecognizedProperty(t){return this.lookupMappingKey(t)!==null}isPropertyForField(t,e){return this.mapping[e]===t}toUserFields(t){return t.map(e=>this.mapping[e])}fromUserField(t){return this.lookupMappingKey(t)}static validateMapping(t){let e=[],r=Object.keys(t);for(let s of r)(!t[s]||t[s].trim()==="")&&e.push(`Field "${s}" cannot be empty`);let a=Object.values(t),i=new Set(a);return a.length!==i.size&&e.push("Field mappings must have unique property names"),{valid:e.length===0,errors:e}}}});var tU={};Be(tU,{addDTSTARTToRecurrenceRule:()=>Td,addDTSTARTToRecurrenceRuleWithDraggedTime:()=>HS,calculateDefaultDate:()=>ba,calculateDuration:()=>Zz,calculateTotalTimeSpent:()=>$r,ensureFolderExists:()=>Al,extractNoteInfo:()=>qne,extractTaskInfo:()=>OS,extractTimeblocksFromNote:()=>eU,filterEmptyProjects:()=>ms,formatTime:()=>zp,generateRecurringInstances:()=>_l,generateTimeblockId:()=>LS,getActiveTimeEntry:()=>Xy,getEffectiveTaskStatus:()=>co,getNextUncompletedOccurrence:()=>Jz,getRecurrenceDisplayText:()=>Wp,getRecurringTaskCompletionText:()=>Hne,isDueByRRule:()=>Il,isSameDay:()=>ev,parseTime:()=>Bne,sanitizeTags:()=>Qa,shouldShowRecurringTaskOnDate:()=>jne,shouldUseRecurringTaskUI:()=>zne,splitFrontmatterAndBody:()=>Up,timeblockToCalendarEvent:()=>Vne,updateDTSTARTInRecurrenceRule:()=>jS,updateTimeblockInDailyNote:()=>tv,updateToNextScheduledOccurrence:()=>Nl,validateTimeBlock:()=>Xz});function Jy(n){if(!n.startsWith("---"))return{};let t=n.indexOf("---",3);if(t===-1)return{};let e=n.substring(3,t);try{return(0,Ml.parseYaml)(e)||{}}catch(r){return console.error("Error parsing frontmatter:",r),{}}}async function Al(n,t){try{let r=(0,Ml.normalizePath)(t).split("/").filter(i=>i.length>0),a="";for(let i of r)a=a?`${a}/${i}`:i,n.getAbstractFileByPath(a)||await n.createFolder(a)}catch(e){let r=e instanceof Error?e.message:String(e),a=e instanceof Error?e.stack:void 0;console.error("Error creating folder structure:",{error:r,stack:a,folderPath:t,normalizedPath:(0,Ml.normalizePath)(t)});let i=new Error(`Failed to create folder "${t}": ${r}`);throw a&&(i.stack=a),i}}function Zz(n,t){try{let e=new Date(n),r=new Date(t);if(isNaN(e.getTime())||isNaN(r.getTime()))return console.error("Invalid timestamps for duration calculation:",{startTime:n,endTime:t}),0;if(r<=e)return console.error("End time is not after start time:",{startTime:n,endTime:t}),0;let a=r.getTime()-e.getTime(),i=Math.round(a/(1e3*60));return Math.max(0,i)}catch(e){return console.error("Error calculating duration:",e,{startTime:n,endTime:t}),0}}function $r(n){return!n||!Array.isArray(n)?0:n.reduce((t,e)=>{if(!e.startTime||!e.endTime)return t;let r=Zz(e.startTime,e.endTime);return t+r},0)}function Xy(n){return!n||!Array.isArray(n)?null:n.find(t=>t.startTime&&!t.endTime)||null}function zp(n){if(!n||n===0||isNaN(n))return"0m";let t=Math.floor(n/60),e=n%60;return t===0?`${e}m`:e===0?`${t}h`:`${t}h ${e}m`}function Bne(n){try{let t=n.match(/^(\d{1,2}):(\d{2})$/);if(t){let e=parseInt(t[1],10),r=parseInt(t[2],10);if(e>=0&&e<=23&&r>=0&&r<=59)return{hours:e,minutes:r}}return null}catch(t){return console.error("Error parsing time string:",t),null}}function ba(n){if(n==="none")return"";let t=new Date,e;switch(n){case"today":e=t;break;case"tomorrow":e=new Date(t),e.setDate(t.getDate()+1);break;case"next-week":e=new Date(t),e.setDate(t.getDate()+7);break;default:return""}return M(e,"yyyy-MM-dd")}function ev(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function OS(n,t,e,r,a,i){var c;let s=n.metadataCache.getFileCache(r),o=s==null?void 0:s.frontmatter;if(o)if(a){let d=a.mapFromFrontmatter(o,e,i);return{title:d.title||"Untitled task",status:d.status||"open",priority:d.priority||"normal",due:d.due,scheduled:d.scheduled,path:e,archived:d.archived||!1,tags:d.tags||[],contexts:d.contexts||[],projects:d.projects||[],recurrence:d.recurrence,complete_instances:d.complete_instances,completedDate:d.completedDate,timeEstimate:d.timeEstimate,timeEntries:d.timeEntries,dateCreated:d.dateCreated,dateModified:d.dateModified,reminders:d.reminders}}else{let u=new bd(uy).mapFromFrontmatter(o,e,i);return{title:u.title||"Untitled task",status:u.status||"open",priority:u.priority||"normal",due:u.due,scheduled:u.scheduled,path:e,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}}return{title:((c=e.split("/").pop())==null?void 0:c.replace(".md",""))||"Untitled",status:"open",priority:"normal",path:e,archived:!1,reminders:[]}}function Up(n){if(n.startsWith("---")){let t=n.match(/^---\s*\r?\n([\s\S]*?)\r?\n---\s*\r?\n?([\s\S]*)$/);if(t)return{frontmatter:t[1],body:t[2]||""}}return{frontmatter:null,body:n}}function Il(n,t){if(!n.recurrence)return!0;if(typeof n.recurrence=="string")try{let e,r=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(r){let c=r[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));e=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;e=new Date(Date.UTC(d,u,p,m,h,f,0))}}else if(n.scheduled)e=Tn(n.scheduled);else if(n.dateCreated)e=Tn(n.dateCreated);else return!1;let a=n.recurrence.replace(/DTSTART:[^;]+;?/,""),i=ce.parseString(a);i.dtstart=e;let s=new ce(i),o=Tn(Xw(t));return s.between(o,new Date(o.getTime()+1440*60*1e3-1),!0).length>0}catch(e){return console.error("Error evaluating rrule:",e,{task:n.title,recurrence:n.recurrence}),!0}return!0}function co(n,t){if(!n.recurrence)return n.status||"open";let e=le(t);return(Array.isArray(n.complete_instances)?n.complete_instances:[]).includes(e)?"done":"open"}function jne(n,t){return n.recurrence?Il(n,t):!0}function Hne(n,t){var a;if(!n.recurrence)return"";let e=le(t);return((a=n.complete_instances)==null?void 0:a.includes(e))||!1?"Completed for this date":"Not completed for this date"}function zne(n){return!!n.recurrence}function _l(n,t,e){if(!n.recurrence)return[];if(typeof n.recurrence=="string")try{let i,s=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(s){let p=s[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));i=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,v=parseInt(p.slice(11,13))||0,T=parseInt(p.slice(13,15))||0;i=new Date(Date.UTC(m,h,f,g,v,T,0))}}else if(n.scheduled)i=Tn(n.scheduled);else if(n.dateCreated)i=Tn(n.dateCreated);else return[];let o=n.recurrence.replace(/DTSTART:[^;]+;?/,""),l=ce.parseString(o);l.dtstart=i;let c=new ce(l),d=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)),u=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999));return c.between(d,u,!0)}catch(i){console.error("Error generating recurring instances:",i,{task:n.title,recurrence:n.recurrence})}let r=[],a=new Date(t);for(;a<=e;)Il(n,a)&&r.push(new Date(a)),a.setUTCDate(a.getUTCDate()+1);return r}function Jz(n){return n.recurrence?(n.recurrence_anchor||"scheduled")==="completion"?Wne(n):Une(n):null}function Une(n){if(!n.recurrence)return null;try{let t=Vt(),e=je(t),r=365;n.recurrence.includes("FREQ=DAILY")?r=30:n.recurrence.includes("FREQ=WEEKLY")?r=90:n.recurrence.includes("FREQ=MONTHLY")?r=400:n.recurrence.includes("FREQ=YEARLY")&&(r=800);let a=e;if(n.recurrence.includes("DTSTART:")){let l=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(l){let c=l[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)),m=new Date(Date.UTC(d,u,p,0,0,0,0));a=m=e)return l}return null}catch(t){return console.error("Error calculating next scheduled-based occurrence:",t,{task:n.title}),null}}function Wne(n){if(!n.recurrence||typeof n.recurrence!="string")return null;try{let t=Vt(),e=je(t),r=365;n.recurrence.includes("FREQ=DAILY")?r=30:n.recurrence.includes("FREQ=WEEKLY")?r=90:n.recurrence.includes("FREQ=MONTHLY")?r=400:n.recurrence.includes("FREQ=YEARLY")&&(r=800);let a=null;if(n.recurrence.includes("DTSTART:")){let d=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(d){let u=d[1];if(u.length===8){let p=parseInt(u.slice(0,4)),m=parseInt(u.slice(4,6))-1,h=parseInt(u.slice(6,8));a=new Date(Date.UTC(p,m,h,0,0,0,0))}}}let i=a||e,s=new Date(i.getTime()+r*24*60*60*1e3),o=_l(n,i,s),l=new Set(n.skipped_instances||[]),c=a?a.getTime():0;for(let d of o){let u=le(d);if(d.getTime()>c&&d>=e&&!l.has(u))return d}return null}catch(t){return console.error("Error calculating completion-based recurrence:",t,{task:n.title}),null}}function Nl(n,t=!0){let e=Jz(n),r=null,a=null,i=null;if(e){if(t)try{let s=n.scheduled?je(n.scheduled):null,o=n.due?je(n.due):null;if(s&&o){let l=o.getTime()-s.getTime();e&&(i=new Date(e.getTime()+l))}}catch(s){console.error("Error calculating next due date with offset:",s)}if(n.scheduled&&n.scheduled.includes("T")){let s=n.scheduled.split("T")[1];r=`${le(e)}T${s}`}else r=le(e);if(i&&n.due&&n.due.includes("T")){let s=n.due.split("T")[1];a=`${le(i)}T${s}`}else i&&(a=le(i))}return{scheduled:r,due:a}}function Wp(n){if(!n)return"";try{if(n.includes("FREQ=")){let t=n.replace(/DTSTART:[^;]+;?/,"");return ce.fromString(t).toText()}return"rrule"}catch(t){return console.error("Error converting recurrence to display text:",t,{recurrence:n}),"rrule"}}function qne(n,t,e,r,a){var c;let i=((c=e.split("/").pop())==null?void 0:c.replace(".md",""))||"Untitled",s=[],o,l=r==null?void 0:r.stat.mtime;if(r){let d=n.metadataCache.getFileCache(r),u=d==null?void 0:d.frontmatter;if(u)if(u.title&&(i=u.title),u.tags&&Array.isArray(u.tags)&&(s=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(i==="Untitled"){let d=t.match(/^#\s+(.+)$/m);d&&d[1]&&(i=d[1].trim())}if(!o&&r&&(o=M(new Date(r.stat.ctime),"yyyy-MM-dd'T'HH:mm:ss")),o&&!o.match(/^\d{4}-\d{2}-\d{2}$/))try{let d=$t(o);isNaN(d.getTime())||(o=M(d,"yyyy-MM-dd"))}catch(d){console.error(`Error parsing date ${o}:`,d)}return{title:i,tags:s,path:e,createdDate:o,lastModified:l}}function Xz(n){if(!n||typeof n!="object"||!n.id||typeof n.id!="string"||!n.title||typeof n.title!="string"||!n.startTime||typeof n.startTime!="string"||!n.endTime||typeof n.endTime!="string")return!1;let t=/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/;if(!t.test(n.startTime)||!t.test(n.endTime))return!1;let[e,r]=n.startTime.split(":").map(Number),[a,i]=n.endTime.split(":").map(Number),s=e*60+r;if(a*60+i<=s||n.attachments&&!Array.isArray(n.attachments))return!1;if(n.attachments){for(let l of n.attachments)if(typeof l!="string"||!l.trim())return!1}return!(n.color&&typeof n.color!="string"||n.description&&typeof n.description!="string")}function eU(n,t){try{let e=Jy(n);if(!e||!e.timeblocks||!Array.isArray(e.timeblocks))return[];let r=[];for(let a of e.timeblocks)Xz(a)?r.push(a):console.warn(`Invalid timeblock in ${t}:`,a);return r}catch(e){return console.error(`Error extracting timeblocks from ${t}:`,e),[]}}function Vne(n,t){let e=`${t}T${n.startTime}:00`,r=`${t}T${n.endTime}:00`;return{id:`timeblock-${n.id}`,title:n.title,start:e,end:r,allDay:!1,backgroundColor:n.color||"#6366f1",borderColor:n.color||"#4f46e5",editable:!0,eventType:"timeblock",extendedProps:{type:"timeblock",eventType:"timeblock",timeblock:n,originalDate:t,description:n.description,attachments:n.attachments||[]}}}function LS(){return`tb-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}async function tv(n,t,e,r,a,i){let{getDailyNote:s,getAllDailyNotes:o,appHasDailyNotesPluginLoaded:l}=await Promise.resolve().then(()=>Ie(Xi()));if(!l())throw new Error("Daily Notes plugin is not enabled");let c=o(),d=window.moment(e),u=s(d,c);if(!u)throw new Error(`Daily note for ${e} not found`);let p=await n.vault.read(u),m=eU(p,u.path),h=m.findIndex(v=>v.id===t);if(h===-1)throw new Error(`Timeblock ${t} not found`);let f=m[h];if(e===r){await $ne(n,u,t,a,i);return}await Yne(n,u,t);let g={...f,startTime:a,endTime:i};await Gne(n,r,g)}async function $ne(n,t,e,r,a){let i=await n.vault.read(t),s=Jy(i)||{};if(!s.timeblocks||!Array.isArray(s.timeblocks))throw new Error("No timeblocks found in frontmatter");let o=s.timeblocks.findIndex(l=>l.id===e);if(o===-1)throw new Error(`Timeblock ${e} not found`);s.timeblocks[o].startTime=r,s.timeblocks[o].endTime=a,await BS(n,t,s,i)}async function Yne(n,t,e){let r=await n.vault.read(t),a=Jy(r)||{};!a.timeblocks||!Array.isArray(a.timeblocks)||(a.timeblocks=a.timeblocks.filter(i=>i.id!==e),await BS(n,t,a,r))}async function Gne(n,t,e){let{createDailyNote:r,getDailyNote:a,getAllDailyNotes:i}=await Promise.resolve().then(()=>Ie(Xi())),s=window.moment(t),o=i(),l=a(s,o);if(!l){try{l=await r(s)}catch(u){let p=u instanceof Error?u.message:String(u);throw new Error(`Failed to create daily note: ${p}. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.`)}if(!l)throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.")}let c=await n.vault.read(l),d=Jy(c)||{};d.timeblocks||(d.timeblocks=[]),d.timeblocks.push(e),await BS(n,l,d,c)}async function BS(n,t,e,r){let a=r;if(r.startsWith("---")){let o=r.indexOf("---",3);o!==-1&&(a=r.substring(o+3))}let s=`--- +${(0,Ml.stringifyYaml)(e)}---${a}`;await n.vault.modify(t,s)}function ms(n){return!n||!Array.isArray(n)?[]:n.filter(t=>{if(typeof t!="string")return!1;let e=t.trim();return!(e.length===0||e==='""'||e==="''")})}function Td(n){if(!n.recurrence||typeof n.recurrence!="string")return null;if(n.recurrence.includes("DTSTART:"))return n.recurrence;let t;if(n.scheduled)t=n.scheduled;else if(n.dateCreated)t=n.dateCreated;else return null;try{let e;if(Ft(t)){let r=$t(t),a=r.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0"),o=String(r.getHours()).padStart(2,"0"),l=String(r.getMinutes()).padStart(2,"0"),c=String(r.getSeconds()).padStart(2,"0");e=`${a}${i}${s}T${o}${l}${c}Z`}else{let r=je(t),a=r.getUTCFullYear(),i=String(r.getUTCMonth()+1).padStart(2,"0"),s=String(r.getUTCDate()).padStart(2,"0");e=`${a}${i}${s}`}return`DTSTART:${e};${n.recurrence}`}catch(e){return console.error("Error parsing date for DTSTART:",e,{sourceDateString:t}),null}}function jS(n,t){if(!n||typeof n!="string")return null;try{let e;if(Ft(t)){let r=$t(t),a=r.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0"),o=String(r.getHours()).padStart(2,"0"),l=String(r.getMinutes()).padStart(2,"0"),c=String(r.getSeconds()).padStart(2,"0");e=`${a}${i}${s}T${o}${l}${c}Z`}else{let r=je(t),a=r.getUTCFullYear(),i=String(r.getUTCMonth()+1).padStart(2,"0"),s=String(r.getUTCDate()).padStart(2,"0");e=`${a}${i}${s}`}return n.includes("DTSTART:")?n.replace(/DTSTART:[^;]+;?/,`DTSTART:${e};`):`DTSTART:${e};${n}`}catch(e){return console.error("Error updating DTSTART in recurrence rule:",e,{dateStr:t}),null}}function HS(n,t,e){if(!n.recurrence||typeof n.recurrence!="string")return null;if(n.recurrence.includes("DTSTART:"))return n.recurrence;let r;if(n.scheduled)r=n.scheduled;else if(n.dateCreated)r=n.dateCreated;else return null;try{let a;if(e){let i=je(r),s=i.getUTCFullYear(),o=String(i.getUTCMonth()+1).padStart(2,"0"),l=String(i.getUTCDate()).padStart(2,"0");a=`${s}${o}${l}`}else{let i=je(r),s=i.getUTCFullYear(),o=String(i.getUTCMonth()+1).padStart(2,"0"),l=String(i.getUTCDate()).padStart(2,"0"),c=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0");a=`${s}${o}${l}T${c}${d}00Z`}return`DTSTART:${a};${n.recurrence}`}catch(a){return console.error("Error parsing date for DTSTART with dragged time:",a,{sourceDateString:r,draggedStart:t,allDay:e}),null}}function Qa(n){return!n||typeof n!="string"?"":n.split(",").map(t=>{let e=t.trim();return e.startsWith("#")?e.slice(1):e}).filter(t=>t.length>0).join(", ")}var Ml,Dr=b(()=>{Ml=require("obsidian");rr();_S();FS();to();Ke()});var rU=D((zS,US)=>{(function(n,t){typeof zS=="object"&&typeof US!="undefined"?US.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=t()})(zS,(function(){"use strict";var n="month",t="quarter";return function(e,r){var a=r.prototype;a.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var i=a.add;a.add=function(o,l){return o=Number(o),this.$utils().p(l)===t?this.add(3*o,n):i.bind(this)(o,l)};var s=a.startOf;a.startOf=function(o,l){var c=this.$utils(),d=!!c.u(l)||l;if(c.p(o)===t){var u=this.quarter()-1;return d?this.month(3*u).startOf(n).startOf("day"):this.month(3*u+2).endOf(n).endOf("day")}return s.bind(this)(o,l)}}}))});var nt=D((WS,qS)=>{(function(n,t){typeof WS=="object"&&typeof qS!="undefined"?qS.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=t()})(WS,(function(){"use strict";var n=1e3,t=6e4,e=36e5,r="millisecond",a="second",i="minute",s="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(N){var P=["th","st","nd","rd"],_=N%100;return"["+N+(P[(_-20)%10]||P[_]||P[0])+"]"}},v=function(N,P,_){var Y=String(N);return!Y||Y.length>=P?N:""+Array(P+1-Y.length).join(_)+N},T={s:v,z:function(N){var P=-N.utcOffset(),_=Math.abs(P),Y=Math.floor(_/60),Q=_%60;return(P<=0?"+":"-")+v(Y,2,"0")+":"+v(Q,2,"0")},m:function N(P,_){if(P.date()<_.date())return-N(_,P);var Y=12*(_.year()-P.year())+(_.month()-P.month()),Q=P.clone().add(Y,c),W=_-Q<0,H=P.clone().add(Y+(W?-1:1),c);return+(-(Y+(_-Q)/(W?Q-H:H-Q))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:c,y:u,w:l,d:o,D:p,h:s,m:i,s:a,ms:r,Q:d}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",w={};w[k]=g;var S="$isDayjsObject",x=function(N){return N instanceof z||!(!N||!N[S])},I=function N(P,_,Y){var Q;if(!P)return k;if(typeof P=="string"){var W=P.toLowerCase();w[W]&&(Q=W),_&&(w[W]=_,Q=W);var H=P.split("-");if(!Q&&H.length>1)return N(H[0])}else{var K=P.name;w[K]=P,Q=K}return!Y&&Q&&(k=Q),Q||!Y&&k},A=function(N,P){if(x(N))return N.clone();var _=typeof P=="object"?P:{};return _.date=N,_.args=arguments,new z(_)},B=T;B.l=I,B.i=x,B.w=function(N,P){return A(N,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var z=(function(){function N(_){this.$L=I(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[S]=!0}var P=N.prototype;return P.parse=function(_){this.$d=(function(Y){var Q=Y.date,W=Y.utc;if(Q===null)return new Date(NaN);if(B.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var H=Q.match(h);if(H){var K=H[2]-1||0,ae=(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,ae)):new Date(H[1],K,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ae)}}return new Date(Q)})(_),this.init()},P.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},P.$utils=function(){return B},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(_,Y){var Q=A(_);return this.startOf(Y)<=Q&&Q<=this.endOf(Y)},P.isAfter=function(_,Y){return A(_){(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(O||(O={}));(function(n){n[n.SUNDAY=0]="SUNDAY",n[n.MONDAY=1]="MONDAY",n[n.TUESDAY=2]="TUESDAY",n[n.WEDNESDAY=3]="WEDNESDAY",n[n.THURSDAY=4]="THURSDAY",n[n.FRIDAY=5]="FRIDAY",n[n.SATURDAY=6]="SATURDAY"})(we||(we={}));(function(n){n[n.JANUARY=1]="JANUARY",n[n.FEBRUARY=2]="FEBRUARY",n[n.MARCH=3]="MARCH",n[n.APRIL=4]="APRIL",n[n.MAY=5]="MAY",n[n.JUNE=6]="JUNE",n[n.JULY=7]="JULY",n[n.AUGUST=8]="AUGUST",n[n.SEPTEMBER=9]="SEPTEMBER",n[n.OCTOBER=10]="OCTOBER",n[n.NOVEMBER=11]="NOVEMBER",n[n.DECEMBER=12]="DECEMBER"})(Gn||(Gn={}))});function nU(n,t){n.assign("day",t.getDate()),n.assign("month",t.getMonth()+1),n.assign("year",t.getFullYear())}function aU(n,t){n.assign("hour",t.getHours()),n.assign("minute",t.getMinutes()),n.assign("second",t.getSeconds()),n.assign("millisecond",t.getMilliseconds()),n.assign("meridiem",t.getHours()<12?O.AM:O.PM)}function rv(n,t){n.imply("day",t.getDate()),n.imply("month",t.getMonth()+1),n.imply("year",t.getFullYear())}function iU(n,t){n.imply("hour",t.getHours()),n.imply("minute",t.getMinutes()),n.imply("second",t.getSeconds()),n.imply("millisecond",t.getMilliseconds()),n.imply("meridiem",t.getHours()<12?O.AM:O.PM)}var VS=b(()=>{Ze()});function uo(n,t,e,r,a=0){let i=0,s=0;for(;s{$S=Ie(nt(),1);Ze();Qne={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:120,timezoneOffsetNonDst:60,dstStart:n=>sU(n,Gn.MARCH,we.SUNDAY,2),dstEnd:n=>sU(n,Gn.OCTOBER,we.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:n=>uo(n,Gn.MARCH,we.SUNDAY,2,2),dstEnd:n=>uo(n,Gn.NOVEMBER,we.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-240,timezoneOffsetNonDst:-300,dstStart:n=>uo(n,Gn.MARCH,we.SUNDAY,2,2),dstEnd:n=>uo(n,Gn.NOVEMBER,we.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-360,timezoneOffsetNonDst:-420,dstStart:n=>uo(n,Gn.MARCH,we.SUNDAY,2,2),dstEnd:n=>uo(n,Gn.NOVEMBER,we.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-420,timezoneOffsetNonDst:-480,dstStart:n=>uo(n,Gn.MARCH,we.SUNDAY,2,2),dstEnd:n=>uo(n,Gn.NOVEMBER,we.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360}});function oU(n,t){var r,a,i,s,o,l,c;let e=new Date(n);if(t.y&&(t.year=t.y,delete t.y),t.mo&&(t.month=t.mo,delete t.mo),t.M&&(t.month=t.M,delete t.M),t.w&&(t.week=t.w,delete t.w),t.d&&(t.day=t.d,delete t.d),t.h&&(t.hour=t.h,delete t.h),t.m&&(t.minute=t.m,delete t.m),t.s&&(t.second=t.s,delete t.s),t.ms&&(t.millisecond=t.ms,delete t.ms),"year"in t){let d=Math.floor(t.year);e.setFullYear(e.getFullYear()+d);let u=t.year-d;u>0&&(t.month=(r=t==null?void 0:t.month)!=null?r:0,t.month+=u*12)}if("quarter"in t){let d=Math.floor(t.quarter);e.setMonth(e.getMonth()+d*3)}if("month"in t){let d=Math.floor(t.month);e.setMonth(e.getMonth()+d);let u=t.month-d;u>0&&(t.week=(a=t==null?void 0:t.week)!=null?a:0,t.week+=u*4)}if("week"in t){let d=Math.floor(t.week);e.setDate(e.getDate()+d*7);let u=t.week-d;u>0&&(t.day=(i=t==null?void 0:t.day)!=null?i:0,t.day+=Math.round(u*7))}if("day"in t){let d=Math.floor(t.day);e.setDate(e.getDate()+d);let u=t.day-d;u>0&&(t.hour=(s=t==null?void 0:t.hour)!=null?s:0,t.hour+=Math.round(u*24))}if("hour"in t){let d=Math.floor(t.hour);e.setHours(e.getHours()+d);let u=t.hour-d;u>0&&(t.minute=(o=t==null?void 0:t.minute)!=null?o:0,t.minute+=Math.round(u*60))}if("minute"in t){let d=Math.floor(t.minute);e.setMinutes(e.getMinutes()+d);let u=t.minute-d;u>0&&(t.second=(l=t==null?void 0:t.second)!=null?l:0,t.second+=Math.round(u*60))}if("second"in t){let d=Math.floor(t.second);e.setSeconds(e.getSeconds()+d);let u=t.second-d;u>0&&(t.millisecond=(c=t==null?void 0:t.millisecond)!=null?c:0,t.millisecond+=Math.round(u*1e3))}if("millisecond"in t){let d=Math.floor(t.millisecond);e.setMilliseconds(e.getMilliseconds()+d)}return e}function kd(n){let t={};for(let e in n)t[e]=-n[e];return t}var qp=b(()=>{});var lU,GS,at,G,et,Ne=b(()=>{lU=Ie(rU(),1),GS=Ie(nt(),1);VS();YS();qp();GS.default.extend(lU.default);at=class n{constructor(t,e){C(this,"instant");C(this,"timezoneOffset");this.instant=t!=null?t:new Date,this.timezoneOffset=e!=null?e:null}static fromDate(t){return new n(t)}static fromInput(t,e){var i;if(t instanceof Date)return n.fromDate(t);let r=(i=t==null?void 0:t.instant)!=null?i:new Date,a=nv(t==null?void 0:t.timezone,r,e);return new n(r,a)}getDateWithAdjustedTimezone(){let t=new Date(this.instant);return this.timezoneOffset!==null&&t.setMinutes(t.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),t}getSystemTimezoneAdjustmentMinute(t,e){var i;(!t||t.getTime()<0)&&(t=new Date);let r=-t.getTimezoneOffset(),a=(i=e!=null?e:this.timezoneOffset)!=null?i:r;return r-a}getTimezoneOffset(){var t;return(t=this.timezoneOffset)!=null?t:-this.instant.getTimezoneOffset()}},G=class n{constructor(t,e){C(this,"knownValues");C(this,"impliedValues");C(this,"reference");C(this,"_tags",new Set);if(this.reference=t,this.knownValues={},this.impliedValues={},e)for(let a in e)this.knownValues[a]=e[a];let r=t.getDateWithAdjustedTimezone();this.imply("day",r.getDate()),this.imply("month",r.getMonth()+1),this.imply("year",r.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(t){return t in this.knownValues?this.knownValues[t]:t in this.impliedValues?this.impliedValues[t]:null}isCertain(t){return t in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(t,e){return t in this.knownValues?this:(this.impliedValues[t]=e,this)}assign(t,e){return this.knownValues[t]=e,delete this.impliedValues[t],this}delete(t){delete this.knownValues[t],delete this.impliedValues[t]}clone(){let t=new n(this.reference);t.knownValues={},t.impliedValues={};for(let e in this.knownValues)t.knownValues[e]=this.knownValues[e];for(let e in this.impliedValues)t.impliedValues[e]=this.impliedValues[e];return t}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 t=this.dateWithoutTimezoneAdjustment();return!(t.getFullYear()!==this.get("year")||t.getMonth()!==this.get("month")-1||t.getDate()!==this.get("day")||this.get("hour")!=null&&t.getHours()!=this.get("hour")||this.get("minute")!=null&&t.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,GS.default)(this.dateWithoutTimezoneAdjustment())}date(){let t=this.dateWithoutTimezoneAdjustment(),e=this.reference.getSystemTimezoneAdjustmentMinute(t,this.get("timezoneOffset"));return new Date(t.getTime()+e*6e4)}addTag(t){return this._tags.add(t),this}addTags(t){for(let e of t)this._tags.add(e);return this}tags(){return new Set(this._tags)}dateWithoutTimezoneAdjustment(){let t=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 t.setFullYear(this.get("year")),t}static createRelativeFromReference(t,e){let r=oU(t.getDateWithAdjustedTimezone(),e),a=new n(t);return a.addTag("result/relativeDate"),e.hour||e.minute||e.second?(a.addTag("result/relativeDateAndTime"),aU(a,r),nU(a,r),a.assign("timezoneOffset",t.getTimezoneOffset())):(iU(a,r),a.imply("timezoneOffset",t.getTimezoneOffset()),e.day?(a.assign("day",r.getDate()),a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear()),a.assign("weekday",r.getDay())):e.week?(a.assign("day",r.getDate()),a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear()),a.imply("weekday",r.getDay())):(a.imply("day",r.getDate()),e.month?(a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear())):(a.imply("month",r.getMonth()+1),e.year?a.assign("year",r.getFullYear()):a.imply("year",r.getFullYear())))),a}},et=class n{constructor(t,e,r,a,i){C(this,"refDate");C(this,"index");C(this,"text");C(this,"reference");C(this,"start");C(this,"end");this.reference=t,this.refDate=t.instant,this.index=e,this.text=r,this.start=a||new G(t),this.end=i}clone(){let t=new n(this.reference,this.index,this.text);return t.start=this.start?this.start.clone():null,t.end=this.end?this.end.clone():null,t}date(){return this.start.date()}addTag(t){return this.start.addTag(t),this.end&&this.end.addTag(t),this}addTags(t){return this.start.addTags(t),this.end&&this.end.addTags(t),this}tags(){let t=new Set(this.start.tags());if(this.end)for(let e of this.end.tags())t.add(e);return t}toString(){let t=Array.from(this.tags()).sort();return`[ParsingResult {index: ${this.index}, text: '${this.text}', tags: ${JSON.stringify(t)} ...}]`}}});function dn(n,t,e="\\s{0,5},?\\s{0,5}"){let r=t.replace(/\((?!\?)/g,"(?:");return`${n}${r}(?:${e}${r}){0,10}`}function Zne(n){let t;return n instanceof Array?t=[...n]:n instanceof Map?t=Array.from(n.keys()):t=Object.keys(n),t}function X(n){return`(?:${Zne(n).sort((e,r)=>r.length-e.length).join("|").replace(/\./g,"\\.")})`}var $e=b(()=>{});function wn(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}function lt(n,t,e){let r=(0,cU.default)(n),a=r;a=a.month(e-1),a=a.date(t),a=a.year(r.year());let i=a.add(1,"y"),s=a.add(-1,"y");return Math.abs(i.diff(r)){cU=Ie(nt(),1)});function Jne(n){let t=n.toLowerCase();return KS[t]!==void 0?KS[t]:t==="a"||t==="an"||t=="the"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}function Sd(n){let t=n.toLowerCase();return QS[t]!==void 0?QS[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}function mo(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BCE?/i.test(n))return n=n.replace(/BCE?/i,""),-parseInt(n);if(/(AD|CE)/i.test(n))return n=n.replace(/(AD|CE)/i,""),parseInt(n);let t=parseInt(n);return wn(t)}function ka(n){let t={},e=n,r=dU.exec(e);for(;r;)eae(t,r),e=e.substring(r[0].length).trim(),r=dU.exec(e);return Object.keys(t).length==0?null:t}function eae(n,t){if(t[0].match(/^[a-zA-Z]+$/))return;let e=Jne(t[1]),r=Vp[t[2].toLowerCase()];n[r]=e}var av,ZS,Ta,KS,QS,uU,Vp,pU,wd,po,mU,dU,Xne,hU,hs,ho,fr=b(()=>{$e();Yt();av={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},ZS={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},Ta={...ZS,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},KS={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12},QS={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},uU={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"},Vp={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",...uU},pU=`(?:${X(KS)}|[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)?)`;wd=`(?:${X(QS)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;po="(?:[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])";mU=`(${pU})\\s{0,3}(${X(Vp)})`,dU=new RegExp(mU,"i"),Xne=`(${pU})\\s{0,3}(${X(uU)})`,hU="\\s{0,5},?(?:\\s*and)?\\s{0,5}",hs=dn("(?:(?:about|around)\\s{0,3})?",mU,hU),ho=dn("(?:(?:about|around)\\s{0,3})?",Xne,hU)});var j,se=b(()=>{j=class{constructor(){C(this,"cachedInnerPattern",null);C(this,"cachedPattern",null)}innerPatternHasChange(t,e){return this.innerPattern(t)!==e}patternLeftBoundary(){return"(\\W|^)"}pattern(t){return this.cachedInnerPattern&&!this.innerPatternHasChange(t,this.cachedInnerPattern)?this.cachedPattern:(this.cachedInnerPattern=this.innerPattern(t),this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${this.cachedInnerPattern.source}`,this.cachedInnerPattern.flags),this.cachedPattern)}extract(t,e){var a;let r=(a=e[1])!=null?a:"";e.index=e.index+r.length,e[0]=e[0].substring(r.length);for(let i=2;i{fr();Ne();se();tae=new RegExp(`(?:(?:within|in|for)\\s*)?(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${hs})(?=\\W|$)`,"i"),rae=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${hs})(?=\\W|$)`,"i"),nae=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ho})(?=\\W|$)`,"i"),$p=class extends j{constructor(e){super();C(this,"strictMode");this.strictMode=e}innerPattern(e){return this.strictMode?nae:e.option.forwardDate?tae:rae}innerExtract(e,r){if(r[0].match(/^for\s*the\s*\w+/))return null;let a=ka(r[1]);return a?(e.debug(()=>{console.log(a),console.log(G.createRelativeFromReference(e.reference,a))}),G.createRelativeFromReference(e.reference,a)):null}}});var aae,gU,yU,iae,vU,Yp,bU=b(()=>{Yt();fr();fr();fr();$e();se();aae=new RegExp(`(?:on\\s{0,3})?(${wd})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${wd}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${X(Ta)})(?:(?:-|/|,?\\s{0,3})(${po}(?!\\w)))?(?=\\W|$)`,"i"),gU=1,yU=2,iae=3,vU=4,Yp=class extends j{innerPattern(){return aae}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=Ta[e[iae].toLowerCase()],i=Sd(e[gU]);if(i>31)return e.index=e.index+e[gU].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[vU]){let s=mo(e[vU]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[yU]){let s=Sd(e[yU]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var sae,oae,TU,JS,XS,Gp,kU=b(()=>{Yt();fr();fr();fr();$e();se();sae=new RegExp(`(${X(Ta)})(?:-|/|\\s*,?\\s*)(${wd})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${wd})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${po}))?(?=\\W|$)(?!\\:\\d)`,"i"),oae=1,TU=2,JS=3,XS=4,Gp=class extends j{constructor(e){super();C(this,"shouldSkipYearLikeDate");this.shouldSkipYearLikeDate=e}innerPattern(){return sae}innerExtract(e,r){let a=Ta[r[oae].toLowerCase()],i=Sd(r[TU]);if(i>31||this.shouldSkipYearLikeDate&&!r[JS]&&!r[XS]&&r[TU].match(/^2[0-5]$/))return null;let s=e.createParsingComponents({day:i,month:a}).addTag("parser/ENMonthNameMiddleEndianParser");if(r[XS]){let c=mo(r[XS]);s.assign("year",c)}else{let c=lt(e.refDate,i,a);s.imply("year",c)}if(!r[JS])return s;let o=Sd(r[JS]),l=e.createParsingResult(r.index,r[0]);return l.start=s,l.end=s.clone(),l.end.assign("day",o),l}}});var lae,cae,dae,wU,Kp,SU=b(()=>{fr();Yt();$e();fr();se();lae=new RegExp(`((?:in)\\s*)?(${X(Ta)})\\s*(?:(?:,|-|of)?\\s*(${po})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),cae=1,dae=2,wU=3,Kp=class extends j{innerPattern(){return lae}innerExtract(t,e){let r=e[dae].toLowerCase();if(e[0].length<=3&&!ZS[r])return null;let a=t.createParsingResult(e.index+(e[cae]||"").length,e.index+e[0].length);a.start.imply("day",1),a.start.addTag("parser/ENMonthNameParser");let i=Ta[r];if(a.start.assign("month",i),e[wU]){let s=mo(e[wU]);a.start.assign("year",s)}else{let s=lt(t.refDate,1,i);a.start.imply("year",s)}return a}}});var uae,pae,mae,DU,hae,Qp,EU=b(()=>{fr();$e();se();uae=new RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${X(Ta)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),pae=1,mae=2,DU=3,hae=4,Qp=class extends j{constructor(e){super();C(this,"strictMonthDateOrder");this.strictMonthDateOrder=e}innerPattern(){return uae}innerExtract(e,r){let a=parseInt(r[pae]),i=parseInt(r[hae]),s=r[DU]?parseInt(r[DU]):Ta[r[mae].toLowerCase()];if(s<1||s>12){if(this.strictMonthDateOrder)return null;i>=1&&i<=12&&([s,i]=[i,s])}return i<1||i>31?null:{day:i,month:s,year:a}}}});var fae,gae,yae,Zp,xU=b(()=>{se();fae=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),gae=1,yae=2,Zp=class extends j{innerPattern(){return fae}innerExtract(t,e){let r=parseInt(e[yae]),a=parseInt(e[gae]);return t.createParsingComponents().imply("day",1).assign("month",a).assign("year",r)}}});function vae(n,t,e,r){return new RegExp(`${n}${t}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,r)}function bae(n,t){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}var CU,Dd,iv,sv,Jp,Er,fs=b(()=>{Ze();CU=2,Dd=3,iv=4,sv=5,Jp=6,Er=class{constructor(t=!1){C(this,"strictMode");C(this,"cachedPrimaryPrefix",null);C(this,"cachedPrimarySuffix",null);C(this,"cachedPrimaryTimePattern",null);C(this,"cachedFollowingPhase",null);C(this,"cachedFollowingSuffix",null);C(this,"cachedFollowingTimePatten",null);this.strictMode=t}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?!/)(?=\\W|$)"}followingSuffix(){return"(?!/)(?=\\W|$)"}pattern(t){return this.getPrimaryTimePatternThroughCache()}extract(t,e){let r=this.extractPrimaryTimeComponents(t,e);if(!r)return e[0].match(/^\d{4}/)?(e.index+=4,null):(e.index+=e[0].length,null);let a=e.index+e[1].length,i=e[0].substring(e[1].length),s=t.createParsingResult(a,i,r);e.index+=e[0].length;let o=t.text.substring(e.index),c=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&c&&(c[0].match(/^\s*([+-])\s*\d{2,4}$/)||c[0].match(/^\s*([+-])\s*\d{2}\W\d{2}/))?null:!c||c[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(s):(s.end=this.extractFollowingTimeComponents(t,c,s),s.end&&(s.text+=c[0]),this.checkAndReturnWithFollowingPattern(s))}extractPrimaryTimeComponents(t,e,r=!1){let a=t.createParsingComponents(),i=0,s=null,o=parseInt(e[CU]);if(o>100){if(this.strictMode||e[Dd]!=null)return null;i=o%100,o=Math.floor(o/100)}if(o>24)return null;if(e[Dd]!=null){if(e[Dd].length==1&&!e[Jp])return null;i=parseInt(e[Dd])}if(i>=60)return null;if(o>12&&(s=O.PM),e[Jp]!=null){if(o>12)return null;let l=e[Jp][0].toLowerCase();l=="a"&&(s=O.AM,o==12&&(o=0)),l=="p"&&(s=O.PM,o!=12&&(o+=12))}if(a.assign("hour",o),a.assign("minute",i),s!==null?a.assign("meridiem",s):o<12?a.imply("meridiem",O.AM):a.imply("meridiem",O.PM),e[sv]!=null){let l=parseInt(e[sv].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(e[iv]!=null){let l=parseInt(e[iv]);if(l>=60)return null;a.assign("second",l)}return a}extractFollowingTimeComponents(t,e,r){let a=t.createParsingComponents();if(e[sv]!=null){let l=parseInt(e[sv].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(e[iv]!=null){let l=parseInt(e[iv]);if(l>=60)return null;a.assign("second",l)}let i=parseInt(e[CU]),s=0,o=-1;if(e[Dd]!=null?s=parseInt(e[Dd]):i>100&&(s=i%100,i=Math.floor(i/100)),s>=60||i>24)return null;if(i>=12&&(o=O.PM),e[Jp]!=null){if(i>12)return null;let l=e[Jp][0].toLowerCase();l=="a"&&(o=O.AM,i==12&&(i=0,a.isCertain("day")||a.imply("day",a.get("day")+1))),l=="p"&&(o=O.PM,i!=12&&(i+=12)),r.start.isCertain("meridiem")||(o==O.AM?(r.start.imply("meridiem",O.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",O.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return a.assign("hour",i),a.assign("minute",s),o>=0?a.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>i?a.imply("meridiem",O.AM):i<=12&&(a.assign("hour",i+12),a.assign("meridiem",O.PM)):i>12?a.imply("meridiem",O.PM):i<=12&&a.imply("meridiem",O.AM),a.date().getTime()24)return null}return t}checkAndReturnWithFollowingPattern(t){if(t.text.match(/^\d+-\d+$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(e){if(this.strictMode)return null;let r=e[1],a=e[2];if(a.includes(".")&&!a.match(/\d(\.\d{2})+$/))return null;let i=parseInt(a),s=parseInt(r);if(i>24||s>24)return null}return t}getPrimaryTimePatternThroughCache(){let t=this.primaryPrefix(),e=this.primarySuffix();return this.cachedPrimaryPrefix===t&&this.cachedPrimarySuffix===e?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=vae(this.primaryPatternLeftBoundary(),t,e,this.patternFlags()),this.cachedPrimaryPrefix=t,this.cachedPrimarySuffix=e,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let t=this.followingPhase(),e=this.followingSuffix();return this.cachedFollowingPhase===t&&this.cachedFollowingSuffix===e?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=bae(t,e),this.cachedFollowingPhase=t,this.cachedFollowingSuffix=e,this.cachedFollowingTimePatten)}}});var Xp,PU=b(()=>{Ze();fs();Xp=class extends Er{constructor(t){super(t)}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(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(!r)return r;if(e[0].endsWith("night")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",O.PM)):a<6&&r.assign("meridiem",O.AM)}if(e[0].endsWith("afternoon")){r.assign("meridiem",O.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}return e[0].endsWith("morning")&&(r.assign("meridiem",O.AM),r.get("hour")<12&&r.assign("hour",r.get("hour"))),r.addTag("parser/ENTimeExpressionParser")}extractFollowingTimeComponents(t,e,r){let a=super.extractFollowingTimeComponents(t,e,r);return a&&a.addTag("parser/ENTimeExpressionParser"),a}}});var Tae,kae,em,MU=b(()=>{fr();Ne();se();qp();Tae=new RegExp(`(${hs})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),kae=new RegExp(`(${ho})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),em=class extends j{constructor(e){super();C(this,"strictMode");this.strictMode=e}innerPattern(){return this.strictMode?kae:Tae}innerExtract(e,r){let a=ka(r[1]);return a?G.createRelativeFromReference(e.reference,kd(a)):null}}});var wae,Sae,Dae,tm,AU=b(()=>{fr();Ne();se();wae=new RegExp(`(${hs})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Sae=new RegExp(`(${ho})\\s{0,5}(later|after|from now)(?=\\W|$)`,"i"),Dae=1,tm=class extends j{constructor(e){super();C(this,"strictMode");this.strictMode=e}innerPattern(){return this.strictMode?Sae:wae}innerExtract(e,r){let a=ka(r[Dae]);return a?G.createRelativeFromReference(e.reference,a):null}}});var Ed,Sn,gs=b(()=>{Ed=class{refine(t,e){return e.filter(r=>this.isValid(t,r))}},Sn=class{refine(t,e){if(e.length<2)return e;let r=[],a=e[0],i=null;for(let s=1;s{console.log(`${this.constructor.name} merged ${l} and ${c} into ${d}`)}),a=d}}return a!=null&&r.push(a),r}}});var _t,wa=b(()=>{gs();_t=class extends Sn{shouldMergeResults(t,e,r){return!e.end&&!r.end&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){if(!e.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(i=>{e.start.isCertain(i)||e.start.imply(i,r.start.get(i))}),e.start.getCertainComponents().forEach(i=>{r.start.isCertain(i)||r.start.imply(i,e.start.get(i))})),e.start.date().getTime()>r.start.date().getTime()){let i=e.start.dayjs(),s=r.start.dayjs();r.start.isOnlyWeekdayComponent()&&s.add(7,"days").isAfter(i)?(s=s.add(7,"days"),r.start.imply("day",s.date()),r.start.imply("month",s.month()+1),r.start.imply("year",s.year())):e.start.isOnlyWeekdayComponent()&&i.add(-7,"days").isBefore(s)?(i=i.add(-7,"days"),e.start.imply("day",i.date()),e.start.imply("month",i.month()+1),e.start.imply("year",i.year())):r.start.isDateWithUnknownYear()&&s.add(1,"years").isAfter(i)?(s=s.add(1,"years"),r.start.imply("year",s.year())):e.start.isDateWithUnknownYear()&&i.add(-1,"years").isBefore(s)?(i=i.add(-1,"years"),e.start.imply("year",i.year())):[r,e]=[e,r]}let a=e.clone();return a.start=e.start,a.end=r.start,a.index=Math.min(e.index,r.index),e.index{wa();rm=class extends _t{patternBetween(){return/^\s*(to|-|–|until|through|till)\s*$/i}}});function Za(n,t){t=t.add(1,"day"),xt(n,t),bi(n,t)}function _U(n,t){t=t.add(1,"day"),eD(n,t),bi(n,t)}function xt(n,t){n.assign("day",t.date()),n.assign("month",t.month()+1),n.assign("year",t.year())}function NU(n,t){n.assign("hour",t.hour()),n.assign("minute",t.minute()),n.assign("second",t.second()),n.assign("millisecond",t.millisecond()),n.get("hour")<12?n.assign("meridiem",O.AM):n.assign("meridiem",O.PM)}function eD(n,t){n.imply("day",t.date()),n.imply("month",t.month()+1),n.imply("year",t.year())}function bi(n,t){n.imply("hour",t.hour()),n.imply("minute",t.minute()),n.imply("second",t.second()),n.imply("millisecond",t.millisecond())}var Kn=b(()=>{Ze()});function tD(n,t){let e=n.clone(),r=n.start,a=t.start;if(e.start=RU(r,a),n.end!=null||t.end!=null){let i=n.end==null?n.start:n.end,s=t.end==null?t.start:t.end,o=RU(i,s);if(n.end==null&&o.date().getTime(){Ze();Kn()});var Nt,Sa=b(()=>{gs();FU();Nt=class extends Sn{shouldMergeResults(t,e,r){return(e.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&e.start.isOnlyTime())&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){let a=e.start.isOnlyDate()?tD(e,r):tD(r,e);return a.index=e.index,a.text=e.text+t+r.text,a}}});var xd,OU=b(()=>{Sa();xd=class extends Nt{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-|\\.|\u2219|:)?\\s*$")}}});var Eae,nm,LU=b(()=>{YS();Eae=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),nm=class{constructor(t){C(this,"timezoneOverrides");this.timezoneOverrides=t}refine(t,e){var a;let r=(a=t.option.timezones)!=null?a:{};return e.forEach(i=>{var m,h;let s=t.text.substring(i.index+i.text.length),o=Eae.exec(s);if(!o)return;let l=o[1].toUpperCase(),c=(h=(m=i.start.date())!=null?m:i.refDate)!=null?h:new Date,d={...this.timezoneOverrides,...r},u=nv(l,c,d);if(u==null)return;t.debug(()=>{console.log(`Extracting timezone: '${l}' into: ${u} for: ${i.start}`)});let p=i.start.get("timezoneOffset");p!==null&&u!=p&&(i.start.isCertain("timezoneOffset")||l!=o[1])||i.start.isOnlyDate()&&l!=o[1]||(i.text+=o[0],i.start.isCertain("timezoneOffset")||i.start.assign("timezoneOffset",u),i.end!=null&&!i.end.isCertain("timezoneOffset")&&i.end.assign("timezoneOffset",u))}),e}}});var xae,Cae,Pae,Mae,Ja,am=b(()=>{xae=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Cae=1,Pae=2,Mae=3,Ja=class{refine(t,e){return e.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let a=t.text.substring(r.index+r.text.length),i=xae.exec(a);if(!i)return;t.debug(()=>{console.log(`Extracting timezone: '${i[0]}' into : ${r}`)});let s=parseInt(i[Pae]),o=parseInt(i[Mae]||"0"),l=s*60+o;l>840||(i[Cae]==="-"&&(l=-l),r.end!=null&&r.end.assign("timezoneOffset",l),r.start.assign("timezoneOffset",l),r.text+=i[0])}),e}}});var fo,rD=b(()=>{fo=class{refine(t,e){if(e.length<2)return e;let r=[],a=e[0];for(let i=1;i=a.index+a.text.length){r.push(a),a=s;continue}let o=null,l=null;s.text.length>a.text.length?(o=s,l=a):(o=a,l=s),t.debug(()=>{console.log(`${this.constructor.name} remove ${l} by ${o}`)}),a=o}return a!=null&&r.push(a),r}}});var BU,im,jU=b(()=>{BU=Ie(nt(),1);VS();im=class{refine(t,e){return t.option.forwardDate&&e.forEach(r=>{let a=(0,BU.default)(t.reference.getDateWithAdjustedTimezone());if(r.start.isOnlyTime()&&t.reference.instant>r.start.date()){let i=t.reference.getDateWithAdjustedTimezone(),s=new Date(i);s.setDate(s.getDate()+1),rv(r.start,s),t.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} time from the ref date (${i}) to the following day (${s})`)}),r.end&&r.end.isOnlyTime()&&(rv(r.end,s),r.start.date()>r.end.date()&&(s.setDate(s.getDate()+1),rv(r.end,s)))}if(r.start.isOnlyWeekdayComponent()&&a.isAfter(r.start.dayjs())&&(a.day()>=r.start.get("weekday")?a=a.day(r.start.get("weekday")+7):a=a.day(r.start.get("weekday")),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year()),t.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} weekday (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(a.day()>r.end.get("weekday")?a=a.day(r.end.get("weekday")+7):a=a.day(r.end.get("weekday")),r.end.imply("day",a.date()),r.end.imply("month",a.month()+1),r.end.imply("year",a.year()),t.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} weekday (${r.end})`)}))),r.start.isDateWithUnknownYear()&&a.isAfter(r.start.dayjs()))for(let i=0;i<3&&a.isAfter(r.start.dayjs());i++)r.start.imply("year",r.start.get("year")+1),t.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} year (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),t.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} month (${r.start})`)}))}),e}}});var sm,HU=b(()=>{gs();sm=class extends Ed{constructor(e){super();C(this,"strictMode");this.strictMode=e}isValid(e,r){return r.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${r.text}'`)}),!1):r.start.isValidDate()?r.end&&!r.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${r} (${r.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,r):!0:(e.debug(()=>{console.log(`Removing invalid result: ${r} (${r.start})`)}),!1)}isStrictModeValid(e,r){return r.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${r} (${r.end})`)}),!1):!0}}});var Aae,Iae,_ae,Nae,zU,Rae,UU,WU,Fae,qU,VU,ys,ov=b(()=>{se();Aae=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"),Iae=1,_ae=2,Nae=3,zU=4,Rae=5,UU=6,WU=7,Fae=8,qU=9,VU=10,ys=class extends j{innerPattern(){return Aae}innerExtract(t,e){let r=t.createParsingComponents({year:parseInt(e[Iae]),month:parseInt(e[_ae]),day:parseInt(e[Nae])});if(e[zU]!=null&&(r.assign("hour",parseInt(e[zU])),r.assign("minute",parseInt(e[Rae])),e[UU]!=null&&r.assign("second",parseInt(e[UU])),e[WU]!=null&&r.assign("millisecond",parseInt(e[WU])),e[Fae]!=null)){let a=0;if(e[qU]){let i=parseInt(e[qU]),s=0;e[VU]!=null&&(s=parseInt(e[VU])),a=i*60,a<0?a-=s:a+=s}r.assign("timezoneOffset",a)}return r.addTag("parser/ISOFormatParser")}}});var Rl,nD=b(()=>{gs();Rl=class extends Sn{mergeResults(t,e,r){let a=r.clone();return a.index=e.index,a.text=e.text+t+a.text,a.start.assign("weekday",e.start.get("weekday")),a.end&&a.end.assign("weekday",e.start.get("weekday")),a}shouldMergeResults(t,e,r){return e.start.isOnlyWeekdayComponent()&&!e.start.isCertain("hour")&&r.start.isCertain("day")&&t.match(/^,?\s*$/)!=null}}});function Ot(n,t=!1){return n.parsers.unshift(new ys),n.refiners.unshift(new Rl),n.refiners.unshift(new Ja),n.refiners.unshift(new fo),n.refiners.push(new nm),n.refiners.push(new fo),n.refiners.push(new im),n.refiners.push(new sm(t)),n}var Qn=b(()=>{LU();am();rD();jU();HU();ov();nD()});function Yr(n){let t=(0,go.default)(n.getDateWithAdjustedTimezone()),e=new G(n,{});return xt(e,t),NU(e,t),e.assign("timezoneOffset",n.getTimezoneOffset()),e.addTag("casualReference/now"),e}function xr(n){let t=(0,go.default)(n.getDateWithAdjustedTimezone()),e=new G(n,{});return xt(e,t),bi(e,t),e.addTag("casualReference/today"),e}function Gr(n){return Fl(n,1).addTag("casualReference/yesterday")}function Fl(n,t){return Ti(n,-t)}function Kr(n){return Ti(n,1).addTag("casualReference/tomorrow")}function Ti(n,t){let e=(0,go.default)(n.getDateWithAdjustedTimezone()),r=new G(n,{});return e=e.add(t,"day"),xt(r,e),bi(r,e),r}function $U(n,t=22){let e=(0,go.default)(n.getDateWithAdjustedTimezone()),r=new G(n,{});return xt(r,e),r.imply("hour",t),r.imply("meridiem",O.PM),r.addTag("casualReference/tonight"),r}function lv(n,t=0){let e=(0,go.default)(n.getDateWithAdjustedTimezone()),r=new G(n,{});return e.hour()<6&&(e=e.add(-1,"day")),xt(r,e),r.imply("hour",t),r}function Cd(n,t=20){let e=new G(n,{});return e.imply("meridiem",O.PM),e.imply("hour",t),e.addTag("casualReference/evening"),e}function cv(n,t=20){let e=(0,go.default)(n.getDateWithAdjustedTimezone()),r=new G(n,{});return e=e.add(-1,"day"),xt(r,e),r.imply("hour",t),r.imply("meridiem",O.PM),r.addTag("casualReference/yesterday"),r.addTag("casualReference/evening"),r}function Ol(n){let t=new G(n,{}),e=(0,go.default)(n.getDateWithAdjustedTimezone());return e.hour()>2&&_U(t,e),t.assign("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/midnight"),t}function Pd(n,t=6){let e=new G(n,{});return e.imply("meridiem",O.AM),e.imply("hour",t),e.imply("minute",0),e.imply("second",0),e.imply("millisecond",0),e.addTag("casualReference/morning"),e}function YU(n,t=15){let e=new G(n,{});return e.imply("meridiem",O.PM),e.imply("hour",t),e.imply("minute",0),e.imply("second",0),e.imply("millisecond",0),e.addTag("casualReference/afternoon"),e}function Md(n){let t=new G(n,{});return t.imply("meridiem",O.AM),t.assign("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/noon"),t}var go,Zn=b(()=>{Ne();go=Ie(nt(),1);Kn();Ze()});var GU,Oae,om,KU=b(()=>{GU=Ie(nt(),1);se();Kn();Zn();Oae=/(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,om=class extends j{innerPattern(t){return Oae}innerExtract(t,e){let r=(0,GU.default)(t.refDate),a=e[0].toLowerCase(),i=t.createParsingComponents();switch(a){case"now":i=Yr(t.reference);break;case"today":i=xr(t.reference);break;case"yesterday":i=Gr(t.reference);break;case"tomorrow":case"tmr":case"tmrw":i=Kr(t.reference);break;case"tonight":i=$U(t.reference);break;case"overmorrow":i=Ti(t.reference,2);break;default:a.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),xt(i,r),i.imply("hour",0));break}return i.addTag("parser/ENCasualDateParser"),i}}});var Lae,lm,QU=b(()=>{se();Zn();Lae=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i,lm=class extends j{innerPattern(){return Lae}innerExtract(t,e){let r=null;switch(e[1].toLowerCase()){case"afternoon":r=YU(t.reference);break;case"evening":case"night":r=Cd(t.reference);break;case"midnight":r=Ol(t.reference);break;case"morning":r=Pd(t.reference);break;case"noon":case"midday":r=Md(t.reference);break}return r&&r.addTag("parser/ENCasualTimeParser"),r}}});function ir(n){let t={};for(let e in n)t[e]=-n[e];return t}function dv(n,t){let e=n.clone(),r=n.dayjs();for(let a in t)r=r.add(t[a],a);return("day"in t||"d"in t||"week"in t||"month"in t||"year"in t)&&(e.imply("day",r.date()),e.imply("month",r.month()+1),e.imply("year",r.year())),("second"in t||"minute"in t||"hour"in t)&&(e.imply("second",r.second()),e.imply("minute",r.minute()),e.imply("hour",r.hour())),e}var Jn=b(()=>{});function sr(n,t,e){let r=n.getDateWithAdjustedTimezone(),a=Bae(r,t,e),i=new G(n);return i=dv(i,{day:a}),i.assign("weekday",t),i}function Bae(n,t,e){let r=n.getDay();switch(e){case"this":return uv(n,t);case"last":return ZU(n,t);case"next":return r==we.SUNDAY?t==we.SUNDAY?7:t:r==we.SATURDAY?t==we.SATURDAY?7:t==we.SUNDAY?8:1+t:t=0&&(r-=7),r}var Xa=b(()=>{Ze();Ne();Jn()});var Hae,zae,Uae,Wae,cm,JU=b(()=>{fr();$e();se();Xa();Ze();Hae=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${X(av)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),zae=1,Uae=2,Wae=3,cm=class extends j{innerPattern(){return Hae}innerExtract(t,e){let r=e[zae],a=e[Wae],i=r||a;i=i||"",i=i.toLowerCase();let s=null;i=="last"||i=="past"?s="last":i=="next"?s="next":i=="this"&&(s="this");let o=e[Uae].toLowerCase(),l;if(av[o]!==void 0)l=av[o];else if(o=="weekend")l=s=="last"?we.SUNDAY:we.SATURDAY;else if(o=="weekday"){let c=t.reference.getDateWithAdjustedTimezone().getDay();c==we.SUNDAY||c==we.SATURDAY?l=s=="last"?we.FRIDAY:we.MONDAY:(l=c-1,l=s=="last"?l-1:l+1,l=l%5+1)}else return null;return sr(t.reference,l,s)}}});var XU,qae,Vae,$ae,dm,eW=b(()=>{fr();Ne();XU=Ie(nt(),1);se();$e();qae=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${X(Vp)})(?=\\s*)(?=\\W|$)`,"i"),Vae=1,$ae=2,dm=class extends j{innerPattern(){return qae}innerExtract(t,e){let r=e[Vae].toLowerCase(),a=e[$ae].toLowerCase(),i=Vp[a];if(r=="next"||r.startsWith("after")){let l={};return l[i]=1,G.createRelativeFromReference(t.reference,l)}if(r=="last"||r=="past"){let l={};return l[i]=-1,G.createRelativeFromReference(t.reference,l)}let s=t.createParsingComponents(),o=(0,XU.default)(t.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):a.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):a.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var Yae,Gae,Kae,tW,rW,aD,gr,vs=b(()=>{Yt();Yae=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"),Gae=1,Kae=5,tW=2,rW=3,aD=4,gr=class{constructor(t){C(this,"groupNumberMonth");C(this,"groupNumberDay");this.groupNumberMonth=t?rW:tW,this.groupNumberDay=t?tW:rW}pattern(){return Yae}extract(t,e){let r=e.index+e[Gae].length,a=e.index+e[0].length-e[Kae].length;if(r>0&&t.text.substring(0,r).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(s.start.assign("day",l),s.start.assign("month",o),e[aD]){let c=parseInt(e[aD]),d=wn(c);s.start.assign("year",d)}else{let c=lt(t.refDate,l,o);s.start.imply("year",c)}return s.addTag("parser/SlashDateFormatParser")}}});var Qae,Zae,um,nW=b(()=>{fr();Ne();se();qp();Qae=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${hs})(?=\\W|$)`,"i"),Zae=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ho})(?=\\W|$)`,"i"),um=class extends j{constructor(e=!0){super();C(this,"allowAbbreviations");this.allowAbbreviations=e}innerPattern(){return this.allowAbbreviations?Qae:Zae}innerExtract(e,r){let a=r[1].toLowerCase(),i=ka(r[2]);if(!i)return null;switch(a){case"last":case"past":case"-":i=kd(i);break}return G.createRelativeFromReference(e.reference,i)}}});function Jae(n){return n.text.match(/^[+-]/i)!=null}function aW(n){return n.text.match(/^-/i)!=null}var pm,iW=b(()=>{gs();Ne();fr();Jn();pm=class extends Sn{shouldMergeResults(t,e,r){return t.match(/^\s*$/i)?Jae(r)||aW(r):!1}mergeResults(t,e,r,a){let i=ka(r.text);aW(r)&&(i=ir(i));let s=G.createRelativeFromReference(at.fromDate(e.start.date()),i);return new et(e.reference,e.index,`${e.text}${t}${r.text}`,s)}}});function sW(n){return n.text.match(/\s+(before|from)$/i)!=null}function Xae(n){return n.text.match(/\s+(after|since)$/i)!=null}var mm,oW=b(()=>{gs();Ne();fr();qp();mm=class extends Sn{patternBetween(){return/^\s*$/i}shouldMergeResults(t,e,r){return!t.match(this.patternBetween())||!sW(e)&&!Xae(e)?!1:!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(t,e,r){let a=ka(e.text);sW(e)&&(a=kd(a));let i=G.createRelativeFromReference(at.fromDate(r.start.date()),a);return new et(r.reference,e.index,`${e.text}${t}${r.text}`,i)}}});var eie,tie,hm,lW=b(()=>{fr();eie=new RegExp(`^\\s*(${po})`,"i"),tie=1,hm=class{refine(t,e){return e.forEach(function(r){if(!r.start.isDateWithUnknownYear())return;let a=t.text.substring(r.index+r.text.length),i=eie.exec(a);if(!i||i[0].trim().length<=3)return;t.debug(()=>{console.log(`Extracting year: '${i[0]}' into : ${r}`)});let s=mo(i[tie]);r.end!=null&&r.end.assign("year",s),r.start.assign("year",s),r.text+=i[0]}),e}}});var fm,cW=b(()=>{gs();fm=class extends Ed{constructor(){super()}isValid(t,e){let r=e.text.trim();return r===t.text.trim()?!0:r.toLowerCase()==="may"&&!t.text.substring(0,e.index).trim().match(/\b(in)$/i)?(t.debug(()=>{console.log(`Removing unlikely result: ${e}`)}),!1):r.toLowerCase().endsWith("the second")?(t.text.substring(e.index+e.text.length).trim().length>0&&t.debug(()=>{console.log(`Removing unlikely result: ${e}`)}),!1):!0}}});var Ll,iD=b(()=>{fU();bU();kU();SU();EU();xU();PU();MU();AU();IU();OU();Qn();KU();QU();JU();eW();vs();nW();iW();oW();rD();lW();cW();Ll=class{createCasualConfiguration(t=!1){let e=this.createConfiguration(!1,t);return e.parsers.push(new om),e.parsers.push(new lm),e.parsers.push(new Kp),e.parsers.push(new dm),e.parsers.push(new um),e.refiners.push(new fm),e}createConfiguration(t=!0,e=!1){let r=Ot({parsers:[new gr(e),new $p(t),new Yp,new Gp(e),new cm,new Zp,new Xp(t),new em(t),new tm(t)],refiners:[new xd]},t);return r.parsers.unshift(new Qp(t)),r.refiners.unshift(new mm),r.refiners.unshift(new pm),r.refiners.unshift(new fo),r.refiners.push(new xd),r.refiners.push(new hm),r.refiners.push(new rm),r}}});var ve,gm,Dn=b(()=>{Ne();iD();ve=class n{constructor(t){C(this,"parsers");C(this,"refiners");C(this,"defaultConfig",new Ll);t=t||this.defaultConfig.createCasualConfiguration(),this.parsers=[...t.parsers],this.refiners=[...t.refiners]}clone(){return new n({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(t,e,r){let a=this.parse(t,e,r);return a.length>0?a[0].start.date():null}parse(t,e,r){let a=new gm(t,e,r),i=[];return this.parsers.forEach(s=>{let o=n.executeParser(a,s);i=i.concat(o)}),i.sort((s,o)=>s.index-o.index),this.refiners.forEach(function(s){i=s.refine(a,i)}),i}static executeParser(t,e){let r=[],a=e.pattern(t),i=t.text,s=t.text,o=a.exec(s);for(;o;){let l=o.index+i.length-s.length;o.index=l;let c=e.extract(t,o);if(!c){s=i.substring(o.index+1),o=a.exec(s);continue}let d=null;c instanceof et?d=c:c instanceof G?(d=t.createParsingResult(o.index,o[0]),d.start=c):d=t.createParsingResult(o.index,o[0],c);let u=d.index,p=d.text;t.debug(()=>console.log(`${e.constructor.name} extracted (at index=${u}) '${p}'`)),r.push(d),s=i.substring(u+p.length),o=a.exec(s)}return r}},gm=class{constructor(t,e,r){C(this,"text");C(this,"option");C(this,"reference");C(this,"refDate");this.text=t,this.option=r!=null?r:{},this.reference=at.fromInput(e,this.option.timezones),this.refDate=this.reference.instant}createParsingComponents(t){return t instanceof G?t:new G(this.reference,t)}createParsingResult(t,e,r,a){let i=typeof e=="string"?e:this.text.substring(t,e),s=r?this.createParsingComponents(r):null,o=a?this.createParsingComponents(a):null;return new et(this.reference,t,i,s,o)}debug(t){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(t):this.option.debug.debug(t))}}});var oD={};Be(oD,{Chrono:()=>ve,GB:()=>rie,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>ym,configuration:()=>pv,parse:()=>nie,parseDate:()=>aie,strict:()=>sD});function nie(n,t,e){return ym.parse(n,t,e)}function aie(n,t,e){return ym.parseDate(n,t,e)}var pv,ym,sD,rie,dW=b(()=>{Dn();Ne();Ze();iD();pv=new Ll,ym=new ve(pv.createCasualConfiguration(!1)),sD=new ve(pv.createConfiguration(!0,!1)),rie=new ve(pv.createCasualConfiguration(!0))});var vm,uW=b(()=>{fs();vm=class extends Er{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}}});function pD(n){let t=n.toLowerCase();return lD[t]!==void 0?lD[t]:t==="ein"||t==="einer"||t==="einem"||t==="einen"||t==="eine"?1:t.match(/wenigen/)?2:t.match(/halb/)||t.match(/halben/)?.5:t.match(/einigen/)?3:t.match(/mehreren/)?7:parseFloat(t)}function hW(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));if(/z/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let t=parseInt(n);return wn(t)}function yW(n){let t={},e=n,r=pW.exec(e);for(;r;)iie(t,r),e=e.substring(r[0].length),r=pW.exec(e);return t}function iie(n,t){let e=pD(t[1]),r=bm[t[2].toLowerCase()];n[r]=e}var cD,dD,lD,bm,uD,mW,fW,pW,gW,Ad=b(()=>{$e();Yt();cD={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},dD={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},lD={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},bm={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"},uD=`(?:${X(lD)}|[0-9]+|[0-9]+\\.[0-9]+|halb?|halbe?|einigen?|wenigen?|mehreren?)`;mW="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";fW=`(${uD})\\s{0,5}(${X(bm)})\\s{0,5}`,pW=new RegExp(fW,"i"),gW=dn("",fW)});var sie,oie,lie,cie,Tm,vW=b(()=>{Ad();$e();se();Xa();sie=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${X(cD)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),oie=1,lie=3,cie=2,Tm=class extends j{innerPattern(){return sie}innerExtract(t,e){let r=e[cie].toLowerCase(),a=cD[r],i=e[oie],s=e[lie],o=i||s;o=o||"",o=o.toLowerCase();let l=null;return o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this"),sr(t.reference,a,l)}}});var die,uie,pie,bW,TW,kW,km,wW=b(()=>{Ze();die=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"),uie=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"),pie=2,bW=3,TW=4,kW=5,km=class n{pattern(t){return die}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let a=t.text.substring(e.index+e[0].length),i=uie.exec(a);return i&&(r.end=n.extractTimeComponent(r.start.clone(),i),r.end&&(r.text+=i[0])),r}static extractTimeComponent(t,e){let r=0,a=0,i=null;if(r=parseInt(e[pie]),e[bW]!=null&&(a=parseInt(e[bW])),a>=60||r>24)return null;if(r>=12&&(i=O.PM),e[kW]!=null){if(r>12)return null;let s=e[kW].toLowerCase();s.match(/morgen|vormittag/)&&(i=O.AM,r==12&&(r=0)),s.match(/nachmittag|abend/)&&(i=O.PM,r!=12&&(r+=12)),s.match(/nacht/)&&(r==12?(i=O.AM,r=0):r<6?i=O.AM:(i=O.PM,r+=12))}if(t.assign("hour",r),t.assign("minute",a),i!==null?t.assign("meridiem",i):r<12?t.imply("meridiem",O.AM):t.imply("meridiem",O.PM),e[TW]!=null){let s=parseInt(e[TW]);if(s>=60)return null;t.assign("second",s)}return t}}});var wm,SW=b(()=>{wa();wm=class extends _t{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}}});var Sm,DW=b(()=>{Sa();Sm=class extends Nt{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}}});var EW,Bl,mD=b(()=>{EW=Ie(nt(),1);Ze();se();Kn();Jn();Bl=class n extends j{innerPattern(t){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(t,e){let r=(0,EW.default)(t.refDate),a=e[2].toLowerCase(),i=t.createParsingComponents();return bi(i,r),n.extractTimeComponents(i,a)}static extractTimeComponents(t,e){switch(e){case"morgen":t.imply("hour",6),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.AM);break;case"vormittag":t.imply("hour",9),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.AM);break;case"mittag":case"mittags":t.imply("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.AM);break;case"nachmittag":t.imply("hour",15),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.PM);break;case"abend":t.imply("hour",18),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.PM);break;case"nacht":t.imply("hour",22),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.PM);break;case"mitternacht":t.get("hour")>1&&(t=dv(t,{day:1})),t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",O.AM);break}return t}}});var xW,mie,hie,fie,Dm,CW=b(()=>{xW=Ie(nt(),1);se();Kn();mD();Zn();mie=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),hie=1,fie=2,Dm=class extends j{innerPattern(t){return mie}innerExtract(t,e){let r=(0,xW.default)(t.refDate),a=(e[hie]||"").toLowerCase(),i=(e[fie]||"").toLowerCase(),s=t.createParsingComponents();switch(a){case"jetzt":s=Yr(t.reference);break;case"heute":s=xr(t.reference);break;case"morgen":Za(s,r);break;case"\xFCbermorgen":case"uebermorgen":r=r.add(1,"day"),Za(s,r);break;case"gestern":r=r.add(-1,"day"),xt(s,r),bi(s,r);break;case"vorgestern":r=r.add(-2,"day"),xt(s,r),bi(s,r);break;default:a.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),xt(s,r),s.imply("hour",0));break}return i&&(s=Bl.extractTimeComponents(s,i)),s}}});var gie,PW,MW,yie,AW,Em,IW=b(()=>{Yt();Ad();Ad();$e();se();gie=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${X(dD)})(?:(?:-|/|,?\\s*)(${mW}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),PW=1,MW=2,yie=3,AW=4,Em=class extends j{innerPattern(){return gie}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=dD[e[yie].toLowerCase()],i=parseInt(e[PW]);if(i>31)return e.index=e.index+e[PW].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[AW]){let s=hW(e[AW]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[MW]){let s=parseInt(e[MW]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var xm,_W=b(()=>{Ad();Ne();se();Jn();$e();xm=class extends j{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*)?(${uD})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${X(bm)})`,"i")}innerExtract(t,e){let r=e[2]?pD(e[2]):1,a=bm[e[4].toLowerCase()],i={};i[a]=r;let s=e[1]||e[3]||"";if(s=s.toLowerCase(),!!s)return(/vor/.test(s)||/letzte/.test(s)||/vergangen/.test(s))&&(i=ir(i)),G.createRelativeFromReference(t.reference,i)}}});var Cm,NW=b(()=>{Ad();Ne();se();Cm=class extends j{innerPattern(){return new RegExp(`(?:in|f\xFCr|w\xE4hrend)\\s*(${gW})(?=\\W|$)`,"i")}innerExtract(t,e){let r=yW(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var gD={};Be(gD,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>hD,createCasualConfiguration:()=>RW,createConfiguration:()=>fD,parse:()=>bie,parseDate:()=>Tie,strict:()=>vie});function bie(n,t,e){return hD.parse(n,t,e)}function Tie(n,t,e){return hD.parseDate(n,t,e)}function RW(n=!0){let t=fD(!1,n);return t.parsers.unshift(new Bl),t.parsers.unshift(new Dm),t.parsers.unshift(new xm),t}function fD(n=!0,t=!0){return Ot({parsers:[new ys,new gr(t),new vm,new km,new Em,new Tm,new Cm],refiners:[new wm,new Sm]},n)}var hD,vie,FW=b(()=>{Qn();Dn();Ne();Ze();vs();ov();uW();vW();wW();SW();DW();CW();mD();IW();_W();NW();hD=new ve(RW()),vie=new ve(fD(!0))});var OW,Pm,LW=b(()=>{OW=Ie(nt(),1);Ze();se();Kn();Zn();Pm=class extends j{innerPattern(t){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(t,e){let r=(0,OW.default)(t.refDate),a=e[0].toLowerCase(),i=t.createParsingComponents();switch(a){case"maintenant":return Yr(t.reference);case"aujourd'hui":return xr(t.reference);case"hier":return Gr(t.reference);case"demain":return Kr(t.reference);default:a.match(/cette\s*nuit/)?(xt(i,r),i.imply("hour",22),i.imply("meridiem",O.PM)):a.match(/la\s*veille/)&&(r=r.add(-1,"day"),xt(i,r),i.imply("hour",0))}return i}}});var Mm,BW=b(()=>{Ze();se();Mm=class extends j{innerPattern(t){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(t,e){let r=e[2].toLowerCase(),a=t.createParsingComponents();switch(r){case"apr\xE8s-midi":case"aprem":a.imply("hour",14),a.imply("minute",0),a.imply("meridiem",O.PM);break;case"soir":a.imply("hour",18),a.imply("minute",0),a.imply("meridiem",O.PM);break;case"matin":a.imply("hour",8),a.imply("minute",0),a.imply("meridiem",O.AM);break;case"a midi":a.imply("hour",12),a.imply("minute",0),a.imply("meridiem",O.AM);break;case"\xE0 minuit":a.imply("hour",0),a.imply("meridiem",O.AM);break}return a}}});var Am,jW=b(()=>{fs();Am=class extends Er{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}}});var Im,HW=b(()=>{Sa();Im=class extends Nt{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|au|vers|de|,|-)?\\s*$")}}});var _m,zW=b(()=>{wa();_m=class extends _t{patternBetween(){return/^\s*(à|a|au|-)\s*$/i}}});function kD(n){let t=n.toLowerCase();return yD[t]!==void 0?yD[t]:t==="une"||t==="un"?1:t.match(/quelques?/)?3:t.match(/demi-?/)?.5:parseFloat(t)}function SD(n){let t=n.toLowerCase();return t=t.replace(/(?:er)$/i,""),parseInt(t)}function qW(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}function hv(n){let t={},e=n,r=UW.exec(e);for(;r;)kie(t,r),e=e.substring(r[0].length),r=UW.exec(e);return t}function kie(n,t){let e=kD(t[1]),r=Nm[t[2].toLowerCase()];n[r]=e}var vD,bD,yD,Nm,TD,wD,WW,VW,UW,mv,yo=b(()=>{$e();vD={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},bD={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},yD={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},Nm={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"},TD=`(?:${X(yD)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;wD="(?:[0-9]{1,2}(?:er)?)";WW="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";VW=`(${TD})\\s{0,5}(${X(Nm)})\\s{0,5}`,UW=new RegExp(VW,"i"),mv=dn("",VW)});var wie,Sie,Die,Rm,$W=b(()=>{yo();$e();se();Xa();wie=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${X(vD)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),Sie=1,Die=2,Rm=class extends j{innerPattern(){return wie}innerExtract(t,e){let r=e[Sie].toLowerCase(),a=vD[r];if(a===void 0)return null;let i=e[Die];i=i||"",i=i.toLowerCase();let s=null;return i=="dernier"?s="last":i=="prochain"&&(s="next"),sr(t.reference,a,s)}}});var Eie,xie,Cie,YW,GW,KW,Fm,QW=b(()=>{Ze();Eie=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"),xie=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"),Cie=2,YW=3,GW=4,KW=5,Fm=class n{pattern(t){return Eie}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let a=t.text.substring(e.index+e[0].length),i=xie.exec(a);return i&&(r.end=n.extractTimeComponent(r.start.clone(),i),r.end&&(r.text+=i[0])),r}static extractTimeComponent(t,e){let r=0,a=0,i=null;if(r=parseInt(e[Cie]),e[YW]!=null&&(a=parseInt(e[YW])),a>=60||r>24)return null;if(r>=12&&(i=O.PM),e[KW]!=null){if(r>12)return null;let s=e[KW][0].toLowerCase();s=="a"&&(i=O.AM,r==12&&(r=0)),s=="p"&&(i=O.PM,r!=12&&(r+=12))}if(t.assign("hour",r),t.assign("minute",a),i!==null?t.assign("meridiem",i):r<12?t.imply("meridiem",O.AM):t.imply("meridiem",O.PM),e[GW]!=null){let s=parseInt(e[GW]);if(s>=60)return null;t.assign("second",s)}return t}}});var Pie,ZW,JW,Mie,XW,Om,e2=b(()=>{Yt();yo();yo();yo();$e();se();Pie=new RegExp(`(?:on\\s*?)?(${wD})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${wD}))?(?:-|/|\\s*(?:de)?\\s*)(${X(bD)})(?:(?:-|/|,?\\s*)(${WW}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ZW=1,JW=2,Mie=3,XW=4,Om=class extends j{innerPattern(){return Pie}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=bD[e[Mie].toLowerCase()],i=SD(e[ZW]);if(i>31)return e.index=e.index+e[ZW].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[XW]){let s=qW(e[XW]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[JW]){let s=SD(e[JW]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var Lm,t2=b(()=>{yo();Ne();se();Jn();Lm=class extends j{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${mv})(?=(?:\\W|$))`,"i")}innerExtract(t,e){let r=hv(e[1]),a=ir(r);return G.createRelativeFromReference(t.reference,a)}}});var Bm,r2=b(()=>{yo();Ne();se();Bm=class extends j{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${mv})(?=\\W|$)`,"i")}innerExtract(t,e){let r=hv(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var jm,n2=b(()=>{yo();Ne();se();Jn();$e();jm=class extends j{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${TD})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${X(Nm)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(t,e){let r=e[1]?kD(e[1]):1,a=Nm[e[3].toLowerCase()],i={};i[a]=r;let s=e[2]||e[4]||"";if(s=s.toLowerCase(),!!s)return(/derni[eè]re?s?/.test(s)||/pass[ée]e?s?/.test(s)||/pr[ée]c[ée]dents?/.test(s))&&(i=ir(i)),G.createRelativeFromReference(t.reference,i)}}});var xD={};Be(xD,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>DD,createCasualConfiguration:()=>a2,createConfiguration:()=>ED,parse:()=>Iie,parseDate:()=>_ie,strict:()=>Aie});function Iie(n,t,e){return DD.parse(n,t,e)}function _ie(n,t,e){return DD.parseDate(n,t,e)}function a2(n=!0){let t=ED(!1,n);return t.parsers.unshift(new Pm),t.parsers.unshift(new Mm),t.parsers.unshift(new jm),t}function ED(n=!0,t=!0){return Ot({parsers:[new gr(t),new Om,new Am,new Fm,new Lm,new Bm,new Rm],refiners:[new Im,new _m]},n)}var DD,Aie,i2=b(()=>{Qn();Dn();Ne();Ze();LW();BW();vs();jW();HW();zW();$W();QW();e2();t2();r2();n2();DD=new ve(a2()),Aie=new ve(ED(!0))});function un(n){return String(n).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,Nie)}function Nie(n){return String.fromCharCode(n.charCodeAt(0)-65248)}function jl(n){let t=0;for(let e=0;e{ki={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10},Id={\u65E5:0,\u6708:1,\u706B:2,\u6C34:3,\u6728:4,\u91D1:5,\u571F:6}});var o2,Rie,s2,Fie,CD,Oie,Lie,Bie,Hm,l2=b(()=>{_d();Yt();o2=Ie(nt(),1),Rie=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,s2=1,Fie=2,CD=3,Oie=4,Lie=5,Bie=6,Hm=class{pattern(){return Rie}extract(t,e){let r=parseInt(un(e[Lie])),a=parseInt(un(e[Bie])),i=t.createParsingComponents({day:a,month:r});if(e[s2]&&e[s2].match("\u540C|\u4ECA|\u672C")){let s=(0,o2.default)(t.refDate);i.assign("year",s.year())}if(e[Fie]){let s=e[Oie],o=s=="\u5143"?1:parseInt(un(s));e[CD]=="\u4EE4\u548C"?o+=2018:e[CD]=="\u5E73\u6210"?o+=1988:e[CD]=="\u662D\u548C"&&(o+=1925),i.assign("year",o)}else{let s=lt(t.refDate,a,r);i.imply("year",s)}return i}}});var zm,c2=b(()=>{wa();zm=class extends _t{patternBetween(){return/^\s*(から|-|ー|-|~|~)\s*$/i}}});function Hie(n){switch(n){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 n}}var d2,jie,Um,u2=b(()=>{d2=Ie(nt(),1);Ze();Zn();jie=/今日|きょう|本日|ほんじつ|昨日|きのう|明日|あした|今夜|こんや|今夕|こんゆう|今晩|こんばん|今朝|けさ/i;Um=class{pattern(){return jie}extract(t,e){let r=Hie(e[0]),a=(0,d2.default)(t.refDate),i=t.createParsingComponents();switch(r){case"\u6628\u65E5":return Gr(t.reference);case"\u660E\u65E5":return Kr(t.reference);case"\u672C\u65E5":case"\u4ECA\u65E5":return xr(t.reference)}return r=="\u4ECA\u591C"||r=="\u4ECA\u5915"||r=="\u4ECA\u6669"?(i.imply("hour",22),i.assign("meridiem",O.PM)):r.match("\u4ECA\u671D")&&(i.imply("hour",6),i.assign("meridiem",O.AM)),i.assign("day",a.date()),i.assign("month",a.month()+1),i.assign("year",a.year()),i}}});var zie,Wm,p2=b(()=>{_d();Xa();zie=new RegExp("((?\u524D\u306E|\u6B21\u306E|\u4ECA\u9031))?(?"+Object.keys(Id).join("|")+")(?:\u66DC\u65E5|\u66DC)","i"),Wm=class{pattern(){return zie}extract(t,e){let r=e.groups.weekday,a=Id[r];if(a===void 0)return null;let i=e.groups.prefix||"",s=null;return i.match(/前の/)?s="last":i.match(/次の/)?s="next":i.match(/今週/)&&(s="this"),sr(t.reference,a,s)}}});var Uie,m2,Wie,qie,qm,h2=b(()=>{Yt();_d();Uie=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"),m2=1,Wie=2,qie=3,qm=class{pattern(){return Uie}extract(t,e){let r=t.createParsingComponents(),a=parseInt(un(e[Wie])),i=parseInt(un(e[qie]));if(a<1||a>12||i<1||i>31)return null;if(r.assign("day",i),r.assign("month",a),e[m2]){let s=parseInt(un(e[m2])),o=wn(s);r.assign("year",o)}else{let s=lt(t.reference.instant,i,a);r.imply("year",s)}return r}}});var Vie,$ie,fv,gv,vo,Nd,yv,Vm,f2=b(()=>{se();Ze();_d();Vie=new RegExp("(?:(\u5348\u524D|\u5348\u5F8C|A.M.|P.M.|AM|PM))?(?:[\\s,\uFF0C\u3001]*)(?:([0-9\uFF10-\uFF19]+|["+Object.keys(ki).join("")+"]+)(?:\\s*)(?:\u6642|:|\uFF1A)(?:\\s*)([0-9\uFF10-\uFF19]+|\u534A|["+Object.keys(ki).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)([0-9\uFF10-\uFF19]+|["+Object.keys(ki).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),$ie=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(ki).join("")+"]+)(?:\\s*)(?:\u6642|:|\uFF1A)(?:\\s*)([0-9\uFF10-\uFF19]+|\u534A|["+Object.keys(ki).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)([0-9\uFF10-\uFF19]+|["+Object.keys(ki).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),fv=1,gv=2,vo=3,Nd=4,yv=5,Vm=class extends j{innerPattern(){return Vie}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=t.createParsingResult(e.index,e[0]),a=0,i=0,s=-1;if(e[Nd]){let o=parseInt(un(e[Nd]));if(isNaN(o)&&(o=jl(e[Nd])),o>=60)return null;r.start.assign("second",o)}if(a=parseInt(un(e[gv])),isNaN(a)&&(a=jl(e[gv])),e[vo]?e[vo]==="\u534A"?i=30:(i=parseInt(un(e[vo])),isNaN(i)&&(i=jl(e[vo]))):a>100&&(i=a%100,a=Math.floor(a/100)),i>=60||a>24)return null;if(a>=12&&(s=O.PM),e[fv]){if(a>12)return null;let o=e[fv],l=o[0].toLowerCase();o==="\u5348\u524D"||l==="a"?(s=O.AM,a===12&&(a=0)):(o==="\u5348\u5F8C"||l==="p")&&(s=O.PM,a!=12&&(a+=12))}else if(e[yv]){if(a>12)return null;let o=e[yv][0].toLowerCase();o==="a"&&(s=O.AM,a===12&&(a=0)),o==="p"&&(s=O.PM,a!=12&&(a+=12))}if(r.start.assign("hour",a),r.start.assign("minute",i),s>=0?r.start.assign("meridiem",s):a<12?r.start.imply("meridiem",0):r.start.imply("meridiem",1),e=$ie.exec(t.text.substring(r.index+r.text.length)),!e)return r.text.match(/^\d+$/)?null:r;if(r.end=t.createParsingComponents(),a=0,i=0,s=-1,e[Nd]){let o=parseInt(un(e[Nd]));if(isNaN(o)&&(o=jl(e[Nd])),o>=60)return null;r.end.assign("second",o)}if(a=parseInt(un(e[gv])),isNaN(a)&&(a=jl(e[gv])),e[vo]?e[vo]==="\u534A"?i=30:(i=parseInt(un(e[vo])),isNaN(i)&&(i=jl(e[vo]))):a>100&&(i=a%100,a=Math.floor(a/100)),i>=60||a>24)return null;if(a>=12&&(s=O.PM),e[fv]){if(a>12)return null;let o=e[fv],l=o[0].toLowerCase();o==="\u5348\u524D"||l==="a"?(s=O.AM,a===12&&(a=0)):(o==="\u5348\u5F8C"||l==="p")&&(s=O.PM,a!=12&&(a+=12)),r.start.isCertain("meridiem")||(s===O.AM?(r.start.imply("meridiem",O.AM),r.start.get("hour")===12&&r.start.assign("hour",0)):(r.start.imply("meridiem",1),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}else if(e[yv]){if(a>12)return null;let o=e[yv][0].toLowerCase();o==="a"&&(s=O.AM,a===12&&(a=0)),o==="p"&&(s=O.PM,a!=12&&(a+=12))}return r.text=r.text+e[0],r.end.assign("hour",a),r.end.assign("minute",i),s>=0?r.end.assign("meridiem",s):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>a?r.end.imply("meridiem",O.AM):a<=12&&(r.end.assign("hour",a+12),r.end.assign("meridiem",O.PM)):a>12?r.end.imply("meridiem",O.PM):a<=12&&r.end.imply("meridiem",O.AM),r.end.date().getTime(){Sa();$m=class extends Nt{patternBetween(){return/^\s*(の)?\s*$/i}}});var Ym,y2=b(()=>{gs();Ym=class extends Sn{mergeResults(t,e,r){let a=e.clone();return a.text=e.text+t+r.text,a.start.assign("weekday",r.start.get("weekday")),a.end&&a.end.assign("weekday",r.start.get("weekday")),a}shouldMergeResults(t,e,r){return e.start.isCertain("day")&&r.start.isOnlyWeekdayComponent()&&!r.start.isCertain("hour")&&t.match(/^[,、の]?\s*$/)!==null}}});var Yie,Gm,v2=b(()=>{_d();Xa();Yie=new RegExp("(?:\\(|\\\uFF08)(?"+Object.keys(Id).join("|")+")(?:\\)|\\\uFF09)","i"),Gm=class{pattern(){return Yie}extract(t,e){let r=e.groups.weekday,a=Id[r];return a===void 0?null:sr(t.reference,a)}}});var AD={};Be(AD,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>PD,createCasualConfiguration:()=>b2,createConfiguration:()=>MD,parse:()=>Kie,parseDate:()=>Qie,strict:()=>Gie});function Kie(n,t,e){return PD.parse(n,t,e)}function Qie(n,t,e){return PD.parseDate(n,t,e)}function b2(){let n=MD(!1);return n.parsers.unshift(new Um),n}function MD(n=!0){let t=Ot({parsers:[new Hm,new Wm,new Gm,new qm,new Vm],refiners:[new Ym,new $m,new zm]},n);return t.refiners=t.refiners.filter(e=>!(e instanceof Rl)),t}var PD,Gie,T2=b(()=>{l2();c2();u2();p2();h2();f2();g2();Dn();Ne();Ze();y2();v2();Qn();nD();PD=new ve(b2()),Gie=new ve(MD(!0))});function w2(n){if(n.match(/^[0-9]{1,4}$/)){let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}var ID,_D,k2,vv=b(()=>{ID={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},_D={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},k2="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?"});var Zie,Jie,Xie,ese,Km,S2=b(()=>{vv();$e();se();Xa();Zie=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${X(ID)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),Jie=1,Xie=2,ese=3,Km=class extends j{innerPattern(){return Zie}innerExtract(t,e){let r=e[Xie].toLowerCase(),a=ID[r];if(a===void 0)return null;let i=e[Jie],s=e[ese],o=i||s||"";o=o.toLowerCase();let l=null;return o=="passado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this"),sr(t.reference,a,l)}}});var Qm,D2=b(()=>{fs();Qm=class extends Er{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}}});var Zm,E2=b(()=>{Sa();Zm=class extends Nt{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}}});var Jm,x2=b(()=>{wa();Jm=class extends _t{patternBetween(){return/^\s*(?:-)\s*$/i}}});var tse,C2,P2,rse,M2,Xm,A2=b(()=>{Yt();vv();vv();$e();se();tse=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*)(${X(_D)})(?:\\s*(?:de|,)?\\s*(${k2}))?(?=\\W|$)`,"i"),C2=1,P2=2,rse=3,M2=4,Xm=class extends j{innerPattern(){return tse}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=_D[e[rse].toLowerCase()],i=parseInt(e[C2]);if(i>31)return e.index=e.index+e[C2].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[M2]){let s=w2(e[M2]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[P2]){let s=parseInt(e[P2]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var eh,I2=b(()=>{se();Zn();eh=class extends j{innerPattern(t){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),a=t.createParsingComponents();switch(r){case"agora":return Yr(t.reference);case"hoje":return xr(t.reference);case"amanha":case"amanh\xE3":return Kr(t.reference);case"ontem":return Gr(t.reference)}return a}}});var _2,th,N2=b(()=>{Ze();se();Kn();_2=Ie(nt(),1),th=class extends j{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(t,e){let r=(0,_2.default)(t.refDate),a=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":a.imply("meridiem",O.PM),a.imply("hour",15);break;case"noite":a.imply("meridiem",O.PM),a.imply("hour",22);break;case"manha":case"manh\xE3":a.imply("meridiem",O.AM),a.imply("hour",6);break;case"meia-noite":Za(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"meio-dia":a.imply("meridiem",O.AM),a.imply("hour",12);break}return a}}});var FD={};Be(FD,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>ND,createCasualConfiguration:()=>R2,createConfiguration:()=>RD,parse:()=>ase,parseDate:()=>ise,strict:()=>nse});function ase(n,t,e){return ND.parse(n,t,e)}function ise(n,t,e){return ND.parseDate(n,t,e)}function R2(n=!0){let t=RD(!1,n);return t.parsers.push(new eh),t.parsers.push(new th),t}function RD(n=!0,t=!0){return Ot({parsers:[new gr(t),new Km,new Qm,new Xm],refiners:[new Zm,new Jm]},n)}var ND,nse,F2=b(()=>{Qn();Dn();Ne();Ze();vs();S2();D2();E2();x2();A2();I2();N2();ND=new ve(R2()),nse=new ve(RD(!0))});var rh,O2=b(()=>{wa();rh=class extends _t{patternBetween(){return/^\s*(tot|-)\s*$/i}}});var nh,L2=b(()=>{Sa();nh=class extends Nt{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}}});var ah,B2=b(()=>{se();Zn();ah=class extends j{innerPattern(t){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),a=t.createParsingComponents();switch(r){case"nu":return Yr(t.reference);case"vandaag":return xr(t.reference);case"morgen":case"morgend":return Kr(t.reference);case"gisteren":return Gr(t.reference)}return a}}});var j2,sse,ose,ih,H2=b(()=>{Ze();se();j2=Ie(nt(),1);Kn();sse=1,ose=2,ih=class extends j{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(t,e){let r=(0,j2.default)(t.refDate),a=t.createParsingComponents();switch(e[sse]==="deze"&&(a.assign("day",t.refDate.getDate()),a.assign("month",t.refDate.getMonth()+1),a.assign("year",t.refDate.getFullYear())),e[ose].toLowerCase()){case"namiddag":case"'s namiddags":a.imply("meridiem",O.PM),a.imply("hour",15);break;case"avond":case"'s avonds'":a.imply("meridiem",O.PM),a.imply("hour",20);break;case"middernacht":Za(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"ochtend":case"'s ochtends":a.imply("meridiem",O.AM),a.imply("hour",6);break;case"middag":case"'s middags":a.imply("meridiem",O.AM),a.imply("hour",12);break}return a}}});function cse(n){let t=n.toLowerCase();return OD[t]!==void 0?OD[t]:t==="paar"?2:t==="half"||t.match(/halve?/)?.5:parseFloat(t.replace(",","."))}function HD(n){let t=n.toLowerCase();return LD[t]!==void 0?LD[t]:(t=t.replace(/(?:ste|de)$/i,""),parseInt(t))}function Tv(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let t=parseInt(n);return wn(t)}function bo(n){let t={},e=n,r=z2.exec(e);for(;r;)dse(t,r),e=e.substring(r[0].length),r=z2.exec(e);return t}function dse(n,t){let e=cse(t[1]),r=sh[t[2].toLowerCase()];n[r]=e}var BD,bs,OD,LD,sh,lse,jD,bv,U2,z2,wi,Xn=b(()=>{$e();Yt();BD={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},bs={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},OD={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12},LD={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},sh={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"},lse=`(?:${X(OD)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;jD=`(?:${X(LD)}|[0-9]{1,2}(?:ste|de)?)`;bv="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";U2=`(${lse})\\s{0,5}(${X(sh)})\\s{0,5}`,z2=new RegExp(U2,"i"),wi=dn("(?:(?:binnen|in)\\s*)?",U2)});var oh,W2=b(()=>{Xn();Ne();se();oh=class extends j{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+wi+")(?=\\W|$)","i")}innerExtract(t,e){let r=bo(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var use,pse,mse,hse,lh,q2=b(()=>{Xn();$e();se();Xa();use=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${X(BD)})(?=\\W|$)`,"i"),pse=1,mse=2,hse=3,lh=class extends j{innerPattern(){return use}innerExtract(t,e){let r=e[mse].toLowerCase(),a=BD[r],i=e[pse],s=e[hse],o=i||s;o=o||"",o=o.toLowerCase();let l=null;return o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this"),sr(t.reference,a,l)}}});var fse,gse,V2,$2,Y2,ch,G2=b(()=>{Yt();Xn();Xn();Xn();$e();se();fse=new RegExp(`(?:on\\s*?)?(${jD})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${jD}))?(?:-|/|\\s*(?:of)?\\s*)(`+X(bs)+`)(?:(?:-|/|,?\\s*)(${bv}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gse=3,V2=1,$2=2,Y2=4,ch=class extends j{innerPattern(){return fse}innerExtract(t,e){let r=bs[e[gse].toLowerCase()],a=HD(e[V2]);if(a>31)return e.index=e.index+e[V2].length,null;let i=t.createParsingComponents({day:a,month:r});if(e[Y2]){let l=Tv(e[Y2]);i.assign("year",l)}else{let l=lt(t.refDate,a,r);i.imply("year",l)}if(!e[$2])return i;let s=HD(e[$2]),o=t.createParsingResult(e.index,e[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",s),o}}});var yse,vse,K2,Rd,Q2=b(()=>{Xn();Yt();$e();Xn();se();yse=new RegExp(`(${X(bs)})\\s*(?:[,-]?\\s*(${bv})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),vse=1,K2=2,Rd=class extends j{innerPattern(){return yse}innerExtract(t,e){let r=t.createParsingComponents();r.imply("day",1);let a=e[vse],i=bs[a.toLowerCase()];if(r.assign("month",i),e[K2]){let s=Tv(e[K2]);r.assign("year",s)}else{let s=lt(t.refDate,1,i);r.imply("year",s)}return r}}});var bse,Tse,kse,dh,Z2=b(()=>{se();bse=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Tse=1,kse=2,dh=class extends j{innerPattern(){return bse}innerExtract(t,e){let r=parseInt(e[kse]),a=parseInt(e[Tse]);return t.createParsingComponents().imply("day",1).assign("month",a).assign("year",r)}}});var uh,J2=b(()=>{fs();uh=class extends Er{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}}});var wse,Sse,Dse,X2,Ese,ph,eq=b(()=>{Xn();$e();se();wse=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${X(bs)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Sse=1,Dse=2,X2=3,Ese=4,ph=class extends j{innerPattern(){return wse}innerExtract(t,e){let r=e[X2]?parseInt(e[X2]):bs[e[Dse].toLowerCase()];if(r<1||r>12)return null;let a=parseInt(e[Sse]);return{day:parseInt(e[Ese]),month:r,year:a}}}});var tq,xse,Cse,mh,rq=b(()=>{se();Ze();Kn();tq=Ie(nt(),1),xse=1,Cse=2,mh=class extends j{innerPattern(t){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(t,e){let r=e[xse].toLowerCase(),a=e[Cse].toLowerCase(),i=t.createParsingComponents(),s=(0,tq.default)(t.refDate);switch(r){case"gisteren":xt(i,s.add(-1,"day"));break;case"van":xt(i,s);break;case"morgen":Za(i,s);break}switch(a){case"ochtend":i.imply("meridiem",O.AM),i.imply("hour",6);break;case"middag":i.imply("meridiem",O.AM),i.imply("hour",12);break;case"namiddag":i.imply("meridiem",O.PM),i.imply("hour",15);break;case"avond":i.imply("meridiem",O.PM),i.imply("hour",20);break}return i}}});var Pse,Mse,Ase,hh,nq=b(()=>{Xn();Ne();se();Jn();Pse=new RegExp(`(dit|deze|vorig|afgelopen|(?:aan)?komend|over|\\+|-)e?\\s*(${wi})(?=\\W|$)`,"i"),Mse=1,Ase=2,hh=class extends j{innerPattern(){return Pse}innerExtract(t,e){let r=e[Mse].toLowerCase(),a=bo(e[Ase]);switch(r){case"vorig":case"afgelopen":case"-":a=ir(a);break}return G.createRelativeFromReference(t.reference,a)}}});var aq,Ise,_se,Nse,fh,iq=b(()=>{Xn();Ne();aq=Ie(nt(),1);se();$e();Ise=new RegExp(`(dit|deze|(?:aan)?komend|volgend|afgelopen|vorig)e?\\s*(${X(sh)})(?=\\s*)(?=\\W|$)`,"i"),_se=1,Nse=2,fh=class extends j{innerPattern(){return Ise}innerExtract(t,e){let r=e[_se].toLowerCase(),a=e[Nse].toLowerCase(),i=sh[a];if(r=="volgend"||r=="komend"||r=="aankomend"){let l={};return l[i]=1,G.createRelativeFromReference(t.reference,l)}if(r=="afgelopen"||r=="vorig"){let l={};return l[i]=-1,G.createRelativeFromReference(t.reference,l)}let s=t.createParsingComponents(),o=(0,aq.default)(t.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):a.match(/maand/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):a.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var Rse,Fse,gh,sq=b(()=>{Xn();Ne();se();Jn();Rse=new RegExp("("+wi+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),Fse=new RegExp("("+wi+")geleden(?=(?:\\W|$))","i"),gh=class extends j{constructor(e){super();C(this,"strictMode");this.strictMode=e}innerPattern(){return this.strictMode?Fse:Rse}innerExtract(e,r){let a=bo(r[1]),i=ir(a);return G.createRelativeFromReference(e.reference,i)}}});var Ose,Lse,Bse,yh,oq=b(()=>{Xn();Ne();se();Ose=new RegExp("("+wi+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),Lse=new RegExp("("+wi+")(later|vanaf nu)(?=(?:\\W|$))","i"),Bse=1,yh=class extends j{constructor(e){super();C(this,"strictMode");this.strictMode=e}innerPattern(){return this.strictMode?Lse:Ose}innerExtract(e,r){let a=bo(r[Bse]);return G.createRelativeFromReference(e.reference,a)}}});var WD={};Be(WD,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>zD,createCasualConfiguration:()=>lq,createConfiguration:()=>UD,parse:()=>Hse,parseDate:()=>zse,strict:()=>jse});function Hse(n,t,e){return zD.parse(n,t,e)}function zse(n,t,e){return zD.parseDate(n,t,e)}function lq(n=!0){let t=UD(!1,n);return t.parsers.unshift(new ah),t.parsers.unshift(new ih),t.parsers.unshift(new mh),t.parsers.unshift(new Rd),t.parsers.unshift(new fh),t.parsers.unshift(new hh),t}function UD(n=!0,t=!0){return Ot({parsers:[new gr(t),new oh,new ch,new Rd,new lh,new ph,new dh,new uh(n),new gh(n),new yh(n)],refiners:[new nh,new rh]},n)}var zD,jse,cq=b(()=>{Qn();Dn();Ne();Ze();O2();L2();B2();H2();vs();W2();q2();G2();Q2();Z2();J2();eq();rq();nq();iq();sq();oq();zD=new ve(lq()),jse=new ve(UD(!0))});function Ea(n){let t=0;for(let e=0;e{Cr={\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},Fd={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6}});var pq,qD,uq,VD,Hl,$D=b(()=>{pq=Ie(nt(),1);se();Od();qD=1,uq=2,VD=3,Hl=class extends j{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Cr).join("")+"]{4}|["+Object.keys(Cr).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Cr).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Cr).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(t,e){let r=(0,pq.default)(t.refDate),a=t.createParsingResult(e.index,e[0]),i=parseInt(e[uq]);if(isNaN(i)&&(i=Ea(e[uq])),a.start.assign("month",i),e[VD]){let s=parseInt(e[VD]);isNaN(s)&&(s=Ea(e[VD])),a.start.assign("day",s)}else a.start.imply("day",r.date());if(e[qD]){let s=parseInt(e[qD]);isNaN(s)&&(s=dq(e[qD])),a.start.assign("year",s)}else a.start.imply("year",r.year());return a}}});var mq,Use,YD,Wse,zl,GD=b(()=>{mq=Ie(nt(),1);se();Od();Use=new RegExp("(\\d+|["+Object.keys(Cr).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"),YD=1,Wse=2,zl=class extends j{innerPattern(){return Use}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=parseInt(e[YD]);if(isNaN(a)&&(a=Ea(e[YD])),isNaN(a)){let l=e[YD];if(l==="\u51E0")a=3;else if(l==="\u534A")a=.5;else return null}let i=(0,mq.default)(t.refDate),o=e[Wse][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(a,"d"):o=="\u661F"||o=="\u793C"?i=i.add(a*7,"d"):o=="\u6708"?i=i.add(a,"month"):o=="\u5E74"&&(i=i.add(a,"year")),r.start.assign("year",i.year()),r.start.assign("month",i.month()+1),r.start.assign("day",i.date()),r):(o=="\u79D2"?i=i.add(a,"second"):o=="\u5206"?i=i.add(a,"minute"):(o=="\u5C0F"||o=="\u949F")&&(i=i.add(a,"hour")),r.start.imply("year",i.year()),r.start.imply("month",i.month()+1),r.start.imply("day",i.date()),r.start.assign("hour",i.hour()),r.start.assign("minute",i.minute()),r.start.assign("second",i.second()),r)}}});var hq,qse,Ul,KD=b(()=>{hq=Ie(nt(),1);se();Od();qse=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Fd).join("|")+")"),Ul=class extends j{innerPattern(){return qse}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=e.groups.weekday,i=Fd[a];if(i===void 0)return null;let s=null,o=e.groups.prefix;o=="\u4E0A"?s="last":o=="\u4E0B"?s="next":o=="\u8FD9"&&(s="this");let l=(0,hq.default)(t.refDate),c=!1,d=l.day();return s=="last"||s=="past"?(l=l.day(i-7),c=!0):s=="next"?(l=l.day(i+7),c=!0):s=="this"?l=l.day(i):Math.abs(i-7-d){fq=Ie(nt(),1);se();Od();Vse=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(Cr).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Cr).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Cr).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),$se=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(Cr).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Cr).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Cr).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),kv=1,wv=2,Sv=3,Dv=4,Ev=5,xv=6,xa=7,Ld=8,Cv=9,Wl=class extends j{innerPattern(){return Vse}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=(0,fq.default)(t.refDate),a=t.createParsingResult(e.index,e[0]),i=r.clone();if(e[kv]){let d=e[kv];d=="\u660E"?r.hour()>1&&(i=i.add(1,"day")):d=="\u6628"?i=i.add(-1,"day"):d=="\u524D"?i=i.add(-2,"day"):d=="\u5927\u524D"?i=i.add(-3,"day"):d=="\u540E"?i=i.add(2,"day"):d=="\u5927\u540E"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else if(e[Dv]){let d=e[Dv];d=="\u660E"?i=i.add(1,"day"):d=="\u6628"?i=i.add(-1,"day"):d=="\u524D"?i=i.add(-2,"day"):d=="\u5927\u524D"?i=i.add(-3,"day"):d=="\u540E"?i=i.add(2,"day"):d=="\u5927\u540E"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else a.start.imply("day",i.date()),a.start.imply("month",i.month()+1),a.start.imply("year",i.year());let s=0,o=0,l=-1;if(e[Ld]){let d=parseInt(e[Ld]);if(isNaN(d)&&(d=Ea(e[Ld])),d>=60)return null;a.start.assign("second",d)}if(s=parseInt(e[xv]),isNaN(s)&&(s=Ea(e[xv])),e[xa]?e[xa]=="\u534A"?o=30:e[xa]=="\u6B63"||e[xa]=="\u6574"?o=0:(o=parseInt(e[xa]),isNaN(o)&&(o=Ea(e[xa]))):s>100&&(o=s%100,s=Math.floor(s/100)),o>=60||s>24)return null;if(s>=12&&(l=1),e[Cv]){if(s>12)return null;let d=e[Cv][0].toLowerCase();d=="a"&&(l=0,s==12&&(s=0)),d=="p"&&(l=1,s!=12&&(s+=12))}else if(e[wv]){let u=e[wv][0];u=="\u65E9"?(l=0,s==12&&(s=0)):u=="\u665A"&&(l=1,s!=12&&(s+=12))}else if(e[Sv]){let u=e[Sv][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,s==12&&(s=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,s!=12&&(s+=12))}else if(e[Ev]){let u=e[Ev][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,s==12&&(s=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,s!=12&&(s+=12))}if(a.start.assign("hour",s),a.start.assign("minute",o),l>=0?a.start.assign("meridiem",l):s<12?a.start.imply("meridiem",0):a.start.imply("meridiem",1),e=$se.exec(t.text.substring(a.index+a.text.length)),!e)return a.text.match(/^\d+$/)?null:a;let c=i.clone();if(a.end=t.createParsingComponents(),e[kv]){let d=e[kv];d=="\u660E"?r.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(e[Dv]){let d=e[Dv];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(s=0,o=0,l=-1,e[Ld]){let d=parseInt(e[Ld]);if(isNaN(d)&&(d=Ea(e[Ld])),d>=60)return null;a.end.assign("second",d)}if(s=parseInt(e[xv]),isNaN(s)&&(s=Ea(e[xv])),e[xa]?e[xa]=="\u534A"?o=30:e[xa]=="\u6B63"||e[xa]=="\u6574"?o=0:(o=parseInt(e[xa]),isNaN(o)&&(o=Ea(e[xa]))):s>100&&(o=s%100,s=Math.floor(s/100)),o>=60||s>24)return null;if(s>=12&&(l=1),e[Cv]){if(s>12)return null;let d=e[Cv][0].toLowerCase();d=="a"&&(l=0,s==12&&(s=0)),d=="p"&&(l=1,s!=12&&(s+=12)),a.start.isCertain("meridiem")||(l==0?(a.start.imply("meridiem",0),a.start.get("hour")==12&&a.start.assign("hour",0)):(a.start.imply("meridiem",1),a.start.get("hour")!=12&&a.start.assign("hour",a.start.get("hour")+12)))}else if(e[wv]){let u=e[wv][0];u=="\u65E9"?(l=0,s==12&&(s=0)):u=="\u665A"&&(l=1,s!=12&&(s+=12))}else if(e[Sv]){let u=e[Sv][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,s==12&&(s=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,s!=12&&(s+=12))}else if(e[Ev]){let u=e[Ev][0];u=="\u4E0A"||u=="\u65E9"||u=="\u51CC"?(l=0,s==12&&(s=0)):(u=="\u4E0B"||u=="\u665A")&&(l=1,s!=12&&(s+=12))}return a.text=a.text+e[0],a.end.assign("hour",s),a.end.assign("minute",o),l>=0?a.end.assign("meridiem",l):a.start.isCertain("meridiem")&&a.start.get("meridiem")==1&&a.start.get("hour")>s?a.end.imply("meridiem",0):s>12&&a.end.imply("meridiem",1),a.end.date().getTime(){gq=Ie(nt(),1);se();Od();Yse=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Fd).join("|")+")"),ql=class extends j{innerPattern(){return Yse}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=e.groups.weekday,i=Fd[a];if(i===void 0)return null;let s=(0,gq.default)(t.refDate),o=!1,l=s.day();return Math.abs(i-7-l){Tq=Ie(nt(),1);se();Gse=1,yq=2,Kse=3,vq=4,bq=5,Qse=6,Vl=class extends j{innerPattern(t){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(t,e){let r=e.index,a=t.createParsingResult(r,e[0]),i=(0,Tq.default)(t.refDate),s=i;if(e[Gse])a.start.imply("hour",i.hour()),a.start.imply("minute",i.minute()),a.start.imply("second",i.second()),a.start.imply("millisecond",i.millisecond());else if(e[yq]){let o=e[yq],l=e[Kse];o=="\u660E"||o=="\u807D"?i.hour()>1&&(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")),l=="\u65E9"||l=="\u671D"?a.start.imply("hour",6):l=="\u665A"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(e[vq]){let l=e[vq][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(e[bq]){let o=e[bq];o=="\u660E"||o=="\u807D"?i.hour()>1&&(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"));let l=e[Qse];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",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year()),a}}});function Ca(n){let t=0;for(let e=0;e{Pr={\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},Bd={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6}});var Sq,XD,wq,eE,$l,tE=b(()=>{Sq=Ie(nt(),1);se();jd();XD=1,wq=2,eE=3,$l=class extends j{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Pr).join("")+"]{4}|["+Object.keys(Pr).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Pr).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Pr).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(t,e){let r=(0,Sq.default)(t.refDate),a=t.createParsingResult(e.index,e[0]),i=parseInt(e[wq]);if(isNaN(i)&&(i=Ca(e[wq])),a.start.assign("month",i),e[eE]){let s=parseInt(e[eE]);isNaN(s)&&(s=Ca(e[eE])),a.start.assign("day",s)}else a.start.imply("day",r.date());if(e[XD]){let s=parseInt(e[XD]);isNaN(s)&&(s=kq(e[XD])),a.start.assign("year",s)}else a.start.imply("year",r.year());return a}}});var Dq,Zse,rE,Jse,Yl,nE=b(()=>{Dq=Ie(nt(),1);se();jd();Zse=new RegExp("(\\d+|["+Object.keys(Pr).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"),rE=1,Jse=2,Yl=class extends j{innerPattern(){return Zse}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=parseInt(e[rE]);if(isNaN(a)&&(a=Ca(e[rE])),isNaN(a)){let l=e[rE];if(l==="\u5E7E")a=3;else if(l==="\u534A")a=.5;else return null}let i=(0,Dq.default)(t.refDate),o=e[Jse][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?i=i.add(a,"d"):o=="\u661F"||o=="\u79AE"?i=i.add(a*7,"d"):o=="\u6708"?i=i.add(a,"month"):o=="\u5E74"&&(i=i.add(a,"year")),r.start.assign("year",i.year()),r.start.assign("month",i.month()+1),r.start.assign("day",i.date()),r):(o=="\u79D2"?i=i.add(a,"second"):o=="\u5206"?i=i.add(a,"minute"):(o=="\u5C0F"||o=="\u9418")&&(i=i.add(a,"hour")),r.start.imply("year",i.year()),r.start.imply("month",i.month()+1),r.start.imply("day",i.date()),r.start.assign("hour",i.hour()),r.start.assign("minute",i.minute()),r.start.assign("second",i.second()),r)}}});var Eq,Xse,Gl,aE=b(()=>{Eq=Ie(nt(),1);se();jd();Xse=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Bd).join("|")+")"),Gl=class extends j{innerPattern(){return Xse}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=e.groups.weekday,i=Bd[a];if(i===void 0)return null;let s=null,o=e.groups.prefix;o=="\u4E0A"?s="last":o=="\u4E0B"?s="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(s="this");let l=(0,Eq.default)(t.refDate),c=!1,d=l.day();return s=="last"||s=="past"?(l=l.day(i-7),c=!0):s=="next"?(l=l.day(i+7),c=!0):s=="this"?l=l.day(i):Math.abs(i-7-d){xq=Ie(nt(),1);se();jd();eoe=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(Pr).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Pr).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Pr).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),toe=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(Pr).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Pr).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Pr).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Pv=1,Mv=2,Av=3,Iv=4,_v=5,Nv=6,Pa=7,Hd=8,Rv=9,Kl=class extends j{innerPattern(){return eoe}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=(0,xq.default)(t.refDate),a=t.createParsingResult(e.index,e[0]),i=r.clone();if(e[Pv]){var s=e[Pv];s=="\u660E"||s=="\u807D"?r.hour()>1&&(i=i.add(1,"day")):s=="\u6628"||s=="\u5C0B"||s=="\u7434"?i=i.add(-1,"day"):s=="\u524D"?i=i.add(-2,"day"):s=="\u5927\u524D"?i=i.add(-3,"day"):s=="\u5F8C"?i=i.add(2,"day"):s=="\u5927\u5F8C"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else if(e[Iv]){var o=e[Iv];o=="\u660E"||o=="\u807D"?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")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else a.start.imply("day",i.date()),a.start.imply("month",i.month()+1),a.start.imply("year",i.year());let l=0,c=0,d=-1;if(e[Hd]){var u=parseInt(e[Hd]);if(isNaN(u)&&(u=Ca(e[Hd])),u>=60)return null;a.start.assign("second",u)}if(l=parseInt(e[Nv]),isNaN(l)&&(l=Ca(e[Nv])),e[Pa]?e[Pa]=="\u534A"?c=30:e[Pa]=="\u6B63"||e[Pa]=="\u6574"?c=0:(c=parseInt(e[Pa]),isNaN(c)&&(c=Ca(e[Pa]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),e[Rv]){if(l>12)return null;var p=e[Rv][0].toLowerCase();p=="a"&&(d=0,l==12&&(l=0)),p=="p"&&(d=1,l!=12&&(l+=12))}else if(e[Mv]){var m=e[Mv],h=m[0];h=="\u671D"||h=="\u65E9"?(d=0,l==12&&(l=0)):h=="\u665A"&&(d=1,l!=12&&(l+=12))}else if(e[Av]){var f=e[Av],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(e[_v]){var v=e[_v],T=v[0];T=="\u4E0A"||T=="\u671D"||T=="\u65E9"||T=="\u51CC"?(d=0,l==12&&(l=0)):(T=="\u4E0B"||T=="\u664F"||T=="\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),e=toe.exec(t.text.substring(a.index+a.text.length)),!e)return a.text.match(/^\d+$/)?null:a;let k=i.clone();if(a.end=t.createParsingComponents(),e[Pv]){var s=e[Pv];s=="\u660E"||s=="\u807D"?r.hour()>1&&(k=k.add(1,"day")):s=="\u6628"||s=="\u5C0B"||s=="\u7434"?k=k.add(-1,"day"):s=="\u524D"?k=k.add(-2,"day"):s=="\u5927\u524D"?k=k.add(-3,"day"):s=="\u5F8C"?k=k.add(2,"day"):s=="\u5927\u5F8C"&&(k=k.add(3,"day")),a.end.assign("day",k.date()),a.end.assign("month",k.month()+1),a.end.assign("year",k.year())}else if(e[Iv]){var o=e[Iv];o=="\u660E"||o=="\u807D"?k=k.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?k=k.add(-1,"day"):o=="\u524D"?k=k.add(-2,"day"):o=="\u5927\u524D"?k=k.add(-3,"day"):o=="\u5F8C"?k=k.add(2,"day"):o=="\u5927\u5F8C"&&(k=k.add(3,"day")),a.end.assign("day",k.date()),a.end.assign("month",k.month()+1),a.end.assign("year",k.year())}else a.end.imply("day",k.date()),a.end.imply("month",k.month()+1),a.end.imply("year",k.year());if(l=0,c=0,d=-1,e[Hd]){var u=parseInt(e[Hd]);if(isNaN(u)&&(u=Ca(e[Hd])),u>=60)return null;a.end.assign("second",u)}if(l=parseInt(e[Nv]),isNaN(l)&&(l=Ca(e[Nv])),e[Pa]?e[Pa]=="\u534A"?c=30:e[Pa]=="\u6B63"||e[Pa]=="\u6574"?c=0:(c=parseInt(e[Pa]),isNaN(c)&&(c=Ca(e[Pa]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),e[Rv]){if(l>12)return null;var p=e[Rv][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(e[Mv]){var m=e[Mv],h=m[0];h=="\u671D"||h=="\u65E9"?(d=0,l==12&&(l=0)):h=="\u665A"&&(d=1,l!=12&&(l+=12))}else if(e[Av]){var f=e[Av],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(e[_v]){var v=e[_v],T=v[0];T=="\u4E0A"||T=="\u671D"||T=="\u65E9"||T=="\u51CC"?(d=0,l==12&&(l=0)):(T=="\u4E0B"||T=="\u664F"||T=="\u665A")&&(d=1,l!=12&&(l+=12))}return a.text=a.text+e[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(){Cq=Ie(nt(),1);se();jd();roe=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Bd).join("|")+")"),Ql=class extends j{innerPattern(){return roe}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=e.groups.weekday,i=Bd[a];if(i===void 0)return null;let s=(0,Cq.default)(t.refDate),o=!1,l=s.day();return Math.abs(i-7-l){wa();Zl=class extends _t{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}}});var Jl,lE=b(()=>{Sa();Jl=class extends Nt{patternBetween(){return/^\s*$/i}}});var Fv={};Be(Fv,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>cE,createCasualConfiguration:()=>dE,createConfiguration:()=>uE,hant:()=>noe,parse:()=>ioe,parseDate:()=>soe,strict:()=>aoe});function ioe(n,t,e){return cE.parse(n,t,e)}function soe(n,t,e){return cE.parseDate(n,t,e)}function dE(){let n=uE();return n.parsers.unshift(new Vl),n}function uE(){let n=Ot({parsers:[new $l,new Gl,new Ql,new Kl,new Yl],refiners:[new Zl,new Jl]});return n.refiners=n.refiners.filter(t=>!(t instanceof Ja)),n}var noe,cE,aoe,Pq=b(()=>{am();Qn();Dn();Ne();Ze();JD();tE();nE();aE();iE();sE();oE();lE();noe=new ve(dE()),cE=new ve(dE()),aoe=new ve(uE())});var _q,ooe,Mq,loe,Aq,Iq,coe,vh,Nq=b(()=>{_q=Ie(nt(),1);se();ooe=1,Mq=2,loe=3,Aq=4,Iq=5,coe=6,vh=class extends j{innerPattern(t){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(t,e){let r=e.index,a=t.createParsingResult(r,e[0]),i=(0,_q.default)(t.refDate),s=i;if(e[ooe])a.start.imply("hour",i.hour()),a.start.imply("minute",i.minute()),a.start.imply("second",i.second()),a.start.imply("millisecond",i.millisecond());else if(e[Mq]){let o=e[Mq],l=e[loe];o=="\u660E"?i.hour()>1&&(s=s.add(1,"day")):o=="\u6628"?s=s.add(-1,"day"):o=="\u524D"?s=s.add(-2,"day"):o=="\u5927\u524D"?s=s.add(-3,"day"):o=="\u540E"?s=s.add(2,"day"):o=="\u5927\u540E"&&(s=s.add(3,"day")),l=="\u65E9"?a.start.imply("hour",6):l=="\u665A"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(e[Aq]){let l=e[Aq][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(e[Iq]){let o=e[Iq];o=="\u660E"?i.hour()>1&&(s=s.add(1,"day")):o=="\u6628"?s=s.add(-1,"day"):o=="\u524D"?s=s.add(-2,"day"):o=="\u5927\u524D"?s=s.add(-3,"day"):o=="\u540E"?s=s.add(2,"day"):o=="\u5927\u540E"&&(s=s.add(3,"day"));let l=e[coe];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",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year()),a}}});var bh,Rq=b(()=>{wa();bh=class extends _t{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}}});var Th,Fq=b(()=>{Sa();Th=class extends Nt{patternBetween(){return/^\s*$/i}}});var Ov={};Be(Ov,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>pE,createCasualConfiguration:()=>mE,createConfiguration:()=>hE,hans:()=>doe,parse:()=>poe,parseDate:()=>moe,strict:()=>uoe});function poe(n,t,e){return pE.parse(n,t,e)}function moe(n,t,e){return pE.parseDate(n,t,e)}function mE(){let n=hE();return n.parsers.unshift(new vh),n}function hE(){let n=Ot({parsers:[new Hl,new Ul,new ql,new Wl,new zl],refiners:[new bh,new Th]});return n.refiners=n.refiners.filter(t=>!(t instanceof Ja)),n}var doe,pE,uoe,Oq=b(()=>{am();Qn();Dn();Ne();Ze();Nq();$D();GD();KD();QD();ZD();Rq();Fq();doe=new ve(mE()),pE=new ve(mE()),uoe=new ve(hE())});var yE={};Be(yE,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>fE,createCasualConfiguration:()=>Lq,createConfiguration:()=>gE,hans:()=>Ov,hant:()=>Fv,parse:()=>foe,parseDate:()=>goe,strict:()=>hoe});function foe(n,t,e){return fE.parse(n,t,e)}function goe(n,t,e){return fE.parseDate(n,t,e)}function Lq(){let n=gE();return n.parsers.unshift(new Vl),n}function gE(){let n=Ot({parsers:[new $l,new Hl,new Gl,new Ul,new Ql,new ql,new Kl,new Wl,new Yl,new zl],refiners:[new Zl,new Jl]});return n.refiners=n.refiners.filter(t=>!(t instanceof Ja)),n}var fE,hoe,Bq=b(()=>{Qn();Dn();Ne();Ze();am();$D();GD();KD();QD();ZD();JD();tE();nE();aE();iE();sE();oE();lE();Pq();Oq();fE=new ve(Lq()),hoe=new ve(gE())});function voe(n){let t=n.toLowerCase();return bE[t]!==void 0?bE[t]:t.match(/несколько/)?3:t.match(/пол/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}function DE(n){let t=n.toLowerCase();return TE[t]!==void 0?TE[t]:parseInt(t)}function Bv(n){if(/(год|года|г|г.)/i.test(n)&&(n=n.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(n))return n=n.replace(/(до н.э.|до н. э.)/i,""),-parseInt(n);if(/(н. э.|н.э.)/i.test(n))return n=n.replace(/(н. э.|н.э.)/i,""),parseInt(n);let t=parseInt(n);return wn(t)}function Wd(n){let t={},e=n,r=jq.exec(e);for(;r;)boe(t,r),e=e.substring(r[0].length).trim(),r=jq.exec(e);return t}function boe(n,t){let e=voe(t[1]),r=kh[t[2].toLowerCase()];n[r]=e}var ea,kE,wE,zd,bE,TE,kh,yoe,SE,vE,Lv,Hq,jq,Ud,ta=b(()=>{$e();Yt();ea={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},kE={\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},wE={\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},zd={...wE,\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},bE={\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},TE={\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},kh={\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"},yoe=`(?:${X(bE)}|[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})`;SE=`(?:${X(TE)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;vE="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?",Lv=`(?:[1-9][0-9]{0,3}${vE}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${vE}|[5-9][0-9]${vE})`;Hq=`(${yoe})\\s{0,3}(${X(kh)})`,jq=new RegExp(Hq,"i"),Ud=dn("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Hq)});var zq,wh,Uq=b(()=>{ta();Ne();se();zq=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ud})${ea.rightBoundary}`,wh=class extends j{patternLeftBoundary(){return ea.leftBoundary}innerPattern(t){return t.option.forwardDate?new RegExp(zq,ea.flags):new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${zq}`,ea.flags)}innerExtract(t,e){let r=Wd(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var Xl,En,Ts=b(()=>{se();ta();Xl=class extends j{patternLeftBoundary(){return ea.leftBoundary}innerPattern(t){return new RegExp(this.innerPatternString(t),ea.flags)}innerPatternHasChange(t,e){return!1}},En=class extends Xl{innerPattern(t){return new RegExp(`${this.innerPatternString(t)}${ea.rightBoundary}`,ea.flags)}}});var Wq,qq,Toe,Vq,Sh,$q=b(()=>{Yt();ta();ta();ta();$e();Ts();Wq=1,qq=2,Toe=3,Vq=4,Sh=class extends En{innerPatternString(t){return`(?:\u0441)?\\s*(${SE})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${SE}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${X(zd)})(?:(?:-|\\/|,?\\s{0,3})(${Lv}(?![^\\s]\\d)))?`}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=zd[e[Toe].toLowerCase()],i=DE(e[Wq]);if(i>31)return e.index=e.index+e[Wq].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[Vq]){let s=Bv(e[Vq]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[qq]){let s=DE(e[qq]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var koe,Yq,Dh,Gq=b(()=>{ta();Yt();$e();ta();Ts();koe=2,Yq=3,Dh=class extends Xl{innerPatternString(t){return`((?:\u0432)\\s*)?(${X(zd)})\\s*(?:[,-]?\\s*(${Lv})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(t,e){let r=e[koe].toLowerCase();if(e[0].length<=3&&!wE[r])return null;let a=t.createParsingResult(e.index,e.index+e[0].length);a.start.imply("day",1);let i=zd[r];if(a.start.assign("month",i),e[Yq]){let s=Bv(e[Yq]);a.start.assign("year",s)}else{let s=lt(t.refDate,1,i);a.start.imply("year",s)}return a}}});var Eh,Kq=b(()=>{Ze();fs();ta();Eh=class extends Er{constructor(t){super(t)}patternFlags(){return ea.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))?(?!\\/)${ea.rightBoundary}`}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",O.PM)):a<6&&r.assign("meridiem",O.AM)}if(e[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){r.assign("meridiem",O.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("\u0443\u0442\u0440\u0430")&&(r.assign("meridiem",O.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}}});var xh,Qq=b(()=>{ta();Ne();Jn();Ts();xh=class extends Xl{innerPatternString(t){return`(${Ud})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`}innerExtract(t,e){let r=Wd(e[1]),a=ir(r);return G.createRelativeFromReference(t.reference,a)}}});var Ch,Zq=b(()=>{wa();Ch=class extends _t{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}}});var Ph,Jq=b(()=>{Sa();Ph=class extends Nt{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}}});var Mh,Xq=b(()=>{Zn();Ts();Mh=class extends En{innerPatternString(t){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(t,e){let r=e[1].toLowerCase(),a=t.createParsingComponents();switch(r){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return xr(t.reference);case"\u0432\u0447\u0435\u0440\u0430":return Gr(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Kr(t.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ti(t.reference,2);case"\u043F\u043E\u0441\u043B\u0435\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ti(t.reference,3);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Fl(t.reference,2);case"\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Fl(t.reference,3)}return a}}});var eV,Ah,tV=b(()=>{Zn();Kn();eV=Ie(nt(),1);Ts();Ah=class extends En{innerPatternString(t){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(t,e){let r=(0,eV.default)(t.refDate),a=e[0].toLowerCase(),i=t.createParsingComponents();if(a==="\u0441\u0435\u0439\u0447\u0430\u0441")return Yr(t.reference);if(a==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||a==="\u0432\u0435\u0447\u0435\u0440\u0430")return Cd(t.reference);if(a.endsWith("\u0443\u0442\u0440\u043E\u043C")||a.endsWith("\u0443\u0442\u0440\u0430"))return Pd(t.reference);if(a.match(/в\s*полдень/))return Md(t.reference);if(a.match(/прошлой\s*ночью/))return lv(t.reference);if(a.match(/прошлым\s*вечером/))return cv(t.reference);if(a.match(/следующей\s*ночью/)){let s=r.hour()<22?1:2;r=r.add(s,"day"),xt(i,r),i.imply("hour",0)}return a.match(/в\s*полночь/)||a.endsWith("\u043D\u043E\u0447\u044C\u044E")?Ol(t.reference):i}}});var woe,Soe,Doe,Ih,rV=b(()=>{ta();$e();Xa();Ts();woe=1,Soe=2,Doe=3,Ih=class extends En{innerPatternString(t){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*)?(${X(kE)})(?:\\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(t,e){let r=e[Soe].toLowerCase(),a=kE[r],i=e[woe],s=e[Doe],o=i||s;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"),sr(t.reference,a,l)}}});var nV,Eoe,xoe,_h,aV=b(()=>{ta();Ne();nV=Ie(nt(),1);$e();Ts();Eoe=1,xoe=2,_h=class extends En{innerPatternString(t){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*(${X(kh)})`}innerExtract(t,e){let r=e[Eoe].toLowerCase(),a=e[xoe].toLowerCase(),i=kh[a];if(r=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||r=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let l={};return l[i]=1,G.createRelativeFromReference(t.reference,l)}if(r=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||r=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let l={};return l[i]=-1,G.createRelativeFromReference(t.reference,l)}let s=t.createParsingComponents(),o=(0,nV.default)(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var Nh,iV=b(()=>{ta();Ne();Jn();Ts();Nh=class extends En{innerPatternString(t){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*(${Ud})`}innerExtract(t,e){let r=e[1].toLowerCase(),a=Wd(e[2]);switch(r){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":a=ir(a);break}return G.createRelativeFromReference(t.reference,a)}}});var CE={};Be(CE,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>EE,createCasualConfiguration:()=>sV,createConfiguration:()=>xE,parse:()=>Poe,parseDate:()=>Moe,strict:()=>Coe});function Poe(n,t,e){return EE.parse(n,t,e)}function Moe(n,t,e){return EE.parseDate(n,t,e)}function sV(){let n=xE(!1);return n.parsers.unshift(new Mh),n.parsers.unshift(new Ah),n.parsers.unshift(new Dh),n.parsers.unshift(new _h),n.parsers.unshift(new Nh),n}function xE(n=!0){return Ot({parsers:[new gr(!0),new wh,new Sh,new Ih,new Eh(n),new xh],refiners:[new Ph,new Ch]},n)}var EE,Coe,oV=b(()=>{Uq();$q();Gq();Kq();Qq();Zq();Jq();Qn();Xq();tV();rV();aV();Dn();Ne();Ze();vs();iV();EE=new ve(sV()),Coe=new ve(xE(!0))});function Ioe(n){let t=n.toLowerCase();return PE[t]!==void 0?PE[t]:t==="un"||t==="una"||t==="uno"?1:t.match(/algunos?/)||t.match(/unos?/)?3:t.match(/media?/)?.5:parseFloat(t)}function uV(n){if(n.match(/^[0-9]{1,4}$/)){let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}function hV(n){let t={},e=n,r=lV.exec(e);for(;r;)_oe(t,r),e=e.substring(r[0].length),r=lV.exec(e);return t}function _oe(n,t){let e=Ioe(t[1]),r=cV[t[2].toLowerCase()];n[r]=e}var ME,AE,PE,cV,Aoe,dV,pV,lV,mV,Rh=b(()=>{$e();ME={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},AE={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},PE={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},cV={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"},Aoe=`(?:${X(PE)}|[0-9]+|[0-9]+\\.[0-9]+|un?|uno?|una?|algunos?|unos?|demi-?)`;dV="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";pV=`(${Aoe})\\s{0,5}(${X(cV)})\\s{0,5}`,lV=new RegExp(pV,"i"),mV=dn("",pV)});var Noe,Roe,Foe,Ooe,Fh,fV=b(()=>{Rh();$e();se();Xa();Noe=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|pasado|pr[o\xF3]ximo)\\s*)?(${X(ME)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|pasado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),Roe=1,Foe=2,Ooe=3,Fh=class extends j{innerPattern(){return Noe}innerExtract(t,e){let r=e[Foe].toLowerCase(),a=ME[r];if(a===void 0)return null;let i=e[Roe],s=e[Ooe],o=i||s||"";o=o.toLowerCase();let l=null;return o=="pasado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this"),sr(t.reference,a,l)}}});var Oh,gV=b(()=>{fs();Oh=class extends Er{primaryPrefix(){return"(?:(?:aslas|deslas|las?|al?|de|del)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:l)?|\\?)\\s*"}}});var Lh,yV=b(()=>{Sa();Lh=class extends Nt{patternBetween(){return new RegExp("^\\s*(?:,|de|aslas|a)?\\s*$")}}});var Bh,vV=b(()=>{wa();Bh=class extends _t{patternBetween(){return/^\s*(?:-)\s*$/i}}});var Loe,bV,TV,Boe,kV,jh,wV=b(()=>{Yt();Rh();Rh();$e();se();Loe=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*)(${X(AE)})(?:\\s*(?:de|,)?\\s*(${dV}))?(?=\\W|$)`,"i"),bV=1,TV=2,Boe=3,kV=4,jh=class extends j{innerPattern(){return Loe}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=AE[e[Boe].toLowerCase()],i=parseInt(e[bV]);if(i>31)return e.index=e.index+e[bV].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[kV]){let s=uV(e[kV]);r.start.assign("year",s)}else{let s=lt(t.refDate,i,a);r.start.imply("year",s)}if(e[TV]){let s=parseInt(e[TV]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var Hh,SV=b(()=>{se();Zn();Hh=class extends j{innerPattern(t){return/(ahora|hoy|mañana|ayer)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),a=t.createParsingComponents();switch(r){case"ahora":return Yr(t.reference);case"hoy":return xr(t.reference);case"ma\xF1ana":return Kr(t.reference);case"ayer":return Gr(t.reference)}return a}}});var DV,zh,EV=b(()=>{Ze();se();Kn();DV=Ie(nt(),1),zh=class extends j{innerPattern(){return/(?:esta\s*)?(mañana|tarde|medianoche|mediodia|mediodía|noche)(?=\W|$)/i}innerExtract(t,e){let r=(0,DV.default)(t.refDate),a=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":a.imply("meridiem",O.PM),a.imply("hour",15);break;case"noche":a.imply("meridiem",O.PM),a.imply("hour",22);break;case"ma\xF1ana":a.imply("meridiem",O.AM),a.imply("hour",6);break;case"medianoche":Za(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"mediodia":case"mediod\xEDa":a.imply("meridiem",O.AM),a.imply("hour",12);break}return a}}});var Uh,xV=b(()=>{Rh();Ne();se();Uh=class extends j{innerPattern(){return new RegExp(`(?:en|por|durante|de|dentro de)\\s*(${mV})(?=\\W|$)`,"i")}innerExtract(t,e){let r=hV(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var NE={};Be(NE,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>IE,createCasualConfiguration:()=>CV,createConfiguration:()=>_E,parse:()=>Hoe,parseDate:()=>zoe,strict:()=>joe});function Hoe(n,t,e){return IE.parse(n,t,e)}function zoe(n,t,e){return IE.parseDate(n,t,e)}function CV(n=!0){let t=_E(!1,n);return t.parsers.push(new Hh),t.parsers.push(new zh),t}function _E(n=!0,t=!0){return Ot({parsers:[new gr(t),new Fh,new Oh,new jh,new Uh],refiners:[new Lh,new Bh]},n)}var IE,joe,PV=b(()=>{Qn();Dn();Ne();Ze();vs();fV();gV();yV();vV();wV();SV();EV();xV();IE=new ve(CV()),joe=new ve(_E(!0))});function Woe(n){let t=n.toLowerCase();return FE[t]!==void 0?FE[t]:t.match(/декілька/)?2:t.match(/пів/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}function HE(n){let t=n.toLowerCase();return OE[t]!==void 0?OE[t]:parseInt(t)}function Hv(n){if(/(рік|року|р|р.)/i.test(n)&&(n=n.replace(/(рік|року|р|р.)/i,"")),/(до н.е.|до н. е.)/i.test(n))return n=n.replace(/(до н.е.|до н. е.)/i,""),-parseInt(n);if(/(н. е.|н.е.)/i.test(n))return n=n.replace(/(н. е.|н.е.)/i,""),parseInt(n);let t=parseInt(n);return wn(t)}function $d(n){let t={},e=n,r=MV.exec(e);for(;r;)qoe(t,r),e=e.substring(r[0].length).trim(),r=MV.exec(e);return t}function qoe(n,t){let e=Woe(t[1]),r=Wh[t[2].toLowerCase()];n[r]=e}var Ma,LE,BE,qd,FE,OE,Wh,Uoe,jE,RE,jv,AV,MV,Vd,ra=b(()=>{$e();Yt();Ma={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},LE={\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},BE={\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},qd={...BE,\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},FE={\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},OE={\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},Wh={\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"},Uoe=`(?:${X(FE)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u0456\u0432|\u0434\u0435\u043A\u0456\u043B\u044C\u043A\u0430|\u043F\u0430\u0440(?:\u0443)|\\s{0,3})`;jE=`(?:${X(OE)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435)?)`;RE="(?:\\s+(?:\u0440\u043E\u043A\u0443|\u0440\u0456\u043A|\u0440|\u0440.))?",jv=`(?:[1-9][0-9]{0,3}${RE}\\s*(?:\u043D.\u0435.|\u0434\u043E \u043D.\u0435.|\u043D. \u0435.|\u0434\u043E \u043D. \u0435.)|[1-2][0-9]{3}${RE}|[5-9][0-9]${RE})`;AV=`(${Uoe})\\s{0,3}(${X(Wh)})`,MV=new RegExp(AV,"i"),Vd=dn("(?:(?:\u0431\u043B\u0438\u0437\u044C\u043A\u043E|\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u043D\u043E)\\s{0,3})?",AV)});var IV,qh,_V=b(()=>{ra();Ne();se();IV=`(?:(?:\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u043D\u043E|\u043E\u0440\u0456\u0454\u043D\u0442\u043E\u0432\u043D\u043E)\\s*(?:~\\s*)?)?(${Vd})${Ma.rightBoundary}`,qh=class extends j{patternLeftBoundary(){return Ma.leftBoundary}innerPattern(t){return t.option.forwardDate?new RegExp(IV,"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*${IV}`,Ma.flags)}innerExtract(t,e){let r=$d(e[1]);return G.createRelativeFromReference(t.reference,r)}}});var ec,xn,ks=b(()=>{se();ra();ec=class extends j{patternLeftBoundary(){return Ma.leftBoundary}innerPattern(t){return new RegExp(this.innerPatternString(t),Ma.flags)}innerPatternHasChange(t,e){return!1}},xn=class extends ec{innerPattern(t){return new RegExp(`${this.innerPatternString(t)}${Ma.rightBoundary}`,Ma.flags)}}});var NV,RV,Voe,FV,Vh,OV=b(()=>{Yt();ra();ra();ra();$e();ks();NV=1,RV=2,Voe=3,FV=4,Vh=class extends xn{innerPatternString(t){return`(?:\u0437|\u0456\u0437)?\\s*(${jE})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${jE}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${X(qd)})(?:(?:-|\\/|,?\\s{0,3})(${jv}(?![^\\s]\\d)))?`}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),a=qd[e[Voe].toLowerCase()],i=HE(e[NV]);if(i>31)return e.index=e.index+e[NV].length,null;if(r.start.assign("month",a),r.start.assign("day",i),e[FV]){let s=Hv(e[FV]);r.start.assign("year",s)}else{let s=lt(t.reference.instant,i,a);r.start.imply("year",s)}if(e[RV]){let s=HE(e[RV]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var $oe,LV,$h,BV=b(()=>{ra();Yt();$e();ra();ks();$oe=2,LV=3,$h=class extends ec{innerPatternString(t){return`((?:\u0432|\u0443)\\s*)?(${X(qd)})\\s*(?:[,-]?\\s*(${jv})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(t,e){let r=e[$oe].toLowerCase();if(e[0].length<=3&&!BE[r])return null;let a=t.createParsingResult(e.index,e.index+e[0].length);a.start.imply("day",1);let i=qd[r];if(a.start.assign("month",i),e[LV]){let s=Hv(e[LV]);a.start.assign("year",s)}else{let s=lt(t.reference.instant,1,i);a.start.imply("year",s)}return a}}});var Yh,jV=b(()=>{Ze();fs();ra();Yh=class extends Er{constructor(t){super(t)}patternFlags(){return Ma.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))?(?!\\/)${Ma.rightBoundary}`}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("\u0432\u0435\u0447\u043E\u0440\u0430")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",O.PM)):a<6&&r.assign("meridiem",O.AM)}if(e[0].endsWith("\u043F\u043E \u043E\u0431\u0456\u0434\u0456")||e[0].endsWith("\u043F\u0456\u0441\u043B\u044F \u043E\u0431\u0456\u0434\u0443")){r.assign("meridiem",O.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("\u0440\u0430\u043D\u043A\u0443")&&(r.assign("meridiem",O.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}}});var Gh,HV=b(()=>{ra();Ne();Jn();ks();Gh=class extends ec{innerPatternString(t){return`(${Vd})\\s{0,5}\u0442\u043E\u043C\u0443(?=(?:\\W|$))`}innerExtract(t,e){let r=$d(e[1]),a=ir(r);return G.createRelativeFromReference(t.reference,a)}}});var Kh,zV=b(()=>{wa();Kh=class extends _t{patternBetween(){return/^\s*(і до|і по|до|по|-)\s*$/i}}});var Qh,UV=b(()=>{Sa();Qh=class extends Nt{patternBetween(){return new RegExp("^\\s*(T|\u0432|\u0443|\u043E|,|-)?\\s*$")}}});var Zh,WV=b(()=>{Zn();ks();Zh=class extends xn{innerPatternString(t){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(t,e){let r=e[1].toLowerCase(),a=t.createParsingComponents();switch(r){case"\u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456":return xr(t.reference);case"\u0432\u0447\u043E\u0440\u0430":return Gr(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Kr(t.reference);case"\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430":return Ti(t.reference,2);case"\u043F\u0456\u0441\u043B\u044F\u043F\u0456\u0441\u043B\u044F\u0437\u0430\u0432\u0442\u0440\u0430":return Ti(t.reference,3);case"\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430":return Fl(t.reference,2);case"\u043F\u043E\u0437\u0430\u043F\u043E\u0437\u0430\u0432\u0447\u043E\u0440\u0430":return Fl(t.reference,3)}return a}}});var qV,Jh,VV=b(()=>{Zn();Kn();qV=Ie(nt(),1);ks();Jh=class extends xn{innerPatternString(t){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(t,e){let r=(0,qV.default)(t.reference.instant),a=e[0].toLowerCase(),i=t.createParsingComponents();if(a==="\u0437\u0430\u0440\u0430\u0437")return Yr(t.reference);if(a==="\u0432\u0432\u0435\u0447\u0435\u0440\u0456"||a==="\u0432\u0435\u0447\u043E\u0440\u0430")return Cd(t.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 Pd(t.reference);if(a.endsWith("\u043E\u043F\u0456\u0432\u0434\u043D\u0456"))return Md(t.reference);if(a.match(/минулої\s*ночі/))return lv(t.reference);if(a.match(/минулого\s*вечора/))return cv(t.reference);if(a.match(/наступної\s*ночі/)){let s=r.hour()<22?1:2;r=r.add(s,"day"),xt(i,r),i.imply("hour",1)}return a.match(/цієї\s*ночі/)?Ol(t.reference):a.endsWith("\u043E\u043F\u0456\u0432\u043D\u043E\u0447\u0456")||a.endsWith("\u0432\u043D\u043E\u0447\u0456")?Ol(t.reference):i}}});var Yoe,Goe,Koe,Xh,$V=b(()=>{ra();$e();Xa();ks();Yoe=1,Goe=2,Koe=3,Xh=class extends xn{innerPatternString(t){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*)?(${X(LE)})(?:\\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(t,e){let r=e[Goe].toLocaleLowerCase(),a=LE[r],i=e[Yoe],s=e[Koe],o=i||s;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"),sr(t.reference,a,l)}}});var YV,Qoe,Zoe,ef,GV=b(()=>{ra();Ne();YV=Ie(nt(),1);$e();ks();Qoe=1,Zoe=2,ef=class extends xn{innerPatternString(t){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*(${X(Wh)})(?=\\s*)`}innerExtract(t,e){let r=e[Qoe].toLowerCase(),a=e[Zoe].toLowerCase(),i=Wh[a];if(r=="\u043D\u0430 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||r=="\u0432 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||r=="\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u043C\u0443"||r=="\u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E"){let l={};return l[i]=1,G.createRelativeFromReference(t.reference,l)}if(r=="\u043D\u0430 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||r=="\u0432 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||r=="\u0443 \u043C\u0438\u043D\u0443\u043B\u043E\u043C\u0443"||r=="\u043C\u0438\u043D\u0443\u043B\u043E\u0433\u043E"){let l={};return l[i]=-1,G.createRelativeFromReference(t.reference,l)}let s=t.createParsingComponents(),o=(0,YV.default)(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var tf,KV=b(()=>{ra();Ne();Jn();ks();tf=class extends xn{innerPatternString(t){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*(${Vd})`}innerExtract(t,e){let r=e[1].toLowerCase(),a=$d(e[3]);switch(r){case"\u043E\u0441\u0442\u0430\u043D\u043D\u0456":case"\u043C\u0438\u043D\u0443\u043B\u0456":case"-":a=ir(a);break}return G.createRelativeFromReference(t.reference,a)}}});var WE={};Be(WE,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>zE,createCasualConfiguration:()=>QV,createConfiguration:()=>UE,parse:()=>Xoe,parseDate:()=>ele,strict:()=>Joe});function QV(){let n=UE(!1);return n.parsers.unshift(new Zh),n.parsers.unshift(new Jh),n.parsers.unshift(new $h),n.parsers.unshift(new ef),n.parsers.unshift(new tf),n}function UE(n){return Ot({parsers:[new ys,new gr(!0),new qh,new Vh,new Xh,new Yh(n),new Gh],refiners:[new Qh,new Kh]},n)}function Xoe(n,t,e){return zE.parse(n,t,e)}function ele(n,t,e){return zE.parseDate(n,t,e)}var zE,Joe,ZV=b(()=>{_V();OV();BV();jV();HV();zV();UV();Qn();WV();VV();$V();GV();Dn();Ne();Ze();vs();KV();ov();zE=new ve(QV()),Joe=new ve(UE(!0))});var zv={};Be(zv,{Chrono:()=>ve,Meridiem:()=>O,ParsingComponents:()=>G,ParsingContext:()=>gm,ParsingResult:()=>et,ReferenceWithTimezone:()=>at,Weekday:()=>we,casual:()=>qE,de:()=>gD,en:()=>oD,es:()=>NE,fr:()=>xD,ja:()=>AD,nl:()=>WD,parse:()=>rle,parseDate:()=>nle,pt:()=>FD,ru:()=>CE,strict:()=>tle,uk:()=>WE,zh:()=>yE});function rle(n,t,e){return qE.parse(n,t,e)}function nle(n,t,e){return qE.parseDate(n,t,e)}var tle,qE,JV=b(()=>{dW();Dn();Ne();Ze();FW();i2();T2();F2();cq();Bq();oV();PV();ZV();tle=sD,qE=ym});var Yd,VE=b(()=>{Yd=class{constructor(t,e=[]){this.config=t,this.userFields=e,this.triggerMap=new Map,this.propertyMap=new Map,this.buildMaps()}buildMaps(){this.triggerMap.clear(),this.propertyMap.clear();for(let t of this.config.triggers)t.enabled&&(this.triggerMap.set(t.trigger,t),this.propertyMap.set(t.propertyId,t))}getTriggerForProperty(t){return this.propertyMap.get(t)}getPropertyForTrigger(t){var e;return(e=this.triggerMap.get(t))==null?void 0:e.propertyId}getAllEnabledTriggers(){return this.config.triggers.filter(t=>t.enabled)}getTriggersOrderedByLength(){return this.getAllEnabledTriggers().sort((t,e)=>e.trigger.length-t.trigger.length)}usesNativeTagSuggester(){let t=this.getTriggerForProperty("tags");return(t==null?void 0:t.trigger)==="#"&&(t==null?void 0:t.enabled)}getTagTrigger(){let t=this.getTriggerForProperty("tags");return t!=null&&t.enabled?t.trigger:void 0}getContextTrigger(){let t=this.getTriggerForProperty("contexts");return t!=null&&t.enabled?t.trigger:void 0}getProjectTrigger(){let t=this.getTriggerForProperty("projects");return t!=null&&t.enabled?t.trigger:void 0}getStatusTrigger(){let t=this.getTriggerForProperty("status");return t!=null&&t.enabled?t.trigger:void 0}getPriorityTrigger(){let t=this.getTriggerForProperty("priority");return t!=null&&t.enabled?t.trigger:void 0}getUserField(t){return this.userFields.find(e=>e.id===t)}isUserField(t){return this.userFields.some(e=>e.id===t)}getSuggesterType(t){if(t==="tags")return this.usesNativeTagSuggester()?"native-tag":"list";if(t==="contexts")return"list";if(t==="projects")return"file";if(t==="status")return"status";if(t==="priority")return"priority";let e=this.getUserField(t);if(e)switch(e.type){case"text":return e.autosuggestFilter?"file":"list";case"list":return"list";case"boolean":return"boolean";default:return"none"}return"none"}updateConfig(t){this.config=t,this.buildMaps()}updateUserFields(t){this.userFields=t}}});var na,Gd=b(()=>{rr();JV();_S();pS();VE();na=class n{constructor(t=[],e=[],r=!0,a="en",i,s){this.isValidDateString=t=>/^\d{4}-\d{2}-\d{2}$/.test(t);this.isValidTimeString=t=>/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(t);this.escapeRegex=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.cleanupWhitespace=t=>t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").trim();this.defaultToScheduled=r,this.languageConfig=KH(a),this.statusConfigs=t,this.priorityConfigs=e;let o=i||(()=>{let{DEFAULT_NLP_TRIGGERS:l}=(to(),Wa(jw));return l})();this.triggerConfig=new Yd(o,s||[]),this.boundaries=this.createBoundaryConfig(),this.priorityPatterns=this.buildPriorityPatterns(e),this.statusPatterns=this.buildFallbackStatusPatterns(),this.recurrencePatterns=this.buildRecurrencePatterns(),this.processingPipeline=this.buildProcessingPipeline()}static fromPlugin(t){let e=t.settings;return new n(e.customStatuses,e.customPriorities,e.nlpDefaultToScheduled,e.nlpLanguage,e.nlpTriggers,e.userFields)}createBoundaryConfig(){let t=["ru","zh","ja","uk","fr"].includes(this.languageConfig.code);return{boundary:t?"(?:^|\\s)":"\\b",endBoundary:t?"(?=\\s|$)":"\\b",isNonAscii:t}}getChronoParser(){let t=this.languageConfig.chronoLocale;return zv[t]||zv}buildProcessingPipeline(){return[{name:"extractTags",process:(t,e)=>this.extractTags(t,e)},{name:"extractContexts",process:(t,e)=>this.extractContexts(t,e)},{name:"extractProjects",process:(t,e)=>this.extractProjects(t,e)},{name:"extractPriority",process:(t,e)=>this.extractPriority(t,e)},{name:"extractStatus",process:(t,e)=>this.extractStatus(t,e)},{name:"extractRecurrence",process:(t,e)=>this.extractRecurrence(t,e)},{name:"extractTimeEstimate",process:(t,e)=>this.extractTimeEstimate(t,e)},{name:"extractUserFields",process:(t,e)=>this.extractUserFields(t,e)},{name:"parseUnifiedDatesAndTimes",process:(t,e)=>this.parseUnifiedDatesAndTimes(t,e)}]}parseInput(t){let e={title:"",tags:[],contexts:[],projects:[]},[r,a]=this.extractTitleAndDetails(t);a&&(e.details=a);let i=r;for(let s of this.processingPipeline)try{i=s.process(i,e)}catch(o){console.debug(`Error in processor ${s.name}:`,o)}return e.title=i.trim(),this.validateAndCleanupResult(e)}extractTitleAndDetails(t){let e=t.trim(),r=e.indexOf(` +`);if(r!==-1){let a=e.substring(0,r).trim(),i=e.substring(r+1).trim();return[a,i]}return[e,void 0]}extractTags(t,e){let r=this.triggerConfig.getTagTrigger();if(!r)return t;let a=this.escapeRegex(r),i=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),s=t.match(i);return s?(e.tags.push(...s.map(o=>o.substring(r.length))),this.cleanupWhitespace(t.replace(i,""))):t}extractContexts(t,e){let r=this.triggerConfig.getContextTrigger();if(!r)return t;let a=this.escapeRegex(r),i=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),s=t.match(i);return s?(e.contexts.push(...s.map(o=>o.substring(r.length))),this.cleanupWhitespace(t.replace(i,""))):t}extractProjects(t,e){let r=this.triggerConfig.getProjectTrigger();if(!r)return t;let a=t,i=this.escapeRegex(r),s=new RegExp(`${i}\\[\\[.*?\\]\\]`,"g"),o=a.match(s);o&&(e.projects.push(...o.map(d=>d.slice(r.length))),a=this.cleanupWhitespace(a.replace(s,"")));let l=new RegExp(`${i}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),c=a.match(l);return c&&(e.projects.push(...c.map(d=>d.substring(r.length))),a=this.cleanupWhitespace(a.replace(l,""))),a}extractUserFields(t,e){let r=t,a=this.triggerConfig.getAllEnabledTriggers().filter(i=>this.triggerConfig.isUserField(i.propertyId));for(let i of a){let s=this.triggerConfig.getUserField(i.propertyId);if(!s)continue;let o=this.escapeRegex(i.trigger);if(s.type==="list"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"gu"),c=[],d;for(;(d=l.exec(r))!==null;){let u=d[1]||d[2];c.push(u)}c.length>0&&(e.userFields||(e.userFields={}),e.userFields[s.id]=c,r=this.cleanupWhitespace(r.replace(l,"")))}else if(s.type==="text"||s.type==="boolean"||s.type==="number"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=r.match(l);if(c){let d=c[1]||c[2];e.userFields||(e.userFields={}),s.type==="boolean"?e.userFields[s.id]=d.toLowerCase()==="true"?"true":"false":e.userFields[s.id]=d,r=this.cleanupWhitespace(r.replace(l,""))}}else if(s.type==="date"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=r.match(l);if(c){let d=c[1]||c[2];e.userFields||(e.userFields={}),e.userFields[s.id]=d,r=this.cleanupWhitespace(r.replace(l,""))}}}return r}buildPriorityPatterns(t){if(t.length>0)return t.flatMap(s=>[{regex:new RegExp(`\\b${this.escapeRegex(s.value)}\\b`,"i"),value:s.value},{regex:new RegExp(`\\b${this.escapeRegex(s.label)}\\b`,"i"),value:s.value}]);let e=[],r=this.languageConfig.fallbackPriority,{boundary:a,endBoundary:i}=this.boundaries;return e.push({regex:new RegExp(`${a}(${r.urgent.map(s=>this.escapeRegex(s)).join("|")})${i}`,"i"),value:"urgent"}),e.push({regex:new RegExp(`${a}(${r.high.map(s=>this.escapeRegex(s)).join("|")})${i}`,"i"),value:"high"}),e.push({regex:new RegExp(`${a}(${r.normal.map(s=>this.escapeRegex(s)).join("|")})${i}`,"i"),value:"normal"}),e.push({regex:new RegExp(`${a}(${r.low.map(s=>this.escapeRegex(s)).join("|")})${i}`,"i"),value:"low"}),e}extractPriority(t,e){if(this.priorityConfigs.length>0){let a=[...this.priorityConfigs].sort((o,l)=>l.label.length-o.label.length),i=this.triggerConfig.getTriggerForProperty("priority"),s=i!=null&&i.enabled?i.trigger:"";for(let o of a){let l=[o.label,o.value];for(let c of l){if(!c||c.trim()==="")continue;if(s){let u=s+c,p=this.findTextMatch(t,u);if(p)return e.priority=o.value,this.cleanupWhitespace(t.replace(p.fullMatch,""))}let d=this.findTextMatch(t,c);if(d)return e.priority=o.value,this.cleanupWhitespace(t.replace(d.fullMatch,""))}}return t}let r=null;for(let a of this.priorityPatterns){let i=t.match(a.regex);i&&i.index!==void 0&&(!r||i.index0)return[];let t=this.languageConfig.fallbackStatus,{boundary:e,endBoundary:r}=this.boundaries;return[{regex:new RegExp(`${e}(${t.open.map(a=>this.escapeRegex(a)).join("|")})${r}`,"i"),value:"open"},{regex:new RegExp(`${e}(${t.inProgress.map(a=>this.escapeRegex(a)).join("|")})${r}`,"i"),value:"in-progress"},{regex:new RegExp(`${e}(${t.done.map(a=>this.escapeRegex(a)).join("|")})${r}`,"i"),value:"done"},{regex:new RegExp(`${e}(${t.cancelled.map(a=>this.escapeRegex(a)).join("|")})${r}`,"i"),value:"cancelled"},{regex:new RegExp(`${e}(${t.waiting.map(a=>this.escapeRegex(a)).join("|")})${r}`,"i"),value:"waiting"}]}extractStatus(t,e){if(this.statusConfigs.length>0){let r=[...this.statusConfigs].sort((s,o)=>o.label.length-s.label.length),a=this.triggerConfig.getTriggerForProperty("status"),i=a!=null&&a.enabled?a.trigger:"";for(let s of r){let o=[s.label,s.value];for(let l of o){if(!l||l.trim()==="")continue;if(i){let d=i+l,u=this.findTextMatch(t,d);if(u)return e.status=s.value,this.cleanupWhitespace(t.replace(u.fullMatch,""))}let c=this.findTextMatch(t,l);if(c)return e.status=s.value,this.cleanupWhitespace(t.replace(c.fullMatch,""))}}return t}for(let r of this.statusPatterns)if(r.regex.test(t))return e.status=r.value,this.cleanupWhitespace(t.replace(r.regex,""));return t}findTextMatch(t,e){if(!e||e.trim()==="")return null;let r=t.toLowerCase(),a=e.toLowerCase(),i=0;for(;;){let s=r.indexOf(a,i);if(s===-1)break;let o=s>0?t[s-1]:" ",l=s+e.length,c=lthis.escapeRegex(T)).join("|")})`,"i")},{type:"scheduled",regex:new RegExp(`\\b(${o.scheduled.map(T=>this.escapeRegex(T)).join("|")})`,"i")}];for(let T of l){let k=r.match(T.regex);if(k){let w=(k.index||0)+k[0].length,S=r.substring(w),x=this.parseChronoFromPosition(S);if(x.success)return T.type==="due"?(e.dueDate=x.date,x.time&&(e.dueTime=x.time)):(e.scheduledDate=x.date,x.time&&(e.scheduledTime=x.time)),r=r.replace(T.regex,""),x.matchedText&&(r=r.replace(x.matchedText,"")),r=this.cleanupWhitespace(r),r}}let c=s.parse(t,new Date,{forwardDate:!0});if(c.length===0)return t;let d=c[0],u=d.text,p=d.start.date(),m=(a=d.end)==null?void 0:a.date(),h=new RegExp(`\\b(${o.due.map(T=>this.escapeRegex(T)).join("|")})\\b`,"i"),f=new RegExp(`\\b(${o.scheduled.map(T=>this.escapeRegex(T)).join("|")})\\b`,"i"),g=h.test(d.text),v=f.test(d.text);if(m&&wr(m)&&m.getTime()!==p.getTime())e.scheduledDate=M(p,"yyyy-MM-dd"),d.start.isCertain("hour")&&(e.scheduledTime=M(p,"HH:mm")),e.dueDate=M(m,"yyyy-MM-dd"),(i=d.end)!=null&&i.isCertain("hour")&&(e.dueTime=M(m,"HH:mm"));else if(wr(p)){let T=M(p,"yyyy-MM-dd"),k=d.start.isCertain("hour")?M(p,"HH:mm"):void 0;g&&!v?(e.dueDate=T,e.dueTime=k):v&&!g||this.defaultToScheduled?(e.scheduledDate=T,e.scheduledTime=k):(e.dueDate=T,e.dueTime=k)}r=r.replace(u,"").trim(),r=this.cleanupWhitespace(r)}catch(s){console.debug("Error in unified date parsing:",s)}return r}parseChronoFromPosition(t){try{let r=this.getChronoParser().parse(t,new Date,{forwardDate:!0});if(r.length>0){let a=r[0];if(a.index<=3){let i=a.start.date();if(wr(i)){let s={success:!0,date:M(i,"yyyy-MM-dd"),matchedText:a.text};return a.start.isCertain("hour")&&(s.time=M(i,"HH:mm")),s}}}}catch(e){console.debug("Error parsing date with chrono:",e)}return{success:!1}}buildRecurrencePatterns(){let t=this.languageConfig.recurrence,e=[],{boundary:r,endBoundary:a}=this.boundaries,i=s=>s.map(o=>this.escapeRegex(o)).join("|");return e.push(...this.buildOrdinalWeekdayPatterns(t,r,a,i)),e.push(...this.buildIntervalPatterns(t,r,a,i)),e.push(...this.buildEveryOtherPatterns(t,r,a,i)),e.push(...this.buildWeekdayPatterns(t,r,a,i)),e.push(...this.buildFrequencyPatterns(t,r,a,i)),e}buildOrdinalWeekdayPatterns(t,e,r,a){let i=a(t.every),s=a([...t.ordinals.first,...t.ordinals.second,...t.ordinals.third,...t.ordinals.fourth,...t.ordinals.last]),o=a([...t.weekdays.monday,...t.weekdays.tuesday,...t.weekdays.wednesday,...t.weekdays.thursday,...t.weekdays.friday,...t.weekdays.saturday,...t.weekdays.sunday]);return[{regex:new RegExp(`${e}(${i})\\s+(${s})\\s+(${o})${r}`,"i"),handler:l=>{let c=l[2].toLowerCase(),d=l[3].toLowerCase(),u=1;return t.ordinals.second.some(m=>m.toLowerCase()===c)?u=2:t.ordinals.third.some(m=>m.toLowerCase()===c)?u=3:t.ordinals.fourth.some(m=>m.toLowerCase()===c)?u=4:t.ordinals.last.some(m=>m.toLowerCase()===c)&&(u=-1),`FREQ=MONTHLY;BYDAY=${this.getWeekdayRRuleCode(d,t)};BYSETPOS=${u}`}}]}buildIntervalPatterns(t,e,r,a){let i=a(t.every),s=a([...t.periods.day,...t.periods.week,...t.periods.month,...t.periods.year]);return[{regex:new RegExp(`${e}(${i})\\s+(\\d+)\\s+(${s})${r}`,"i"),handler:o=>{let l=parseInt(o[2]),c=o[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,t)};INTERVAL=${l}`}}]}buildEveryOtherPatterns(t,e,r,a){let i=a(t.every),s=a(t.other),o=a([...t.periods.day,...t.periods.week,...t.periods.month,...t.periods.year]);return[{regex:new RegExp(`${e}(${i})\\s+(${s})\\s+(${o})${r}`,"i"),handler:l=>{let c=l[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,t)};INTERVAL=2`}}]}buildWeekdayPatterns(t,e,r,a){let i=a(t.every),s=a([...t.weekdays.monday,...t.weekdays.tuesday,...t.weekdays.wednesday,...t.weekdays.thursday,...t.weekdays.friday,...t.weekdays.saturday,...t.weekdays.sunday]),o=a([...t.pluralWeekdays.monday,...t.pluralWeekdays.tuesday,...t.pluralWeekdays.wednesday,...t.pluralWeekdays.thursday,...t.pluralWeekdays.friday,...t.pluralWeekdays.saturday,...t.pluralWeekdays.sunday]);return[{regex:new RegExp(`${e}(${i})\\s+(${s})${r}`,"i"),handler:l=>{let c=l[2].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getWeekdayRRuleCode(c,t)}`}},{regex:new RegExp(`${e}(${o})${r}`,"i"),handler:l=>{let c=l[1].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getPluralWeekdayRRuleCode(c,t)}`}}]}buildFrequencyPatterns(t,e,r,a){return[{regex:new RegExp(`${e}(${a(t.frequencies.daily)})${r}`,"i"),handler:()=>"FREQ=DAILY"},{regex:new RegExp(`${e}(${a(t.frequencies.weekly)})${r}`,"i"),handler:()=>"FREQ=WEEKLY"},{regex:new RegExp(`${e}(${a(t.frequencies.monthly)})${r}`,"i"),handler:()=>"FREQ=MONTHLY"},{regex:new RegExp(`${e}(${a(t.frequencies.yearly)})${r}`,"i"),handler:()=>"FREQ=YEARLY"}]}getPeriodFrequency(t,e){return e.periods.week.some(r=>r.toLowerCase()===t)?"WEEKLY":e.periods.month.some(r=>r.toLowerCase()===t)?"MONTHLY":e.periods.year.some(r=>r.toLowerCase()===t)?"YEARLY":"DAILY"}getWeekdayRRuleCode(t,e){return e.weekdays.tuesday.some(r=>r.toLowerCase()===t)?"TU":e.weekdays.wednesday.some(r=>r.toLowerCase()===t)?"WE":e.weekdays.thursday.some(r=>r.toLowerCase()===t)?"TH":e.weekdays.friday.some(r=>r.toLowerCase()===t)?"FR":e.weekdays.saturday.some(r=>r.toLowerCase()===t)?"SA":e.weekdays.sunday.some(r=>r.toLowerCase()===t)?"SU":"MO"}getPluralWeekdayRRuleCode(t,e){return e.pluralWeekdays.tuesday.some(r=>r.toLowerCase()===t)?"TU":e.pluralWeekdays.wednesday.some(r=>r.toLowerCase()===t)?"WE":e.pluralWeekdays.thursday.some(r=>r.toLowerCase()===t)?"TH":e.pluralWeekdays.friday.some(r=>r.toLowerCase()===t)?"FR":e.pluralWeekdays.saturday.some(r=>r.toLowerCase()===t)?"SA":e.pluralWeekdays.sunday.some(r=>r.toLowerCase()===t)?"SU":"MO"}extractRecurrence(t,e){for(let r of this.recurrencePatterns){let a=t.match(r.regex);if(a){let i=r.handler(a);if(this.isValidRRuleString(i))return e.recurrence=i,this.cleanupWhitespace(t.replace(r.regex,""))}}return t}isValidRRuleString(t){if(t.includes("BYDAY=undefined")||t.includes("BYDAY=;")||t.includes("BYDAY=")){let e=t.match(/BYDAY=([^;]*)/);if(e&&(!e[1]||e[1]==="undefined"||e[1].trim()===""))return!1}return!!t.includes("FREQ=")}extractTimeEstimate(t,e){let r=this.languageConfig.timeEstimate,{boundary:a,endBoundary:i}=this.boundaries,s=[{regex:new RegExp(`${a}(\\d+)(${r.hours.map(c=>this.escapeRegex(c)).join("|")})\\s*(\\d+)(${r.minutes.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])*60+parseInt(c[3])},{regex:new RegExp(`${a}(\\d+)\\s*(${r.hours.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])*60},{regex:new RegExp(`${a}(\\d+)\\s*(${r.minutes.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])}],o=t,l=0;for(let c of s){let d=o.match(c.regex);d&&(l+=c.handler(d),o=this.cleanupWhitespace(o.replace(c.regex,"")))}return l>0&&(e.estimate=l),o}validateAndCleanupResult(t){return t.title.trim()||(t.title="Untitled Task"),t.tags=[...new Set(t.tags.filter(Boolean))],t.contexts=[...new Set(t.contexts.filter(Boolean))],t.projects=[...new Set(t.projects.filter(Boolean))],t.dueDate&&!this.isValidDateString(t.dueDate)&&delete t.dueDate,t.scheduledDate&&!this.isValidDateString(t.scheduledDate)&&delete t.scheduledDate,t.dueTime&&!this.isValidTimeString(t.dueTime)&&delete t.dueTime,t.scheduledTime&&!this.isValidTimeString(t.scheduledTime)&&delete t.scheduledTime,t}getPreviewData(t){let e=[];if(t.title&&e.push({icon:"edit-3",text:`"${t.title}"`}),t.details&&e.push({icon:"file-text",text:`Details: "${t.details.substring(0,50)}${t.details.length>50?"...":""}"`}),t.dueDate){let r=t.dueTime?`${t.dueDate} at ${t.dueTime}`:t.dueDate;e.push({icon:"calendar",text:`Due: ${r}`})}if(t.scheduledDate){let r=t.scheduledTime?`${t.scheduledDate} at ${t.scheduledTime}`:t.scheduledDate;e.push({icon:"calendar-clock",text:`Scheduled: ${r}`})}if(t.priority&&e.push({icon:"alert-triangle",text:`Priority: ${t.priority}`}),t.status&&e.push({icon:"activity",text:`Status: ${t.status}`}),t.contexts&&t.contexts.length>0&&e.push({icon:"map-pin",text:`Contexts: ${t.contexts.map(r=>"@"+r).join(", ")}`}),t.projects&&t.projects.length>0){let r=t.projects.map(a=>`+${a}`).join(", ");e.push({icon:"folder",text:`Projects: ${r}`})}if(t.tags&&t.tags.length>0&&e.push({icon:"tag",text:`Tags: ${t.tags.map(r=>"#"+r).join(", ")}`}),t.recurrence){let r="Invalid recurrence";try{t.recurrence.includes("FREQ=")&&this.isValidRRuleString(t.recurrence)&&(r=ce.fromString(t.recurrence).toText())}catch(a){console.debug("Error parsing rrule for preview:",a)}e.push({icon:"repeat",text:`Recurrence: ${r}`})}if(t.estimate&&e.push({icon:"clock",text:`Estimate: ${t.estimate} min`}),t.userFields&&Object.keys(t.userFields).length>0)for(let[r,a]of Object.entries(t.userFields)){let i=this.triggerConfig.getUserField(r),s=(i==null?void 0:i.displayName)||r,o;Array.isArray(a)?o=a.join(", "):o=a,e.push({icon:"box",text:`${s}: ${o}`})}return e}getPreviewText(t){return this.getPreviewData(t).map(e=>e.text).join(" \u2022 ")}getStatusSuggestions(t,e=10){let r=t.toLowerCase();return this.statusConfigs.filter(a=>a&&typeof a.value=="string"&&typeof a.label=="string").filter(a=>a.value.trim()!==""&&a.label.trim()!=="").filter(a=>a.value.toLowerCase().includes(r)||a.label.toLowerCase().includes(r)).slice(0,e).map(a=>({value:a.value,label:a.label,display:a.label}))}}});var XV={};Be(XV,{ReminderModal:()=>ei});var Lt,ei,Kd=b(()=>{Lt=require("obsidian");Ke();ei=class extends Lt.Modal{constructor(e,r,a,i){super(e);this.selectedType="relative";this.relativeAnchor="due";this.relativeOffset=15;this.relativeUnit="minutes";this.relativeDirection="before";this.absoluteDate="";this.absoluteTime="";this.description="";this.plugin=r,this.task=a,this.reminders=a.reminders?[...a.reminders]:[],this.originalReminders=a.reminders?[...a.reminders]:[],this.onSave=i}onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("tasknotes-plugin"),e.addClass("tasknotes-reminder-modal"),e.createDiv({cls:"reminder-modal__loading"}).createEl("div",{text:"Loading reminders..."}),this.initializeWithFreshData().catch(a=>{console.error("Failed to initialize reminder modal:",a),e.empty(),e.addClass("tasknotes-plugin"),e.addClass("tasknotes-reminder-modal"),e.createDiv({cls:"reminder-modal__error",text:"Failed to load task data. Please try again."})})}async initializeWithFreshData(){let{contentEl:e}=this;if(this.task.path&&this.task.path.trim()!==""){let s=await this.plugin.cacheManager.getTaskInfo(this.task.path);s?(this.task=s,this.reminders=s.reminders?[...s.reminders]:[],this.originalReminders=s.reminders?[...s.reminders]:[]):(this.reminders=this.task.reminders?[...this.task.reminders]:[],this.originalReminders=this.task.reminders?[...this.task.reminders]:[])}else this.reminders=this.task.reminders?[...this.task.reminders]:[],this.originalReminders=this.task.reminders?[...this.task.reminders]:[];e.empty(),e.addClass("tasknotes-plugin"),e.addClass("tasknotes-reminder-modal");let r=e.createDiv({cls:"reminder-modal__header"});r.createEl("h2",{text:"Task Reminders"}),r.createDiv({cls:"reminder-modal__task-title",text:this.task.title});let a=this.getTaskContextInfo();if(a){let s=r.createDiv({cls:"reminder-modal__task-dates"});s.textContent=a}let i=e.createDiv({cls:"reminder-modal__content"});this.renderExistingReminders(i),this.renderAddReminderForm(i),this.renderActionButtons(e),this.setupKeyboardHandlers(),this.updateSaveButtonState()}renderActionButtons(e){let r=e.createDiv({cls:"reminder-modal__actions"});this.saveBtn=r.createEl("button",{text:"Save Changes",cls:"mod-cta reminder-modal__save-btn"}),this.saveBtn.disabled=!0,this.saveBtn.onclick=async()=>{await this.save()};let a=r.createEl("button",{text:"Cancel",cls:"reminder-modal__cancel-btn"});a.onclick=()=>{this.cancel()}}getTaskContextInfo(){let e=[];return this.task.due&&e.push(`Due: ${as(this.task.due)}`),this.task.scheduled&&e.push(`Scheduled: ${as(this.task.scheduled)}`),e.length>0?e.join(" \u2022 "):null}setupKeyboardHandlers(){let e=async r=>{r.key==="Enter"&&(r.ctrlKey||r.metaKey)&&!this.saveBtn.disabled?(r.preventDefault(),await this.save()):r.key==="Escape"&&(r.preventDefault(),this.cancel())};this.contentEl.addEventListener("keydown",e),this.onClose=()=>{this.contentEl.removeEventListener("keydown",e);let{contentEl:r}=this;r.empty()}}updateSaveButtonState(){if(!this.saveBtn)return;let e=this.remindersHaveChanged();this.saveBtn.disabled=!e,this.saveBtn.textContent=e?"Save Changes":"No Changes"}renderExistingReminders(e){let r=e.createDiv({cls:"reminder-modal__section"}),a=r.createDiv({cls:"reminder-modal__section-header"});if(a.createEl("h3",{text:"Current Reminders"}),this.reminders.length>0&&a.createSpan({cls:"reminder-modal__reminder-count",text:`(${this.reminders.length})`}),this.reminders.length===0){let s=r.createDiv({cls:"reminder-modal__empty-state"});(0,Lt.setIcon)(s.createDiv({cls:"reminder-modal__empty-icon"}),"bell-off"),s.createEl("div",{cls:"reminder-modal__empty-text",text:"No reminders set"});return}let i=r.createDiv({cls:"reminder-modal__reminder-list"});this.reminders.forEach((s,o)=>{let l=i.createDiv({cls:"reminder-modal__reminder-card"}),c=l.createDiv({cls:"reminder-modal__reminder-icon"}),d=s.type==="absolute"?"calendar-clock":"timer";(0,Lt.setIcon)(c,d);let u=l.createDiv({cls:"reminder-modal__reminder-content"}),p=u.createDiv({cls:"reminder-modal__reminder-primary"});if(p.textContent=this.formatReminderDisplayText(s),s.description){let f=u.createDiv({cls:"reminder-modal__reminder-description"});f.textContent=`"${s.description}"`}let h=l.createDiv({cls:"reminder-modal__reminder-actions"}).createEl("button",{cls:"reminder-modal__action-btn reminder-modal__remove-btn"});(0,Lt.setIcon)(h,"trash-2"),(0,Lt.setTooltip)(h,"Delete this reminder"),h.onclick=async f=>{f.stopPropagation(),await this.removeReminder(o)}})}formatReminderDisplayText(e){if(e.type==="absolute"){if(e.absoluteTime)try{let r=new Date(e.absoluteTime);return`${r.toLocaleDateString()} at ${r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`}catch(r){return`At ${e.absoluteTime}`}return"Absolute reminder"}else{let r=e.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(e.offset||"")} ${r}`}}renderQuickActions(e){if(!(this.task.due||this.task.scheduled))return;let i=e.createDiv({cls:"reminder-modal__quick-actions"}).createDiv({cls:"reminder-modal__quick-buttons"});[{label:"5m",fullLabel:"5 minutes before",offset:"-PT5M",icon:"clock"},{label:"15m",fullLabel:"15 minutes before",offset:"-PT15M",icon:"clock"},{label:"1h",fullLabel:"1 hour before",offset:"-PT1H",icon:"clock"},{label:"1d",fullLabel:"1 day before",offset:"-P1D",icon:"calendar"}].forEach(({label:o,fullLabel:l,offset:c,icon:d})=>{let u=this.task.due?"due":"scheduled",p=i.createEl("button",{cls:"reminder-modal__quick-btn"}),m=p.createSpan({cls:"reminder-modal__quick-btn-icon"});(0,Lt.setIcon)(m,d),p.createSpan({cls:"reminder-modal__quick-btn-label",text:o}),(0,Lt.setTooltip)(p,`Add reminder ${l} ${u} date`),p.onclick=async()=>{await this.addQuickReminder(u,c,l)}})}async addQuickReminder(e,r,a){let i={id:`rem_${Date.now()}`,type:"relative",relatedTo:e,offset:r,description:a};await this.addReminder(i),new Lt.Notice(`Added reminder: ${a}`)}renderAddReminderForm(e){let r=e.createDiv({cls:"reminder-modal__section"});r.createDiv({cls:"reminder-modal__section-header"}).createEl("h3",{text:"Add New Reminder"}),this.renderQuickActions(r);let i=r.createDiv({cls:"reminder-modal__form"}),s=i.createDiv({cls:"reminder-modal__type-selector"}),o=s.createEl("button",{cls:"reminder-modal__type-tab reminder-modal__type-tab--active",text:"Relative",attr:{"data-type":"relative"}}),l=s.createEl("button",{cls:"reminder-modal__type-tab",text:"Absolute",attr:{"data-type":"absolute"}});o.classList.toggle("reminder-modal__type-tab--active",this.selectedType==="relative"),l.classList.toggle("reminder-modal__type-tab--active",this.selectedType==="absolute");let c=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(i,this.selectedType)};o.onclick=()=>c("relative"),l.onclick=()=>c("absolute");let d=i.createDiv({cls:"relative-fields"});new Lt.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 Lt.Setting(d).setName("Direction").addDropdown(h=>{h.addOption("before","Before").addOption("after","After").setValue(this.relativeDirection).onChange(f=>{this.relativeDirection=f})}),new Lt.Setting(d).setName("Relative to").addDropdown(h=>{let f={};this.task.due&&(f.due=`Due date (${as(this.task.due)})`),this.task.scheduled&&(f.scheduled=`Scheduled date (${as(this.task.scheduled)})`),Object.keys(f).length===0?(f.none="No dates available",h.setDisabled(!0)):(Object.entries(f).forEach(([g,v])=>{h.addOption(g,v)}),h.setValue(this.relativeAnchor)),h.onChange(g=>{this.relativeAnchor=g})});let u=i.createDiv({cls:"absolute-fields"});new Lt.Setting(u).setName("Date").addText(h=>{h.setPlaceholder("YYYY-MM-DD").setValue(this.absoluteDate).onChange(f=>{this.absoluteDate=f}),h.inputEl.type="date"}),new Lt.Setting(u).setName("Time").addText(h=>{h.setPlaceholder("HH:MM").setValue(this.absoluteTime).onChange(f=>{this.absoluteTime=f}),h.inputEl.type="time"}),new Lt.Setting(i).setName("Description (optional)").addText(h=>{h.setPlaceholder("Custom reminder message").setValue(this.description).onChange(f=>{this.description=f})});let p=i.createEl("button",{cls:"reminder-add-btn"}),m=p.createSpan({cls:"reminder-add-btn-icon"});(0,Lt.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(i))}catch(h){console.error("Error adding reminder:",h),new Lt.Notice("Failed to add reminder. Please check your inputs.")}finally{p.disabled=!1,p.classList.remove("reminder-add-btn--loading")}},this.updateFormVisibility(i,this.selectedType)}updateFormVisibility(e,r){let a=e.querySelector(".relative-fields"),i=e.querySelector(".absolute-fields");r==="relative"?(a.style.display="block",i.style.display="none"):(a.style.display="none",i.style.display="block")}createReminder(e,r,a,i,s,o,l,c){let d=`rem_${Date.now()}`;if(e==="relative"){if(!(r==="due"?this.task.due:this.task.scheduled))return new Lt.Notice(`Cannot create reminder: Task has no ${r} date`),null;let p="PT";return i==="days"?p=`P${a}D`:i==="hours"?p=`PT${a}H`:p=`PT${a}M`,s==="before"&&(p="-"+p),{id:d,type:"relative",relatedTo:r,offset:p,description:c||void 0}}else{if(!o||!l)return new Lt.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(e){if(e.type==="absolute")return"Absolute reminder";{let r=e.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(e.offset||"")} ${r}`}}formatReminderDetails(e){if(e.type==="absolute")return`At ${as(e.absoluteTime||"")}`;{let r=e.relatedTo==="due"?this.task.due:this.task.scheduled;return r?`When ${e.relatedTo} date is ${as(r)}`:`Relative to ${e.relatedTo} date (not set)`}}formatReminderDescription(e){if(e.description)return e.description;if(e.type==="absolute")return`At ${as(e.absoluteTime||"")}`;{let r=e.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(e.offset||"")} ${r}`}}formatOffset(e){let r=e.startsWith("-"),i=(r?e.substring(1):e).match(/P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?)?/);if(!i)return e;let[,s,o,l]=i,c=[];if(s&&c.push(`${s} day${s!=="1"?"s":""}`),o&&c.push(`${o} hour${o!=="1"?"s":""}`),l&&c.push(`${l} minute${l!=="1"?"s":""}`),c.length===0)return"At time of";let d=c.join(" ");return r?`${d} before`:`${d} after`}async addReminder(e){this.reminders.push(e),this.refreshRemindersListOnly(),this.task.path&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.reminders],action:"added",reminder:e})}async removeReminder(e){let r=this.reminders[e];this.reminders.splice(e,1),this.refreshRemindersListOnly(),this.task.path&&r&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.reminders],action:"removed",reminder:r})}async refresh(){await this.initializeWithFreshData()}refreshRemindersListOnly(){let e=this.contentEl.querySelector(".reminder-modal__content");if(e){let r=e.querySelector(".reminder-modal__section");r&&r.remove();let a=document.createElement("div");this.renderExistingReminders(a);let i=a.firstChild;i&&e.insertBefore(i,e.firstChild)}this.updateSaveButtonState()}resetFormInputs(e){let r=e.querySelector('input[placeholder="15"]');r&&(r.value=String(this.relativeOffset));let a=e.querySelector('input[placeholder="Custom reminder message"]');a&&(a.value=this.description);let i=e.querySelector('input[type="date"]');i&&(i.value=this.absoluteDate);let s=e.querySelector('input[type="time"]');s&&(s.value=this.absoluteTime);let o=e.querySelector('.setting-item:has(input[placeholder="15"]) select');o&&(o.value=this.relativeUnit);let l=e.querySelector(".setting-item:nth-child(2) select");l&&(l.value=this.relativeDirection);let c=e.querySelector(".setting-item:nth-child(3) select");c&&(c.value=this.relativeAnchor)}async save(){var e;this.saveBtn.disabled=!0,this.saveBtn.textContent="Saving...";try{this.task.path&&this.task.path.trim()!==""&&((e=this.plugin.notificationService)==null||e.clearProcessedRemindersForTask(this.task.path));let r=this.remindersHaveChanged();this.onSave(this.reminders),r&&this.task.path&&this.plugin.emitter.trigger("reminder-changed",{taskPath:this.task.path,oldReminders:this.originalReminders,newReminders:[...this.reminders]}),this.close()}catch(r){console.error("Failed to save reminders:",r),new Lt.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((e,r)=>{let a=this.originalReminders[r];return a?e.id===a.id&&e.type===a.type&&e.relatedTo===a.relatedTo&&e.offset===a.offset&&e.absoluteTime===a.absoluteTime&&e.description===a.description:!1})}onClose(){let{contentEl:e}=this;e.empty()}}});var e$={};Be(e$,{CalendarExportService:()=>Si});var tc,Si,Uv=b(()=>{rr();tc=require("obsidian"),Si=class{static generateCalendarURL(t){let{type:e,task:r,useScheduledAsDue:a=!0}=t;switch(e){case"google":return this.generateGoogleCalendarURL(r,a);case"outlook":return this.generateOutlookCalendarURL(r,a);case"yahoo":return this.generateYahooCalendarURL(r,a);case"ics":return this.generateICSDownloadURL(r);default:throw new Error(`Unsupported calendar type: ${e}`)}}static openCalendarURL(t,e){try{let r=this.generateCalendarURL(t);window.open(r,"_blank")}catch(r){console.error("Failed to generate calendar URL:",r),new tc.Notice(e?e("services.calendarExport.notices.generateLinkFailed"):"Failed to generate calendar link")}}static generateGoogleCalendarURL(t,e){let r="https://calendar.google.com/calendar/render",a=new URLSearchParams;a.append("action","TEMPLATE"),a.append("text",t.title);let i=this.formatGoogleDates(t,e);i&&a.append("dates",i);let s=this.buildDescription(t);return s&&a.append("details",s),t.contexts&&t.contexts.length>0&&a.append("location",t.contexts.join(", ")),`${r}?${a.toString()}`}static generateOutlookCalendarURL(t,e){let r="https://outlook.live.com/calendar/0/deeplink/compose",a=new URLSearchParams;a.append("subject",t.title);let{startISO:i,endISO:s}=this.getTaskDateRange(t,e);i&&a.append("startdt",i),s&&a.append("enddt",s);let o=this.buildDescription(t);return o&&a.append("body",o),t.contexts&&t.contexts.length>0&&a.append("location",t.contexts.join(", ")),a.append("path","/calendar/action/compose"),a.append("rru","addevent"),`${r}?${a.toString()}`}static generateYahooCalendarURL(t,e){let r="https://calendar.yahoo.com/",a=new URLSearchParams;a.append("v","60"),a.append("title",t.title);let{startYahoo:i,endYahoo:s}=this.getYahooDateFormat(t,e);i&&a.append("st",i),s&&a.append("et",s);let o=this.buildDescription(t);return o&&a.append("desc",o),t.contexts&&t.contexts.length>0&&a.append("in_loc",t.contexts.join(", ")),`${r}?${a.toString()}`}static generateICSDownloadURL(t){let e=this.generateICSContent(t);return`data:text/calendar;charset=utf8,${encodeURIComponent(e)}`}static generateICSContent(t){let e=`${t.path.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}@tasknotes`,r=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),a=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//Task Export//EN","CALSCALE:GREGORIAN","METHOD:PUBLISH","BEGIN:VEVENT",`UID:${e}`,`DTSTAMP:${r}`];a.push(`SUMMARY:${this.escapeICSText(t.title)}`);let{startICS:i,endICS:s}=this.getICSDateFormat(t);i&&a.push(`DTSTART:${i}`),s&&a.push(`DTEND:${s}`);let o=this.buildDescription(t);if(o&&a.push(`DESCRIPTION:${this.escapeICSText(o)}`),t.contexts&&t.contexts.length>0&&a.push(`LOCATION:${this.escapeICSText(t.contexts.join(", "))}`),t.tags&&t.tags.length>0&&a.push(`CATEGORIES:${t.tags.map(l=>this.escapeICSText(l)).join(",")}`),t.priority){let c={highest:"1",high:"3",medium:"5",low:"7",lowest:"9"}[t.priority]||"5";a.push(`PRIORITY:${c}`)}if(t.status){let c={done:"COMPLETED","in-progress":"IN-PROCESS",todo:"NEEDS-ACTION",cancelled:"CANCELLED"}[t.status]||"NEEDS-ACTION";a.push(`STATUS:${c}`)}return a.push("END:VEVENT"),a.push("END:VCALENDAR"),a.join(`\r +`)}static buildDescription(t){let e=[],r=[];return t.priority&&r.push(`Priority: ${t.priority}`),t.status&&r.push(`Status: ${t.status}`),t.projects&&t.projects.length>0&&r.push(`Projects: ${t.projects.join(", ")}`),t.tags&&t.tags.length>0&&r.push(`Tags: ${t.tags.join(", ")}`),t.contexts&&t.contexts.length>0&&r.push(`Contexts: ${t.contexts.join(", ")}`),t.timeEstimate&&r.push(`Estimated time: ${t.timeEstimate} minutes`),r.length>0&&e.push(...r),e.length>0&&e.push(""),e.push(`Exported from TaskNotes: ${t.path}`),e.join(` +`)}static formatGoogleDates(t,e){let{startICS:r,endICS:a}=this.getICSDateFormat(t,e);if(!r)return null;if(a)return`${r}/${a}`;let i=this.parseICSDate(r),s=new Date(i.getTime()+3600*1e3),o=this.formatDateToICS(s);return`${r}/${o}`}static getTaskDateRange(t,e){let r=null,a=null;if(t.scheduled)try{r=this.parseTaskDate(t.scheduled).toISOString()}catch(i){console.warn("Invalid scheduled date:",t.scheduled)}if(t.due)try{a=this.parseTaskDate(t.due).toISOString()}catch(i){console.warn("Invalid due date:",t.due)}else if(e&&r){let i=new Date(r);a=new Date(i.getTime()+3600*1e3).toISOString()}return{startISO:r,endISO:a}}static getYahooDateFormat(t,e){let{startISO:r,endISO:a}=this.getTaskDateRange(t,e),i=s=>{let o=new Date(s);return M(o,"yyyyMMdd'T'HHmmss")};return{startYahoo:r?i(r):null,endYahoo:a?i(a):null}}static getICSDateFormat(t,e=!0){let{startISO:r,endISO:a}=this.getTaskDateRange(t,e),i=s=>{let o=new Date(s);return this.formatDateToICS(o)};return{startICS:r?i(r):null,endICS:a?i(a):null}}static formatDateToICS(t){return t.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,"")}static parseICSDate(t){let e=t.substr(0,4),r=t.substr(4,2),a=t.substr(6,2),i=t.substr(9,2),s=t.substr(11,2),o=t.substr(13,2);return new Date(`${e}-${r}-${a}T${i}:${s}:${o}Z`)}static parseTaskDate(t){return t.includes("T")?qa(t):qa(`${t}T00:00:00`)}static escapeICSText(t){return t.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n").replace(/\r/g,"")}static foldICSLines(t){let e=t.split(`\r +`),r=[];return e.forEach(a=>{if(a.length<=75)r.push(a);else{let i=a;for(;i.length>75;)r.push(i.substring(0,75)),i=" "+i.substring(75);i.length>0&&r.push(i)}}),r.join(`\r +`)}static generateMultipleTasksICSContent(t){let e=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),r=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//EN","CALSCALE:GREGORIAN"];return t.forEach((a,i)=>{let s=`${a.path.replace(/[^a-zA-Z0-9]/g,"-")}-${i}-${Date.now()}@tasknotes`;r.push("BEGIN:VEVENT"),r.push(`UID:${s}`),r.push(`DTSTAMP:${e}`),r.push(`SUMMARY:${this.escapeICSText(a.title)}`);let{startICS:o,endICS:l}=this.getICSDateFormat(a);if(o){if(!l){let d=this.parseICSDate(o),u=new Date(d.getTime()+3600*1e3);l=this.formatDateToICS(u)}}else{let d;if(a.dateCreated?d=new Date(a.dateCreated):d=new Date,o=this.formatDateToICS(d),!l){let u=new Date(d.getTime()+36e5);l=this.formatDateToICS(u)}}r.push(`DTSTART:${o}`),r.push(`DTEND:${l}`);let c=this.buildDescription(a);if(c&&r.push(`DESCRIPTION:${this.escapeICSText(c)}`),a.contexts&&a.contexts.length>0&&r.push(`LOCATION:${this.escapeICSText(a.contexts.join(", "))}`),a.tags&&a.tags.length>0&&r.push(`CATEGORIES:${a.tags.map(d=>this.escapeICSText(d)).join(",")}`),a.priority){let u={highest:"1",high:"3",medium:"5",low:"7",lowest:"9"}[a.priority]||"5";r.push(`PRIORITY:${u}`)}if(a.status){let u={done:"COMPLETED","in-progress":"IN-PROCESS",todo:"NEEDS-ACTION",cancelled:"CANCELLED"}[a.status]||"NEEDS-ACTION";r.push(`STATUS:${u}`)}r.push("END:VEVENT")}),r.push("END:VCALENDAR"),this.foldICSLines(r.join(`\r +`))}static downloadAllTasksICSFile(t,e){try{if(!t||t.length===0){new tc.Notice(e?e("services.calendarExport.notices.noTasksToExport"):"No tasks found to export");return}let r=this.generateMultipleTasksICSContent(t),a=new Blob([r],{type:"text/calendar"}),i=URL.createObjectURL(a),o=`tasknotes-all-tasks-${new Date().toISOString().split("T")[0]}.ics`,l=document.createElement("a");l.href=i,l.download=o,l.click(),URL.revokeObjectURL(i);let c=t.length===1?"":"s";new tc.Notice(e?e("services.calendarExport.notices.downloadSuccess",{filename:o,count:t.length,plural:c}):`Downloaded ${o} with ${t.length} task${c}`)}catch(r){console.error("Failed to download all tasks ICS file:",r),new tc.Notice(e?e("services.calendarExport.notices.downloadFailed"):"Failed to download calendar file")}}static downloadICSFile(t,e){try{let r=this.generateICSContent(t),a=new Blob([r],{type:"text/calendar"}),i=URL.createObjectURL(a),s=`${t.title.replace(/[^a-zA-Z0-9]/g,"-")}.ics`,o=document.createElement("a");o.href=i,o.download=s,o.click(),URL.revokeObjectURL(i),new tc.Notice(e?e("services.calendarExport.notices.singleDownloadSuccess",{filename:s}):`Downloaded ${s}`)}catch(r){console.error("Failed to download ICS file:",r),new tc.Notice(e?e("services.calendarExport.notices.downloadFailed"):"Failed to download calendar file")}}}});var t$,Mr,ws=b(()=>{t$=require("obsidian"),Mr=class extends t$.Menu{show(t){if(t instanceof MouseEvent)this.showAtMouseEvent(t);else if(t instanceof KeyboardEvent){let e=t.currentTarget;if(!(e instanceof HTMLElement))return;this.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4})}}}});var Qd,Wv,r$=b(()=>{Qd=require("obsidian"),Wv=class extends Qd.Modal{constructor(t,e){super(t),this.options=e}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("date-time-picker-modal"),this.options.title&&t.createEl("h3",{text:this.options.title}),new Qd.Setting(t).setName("Date").addText(r=>{this.dateInput=r.inputEl,this.dateInput.type="date",this.options.currentDate&&(this.dateInput.value=this.options.currentDate)}),new Qd.Setting(t).setName("Time (optional)").addText(r=>{this.timeInput=r.inputEl,this.timeInput.type="time",this.options.currentTime&&(this.timeInput.value=this.options.currentTime)}),new Qd.Setting(t).addButton(r=>r.setButtonText("Cancel").onClick(()=>{this.close()})).addButton(r=>r.setButtonText("Select").setCta().onClick(()=>{let a=this.dateInput.value||null,i=this.timeInput.value||null;this.options.onSelect(a,i),this.close()})),setTimeout(()=>{this.dateInput.focus()},100);let e=r=>{if(r.key==="Enter"){r.preventDefault();let a=this.dateInput.value||null,i=this.timeInput.value||null;this.options.onSelect(a,i),this.close()}};this.dateInput.addEventListener("keydown",e),this.timeInput.addEventListener("keydown",e)}onClose(){let{contentEl:t}=this;t.empty()}}});var n$={};Be(n$,{DateContextMenu:()=>Cn});var Cn,rc=b(()=>{ws();r$();Cn=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}t(t,e,r){var a;return((a=this.options.plugin)==null?void 0:a.i18n.translate(t,r))||e||t}buildMenu(){this.options.title&&(this.menu.addItem(i=>{i.setTitle(this.options.title||""),i.setIcon("calendar"),i.setDisabled(!0)}),this.menu.addSeparator());let t=this.getDateOptions(),e=t.filter(i=>i.category==="increment");e.length>0&&(e.forEach(i=>{this.menu.addItem(s=>{i.icon&&s.setIcon(i.icon),s.setTitle(i.label),s.onClick(async()=>{this.options.onSelect(i.value,null)})})}),this.menu.addSeparator()),t.filter(i=>i.category==="basic").forEach(i=>{this.menu.addItem(s=>{i.icon&&s.setIcon(i.icon);let l=i.value&&i.value===this.options.currentValue?this.t("contextMenus.date.selected","\u2713 {label}",{label:i.label}):i.label;s.setTitle(l),s.onClick(async()=>{this.options.onSelect(i.value,null)})})});let a=t.filter(i=>i.category==="weekday");a.length>0&&(this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.date.weekdaysLabel","Weekdays")),i.setIcon("calendar");let s=i.setSubmenu();a.forEach(o=>{s.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(i=>{i.setTitle(this.t("contextMenus.date.pickDateTime","Pick date & time\u2026")),i.setIcon("calendar"),i.onClick(async()=>{this.showDateTimePicker()})}),this.options.currentValue&&this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.date.clearDate","Clear date")),i.setIcon("x"),i.onClick(async()=>{this.options.onSelect(null,null)})})}getDateOptions(){let t=window.moment(),e=[];if(this.options.currentValue){let o=window.moment(this.options.currentValue);e.push({label:this.t("contextMenus.date.increment.plusOneDay","+1 day"),value:o.clone().add(1,"day").format("YYYY-MM-DD"),icon:"plus",category:"increment"}),e.push({label:this.t("contextMenus.date.increment.minusOneDay","-1 day"),value:o.clone().subtract(1,"day").format("YYYY-MM-DD"),icon:"minus",category:"increment"}),e.push({label:this.t("contextMenus.date.increment.plusOneWeek","+1 week"),value:o.clone().add(1,"week").format("YYYY-MM-DD"),icon:"plus-circle",category:"increment"}),e.push({label:this.t("contextMenus.date.increment.minusOneWeek","-1 week"),value:o.clone().subtract(1,"week").format("YYYY-MM-DD"),icon:"minus-circle",category:"increment"})}e.push({label:this.t("contextMenus.date.basic.today","Today"),value:t.format("YYYY-MM-DD"),icon:"calendar-check",isToday:!0,category:"basic"}),e.push({label:this.t("contextMenus.date.basic.tomorrow","Tomorrow"),value:t.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=t.clone().day(l);c.isSameOrBefore(t,"day")&&(c=c.add(1,"week"));let d=this.t(`common.weekdays.${o.toLowerCase()}`,o);e.push({label:d,value:c.format("YYYY-MM-DD"),icon:"calendar",category:"weekday"})});let a=t.clone().day(6);(a.isBefore(t)||a.isSame(t,"day"))&&a.add(1,"week"),e.push({label:this.t("contextMenus.date.basic.thisWeekend","This weekend"),value:a.format("YYYY-MM-DD"),icon:"calendar-days",category:"basic"});let i=t.clone().day(1).add(1,"week");e.push({label:this.t("contextMenus.date.basic.nextWeek","Next week"),value:i.format("YYYY-MM-DD"),icon:"calendar-plus",category:"basic"});let s=t.clone().add(1,"month").startOf("month");return e.push({label:this.t("contextMenus.date.basic.nextMonth","Next month"),value:s.format("YYYY-MM-DD"),icon:"calendar-range",category:"basic"}),e}show(t){this.menu.show(t)}showAtElement(t){this.menu.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4})}showDateTimePicker(){var r;let t=this.options.app||((r=this.options.plugin)==null?void 0:r.app);if(!t){console.error("DateContextMenu: No app instance available for modal");return}new Wv(t,{currentDate:this.options.currentValue||null,currentTime:this.options.currentTime||null,title:this.t("contextMenus.date.modal.title","Set date & time"),onSelect:(a,i)=>{this.options.onSelect(a,i)}}).open()}}});var a$={};Be(a$,{RecurrenceContextMenu:()=>ti});var Aa,ti,$E,Zd=b(()=>{Aa=require("obsidian");ws();ti=class{constructor(t){this.menu=new Mr,this.options=t,this.translate=t.plugin.i18n.translate.bind(t.plugin.i18n),this.buildMenu()}buildMenu(){this.getRecurrenceOptions().forEach(e=>{if(e.label.startsWith("\u2500")){this.menu.addSeparator();return}this.menu.addItem(r=>{let a=e.label;e.icon&&r.setIcon(e.icon),e.value===this.options.currentValue&&(a=`\u2713 ${e.label}`),r.setTitle(a),r.onClick(async()=>{let i=e.anchor||"scheduled";this.options.onSelect(e.value,i)})})}),this.menu.addSeparator(),this.menu.addItem(e=>{e.setTitle(this.translate("components.recurrenceContextMenu.customRecurrence")),e.setIcon("settings"),e.onClick(async()=>{this.showCustomRecurrenceModal()})}),this.options.currentValue&&this.menu.addItem(e=>{e.setTitle(this.translate("components.recurrenceContextMenu.clearRecurrence")),e.setIcon("x"),e.onClick(async()=>{this.options.onSelect(null)})})}getRecurrenceOptions(){let t=[],e=new Date,r=["SU","MO","TU","WE","TH","FR","SA"],a=["January","February","March","April","May","June","July","August","September","October","November","December"],i=r[e.getDay()],s=e.getDate(),o=e.getMonth()+1,l=a[e.getMonth()],c=e.toLocaleDateString("en-US",{weekday:"long"}),d=this.formatDateForDTSTART(e);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}`}}return t.push({label:this.translate("components.recurrenceContextMenu.daily"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days"}),t.push({label:this.translate("components.recurrenceContextMenu.weeklyOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1;BYDAY=${i}`,icon:"calendar"}),t.push({label:this.translate("components.recurrenceContextMenu.everyTwoWeeksOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=2;BYDAY=${i}`,icon:"calendar"}),t.push({label:this.translate("components.recurrenceContextMenu.monthlyOnThe",{ordinal:this.getOrdinal(s)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=${s}`,icon:"calendar-range"}),t.push({label:this.translate("components.recurrenceContextMenu.everyThreeMonthsOnThe",{ordinal:this.getOrdinal(s)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=${s}`,icon:"calendar-range"}),t.push({label:this.translate("components.recurrenceContextMenu.yearlyOn",{month:l,ordinal:this.getOrdinal(s)}),value:`DTSTART:${d};FREQ=YEARLY;INTERVAL=1;BYMONTH=${o};BYMONTHDAY=${s}`,icon:"calendar-clock"}),t.push({label:this.translate("components.recurrenceContextMenu.weekdaysOnly"),value:`DTSTART:${d};FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR`,icon:"briefcase"}),t.push({label:"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",value:"",icon:void 0}),t.push({label:this.translate("components.recurrenceContextMenu.dailyAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days",anchor:"completion"}),t.push({label:this.translate("components.recurrenceContextMenu.every3DaysAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=3`,icon:"calendar-days",anchor:"completion"}),t.push({label:this.translate("components.recurrenceContextMenu.weeklyAfterCompletion"),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1`,icon:"calendar",anchor:"completion"}),t.push({label:this.translate("components.recurrenceContextMenu.monthlyAfterCompletion"),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1`,icon:"calendar-range",anchor:"completion"}),t}formatDateForDTSTART(t){let e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${e}${r}${a}`}getOrdinal(t){let e=["th","st","nd","rd"],r=t%100;return t+(e[(r-20)%10]||e[r]||e[0])}showCustomRecurrenceModal(){new $E(this.options.app,this.options.currentValue||"",this.options.currentAnchor||"scheduled",(t,e)=>{t&&this.options.onSelect(t,e)}).open()}show(t){this.menu.show(t)}},$E=class extends Aa.Modal{constructor(e,r,a,i){super(e);this.frequency="DAILY";this.interval=1;this.byDay=[];this.byMonthDay=[];this.byMonth=[];this.until="";this.endType="never";this.dtstart="";this.dtstartTime="";this.recurrenceAnchor="scheduled";this.currentValue=r,this.recurrenceAnchor=a,this.onSubmit=i,this.parseCurrentValue()}parseCurrentValue(){if(!this.currentValue){this.dtstart=this.formatTodayForInput();return}let e=this.currentValue.split(";");for(let r of e){let a=r.includes(":")&&r.startsWith("DTSTART")?":":"=",[i,s]=r.split(a);switch(i){case"DTSTART":if(s.length>=8){if(this.dtstart=`${s.slice(0,4)}-${s.slice(4,6)}-${s.slice(6,8)}`,s.length>8&&s.includes("T")){let o=s.slice(9);o.length>=4&&(this.dtstartTime=`${o.slice(0,2)}:${o.slice(2,4)}`)}}else{let o=new Date(s);isNaN(o.getTime())?this.dtstart=this.formatTodayForInput():this.dtstart=s}break;case"FREQ":this.frequency=s;break;case"INTERVAL":this.interval=parseInt(s)||1;break;case"BYDAY":{let o=s.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=s.split(",").map(o=>parseInt(o));break;case"BYMONTH":this.byMonth=s.split(",").map(o=>parseInt(o));break;case"BYSETPOS":this.bySetPos=parseInt(s);break;case"COUNT":this.count=parseInt(s),this.endType="count";break;case"UNTIL":s.length===8?this.until=`${s.slice(0,4)}-${s.slice(4,6)}-${s.slice(6,8)}`:this.until=s,this.endType="until";break}}}formatTodayForInput(){let e=new Date,r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${r}-${a}-${i}`}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("h2",{text:"Custom Recurrence"}),new Aa.Setting(e).setName("Start date").setDesc("The date when the recurrence pattern begins").addText(V=>{V.inputEl.type="date",V.setValue(this.dtstart).onChange(J=>{this.dtstart=J})}),new Aa.Setting(e).setName("Start time").setDesc("The time when recurring instances should appear (optional)").addText(V=>{V.inputEl.type="time",V.setValue(this.dtstartTime).onChange(J=>{this.dtstartTime=J})}),new Aa.Setting(e).setName("Recur from").setDesc("When should the next occurrence be calculated from?").addDropdown(V=>{V.addOption("scheduled","Scheduled date (fixed schedule)").addOption("completion","Completion date (flexible schedule)").setValue(this.recurrenceAnchor).onChange(J=>{this.recurrenceAnchor=J})}),new Aa.Setting(e).setName("Frequency").addDropdown(V=>{V.addOption("DAILY","Daily").addOption("WEEKLY","Weekly").addOption("MONTHLY","Monthly").addOption("YEARLY","Yearly").setValue(this.frequency).onChange(J=>{this.frequency=J,this.updateFrequencySpecificVisibility()})}),new Aa.Setting(e).setName("Interval").setDesc("Every X days/weeks/months/years").addText(V=>{V.setValue(this.interval.toString()).onChange(J=>{this.interval=parseInt(J)||1})});let r=new Aa.Setting(e).setName("Days of week").setDesc("Select specific days (for weekly recurrence)"),a=r.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(V=>{let J=a.createEl("label",{cls:"day-checkbox"});J.style.display="inline-block",J.style.marginRight="8px";let he=J.createEl("input",{type:"checkbox"});he.checked=this.byDay.includes(V.key),he.addEventListener("change",()=>{he.checked?this.byDay.includes(V.key)||this.byDay.push(V.key):this.byDay=this.byDay.filter(ge=>ge!==V.key)}),J.createSpan({text:` ${V.label}`})});let s=new Aa.Setting(e).setName("Monthly recurrence").setDesc("Choose how to repeat monthly"),o=s.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 V=1;V<=31;V++){let J=d.createEl("option",{value:V.toString(),text:V.toString()});(this.byMonthDay.length>0&&this.byMonthDay[0]===V||this.byMonthDay.length===0&&V===new Date().getDate())&&(J.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(V=>{let J=m.createEl("option",{value:V.value,text:V.text});(this.bySetPos===parseInt(V.value)||!this.bySetPos&&V.value==="1")&&(J.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"}],T=["SU","MO","TU","WE","TH","FR","SA"][new Date().getDay()];g.forEach(V=>{let J=f.createEl("option",{value:V.value,text:V.text});(this.byDay.length>0&&this.byDay[0]===V.value||this.byDay.length===0&&V.value===T)&&(J.selected=!0)}),u.createSpan({text:" of each month"});let k=new Aa.Setting(e).setName("Yearly recurrence").setDesc("Choose how to repeat yearly"),w=k.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 I=S.createEl("select");I.style.marginLeft="4px",I.style.marginRight="4px";let A=["January","February","March","April","May","June","July","August","September","October","November","December"];A.forEach((V,J)=>{let he=I.createEl("option",{value:(J+1).toString(),text:V});(this.byMonth.length>0&&this.byMonth[0]===J+1||this.byMonth.length===0&&J+1===new Date().getMonth()+1)&&(he.selected=!0)});let B=S.createEl("select");B.style.marginLeft="4px",B.style.marginRight="4px";for(let V=1;V<=31;V++){let J=B.createEl("option",{value:V.toString(),text:V.toString()});(this.byMonthDay.length>0&&this.byMonthDay[0]===V||this.byMonthDay.length===0&&V===new Date().getDate())&&(J.selected=!0)}S.createSpan({text:" each year"});let z=w.createEl("label",{cls:"radio-option"});z.style.display="block",z.style.marginBottom="8px";let U=z.createEl("input",{type:"radio",value:"byday"});U.name="yearly-type",U.checked=this.byDay.length>0&&this.bySetPos!==void 0,z.createSpan({text:" On the "});let N=z.createEl("select");N.style.marginLeft="4px",N.style.marginRight="4px",h.forEach(V=>{let J=N.createEl("option",{value:V.value,text:V.text});(this.bySetPos===parseInt(V.value)||!this.bySetPos&&V.value==="1")&&(J.selected=!0)});let P=z.createEl("select");P.style.marginLeft="4px",P.style.marginRight="4px",g.forEach(V=>{let J=P.createEl("option",{value:V.value,text:V.text});(this.byDay.length>0&&this.byDay[0]===V.value||this.byDay.length===0&&V.value===T)&&(J.selected=!0)});let _=z.createEl("select");_.style.marginLeft="4px",_.style.marginRight="4px",A.forEach((V,J)=>{let he=_.createEl("option",{value:(J+1).toString(),text:V});(this.byMonth.length>0&&this.byMonth[0]===J+1||this.byMonth.length===0&&J+1===new Date().getMonth()+1)&&(he.selected=!0)}),z.createSpan({text:" each year"}),new Aa.Setting(e).setName("End condition").setDesc("Choose when the recurrence should end");let Y=e.createDiv("end-condition-container"),Q=Y.createEl("label",{cls:"radio-option"});Q.style.display="block",Q.style.marginBottom="8px";let W=Q.createEl("input",{type:"radio",value:"never"});W.name="end-type",W.checked=this.endType==="never",Q.createSpan({text:" Never ends"});let H=Y.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 ae=H.createEl("input",{type:"number",placeholder:"10"});ae.style.width="60px",ae.style.marginLeft="4px",ae.style.marginRight="4px",ae.value=this.count?this.count.toString():"",H.createSpan({text:" occurrences"});let ye=Y.createEl("label",{cls:"radio-option"});ye.style.display="block",ye.style.marginBottom="8px";let Z=ye.createEl("input",{type:"radio",value:"until"});Z.name="end-type",Z.checked=this.endType==="until",ye.createSpan({text:" End on "});let Je=ye.createEl("input",{type:"date"});Je.style.marginLeft="4px",Je.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")}),Z.addEventListener("change",()=>{Z.checked&&(this.endType="until")}),ae.addEventListener("input",()=>{this.count=parseInt(ae.value)||void 0,ae.value&&(K.checked=!0,this.endType="count")}),Je.addEventListener("input",()=>{this.until=Je.value?Je.value.replace(/-/g,""):"",Je.value&&(Z.checked=!0,this.endType="until")}),this.updateFrequencySpecificVisibility=()=>{r.settingEl.style.display=this.frequency==="WEEKLY"?"flex":"none",s.settingEl.style.display=this.frequency==="MONTHLY"?"flex":"none",k.settingEl.style.display=this.frequency==="YEARLY"?"flex":"none"},this.updateFrequencySpecificVisibility();let Rt=e.createDiv("button-container");Rt.style.display="flex",Rt.style.justifyContent="flex-end",Rt.style.gap="8px",Rt.style.marginTop="16px",Rt.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),Rt.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{let V=c.checked?"bydate":"byday",J=x.checked?"bydate":"byday";this.frequency==="MONTHLY"?V==="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"&&(J==="bydate"?(this.byMonth=[parseInt(I.value)],this.byMonthDay=[parseInt(B.value)],this.byDay=[],this.bySetPos=void 0):(this.byMonth=[parseInt(_.value)],this.byMonthDay=[],this.byDay=[P.value],this.bySetPos=parseInt(N.value)));let he=this.buildRRule(V,J);this.onSubmit(he,this.recurrenceAnchor),this.close()})}updateFrequencySpecificVisibility(){}buildRRule(e,r){let a=[];if(this.dtstart){let i=this.dtstart.replace(/-/g,"");if(this.dtstartTime){let s=this.dtstartTime.replace(":","")+"00Z";i=`${i}T${s}`}a.push(`DTSTART:${i}`)}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(e==="bydate"){let i=this.byMonthDay.length>0?this.byMonthDay[0]:new Date().getDate();a.push(`BYMONTHDAY=${i}`)}else if(e==="byday"&&this.byDay.length>0){let i=this.bySetPos||1;a.push(`BYDAY=${i}${this.byDay[0]}`)}break;case"YEARLY":if(r==="bydate"){let i=this.byMonth.length>0?this.byMonth[0]:new Date().getMonth()+1,s=this.byMonthDay.length>0?this.byMonthDay[0]:new Date().getDate();a.push(`BYMONTH=${i}`),a.push(`BYMONTHDAY=${s}`)}else if(r==="byday"){let i=this.byMonth.length>0?this.byMonth[0]:new Date().getMonth()+1;if(a.push(`BYMONTH=${i}`),this.byDay.length>0){let s=this.bySetPos||1;a.push(`BYDAY=${s}${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 i=this.until.replace(/-/g,"");a.push(`UNTIL=${i}`)}break}return a.join(";")}onClose(){let{contentEl:e}=this;e.empty()}}});async function i$(n,t){return new YE(n,t).show()}var rf,YE,s$=b(()=>{rf=require("obsidian"),YE=class extends rf.Modal{constructor(t,e){super(t),this.options={confirmText:"Confirm",cancelText:"Cancel",...e}}show(){return new Promise(t=>{this.resolve=t,this.open()})}onOpen(){let{contentEl:t}=this;t.empty(),new rf.Setting(t).setName(this.options.title).setHeading(),new rf.Setting(t).addText(i=>{this.inputEl=i.inputEl,i.setPlaceholder(this.options.placeholder||"").setValue(this.options.initialValue||"").onChange(()=>{}),setTimeout(()=>{this.inputEl.focus(),this.inputEl.select()},100)});let e=t.createEl("div",{cls:"modal-button-container"});e.style.display="flex",e.style.gap="10px",e.style.justifyContent="flex-end",e.style.marginTop="20px";let r=e.createEl("button",{text:this.options.cancelText});r.addEventListener("click",()=>{this.resolve(null),this.close()});let a=e.createEl("button",{text:this.options.confirmText,cls:"mod-cta"});a.addEventListener("click",()=>{let i=this.inputEl.value.trim();this.resolve(i||null),this.close()}),this.inputEl.addEventListener("keydown",i=>{i.key==="Enter"?(i.preventDefault(),a.click()):i.key==="Escape"&&(i.preventDefault(),r.click())})}onClose(){let{contentEl:t}=this;t.empty(),this.resolve&&this.resolve(null)}}});var Ce,Jd,GE=b(()=>{Ce=require("obsidian");Ke();Kd();Uv();dl();rc();Zd();s$();To();Py();vd();Hp();ws();Jd=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}t(t,e){return this.options.plugin.i18n.translate(t,e)}buildMenu(){var r,a;let{task:t,plugin:e}=this.options;if(this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.status")),i.setIcon("circle");let s=i.setSubmenu();this.addStatusOptions(s,t,e)}),t.recurrence){this.menu.addSeparator();let i=le(this.options.targetDate),s=((r=t.complete_instances)==null?void 0:r.includes(i))||!1;this.menu.addItem(l=>{l.setTitle(s?this.t("contextMenus.task.markIncomplete"):this.t("contextMenus.task.markComplete")),l.setIcon(s?"x":"check"),l.onClick(async()=>{var c,d;try{await e.toggleRecurringTaskComplete(t,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:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.toggleCompletionFailure",{message:p}))}})});let o=((a=t.skipped_instances)==null?void 0:a.includes(i))||!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 e.taskService.toggleRecurringTaskSkipped(t,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:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.toggleSkipFailure",{message:p}))}})})}this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.priority")),i.setIcon("star");let s=i.setSubmenu();this.addPriorityOptions(s,t,e)}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.dueDate")),i.setIcon("calendar");let s=i.setSubmenu();this.addDateOptions(s,t.due,async o=>{var l,c;try{await e.updateTaskProperty(t,"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:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.updateDueDateFailure",{message:u}))}},()=>{e.openDueDateModal(t)})}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.scheduledDate")),i.setIcon("calendar-clock");let s=i.setSubmenu();this.addDateOptions(s,t.scheduled,async o=>{var l,c;try{await e.updateTaskProperty(t,"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:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.updateScheduledFailure",{message:u}))}},()=>{e.openScheduledDateModal(t)})}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.reminders")),i.setIcon("bell");let s=i.setSubmenu();this.addQuickRemindersSection(s,t,e,"due",this.t("contextMenus.task.remindBeforeDue")),this.addQuickRemindersSection(s,t,e,"scheduled",this.t("contextMenus.task.remindBeforeScheduled")),s.addSeparator(),s.addItem(o=>{o.setTitle(this.t("contextMenus.task.manageReminders")),o.setIcon("settings"),o.onClick(()=>{new ei(e.app,e,t,async c=>{var d,u;try{await e.updateTaskProperty(t,"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 Ce.Notice(this.t("contextMenus.task.notices.updateRemindersFailure"))}}).open()})}),t.reminders&&t.reminders.length>0&&s.addItem(o=>{o.setTitle(this.t("contextMenus.task.clearReminders")),o.setIcon("trash"),o.onClick(async()=>{var l,c;try{await e.updateTaskProperty(t,"reminders",void 0),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){console.error("Error clearing reminders:",d),new Ce.Notice(this.t("contextMenus.task.notices.clearRemindersFailure"))}})})}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.dependencies.title")),i.setIcon("git-branch");let s=i.setSubmenu();this.addDependencyMenuItems(s,t,e)}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.organization.title")),i.setIcon("folder-tree");let s=i.setSubmenu();this.addOrganizationMenuItems(s,t,e)}),this.menu.addSeparator(),this.menu.addItem(i=>{let s=e.getActiveTimeSession(t);i.setTitle(s?this.t("contextMenus.task.stopTimeTracking"):this.t("contextMenus.task.startTimeTracking")),i.setIcon(s?"pause":"play"),i.onClick(async()=>{var l,c;e.getActiveTimeSession(t)?await e.stopTimeTracking(t):await e.startTimeTracking(t),(c=(l=this.options).onUpdate)==null||c.call(l)})}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.editTimeEntries")),i.setIcon("clock"),i.onClick(()=>{e.openTimeEntryEditor(t)})}),this.menu.addItem(i=>{i.setTitle(t.archived?this.t("contextMenus.task.unarchive"):this.t("contextMenus.task.archive")),i.setIcon(t.archived?"archive-restore":"archive"),i.onClick(async()=>{var s,o;try{await e.toggleTaskArchive(t),(o=(s=this.options).onUpdate)==null||o.call(s)}catch(l){let c=l instanceof Error?l.message:String(l);console.error("Error toggling task archive:",{error:c,taskPath:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.archiveFailure",{message:c}))}})}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.openNote")),i.setIcon("file-text"),i.onClick(()=>{let s=e.app.vault.getAbstractFileByPath(t.path);s instanceof Ce.TFile&&e.app.workspace.getLeaf(!1).openFile(s)})}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.copyTitle")),i.setIcon("copy"),i.onClick(async()=>{try{await navigator.clipboard.writeText(t.title),new Ce.Notice(this.t("contextMenus.task.notices.copyTitleSuccess"))}catch(s){new Ce.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.noteActions")),i.setIcon("file-text");let s=i.setSubmenu(),o=e.app.vault.getAbstractFileByPath(t.path);if(o instanceof Ce.TFile){try{e.app.workspace.trigger("file-menu",s,o,"file-explorer")}catch(l){console.debug("Native file menu not available, using fallback")}s.addItem(l=>{l.setTitle(this.t("contextMenus.task.rename")),l.setIcon("pencil"),l.onClick(async()=>{try{let c=o.basename,d=await i$(e.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 e.app.vault.rename(o,m),new Ce.Notice(this.t("contextMenus.task.notices.renameSuccess",{name:p})),this.options.onUpdate&&this.options.onUpdate()}}catch(c){console.error("Error renaming file:",c),new Ce.Notice(this.t("contextMenus.task.notices.renameFailure"))}})}),s.addItem(l=>{l.setTitle(this.t("contextMenus.task.delete")),l.setIcon("trash"),l.onClick(async()=>{await $a(e.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})&&e.app.vault.trash(o,!0)})}),s.addSeparator(),s.addItem(l=>{l.setTitle(this.t("contextMenus.task.copyPath")),l.setIcon("copy"),l.onClick(async()=>{try{await navigator.clipboard.writeText(o.path),new Ce.Notice(this.t("contextMenus.task.notices.copyPathSuccess"))}catch(c){new Ce.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),s.addItem(l=>{l.setTitle(this.t("contextMenus.task.copyUrl")),l.setIcon("link"),l.onClick(async()=>{try{let c=`obsidian://open?vault=${encodeURIComponent(e.app.vault.getName())}&file=${encodeURIComponent(o.path)}`;await navigator.clipboard.writeText(c),new Ce.Notice(this.t("contextMenus.task.notices.copyUrlSuccess"))}catch(c){new Ce.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),s.addSeparator(),s.addItem(l=>{l.setTitle(this.t("contextMenus.task.showInExplorer")),l.setIcon("folder-open"),l.onClick(()=>{e.app.workspace.getLeaf().setViewState({type:"file-explorer",state:{}}).then(()=>{let c=e.app.workspace.getLeavesOfType("file-explorer")[0];c!=null&&c.view&&"revealInFolder"in c.view&&c.view.revealInFolder(o)})})})}}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.addToCalendar")),i.setIcon("calendar-plus");let s=i.setSubmenu();s.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.google")),o.setIcon("external-link"),o.onClick(()=>{Si.openCalendarURL({type:"google",task:t,useScheduledAsDue:!0},this.t.bind(this))})}),s.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.outlook")),o.setIcon("external-link"),o.onClick(()=>{Si.openCalendarURL({type:"outlook",task:t,useScheduledAsDue:!0},this.t.bind(this))})}),s.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.yahoo")),o.setIcon("external-link"),o.onClick(()=>{Si.openCalendarURL({type:"yahoo",task:t,useScheduledAsDue:!0},this.t.bind(this))})}),s.addSeparator(),s.addItem(o=>{o.setTitle(this.t("contextMenus.task.calendar.downloadIcs")),o.setIcon("download"),o.onClick(()=>{Si.downloadICSFile(t,this.t.bind(this))})})}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.recurrence")),i.setIcon("refresh-ccw");let s=i.setSubmenu(),o=typeof t.recurrence=="string"?t.recurrence:void 0;this.addRecurrenceOptions(s,o,async l=>{var c,d;try{await e.updateTaskProperty(t,"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:t.path}),new Ce.Notice(this.t("contextMenus.task.notices.updateRecurrenceFailure",{message:p}))}},e)}),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.task.createSubtask")),i.setIcon("plus"),i.onClick(()=>{let s=e.app.vault.getAbstractFileByPath(t.path);if(s instanceof Ce.TFile){let o=vi(e.app,s,t.path,"","",e.settings.useFrontmatterMarkdownLinks);e.openTaskCreationModal({projects:[o]})}})}),setTimeout(()=>{this.updateMainMenuIconColors(t,e)},10)}addDependencyMenuItems(t,e,r){var s,o;t.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.addBlockedBy")),l.setIcon("link-2"),l.onClick(()=>{this.menu.hide(),this.openBlockedBySelector(e,r)})});let a=(s=e.blockedBy)!=null?s:[];a.length>0&&t.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlockedBy")),l.setIcon("unlink");let c=l.setSubmenu();a.forEach((d,u)=>{c.addItem(p=>{p.setTitle(d.uid),p.onClick(async()=>{var m,h;try{let f=a.filter((v,T)=>T!==u),g=await r.updateTaskProperty(e,"blockedBy",f.length>0?f:void 0);Object.assign(e,g),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.blockedByRemoved")),(h=(m=this.options).onUpdate)==null||h.call(m)}catch(f){console.error("Failed to remove blocked-by dependency:",f),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}})})})}),t.addSeparator(),t.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.addBlocking")),l.setIcon("git-branch-plus"),l.onClick(()=>{this.menu.hide(),this.openBlockingSelector(e,r)})});let i=(o=e.blocking)!=null?o:[];i.length>0&&t.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlocking")),l.setIcon("git-branch-minus");let c=l.setSubmenu();i.forEach(d=>{let u=r.app.vault.getAbstractFileByPath(d),p=u instanceof Ce.TFile?r.app.metadataCache.fileToLinktext(u,e.path,!1):d.split("/").pop()||d;c.addItem(m=>{m.setTitle(p),m.onClick(async()=>{var h,f;try{await r.taskService.updateBlockingRelationships(e,[],[d],{});let g=await r.cacheManager.getTaskInfo(e.path);g&&Object.assign(e,g),new Ce.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 Ce.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}})})})})}dedupeDependencyEntries(t){let e=new Map;for(let r of t){let a=lo(r);if(!a)continue;let i=this.getDependencyKey(a);e.has(i)||e.set(i,a)}return Array.from(e.values())}async openBlockedBySelector(t,e){let r=new Set((Array.isArray(t.blockedBy)?t.blockedBy:[]).map(a=>a.uid));await this.openTaskDependencySelector(e,a=>{if(a.path===t.path)return!1;let i=Yn(e.app,t.path,a.path,e.settings.useFrontmatterMarkdownLinks);return!r.has(i)},async a=>{await this.handleBlockedBySelection(t,e,a)})}async openBlockingSelector(t,e){var a;let r=new Set((a=t.blocking)!=null?a:[]);await this.openTaskDependencySelector(e,i=>i.path===t.path?!1:!r.has(i.path),async i=>{await this.handleBlockingSelection(t,e,i)})}async openTaskDependencySelector(t,e,r){var a,i;try{let s=t.cacheManager,l=((i=await((a=s==null?void 0:s.getAllTasks)==null?void 0:a.call(s)))!=null?i:[]).filter(e);if(l.length===0){new Ce.Notice(this.t("contextMenus.task.dependencies.notices.noEligibleTasks"));return}Fr(t,l,async c=>{c&&await r(c)})}catch(s){console.error("Failed to open task selector for dependencies:",s),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockedBySelection(t,e,r){var a,i;if(r.path!==t.path)try{let s={uid:Yn(e.app,t.path,r.path,e.settings.useFrontmatterMarkdownLinks),reltype:$n},o=Array.isArray(t.blockedBy)?t.blockedBy:[],l=this.dedupeDependencyEntries([...o,s]);if(l.length===o.length)return;let c=await e.updateTaskProperty(t,"blockedBy",l);Object.assign(t,c),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.blockedByAdded",{count:1})),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){console.error("Failed to add blocked-by dependency via selector:",s),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockingSelection(t,e,r){var i,s,o;let a=r.path;if(a!==t.path&&!((i=t.blocking)!=null&&i.includes(a)))try{let l={uid:Yn(e.app,a,t.path,e.settings.useFrontmatterMarkdownLinks),reltype:$n};await e.taskService.updateBlockingRelationships(t,[a],[],{[a]:l});let c=await e.cacheManager.getTaskInfo(t.path);c?Object.assign(t,c):Array.isArray(t.blocking)?t.blocking=Array.from(new Set([...t.blocking,a])):t.blocking=[a],new Ce.Notice(this.t("contextMenus.task.dependencies.notices.blockingAdded",{count:1})),(o=(s=this.options).onUpdate)==null||o.call(s)}catch(l){console.error("Failed to add blocking dependency via selector:",l),new Ce.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}getDependencyKey(t){var e;return`${t.uid}::${t.reltype}::${(e=t.gap)!=null?e:""}`}addOrganizationMenuItems(t,e,r){t.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addToProject")),a.setIcon("folder-plus"),a.onClick(()=>{this.menu.hide(),this.openProjectSelector(e,r)})}),t.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addSubtasks")),a.setIcon("indent"),a.onClick(()=>{this.menu.hide(),this.openSubtaskAssignmentSelector(e,r)})})}async openProjectSelector(t,e){try{new io(e.app,e,async a=>{a&&await this.addTaskToProject(t,e,a)}).open()}catch(r){console.error("Failed to open project selector:",r),new Ce.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"))}}async openSubtaskAssignmentSelector(t,e){var r,a;try{let i=e.cacheManager,o=((a=await((r=i==null?void 0:i.getAllTasks)==null?void 0:r.call(i)))!=null?a:[]).filter(l=>l.path!==t.path);if(o.length===0){new Ce.Notice(this.t("contextMenus.task.organization.notices.noEligibleSubtasks"));return}Fr(e,o,async l=>{l&&await this.assignTaskAsSubtask(t,e,l)})}catch(i){console.error("Failed to open subtask assignment selector:",i),new Ce.Notice(this.t("contextMenus.task.organization.notices.subtaskSelectFailed"))}}async addTaskToProject(t,e,r){var a,i;try{if(!(r instanceof Ce.TFile)){new Ce.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"));return}let s=vi(e.app,r,t.path,"","",e.settings.useFrontmatterMarkdownLinks),o=`[[${r.basename}]]`,l=Array.isArray(t.projects)?t.projects:[];if(l.includes(s)||l.includes(o)){new Ce.Notice(this.t("contextMenus.task.organization.notices.alreadyInProject"));return}let d=[...l.filter(p=>p!==o),s],u=await e.updateTaskProperty(t,"projects",d);Object.assign(t,u),new Ce.Notice(this.t("contextMenus.task.organization.notices.addedToProject",{project:r.basename})),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){console.error("Failed to add task to project:",s),new Ce.Notice(this.t("contextMenus.task.organization.notices.addToProjectFailed"))}}async assignTaskAsSubtask(t,e,r){var a,i;try{let s=e.app.vault.getAbstractFileByPath(t.path);if(!(s instanceof Ce.TFile)){new Ce.Notice(this.t("contextMenus.task.organization.notices.currentTaskNotFound"));return}let o=vi(e.app,s,r.path,"","",e.settings.useFrontmatterMarkdownLinks),l=`[[${s.basename}]]`,c=Array.isArray(r.projects)?r.projects:[];if(c.includes(o)||c.includes(l)){new Ce.Notice(this.t("contextMenus.task.organization.notices.alreadySubtask"));return}let u=[...c.filter(m=>m!==l),o],p=await e.updateTaskProperty(r,"projects",u);Object.assign(r,p),new Ce.Notice(this.t("contextMenus.task.organization.notices.addedAsSubtask",{subtask:r.title,parent:s.basename})),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){console.error("Failed to assign task as subtask:",s),new Ce.Notice(this.t("contextMenus.task.organization.notices.addAsSubtaskFailed"))}}buildProjectReference(t,e,r){return vi(r.app,t,e,"","",r.settings.useFrontmatterMarkdownLinks)}updateMainMenuIconColors(t,e){let r=document.querySelector(".menu");if(!r)return;let a=r.querySelectorAll(".menu-item"),i=this.t("contextMenus.task.status"),s=this.t("contextMenus.task.priority");a.forEach(o=>{let l=o.querySelector(".menu-item-title"),c=o.querySelector(".menu-item-icon");if(l&&c){let d=l.textContent;if(d===i){let u=e.settings.customStatuses.find(p=>p.value===t.status);u&&u.color&&(c.style.color=u.color)}else if(d===s){let u=e.settings.customPriorities.find(p=>p.value===t.priority);u&&u.color&&(c.style.color=u.color)}}})}addStatusOptions(t,e,r){this.getStatusOptions(e,r).forEach((i,s)=>{t.addItem(o=>{let l=i.label;o.setIcon(i.icon||"circle"),i.value===e.status&&(l=this.t("contextMenus.task.statusSelected",{label:i.label})),o.setTitle(l),o.onClick(async()=>{var c,d;try{await r.updateTaskProperty(e,"status",i.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:e.path}),new Ce.Notice(`Failed to update task status: ${p}`)}}),i.color&&setTimeout(()=>{let c=o.dom||o.domEl;if(c){let d=c.querySelector(".menu-item-icon");d&&(d.style.color=i.color)}},10)})})}addPriorityOptions(t,e,r){r.priorityManager.getPrioritiesByWeight().forEach(i=>{t.addItem(s=>{let o=i.label;s.setIcon("star"),i.value===e.priority&&(o=this.t("contextMenus.task.prioritySelected",{label:i.label})),s.setTitle(o),s.onClick(async()=>{var l,c;try{await r.updateTaskProperty(e,"priority",i.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:e.path}),new Ce.Notice(`Failed to update task priority: ${u}`)}}),i.color&&setTimeout(()=>{let l=s.dom||s.domEl;if(l){let c=l.querySelector(".menu-item-icon");c&&(c.style.color=i.color)}},10)})})}addDateOptions(t,e,r,a){let s=new Cn({currentValue:e,onSelect:d=>{r(d)},onCustomDate:a,plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions(),o=s.filter(d=>d.category==="increment");o.length>0&&(o.forEach(d=>{t.addItem(u=>{d.icon&&u.setIcon(d.icon),u.setTitle(d.label),u.onClick(()=>r(d.value))})}),t.addSeparator()),s.filter(d=>d.category==="basic").forEach(d=>{t.addItem(u=>{d.icon&&u.setIcon(d.icon);let m=d.value===e?this.t("contextMenus.date.selected",{label:d.label}):d.label;u.setTitle(m),u.onClick(()=>r(d.value))})});let c=s.filter(d=>d.category==="weekday");c.length>0&&(t.addSeparator(),t.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===e?this.t("contextMenus.date.selected",{label:p.label}):p.label;m.setTitle(f),m.setIcon("calendar"),m.onClick(()=>r(p.value))})})})),t.addSeparator(),t.addItem(d=>{d.setTitle(this.t("contextMenus.date.pickDateTime")),d.setIcon("calendar"),d.onClick(()=>a())}),e&&t.addItem(d=>{d.setTitle(this.t("contextMenus.date.clearDate")),d.setIcon("x"),d.onClick(()=>r(null))})}addRecurrenceOptions(t,e,r,a){let i=new Date,s=["SU","MO","TU","WE","TH","FR","SA"],o=[a.i18n.translate("common.months.january"),a.i18n.translate("common.months.february"),a.i18n.translate("common.months.march"),a.i18n.translate("common.months.april"),a.i18n.translate("common.months.may"),a.i18n.translate("common.months.june"),a.i18n.translate("common.months.july"),a.i18n.translate("common.months.august"),a.i18n.translate("common.months.september"),a.i18n.translate("common.months.october"),a.i18n.translate("common.months.november"),a.i18n.translate("common.months.december")],l=s[i.getDay()],c=i.getDate(),d=i.getMonth()+1,u=o[i.getMonth()],p=i.toLocaleDateString("en-US",{weekday:"long"}),m=v=>{let T=v.getFullYear(),k=String(v.getMonth()+1).padStart(2,"0"),w=String(v.getDate()).padStart(2,"0");return`${T}${k}${w}`},h=v=>{let T=["th","st","nd","rd"],k=v%100;return v+(T[(k-20)%10]||T[k]||T[0])},f=m(i);[{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(v=>{t.addItem(T=>{let k=v.value===e;T.setTitle(k?`\u2713 ${v.label}`:v.label),T.setIcon(v.icon),T.onClick(()=>{r(v.value)})})}),t.addSeparator(),t.addItem(v=>{v.setTitle(this.t("contextMenus.task.customRecurrence")),v.setIcon("settings"),v.onClick(()=>{new ti({currentValue:typeof e=="string"?e:void 0,currentAnchor:this.options.task.recurrence_anchor||"scheduled",onSelect:r,app:a.app,plugin:a}).showCustomRecurrenceModal()})}),e&&t.addItem(v=>{v.setTitle(this.t("contextMenus.task.clearRecurrence")),v.setIcon("x"),v.onClick(()=>{r(null)})})}getStatusOptions(t,e){let r=e.settings.customStatuses,a=[];return r&&r.length>0&&[...r].sort((s,o)=>s.order-o.order).forEach(s=>{a.push({label:s.label,value:s.value,color:s.color,icon:s.icon})}),a}addQuickRemindersSection(t,e,r,a,i){if(!(a==="due"?e.due:e.scheduled)){t.addItem(o=>{o.setTitle(i),o.setIcon("bell"),o.setDisabled(!0)});return}t.addItem(o=>{o.setTitle(i),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(e,r,a,d.offset,p)})})})})}async addQuickReminder(t,e,r,a,i){var l,c;let s={id:`rem_${Date.now()}`,type:"relative",relatedTo:r,offset:a,description:i},o=[...t.reminders||[],s];try{await e.updateTaskProperty(t,"reminders",o),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){console.error("Error adding reminder:",d),new Ce.Notice("Failed to add reminder")}}show(t){this.menu.showAtMouseEvent(t)}showAtElement(t){this.menu.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4})}}});var o$={};Be(o$,{PriorityContextMenu:()=>ri});var ri,nf=b(()=>{ws();ri=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}buildMenu(){let t=this.options.plugin.settings.customPriorities;this.sortedPriorities=[...t].sort((e,r)=>r.weight-e.weight),this.sortedPriorities.forEach(e=>{this.menu.addItem(r=>{let a=e.label;r.setIcon("star"),e.value===this.options.currentValue&&(a=`\u2713 ${e.label}`),r.setTitle(a),r.onClick(async()=>{this.options.onSelect(e.value)})})})}show(t){this.menu.show(t),setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(t){this.menu.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4}),setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let t=document.querySelector(".menu");if(!t)return;let e=t.querySelectorAll(".menu-item");this.sortedPriorities.forEach((r,a)=>{let i=e[a];if(i&&r.color){let s=i.querySelector(".menu-item-icon");s&&(s.style.color=r.color)}})}}});var KE={};Be(KE,{BatchContextMenu:()=>af});var aa,af,qv=b(()=>{aa=require("obsidian");rc();ws();dl();af=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}t(t,e){return this.options.plugin.i18n.translate(t,e)}buildMenu(){let{plugin:t,selectedPaths:e}=this.options,r=e.length;this.menu.addItem(a=>{a.setTitle(`${r} 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 i=a.setSubmenu();this.addStatusOptions(i)}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.priority")),a.setIcon("star");let i=a.setSubmenu();this.addPriorityOptions(i)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.dueDate")),a.setIcon("calendar");let i=a.setSubmenu();this.addDateOptions(i,"due")}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.scheduledDate")),a.setIcon("calendar-clock");let i=a.setSubmenu();this.addDateOptions(i,"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 i,s;(i=this.options.plugin.taskSelectionService)==null||i.clearSelection(),(s=this.options.plugin.taskSelectionService)==null||s.exitSelectionMode()})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(`Delete ${r} tasks`),a.setIcon("trash"),a.onClick(async()=>{await this.batchDelete()})})}addStatusOptions(t){let r=[...this.options.plugin.settings.customStatuses].sort((a,i)=>a.order-i.order);for(let a of r)t.addItem(i=>{i.setTitle(a.label),i.setIcon(a.icon||"circle"),i.onClick(async()=>{await this.batchUpdateProperty("status",a.value)}),a.color&&setTimeout(()=>{let s=i.dom||i.domEl;if(s){let o=s.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}},10)})}addPriorityOptions(t){let e=this.options.plugin.priorityManager.getPrioritiesByWeight();for(let r of e)t.addItem(a=>{a.setTitle(r.label),a.setIcon("star"),a.onClick(async()=>{await this.batchUpdateProperty("priority",r.value)}),r.color&&setTimeout(()=>{let i=a.dom||a.domEl;if(i){let s=i.querySelector(".menu-item-icon");s&&(s.style.color=r.color)}},10)});t.addSeparator(),t.addItem(r=>{r.setTitle(this.t("contextMenus.priority.clearPriority")),r.setIcon("x"),r.onClick(async()=>{await this.batchUpdateProperty("priority",void 0)})})}addDateOptions(t,e){let i=new Cn({currentValue:void 0,onSelect:()=>{},plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions().filter(s=>s.category==="basic");for(let s of i)t.addItem(o=>{s.icon&&o.setIcon(s.icon),o.setTitle(s.label),o.onClick(async()=>{await this.batchUpdateProperty(e,s.value)})});t.addSeparator(),t.addItem(s=>{s.setTitle(this.t("contextMenus.date.clearDate")),s.setIcon("x"),s.onClick(async()=>{await this.batchUpdateProperty(e,void 0)})})}async batchUpdateProperty(t,e){var o,l;let{plugin:r,selectedPaths:a,onUpdate:i}=this.options,s=a.length;try{new aa.Notice(`Updating ${s} tasks...`);let c=0,d=0;for(let u of a)try{let p=await r.cacheManager.getTaskInfo(u);p?(await r.taskService.updateProperty(p,t,e),c++):d++}catch(p){console.error(`[BatchContextMenu] Failed to update task ${u}:`,p),d++}d===0?new aa.Notice(`Updated ${c} tasks`):new aa.Notice(`Updated ${c} tasks, ${d} failed`),(o=r.taskSelectionService)==null||o.clearSelection(),(l=r.taskSelectionService)==null||l.exitSelectionMode(),i==null||i()}catch(c){console.error("[BatchContextMenu] Batch update failed:",c),new aa.Notice("Failed to update tasks")}}async batchArchive(t){var s,o;let{plugin:e,selectedPaths:r,onUpdate:a}=this.options,i=r.length;try{new aa.Notice(`${t?"Archiving":"Unarchiving"} ${i} tasks...`);let l=0,c=0;for(let d of r)try{let u=await e.cacheManager.getTaskInfo(d);u&&u.archived!==t?(await e.toggleTaskArchive(u),l++):u?l++:c++}catch(u){console.error(`[BatchContextMenu] Failed to archive task ${d}:`,u),c++}c===0?new aa.Notice(`${t?"Archived":"Unarchived"} ${l} tasks`):new aa.Notice(`${t?"Archived":"Unarchived"} ${l} tasks, ${c} failed`),(s=e.taskSelectionService)==null||s.clearSelection(),(o=e.taskSelectionService)==null||o.exitSelectionMode(),a==null||a()}catch(l){console.error("[BatchContextMenu] Batch archive failed:",l),new aa.Notice("Failed to archive tasks")}}async batchDelete(){var s,o;let{plugin:t,selectedPaths:e,onUpdate:r}=this.options,a=e.length;if(await $a(t.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 aa.Notice(`Deleting ${a} tasks...`);let l=0,c=0;for(let d of e)try{let u=t.app.vault.getAbstractFileByPath(d);u?(await t.app.vault.trash(u,!0),l++):c++}catch(u){console.error(`[BatchContextMenu] Failed to delete task ${d}:`,u),c++}c===0?new aa.Notice(`Deleted ${l} tasks`):new aa.Notice(`Deleted ${l} tasks, ${c} failed`),(s=t.taskSelectionService)==null||s.clearSelection(),(o=t.taskSelectionService)==null||o.exitSelectionMode(),r==null||r()}catch(l){console.error("[BatchContextMenu] Batch delete failed:",l),new aa.Notice("Failed to delete tasks")}}show(t){this.menu.showAtMouseEvent(t)}showAtPosition(t,e){this.menu.showAtPosition({x:t,y:e})}}});function l$(n){let{task:t,plugin:e,excludeSelector:r,onSingleClick:a,onDoubleClick:i,contextMenuHandler:s}=n,o=null,l=(f=!1)=>{let g=e.app.vault.getAbstractFileByPath(t.path);g instanceof QE.TFile&&(f?e.app.workspace.openLinkText(t.path,"",!0):e.app.workspace.getLeaf(!1).openFile(g))},c=async()=>{await e.openTaskEditModal(t)},d=async f=>{if(a){await a(f);return}if(f.ctrlKey||f.metaKey){l(!0);return}let g=e.settings.singleClickAction;g==="edit"?await c():g==="openNote"&&l(!1)},u=async f=>{if(i){await i(f);return}let g=e.settings.doubleClickAction;g==="edit"?await c():g==="openNote"&&l()};return{clickHandler:async f=>{if(r&&f.target.closest(r))return;let g=e.taskSelectionService;if(g){if(f.shiftKey){f.stopPropagation(),g.isSelectionModeActive()||g.enterSelectionMode(),g.toggleSelection(t.path);return}g.isSelectionModeActive()&&(g.clearSelection(),g.exitSelectionMode())}if(f.stopPropagation(),e.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=e.taskSelectionService;if(f.shiftKey&&g){if(g.isSelectionModeActive()||g.enterSelectionMode(),g.isSelected(t.path)||g.addToSelection(t.path),g.getSelectionCount()>0){let{BatchContextMenu:v}=(qv(),Wa(KE));new v({plugin:e,selectedPaths:g.getSelectedPaths(),onUpdate:()=>{}}).show(f)}return}if(g&&g.getSelectionCount()>1){g.isSelected(t.path)||g.addToSelection(t.path);let{BatchContextMenu:v}=(qv(),Wa(KE));new v({plugin:e,selectedPaths:g.getSelectedPaths(),onUpdate:()=>{}}).show(f);return}g!=null&&g.isSelectionModeActive()&&(g.clearSelection(),g.exitSelectionMode()),s&&await s(f)},cleanup:()=>{o&&(clearTimeout(o),o=null)}}}function c$(n,t){return e=>{t.app.vault.getAbstractFileByPath(n.path)&&t.app.workspace.trigger("hover-link",{event:e,source:"tasknotes-task-card",hoverParent:e.currentTarget,targetEl:e.currentTarget,linktext:n.path,sourcePath:n.path})}}async function d$(n,t,e,r){let a=(c=!1)=>{let d=t.app.vault.getAbstractFileByPath(n.path);d instanceof QE.TFile&&(c?t.app.workspace.openLinkText(n.path,"",!0):t.app.workspace.getLeaf(!1).openFile(d))},i=async()=>{await t.openTaskEditModal(n)},s=async c=>{if(c.ctrlKey||c.metaKey){a(!0);return}let d=t.settings.singleClickAction;d==="edit"?await i():d==="openNote"&&a(!1)},o=async c=>{let d=t.settings.doubleClickAction;d==="edit"?await i():d==="openNote"&&a()};if(t.settings.doubleClickAction==="none"){await s(e);return}let l=Vv.get(r);if(l)clearTimeout(l),Vv.delete(r),await o(e);else{let c=setTimeout(()=>{Vv.delete(r),s(e)},250);Vv.set(r,c)}}var QE,Vv,ZE=b(()=>{QE=require("obsidian");Vv=new Map});function Ss(n,t,e,r,a={}){let{cssClass:i="internal-link",hoverSource:s="tasknotes-property-link",showErrorNotices:o=!1}=a,l=n.createEl("a",{cls:i,text:e,attr:{"data-href":t,role:"link",tabindex:"0"}});l.addEventListener("click",async c=>{c.preventDefault(),c.stopPropagation();try{let d=r.metadataCache.getFirstLinkpathDest(t,"");d instanceof nc.TFile?c.ctrlKey||c.metaKey?r.workspace.openLinkText(t,"",!0):await r.workspace.getLeaf(!1).openFile(d):o&&new nc.Notice(`Note "${e}" not found`)}catch(d){console.error("[TaskNotes] Error opening internal link:",{filePath:t,error:d}),o&&new nc.Notice(`Failed to open note "${e}"`)}}),l.addEventListener("auxclick",async c=>{if(c.button===1){c.preventDefault(),c.stopPropagation();try{r.metadataCache.getFirstLinkpathDest(t,"")instanceof nc.TFile&&r.workspace.openLinkText(t,"",!0)}catch(d){console.error("[TaskNotes] Error opening internal link:",{filePath:t,error:d})}}}),l.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),l.click())}),l.addEventListener("mouseover",c=>{let d=r.metadataCache.getFirstLinkpathDest(t,"");if(d instanceof nc.TFile){let u={event:c,source:s,hoverParent:n,targetEl:l,linktext:t,sourcePath:d.path};r.workspace.trigger("hover-link",u)}})}function $v(n,t,e,r){let a=0,i;for(;(i=ale.exec(t))!==null;){let[o,l,c,d]=i,u=i.index;if(u>a&&n.appendChild(document.createTextNode(t.slice(a,u))),l){let p=l,m=p,h=p;if(p.includes("|")){let[f,g]=p.split("|");m=f,h=g}Ss(n,m,h,e)}else if(c&&d){let p=String(d).trim(),m=String(c).trim();/^[a-z]+:\/\//i.test(p)?n.createEl("a",{text:m,attr:{href:p,target:"_blank",rel:"noopener"}}).classList.add("external-link"):Ss(n,p,m,e)}a=u+o.length}let s=t.slice(a);if(s&&(r!=null&&r.onTagClick)){let o=/(^|\s)(#\w+)/g,l=0,c;for(;(c=o.exec(s))!==null;){let[,d,u]=c,p=c.index;p>l&&n.appendChild(document.createTextNode(s.slice(l,p))),d&&n.appendChild(document.createTextNode(d));let m=n.createEl("a",{cls:"tag",text:u,attr:{href:u,role:"button",tabindex:"0"}});m.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),r.onTagClick(u,h)}),m.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r.onTagClick(u,h))}),l=p+d.length+u.length}l0}function sle(n){return!n||typeof n!="string"?!1:/^\[([^\]]*)\]\(([^)]+)\)$/.test(n)}function ole(n){let t=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!t)return null;let e=t[1].trim(),r=t[2].trim();try{r=decodeURIComponent(r)}catch(a){console.debug("Failed to decode URI component:",r,a)}return{displayText:e,filePath:r}}function Yv(n,t,e){n.innerHTML="",t.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,i)=>{if(i>0&&n.appendChild(document.createTextNode(", ")),n.appendChild(document.createTextNode("+")),ile(a)){let s=a.slice(2,-2),o=s,l=s;if(s.includes("|")){let c=s.split("|");o=c[0].trim(),l=c[1].trim()}Ss(n,o,l,e,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0})}else if(sle(a)){let s=ole(a);s?Ss(n,s.filePath,s.displayText,e,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0}):n.appendChild(document.createTextNode(a))}else n.appendChild(document.createTextNode(a))})}var nc,ale,Gv=b(()=>{nc=require("obsidian"),ale=/\[\[([^[\]]+)\]\]|\[([^\]]+)\]\(([^)]+)\)|<(https?:\/\/[^\s>]+)>|\[([^\]]+)\]\s*\[([^\]]*)\]/g});function u$(n,t,e){if(!t||typeof t!="string")return;let r=lle(t);if(!r)return;let a=n.createEl("a",{cls:"tag",text:r,attr:{href:r,role:"button",tabindex:"0"}});e!=null&&e.onTagClick&&(a.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),e.onTagClick(r,i)}),a.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),e.onTagClick(r,i))}))}function m$(n,t,e){if(typeof t=="string"){u$(n,t,e);return}if(Array.isArray(t)){t.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,i)=>{i>0&&n.appendChild(document.createTextNode(" ")),u$(n,String(a),e)});return}t!=null&&n.appendChild(document.createTextNode(String(t)))}function h$(n,t,e){if(typeof t=="string"){let r=p$(t);if(r){let a=n.createEl("span",{cls:"context-tag",text:r,attr:{role:"button",tabindex:"0"}});e!=null&&e.onTagClick&&(a.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),e.onTagClick(r,i)}),a.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),e.onTagClick(r,i))}))}return}if(Array.isArray(t)){t.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,i)=>{i>0&&n.appendChild(document.createTextNode(", "));let s=p$(a);if(s){let o=n.createEl("span",{cls:"context-tag",text:s,attr:{role:"button",tabindex:"0"}});e!=null&&e.onTagClick&&(o.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),e.onTagClick(s,l)}),o.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),e.onTagClick(s,l))}))}else n.appendChild(document.createTextNode(String(a)))});return}t!=null&&n.appendChild(document.createTextNode(String(t)))}function lle(n){if(!n||typeof n!="string")return null;let t=n.trim();if(!t)return null;let e=t.startsWith("#"),r=t.replace(/[^\p{L}\p{N}_#/-]/gu,"");return e?r.length>1?r:null:r?`#${r}`:null}function p$(n){if(!n||typeof n!="string")return null;let t=n.trim();if(!t)return null;let e=t.startsWith("@"),r=t.replace(/[^\p{L}\p{N}_@/-]/gu,"");return e?r.length>1?r:null:r?`@${r}`:null}var f$=b(()=>{});function dle(n){return cle.includes(n)}function pn(n,t){return n.map(e=>dle(e)?e:e in t.fieldMapper.getMapping()?t.fieldMapper.toUserField(e):e)}function Ds(n,t,e){return e.fieldMapper.isPropertyForField(n,t)}var cle,ko=b(()=>{cle=["tags","blocked","blocking"]});var Es={};Be(Es,{DEFAULT_TASK_CARD_OPTIONS:()=>ex,cleanupTaskCard:()=>Ele,createTaskCard:()=>Ct,refreshParentTaskSubtasks:()=>xle,showDeleteConfirmationModal:()=>Dle,showTaskContextMenu:()=>eu,toggleBlockingTasks:()=>tx,toggleSubtasks:()=>sf,updateTaskCard:()=>Sle});function ac(n){let{container:t,className:e,icon:r,tooltip:a,ariaLabel:i,onClick:s,visible:o=!0}=n;if(!o)return null;let l=t.createEl("div",{cls:e,attr:{"aria-label":i||a}});return(0,Le.setIcon)(l,r),(0,Le.setTooltip)(l,a,{placement:"top"}),s&&l.addEventListener("click",c=>{c.stopPropagation(),s(c)}),l}function JE(n,t,e){let r=n.querySelector(t);if(!e.shouldExist)return r==null||r.remove(),null;if(r)return r.setAttribute("aria-label",e.ariaLabel||e.tooltip),(0,Le.setTooltip)(r,e.tooltip,{placement:"top"}),r;let i=n.querySelector(".task-card__badges")||n.querySelector(".task-card__main-row");return i?ac({container:i,...e}):null}function ule(n,t,e,r,a){return async i=>{i.stopPropagation();try{if(n.recurrence){let s=await t.toggleRecurringTaskComplete(n,a),o=co(s,a),l=t.statusManager.getStatusConfig(o),c=t.statusManager.isCompletedStatus(o);l&&(r.style.borderColor=l.color,l.icon?(r.addClass("task-card__status-dot--icon"),r.empty(),(0,Le.setIcon)(r,l.icon)):(r.removeClass("task-card__status-dot--icon"),r.empty())),ple(e,n,t,c,o)}else{let s=await t.cacheManager.getTaskInfo(n.path);if(!s){new Le.Notice("Task not found");return}let o=s.status||"open",l=t.statusManager.getNextStatus(o);await t.updateTaskProperty(s,"status",l)}}catch(s){let o=s instanceof Error?s.message:String(s);console.error("Error cycling task status:",{error:o,taskPath:n.path}),new Le.Notice(`Failed to update task status: ${o}`)}}}function ple(n,t,e,r,a){var l;let i=["task-card"];r&&i.push("task-card--completed"),t.archived&&i.push("task-card--archived"),e.getActiveTimeSession(t)&&i.push("task-card--actively-tracked"),t.recurrence&&i.push("task-card--recurring"),t.priority&&i.push(`task-card--priority-${t.priority}`),a&&i.push(`task-card--status-${a}`),((l=e.settings)==null?void 0:l.subtaskChevronPosition)==="left"&&i.push("task-card--chevron-left"),n.className=i.join(" "),n.dataset.status=a;let s=n.querySelector(".task-card__title"),o=n.querySelector(".task-card__title-text");s&&s.classList.toggle("completed",r),o&&o.classList.toggle("completed",r)}function mle(n,t){return e=>{e.stopPropagation(),new ri({currentValue:n.priority,onSelect:async a=>{try{await t.updateTaskProperty(n,"priority",a)}catch(i){console.error("Error updating priority:",i),new Le.Notice("Failed to update priority")}},plugin:t}).show(e)}}function b$(n,t){return e=>{e.stopPropagation(),new ti({currentValue:typeof n.recurrence=="string"?n.recurrence:void 0,currentAnchor:n.recurrence_anchor||"scheduled",onSelect:async(a,i)=>{try{await t.updateTaskProperty(n,"recurrence",a||void 0),i!==void 0&&await t.updateTaskProperty(n,"recurrence_anchor",i)}catch(s){console.error("Error updating recurrence:",s),new Le.Notice("Failed to update recurrence")}},app:t.app,plugin:t}).show(e)}}function T$(n,t){return()=>{new ei(t.app,t,n,async r=>{try{await t.updateTaskProperty(n,"reminders",r.length>0?r:void 0)}catch(a){console.error("Error updating reminders:",a),new Le.Notice("Failed to update reminders")}}).open()}}function k$(n,t){return async()=>{try{await t.applyProjectSubtaskFilter(n)}catch(e){console.error("Error filtering project subtasks:",e),new Le.Notice("Failed to filter project subtasks")}}}function w$(n,t,e,r){return async()=>{try{if(!t.expandedProjectsService){new Le.Notice("Service not available. Please try reloading the plugin.");return}let a=t.expandedProjectsService.toggle(n.path);r.classList.toggle("task-card__chevron--expanded",a);let i=a?"Collapse subtasks":"Expand subtasks";r.setAttribute("aria-label",i),(0,Le.setTooltip)(r,i,{placement:"top"}),await sf(e,n,t,a)}catch(a){console.error("Error toggling subtasks:",a),new Le.Notice("Failed to toggle subtasks")}}}function hle(n,t,e,r){return async()=>{let a=r.classList.toggle("task-card__blocking-toggle--expanded");await tx(e,n,t,a)}}function S$(n,t,e,r){n.addEventListener("click",a=>{a.stopPropagation();let i=r==="due"?t.due:t.scheduled;new Cn({currentValue:_e(i||""),currentTime:Hr(i||""),onSelect:async(o,l)=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await e.updateTaskProperty(t,r,c)}catch(c){let d=c instanceof Error?c.message:String(c);console.error(`Error updating ${r} date:`,d);let u=r==="due"?"contextMenus.task.notices.updateDueDateFailure":"contextMenus.task.notices.updateScheduledFailure";new Le.Notice(e.i18n.translate(u,{message:d}))}},plugin:e,app:e.app}).show(a)})}function D$(n){let t=[...rd,"tags","blocked","blocking"];return pn(t,n)}function Xd(n){if(n&&typeof n=="object"&&"icon"in n){let t=n;if(t.icon==="lucide-link"&&"data"in t&&t.data!==null&&t.data!==void 0){let e=String(t.data);if(!e.match(/^[a-z]+:\/\//i)){let a="display"in t&&t.display?String(t.display):null;return a&&a!==e?`[[${e}|${a}]]`:`[[${e}]]`}let r="display"in t&&t.display?String(t.display):null;return r?`[${r}](${e})`:e}return"data"in t&&t.data!==null&&t.data!==void 0?t.data:t.icon==="lucide-calendar"&&"date"in t?t.date:"display"in t&&t.display!==null&&t.display!==void 0?t.display:t.icon==="lucide-file-question"||t.icon==="lucide-help-circle"?"":t.icon?String(t.icon).replace("lucide-",""):""}return n}function fle(n,t,e){try{let r=e.fieldMapper.lookupMappingKey(t);if(r&&r in Kv)return Kv[r](n);if(t in Kv)return Kv[t](n);if(t.startsWith("user:"))return gle(n,t,e);if(n.customProperties&&t in n.customProperties)return Xd(n.customProperties[t]);if(n.customProperties){let a=`file.${t}`;if(a in n.customProperties)return Xd(n.customProperties[a])}if(t.startsWith("file.")&&n.basesData&&typeof n.basesData.getValue=="function")try{let a=n.basesData.getValue(t);if(a!=null)return Xd(a)}catch(a){}if(t.startsWith("formula."))try{let a=n.basesData;if(!a||typeof a.getValue!="function")return"";let i=a.getValue(t);if(i==null)return"";let s=Xd(i);return s!==""?s:""}catch(a){return console.debug(`[TaskNotes] Error computing formula ${t}:`,a),"[Formula Error]"}if(n.basesData&&typeof n.basesData.getValue=="function")try{let a=`note.${t}`,i=n.basesData.getValue(a);if(i!=null)return Xd(i)}catch(a){}if(n.path){let a=E$(n.path,t,e);if(a!==void 0)return a}return null}catch(r){return console.warn(`TaskCard: Error getting property ${t}:`,r),null}}function gle(n,t,e){var s;let r=t.slice(5),a=(s=e.settings.userFields)==null?void 0:s.find(o=>o.id===r);if(!(a!=null&&a.key))return null;let i=n[a.key];return i===void 0&&(i=E$(n.path,a.key,e)),i}function E$(n,t,e){try{let r=e.app.metadataCache.getCache(n);return r!=null&&r.frontmatter?r.frontmatter[t]:void 0}catch(r){console.warn(`TaskCard: Error accessing frontmatter for ${n}:`,r);return}}function x$(n,t,e,r){let a=fle(e,t,r);if(!yle(a))return null;let i=n.createEl("span",{cls:`task-card__metadata-property task-card__metadata-property--${t.replace(":","-")}`});try{let o=r.fieldMapper.lookupMappingKey(t)||t;return o in g$?g$[o](i,a,e,r):t.startsWith("user:")?vle(i,t,a,r):ble(i,t,a,r),!i.textContent&&!i.hasChildNodes()?(i.remove(),null):i}catch(s){return console.warn(`TaskCard: Error rendering property ${t}:`,s),i.textContent=`${t}: (error)`,i}}function yle(n){return n!=null&&!(Array.isArray(n)&&n.length===0)&&!(typeof n=="string"&&n.trim()==="")}function vle(n,t,e,r){var c;let a=t.slice(5),i=(c=r.settings.userFields)==null?void 0:c.find(d=>d.id===a);if(!i){n.textContent=`${a}: (not found)`;return}let s=i.displayName||a;n.createEl("span",{text:`${s}: `});let o=n.createEl("span"),l={metadataCache:r.app.metadataCache,workspace:r.app.workspace};if(typeof e=="string"&&e.trim()!==""){let d=e.trim();if(d.includes("[[")||d.includes("](")||d.includes("#")&&/\s#\w+|#\w+/.test(d))$v(o,d,l);else{let u=v$(e,i);o.textContent=u}}else if(i.type==="list"&&Array.isArray(e))e.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");$v(h,m,l)}else o.appendChild(document.createTextNode(String(u)))}else o.appendChild(document.createTextNode(String(u)))});else{let d=v$(e,i);d.trim()!==""?o.textContent=d:o.textContent="(empty)"}}function ble(n,t,e,r){let a;t.startsWith("formula.")?a=t.substring(8):a=t.charAt(0).toUpperCase()+t.slice(1),n.createEl("span",{text:`${a}: `});let i=n.createEl("span");Array.isArray(e)?e.map(o=>Xd(o)).filter(o=>o!=null&&o!=="").forEach((o,l)=>{l>0&&i.appendChild(document.createTextNode(", ")),y$(i,o,r)}):y$(i,e,r)}function y$(n,t,e){if(typeof t=="string"&&e){let a={metadataCache:e.app.metadataCache,workspace:e.app.workspace};if(t.includes("[[")||t.includes("[")&&t.includes("](")||t.includes("#")&&/\s#\w+|#\w+/.test(t)){$v(n,t,a,{onTagClick:async(i,s)=>{let o=i.startsWith("#")?i.slice(1):i;await e.openTagsPane(`#${o}`)||console.log("Could not open search pane, generic property tag clicked:",i)}});return}n.appendChild(document.createTextNode(t));return}let r;if(typeof t=="object"&&t!==null)if(t instanceof Date)r=kn(t.toISOString(),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});else if(typeof t.toString=="function"&&t.toString()!=="[object Object]")r=t.toString();else{let a=Object.entries(t);a.length<=3?r=a.map(([i,s])=>`${i}: ${s}`).join(", "):r=JSON.stringify(t)}else typeof t=="boolean"?r=t?"\u2713":"\u2717":typeof t=="number"?r=Number.isInteger(t)?String(t):t.toFixed(2):r=String(t);r.length>100&&(r=r.substring(0,97)+"..."),n.appendChild(document.createTextNode(r))}function v$(n,t){if(n==null)return"";try{switch(t.type){case"text":case"number":return String(n);case"date":return kn(String(n),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});case"boolean":return n?"\u2713":"\u2717";case"list":return Array.isArray(n)?n.flat(2).join(", "):String(n);default:return String(n)}}catch(e){return console.warn("TaskCard: Error formatting user property value:",e),String(n)}}function Tle(n,t,e,r){let a=wy(t),i=on(t),s=r.settings.calendarViewSettings.timeFormat,o="";if(a){let l=kn(t,{dateFormat:"",showTime:!0,userTimeFormat:s});o=l.trim()===""?"Due: Today":`Due: Today at ${l}`}else i?o=`Due: ${kn(t,{dateFormat:"MMM d",showTime:!0,userTimeFormat:s})} (overdue)`:o=`Due: ${kn(t,{dateFormat:"MMM d",showTime:!0,userTimeFormat:s})}`;n.textContent=o,n.classList.add("task-card__metadata-date","task-card__metadata-date--due"),i&&n.classList.add("task-card__metadata-date--overdue"),n.dataset.tnAction="edit-date",n.dataset.tnDateType="due",S$(n,e,r,"due")}function kle(n,t,e,r){let a=wy(t),i=on(t),s=r.settings.calendarViewSettings.timeFormat,o="";if(a){let l=kn(t,{dateFormat:"",showTime:!0,userTimeFormat:s});o=l.trim()===""?"Scheduled: Today":`Scheduled: Today at ${l}`}else i?o=`Scheduled: ${kn(t,{dateFormat:"MMM d",showTime:!0,userTimeFormat:s})} (past)`:o=`Scheduled: ${kn(t,{dateFormat:"MMM d",showTime:!0,userTimeFormat:s})}`;n.textContent=o,n.classList.add("task-card__metadata-date","task-card__metadata-date--scheduled"),i&&n.classList.add("task-card__metadata-date--past"),n.dataset.tnAction="edit-date",n.dataset.tnDateType="scheduled",S$(n,e,r,"scheduled")}function C$(n,t){n.style.display=t.length>0?"":"none"}function Ct(n,t,e,r={}){var H,K,ae,ye,Z,Je,Rt,Ye,De;let a={...ex,...r},i=a.targetDate||(()=>{let V=new Date;return new Date(Date.UTC(V.getFullYear(),V.getMonth(),V.getDate()))})(),s=n.recurrence?co(n,i):n.status,o=a.layout||"default",l=document.createElement(o==="inline"?"span":"div");l._taskPath=n.path;let c=t.getActiveTimeSession(n)!==null,d=n.recurrence?((H=n.complete_instances)==null?void 0:H.includes(le(i)))||!1:t.statusManager.isCompletedStatus(s),u=n.recurrence&&((K=n.skipped_instances)==null?void 0:K.includes(le(i)))||!1,p=!!n.recurrence,m=["task-card"];o!=="default"&&m.push(`task-card--layout-${o}`),d&&m.push("task-card--completed"),u&&m.push("task-card--skipped"),n.archived&&m.push("task-card--archived"),c&&m.push("task-card--actively-tracked"),p&&m.push("task-card--recurring"),n.priority&&m.push(`task-card--priority-${n.priority}`),s&&m.push(`task-card--status-${s}`),((ae=t.settings)==null?void 0:ae.subtaskChevronPosition)==="left"&&m.push("task-card--chevron-left"),ms(n.projects||[]).length>0&&m.push("task-card--has-projects"),l.className=m.join(" "),l.dataset.taskPath=n.path,l.dataset.key=n.path,l.dataset.status=s;let f=l.createEl(o==="inline"?"span":"div",{cls:"task-card__main-row"}),g=t.priorityManager.getPriorityConfig(n.priority);g&&l.style.setProperty("--priority-color",g.color);let v=t.statusManager.getStatusConfig(s);v&&l.style.setProperty("--current-status-color",v.color);let T=t.statusManager.getNextStatus(s),k=t.statusManager.getStatusConfig(T);k&&l.style.setProperty("--next-status-color",k.color);let w=null;(!e||e.some(V=>Ds(V,"status",t)))&&(w=f.createEl("span",{cls:"task-card__status-dot"}),v&&(w.style.borderColor=v.color,v.icon&&(w.addClass("task-card__status-dot--icon"),(0,Le.setIcon)(w,v.icon)))),w&&(w.addEventListener("mousedown",V=>{V.preventDefault(),V.stopPropagation()}),w.addEventListener("click",ule(n,t,l,w,i)));let x=!e||e.some(V=>Ds(V,"priority",t));if(n.priority&&g&&x){let V=f.createEl("span",{cls:"task-card__priority-dot",attr:{"aria-label":`Priority: ${g.label}`}});V.style.borderColor=g.color,V.addEventListener("click",mle(n,t))}let I=f.createEl(o==="inline"?"span":"div",{cls:"task-card__content"}),A=o!=="inline"?f.createEl("div",{cls:"task-card__badges"}):null;if(A){if(n.recurrence){let he=`Recurring: ${Wp(n.recurrence)} (click to change)`;ac({container:A,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:he,onClick:b$(n,t)})}if(n.reminders&&n.reminders.length>0){let he=n.reminders.length,ge=he===1?"1 reminder set (click to manage)":`${he} reminders set (click to manage)`;ac({container:A,className:"task-card__reminder-indicator",icon:"bell",tooltip:ge,onClick:T$(n,t)})}if(t.projectSubtasksService.isTaskUsedAsProjectSync(n.path)&&(ac({container:A,className:"task-card__project-indicator",icon:"folder",tooltip:"This task is used as a project (click to filter subtasks)",onClick:k$(n,t)}),(ye=t.settings)!=null&&ye.showExpandableSubtasks)){let he=((Z=t.expandedProjectsService)==null?void 0:Z.isExpanded(n.path))||!1,ge=ac({container:A,className:`task-card__chevron${he?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:he?"Collapse subtasks":"Expand subtasks"});ge&&ge.addEventListener("click",it=>{it.stopPropagation(),w$(n,t,l,ge)()}),he&&sf(l,n,t,!0).catch(it=>{console.error("Error showing initial subtasks:",it)})}if(n.blocking&&n.blocking.length>0){let he=t.i18n.translate("ui.taskCard.blockingToggle",{count:n.blocking.length}),ge=ac({container:A,className:"task-card__blocking-toggle is-visible",icon:"git-branch",tooltip:he});ge&&ge.addEventListener("click",it=>{it.stopPropagation(),hle(n,t,l,ge)()})}}let B=f.createEl("div",{cls:"task-card__context-menu",attr:{"aria-label":"Task options"}});(0,Le.setIcon)(B,"ellipsis-vertical"),(0,Le.setTooltip)(B,"Task options",{placement:"top"}),B.addEventListener("click",async V=>{V.stopPropagation(),V.preventDefault(),await eu(V,n.path,t,i)});let z=I.createEl(o==="inline"?"span":"div",{cls:"task-card__title"}),U=z.createSpan({cls:"task-card__title-text",text:n.title});d&&(z.classList.add("completed"),U.classList.add("completed"));let N=I.createEl(o==="inline"?"span":"div",{cls:"task-card__metadata"}),P=[],_=e||(t.settings.defaultVisibleProperties?pn(t.settings.defaultVisibleProperties,t):D$(t));for(let V of _){if(Ds(V,"status",t)||Ds(V,"priority",t))continue;if(V==="blocked"){if(n.isBlocked){let he=t.i18n.translate("ui.taskCard.blockedBadge"),ge=(Rt=(Je=n.blockedBy)==null?void 0:Je.length)!=null?Rt:0,it=ge>0?`${he} (${ge})`:he,Mt=N.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocked",text:it});(0,Le.setTooltip)(Mt,t.i18n.translate("ui.taskCard.blockedBadgeTooltip"),{placement:"top"}),P.push(Mt)}continue}if(V==="blocking"){if(n.isBlocking){let he=t.i18n.translate("ui.taskCard.blockingBadge"),ge=(De=(Ye=n.blocking)==null?void 0:Ye.length)!=null?De:0,it=ge>0?`${he} (${ge})`:he,Mt=N.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocking",text:it});(0,Le.setTooltip)(Mt,t.i18n.translate("ui.taskCard.blockingBadgeTooltip"),{placement:"top"}),P.push(Mt)}continue}let J=x$(N,V,n,t);J&&P.push(J)}C$(N,P);let{clickHandler:Y,dblclickHandler:Q,contextmenuHandler:W}=l$({task:n,plugin:t,contextMenuHandler:async V=>{let J=l.dataset.taskPath;J&&await eu(V,J,t,i)}});return l.addEventListener("click",Y),l.addEventListener("dblclick",Q),l.addEventListener("contextmenu",W),l.addEventListener("mouseover",c$(n,t)),l}async function eu(n,t,e,r){let a=e.app.vault.getAbstractFileByPath(t),i=()=>{a instanceof Le.TFile&&wle(n,a,e)};try{let s=await e.cacheManager.getTaskInfo(t);if(!s){i();return}new Jd({task:s,plugin:e,targetDate:r,onUpdate:()=>{e.app.workspace.trigger("tasknotes:refresh-views")}}).show(n)}catch(s){let o=s instanceof Error?s.message:String(s);console.error("Error creating context menu:",{error:o,taskPath:t}),new Le.Notice(`Failed to create context menu: ${o}`),i()}}function wle(n,t,e){var i;let r=new Le.Menu,a=!1;try{e.app.workspace.trigger("file-menu",r,t,"tasknotes-bases-view"),a=((i=r.items)==null?void 0:i.length)>0}catch(s){a=!1}a||(r.addItem(s=>{s.setTitle("Open"),s.setIcon("file-text"),s.onClick(()=>{e.app.workspace.getLeaf(!1).openFile(t)})}),r.addItem(s=>{s.setTitle("Open in new tab"),s.setIcon("external-link"),s.onClick(()=>{e.app.workspace.openLinkText(t.path,"",!0)})})),r.showAtMouseEvent(n)}function Sle(n,t,e,r,a={}){var H,K,ae,ye,Z,Je,Rt,Ye;let s={...ex,...a}.targetDate||(()=>{let De=new Date;return new Date(Date.UTC(De.getFullYear(),De.getMonth(),De.getDate()))})(),o=t.recurrence?co(t,s):t.status,l=e.getActiveTimeSession(t)!==null,c=t.recurrence?((H=t.complete_instances)==null?void 0:H.includes(le(s)))||!1:e.statusManager.isCompletedStatus(o),d=t.recurrence&&((K=t.skipped_instances)==null?void 0:K.includes(le(s)))||!1,u=!!t.recurrence,p=["task-card"];c&&p.push("task-card--completed"),d&&p.push("task-card--skipped"),t.archived&&p.push("task-card--archived"),l&&p.push("task-card--actively-tracked"),u&&p.push("task-card--recurring"),t.priority&&p.push(`task-card--priority-${t.priority}`),o&&p.push(`task-card--status-${o}`),((ae=e.settings)==null?void 0:ae.subtaskChevronPosition)==="left"&&p.push("task-card--chevron-left"),n.className=p.join(" "),n.dataset.status=o;let m=n.querySelector(".task-card__main-row"),h=e.priorityManager.getPriorityConfig(t.priority);h&&n.style.setProperty("--priority-color",h.color);let f=e.statusManager.getStatusConfig(o);f&&n.style.setProperty("--current-status-color",f.color);let g=e.statusManager.getNextStatus(o),v=e.statusManager.getStatusConfig(g);v&&n.style.setProperty("--next-status-color",v.color);let T=n.querySelector(".task-card__checkbox");T&&(T.checked=e.statusManager.isCompletedStatus(o));let k=!r||r.some(De=>Ds(De,"status",e)),w=n.querySelector(".task-card__status-dot");if(k){if(w)f&&(w.style.borderColor=f.color);else if(m){let De=m.createEl("span",{cls:"task-card__status-dot"});f&&(De.style.borderColor=f.color),De.addEventListener("click",async J=>{J.stopPropagation();try{if(t.recurrence){let he=await e.toggleRecurringTaskComplete(t,s),ge=co(he,s),it=e.statusManager.getStatusConfig(ge),Mt=e.statusManager.isCompletedStatus(ge);it&&(De.style.borderColor=it.color);let Dt=["task-card"];Mt&&Dt.push("task-card--completed"),t.archived&&Dt.push("task-card--archived"),e.getActiveTimeSession(t)&&Dt.push("task-card--actively-tracked"),t.recurrence&&Dt.push("task-card--recurring"),t.priority&&Dt.push(`task-card--priority-${t.priority}`),ge&&Dt.push(`task-card--status-${ge}`),n.className=Dt.join(" "),n.dataset.status=ge;let za=n.querySelector(".task-card__title-text"),ui=n.querySelector(".task-card__title");za&&za.classList.toggle("completed",Mt),ui&&ui.classList.toggle("completed",Mt)}else{let he=await e.cacheManager.getTaskInfo(t.path);if(!he){new Le.Notice("Task not found");return}let ge=he.status||"open",it=e.statusManager.getNextStatus(ge);await e.updateTaskProperty(he,"status",it)}}catch(he){let ge=he instanceof Error?he.message:String(he);console.error("Error cycling task status:",{error:ge,taskPath:t.path}),new Le.Notice(`Failed to update task status: ${ge}`)}});let V=n.querySelector(".task-card__checkbox");V?V.insertAdjacentElement("afterend",De):m.insertBefore(De,m.firstChild)}}else w&&w.remove();let S=!r||r.some(De=>Ds(De,"priority",e)),x=n.querySelector(".task-card__priority-dot");if(S&&t.priority&&h){if(!x&&m){let De=m.createEl("span",{cls:"task-card__priority-dot",attr:{"aria-label":`Priority: ${h.label}`}});De.style.borderColor=h.color,De.addEventListener("click",he=>{he.stopPropagation(),new ri({currentValue:t.priority,onSelect:async it=>{try{await e.updateTaskProperty(t,"priority",it)}catch(Mt){console.error("Error updating priority:",Mt),new Le.Notice("Failed to update priority")}},plugin:e}).show(he)});let V=n.querySelector(".task-card__status-dot"),J=n.querySelector(".task-card__checkbox");V?V.insertAdjacentElement("afterend",De):J?J.insertAdjacentElement("afterend",De):m.insertBefore(De,m.firstChild)}else if(x){x.style.borderColor=h.color,x.setAttribute("aria-label",`Priority: ${h.label}`);let De=x.cloneNode(!0);De.addEventListener("click",V=>{V.stopPropagation(),new ri({currentValue:t.priority,onSelect:async he=>{try{await e.updateTaskProperty(t,"priority",he)}catch(ge){console.error("Error updating priority:",ge),new Le.Notice("Failed to update priority")}},plugin:e}).show(V)}),x.replaceWith(De)}}else x&&x.remove();let I=n.querySelector(".task-card__badges"),A=t.recurrence?`Recurring: ${Wp(t.recurrence)} (click to change)`:"";JE(n,".task-card__recurring-indicator",{shouldExist:!!t.recurrence,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:A,onClick:b$(t,e)});let B=!!(t.reminders&&t.reminders.length>0),z=((ye=t.reminders)==null?void 0:ye.length)||0,U=z===1?"1 reminder set (click to manage)":`${z} reminders set (click to manage)`;JE(n,".task-card__reminder-indicator",{shouldExist:B,className:"task-card__reminder-indicator",icon:"bell",tooltip:U,onClick:T$(t,e)}),e.projectSubtasksService.isTaskUsedAsProject(t.path).then(De=>{var he,ge,it,Mt;(he=n.querySelector(".task-card__project-indicator-placeholder"))==null||he.remove(),(ge=n.querySelector(".task-card__chevron-placeholder"))==null||ge.remove(),JE(n,".task-card__project-indicator",{shouldExist:De,className:"task-card__project-indicator",icon:"folder",tooltip:"This task is used as a project (click to filter subtasks)",onClick:k$(t,e)});let V=De&&((it=e.settings)==null?void 0:it.showExpandableSubtasks),J=n.querySelector(".task-card__chevron");if(V&&!J){let Dt=((Mt=e.expandedProjectsService)==null?void 0:Mt.isExpanded(t.path))||!1,za=ac({container:I||m,className:`task-card__chevron${Dt?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:Dt?"Collapse subtasks":"Expand subtasks"});za&&za.addEventListener("click",ui=>{ui.stopPropagation(),w$(t,e,n,za)()}),Dt&&sf(n,t,e,!0).catch(ui=>{console.error("Error showing initial subtasks in update:",ui)})}else if(!V&&J){J.remove();let Dt=n.querySelector(".task-card__subtasks");if(Dt){let za=Dt._clickHandler;za&&(Dt.removeEventListener("click",za),delete Dt._clickHandler),Dt.remove()}}}).catch(De=>{console.error("Error checking if task is used as project in update:",De)});let N=n.querySelector(".task-card__blocking-toggle");if(N)if(t.blocking&&t.blocking.length>0){N.classList.add("is-visible"),N.classList.remove("is-hidden");let De=e.i18n.translate("ui.taskCard.blockingToggle",{count:t.blocking.length});N.setAttribute("aria-label",De),(0,Le.setTooltip)(N,De,{placement:"top"}),N.dataset.count=String(t.blocking.length),N.classList.contains("task-card__blocking-toggle--expanded")&&tx(n,t,e,!0).catch(V=>{console.error("Error refreshing blocking tasks:",V)})}else{N.classList.remove("is-visible","task-card__blocking-toggle--expanded"),N.classList.add("is-hidden");let De=n.querySelector(".task-card__blocking");De&&De.remove()}let P=n.querySelector(".task-card__title-text"),_=n.querySelector(".task-card__title"),Y=c;P&&(P.textContent=t.title,P.classList.toggle("completed",Y)),_&&_.classList.toggle("completed",Y);let Q=n.querySelector(".task-card__badge--blocked");Q&&Q.remove();let W=n.querySelector(".task-card__metadata");if(W){W.innerHTML="";let De=[],V=r||(e.settings.defaultVisibleProperties?pn(e.settings.defaultVisibleProperties,e):D$(e));for(let J of V){if(Ds(J,"status",e)||Ds(J,"priority",e))continue;if(J==="blocked"){if(t.isBlocked){let ge=e.i18n.translate("ui.taskCard.blockedBadge"),it=(Je=(Z=t.blockedBy)==null?void 0:Z.length)!=null?Je:0,Mt=it>0?`${ge} (${it})`:ge,Dt=W.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocked",text:Mt});(0,Le.setTooltip)(Dt,e.i18n.translate("ui.taskCard.blockedBadgeTooltip"),{placement:"top"}),De.push(Dt)}continue}if(J==="blocking"){if(t.isBlocking){let ge=e.i18n.translate("ui.taskCard.blockingBadge"),it=(Ye=(Rt=t.blocking)==null?void 0:Rt.length)!=null?Ye:0,Mt=it>0?`${ge} (${it})`:ge,Dt=W.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocking",text:Mt});(0,Le.setTooltip)(Dt,e.i18n.translate("ui.taskCard.blockingBadgeTooltip"),{placement:"top"}),De.push(Dt)}continue}let he=x$(W,J,t,e);he&&De.push(he)}C$(W,De)}}async function Dle(n,t){return new Promise((e,r)=>{new XE(t.app,n,async()=>{try{await t.taskService.deleteTask(n),e()}catch(i){r(i)}}).open()})}function Ele(n){let t=n.querySelector(".task-card__subtasks");if(t){let e=t._clickHandler;e&&(t.removeEventListener("click",e),delete t._clickHandler)}}async function sf(n,t,e,r){try{let a=n.querySelector(".task-card__subtasks");if(r){if(!a){a=document.createElement("div"),a.className="task-card__subtasks";let s=o=>{o.stopPropagation()};a.addEventListener("click",s),a._clickHandler=s,n.appendChild(a)}for(;a.firstChild;)a.removeChild(a.firstChild);let i=a.createEl("div",{cls:"task-card__subtasks-loading",text:e.i18n.translate("contextMenus.task.subtasks.loading")});try{let s=e.app.vault.getAbstractFileByPath(t.path);if(!(s instanceof Le.TFile))throw new Error("Task file not found");if(!e.projectSubtasksService)throw new Error("projectSubtasksService not initialized");let o=await e.projectSubtasksService.getTasksLinkedToProject(s);if(i.remove(),o.length===0){a.createEl("div",{cls:"task-card__subtasks-loading",text:e.i18n.translate("contextMenus.task.subtasks.noSubtasks")});return}let l=e.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})(n);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=Ct(u,e,void 0);p.classList.add("task-card--subtask"),a.appendChild(p)}}catch(s){console.error("Error loading subtasks:",s),i.textContent=e.i18n.translate("contextMenus.task.subtasks.loadFailed")}}else if(a){let i=a._clickHandler;i&&(a.removeEventListener("click",i),delete a._clickHandler),a.remove()}}catch(a){throw console.error("Error in toggleSubtasks:",a),a}}async function tx(n,t,e,r){let a=n.querySelector(".task-card__blocking");if(!r){a&&a.remove();return}a||(a=n.createDiv({cls:"task-card__blocking"}),a.addEventListener("click",s=>s.stopPropagation()),a.addEventListener("dblclick",s=>s.stopPropagation()),a.addEventListener("contextmenu",s=>s.stopPropagation())),a.empty();let i=a.createDiv({cls:"task-card__blocking-loading",text:e.i18n.translate("ui.taskCard.loadingDependencies")});try{let o=(t.blocking?await Promise.all(t.blocking.map(l=>e.cacheManager.getTaskInfo(l))):[]).filter(l=>!!l);if(i.remove(),o.length===0){a.createDiv({cls:"task-card__blocking-empty",text:e.i18n.translate("ui.taskCard.blockingEmpty")});return}o.forEach(l=>{let c=Ct(l,e,void 0);c.classList.add("task-card--dependency"),a.appendChild(c)})}catch(s){console.error("Error loading blocking tasks:",s),i.textContent=e.i18n.translate("ui.taskCard.blockingLoadError")}}async function xle(n,t,e){if(!n||!n.projects||n.projects.length===0)return;let r=0,a=10;for(;rsetTimeout(s,10)),r++}let i=e.querySelectorAll(".task-card__chevron--expanded");for(let s of i){let o=s.closest(".task-card");if(!o)continue;let l=o.dataset.taskPath;if(!l)continue;let c=t.app.vault.getAbstractFileByPath(l);if(!(c instanceof Le.TFile))continue;let d=c.basename;if(n.projects.flat(2).some(p=>{if(p&&typeof p=="string"&&p.startsWith("[[")&&p.endsWith("]]")){let m=p.slice(2,-2).trim(),h=(0,Le.parseLinktext)(m).path,f=t.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 t.cacheManager.getTaskInfo(l);m&&await sf(o,m,t,!0)}catch(m){console.error("Error refreshing parent task subtasks:",m)}}}var Le,ex,Kv,g$,XE,Or=b(()=>{Le=require("obsidian");GE();Dr();gl();Ke();rc();nf();Zd();ZE();Kd();Gv();f$();ko();to();ex={layout:"default"};Kv={due:n=>n.due,scheduled:n=>n.scheduled,projects:n=>n.projects,contexts:n=>n.contexts,tags:n=>n.tags,blocked:n=>n.isBlocked,blocking:n=>n.isBlocking,blockedBy:n=>n.blockedBy,blockingTasks:n=>n.blocking,timeEstimate:n=>n.timeEstimate,timeEntries:n=>n.timeEntries,totalTrackedTime:n=>n.totalTrackedTime,recurrence:n=>n.recurrence,completedDate:n=>n.completedDate,reminders:n=>n.reminders,icsEventId:n=>n.icsEventId,completeInstances:n=>n.complete_instances,skippedInstances:n=>n.skipped_instances,dateCreated:n=>n.dateCreated,dateModified:n=>n.dateModified};g$={due:(n,t,e,r)=>{typeof t=="string"&&Tle(n,t,e,r)},scheduled:(n,t,e,r)=>{typeof t=="string"&&kle(n,t,e,r)},projects:(n,t,e,r)=>{if(Array.isArray(t)){let a={metadataCache:r.app.metadataCache,workspace:r.app.workspace};Yv(n,t,a)}},contexts:(n,t,e,r)=>{Array.isArray(t)&&h$(n,t,{onTagClick:async(i,s)=>{let o=i.startsWith("@")?i.slice(1):i;await r.openTagsPane(`#${o}`)||console.log("Could not open search pane, context clicked:",i)}})},tags:(n,t,e,r)=>{if(Array.isArray(t)){let a=t;r.settings.taskIdentificationMethod==="tag"&&r.settings.hideIdentifyingTagsInCards&&(a=t.filter(i=>!kt.matchesHierarchicalTagExact(i,r.settings.taskTag))),a.length>0&&m$(n,a,{onTagClick:async(s,o)=>{let l=s.startsWith("#")?s.slice(1):s;await r.openTagsPane(`#${l}`)||console.log("Could not open search pane, tag clicked:",s)}})}},timeEstimate:(n,t,e,r)=>{typeof t=="number"&&(n.textContent=`${r.formatTime(t)} estimated`)},totalTrackedTime:(n,t,e,r)=>{typeof t=="number"&&t>0&&(n.textContent=`${r.formatTime(t)} tracked`)},recurrence:(n,t)=>{typeof t=="string"&&(n.textContent=`Recurring: ${Wp(t)}`)},completeInstances:(n,t,e)=>{var r;if(Array.isArray(t)&&t.length>0){let a=t.length,i=((r=e.skipped_instances)==null?void 0:r.length)||0,s=a+i;if(s>0){let o=Math.round(a/s*100);n.textContent=`\u2713 ${a} completed (${o}%)`,n.classList.add("task-card__metadata-pill--completed-instances")}else n.textContent=`\u2713 ${a} completed`,n.classList.add("task-card__metadata-pill--completed-instances")}},skippedInstances:(n,t,e)=>{if(Array.isArray(t)&&t.length>0){let r=t.length;n.textContent=`\u2298 ${r} skipped`,n.classList.add("task-card__metadata-pill--skipped-instances")}},completedDate:(n,t,e,r)=>{typeof t=="string"&&(n.textContent=`Completed: ${kn(t,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`)},dateCreated:(n,t,e,r)=>{typeof t=="string"&&(n.textContent=`Created: ${kn(t,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`)},dateModified:(n,t,e,r)=>{typeof t=="string"&&(n.textContent=`Modified: ${kn(t,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`)},blocked:(n,t,e)=>{var r,a;if(t===!0){let i=(a=(r=e.blockedBy)==null?void 0:r.length)!=null?a:0;n.textContent=i>0?`Blocked (${i})`:"Blocked",n.classList.add("task-card__metadata-pill--blocked")}},blocking:(n,t,e)=>{var r,a;if(t===!0){let i=(a=(r=e.blocking)==null?void 0:r.length)!=null?a:0;n.textContent=i>0?`Blocking (${i})`:"Blocking",n.classList.add("task-card__metadata-pill--blocking")}},blockedBy:(n,t,e,r)=>{if(Array.isArray(t)&&t.length>0){n.createEl("span",{text:"Blocked by: "});let a=n.createEl("span");t.forEach((i,s)=>{var l;s>0&&a.appendChild(document.createTextNode(", "));let o=typeof i=="string"?i:i.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(),r.app.workspace.openLinkText(o,"",!1)})}})}},blockingTasks:(n,t,e,r)=>{if(Array.isArray(t)&&t.length>0){n.createEl("span",{text:"Blocking: "});let a=n.createEl("span");t.forEach((i,s)=>{var l;s>0&&a.appendChild(document.createTextNode(", "));let o=a.createEl("a",{cls:"internal-link",attr:{href:i}});o.textContent=((l=i.split("/").pop())==null?void 0:l.replace(".md",""))||i,o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),r.app.workspace.openLinkText(i,"",!1)})})}},timeEntries:(n,t,e,r)=>{if(Array.isArray(t)&&t.length>0){let a=$r(t);a>0&&(n.textContent=`${r.formatTime(a)} tracked (${t.length} ${t.length===1?"entry":"entries"})`)}},reminders:(n,t)=>{Array.isArray(t)&&t.length>0&&(n.textContent=`${t.length} ${t.length===1?"reminder":"reminders"}`)},icsEventId:(n,t)=>{Array.isArray(t)&&t.length>0&&(n.textContent=`Linked to ${t.length} calendar ${t.length===1?"event":"events"}`)}};XE=class extends Le.Modal{constructor(t,e,r){super(t),this.task=e,this.onConfirm=r}onOpen(){let{contentEl:t}=this;t.empty(),t.createEl("h2",{text:"Delete Task"});let e=t.createEl("p");e.appendText('Are you sure you want to delete the task "'),e.createEl("strong",{text:this.task.title}),e.appendText('"?'),t.createEl("p",{cls:"mod-warning",text:"This action cannot be undone. The task file will be permanently deleted."});let r=t.createEl("div",{cls:"modal-button-container"});r.style.display="flex",r.style.gap="10px",r.style.justifyContent="flex-end",r.style.marginTop="20px";let a=r.createEl("button",{text:"Cancel"});a.addEventListener("click",()=>{this.close()});let i=r.createEl("button",{text:"Delete",cls:"mod-warning"});i.style.backgroundColor="var(--color-red)",i.style.color="white",i.addEventListener("click",async()=>{try{await this.onConfirm(),this.close(),new Le.Notice("Task deleted successfully")}catch(s){let o=s instanceof Error?s.message:String(s);new Le.Notice(`Failed to delete task: ${o}`),console.error("Error in delete confirmation:",s)}}),a.focus()}onClose(){let{contentEl:t}=this;t.empty()}}});var P$={};Be(P$,{TaskSelectorWithCreateModal:()=>of,openTaskSelector:()=>Fr,openTaskSelectorWithCreate:()=>Cle});async function Cle(n,t){let e=await n.cacheManager.getAllTasks();return new Promise(r=>{new of(n.app,n,e,{onResult:r,...t}).open()})}function Fr(n,t,e,r){new of(n.app,n,t,{placeholder:r==null?void 0:r.placeholder,title:r==null?void 0:r.title,onResult:i=>{i.type==="selected"||i.type==="created"?e(i.task):e(null)}}).open()}var Di,of,To=b(()=>{Di=require("obsidian");Ke();Dr();Gd();Or();of=class extends Di.SuggestModal{constructor(e,r,a,i){super(e);this.createFooterEl=null;this.currentQuery="";this.resultHandled=!1;this.handleInputChange=()=>{let e=this.inputEl.value.trim();this.currentQuery=e,this.updateCreateFooter(e)};this.plugin=r,this.tasks=a,this.options=i,this.translate=r.i18n.translate.bind(r.i18n),this.nlParser=na.fromPlugin(r),this.setPlaceholder(i.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(i.title||this.translate("modals.taskSelectorWithCreate.title")),this.titleEl.setAttribute("id","task-selector-with-create-title"),this.containerEl.setAttribute("aria-labelledby","task-selector-with-create-title"),this.containerEl.setAttribute("role","dialog"),this.containerEl.setAttribute("aria-modal","true"),this.containerEl.addClass("task-selector-with-create-modal"),this.containerEl.addClass("tasknotes-plugin")}onOpen(){super.onOpen(),this.scope.register(["Shift"],"Enter",e=>(e.preventDefault(),e.stopPropagation(),this.createNewTask(),!1)),this.inputEl.addEventListener("input",this.handleInputChange),setTimeout(()=>this.createFooter(),0)}createFooter(){var r;let e=((r=this.modalEl.querySelector(".prompt"))==null?void 0:r.parentElement)||this.modalEl;this.createFooterEl=createDiv({cls:"task-selector-create-footer"}),this.createFooterEl.style.display="none",e.appendChild(this.createFooterEl)}updateCreateFooter(e){if(!this.createFooterEl)return;if(!e){this.createFooterEl.style.display="none",this.createFooterEl.empty();return}let r=this.nlParser.parseInput(e);if(r.title&&r.title!=="Untitled Task"){this.createFooterEl.empty(),this.createFooterEl.style.display="flex";let a=this.createFooterEl.createDiv({cls:"task-selector-create-footer__icon"});(0,Di.setIcon)(a,"plus-circle");let i=this.createFooterEl.createDiv({cls:"task-selector-create-footer__content"});i.createDiv({cls:"task-selector-create-footer__title-line"}).createSpan({cls:"task-selector-create-footer__title",text:r.title});let o=this.buildMetadataParts(r);if(o.length>0){let c=i.createDiv({cls:"task-selector-create-footer__meta"});o.forEach(d=>{let u=c.createSpan({cls:`task-selector-create-footer__chip task-selector-create-footer__chip--${d.type}`}),p=u.createSpan({cls:"task-selector-create-footer__chip-icon"});(0,Di.setIcon)(p,d.icon),u.createSpan({cls:"task-selector-create-footer__chip-text",text:d.text})})}let l=i.createDiv({cls:"task-selector-create-footer__hint"});l.createSpan({cls:"task-selector-create-footer__shortcut",text:"\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(e){let r=[];if(e.dueDate){let a=e.dueTime?`${e.dueDate} ${e.dueTime}`:e.dueDate;r.push({icon:"calendar",text:a,type:"due"})}if(e.scheduledDate){let a=e.scheduledTime?`${e.scheduledDate} ${e.scheduledTime}`:e.scheduledDate;r.push({icon:"calendar-clock",text:a,type:"scheduled"})}if(e.priority&&e.priority!=="normal"&&r.push({icon:"flag",text:e.priority,type:"priority"}),e.status){let a=this.plugin.statusManager.getStatusConfig(e.status);r.push({icon:"circle-dot",text:(a==null?void 0:a.label)||e.status,type:"status"})}if(e.contexts&&e.contexts.length>0&&e.contexts.forEach(a=>{r.push({icon:"at-sign",text:a,type:"context"})}),e.projects&&e.projects.length>0&&e.projects.forEach(a=>{r.push({icon:"folder",text:a.replace(/^\[\[|\]\]$/g,""),type:"project"})}),e.tags&&e.tags.length>0&&e.tags.forEach(a=>{r.push({icon:"hash",text:a,type:"tag"})}),e.recurrence&&r.push({icon:"repeat",text:e.recurrence,type:"recurrence"}),e.estimate&&e.estimate>0){let a=Math.floor(e.estimate/60),i=e.estimate%60,s=a>0?`${a}h ${i}m`:`${i}m`;r.push({icon:"timer",text:s,type:"estimate"})}if(e.details){let a=e.details.length>30?e.details.substring(0,30)+"...":e.details;r.push({icon:"file-text",text:a,type:"details"})}if(e.userFields){let a=this.plugin.settings.userFields||[];for(let[i,s]of Object.entries(e.userFields)){let o=a.find(d=>d.id===i),l=(o==null?void 0:o.displayName)||i,c=Array.isArray(s)?s.join(", "):s;r.push({icon:"sliders-horizontal",text:`${l}: ${c}`,type:"userfield"})}}return r}async createNewTask(){let e=this.inputEl.value.trim();if(!e){new Di.Notice(this.translate("modals.taskSelectorWithCreate.notices.emptyQuery"));return}try{let r=this.nlParser.parseInput(e);if(!r.title||r.title==="Untitled Task"){new Di.Notice(this.translate("modals.taskSelectorWithCreate.notices.invalidTitle"));return}let a=this.buildTaskDataFromParsed(r),i=await this.plugin.taskService.createTask(a);new Di.Notice(this.translate("modals.taskCreation.notices.success",{title:i.taskInfo.title})),this.resultHandled=!0,this.close(),this.options.onResult({type:"created",task:i.taskInfo})}catch(r){console.error("Failed to create task:",r);let a=r instanceof Error?r.message:String(r);new Di.Notice(this.translate("modals.taskCreation.notices.failure",{message:a}))}}buildTaskDataFromParsed(e){let r=Oe(),a={title:e.title.trim(),status:e.status||this.plugin.settings.defaultTaskStatus,priority:e.priority||this.plugin.settings.defaultTaskPriority,dateCreated:r,dateModified:r};if(e.dueDate&&(a.due=e.dueTime?hr(e.dueDate,e.dueTime):e.dueDate),e.scheduledDate&&(a.scheduled=e.scheduledTime?hr(e.scheduledDate,e.scheduledTime):e.scheduledDate),e.contexts&&e.contexts.length>0&&(a.contexts=e.contexts),e.projects&&e.projects.length>0&&(a.projects=e.projects),e.tags&&e.tags.length>0&&(a.tags=e.tags.map(i=>Qa(i))),e.details&&(a.details=e.details),e.recurrence&&(a.recurrence=e.recurrence),e.estimate&&e.estimate>0&&(a.timeEstimate=e.estimate),e.userFields){let i=this.plugin.settings.userFields||[],s={};for(let[o,l]of Object.entries(e.userFields)){let c=i.find(d=>d.id===o);c&&(s[c.key]=Array.isArray(l)?l.join(", "):l)}Object.keys(s).length>0&&(a.customFrontmatter=s)}return a}getSuggestions(e){return this.currentQuery=e,this.getFilteredTasks(e)}getFilteredTasks(e){let r=e.toLowerCase();return this.tasks.filter(a=>!a.archived).filter(a=>{var s;return!!(!e||a.title&&a.title.toLowerCase().includes(r)||a.due&&a.due.toLowerCase().includes(r)||a.priority&&a.priority!=="normal"&&a.priority.toLowerCase().includes(r)||(s=a.contexts)!=null&&s.some(o=>o&&o.toLowerCase().includes(r))||ms(a.projects||[]).some(o=>o&&o.toLowerCase().includes(r)))}).sort((a,i)=>{var u,p;let s=this.plugin.statusManager.isCompletedStatus(a.status),o=this.plugin.statusManager.isCompletedStatus(i.status);if(s!==o)return s?1:-1;if(a.due&&!i.due)return-1;if(!a.due&&i.due)return 1;if(a.due&&i.due){let m=a.due.localeCompare(i.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[i.priority])!=null?p:1;return c!==d?c-d:a.title.localeCompare(i.title)})}renderSuggestion(e,r){let a=Ct(e,this.plugin,void 0,{layout:"default"});a.classList.add("task-selector-modal__suggestion");let i=a.cloneNode(!0);r.appendChild(i)}onChooseSuggestion(e,r){this.resultHandled=!0,this.options.onResult({type:"selected",task:e})}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 Xv,A$=b(()=>{ws();Xv=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}buildMenu(){this.getStatusOptions().forEach((e,r)=>{this.menu.addItem(a=>{let i=e.label;a.setIcon(e.icon||"circle"),e.value===this.options.currentValue&&(i=`\u2713 ${e.label}`),a.setTitle(i),a.onClick(async()=>{this.options.onSelect(e.value)})})})}getStatusOptions(){let t=this.options.plugin.settings.customStatuses,e=[];return t&&t.length>0&&[...t].sort((a,i)=>a.order-i.order).forEach(a=>{e.push({label:a.label,value:a.value,color:a.color,icon:a.icon})}),e}capitalizeFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}show(t){this.menu.show(t),setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(t){this.menu.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4}),setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let t=this.getStatusOptions(),e=document.querySelector(".menu");if(!e)return;let r=e.querySelectorAll(".menu-item");t.forEach((a,i)=>{let s=r[i];if(s&&a.color){let o=s.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}})}}});var tu,rx=b(()=>{Kd();ws();tu=class{constructor(t,e,r,a){this.plugin=t,this.task=e,this.triggerElement=r,this.onUpdate=a}show(t){let e=new Mr;this.addQuickRemindersSection(e,"due",this.plugin.i18n.translate("components.reminderContextMenu.remindBeforeDue")),this.addQuickRemindersSection(e,"scheduled",this.plugin.i18n.translate("components.reminderContextMenu.remindBeforeScheduled")),e.addSeparator(),e.addItem(r=>{r.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.manageAllReminders")).setIcon("settings").onClick(()=>{this.openReminderModal()})}),this.task.reminders&&this.task.reminders.length>0&&e.addItem(r=>{r.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.clearAllReminders")).setIcon("trash").onClick(async()=>{await this.clearAllReminders()})}),e.show(t)}addQuickRemindersSection(t,e,r){if(!(e==="due"?this.task.due:this.task.scheduled)){t.addItem(i=>{i.setTitle(r).setIcon("bell").setDisabled(!0)});return}t.addItem(i=>{i.setTitle(r),i.setIcon("bell"),this.addQuickReminderSubmenu(i.setSubmenu(),e)})}addQuickReminderSubmenu(t,e){[{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=>{t.addItem(i=>{i.setTitle(a.label).onClick(async()=>{await this.addQuickReminder(e,a.offset,a.label)})})})}async addQuickReminder(t,e,r){let a={id:`rem_${Date.now()}`,type:"relative",relatedTo:t,offset:e,description:r},i=[...this.task.reminders||[],a];await this.saveReminders(i)}async clearAllReminders(){await this.saveReminders([])}async saveReminders(t){let e;if(this.task.path&&this.task.path.trim()!==""){let r=await this.plugin.cacheManager.getTaskInfo(this.task.path);r?(e={...r,reminders:t},await this.plugin.taskService.updateProperty(e,"reminders",t)):e={...this.task,reminders:t}}else e={...this.task,reminders:t};this.onUpdate(e)}openReminderModal(){new ei(this.plugin.app,this.plugin,this.task,async e=>{await this.saveReminders(e)}).open()}}});function I$(n,t){let e=Object.keys(t).map(r=>Ple(n,r,t[r]));return e.length===1?e[0]:function(){e.forEach(r=>r())}}function Ple(n,t,e){let r=n[t],a=n.hasOwnProperty(t),i=a?r:function(){return Object.getPrototypeOf(n)[t].apply(this,arguments)},s=e(i);return r&&Object.setPrototypeOf(s,r),Object.setPrototypeOf(o,s),n[t]=o,l;function o(...c){return s===i&&n[t]===o&&l(),s.apply(this,c)}function l(){n[t]===o&&(a?n[t]=i:delete n[t]),s!==i&&(s=i,Object.setPrototypeOf(o,r||Function))}}var _$=b(()=>{});function Mle(n){let t=n.embedRegistry.embedByExtension.md({app:n,containerEl:document.createElement("div")},null,"");t.editable=!0,t.showEditor();let e=Object.getPrototypeOf(Object.getPrototypeOf(t.editMode));return t.unload(),e.constructor}function Ale(){return typeof app=="undefined"?class{constructor(t,e,r){this.containerEl=document.createElement("div");this.editorEl=document.createElement("div");this.owner={editMode:null,editor:null};this._loaded=!1;this.app=t,this.containerEl=e}set(t){}onUpdate(t,e){}buildLocalExtensions(){return[]}destroy(){}unload(){}}:Mle(app)}var R$,eb,Cs,N$,ru,nx=b(()=>{R$=require("obsidian"),eb=require("@codemirror/state"),Cs=require("@codemirror/view");_$();N$={cursorLocation:void 0,value:"",cls:"",placeholder:"",onEnter:()=>!1,onEscape:()=>{},onTab:()=>!1,onSubmit:()=>{},onBlur:()=>{},onPaste:()=>{},onChange:()=>{},extensions:[]},ru=class extends Ale(){constructor(t,e,r={}){super(t,e,{app:t,onMarkdownScroll:()=>{},getMode:()=>"source"}),this.options={...N$,...r},this.initial_value=this.options.value,this.scope=new R$.Scope(this.app.scope),this.scope.register(["Mod"],"Enter",(a,i)=>!0),this.owner.editMode=this,this.owner.editor=this.editor,this.set(r.value||""),this.uninstaller=I$(this.app.workspace,{setActiveLeaf:a=>function(...i){var s;(s=this.activeCM)!=null&&s.hasFocus||a.call(this,...i)}}),this.options.onBlur!==N$.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}),r.cls&&this.editorEl.classList.add(r.cls),r.cursorLocation&&this.editor.cm.dispatch({selection:eb.EditorSelection.range(r.cursorLocation.anchor,r.cursorLocation.head)})}get value(){return this.editor.cm.state.doc.toString()}setValue(t){this.set(t)}onUpdate(t,e){super.onUpdate(t,e),e&&this.options.onChange(this.value,t)}buildLocalExtensions(){let t=super.buildLocalExtensions();return t.push(Cs.EditorView.theme({".cm-lineNumbers":{display:"none !important"},".cm-gutters":{display:"none !important"}})),t.push((0,Cs.tooltips)({parent:document.body})),this.options.placeholder&&t.push((0,Cs.placeholder)(this.options.placeholder)),t.push(Cs.EditorView.domEventHandlers({paste:e=>{this.options.onPaste(e,this)}})),t.push(eb.Prec.highest(Cs.keymap.of([{key:"Enter",run:e=>this.options.onEnter(this,!1,!1),shift:e=>this.options.onEnter(this,!1,!0)},{key:"Mod-Enter",run:e=>(this.options.onSubmit(this),!0)},{key:"Escape",run:e=>(this.options.onEscape(this),!0)},{key:"Tab",run:e=>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 cf(n,t){if(!n||!t)return 0;let e=n.toLowerCase().split(" ").filter(Boolean),r=t.toLowerCase(),a=0,i=0;for(let s=0;s0&&l===a&&(i+=5),a=l+o.length}return i}var F$=b(()=>{});var ix={};Be(ix,{FileSuggestHelper:()=>ax});var O$,ax,tb=b(()=>{O$=require("obsidian");F$();gp();Yw();gl();ax={async suggest(n,t,e=20,r){var s,o;let a=async()=>{var T,k,w,S,x,I,A,B,z,U;let l=(k=(T=n==null?void 0:n.app)==null?void 0:T.vault)!=null&&k.getMarkdownFiles?n.app.vault.getMarkdownFiles():[],c=[],d=((x=(S=(w=n.settings)==null?void 0:w.projectAutosuggest)==null?void 0:S.rows)!=null?x:[]).slice(0,3),u=new Set;for(let N of d)try{let P=hi(N);for(let _ of P)_.searchable&&!_.property.startsWith("literal:")&&u.add(_.property)}catch(P){}let p=(t||"").toLowerCase(),m=(I=r==null?void 0:r.requiredTags)!=null?I:[],h=(A=r==null?void 0:r.includeFolders)!=null?A:[],f=vy(r);for(let N of l){let P=n.app.metadataCache.getFileCache(N);if(m.length>0){let H=((B=P==null?void 0:P.tags)==null?void 0:B.map(Z=>Z.tag.replace("#","")))||[],K=((z=P==null?void 0:P.frontmatter)==null?void 0:z.tags)||[],ae=[...H,...Array.isArray(K)?K:[K].filter(Boolean)];if(!kt.matchesTagConditions(ae,m))continue}if(h.length>0&&!h.some(K=>N.path.startsWith(K)||N.path.startsWith(K+"/")))continue;if(f.enabled){let H=P==null?void 0:P.frontmatter;if(!by(H,f))continue}let _=N.basename,Y="";if(P!=null&&P.frontmatter){let H=n.fieldMapper.mapFromFrontmatter(P.frontmatter,N.path,n.settings.storeTitleInFilename);Y=typeof H.title=="string"?H.title:""}let Q=P!=null&&P.frontmatter?(0,O$.parseFrontMatterAliases)(P.frontmatter)||[]:[],W=0;if(W=Math.max(W,cf(t,_)+15),Y&&(W=Math.max(W,cf(t,Y)+5)),Array.isArray(Q))for(let H of Q)typeof H=="string"&&(W=Math.max(W,cf(t,H)));if(u.size>0){let H=(P==null?void 0:P.frontmatter)||{};for(let K of u){let ae="";if(K==="file.path")ae=N.path;else if(K==="file.parent")ae=((U=N.parent)==null?void 0:U.path)||"";else if(K==="file.basename")ae=_;else if(K==="title")ae=Y;else if(K==="aliases")ae=(Array.isArray(Q)?Q.filter(Z=>typeof Z=="string"):[]).join(" ");else{let ye=H[K];ye!=null&&(Array.isArray(ye)?ae=ye.filter(Z=>typeof Z=="string").join(" "):typeof ye=="object"?ae=JSON.stringify(ye):(typeof ye=="string"||typeof ye=="number"||typeof ye=="boolean")&&(ae=String(ye)))}if(ae){let ye=cf(t,ae),Z=ye>0?ye:ae.toLowerCase().includes(p)?30:0;Z>0&&(W=Math.max(W,Z))}}}if(W>0){let H=[];Y&&Y!==_&&H.push(`title: ${Y}`);let K=Array.isArray(Q)?Q.filter(ye=>typeof ye=="string"):[];K.length&&H.push(`aliases: ${K.join(", ")}`);let ae=H.length?`${_} [${H.join(" | ")}]`:_;c.push({insertText:_,displayText:ae,score:W})}}c.sort((N,P)=>P.score-N.score);let g=[],v=new Set;for(let N of c)if(!v.has(N.insertText)&&(g.push(N),v.add(N.insertText),g.length>=e))break;return g},i=(o=(s=n.settings)==null?void 0:s.suggestionDebounceMs)!=null?o:0;return i?new Promise(l=>{let c=n;c.__fileSuggestTimer&&clearTimeout(c.__fileSuggestTimer),c.__fileSuggestTimer=setTimeout(async()=>{let d=await a();l(d)},i)}):a()}}});var Ee,nu,sx,ox,df,lx=b(()=>{Ee=require("obsidian");rc();nf();A$();Zd();rx();Ke();Dr();Py();vd();Gv();To();Hp();nx();nu=class extends Ee.Modal{constructor(e,r){super(e);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=r}createDependencyItemFromFile(e,r={}){var s;let a=(s=r.sourcePath)!=null?s:this.getDependencySourcePath();return{dependency:{uid:Yn(this.plugin.app,a,e.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:$n},path:e.path,name:e.basename}}createDependencyItemFromDependency(e,r){var s;let a=Pl(this.plugin.app,r!=null?r:this.getDependencySourcePath(),e);if(a){let o=((s=a.file)==null?void 0:s.basename)||a.path.split("/").pop()||e.uid;return{dependency:e,path:a.path,name:o}}let i=e.uid.replace(/^\[\[/,"").replace(/\]\]$/,"");return{dependency:e,name:i||e.uid,unresolved:!0}}createDependencyItemFromPath(e){let r=this.getDependencySourcePath(),a=this.plugin.app.vault.getAbstractFileByPath(e);if(a instanceof Ee.TFile)return{dependency:{uid:Yn(this.plugin.app,r,a.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:$n},path:a.path,name:a.basename};let s=(e.split("/").pop()||e).replace(/\.md$/i,"");return{dependency:{uid:`[[${s}]]`,reltype:$n},path:e,name:s,unresolved:!0}}getDependencySourcePath(){var e;return this.getCurrentTaskPath()||((e=this.plugin.app.workspace.getActiveFile())==null?void 0:e.path)||""}getCurrentTaskPath(){}renderDependencyLists(){this.renderBlockedByList(),this.renderBlockingList()}getLinkServices(){return{metadataCache:this.plugin.app.metadataCache,workspace:this.plugin.app.workspace}}renderBlockedByList(){this.renderDependencyList(this.blockedByList,this.blockedByItems,e=>{this.blockedByItems.splice(e,1),this.renderBlockedByList()})}renderBlockingList(){this.renderDependencyList(this.blockingList,this.blockingItems,e=>{this.blockingItems.splice(e,1),this.renderBlockingList()})}renderDependencyList(e,r,a){if(!e||(e.empty(),r.length===0))return;let i=this.getLinkServices();r.forEach((s,o)=>{var p;let l=e.createDiv({cls:"task-project-item"});s.unresolved&&(l.addClass("task-project-item--unresolved"),(0,Ee.setTooltip)(l,this.t("contextMenus.task.dependencies.notices.unresolved",{entries:s.dependency.uid}),{placement:"top"}));let c=l.createDiv({cls:"task-project-info"}),d=c.createSpan({cls:"task-project-name"});if(s.path&&!s.unresolved)d.addClass("clickable-dependency"),Ss(d,s.path.replace(/\.md$/i,""),s.name,i,{cssClass:"task-dependency-link internal-link",hoverSource:"tasknotes-dependency-link",showErrorNotices:!0}),s.path!==s.name&&c.createDiv({cls:"task-project-path",text:s.path});else{d.textContent=s.name;let m=(p=s.path)!=null?p:s.dependency.uid;c.createDiv({cls:"task-project-path",text:m})}let u=l.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,Ee.setTooltip)(u,this.t("modals.task.dependencies.removeTaskTooltip"),{placement:"top"}),u.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation(),a(o)})})}extractDetailsFromContent(e){let{body:r}=Up(e);return r.replace(/\r\n/g,` +`).trimEnd()}normalizeDetails(e){return e.replace(/\r\n/g,` +`)}addBlockedByTask(e){let r={uid:Yn(this.plugin.app,this.getDependencySourcePath(),e.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:$n};this.addBlockedByDependency(r)}addBlockingTask(e){this.addBlockingTaskFromPath(e.path)}addBlockedByDependency(e){let r=this.getDependencySourcePath(),a=this.createDependencyItemFromDependency(e,r);this.blockedByItems.some(s=>s.dependency.uid===a.dependency.uid||a.path&&s.path===a.path)||(this.blockedByItems.push(a),this.renderBlockedByList())}addBlockingTaskFromPath(e){let r=this.getCurrentTaskPath();if(r&&e===r)return;let a=this.createDependencyItemFromPath(e);this.blockingItems.some(s=>s.path===a.path||s.dependency.uid===a.dependency.uid)||(this.blockingItems.push(a),this.renderBlockingList())}async openBlockedBySelector(){let e=this.getDependencySourcePath(),r=this.getCurrentTaskPath(),a=new Set(this.blockedByItems.map(i=>i.dependency.uid));await this.openTaskDependencySelector(i=>{if(r&&i.path===r)return!1;let s=Yn(this.plugin.app,e,i.path,this.plugin.settings.useFrontmatterMarkdownLinks);return!a.has(s)},i=>{let s={uid:Yn(this.plugin.app,e,i.path),reltype:$n};this.addBlockedByDependency(s)})}async openBlockingSelector(){let e=this.getDependencySourcePath(),r=this.getCurrentTaskPath(),a=new Set(this.blockingItems.map(s=>s.path).filter(s=>typeof s=="string")),i=new Set(this.blockingItems.map(s=>s.dependency.uid));await this.openTaskDependencySelector(s=>{if(r&&s.path===r||a.has(s.path))return!1;let o=Yn(this.plugin.app,e,s.path,this.plugin.settings.useFrontmatterMarkdownLinks);return!i.has(o)},s=>{this.addBlockingTaskFromPath(s.path)})}async openTaskDependencySelector(e,r){var a,i,s;try{let l=((s=await((i=(a=this.plugin.cacheManager).getAllTasks)==null?void 0:i.call(a)))!=null?s:[]).filter(e);if(l.length===0){new Ee.Notice(this.t("contextMenus.task.dependencies.notices.noEligibleTasks"));return}Fr(this.plugin,l,c=>{c&&r(c)})}catch(o){console.error("Failed to open task selector for dependencies:",o),new Ee.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}getApp(){return this.app}getPlugin(){return this.plugin}t(e,r){return this.plugin.i18n.translate(e,r)}getFileByPath(e){return this.app.vault.getAbstractFileByPath(e)}getMarkdownFiles(){return this.app.vault.getMarkdownFiles()}getFileCache(e){return this.app.metadataCache.getFileCache(e)}resolveLink(e,r){return this.app.metadataCache.getFirstLinkpathDest(e,r)}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=e=>{if(e.key==="Enter"&&(e.ctrlKey||e.metaKey)){if(e.target.closest(".cm-editor"))return;e.preventDefault(),this.handleSave()}},this.containerEl.addEventListener("keydown",this.keyboardHandler),this.initializeFormData().then(()=>{this.createModalContent(),this.focusTitleInput()})}createModalContent(){let{contentEl:e}=this;e.empty();let r=e.createDiv("minimalist-modal-container");this.splitContentWrapper=r.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(r),this.createAdditionalSections(this.splitLeftColumn),this.createActionButtons(r)}createPrimaryInput(e){this.createTitleInput(e)}createAdditionalSections(e){}createTitleInput(e){let r=e.createDiv("title-input-container");this.titleInput=r.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(e){this.actionBar=e.createDiv("action-bar"),this.createActionIcon(this.actionBar,"calendar",this.t("modals.task.actions.due"),(r,a)=>{this.showDateContextMenu(a,"due")},"due-date"),this.createActionIcon(this.actionBar,"calendar-clock",this.t("modals.task.actions.scheduled"),(r,a)=>{this.showDateContextMenu(a,"scheduled")},"scheduled-date"),this.createActionIcon(this.actionBar,"dot-square",this.t("modals.task.actions.status"),(r,a)=>{this.showStatusContextMenu(a)},"status"),this.createActionIcon(this.actionBar,"star",this.t("modals.task.actions.priority"),(r,a)=>{this.showPriorityContextMenu(a)},"priority"),this.createActionIcon(this.actionBar,"refresh-ccw",this.t("modals.task.actions.recurrence"),(r,a)=>{this.showRecurrenceContextMenu(a)},"recurrence"),this.createActionIcon(this.actionBar,"bell",this.t("modals.task.actions.reminders"),(r,a)=>{this.showReminderContextMenu(a)},"reminders"),this.updateIconStates()}createActionIcon(e,r,a,i,s){let o=e.createDiv("action-icon");o.setAttribute("aria-label",a),o.setAttribute("data-initial-tooltip",a),o.setAttribute("tabindex","0"),o.setAttribute("role","button"),s&&o.setAttribute("data-type",s);let l=o.createSpan("icon");return(0,Ee.setIcon)(l,r),o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),i(o,c)}),o.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),c.stopPropagation(),i(o,c))}),o}createDetailsSection(e){this.detailsContainer=this.splitLeftColumn?this.splitLeftColumn.createDiv("details-container"):e.createDiv("details-container"),this.isExpanded||(this.detailsContainer.style.display="none",this.splitRightColumn&&(this.splitRightColumn.style.display="none"));let r=this.plugin.settings.modalFieldsConfig,a=this.shouldShowField("title",r),i=this.shouldShowField("details",r),s=this.isEditMode(),o=this.isCreationMode()&&this.plugin.settings.enableNaturalLanguageInput;if(a&&(s||o)){let l=this.detailsContainer.createDiv("detail-label");l.textContent=this.t("modals.task.titleLabel");let c=this.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}),(s||o)&&!this.titleInput&&(this.titleInput=c)}if(i){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(e,r){if(!r||!r.fields)return!0;let a=r.fields.find(s=>s.id===e);if(!a)return!0;let i=this.isCreationMode()?a.visibleInCreation:a.visibleInEdit;return a.enabled&&i}createAdditionalFields(e){let r=this.plugin.settings.modalFieldsConfig;if(!r){console.error("TaskModal: modalFieldsConfig is not initialized. This should never happen.");return}this.createFieldsFromConfig(e,r)}createFieldsFromConfig(e,r){let{getFieldsByGroup:a}=(wp(),Wa(sS)),i=a(r,this.isCreationMode()),s=[...r.groups].sort((o,l)=>o.order-l.order);for(let o of s){let l=i.get(o.id);if(!l||l.length===0||o.id==="basic")continue;let c=e.createDiv({cls:"task-modal__field-group"});o.id!=="metadata"&&e.createEl("hr",{cls:"task-modal__section-separator"});for(let d of l)this.createField(c,d)}}createField(e,r){switch(r.id){case"contexts":this.createContextsField(e);break;case"tags":this.createTagsField(e);break;case"time-estimate":this.createTimeEstimateField(e);break;case"projects":this.createProjectsField(e);break;case"subtasks":this.createSubtasksField(e);break;case"blocked-by":this.createBlockedByField(e);break;case"blocking":this.createBlockingField(e);break;default:r.fieldType==="user"&&this.createUserFieldByConfig(e,r);break}}createContextsField(e){new Ee.Setting(e).setName(this.t("modals.task.contextsLabel")).addText(r=>{r.setPlaceholder(this.t("modals.task.contextsPlaceholder")).setValue(this.contexts).onChange(a=>{this.contexts=a}),this.contextsInput=r.inputEl,new sx(this.app,r.inputEl,this.plugin)})}createTagsField(e){new Ee.Setting(e).setName(this.t("modals.task.tagsLabel")).addText(r=>{r.setPlaceholder(this.t("modals.task.tagsPlaceholder")).setValue(this.tags).onChange(a=>{this.tags=Qa(a)}),this.tagsInput=r.inputEl,new ox(this.app,r.inputEl,this.plugin)})}createTimeEstimateField(e){new Ee.Setting(e).setName(this.t("modals.task.timeEstimateLabel")).addText(r=>{r.setPlaceholder(this.t("modals.task.timeEstimatePlaceholder")).setValue(this.timeEstimate.toString()).onChange(a=>{this.timeEstimate=parseInt(a)||0}),this.timeEstimateInput=r.inputEl})}createProjectsField(e){new Ee.Setting(e).setName(this.t("modals.task.organization.projects")).addButton(r=>{r.setButtonText(this.t("modals.task.organization.addToProjectButton")).setTooltip(this.t("modals.task.projectsTooltip")).onClick(()=>{new io(this.app,this.plugin,i=>{this.addProject(i)}).open()}),r.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.projectsList||(this.projectsList=e.createDiv({cls:"task-projects-list"})),this.renderOrganizationLists()}createSubtasksField(e){new Ee.Setting(e).setName(this.t("modals.task.organization.subtasks")).addButton(r=>{r.setButtonText(this.t("modals.task.organization.addSubtasksButton")).setTooltip(this.t("modals.task.organization.addSubtasksTooltip")).onClick(()=>{this.openSubtaskSelector()}),r.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.subtasksList||(this.subtasksList=e.createDiv({cls:"task-projects-list"})),this.renderOrganizationLists()}createBlockedByField(e){new Ee.Setting(e).setName(this.t("modals.task.dependencies.blockedBy")).addButton(r=>{r.setButtonText(this.t("modals.task.dependencies.addTaskButton")).setTooltip(this.t("modals.task.dependencies.selectTaskTooltip")).onClick(()=>{this.openBlockedBySelector()}),r.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.blockedByList||(this.blockedByList=e.createDiv({cls:"task-projects-list"})),this.renderDependencyLists()}createBlockingField(e){new Ee.Setting(e).setName(this.t("modals.task.dependencies.blocking")).addButton(r=>{r.setButtonText(this.t("modals.task.dependencies.addTaskButton")).setTooltip(this.t("modals.task.dependencies.selectTaskTooltip")).onClick(()=>{this.openBlockingSelector()}),r.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),this.blockingList||(this.blockingList=e.createDiv({cls:"task-projects-list"})),this.renderDependencyLists()}createUserFieldByConfig(e,r){var s;let a=(s=this.plugin.settings.userFields)==null?void 0:s.find(o=>o.id===r.id);if(!a)return;let i=new Ee.Setting(e).setName(a.displayName);switch(a.type){case"text":case"list":{i.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 df(this.app,o.inputEl,this.plugin,a)});break}case"number":{i.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":{i.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":{i.addToggle(o=>{let l=this.userFields[a.key];o.setValue(l===!0).onChange(c=>{this.userFields[a.key]=c})});break}}}createUserFields(e){var a;let r=((a=this.plugin.settings)==null?void 0:a.userFields)||[];r.length>0&&e.createDiv({cls:"user-fields-separator"}).createDiv({text:this.t("modals.task.customFieldsLabel"),cls:"detail-label-section"});for(let i of r){if(!i||!i.key||!i.displayName)continue;let s=this.userFields[i.key]||"";switch(i.type){case"boolean":new Ee.Setting(e).setName(i.displayName).addToggle(o=>{o.setValue(s===!0||s==="true").onChange(l=>{this.userFields[i.key]=l})});break;case"number":new Ee.Setting(e).setName(i.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.numberPlaceholder")).setValue(s?String(s):"").onChange(l=>{let c=parseFloat(l);this.userFields[i.key]=isNaN(c)?null:c})});break;case"date":new Ee.Setting(e).setName(i.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.datePlaceholder")).setValue(s?String(s):"").onChange(d=>{this.userFields[i.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:i.displayName})),(0,Ee.setIcon)(c,"calendar"),c.addEventListener("click",d=>{d.preventDefault(),new Cn({currentValue:o.getValue()||void 0,onSelect:p=>{o.setValue(p||""),this.userFields[i.key]=p||null},plugin:this.plugin,app:this.app}).showAtElement(c)}))});break;case"list":new Ee.Setting(e).setName(i.displayName).addText(o=>{var d;let l=Array.isArray(s)?s.join(", "):s?String(s):"";o.setPlaceholder(this.t("modals.task.userFields.listPlaceholder")).setValue(l).onChange(u=>{u.trim()?this.userFields[i.key]=u.split(",").map(p=>p.trim()).filter(p=>p):this.userFields[i.key]=null}),new df(this.app,o.inputEl,this.plugin,i);let c=e.querySelector(".user-field-link-preview");c&&((d=c.detach)==null||d.call(c))});break;case"text":default:new Ee.Setting(e).setName(i.displayName).addText(o=>{o.setPlaceholder(this.t("modals.task.userFields.textPlaceholder",{field:i.displayName})).setValue(s?String(s):"").onChange(l=>{this.userFields[i.key]=l||null}),new df(this.app,o.inputEl,this.plugin,i)});break}}}createActionButtons(e){let r=e.createDiv("modal-button-container");this.isEditMode()&&r.createEl("button",{cls:"open-note-button",text:this.t("modals.task.buttons.openNote")}).addEventListener("click",async()=>{await this.openTaskNote()});let a=r.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}}),r.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(e,r){let a=r==="due"?this.dueDate:this.scheduledDate,i=r==="due"?this.t("modals.task.dateMenu.dueTitle"):this.t("modals.task.dateMenu.scheduledTitle");new Cn({currentValue:a?_e(a):void 0,currentTime:a?Hr(a):void 0,title:i,plugin:this.plugin,app:this.app,onSelect:(o,l)=>{if(o){let c=l?hr(o,l):o;r==="due"?this.dueDate=c:this.scheduledDate=c}else r==="due"?this.dueDate="":this.scheduledDate="";this.updateDateIconState()}}).show(e)}showStatusContextMenu(e){new Xv({currentValue:this.status,onSelect:a=>{this.status=a,this.updateStatusIconState()},plugin:this.plugin}).show(e)}showPriorityContextMenu(e){new ri({currentValue:this.priority,onSelect:a=>{this.priority=a,this.updatePriorityIconState()},plugin:this.plugin}).show(e)}showRecurrenceContextMenu(e){new ti({currentValue:this.recurrenceRule,currentAnchor:this.recurrenceAnchor,onSelect:(a,i)=>{this.recurrenceRule=a||"",i!==void 0&&(this.recurrenceAnchor=i),this.updateRecurrenceIconState()},app:this.app,plugin:this.plugin}).show(e)}showReminderContextMenu(e){let r={title:this.title,status:this.status,priority:this.priority,due:this.dueDate,scheduled:this.scheduledDate,path:"",archived:!1,reminders:this.reminders};new tu(this.plugin,r,e.target,i=>{this.reminders=i.reminders||[],this.updateReminderIconState()}).show(e)}updateDateIconState(){this.updateIconStates()}updateStatusIconState(){this.updateIconStates()}updatePriorityIconState(){this.updateIconStates()}updateRecurrenceIconState(){this.updateIconStates()}updateReminderIconState(){this.updateIconStates()}getDefaultStatus(){let e=this.plugin.settings.customStatuses;return e&&e.length>0?[...e].sort((a,i)=>a.order-i.order)[0].value:"open"}getDefaultPriority(){let e=this.plugin.settings.customPriorities;return e&&e.length>0?[...e].sort((a,i)=>a.weight-i.weight)[0].value:"normal"}getRecurrenceDisplayText(){if(!this.recurrenceRule)return"";let e=this.recurrenceRule;if(e.includes("FREQ=DAILY"))return"Daily";if(e.includes("FREQ=WEEKLY")){if(e.includes("INTERVAL=2"))return"Every 2 weeks";if(e.includes("BYDAY=MO,TU,WE,TH,FR"))return"Weekdays";if(e.includes("BYDAY=")){let a=e.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(e.includes("FREQ=MONTHLY")){if(e.includes("INTERVAL=3"))return"Every 3 months";if(e.includes("BYMONTHDAY=")){let a=e.match(/BYMONTHDAY=(\d+)/);return a?`Monthly on the ${this.getOrdinal(parseInt(a[1]))}`:"Monthly"}else return e.includes("BYDAY=")?"Monthly (by weekday)":"Monthly"}else if(e.includes("FREQ=YEARLY")){if(e.includes("BYMONTH=")&&e.includes("BYMONTHDAY=")){let a=e.match(/BYMONTH=(\d+)/),i=e.match(/BYMONTHDAY=(\d+)/);if(a&&i){let o=["","January","February","March","April","May","June","July","August","September","October","November","December"][parseInt(a[1])],l=this.getOrdinal(parseInt(i[1]));return`Yearly on ${o} ${l}`}}return"Yearly"}let r="";if(e.includes("COUNT=")){let a=e.match(/COUNT=(\d+)/);a&&(r=` (${a[1]} times)`)}else if(e.includes("UNTIL=")){let a=e.match(/UNTIL=(\d{8})/);if(a){let i=a[1];r=` (until ${`${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}`})`}}return"Custom"+r}getOrdinal(e){let r=["th","st","nd","rd"],a=e%100;return e+(r[(a-20)%10]||r[a]||r[0])}updateIconStates(){if(!this.actionBar)return;let e=this.actionBar.querySelector('[data-type="due-date"]');e&&(this.dueDate?(e.classList.add("has-value"),(0,Ee.setTooltip)(e,this.t("modals.task.tooltips.dueValue",{value:this.dueDate}),{placement:"top"})):(e.classList.remove("has-value"),(0,Ee.setTooltip)(e,this.t("modals.task.actions.due"),{placement:"top"})));let r=this.actionBar.querySelector('[data-type="scheduled-date"]');r&&(this.scheduledDate?(r.classList.add("has-value"),(0,Ee.setTooltip)(r,this.t("modals.task.tooltips.scheduledValue",{value:this.scheduledDate}),{placement:"top"})):(r.classList.remove("has-value"),(0,Ee.setTooltip)(r,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,Ee.setTooltip)(a,this.t("modals.task.tooltips.statusValue",{value:c}),{placement:"top"})):(a.classList.remove("has-value"),(0,Ee.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 i=this.actionBar.querySelector('[data-type="priority"]');if(i){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()?(i.classList.add("has-value"),(0,Ee.setTooltip)(i,this.t("modals.task.tooltips.priorityValue",{value:c}),{placement:"top"})):(i.classList.remove("has-value"),(0,Ee.setTooltip)(i,this.t("modals.task.actions.priority"),{placement:"top"}));let d=i.querySelector(".icon");d&&l&&l.color?d.style.color=l.color:d&&(d.style.color="")}let s=this.actionBar.querySelector('[data-type="recurrence"]');s&&(this.recurrenceRule&&this.recurrenceRule.trim()?(s.classList.add("has-value"),(0,Ee.setTooltip)(s,this.t("modals.task.tooltips.recurrenceValue",{value:this.getRecurrenceDisplayText()}),{placement:"top"})):(s.classList.remove("has-value"),(0,Ee.setTooltip)(s,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,Ee.setTooltip)(o,c,{placement:"top"})}else o.classList.remove("has-value"),(0,Ee.setTooltip)(o,this.t("modals.task.actions.reminders"),{placement:"top"})}focusTitleInput(){setTimeout(()=>{this.titleInput.focus(),this.titleInput.select()},100)}addProject(e){this.selectedProjectItems.some(r=>{var a;return((a=r.file)==null?void 0:a.path)===e.path})||(e instanceof Ee.TFile&&this.selectedProjectItems.push({file:e,name:e.basename,link:this.buildProjectReference(e,this.getCurrentTaskPath()||"")}),this.updateProjectsFromFiles(),this.renderProjectsList())}removeProject(e){this.selectedProjectItems=this.selectedProjectItems.filter(r=>r!==e),this.updateProjectsFromFiles(),this.renderProjectsList()}updateProjectsFromFiles(){this.projects=this.selectedProjectItems.map(e=>e.link).join(", ")}buildProjectReference(e,r){return vi(this.app,e,r,"","",this.plugin.settings.useFrontmatterMarkdownLinks)}initializeProjectsFromStrings(e){this.selectedProjectItems=[];let r=this.getCurrentTaskPath()||"";for(let a of e){if(!a||typeof a!="string"||a.trim()==="")continue;let i=a.match(/^\[\[([^\]]+)\]\]$/);if(i){let s=i[1],o=this.resolveLink(s,r);if(o)this.selectedProjectItems.push({file:o,name:o.basename,link:a});else{let l=s.split("|")[0];this.selectedProjectItems.push({name:l,link:a,unresolved:!0})}}else{let s=a.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(s){let o=Cl(a),l=this.resolveLink(o,r);if(l)this.selectedProjectItems.push({file:l,name:l.basename,link:a});else{let c=s[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(e=>{let r=this.projectsList.createDiv({cls:"task-project-item"});e.unresolved&&r.addClass("task-project-item--unresolved");let a=r.createDiv({cls:"task-project-info"}),i=a.createDiv({cls:"task-project-name clickable-project"});if(e.file){let o=RS(this.app,e.file,this.getCurrentTaskPath()||"",e.file.name);if(this.renderProjectLinksWithoutPrefix(i,[o]),e.file.path!==e.file.name){let l=a.createDiv({cls:"task-project-path"});l.textContent=e.file.path}}else i.textContent=e.name,(0,Ee.setTooltip)(i,this.t("contextMenus.task.dependencies.notices.unresolved",{name:e.name}),{placement:"top"});let s=r.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,Ee.setTooltip)(s,this.t("modals.task.projectsRemoveTooltip"),{placement:"top"}),s.addEventListener("click",()=>{this.removeProject(e)})}))}async openSubtaskSelector(){var e,r,a;try{let i=this.plugin.cacheManager,s=(r=await((e=i==null?void 0:i.getAllTasks)==null?void 0:e.call(i)))!=null?r:[],o=this.isEditMode()?(a=this.task)==null?void 0:a.path:void 0,l=s.filter(c=>o&&c.path===o?!1:!this.selectedSubtaskFiles.some(d=>d.path===c.path));if(l.length===0){new Ee.Notice(this.t("modals.task.organization.notices.noEligibleSubtasks"));return}Fr(this.plugin,l,async c=>{if(!c)return;let d=this.app.vault.getAbstractFileByPath(c.path);d&&this.addSubtask(d)})}catch(i){console.error("Failed to open subtask selector:",i),new Ee.Notice(this.t("modals.task.organization.notices.subtaskSelectFailed"))}}addSubtask(e){this.selectedSubtaskFiles.some(r=>r.path===e.path)||(this.selectedSubtaskFiles.push(e),this.renderSubtasksList())}removeSubtask(e){this.selectedSubtaskFiles=this.selectedSubtaskFiles.filter(r=>r.path!==e.path),this.renderSubtasksList()}renderSubtasksList(){this.subtasksList&&(this.subtasksList.empty(),this.selectedSubtaskFiles.length!==0&&this.selectedSubtaskFiles.forEach(e=>{if(!(e instanceof Ee.TFile))return;let r=this.subtasksList.createDiv({cls:"task-project-item"}),a=r.createDiv({cls:"task-project-info"}),i=a.createDiv({cls:"task-project-name clickable-project"}),s=RS(this.app,e,this.getCurrentTaskPath()||"",e.name);if(this.renderProjectLinksWithoutPrefix(i,[s]),e.path!==e.name){let l=a.createDiv({cls:"task-project-path"});l.textContent=e.path}let o=r.createEl("button",{cls:"task-project-remove",text:"\xD7"});(0,Ee.setTooltip)(o,this.t("modals.task.organization.removeSubtaskTooltip"),{placement:"top"}),o.addEventListener("click",()=>{this.removeSubtask(e)})}))}renderOrganizationLists(){this.renderProjectsList(),this.renderSubtasksList()}renderProjectLinksWithoutPrefix(e,r){let a={metadataCache:this.app.metadataCache,workspace:this.app.workspace};Yv(e,r,a),Array.from(e.childNodes).forEach(i=>{var s;i.nodeType===Node.TEXT_NODE&&((s=i.textContent)==null?void 0:s.trim())==="+"&&i.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(e,r){try{return new ru(this.app,e,r)}catch(a){console.error("Failed to create markdown editor:",a);let i=e.createEl("textarea",{cls:r.cls+"-fallback",placeholder:r.placeholder});return i.value=r.value,i.addEventListener("input",s=>{r.onChange(s.target.value)}),i.addEventListener("keydown",s=>{s.key==="Enter"&&(s.ctrlKey||s.metaKey)?(s.preventDefault(),r.onSubmit()):s.key==="Escape"?(s.preventDefault(),r.onEscape()):s.key==="Tab"&&r.onTab()&&s.preventDefault()}),null}}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null),this.detailsMarkdownEditor&&(this.detailsMarkdownEditor.destroy(),this.detailsMarkdownEditor=null),super.onClose()}},sx=class extends Ee.AbstractInputSuggest{constructor(t,e,r){super(t,e),this.plugin=r,this.input=e}async getSuggestions(t){let e=this.input.value.split(",").map(i=>i.trim()),r=e[e.length-1];return r?this.plugin.cacheManager.getAllContexts().filter(i=>i&&typeof i=="string").filter(i=>i.toLowerCase().includes(r.toLowerCase())&&!e.slice(0,-1).includes(i)).slice(0,10).map(i=>({value:i,display:i,type:"context",toString(){return this.value}})):[]}renderSuggestion(t,e){e.textContent=t.display}selectSuggestion(t){let e=this.input.value.split(",").map(r=>r.trim());e[e.length-1]=t.value,this.input.value=e.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},ox=class extends Ee.AbstractInputSuggest{constructor(t,e,r){super(t,e),this.plugin=r,this.input=e}async getSuggestions(t){let e=this.input.value.split(",").map(i=>i.trim()),r=e[e.length-1];return r?this.plugin.cacheManager.getAllTags().filter(i=>i&&typeof i=="string").filter(i=>i.toLowerCase().includes(r.toLowerCase())&&!e.slice(0,-1).includes(i)).slice(0,10).map(i=>({value:i,display:i,type:"tag",toString(){return this.value}})):[]}renderSuggestion(t,e){e.textContent=t.display}selectSuggestion(t){let e=this.input.value.split(",").map(r=>r.trim());e[e.length-1]=t.value,this.input.value=e.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},df=class extends Ee.AbstractInputSuggest{constructor(t,e,r,a){super(t,e),this.plugin=r,this.input=e,this.fieldConfig=a}async getSuggestions(t){let e=this.fieldConfig.type==="list",r="",a=[];if(e?(a=this.input.value.split(",").map(o=>o.trim()),r=a[a.length-1]||""):r=this.input.value.trim(),!r)return[];let i=r.match(/\[\[([^\]]*)$/);if(i){let o=i[1]||"",{FileSuggestHelper:l}=await Promise.resolve().then(()=>(tb(),ix));return(await l.suggest(this.plugin,o,20,this.fieldConfig.autosuggestFilter)).map(d=>({value:d.insertText,display:d.displayText,type:"user-field",fieldKey:this.fieldConfig.key,toString(){return this.value}}))}return(await this.getExistingUserFieldValues(this.fieldConfig.key)).filter(o=>o&&typeof o=="string").filter(o=>o.toLowerCase().includes(r.toLowerCase())&&(!e||!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(t){var a,i;let e=async()=>{try{let s=this.plugin.app.vault.getMarkdownFiles(),o=new Set;for(let l of s)try{let c=this.plugin.app.metadataCache.getFileCache(l),d=c==null?void 0:c.frontmatter;if(d&&d[t]!==void 0){let u=d[t];Array.isArray(u)?u.forEach(p=>{typeof p=="string"&&p.trim()&&o.add(p.trim())}):typeof u=="string"&&u.trim()?o.add(u.trim()):(typeof u=="number"||typeof u=="boolean")&&o.add(u.toString())}if(o.size>=200)break}catch(c){continue}return Array.from(o).sort()}catch(s){return console.error("Error getting user field values:",s),[]}},r=(i=(a=this.plugin.settings)==null?void 0:a.suggestionDebounceMs)!=null?i:0;return r?new Promise(s=>{let o=this.plugin;o.__userFieldSuggestTimer&&clearTimeout(o.__userFieldSuggestTimer),o.__userFieldSuggestTimer=setTimeout(async()=>{let l=await e();s(l)},r)}):e()}renderSuggestion(t,e){e.textContent=t.display}selectSuggestion(t){var r;if(this.fieldConfig.type==="list"){let a=this.input.value.split(","),i=(r=a.pop())!=null?r:"",s=a.join(","),o=i.trim(),l=/\[\[/.test(o)?o.replace(/\[\[[^\]]*$/,`[[${t.value}]]`):t.value,c=(s?s+", ":"")+l;this.input.value=c.endsWith(",")?c+" ":c+", "}else{let a=this.input.value,i=a.replace(/\[\[[^\]]*$/,`[[${t.value}]]`);this.input.value=i===a?t.value:i}this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}}});function L$(n,t){if(!n||!t)throw new Error("Invalid context or settings provided");if(!n.title||typeof n.title!="string")throw new Error("Context must have a valid title");if(n.title.trim().length===0)throw new Error("Title cannot be empty");let e=n.date||new Date;if(!(e instanceof Date)||isNaN(e.getTime()))throw new Error("Invalid date provided in context");try{let r=t.icsIntegration;if(r)switch(r.icsNoteFilenameFormat){case"title":return Qr(n.title);case"zettel":return ic(e);case"timestamp":return B$(e);case"custom":{let a={icsEventTitle:n.icsEventTitle?Qr(n.icsEventTitle):Qr(n.title),icsEventLocation:n.icsEventLocation?Qr(n.icsEventLocation):"",icsEventDescription:n.icsEventDescription?Qr(n.icsEventDescription.substring(0,50)):"",icsEventTitleWithDate:Qr(`${n.icsEventTitle||n.title} - ${M(e,"PPP")}`)};return j$(n,r.customICSNoteFilenameTemplate,e,a)}default:return Qr(n.title)}return Qr(n.title)}catch(r){return console.error("Error generating ICS note filename:",r),Qr(n.title)}}function rb(n,t){if(!n||!t)throw new Error("Invalid context or settings provided");if(!n.title||typeof n.title!="string")throw new Error("Context must have a valid title");if(n.title.trim().length===0)throw new Error("Title cannot be empty");let e=n.date||new Date;if(!(e instanceof Date)||isNaN(e.getTime()))throw new Error("Invalid date provided in context");if(t.storeTitleInFilename)return Qr(n.title);try{switch(t.taskFilenameFormat){case"title":return Qr(n.title);case"zettel":return ic(e);case"timestamp":return B$(e);case"custom":return j$(n,t.customFilenameTemplate,e);default:return ic(e)}}catch(r){return console.error("Error generating filename:",r),ic(e)}}function ic(n){let t=M(n,"yyMMdd"),e=new Date(n);e.setHours(0,0,0,0);let a=Math.floor((n.getTime()-e.getTime())/1e3).toString(36);return`${t}${a}`}function B$(n){return M(n,"yyyy-MM-dd-HHmmss")}function j$(n,t,e,r){if(!n||!t||!e)throw new Error("Invalid inputs for custom filename generation");if(typeof t!="string"||t.trim().length===0)throw new Error("Template must be a non-empty string");if(!(e instanceof Date)||isNaN(e.getTime()))throw new Error("Invalid date for filename generation");try{let a=Qr(n.title),i=n.priority&&["low","normal","medium","high"].includes(n.priority)?n.priority:"normal",s=n.status&&["open","in-progress","done","scheduled"].includes(n.status)?n.status:"open",o={title:a,date:M(e,"yyyy-MM-dd"),time:M(e,"HHmmss"),priority:i,status:s,timestamp:M(e,"yyyy-MM-dd-HHmmss"),dateTime:M(e,"yyyy-MM-dd-HHmm"),year:M(e,"yyyy"),month:M(e,"MM"),day:M(e,"dd"),hour:M(e,"HH"),minute:M(e,"mm"),second:M(e,"ss"),dueDate:n.dueDate||"",scheduledDate:n.scheduledDate||"",shortDate:M(e,"yyMMdd"),monthName:M(e,"MMMM"),monthNameShort:M(e,"MMM"),dayName:M(e,"EEEE"),dayNameShort:M(e,"EEE"),week:M(e,"ww"),quarter:M(e,"q"),time12:M(e,"hh:mm a"),time24:M(e,"HH:mm"),hourPadded:M(e,"HH"),hour12:M(e,"hh"),ampm:M(e,"a"),unix:Math.floor(e.getTime()/1e3).toString(),unixMs:e.getTime().toString(),milliseconds:M(e,"SSS"),ms:M(e,"SSS"),timezone:M(e,"xxx"),timezoneShort:M(e,"xx"),utcOffset:M(e,"xxx"),utcOffsetShort:M(e,"xx"),utcZ:"Z",priorityShort:i.substring(0,1).toUpperCase(),statusShort:s.substring(0,1).toUpperCase(),titleLower:a.toLowerCase(),titleUpper:a.toUpperCase(),titleSnake:a.toLowerCase().replace(/\s+/g,"_"),titleKebab:a.toLowerCase().replace(/\s+/g,"-"),titleCamel:a.replace(/(?:^\w|[A-Z]|\b\w)/g,(c,d)=>d===0?c.toLowerCase():c.toUpperCase()).replace(/\s+/g,""),titlePascal:a.replace(/(?:^\w|[A-Z]|\b\w)/g,c=>c.toUpperCase()).replace(/\s+/g,""),zettel:ic(e),nano:Date.now().toString()+Math.random().toString(36).substring(2,7),...r||{}},l=t;if(t.length>500)throw new Error("Template too long");return Object.entries(o).forEach(([c,d])=>{try{let u=new RegExp(`\\{${c}\\}`,"g");l=l.replace(u,d)}catch(u){console.warn(`Error replacing template variable ${c}:`,u)}}),l=l.replace(/\{[^}]+\}/g,""),l.trim()||(l=a||ic(e)),Qr(l)}catch(a){return console.error("Error generating custom filename:",a),Qr(n.title)||ic(e)}}function Qr(n){if(!n||typeof n!="string")return"untitled";try{let t=n.trim().replace(/\s+/g," ").replace(/[<>:"/\\|?*#[\]]/g,"").replace(/./g,r=>{let a=r.charCodeAt(0);return a<=31||a>=127&&a<=159?"":r}).replace(/^\.+|\.+$/g,"").trim();return(!t||t.length===0)&&(t="untitled"),["CON","PRN","AUX","NUL","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"].includes(t.toUpperCase())&&(t=`task-${t}`),t}catch(t){return console.error("Error sanitizing filename:",t),"untitled"}}async function uf(n,t,e){if(!n||typeof n!="string")throw new Error("Base filename must be a non-empty string");if(typeof t!="string")throw new Error("Folder path must be a string");if(!e)throw new Error("Vault must be provided");let r=Qr(n);if(!r)throw new Error("Base filename cannot be sanitized to a valid name");let a=t.replace(/\.\./g,"").trim();try{let i=(0,cx.normalizePath)(`${a}/${r}.md`);if(i.length>260)throw new Error("Generated path too long");if(!e.getAbstractFileByPath(i))return r;for(let l=2;l<=999;l++){let c=`${r}-${l}`,d=(0,cx.normalizePath)(`${a}/${c}.md`);if(d.length>260)break;if(!e.getAbstractFileByPath(d))return c}let s=Date.now().toString(36),o=`${r.substring(0,50)}-${s}`;return Qr(o)}catch(i){return console.error("Error generating unique filename:",i),`task-${Date.now().toString(36)}`}}var cx,nb=b(()=>{rr();cx=require("obsidian")});function z$(n){let t=(0,Ei.autocompletion)({override:[async r=>{let a=new Yd(n.settings.nlpTriggers,n.settings.userFields||[]),i=r.state.doc.lineAt(r.pos),s=i.text.slice(0,r.pos-i.from),o=(g,v)=>{if(g===-1)return!1;if(g===0)return!0;let T=v[g-1];return!/\w/.test(T)},l=a.getTriggersOrderedByLength(),c=[];for(let g of l){if(g.propertyId==="tags"&&g.trigger==="#")continue;let v=s.lastIndexOf(g.trigger);o(v,s)&&c.push({propertyId:g.propertyId,trigger:g.trigger,index:v,triggerLength:g.trigger.length})}if(c.length===0)return null;c.sort((g,v)=>v.index-g.index);let d=c[0],u=d.index+d.triggerLength,p=s.slice(u);if(d.propertyId==="projects"&&/^\[\[[^\]]*\]\]/.test(p)||d.propertyId!=="projects"&&(p.includes(" ")||p.includes(` +`)))return null;let m=await Ile(d.propertyId,p,n,a);if(!m||m.length===0)return null;let h=i.from+d.index+d.triggerLength,f=r.pos;return{from:h,to:f,options:m,validFor:/^[\w\s-]*$/}}],activateOnTyping:!0,closeOnBlur:!0,maxRenderedOptions:10,addToOptions:[{render:(r,a,i)=>{if(!r.projectMetadata)return null;let s=document.createElement("div");s.className="cm-project-suggestion__metadata";let o=r.projectMetadata;for(let l of o){let c=document.createElement("div");c.className="cm-project-suggestion__meta",c.textContent=l,s.appendChild(c)}return s},position:100}]}),e=dx.Prec.high(H$.keymap.of([{key:"ArrowDown",run:(0,Ei.moveCompletionSelection)(!0)},{key:"ArrowUp",run:(0,Ei.moveCompletionSelection)(!1)},{key:"Enter",run:Ei.acceptCompletion},{key:"Tab",run:Ei.acceptCompletion},{key:"Escape",run:Ei.closeCompletion}]));return[dx.Prec.high(t),e]}async function Ile(n,t,e,r){switch(r.getSuggesterType(n)){case"list":return _le(n,t,e);case"file":return Nle(n,t,e,r);case"status":return Rle(t,e);case"priority":return Fle(t,e);case"boolean":return Ole(t);case"native-tag":return null;default:return null}}function _le(n,t,e){let r=[],a=n;switch(n){case"tags":r=e.cacheManager.getAllTags(),a="Tag";break;case"contexts":r=e.cacheManager.getAllContexts(),a="Context";break;default:r=[],a=n;break}return r.filter(i=>i&&typeof i=="string").filter(i=>i.toLowerCase().includes(t.toLowerCase())).slice(0,10).map(i=>({label:i,apply:i+" ",type:"text",info:a}))}async function Nle(n,t,e,r){var a,i,s;try{let o;if(n==="projects")o=e.settings.projectAutosuggest;else{let u=r.getUserField(n);o=u==null?void 0:u.autosuggestFilter}let l=(e.settings.excludedFolders||"").split(",").map(u=>u.trim()).filter(Boolean),d=(await ax.suggest(e,t,20,o)).filter(u=>{let p=e.app.vault.getMarkdownFiles().find(m=>m.basename===u.insertText);return p?!l.some(m=>p.path.startsWith(m)):!0});if(n==="projects"){let u=new no({getFrontmatter:m=>m.frontmatter}),p=((s=(i=(a=e.settings)==null?void 0:a.projectAutosuggest)==null?void 0:i.rows)!=null?s:[]).slice(0,3);return d.map(m=>{var T;let h=m.displayText||m.insertText,f=m.insertText,g=e.app.vault.getMarkdownFiles().find(k=>k.basename===m.insertText),v=[];if(g&&p.length>0){let k=e.app.metadataCache.getFileCache(g),w=(k==null?void 0:k.frontmatter)||{},S=e.fieldMapper.mapFromFrontmatter(w,g.path,e.settings.storeTitleInFilename),x=typeof S.title=="string"?S.title:"",I=Array.isArray(w.aliases)?w.aliases.filter(B=>typeof B=="string"):[],A={basename:g.basename,name:g.name,path:g.path,parent:((T=g.parent)==null?void 0:T.path)||"",title:x,aliases:I,frontmatter:w};v=u.buildMetadataRows(p,A,hi)}return{label:h,apply:`[[${f}]] `,type:"text",info:"Project",projectMetadata:v.length>0?v:void 0}})}return d.map(u=>{let p=u.displayText||u.insertText,m=u.insertText;return{label:p,apply:`[[${m}]] `,type:"text",info:n==="projects"?"Project":n}})}catch(o){return console.error(`Error getting file suggestions for ${n}:`,o),[]}}function Rle(n,t){return na.fromPlugin(t).getStatusSuggestions(n,10).map(a=>({label:a.display,apply:a.value+" ",type:"text",info:"Status"}))}function Fle(n,t){return(t.settings.customPriorities||[]).filter(r=>r.label.toLowerCase().includes(n.toLowerCase())).slice(0,10).map(r=>({label:r.label,apply:r.value+" ",type:"text",info:"Priority"}))}function Ole(n){return["true","false"].filter(e=>e.toLowerCase().includes(n.toLowerCase())).map(e=>({label:e,apply:e+" ",type:"text",info:"Boolean"}))}var Ei,dx,H$,U$=b(()=>{Ei=require("@codemirror/autocomplete"),dx=require("@codemirror/state"),H$=require("@codemirror/view");Gd();VE();tb();yy();gp()});var ab={};Be(ab,{convertDefaultRemindersToReminders:()=>Lle,hasAnyUserFieldsEnabled:()=>W$,isUserFieldConfigComplete:()=>q$,isUserFieldEnabled:()=>Ble});function Lle(n,t){return n.map(e=>{let r={id:`rem_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,type:e.type,description:e.description};if(e.type==="relative"){if(e.relatedTo&&e.offset!==void 0&&e.unit&&e.direction){let a="PT";e.unit==="days"?a=`P${e.offset}D`:e.unit==="hours"?a=`PT${e.offset}H`:a=`PT${e.offset}M`,e.direction==="before"&&(a="-"+a),r.relatedTo=e.relatedTo,r.offset=a}}else e.type==="absolute"&&e.absoluteDate&&e.absoluteTime&&(r.absoluteTime=`${e.absoluteDate}T${e.absoluteTime}:00`);return r}).filter(e=>e.type==="relative"?e.relatedTo&&e.offset:!!e.absoluteTime)}function W$(n){let t=n.userFields;return!t||t.length===0?!1:t.some(e=>!!(e&&e.displayName&&e.key&&e.type))}function q$(n){return!n||!n.enabled?!1:!!(n.displayName&&n.key&&n.type)}function Ble(n){return n.userFields&&n.userFields.length>0?W$(n):q$(n.userField)}var ib=b(()=>{});var V$={};Be(V$,{TaskCreationModal:()=>So});var Zr,ux,So,sb=b(()=>{Zr=require("obsidian");lx();Ke();nb();Dr();Gd();Ke();yl();yy();gp();nx();U$();ux=class extends Zr.AbstractInputSuggest{constructor(e,r,a){super(e,r);this.currentTrigger=null;this.projectMetadataResolver=null;this.plugin=a,this.textarea=r,this.obsidianApp=e}isBoundary(e,r){if(r===-1)return!1;if(r===0)return!0;let a=e[r-1];return!/\w/.test(a)}findActiveTrigger(e){let r=e.lastIndexOf("@"),a=e.lastIndexOf("#"),i=e.lastIndexOf("+"),s=(this.plugin.settings.statusSuggestionTrigger||"").trim(),o=s?e.lastIndexOf(s):-1,l=[{type:"@",index:r},{type:"#",index:a},{type:"+",index:i},{type:"status",index:o}].filter(m=>this.isBoundary(e,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"?(s==null?void 0:s.length)||0:1,p=e.slice(c+u);return{trigger:d,triggerIndex:c,queryAfterTrigger:p}}shouldEndSuggestionContext(e,r){return!!(e==="+"&&/^\[\[[^\]]*\]\]/.test(r)||(e==="@"||e==="#"||e==="status")&&(r.includes(" ")||r.includes(` +`)))}getContextSuggestions(e){return this.plugin.cacheManager.getAllContexts().filter(a=>a&&typeof a=="string").filter(a=>a.toLowerCase().includes(e.toLowerCase())).slice(0,10).map(a=>({value:a,display:a,type:"context",toString(){return this.value}}))}getStatusSuggestions(e){return na.fromPlugin(this.plugin).getStatusSuggestions(e,10).map(a=>({...a,type:"status",toString(){return this.value}}))}getTagSuggestions(e){return this.plugin.cacheManager.getAllTags().filter(a=>a&&typeof a=="string").filter(a=>a.toLowerCase().includes(e.toLowerCase())).slice(0,10).map(a=>({value:a,display:a,type:"tag",toString(){return this.value}}))}getProjectMetadataResolver(){var e,r,a;if(!this.projectMetadataResolver){let i=(a=(e=this.obsidianApp)!=null?e:this.app)!=null?a:(r=this.plugin)==null?void 0:r.app;this.projectMetadataResolver=new no({getFrontmatter:s=>{let o=i==null?void 0:i.vault.getAbstractFileByPath(s.path),l=o?i==null?void 0:i.metadataCache.getFileCache(o):void 0;return(l==null?void 0:l.frontmatter)||{}}})}return this.projectMetadataResolver}async getProjectSuggestions(e){var l,c,d,u,p,m;let{FileSuggestHelper:r}=await Promise.resolve().then(()=>(tb(),ix)),a=(this.plugin.settings.excludedFolders||"").split(",").map(h=>h.trim()).filter(Boolean),i=await r.suggest(this.plugin,e,20,this.plugin.settings.projectAutosuggest),s=(d=(l=this.obsidianApp)!=null?l:this.app)!=null?d:(c=this.plugin)==null?void 0:c.app,o=i.filter(h=>{let f=s==null?void 0:s.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 z;let v=s==null?void 0:s.vault.getMarkdownFiles().find(U=>U.basename===g.insertText);if(!v)return{basename:g.insertText,displayName:g.displayText,type:"project",toString(){return this.basename}};let T=s==null?void 0:s.metadataCache.getFileCache(v),k=(T==null?void 0:T.frontmatter)||{},w=this.plugin.fieldMapper.mapFromFrontmatter(k,v.path,this.plugin.settings.storeTitleInFilename),S=typeof w.title=="string"?w.title:"",x=(0,Zr.parseFrontMatterAliases)(k)||[],I=Array.isArray(x)?x.filter(U=>typeof U=="string"):[],A={basename:v.basename,name:v.name,path:v.path,parent:((z=v.parent)==null?void 0:z.path)||"",title:S,aliases:I,frontmatter:k},B=this.generateProjectDisplayName(f,A,h,v.basename);return{basename:g.insertText,displayName:B,type:"project",entry:{basename:A.basename,name:A.name,path:A.path,parent:A.parent,title:A.title,aliases:A.aliases,frontmatter:A.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(e,r,a,i){var o;let s=[];for(let l of e)try{let c=hi(l),d=[];for(let p of c){if(p.property.startsWith("literal:")){d.push(p.property.slice(8));continue}let m=a.resolve(p.property,r)||"";if(m)if(p.showName){let h=(o=p.displayName)!=null?o:p.property;d.push(`${h}: ${m}`)}else d.push(m)}let u=d.join(" ");u.trim()&&s.push(u)}catch(c){}return s.join(" | ")||i}async getSuggestions(e){let r=this.textarea.selectionStart,a=this.textarea.value.slice(0,r),{trigger:i,triggerIndex:s,queryAfterTrigger:o}=this.findActiveTrigger(a);if(!i||s===-1)return this.currentTrigger=null,[];if(this.shouldEndSuggestionContext(i,o))return this.currentTrigger=null,[];switch(this.currentTrigger=i,i){case"@":return this.getContextSuggestions(o);case"status":return this.getStatusSuggestions(o);case"#":return this.getTagSuggestions(o);case"+":return await this.getProjectSuggestions(o);default:return[]}}renderSuggestion(e,r){var c,d,u,p,m;r.setAttribute("role","option");let a=e.type==="project"?e.displayName:e.display;r.setAttribute("aria-label",`${e.type}: ${a}`);let i=r.createSpan("nlp-suggest-icon");i.textContent=this.currentTrigger==="status"?this.plugin.settings.statusSuggestionTrigger||"":this.currentTrigger||"",i.setAttribute("aria-hidden","true");let s=r.createSpan("nlp-suggest-text"),o=(h,f)=>{if(!f)return;let g=f.toLowerCase().split(/\s+/).filter(Boolean);if(!g.length)return;let v=T=>{var k;if(T.nodeType===Node.TEXT_NODE){let w=T.nodeValue||"",S=w.toLowerCase(),x=[];for(let z of g){let U=S.indexOf(z);for(;U!==-1;)x.push({start:U,end:U+z.length}),U=S.indexOf(z,U+1)}x.sort((z,U)=>z.start-U.start);let I=[];for(let z of x)(!I.length||z.start>=I[I.length-1].end)&&I.push(z);if(!I.length)return;let A=document.createDocumentFragment(),B=0;for(let z of I){z.start>B&&A.appendChild(document.createTextNode(w.slice(B,z.start)));let U=document.createElement("mark");U.textContent=w.slice(z.start,z.end),A.appendChild(U),B=z.end}B0&&e.entry){let g=this.getProjectMetadataResolver();for(let v=0;v0)&&this.renderProjectsList()}createNaturalLanguageInput(e){let r=e.createDiv("nl-input-container"),a=r.createDiv("nl-markdown-editor");a.setAttribute("role","textbox"),a.setAttribute("aria-label",this.t("modals.taskCreation.nlPlaceholder")),a.setAttribute("aria-multiline","true"),this.nlPreviewContainer=r.createDiv("nl-preview-container"),this.nlPreviewContainer.setAttribute("role","status"),this.nlPreviewContainer.setAttribute("aria-live","polite"),this.nlPreviewContainer.setAttribute("aria-label","Task preview");try{let i=z$(this.plugin);this.nlMarkdownEditor=new ru(this.app,a,{value:"",placeholder:this.t("modals.taskCreation.nlPlaceholder"),cls:"nlp-editor",extensions:i,onChange:s=>{s.trim()?this.updateNaturalLanguagePreview(s.trim()):this.clearNaturalLanguagePreview()},onSubmit:()=>{this.handleSave()},onEscape:()=>{this.close()},onTab:()=>(this.isExpanded||this.expandModal(),setTimeout(()=>{let s=this.modalEl.querySelector(".title-input-detailed");s&&s.focus()},50),!0),onEnter:(s,o,l)=>l?!1:!!o}),setTimeout(()=>{var s;if(this.nlMarkdownEditor){let o=(s=this.nlMarkdownEditor.editor)==null?void 0:s.cm;o&&(o.focus(),o.scrollDOM.scrollTop=0)}},100)}catch(i){console.error("Failed to create NLP markdown editor:",i),this.nlInput=a.createEl("textarea",{cls:"nl-input",attr:{placeholder:this.t("modals.taskCreation.nlPlaceholder"),rows:"3"}});let s=()=>{let l=this.nlInput.value.trim();l?this.updateNaturalLanguagePreview(l):this.clearNaturalLanguagePreview()};this.addTrackedEventListener(this.nlInput,"input",s);let o=l=>{let c=this.nlInput.value.trim();if(!c)return;let d=l;d.key==="Enter"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),this.handleSave()):d.key==="Tab"&&d.shiftKey&&(d.preventDefault(),this.parseAndFillForm(c))};this.addTrackedEventListener(this.nlInput,"keydown",o),this.nlpSuggest=new ux(this.app,this.nlInput,this.plugin),setTimeout(()=>{this.nlInput.focus()},100)}}updateNaturalLanguagePreview(e){if(!this.nlPreviewContainer)return;let r=this.nlParser.parseInput(e),a=this.nlParser.getPreviewData(r);a.length>0&&r.title?(this.nlPreviewContainer.empty(),this.nlPreviewContainer.style.display="block",a.forEach(i=>{let s=this.nlPreviewContainer.createDiv("nl-preview-item");s.textContent=i.text})):this.clearNaturalLanguagePreview()}clearNaturalLanguagePreview(){this.nlPreviewContainer&&(this.nlPreviewContainer.empty(),this.nlPreviewContainer.style.display="none")}getNLPInputValue(){return this.nlMarkdownEditor?this.nlMarkdownEditor.value:this.nlInput?this.nlInput.value:""}createActionBar(e){if(this.actionBar=e.createDiv("action-bar"),this.plugin.settings.enableNaturalLanguageInput){this.createActionIcon(this.actionBar,"wand",this.t("modals.taskCreation.actions.fillFromNaturalLanguage"),(a,i)=>{let s=this.getNLPInputValue().trim();s&&this.parseAndFillForm(s)}),this.createActionIcon(this.actionBar,this.isExpanded?"chevron-up":"chevron-down",this.isExpanded?this.t("modals.taskCreation.actions.hideDetailedOptions"):this.t("modals.taskCreation.actions.showDetailedOptions"),(a,i)=>{this.toggleDetailedForm();let s=a.querySelector(".icon");s&&(0,Zr.setIcon)(s,this.isExpanded?"chevron-up":"chevron-down"),(0,Zr.setTooltip)(a,this.isExpanded?this.t("modals.taskCreation.actions.hideDetailedOptions"):this.t("modals.taskCreation.actions.showDetailedOptions"),{placement:"top"})});let r=this.actionBar.createDiv("action-separator");r.style.width="1px",r.style.height="24px",r.style.backgroundColor="var(--background-modifier-border)",r.style.margin="0 var(--size-4-2)"}this.createActionIcon(this.actionBar,"calendar",this.t("modals.task.actions.due"),(r,a)=>{this.showDateContextMenu(a,"due")},"due-date"),this.createActionIcon(this.actionBar,"calendar-clock",this.t("modals.task.actions.scheduled"),(r,a)=>{this.showDateContextMenu(a,"scheduled")},"scheduled-date"),this.createActionIcon(this.actionBar,"dot-square",this.t("modals.task.actions.status"),(r,a)=>{this.showStatusContextMenu(a)},"status"),this.createActionIcon(this.actionBar,"star",this.t("modals.task.actions.priority"),(r,a)=>{this.showPriorityContextMenu(a)},"priority"),this.createActionIcon(this.actionBar,"refresh-ccw",this.t("modals.task.actions.recurrence"),(r,a)=>{this.showRecurrenceContextMenu(a)},"recurrence"),this.createActionIcon(this.actionBar,"bell",this.t("modals.task.actions.reminders"),(r,a)=>{this.showReminderContextMenu(a)},"reminders"),this.updateIconStates()}parseAndFillForm(e){let r=this.nlParser.parseInput(e);this.applyParsedData(r),this.isExpanded||this.expandModal()}applyParsedData(e){var r;if(e.title&&(this.title=e.title),e.status&&(this.status=e.status),e.priority&&(this.priority=e.priority),e.dueDate&&(this.dueDate=e.dueTime?hr(e.dueDate,e.dueTime):e.dueDate),e.scheduledDate&&(this.scheduledDate=e.scheduledTime?hr(e.scheduledDate,e.scheduledTime):e.scheduledDate),e.contexts&&e.contexts.length>0&&(this.contexts=e.contexts.join(", ")),e.tags&&e.tags.length>0&&(this.tags=Qa(e.tags.join(", "))),e.details&&(this.details=e.details),e.recurrence&&(this.recurrenceRule=e.recurrence),e.estimate!==void 0&&(this.timeEstimate=e.estimate>0?e.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),e.projects&&e.projects.length>0&&(this.initializeProjectsFromStrings(e.projects),this.renderProjectsList()),e.userFields){console.debug("[TaskCreationModal] applyParsedData - parsed.userFields:",e.userFields),console.debug("[TaskCreationModal] applyParsedData - available user field definitions:",this.plugin.settings.userFields);for(let[a,i]of Object.entries(e.userFields)){let s=(r=this.plugin.settings.userFields)==null?void 0:r.find(o=>o.id===a);console.debug(`[TaskCreationModal] Looking for field ${a}, found:`,s),s?(Array.isArray(i)?this.userFields[s.key]=i.join(", "):this.userFields[s.key]=i,console.debug(`[TaskCreationModal] Applied user field ${s.displayName} (key: ${s.key}): ${i}`),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 e=this.plugin.settings.taskCreationDefaults;if(this.dueDate=ba(e.defaultDueDate),this.scheduledDate=ba(e.defaultScheduledDate),this.contexts=e.defaultContexts||"",this.tags=e.defaultTags||"",e.defaultProjects){let r=ha(e.defaultProjects);r.length>0&&this.initializeProjectsFromStrings(r)}if(e.defaultTimeEstimate&&e.defaultTimeEstimate>0&&(this.timeEstimate=e.defaultTimeEstimate),e.defaultReminders&&e.defaultReminders.length>0){let{convertDefaultRemindersToReminders:r}=await Promise.resolve().then(()=>(ib(),ab));this.reminders=r(e.defaultReminders)}if(this.plugin.settings.userFields){for(let r of this.plugin.settings.userFields)if(r.defaultValue!==void 0)if(r.type==="date"&&typeof r.defaultValue=="string"){let a=r.defaultValue,i=ba(a);i&&(this.userFields[r.key]=i)}else this.userFields[r.key]=r.defaultValue}this.options.prePopulatedValues&&this.applyPrePopulatedValues(this.options.prePopulatedValues),this.details=this.normalizeDetails(this.details),this.originalDetails=this.details}applyPrePopulatedValues(e){e.title!==void 0&&(this.title=e.title),e.due!==void 0&&(this.dueDate=e.due),e.scheduled!==void 0&&(this.scheduledDate=e.scheduled),e.priority!==void 0&&(this.priority=e.priority),e.status!==void 0&&(this.status=e.status),e.contexts!==void 0&&(this.contexts=e.contexts.join(", ")),e.projects!==void 0&&(e.projects.filter(a=>a&&typeof a=="string"&&a.trim()!=="").length>0&&this.initializeProjectsFromStrings(e.projects),this.renderProjectsList()),e.tags!==void 0&&(this.tags=Qa(e.tags.filter(r=>r!==this.plugin.settings.taskTag).join(", "))),e.timeEstimate!==void 0&&(this.timeEstimate=e.timeEstimate),e.recurrence!==void 0&&typeof e.recurrence=="string"&&(this.recurrenceRule=e.recurrence),e.recurrence_anchor!==void 0&&(this.recurrenceAnchor=e.recurrence_anchor)}async handleSave(){if(this.plugin.settings.enableNaturalLanguageInput){let e=this.getNLPInputValue().trim();if(e&&!this.title.trim()){let r=this.nlParser.parseInput(e);this.applyParsedData(r)}}if(!this.validateForm()){new Zr.Notice(this.t("modals.taskCreation.notices.titleRequired"));return}try{let e=this.buildTaskData(),r=await this.plugin.taskService.createTask(e,{applyDefaults:!1}),a=r.taskInfo,i=r.taskInfo.title.replace(/[<>:"/\\|?*]/g,"").trim(),s=r.file.basename;if(s.startsWith("task-")&&s!==i?new Zr.Notice(this.t("modals.taskCreation.notices.successShortened",{title:a.title})):new Zr.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 Zr.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(e){console.error("Failed to create task:",e);let r=e instanceof Error&&e.message?e.message:String(e);new Zr.Notice(this.t("modals.taskCreation.notices.failure",{message:r}))}}buildTaskData(){let e=Oe(),r=this.contexts.split(",").map(c=>c.trim()).filter(c=>c.length>0),a=ha(this.projects),i=Qa(this.tags).split(",").map(c=>c.trim()).filter(c=>c.length>0);this.plugin.settings.taskIdentificationMethod==="tag"&&this.plugin.settings.taskTag&&!i.includes(this.plugin.settings.taskTag)&&i.push(this.plugin.settings.taskTag);let s={title:this.title.trim(),due:this.dueDate||void 0,scheduled:this.scheduledDate||void 0,priority:this.priority,status:this.status,contexts:r.length>0?r:void 0,projects:a.length>0?a:void 0,tags:i.length>0?i: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:"manual-creation",dateCreated:e,dateModified:e,customFrontmatter:this.buildCustomFrontmatter()},o=this.blockedByItems.map(c=>({...c.dependency}));o.length>0&&(s.blockedBy=o);let l=this.normalizeDetails(this.details).trimEnd();return l.length>0&&(s.details=l),s}buildCustomFrontmatter(){let e={};console.debug("[TaskCreationModal] Building custom frontmatter from userFields:",this.userFields);for(let[r,a]of Object.entries(this.userFields))a!=null&&a!==""&&(e[r]=a,console.debug(`[TaskCreationModal] Adding to frontmatter: ${r} = ${a}`));return console.debug("[TaskCreationModal] Final custom frontmatter:",e),e}generateFilename(e){let r={title:e.title||"",status:e.status||"open",priority:e.priority||"normal",dueDate:e.due,scheduledDate:e.scheduled};return rb(r,this.plugin.settings)}createTitleInput(e){this.plugin.settings.enableNaturalLanguageInput||super.createTitleInput(e)}async applySubtaskAssignments(e){let r=this.app.vault.getAbstractFileByPath(e.path);if(r instanceof Zr.TFile)for(let a of this.selectedSubtaskFiles)try{let i=await this.plugin.cacheManager.getTaskInfo(a.path);if(!i)continue;let s=this.buildProjectReference(r,a.path),o=`[[${r.basename}]]`,l=Array.isArray(i.projects)?i.projects:[];if(l.includes(s)||l.includes(o))continue;let d=[...l.filter(u=>u!==o),s];await this.plugin.updateTaskProperty(i,"projects",d)}catch(i){console.error("Failed to assign subtask:",i)}}onClose(){this.nlMarkdownEditor&&(this.nlMarkdownEditor.destroy(),this.nlMarkdownEditor=null),this.nlpSuggest&&(this.nlpSuggest.close(),this.nlpSuggest=null),this.removeAllEventListeners(),super.onClose()}}});var ou,mx=b(()=>{ou=class n{constructor(t){this.statuses=t}getNextStatus(t){var i;let e=this.getStatusesByOrder(),r=e.findIndex(s=>s.value===t);if(r===-1)return((i=e[0])==null?void 0:i.value)||"open";let a=(r+1)%e.length;return e[a].value}getStatusConfig(t){return this.statuses.find(e=>e.value===t)}getCompletedStatuses(){return this.statuses.filter(t=>t.isCompleted).map(t=>t.value)}getOpenStatuses(){return this.statuses.filter(t=>!t.isCompleted).map(t=>t.value)}getStatusesByOrder(){return[...this.statuses].sort((t,e)=>t.order-e.order)}isCompletedStatus(t){let e=this.getStatusConfig(t);return(e==null?void 0:e.isCompleted)||!1}getStatusOrder(t){let e=this.getStatusConfig(t);return(e==null?void 0:e.order)||0}getStatusStyles(){let t=[];for(let e of this.statuses){let r=`--status-${e.value.replace(/[^a-zA-Z0-9-]/g,"-")}-color`;t.push(`${r}: ${e.color};`)}return`:root { ${t.join(" ")} }`}getAllStatuses(){return[...this.statuses]}getNonCompletionStatuses(){return this.statuses.filter(t=>!t.isCompleted)}updateStatuses(t){this.statuses=t}static validateStatuses(t){let e=[];t.length<2&&e.push("At least 2 statuses are required"),t.some(l=>l.isCompleted)||e.push("At least one status must be marked as completed");let a=t.map(l=>l.value),i=new Set(a);a.length!==i.size&&e.push("Status values must be unique");let s=t.map(l=>l.id),o=new Set(s);s.length!==o.size&&e.push("Status IDs must be unique");for(let l of t){if(!l.value||l.value.trim()===""){e.push("Status values cannot be empty");break}if(!l.label||l.label.trim()===""){e.push("Status labels cannot be empty");break}if(!l.color||!l.color.match(/^#[0-9a-fA-F]{6}$/)){e.push("Status colors must be valid hex colors (#rrggbb)");break}}return{valid:e.length===0,errors:e}}static generateStatusId(t){let e=new Set(t.map(i=>i.id)),r=1,a=`status-${r}`;for(;e.has(a);)r++,a=`status-${r}`;return a}static createDefaultStatus(t){let e=n.generateStatusId(t),r=Math.max(...t.map(a=>a.order),0)+1;return{id:e,value:"new-status",label:"New status",color:"#808080",isCompleted:!1,order:r,autoArchive:!1,autoArchiveDelay:5}}}});var G$={};Be(G$,{HierarchicalGroupingService:()=>hx});var hx,K$=b(()=>{hx=class{constructor(t){this.resolveUserFieldValues=t}group(t,e,r,a="asc",i=[]){let s=new Map,o=(c,d)=>{var p,m,h,f,g,v,T,k;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 I=this.resolveUserFieldValues(c,w)||[],A=u(I);return A.length?A:[`No ${w}`]}let S=(p=c.customProperties)==null?void 0:p[w];if(Array.isArray(S)){let I=u(S);return I.length?I:[`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(I=>{let A=I.match(/^\[\[([^|\]]+)(?:\|([^\]]+))?\]\]$/);if(A){let B=A[1]||"";return A[2]||B.split("#")[0].split("/").pop()||B||I}return I}),S=[],x=new Set;for(let I of w)x.has(I)||(x.add(I),S.push(I));return S.length?S:["No Project"]}case"tags":{let w=u((v=c.tags)!=null?v:[]);return w.length?w:["No Tag"]}case"due":{let w=((T=c.due)!=null?T:"").trim();return w?[w.split("T")[0]]:["No Due Date"]}case"scheduled":{let w=((k=c.scheduled)!=null?k:"").trim();return w?[w.split("T")[0]]:["No Scheduled Date"]}default:{let S=c[d];if(Array.isArray(S)){let I=u(S);return I.length?I:[`No ${d}`]}let x=String(S!=null?S:"").trim();return x!==""?[x]:[`No ${d}`]}}};for(let c of t){let d=o(c,e),u=o(c,r);for(let p of d){s.has(p)||s.set(p,new Map);let m=s.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 s){let u=this.sortSubgroups(d,r,a,i);l.set(c,u)}return l}sortSubgroups(t,e,r,a){let i=Array.from(t.keys()),s=this.sortSubgroupKeys(i,e,r,a),o=new Map;for(let l of s)o.set(l,t.get(l));return o}sortSubgroupKeys(t,e,r,a){let i=o=>/^No\s/i.test(o);if(typeof e=="string"&&e.startsWith("user:")){let o=e.slice(5),l=a.find(u=>(u.id||u.key)===o),c=(u,p)=>{if(i(u)&&!i(p))return-1;if(!i(u)&&i(p))return 1;if((l==null?void 0:l.type)==="number"){let m=parseFloat(u),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=t.slice().sort(c);return r==="desc"?d.reverse():d}let s=t.slice().sort((o,l)=>i(o)&&!i(l)?-1:!i(o)&&i(l)?1:o.localeCompare(l));return r==="desc"?s.reverse():s}}});var Z$={};Be(Z$,{TaskLinkDetectionService:()=>ff});var lc,ff,fx=b(()=>{lc=require("obsidian"),ff=class{constructor(t){this.linkCache=new Map;this.plugin=t}async detectTaskLink(t,e,r="wikilink"){let a=r==="wikilink"?this.parseWikilink(t):this.parseMarkdownLink(t);if(!a)return{isValidTaskLink:!1};let{linkPath:i,displayText:s}=a,o=`${e}:${i}`,l=this.linkCache.get(o);if(l){let p=this.plugin.app.vault.getAbstractFileByPath(i);if(p instanceof lc.TFile&&p.stat.mtime===l.lastModified)return l.result}let c=this.resolveLinkPath(i,e);if(!c){let p={isValidTaskLink:!1};return this.cacheResult(o,p,0),p}let d=this.plugin.app.vault.getAbstractFileByPath(c);if(!(d instanceof lc.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:s};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(t){let e=t.slice(2,-2).trim();if(!e)return null;let r=e.indexOf("|");if(r!==-1){let i=e.slice(0,r).trim(),s=e.slice(r+1).trim();return!i||!s?null:{linkPath:(0,lc.parseLinktext)(i).path,displayText:s}}let a=(0,lc.parseLinktext)(e);return{linkPath:a.path,displayText:a.subpath||void 0}}parseMarkdownLink(t){let e=t.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!e)return null;let r=e[1].trim(),a=e[2].trim();if(!a)return null;try{a=decodeURIComponent(a)}catch(s){console.debug("TaskLinkDetectionService: Failed to decode URI component:",a,s)}let i=(0,lc.parseLinktext)(a);return{linkPath:i.path,displayText:r||i.subpath||void 0}}resolveLinkPath(t,e){try{let r=this.plugin.app.metadataCache.getFirstLinkpathDest(t,e);return(r==null?void 0:r.path)||null}catch(r){return console.debug("Error resolving link path:",t,r),null}}cacheResult(t,e,r){if(this.linkCache.set(t,{result:e,lastModified:r}),this.linkCache.size>1e3){let a=this.linkCache.keys().next().value;this.linkCache.delete(a)}}clearCacheForFile(t){for(let[e]of this.linkCache)e.includes(t)&&this.linkCache.delete(e)}clearCache(){this.linkCache.clear()}findWikilinks(t){let e=[],r=/\[\[([^\]]+)\]\]/g,a;for(;(a=r.exec(t))!==null;)e.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"wikilink"});let i=/\[([^\]]*)\]\(([^)]+)\)/g;for(r.lastIndex=0;(a=i.exec(t))!==null;)e.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"markdown"});return e.sort((s,o)=>s.start-o.start)}cleanup(){this.linkCache.clear()}}});var J$,cu,gx=b(()=>{J$=require("@codemirror/view");wb();Or();ko();cu=class n extends J$.WidgetType{constructor(t,e,r,a){super(),this.taskInfo=t,this.plugin=e,this.originalText=r,this.displayText=a}toDOM(t){let e=new Date,r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=this.plugin.settings.inlineVisibleProperties||["status","priority","due","scheduled","recurrence"],i=pn(a,this.plugin),s=document.createElement("span");s.className="tasknotes-plugin tasknotes-inline-widget",s.style.display="inline",s.style.verticalAlign="baseline";let o=Ct(this.taskInfo,this.plugin,i,{layout:"inline",targetDate:r});return s.appendChild(o),o.dataset.originalText=this.originalText,o.addEventListener("tasknotes:task-updated",()=>{setTimeout(()=>{t&&typeof t.dispatch=="function"&&xo(t,this.taskInfo.path)},50)}),s}eq(t){return t instanceof n?this.taskInfo.path===t.taskInfo.path&&this.taskInfo.status===t.taskInfo.status&&this.taskInfo.title===t.taskInfo.title&&this.taskInfo.priority===t.taskInfo.priority&&this.taskInfo.archived===t.taskInfo.archived&&this.taskInfo.due===t.taskInfo.due&&this.taskInfo.scheduled===t.taskInfo.scheduled&&this.taskInfo.recurrence===t.taskInfo.recurrence&&JSON.stringify(this.taskInfo.complete_instances)===JSON.stringify(t.taskInfo.complete_instances)&&this.taskInfo.dateModified===t.taskInfo.dateModified:!1}ignoreEvent(t){return t.type==="mousedown"||t.type==="click"}get estimatedHeight(){return-1}get block(){return!1}}});function qle(n){let t=new Map;return Ci.ViewPlugin.fromClass(class{constructor(e){this.eventListeners=[];this.view=e,this.decorations=this.buildDecorations(e),this.setupEventListeners()}destroy(){this.eventListeners.forEach(e=>{n.emitter.offref(e)}),this.eventListeners=[]}setupEventListeners(){let e=n.emitter.on(Ga,()=>{this.refreshDecorations()}),r=n.emitter.on(gt,()=>{this.refreshDecorations()}),a=n.emitter.on(pd,()=>{this.refreshDecorations()}),i=n.emitter.on(kl,()=>{this.refreshDecorations()}),s=n.emitter.on("settings-changed",()=>{this.refreshDecorations()});this.eventListeners.push(e,r,a,i,s)}refreshDecorations(){this.view&&typeof this.view.dispatch=="function"&&queueMicrotask(()=>{try{t.clear(),this.view.dispatch({effects:[Sb.of({})]})}catch(e){console.error("Error dispatching task link update:",e)}})}update(e){var a,i;if(this.view=e.view,!((a=n==null?void 0:n.settings)!=null&&a.enableTaskLinkOverlay)){this.decorations=Ci.Decoration.none;return}try{if(!e.state.field(ai.editorLivePreviewField)){this.decorations=Ci.Decoration.none;return}}catch(s){this.decorations=Ci.Decoration.none;return}let r=e.transactions.some(s=>s.effects.some(o=>o.is(Sb)));if(e.docChanged||e.selectionSet||r){if(r){let s=(i=e.transactions.flatMap(o=>o.effects).find(o=>o.is(Sb)))==null?void 0:i.value;if(s!=null&&s.taskPath)for(let[o]of t.entries())o.includes(s.taskPath)&&t.delete(o);else t.clear()}this.decorations=this.buildDecorations(e.view)}}buildDecorations(e){var r,a;try{if(!((r=n==null?void 0:n.settings)!=null&&r.enableTaskLinkOverlay))return Ci.Decoration.none;if(!e.state.field(ai.editorLivePreviewField))return Ci.Decoration.none;let s=e.state.field(ai.editorInfoField,!1),o=(a=s==null?void 0:s.file)==null?void 0:a.path;return Vle(e.state,n,t,o)}catch(i){return console.error("Error building task link decorations:",i),Ci.Decoration.none}}},{decorations:e=>e.decorations})}function Vle(n,t,e,r){var o,l;let a=new Db.RangeSetBuilder;if(!n||!t||!e)return a.finish();let i=n.doc;if(!i||!t.app||!t.app.workspace)return a.finish();let s=t.taskLinkDetectionService||new ff(t);if(!r){let c=t.app.workspace.getActiveViewOfType(ai.MarkdownView);if(!c)return a.finish();r=(o=c.file)==null?void 0:o.path}if(!r||typeof r!="string"||r.length===0)return a.finish();try{let c=i.toString();if(typeof c!="string"||c.length>1e5)return a.finish();let d=(l=n.selection)==null?void 0:l.main.head,u=s.findWikilinks(c);if(!Array.isArray(u))return a.finish();for(let p of u)try{if(!p||typeof p.match!="string"||typeof p.start!="number"||typeof p.end!="number"||p.start<0||p.end<=p.start||p.start>=c.length||p.end>c.length)continue;let m=p.type==="wikilink"?$le(p.match):Yle(p.match);if(!m)continue;let{linkPath:h}=m;if(!h||typeof h!="string"||h.trim().length===0)continue;let f=Gle(h,r,t);if(!f)continue;let g=Kle(f,t);if(g){if(!g.title||typeof g.title!="string"||d!==void 0&&d>=p.start&&d500)return null;let e=t.indexOf("|");if(e!==-1){let a=t.slice(0,e).trim(),i=t.slice(e+1).trim();if(!a||!i)return null;let s=(0,ai.parseLinktext)(a);return s.path?{linkPath:s.path,displayText:i}:null}let r=(0,ai.parseLinktext)(t);return r.path?{linkPath:r.path,displayText:r.subpath||void 0}:null}function Yle(n){if(!n||typeof n!="string")return null;let t=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!t)return null;let e=t[1].trim(),r=t[2].trim();if(!r||r.length===0||r.length>500)return null;try{r=decodeURIComponent(r)}catch(i){}let a=(0,ai.parseLinktext)(r);return a.path?{linkPath:a.path,displayText:e||a.subpath||void 0}:null}function Gle(n,t,e){if(!n||typeof n!="string"||n.trim().length===0||!t||typeof t!="string"||!e||!e.app||!e.app.metadataCache)return null;try{let r=e.app.metadataCache.getFirstLinkpathDest(n,t);return!r||!r.path||typeof r.path!="string"?null:r.path}catch(r){return null}}function Kle(n,t){if(!n||typeof n!="string"||n.trim().length===0||!t)return null;try{let e=/[<>:"|?*]/,r=n.split("").some(s=>{let o=s.charCodeAt(0);return o<=31||o===127});if(e.test(n)||r)return null;let a=t.cacheManager;if(!a||!a.getCachedTaskInfoSync)return null;let i=a.getCachedTaskInfoSync(n);return i&&typeof i=="object"&&i.title?i:null}catch(e){return null}}function X$(n){return qle(n)}function xo(n,t){if(!n||typeof n.dispatch!="function"){console.warn("Invalid EditorView passed to dispatchTaskUpdate:",n);return}try{n.dispatch({effects:[Sb.of({taskPath:t})]})}catch(e){console.error("Error dispatching task update:",e)}}var Db,Ci,ai,Sb,wb=b(()=>{Db=require("@codemirror/state"),Ci=require("@codemirror/view"),ai=require("obsidian");Wn();fx();gx();Sb=Db.StateEffect.define()});function Co(n,t){for(var e in t)n[e]=t[e];return n}function yY(n){var t=n.parentNode;t&&t.removeChild(n)}function E(n,t,e){var r,a,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Nb.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(i in n.defaultProps)s[i]===void 0&&(s[i]=n.defaultProps[i]);return Mb(n,s,r,a,null)}function Mb(n,t,e,r,a){var i={type:n,props:t,key:e,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a==null?++mY:a};return a==null&&be.vnode!=null&&be.vnode(i),i}function zt(){return{current:null}}function tt(n){return n.children}function Xle(n,t,e,r,a){var i;for(i in e)i==="children"||i==="key"||i in t||Ib(n,i,null,e[i],r);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||e[i]===t[i]||Ib(n,i,t[i],e[i],r)}function dY(n,t,e){t[0]==="-"?n.setProperty(t,e==null?"":e):n[t]=e==null?"":typeof e!="number"||Jle.test(t)?e:e+"px"}function Ib(n,t,e,r,a){var i;e:if(t==="style")if(typeof e=="string")n.style.cssText=e;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(t in r)e&&t in e||dY(n.style,t,"");if(e)for(t in e)r&&e[t]===r[t]||dY(n.style,t,e[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in n?t.toLowerCase().slice(2):t.slice(2),n.l||(n.l={}),n.l[t+i]=e,e?r||n.addEventListener(t,i?pY:uY,i):n.removeEventListener(t,i?pY:uY,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in n)try{n[t]=e==null?"":e;break e}catch(s){}typeof e=="function"||(e==null||e===!1&&t.indexOf("-")==-1?n.removeAttribute(t):n.setAttribute(t,e))}}function uY(n){du=!0;try{return this.l[n.type+!1](be.event?be.event(n):n)}finally{du=!1}}function pY(n){du=!0;try{return this.l[n.type+!0](be.event?be.event(n):n)}finally{du=!1}}function Lr(n,t){this.props=n,this.context=t}function gf(n,t){if(t==null)return n.__?gf(n.__,n.__.__k.indexOf(n)+1):null;for(var e;tt&&cc.sort(function(l,c){return l.__v.__b-c.__v.__b}));_b.__r=0}function bY(n,t,e,r,a,i,s,o,l,c){var d,u,p,m,h,f,g,v=r&&r.__k||gY,T=v.length;for(e.__k=[],d=0;d0?Mb(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=e,m.__b=e.__b+1,(p=v[d])===null||p&&m.key==p.key&&m.type===p.type)v[d]=void 0;else for(u=0;u=0;t--)if((e=n.__k[t])&&(r=wY(e)))return r}return null}function wx(n,t,e,r,a,i,s,o,l){var c,d,u,p,m,h,f,g,v,T,k,w,S,x,I,A=t.type;if(t.constructor!==void 0)return null;e.__h!=null&&(l=e.__h,o=t.__e=e.__e,t.__h=null,i=[o]),(c=be.__b)&&c(t);try{e:if(typeof A=="function"){if(g=t.props,v=(c=A.contextType)&&r[c.__c],T=c?v?v.props.value:c.__:r,e.__c?f=(d=t.__c=e.__c).__=d.__E:("prototype"in A&&A.prototype.render?t.__c=d=new A(g,T):(t.__c=d=new Lr(g,T),d.constructor=A,d.render=rce),v&&v.sub(d),d.props=g,d.state||(d.state={}),d.context=T,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),A.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Co({},d.__s)),Co(d.__s,A.getDerivedStateFromProps(g,d.__s))),p=d.props,m=d.state,d.__v=t,u)A.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(A.getDerivedStateFromProps==null&&g!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,T),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,T)===!1||t.__v===e.__v){for(t.__v!==e.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.forEach(function(B){B&&(B.__=t)}),k=0;k{Ab={},gY=[],Jle=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;Nb=gY.slice,be={__e:function(n,t,e,r){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(n)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(n,r||{}),s=a.__d),s)return a.__E=a}catch(o){n=o}throw n}},mY=0,kx=function(n){return n!=null&&n.constructor===void 0},du=!1,Lr.prototype.setState=function(n,t){var e;e=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Co({},this.state),typeof n=="function"&&(n=n(Co({},e),this.props)),n&&Co(e,n),n!=null&&this.__v&&(t&&this._sb.push(t),Tx(this))},Lr.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Tx(this))},Lr.prototype.render=tt,cc=[],hY=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_b.__r=0,fY=0});function ice(){for(var n;n=NY.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(Fb),n.__H.__h.forEach(Ex),n.__H.__h=[]}catch(t){n.__H.__h=[],be.__e(t,n.__v)}}function sce(n){var t,e=function(){clearTimeout(r),_Y&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(e,100);_Y&&(t=requestAnimationFrame(e))}function Fb(n){var t=Ai,e=n.__c;typeof e=="function"&&(n.__c=void 0,e()),Ai=t}function Ex(n){var t=Ai;n.__c=n.__(),Ai=t}var ace,Ai,Sx,xY,NY,Dx,CY,PY,MY,AY,IY,_Y,xx=b(()=>{Ms();NY=[],Dx=[],CY=be.__b,PY=be.__r,MY=be.diffed,AY=be.__c,IY=be.unmount;be.__b=function(n){Ai=null,CY&&CY(n)},be.__r=function(n){PY&&PY(n),ace=0;var t=(Ai=n.__c).__H;t&&(Sx===Ai?(t.__h=[],Ai.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Dx,e.__N=e.i=void 0})):(t.__h.forEach(Fb),t.__h.forEach(Ex),t.__h=[])),Sx=Ai},be.diffed=function(n){MY&&MY(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(NY.push(t)!==1&&xY===be.requestAnimationFrame||((xY=be.requestAnimationFrame)||sce)(ice)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Dx&&(e.__=e.__V),e.i=void 0,e.__V=Dx})),Sx=Ai=null},be.__c=function(n,t){t.some(function(e){try{e.__h.forEach(Fb),e.__h=e.__h.filter(function(r){return!r.__||Ex(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],be.__e(r,e.__v)}}),AY&&AY(n,t)},be.unmount=function(n){IY&&IY(n);var t,e=n.__c;e&&e.__H&&(e.__H.__.forEach(function(r){try{Fb(r)}catch(a){t=a}}),e.__H=void 0,t&&be.__e(t,e.__v))};_Y=typeof requestAnimationFrame=="function"});function oce(n,t){for(var e in t)n[e]=t[e];return n}function RY(n,t){for(var e in n)if(e!=="__source"&&!(e in t))return!0;for(var r in t)if(r!=="__source"&&n[r]!==t[r])return!0;return!1}function FY(n){this.props=n}function WY(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=oce({},n)).__c!=null&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return WY(r,t,e)})),n}function qY(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return qY(r,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function Cx(){this.__u=0,this.t=null,this.__b=null}function VY(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function Ob(){this.u=null,this.o=null}function cce(n){return this.getChildContext=function(){return n.context},n.children}function dce(n){var t=this,e=n.i;t.componentWillUnmount=function(){Po(null,t.l),t.l=null,t.i=null},t.i&&t.i!==e&&t.componentWillUnmount(),n.__v?(t.l||(t.i=e,t.l={nodeType:1,parentNode:e,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,a){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Po(E(cce,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount()}function Px(n,t){var e=E(dce,{__v:n,i:t});return e.containerInfo=t,e}function fce(){}function gce(){return this.cancelBubble}function yce(){return this.defaultPrevented}var OY,Frt,lce,LY,BY,uce,pce,mce,hce,jY,vce,HY,zY,UY,vf=b(()=>{Ms();Ms();xx();xx();(FY.prototype=new Lr).isPureReactComponent=!0,FY.prototype.shouldComponentUpdate=function(n,t){return RY(this.props,n)||RY(this.state,t)};OY=be.__b;be.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),OY&&OY(n)};Frt=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,lce=be.__e;be.__e=function(n,t,e,r){if(n.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),a.__c(n,t)}lce(n,t,e,r)};LY=be.unmount;be.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&n.__h===!0&&(n.type=null),LY&&LY(n)},(Cx.prototype=new Lr).__c=function(n,t){var e=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(e);var a=VY(r.__v),i=!1,s=function(){i||(i=!0,e.__R=null,a?a(o):o())};e.__R=s;var o=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=qY(c,c.__c.__P,c.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(s,s)},Cx.prototype.componentWillUnmount=function(){this.t=[]},Cx.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=WY(this.__b,e,r.__O=r.__P)}this.__b=null}var a=t.__a&&E(tt,null,n.fallback);return a&&(a.__h=null),[E(tt,null,t.__a?null:n.children),a]};BY=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]{l3(t,n)})}function s3(n){n.isConnected&&n.getRootNode&&o3(n.getRootNode())}function o3(n){let t=jx.get(n);if(!t||!t.isConnected){if(t=n.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");let e=Tce();e&&(t.nonce=e);let r=n===document?document.head:n,a=n===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,a)}jx.set(n,t),bce(t)}}function bce(n){for(let t of i3)l3(n,t)}function l3(n,t){let{sheet:e}=n,r=e.cssRules.length;t.split("}").forEach((a,i)=>{a=a.trim(),a&&e.insertRule(a+"}",r+i)})}function Tce(){return Mx===void 0&&(Mx=kce()),Mx}function kce(){let n=document.querySelector('meta[name="csp-nonce"]');if(n&&n.hasAttribute("content"))return n.getAttribute("content");let t=document.querySelector("script[nonce]");return t&&t.nonce||""}function Rf(n){n.parentNode&&n.parentNode.removeChild(n)}function yr(n,t){if(n.closest)return n.closest(t);if(!document.documentElement.contains(n))return null;do{if(Xb(n,t))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}function Xb(n,t){return(n.matches||n.matchesSelector||n.msMatchesSelector).call(n,t)}function c3(n,t){let e=n instanceof HTMLElement?[n]:n,r=[];for(let a=0;a{let r=yr(e.target,n);r&&t.call(r,e,r)}}function Qx(n,t,e,r){let a=Dce(e,r);return n.addEventListener(t,a),()=>{n.removeEventListener(t,a)}}function d3(n,t,e,r){let a;return Qx(n,"mouseover",t,(i,s)=>{if(s!==a){a=s,e(i,s);let o=l=>{a=null,r(l,s),s.removeEventListener("mouseleave",o)};s.addEventListener("mouseleave",o)}})}function Zx(n,t){let e=r=>{t(r),YY.forEach(a=>{n.removeEventListener(a,e)})};YY.forEach(r=>{n.addEventListener(r,e)})}function u3(n){return Object.assign({onClick:n},p3(n))}function p3(n){return{tabIndex:0,onKeyDown(t){(t.key==="Enter"||t.key===" ")&&(n(t),t.preventDefault())}}}function Fs(){return GY+=1,String(GY)}function gu(){document.body.classList.add("fc-not-allowed")}function yu(){document.body.classList.remove("fc-not-allowed")}function Jx(n){n.style.userSelect="none",n.style.webkitUserSelect="none",n.addEventListener("selectstart",Ff)}function Xx(n){n.style.userSelect="",n.style.webkitUserSelect="",n.removeEventListener("selectstart",Ff)}function eC(n){n.addEventListener("contextmenu",Ff)}function tC(n){n.removeEventListener("contextmenu",Ff)}function m3(n){let t=[],e=[],r,a;for(typeof n=="string"?e=n.split(/\s*,\s*/):typeof n=="function"?e=[n]:Array.isArray(n)&&(e=n),r=0;rr.replace("$"+i,a||""),n):e}function rC(n,t){return n-t}function bf(n){return n%1===0}function xce(n){let t=n.querySelector(".fc-scrollgrid-shrink-frame"),e=n.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!e)throw new Error("needs fc-scrollgrid-shrink-cushion className");return n.getBoundingClientRect().width-t.getBoundingClientRect().width+e.getBoundingClientRect().width}function Re(n,t){return typeof n=="string"?Pce(n):typeof n=="object"&&n?QY(n):typeof n=="number"?QY({[t||"milliseconds"]:n}):null}function Pce(n){let t=Cce.exec(n);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function QY(n){let t={years:n.years||n.year||0,months:n.months||n.month||0,days:n.days||n.day||0,milliseconds:(n.hours||n.hour||0)*60*60*1e3+(n.minutes||n.minute||0)*60*1e3+(n.seconds||n.second||0)*1e3+(n.milliseconds||n.millisecond||n.ms||0)},e=n.weeks||n.week;return e&&(t.days+=e*7,t.specifiedWeeks=!0),t}function Mce(n,t){return n.years===t.years&&n.months===t.months&&n.days===t.days&&n.milliseconds===t.milliseconds}function Of(n,t){return{years:n.years+t.years,months:n.months+t.months,days:n.days+t.days,milliseconds:n.milliseconds+t.milliseconds}}function g3(n,t){return{years:n.years-t.years,months:n.months-t.months,days:n.days-t.days,milliseconds:n.milliseconds-t.milliseconds}}function nC(n,t){return{years:n.years*t,months:n.months*t,days:n.days*t,milliseconds:n.milliseconds*t}}function Ace(n){return uu(n)/365}function Ice(n){return uu(n)/30}function uu(n){return ia(n)/864e5}function ia(n){return n.years*(365*864e5)+n.months*(30*864e5)+n.days*864e5+n.milliseconds}function Lf(n,t){let e=null;for(let r=0;r=1?Math.min(a,i):a}function Ax(n,t,e,r){let a=Mn([t,0,1+Hce(t,e,r)]),i=ct(n),s=Math.round(Oi(a,i));return Math.floor(s/7)+1}function Hce(n,t,e){let r=7+t-e;return-((7+Mn([n,0,r]).getUTCDay()-t)%7)+r-1}function ZY(n){return[n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()]}function JY(n){return new Date(n[0],n[1]||0,n[2]==null?1:n[2],n[3]||0,n[4]||0,n[5]||0)}function Ao(n){return[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()]}function Mn(n){return n.length===1&&(n=n.concat([0])),new Date(Date.UTC(...n))}function iC(n){return!isNaN(n.valueOf())}function Io(n){return n.getUTCHours()*1e3*60*60+n.getUTCMinutes()*1e3*60+n.getUTCSeconds()*1e3+n.getUTCMilliseconds()}function rT(n,t,e=!1){let r=n.toISOString();return r=r.replace(".000",""),e&&(r=r.replace("T00:00:00Z","")),r.length>10&&(t==null?r=r.replace("Z",""):t!==0&&(r=r.replace("Z",oC(t,!0)))),r}function Oo(n){return n.toISOString().replace(/T.*$/,"")}function bu(n){return n.toISOString().match(/^\d{4}-\d{2}/)[0]}function sC(n){return uc(n.getUTCHours(),2)+":"+uc(n.getUTCMinutes(),2)+":"+uc(n.getUTCSeconds(),2)}function oC(n,t=!1){let e=n<0?"-":"+",r=Math.abs(n),a=Math.floor(r/60),i=Math.round(r%60);return t?`${e+uc(a,2)}:${uc(i,2)}`:`GMT${e}${a}${i?`:${uc(i,2)}`:""}`}function pe(n,t,e){let r,a;return function(...i){if(!r)a=n.apply(this,i);else if(!Fi(r,i)){e&&e(a);let s=n.apply(this,i);(!t||!t(s,a))&&(a=s)}return r=i,a}}function Tu(n,t,e){let r,a;return i=>{if(!r)a=n.call(this,i);else if(!Jr(r,i)){e&&e(a);let s=n.call(this,i);(!t||!t(s,a))&&(a=s)}return r=i,a}}function XY(n,t,e){let r=Object.keys(n).length;return r===1&&n.timeZoneName==="short"?a=>oC(a.timeZoneOffset):r===0&&t.week?a=>Kce(e.computeWeekNumber(a.marker),e.weekText,e.weekTextLong,e.locale,t.week):Vce(n,t,e)}function Vce(n,t,e){n=Object.assign({},n),t=Object.assign({},t),$ce(n,t),n.timeZone="UTC";let r=new Intl.DateTimeFormat(e.locale.codes,n),a;if(t.omitZeroMinute){let i=Object.assign({},n);delete i.minute,a=new Intl.DateTimeFormat(e.locale.codes,i)}return i=>{let{marker:s}=i,o;a&&!s.getUTCMinutes()?o=a:o=r;let l=o.format(s);return Yce(l,i,n,t,e)}}function $ce(n,t){n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),n.timeZoneName==="long"&&(n.timeZoneName="short"),t.omitZeroMinute&&(n.second||n.millisecond)&&delete t.omitZeroMinute}function Yce(n,t,e,r,a){return n=n.replace(Wce,""),e.timeZoneName==="short"&&(n=Gce(n,a.timeZone==="UTC"||t.timeZoneOffset==null?"UTC":oC(t.timeZoneOffset))),r.omitCommas&&(n=n.replace(zce,"").trim()),r.omitZeroMinute&&(n=n.replace(":00","")),r.meridiem===!1?n=n.replace(Lb,"").trim():r.meridiem==="narrow"?n=n.replace(Lb,(i,s)=>s.toLocaleLowerCase()):r.meridiem==="short"?n=n.replace(Lb,(i,s)=>`${s.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(n=n.replace(Lb,i=>i.toLocaleLowerCase())),n=n.replace(Uce," "),n=n.trim(),n}function Gce(n,t){let e=!1;return n=n.replace(qce,()=>(e=!0,t)),e||(n+=` ${t}`),n}function Kce(n,t,e,r,a){let i=[];return a==="long"?i.push(e):(a==="short"||a==="narrow")&&i.push(t),(a==="long"||a==="short")&&i.push(" "),i.push(r.simpleNumberFormat.format(n)),r.options.direction==="rtl"&&i.reverse(),i.join("")}function Qce(n,t,e){return e.getMarkerYear(n)!==e.getMarkerYear(t)?5:e.getMarkerMonth(n)!==e.getMarkerMonth(t)?4:e.getMarkerDay(n)!==e.getMarkerDay(t)?2:Io(n)!==Io(t)?1:0}function Zce(n,t){let e={};for(let r in n)(!(r in qb)||qb[r]<=t)&&(e[r]=n[r]);return e}function Jce(n,t,e,r){let a=0;for(;a=0;i-=1){let s=n[i][r];if(typeof s=="object"&&s)a.unshift(s);else if(s!==void 0){e[r]=s;break}}a.length&&(e[r]=aT(a))}}for(let r=n.length-1;r>=0;r-=1){let a=n[r];for(let i in a)i in e||(e[i]=a[i])}return e}function As(n,t){let e={};for(let r in n)t(n[r],r)&&(e[r]=n[r]);return e}function Na(n,t){let e={};for(let r in n)e[r]=t(n[r],r);return e}function uC(n){let t={};for(let e of n)t[e]=!0;return t}function iT(n){let t=[];for(let e in n)t.push(n[e]);return t}function Jr(n,t){if(n===t)return!0;for(let e in n)if($b.call(n,e)&&!(e in t))return!1;for(let e in t)if($b.call(t,e)&&n[e]!==t[e])return!1;return!0}function ede(n,t){let e=tde(n,t);for(let r of e)if(!Xce.test(r))return!1;return!0}function tde(n,t){let e=[];for(let r in n)$b.call(n,r)&&(r in t||e.push(r));for(let r in t)$b.call(t,r)&&n[r]!==t[r]&&e.push(r);return e}function Ub(n,t,e={}){if(n===t)return!0;for(let r in t)if(!(r in n&&rde(n[r],t[r],e[r])))return!1;for(let r in n)if(!(r in t))return!1;return!0}function rde(n,t,e){return n===t||e===!0?!0:e?e(n,t):!1}function T3(n,t=0,e,r=1){let a=[];e==null&&(e=Object.keys(n).length);for(let i=t;i{this.props.value!==s.value&&i.forEach(o=>{o.context=s.value,o.forceUpdate()})},this.sub=s=>{i.push(s);let o=s.componentWillUnmount;s.componentWillUnmount=()=>{i.splice(i.indexOf(s),1),o&&o.call(s)}}}return a},t}function D3(n,t,e,r,a,i,s,o,l,c,d,u,p,m){return{dateEnv:a,nowManager:i,options:e,pluginHooks:o,emitter:d,dispatch:l,getCurrentData:c,calendarApi:u,viewSpec:n,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:e.direction==="rtl",addResizeHandler(h){d.on("_resize",h)},removeResizeHandler(h){d.off("_resize",h)},createScrollResponder(h){return new Yb(h,d,Re(e.scrollTime),e.scrollTimeReset)},registerInteractiveComponent:p,unregisterInteractiveComponent:m}}function sde(n){let t=Object.create(this.prototype.propEquality);Object.assign(t,n),this.prototype.propEquality=t}function ode(n){let t=Object.create(this.prototype.stateEquality);Object.assign(t,n),this.prototype.stateEquality=t}function oa(n,t){typeof n=="function"?n(t):n&&(n.current=t)}function Vx(n,t){var e;return!!(t.handleCustomRendering&&n&&(!((e=t.customRenderingMetaMap)===null||e===void 0)&&e[n]))}function pC(n,t,e){let r=Object.assign(Object.assign({},n.elAttrs),{ref:e});return(n.elClasses||t)&&(r.className=(n.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),n.elStyle&&(r.style=n.elStyle),r}function lde(n){return!!n}function cde(n,t){let e=n.props;return E(Sf,Object.assign({renderProps:e.renderProps,generatorName:e.generatorName,customGenerator:e.customGenerator,defaultGenerator:e.defaultGenerator,renderId:n.context},t))}function dde(n,t){let e=typeof n=="function"?n(t):n||[];return typeof e=="string"?[e]:e}function hC(n){return[`fc-${n.type}-view`,"fc-view"]}function ude(n,t){let e=null,r=null;return n.start&&(e=t.createMarker(n.start)),n.end&&(r=t.createMarker(n.end)),!e&&!r||e&&r&&rr&&e.push({start:r,end:i.start}),i.end>r&&(r=i.end);return rt.start)&&(n.start===null||t.end===null||n.start=n.start)&&(n.end===null||t.end!==null&&t.end<=n.end)}function _a(n,t){return(n.start===null||t>=n.start)&&(n.end===null||t=t.end?new Date(t.end.valueOf()-1):n}function x3(n){let t=Math.floor(Oi(n.start,n.end))||1,e=ct(n.start),r=Bt(e,t);return{start:e,end:r}}function oT(n,t=Re(0)){let e=null,r=null;if(n.end){r=ct(n.end);let a=n.end.valueOf()-r.valueOf();a&&a>=ia(t)&&(r=Bt(r,1))}return n.start&&(e=ct(n.start),r&&r<=e&&(r=Bt(e,1))),{start:e,end:r}}function fC(n){let t=oT(n);return Oi(t.start,t.end)>1}function _o(n,t,e,r){return r==="year"?Re(e.diffWholeYears(n,t),"year"):r==="month"?Re(e.diffWholeMonths(n,t),"month"):y3(n,t)}function wu(n,t,e,r){return{instanceId:Fs(),defId:n,range:t,forcedStartTzo:e==null?null:e,forcedEndTzo:r==null?null:r}}function hde(n,t,e,r){for(let a=0;a!s[l.defId].recurringDef);for(let l in s){let c=s[l];if(c.recurringDef){let{duration:d}=c.recurringDef;d||(d=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);let u=fde(c,d,t,r,a.recurringTypes);for(let p of u){let m=wu(l,{start:p,end:r.add(p,d)});o[m.instanceId]=m}}}return{defs:s,instances:o}}function fde(n,t,e,r,a){let s=a[n.recurringDef.typeId].expand(n.recurringDef.typeData,{start:r.subtract(e.start,t),end:e.end},r);return n.allDay&&(s=s.map(ct)),s}function P3(n,t,e,r,a=gC(e),i,s){let{refined:o,extra:l}=jf(n,e,a),c=vde(t,e),d=hde(o,c,e.dateEnv,e.pluginHooks.recurringTypes);if(d){let p=mu(o,l,t?t.sourceId:"",d.allDay,!!d.duration,e,i);return p.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:p,instance:null}}let u=yde(o,c,e,r);if(u){let p=mu(o,l,t?t.sourceId:"",u.allDay,u.hasEnd,e,i),m=wu(p.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return s&&p.publicId&&s[p.publicId]&&(m.instanceId=s[p.publicId]),{def:p,instance:m}}return null}function jf(n,t,e=gC(t)){return Bf(n,e)}function gC(n){return Object.assign(Object.assign(Object.assign({},Gb),gde),n.pluginHooks.eventRefiners)}function mu(n,t,e,r,a,i,s){let o={title:n.title||"",groupId:n.groupId||"",publicId:n.id||"",url:n.url||"",recurringDef:null,defId:(s&&n.id?s[n.id]:"")||Fs(),sourceId:e,allDay:r,hasEnd:a,interactive:n.interactive,ui:Su(n,i),extendedProps:Object.assign(Object.assign({},n.extendedProps||{}),t)};for(let l of i.pluginHooks.eventDefMemberAdders)Object.assign(o,l(n));return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function yde(n,t,e,r){let{allDay:a}=n,i,s=null,o=!1,l,c=null,d=n.start!=null?n.start:n.date;if(i=e.dateEnv.createMarkerMeta(d),i)s=i.marker;else if(!r)return null;return n.end!=null&&(l=e.dateEnv.createMarkerMeta(n.end)),a==null&&(t!=null?a=t:a=(!i||i.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),a&&s&&(s=ct(s)),l&&(c=l.marker,a&&(c=ct(c)),s&&c<=s&&(c=null)),c?o=!0:r||(o=e.options.forceEventDuration||!1,c=e.dateEnv.add(s,a?e.options.defaultAllDayEventDuration:e.options.defaultTimedEventDuration)),{allDay:a,hasEnd:o,range:{start:s,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function vde(n,t){let e=null;return n&&(e=n.defaultAllDay),e==null&&(e=t.options.defaultAllDay),e}function Df(n,t,e,r,a,i){let s=vr(),o=gC(e);for(let l of n){let c=P3(l,t,e,r,o,a,i);c&&fc(c,s)}return s}function fc(n,t=vr()){return t.defs[n.def.defId]=n.def,n.instance&&(t.instances[n.instance.instanceId]=n.instance),t}function Hf(n,t){let e=n.instances[t];if(e){let r=n.defs[e.defId],a=cT(n,i=>bde(r,i));return a.defs[r.defId]=r,a.instances[e.instanceId]=e,a}return vr()}function bde(n,t){return!!(n.groupId&&n.groupId===t.groupId)}function vr(){return{defs:{},instances:{}}}function lT(n,t){return{defs:Object.assign(Object.assign({},n.defs),t.defs),instances:Object.assign(Object.assign({},n.instances),t.instances)}}function cT(n,t){let e=As(n.defs,t),r=As(n.instances,a=>e[a.defId]);return{defs:e,instances:r}}function Tde(n,t){let{defs:e,instances:r}=n,a={},i={};for(let s in e)t.defs[s]||(a[s]=e[s]);for(let s in r)!t.instances[s]&&a[r[s].defId]&&(i[s]=r[s]);return{defs:a,instances:i}}function kde(n,t){return Array.isArray(n)?Df(n,null,t,!0):typeof n=="object"&&n?Df([n],null,t,!0):n!=null?String(n):null}function $x(n){return Array.isArray(n)?n:typeof n=="string"?n.split(/\s+/):[]}function Su(n,t){let e=kde(n.constraint,t);return{display:n.display||null,startEditable:n.startEditable!=null?n.startEditable:n.editable,durationEditable:n.durationEditable!=null?n.durationEditable:n.editable,constraints:e!=null?[e]:[],overlap:n.overlap!=null?n.overlap:null,allows:n.allow!=null?[n.allow]:[],backgroundColor:n.backgroundColor||n.color||"",borderColor:n.borderColor||n.color||"",textColor:n.textColor||"",classNames:(n.className||[]).concat(n.classNames||[])}}function yC(n){return n.reduce(Sde,wde)}function Sde(n,t){return{display:t.display!=null?t.display:n.display,startEditable:t.startEditable!=null?t.startEditable:n.startEditable,durationEditable:t.durationEditable!=null?t.durationEditable:n.durationEditable,constraints:n.constraints.concat(t.constraints),overlap:typeof t.overlap=="boolean"?t.overlap:n.overlap,allows:n.allows.concat(t.allows),backgroundColor:t.backgroundColor||n.backgroundColor,borderColor:t.borderColor||n.borderColor,textColor:t.textColor||n.textColor,classNames:n.classNames.concat(t.classNames)}}function vC(n,t,e=bC(t)){let r;if(typeof n=="string"?r={url:n}:typeof n=="function"||Array.isArray(n)?r={events:n}:typeof n=="object"&&n&&(r=n),r){let{refined:a,extra:i}=Bf(r,e),s=Ede(a,t);if(s)return{_raw:n,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:a.defaultAllDay,eventDataTransform:a.eventDataTransform,success:a.success,failure:a.failure,publicId:a.id||"",sourceId:Fs(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Su(a,t),extendedProps:i}}return null}function bC(n){return Object.assign(Object.assign(Object.assign({},Gb),Dde),n.pluginHooks.eventSourceRefiners)}function Ede(n,t){let e=t.pluginHooks.eventSourceDefs;for(let r=e.length-1;r>=0;r-=1){let i=e[r].parseMeta(n);if(i)return{sourceDefId:r,meta:i}}return null}function M3(n,t,e,r,a){switch(t.type){case"RECEIVE_EVENTS":return xde(n,e[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,a);case"RESET_RAW_EVENTS":return Cde(n,e[t.sourceId],t.rawEvents,r.activeRange,a);case"ADD_EVENTS":return Pde(n,t.eventStore,r?r.activeRange:null,a);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return lT(n,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?hc(n,r.activeRange,a):n;case"REMOVE_EVENTS":return Tde(n,t.eventStore);case"REMOVE_EVENT_SOURCE":return I3(n,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return cT(n,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return vr();default:return n}}function xde(n,t,e,r,a,i){if(t&&e===t.latestFetchId){let s=Df(A3(a,t,i),t,i);return r&&(s=hc(s,r,i)),lT(I3(n,t.sourceId),s)}return n}function Cde(n,t,e,r,a){let{defIdMap:i,instanceIdMap:s}=Ade(n),o=Df(A3(e,t,a),t,a,!1,i,s);return hc(o,r,a)}function A3(n,t,e){let r=e.options.eventDataTransform,a=t?t.eventDataTransform:null;return a&&(n=r3(n,a)),r&&(n=r3(n,r)),n}function r3(n,t){let e;if(!t)e=n;else{e=[];for(let r of n){let a=t(r);a?e.push(a):a==null&&e.push(r)}}return e}function Pde(n,t,e,r){return e&&(t=hc(t,e,r)),lT(n,t)}function TC(n,t,e){let{defs:r}=n,a=Na(n.instances,i=>r[i.defId].allDay?i:Object.assign(Object.assign({},i),{range:{start:e.createMarker(t.toDate(i.range.start,i.forcedStartTzo)),end:e.createMarker(t.toDate(i.range.end,i.forcedEndTzo))},forcedStartTzo:e.canComputeOffset?null:i.forcedStartTzo,forcedEndTzo:e.canComputeOffset?null:i.forcedEndTzo}));return{defs:r,instances:a}}function I3(n,t){return cT(n,e=>e.sourceId!==t)}function Mde(n,t){return{defs:n.defs,instances:As(n.instances,e=>!t[e.instanceId])}}function Ade(n){let{defs:t,instances:e}=n,r={},a={};for(let i in t){let s=t[i],{publicId:o}=s;o&&(r[o]=i)}for(let i in e){let s=e[i],o=t[s.defId],{publicId:l}=o;l&&(a[l]=i)}return{defIdMap:r,instanceIdMap:a}}function Ide(n,t,e){(n[t]||(n[t]=[])).push(e)}function _de(n,t,e){e?n[t]&&(n[t]=n[t].filter(r=>r!==e)):delete n[t]}function kC(n,t){return Df(Rde(n),null,t)}function Rde(n){let t;return n===!0?t=[{}]:Array.isArray(n)?t=n.filter(e=>e.daysOfWeek):typeof n=="object"&&n?t=[n]:t=[],t=t.map(e=>Object.assign(Object.assign({},Nde),e)),t}function dT(n,t,e){e.emitter.trigger("select",Object.assign(Object.assign({},wC(n,e)),{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view}))}function Fde(n,t){t.emitter.trigger("unselect",{jsEvent:n?n.origEvent:null,view:t.viewApi||t.calendarApi.view})}function wC(n,t){let e={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(e,r(n,t));return Object.assign(e,Yde(n,t.dateEnv)),e}function Ef(n,t,e){let{dateEnv:r,options:a}=e,i=t;return n?(i=ct(i),i=r.add(i,a.defaultAllDayEventDuration)):i=r.add(i,a.defaultTimedEventDuration),i}function zf(n,t,e,r){let a=Kb(n.defs,t),i=vr();for(let s in n.defs){let o=n.defs[s];i.defs[s]=Ode(o,a[s],e,r)}for(let s in n.instances){let o=n.instances[s],l=i.defs[o.defId];i.instances[s]=Lde(o,l,a[o.defId],e,r)}return i}function Ode(n,t,e,r){let a=e.standardProps||{};a.hasEnd==null&&t.durationEditable&&(e.startDelta||e.endDelta)&&(a.hasEnd=!0);let i=Object.assign(Object.assign(Object.assign({},n),a),{ui:Object.assign(Object.assign({},n.ui),a.ui)});e.extendedProps&&(i.extendedProps=Object.assign(Object.assign({},i.extendedProps),e.extendedProps));for(let s of r.pluginHooks.eventDefMutationAppliers)s(i,e,r);return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function Lde(n,t,e,r,a){let{dateEnv:i}=a,s=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,l=Object.assign({},n);return s&&(l.range=x3(l.range)),r.datesDelta&&e.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&e.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&e.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),o&&(l.range={start:l.range.start,end:Ef(t.allDay,l.range.start,a)}),t.allDay&&(l.range={start:ct(l.range.start),end:ct(l.range.end)}),l.range.endN3(e,t))}function N3(n,t){let e=[];return t[""]&&e.push(t[""]),t[n.defId]&&e.push(t[n.defId]),e.push(n.ui),yC(e)}function Dc(n,t){let e=n.map(Bde);return e.sort((r,a)=>h3(r,a,t)),e.map(r=>r._seg)}function Bde(n){let{eventRange:t}=n,e=t.def,r=t.instance?t.instance.range:t.range,a=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},e.extendedProps),e),{id:e.publicId,start:a,end:i,duration:i-a,allDay:Number(e.allDay),_seg:n})}function jde(n,t){let{pluginHooks:e}=t,r=e.isDraggableTransformers,{def:a,ui:i}=n.eventRange,s=i.startEditable;for(let o of r)s=o(s,a,i,t);return s}function Hde(n,t){return n.isStart&&n.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function zde(n,t){return n.isEnd&&n.eventRange.ui.durationEditable}function Bo(n,t,e,r,a,i,s){let{dateEnv:o,options:l}=e,{displayEventTime:c,displayEventEnd:d}=l,u=n.eventRange.def,p=n.eventRange.instance;c==null&&(c=r!==!1),d==null&&(d=a!==!1);let m=p.range.start,h=p.range.end,f=i||n.start||n.eventRange.range.start,g=s||n.end||n.eventRange.range.end,v=ct(m).valueOf()===ct(f).valueOf(),T=ct(Ii(h,-1)).valueOf()===ct(Ii(g,-1)).valueOf();return c&&!u.allDay&&(v||T)?(f=v?m:f,g=T?h:g,d&&u.hasEnd?o.formatRange(f,g,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:s?null:p.forcedEndTzo}):o.format(f,t,{forcedTzo:i?null:p.forcedStartTzo})):""}function la(n,t,e){let r=n.eventRange.range;return{isPast:r.end<=(e||t.start),isFuture:r.start>=(e||t.end),isToday:t&&_a(t,r.start)}}function Ude(n){let t=["fc-event"];return n.isMirror&&t.push("fc-event-mirror"),n.isDraggable&&t.push("fc-event-draggable"),(n.isStartResizable||n.isEndResizable)&&t.push("fc-event-resizable"),n.isDragging&&t.push("fc-event-dragging"),n.isResizing&&t.push("fc-event-resizing"),n.isSelected&&t.push("fc-event-selected"),n.isStart&&t.push("fc-event-start"),n.isEnd&&t.push("fc-event-end"),n.isPast&&t.push("fc-event-past"),n.isToday&&t.push("fc-event-today"),n.isFuture&&t.push("fc-event-future"),t}function Uf(n){return n.instance?n.instance.instanceId:`${n.def.defId}:${n.range.start.toISOString()}`}function Du(n,t){let{def:e,instance:r}=n.eventRange,{url:a}=e;if(a)return{href:a};let{emitter:i,options:s}=t,{eventInteractive:o}=s;return o==null&&(o=e.interactive,o==null&&(o=!!i.hasHandlers("eventClick"))),o?p3(l=>{i.trigger("eventClick",{el:l.target,event:new St(t,e,r),jsEvent:l,view:t.viewApi})}):{}}function qde(n,t,e){let r=Vde(n,t),{range:a}=r;if(!a.start)return null;if(!a.end){if(e==null)return null;a.end=t.add(a.start,e)}return r}function Vde(n,t){let{refined:e,extra:r}=Bf(n,Wde),a=e.start?t.createMarkerMeta(e.start):null,i=e.end?t.createMarkerMeta(e.end):null,{allDay:s}=e;return s==null&&(s=a&&a.isTimeUnspecified&&(!i||i.isTimeUnspecified)),Object.assign({range:{start:a?a.marker:null,end:i?i.marker:null},allDay:s},r)}function DC(n,t){return E3(n.range,t.range)&&n.allDay===t.allDay&&$de(n,t)}function $de(n,t){for(let e in t)if(e!=="range"&&e!=="allDay"&&n[e]!==t[e])return!1;for(let e in n)if(!(e in t))return!1;return!0}function Yde(n,t){return Object.assign(Object.assign({},R3(n.range,t,n.allDay)),{allDay:n.allDay})}function EC(n,t,e){return Object.assign(Object.assign({},R3(n,t,e)),{timeZone:t.timeZone})}function R3(n,t,e){return{start:t.toDate(n.start),end:t.toDate(n.end),startStr:t.formatIso(n.start,{omitTime:e}),endStr:t.formatIso(n.end,{omitTime:e})}}function Gde(n,t,e){let r=jf({editable:!1},e),a=mu(r.refined,r.extra,"",n.allDay,!0,e);return{def:a,ui:N3(a,t),instance:wu(a.defId,n.range),range:n.range,isStart:!0,isEnd:!0}}function xC(n,t,e){let r=!1,a=function(o){r||(r=!0,t(o))},i=function(o){r||(r=!0,e(o))},s=n(a,i);s&&typeof s.then=="function"&&s.then(a,i)}function CC(n,t,e){n=n.toUpperCase();let r={method:n};return n==="GET"?t+=(t.indexOf("?")===-1?"?":"&")+new URLSearchParams(e):(r.body=new URLSearchParams(e),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then(a=>{if(a.ok)return a.json().then(i=>[i,a],()=>{throw new Qb("Failure parsing JSON",a)});throw new Qb("Request failed",a)})}function PC(){return _x==null&&(_x=Kde()),_x}function Kde(){if(typeof document=="undefined")return!0;let n=document.createElement("div");n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.innerHTML="
",n.querySelector("table").style.height="100px",n.querySelector("div").style.height="100%",document.body.appendChild(n);let e=n.querySelector("div").offsetHeight>0;return document.body.removeChild(n),e}function F3(n,t){return{component:n,el:t.el,useEventCenter:t.useEventCenter!=null?t.useEventCenter:!0,isHitComboAllowed:t.isHitComboAllowed||null}}function Wf(n){return{[n.component.uid]:n}}function Qde(n){let t=ct(n),e=Bt(t,1);return{start:t,end:e}}function MC(n,t){return n.left>=t.left&&n.left=t.top&&n.tope:t&&n>=t.end)}}function Eu(n,t){let e=["fc-day",`fc-day-${_ce[n.dow]}`];return n.isDisabled?e.push("fc-day-disabled"):(n.isToday&&(e.push("fc-day-today"),e.push(t.getClass("today"))),n.isPast&&e.push("fc-day-past"),n.isFuture&&e.push("fc-day-future"),n.isOther&&e.push("fc-day-other")),e}function ji(n,t,e="day",r=!0){let{dateEnv:a,options:i,calendarApi:s}=n,o=a.format(t,e==="week"?Xde:Jde);if(i.navLinks){let l=a.toDate(t),c=d=>{let u=e==="day"?i.navLinkDayClick:e==="week"?i.navLinkWeekClick:null;typeof u=="function"?u.call(s,a.toDate(t),d):(typeof u=="string"&&(e=u),s.zoomTo(t,e))};return Object.assign({title:vu(i.navLinkHint,[o,l],o),"data-navlink":""},r?u3(c):{onClick:c})}return{"aria-label":o}}function O3(){return Rx===null&&(Rx=eue()),Rx}function eue(){let n=document.createElement("div");Sc(n,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),n.innerHTML="
",document.body.appendChild(n);let e=n.firstChild.getBoundingClientRect().left>n.getBoundingClientRect().left;return Rf(n),e}function L3(){return Fx||(Fx=tue()),Fx}function tue(){let n=document.createElement("div");n.style.overflow="scroll",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",document.body.appendChild(n);let t=B3(n);return document.body.removeChild(n),t}function B3(n){return{x:n.offsetHeight-n.clientHeight,y:n.offsetWidth-n.clientWidth}}function j3(n,t=!1){let e=window.getComputedStyle(n),r=parseInt(e.borderLeftWidth,10)||0,a=parseInt(e.borderRightWidth,10)||0,i=parseInt(e.borderTopWidth,10)||0,s=parseInt(e.borderBottomWidth,10)||0,o=B3(n),l=o.y-r-a,c=o.x-i-s,d={borderLeft:r,borderRight:a,borderTop:i,borderBottom:s,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return O3()&&e.direction==="rtl"?d.scrollbarLeft=l:d.scrollbarRight=l,t&&(d.paddingLeft=parseInt(e.paddingLeft,10)||0,d.paddingRight=parseInt(e.paddingRight,10)||0,d.paddingTop=parseInt(e.paddingTop,10)||0,d.paddingBottom=parseInt(e.paddingBottom,10)||0),d}function NC(n,t=!1,e){let r=e?n.getBoundingClientRect():Vf(n),a=j3(n,t),i={left:r.left+a.borderLeft+a.scrollbarLeft,right:r.right-a.borderRight-a.scrollbarRight,top:r.top+a.borderTop,bottom:r.bottom-a.borderBottom-a.scrollbarBottom};return t&&(i.left+=a.paddingLeft,i.right-=a.paddingRight,i.top+=a.paddingTop,i.bottom-=a.paddingBottom),i}function Vf(n){let t=n.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY}}function rue(n){let t=pT(n),e=n.getBoundingClientRect();for(let r of t){let a=uT(e,r.getBoundingClientRect());if(a)e=a;else return null}return e}function pT(n){let t=[];for(;n instanceof HTMLElement;){let e=window.getComputedStyle(n);if(e.position==="fixed")break;/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)&&t.push(n),n=n.parentNode}return t}function jb(n,t){let e=n.length;if(e!==t.length)return!1;for(let r=0;re(n[a-1]))return[a,0];for(;rs)r=i+1;else return[i,1]}return[r,0]}function Yf(n){let{refined:t,extra:e}=Bf(n,aue);return{startTime:t.startTime||null,duration:t.duration||null,create:t.create!=null?t.create:!0,sourceId:t.sourceId,leftoverProps:e}}function H3(n,t){return!n||t>10?rt({weekday:"short"}):t>1?rt({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):rt({weekday:"long"})}function U3(n){return n.text}function sue(n,t,e){return n||H3(t,e)}function Hb(n,t){let e=n.activeRange;return t?e:{start:Ii(e.start,n.slotMinTime.milliseconds),end:Ii(e.end,n.slotMaxTime.milliseconds-864e5)}}function Gf(n,t,e){let{instances:r}=n.mutatedEvents;for(let a in r)if(!ku(t.validRange,r[a].range))return!1;return W3({eventDrag:n},e)}function FC(n,t,e){return ku(t.validRange,n.range)?W3({dateSelection:n},e):!1}function W3(n,t){let e=t.getCurrentData(),r=Object.assign({businessHours:e.businessHours,dateSelection:"",eventStore:e.eventStore,eventUiBases:e.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},n);return(t.pluginHooks.isPropsValid||q3)(r,t)}function q3(n,t,e={},r){return!(n.eventDrag&&!oue(n,t,e,r)||n.dateSelection&&!lue(n,t,e,r))}function oue(n,t,e,r){let a=t.getCurrentData(),i=n.eventDrag,s=i.mutatedEvents,o=s.defs,l=s.instances,c=Kb(o,i.isEvent?n.eventUiBases:{"":a.selectionConfig});r&&(c=Na(c,r));let d=Mde(n.eventStore,i.affectedEvents.instances),u=d.defs,p=d.instances,m=Kb(u,n.eventUiBases);for(let h in l){let f=l[h],g=f.range,v=c[f.defId],T=o[f.defId];if(!V3(v.constraints,g,d,n.businessHours,t))return!1;let{eventOverlap:k}=t.options,w=typeof k=="function"?k:null;for(let x in p){let I=p[x];if(sT(g,I.range)&&(m[I.defId].overlap===!1&&i.isEvent||v.overlap===!1||w&&!w(new St(t,u[I.defId],I),new St(t,T,f))))return!1}let S=a.eventStore;for(let x of v.allows){let I=Object.assign(Object.assign({},e),{range:f.range,allDay:T.allDay}),A=S.defs[T.defId],B=S.instances[h],z;if(A?z=new St(t,A,B):z=new St(t,T),!x(wC(I,t),z))return!1}}return!0}function lue(n,t,e,r){let a=n.eventStore,i=a.defs,s=a.instances,o=n.dateSelection,l=o.range,{selectionConfig:c}=t.getCurrentData();if(r&&(c=r(c)),!V3(c.constraints,l,a,n.businessHours,t))return!1;let{selectOverlap:d}=t.options,u=typeof d=="function"?d:null;for(let p in s){let m=s[p];if(sT(l,m.range)&&(c.overlap===!1||u&&!u(new St(t,i[m.defId],m),null)))return!1}for(let p of c.allows){let m=Object.assign(Object.assign({},e),o);if(!p(wC(m,t),null))return!1}return!0}function V3(n,t,e,r,a){for(let i of n)if(!due(cue(i,t,e,r,a),t))return!1;return!0}function cue(n,t,e,r,a){return n==="businessHours"?Lx(hc(r,t,a)):typeof n=="string"?Lx(cT(e,i=>i.groupId===n)):typeof n=="object"&&n?Lx(hc(n,t,a)):[]}function Lx(n){let{instances:t}=n,e=[];for(let r in t)e.push(t[r].range);return e}function due(n,t){for(let e of n)if(ku(e,t))return!0;return!1}function $3(n){let t=c3(n,".fc-scrollgrid-shrink"),e=0;for(let r of t)e=Math.max(e,xce(r));return Math.ceil(e)}function OC(n,t){return n.liquid&&t.liquid}function Y3(n,t){return t.maxHeight!=null||OC(n,t)}function G3(n,t,e,r){let{expandRows:a}=e;return typeof t.content=="function"?t.content(e):E("table",{role:"presentation",className:[t.tableClassName,n.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:a?e.clientHeight:""}},e.tableColGroupNode,E(r?"thead":"tbody",{role:"presentation"},typeof t.rowContent=="function"?t.rowContent(e):t.rowContent))}function K3(n,t){return Fi(n,t,Jr)}function Q3(n,t){let e=[];for(let r of n){let a=r.span||1;for(let i=0;it.eventRange.range.end?n:t}var i3,jx,Mx,wce,pc,Sce,$Y,YY,GY,KY,Cce,_ce,Ix,qb,Lb,zce,Uce,Wce,qce,Hx,zx,Ux,lC,Li,cC,dC,Lo,b3,$b,Xce,k3,Wx,ide,kf,Is,qx,Yb,Ra,_i,Ue,Sf,mC,Kt,sa,mc,Wb,C3,gde,Gb,wde,Dde,_s,Nde,Mo,St,Wde,Qb,_x,xf,ii,Ec,An,Cf,Nx,Pf,Jde,Xde,Rx,Fx,si,gc,Mf,Af,or,yc,Nf,xu,aue,z3,Zb,iue,Jb,Ns,vc,bc,Tc,zb,fu,In,No,Rs,Ro,Qf,mue,Fo,kc,Jf,Bx,Yx,Gx,wc,LC=b(()=>{Ms();Ms();vf();i3=[],jx=new Map;typeof document!="undefined"&&o3(document);wce=':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)}';Ri(wce);pc=class{constructor(t){this.drainedOption=t,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(t){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),t==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),t))}pause(t=""){let{pauseDepths:e}=this;e[t]=(e[t]||0)+1,this.clearTimeout()}resume(t="",e){let{pauseDepths:r}=this;t in r&&(e?delete r[t]:(r[t]-=1,r[t]<=0&&delete r[t]),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()}};Sce=/(top|left|right|bottom|width|height)$/i;$Y=0;YY=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];GY=0;KY=["years","months","days","milliseconds"],Cce=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;_ce=["sun","mon","tue","wed","thu","fri","sat"];Ix={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},qb={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Lb=/\s*([ap])\.?m\.?/i,zce=/,/g,Uce=/\s+/g,Wce=/\u200e/g,qce=/UTC|GMT/,Hx=class{constructor(t){let e={},r={},a=9;for(let i in t)i in Ix?(r[i]=t[i],Ix[i]<9&&(a=Math.min(Ix[i],a))):(e[i]=t[i],i in qb&&(a=Math.min(qb[i],a)));this.standardDateProps=e,this.extendedSettings=r,this.smallestUnitNum=a,this.buildFormattingFunc=pe(XY)}format(t,e){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,e)(t)}formatRange(t,e,r,a){let{standardDateProps:i,extendedSettings:s}=this,o=Qce(t.marker,e.marker,r.calendarSystem);if(!o)return this.format(t,r);let l=o;l>1&&(i.year==="numeric"||i.year==="2-digit")&&(i.month==="numeric"||i.month==="2-digit")&&(i.day==="numeric"||i.day==="2-digit")&&(l=1);let c=this.format(t,r),d=this.format(e,r);if(c===d)return c;let u=Zce(i,l),p=XY(u,s,r),m=p(t),h=p(e),f=Jce(c,m,d,h),g=s.separator||a||r.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"}}};zx=class{constructor(t){this.cmdStr=t}format(t,e,r){return e.cmdFormatter(this.cmdStr,Vb(t,null,e,r))}formatRange(t,e,r,a){return r.cmdFormatter(this.cmdStr,Vb(t,e,r,a))}},Ux=class{constructor(t){this.func=t}format(t,e,r){return this.func(Vb(t,null,e,r))}formatRange(t,e,r,a){return this.func(Vb(t,e,r,a))}};lC={navLinkDayClick:F,navLinkWeekClick:F,duration:Re,bootstrapFontAwesome:F,buttonIcons:F,customButtons:F,defaultAllDayEventDuration:Re,defaultTimedEventDuration:Re,nextDayThreshold:Re,scrollTime:Re,scrollTimeReset:Boolean,slotMinTime:Re,slotMaxTime:Re,dayPopoverFormat:rt,slotDuration:Re,snapDuration:Re,headerToolbar:F,footerToolbar:F,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:rt,dayHeaderClassNames:F,dayHeaderContent:F,dayHeaderDidMount:F,dayHeaderWillUnmount:F,dayCellClassNames:F,dayCellContent:F,dayCellDidMount:F,dayCellWillUnmount:F,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:F,weekNumbers:Boolean,weekNumberClassNames:F,weekNumberContent:F,weekNumberDidMount:F,weekNumberWillUnmount:F,editable:Boolean,viewClassNames:F,viewDidMount:F,viewWillUnmount:F,nowIndicator:Boolean,nowIndicatorSnap:F,nowIndicatorClassNames:F,nowIndicatorContent:F,nowIndicatorDidMount:F,nowIndicatorWillUnmount:F,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:F,locale:F,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:F,eventOrder:m3,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:F,contentHeight:F,direction:String,weekNumberFormat:rt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:F,initialDate:F,now:F,eventDataTransform:F,stickyHeaderDates:F,stickyFooterScrollbar:F,viewHeight:F,defaultAllDay:Boolean,eventSourceFailure:F,eventSourceSuccess:F,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:F,eventConstraint:F,eventAllow:F,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:F,eventContent:F,eventDidMount:F,eventWillUnmount:F,selectConstraint:F,selectOverlap:F,selectAllow:F,droppable:Boolean,unselectCancel:String,slotLabelFormat:F,slotLaneClassNames:F,slotLaneContent:F,slotLaneDidMount:F,slotLaneWillUnmount:F,slotLabelClassNames:F,slotLabelContent:F,slotLabelDidMount:F,slotLabelWillUnmount:F,dayMaxEvents:F,dayMaxEventRows:F,dayMinWidth:Number,slotLabelInterval:Re,allDayText:String,allDayClassNames:F,allDayContent:F,allDayDidMount:F,allDayWillUnmount:F,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:rt,rerenderDelay:Number,moreLinkText:F,moreLinkHint:F,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:F,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Re,hiddenDays:F,fixedWeekCount:Boolean,validRange:F,visibleRange:F,titleFormat:F,eventInteractive:Boolean,noEventsText:String,viewHint:F,navLinkHint:F,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:F,moreLinkClassNames:F,moreLinkContent:F,moreLinkDidMount:F,moreLinkWillUnmount:F,monthStartFormat:rt,handleCustomRendering:F,customRenderingMetaMap:F,customRenderingReplaces:Boolean},Li={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"},cC={datesSet:F,eventsSet:F,eventAdd:F,eventChange:F,eventRemove:F,windowResize:F,eventClick:F,eventMouseEnter:F,eventMouseLeave:F,select:F,unselect:F,loading:F,_unmount:F,_beforeprint:F,_afterprint:F,_noEventDrop:F,_noEventResize:F,_resize:F,_scrollRequest:F},dC={buttonText:F,buttonHints:F,views:F,plugins:F,initialEvents:F,events:F,eventSources:F},Lo={headerToolbar:dc,footerToolbar:dc,buttonText:dc,buttonHints:dc,buttonIcons:dc,dateIncrement:dc,plugins:Bb,events:Bb,eventSources:Bb,resources:Bb};b3={type:String,component:F,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:F,usesMinMaxTime:Boolean,classNames:F,content:F,didMount:F,willUnmount:F};({hasOwnProperty:$b}=Object.prototype);Xce=/^on[A-Z]/;k3={};Wx=class{getMarkerYear(t){return t.getUTCFullYear()}getMarkerMonth(t){return t.getUTCMonth()}getMarkerDay(t){return t.getUTCDate()}arrayToMarker(t){return Mn(t)}markerToArray(t){return Ao(t)}};nde("gregory",Wx);ide=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;kf=class{constructor(t){let e=this.timeZone=t.timeZone,r=e!=="local"&&e!=="UTC";t.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new t.namedTimeZoneImpl(e)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=ade(t.calendarSystem),this.locale=t.locale,this.weekDow=t.locale.week.dow,this.weekDoy=t.locale.week.doy,t.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof t.firstDay=="number"&&(this.weekDow=t.firstDay),typeof t.weekNumberCalculation=="function"&&(this.weekNumberFunc=t.weekNumberCalculation),this.weekText=t.weekText!=null?t.weekText:t.locale.options.weekText,this.weekTextLong=(t.weekTextLong!=null?t.weekTextLong:t.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=t.cmdFormatter,this.defaultSeparator=t.defaultSeparator}createMarker(t){let e=this.createMarkerMeta(t);return e===null?null:e.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Mn(ZY(new Date))}createMarkerMeta(t){if(typeof t=="string")return this.parse(t);let e=null;return typeof t=="number"?e=this.timestampToMarker(t):t instanceof Date?(t=t.valueOf(),isNaN(t)||(e=this.timestampToMarker(t))):Array.isArray(t)&&(e=Mn(t)),e===null||!iC(e)?null:{marker:e,isTimeUnspecified:!1,forcedTzo:null}}parse(t){let e=w3(t);if(e===null)return null;let{marker:r}=e,a=null;return e.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-e.timeZoneOffset*60*1e3):a=e.timeZoneOffset),{marker:r,isTimeUnspecified:e.isTimeUnspecified,forcedTzo:a}}getYear(t){return this.calendarSystem.getMarkerYear(t)}getMonth(t){return this.calendarSystem.getMarkerMonth(t)}getDay(t){return this.calendarSystem.getMarkerDay(t)}add(t,e){let r=this.calendarSystem.markerToArray(t);return r[0]+=e.years,r[1]+=e.months,r[2]+=e.days,r[6]+=e.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(t,e){let r=this.calendarSystem.markerToArray(t);return r[0]-=e.years,r[1]-=e.months,r[2]-=e.days,r[6]-=e.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(t,e){let r=this.calendarSystem.markerToArray(t);return r[0]+=e,this.calendarSystem.arrayToMarker(r)}addMonths(t,e){let r=this.calendarSystem.markerToArray(t);return r[1]+=e,this.calendarSystem.arrayToMarker(r)}diffWholeYears(t,e){let{calendarSystem:r}=this;return Io(t)===Io(e)&&r.getMarkerDay(t)===r.getMarkerDay(e)&&r.getMarkerMonth(t)===r.getMarkerMonth(e)?r.getMarkerYear(e)-r.getMarkerYear(t):null}diffWholeMonths(t,e){let{calendarSystem:r}=this;return Io(t)===Io(e)&&r.getMarkerDay(t)===r.getMarkerDay(e)?r.getMarkerMonth(e)-r.getMarkerMonth(t)+(r.getMarkerYear(e)-r.getMarkerYear(t))*12:null}greatestWholeUnit(t,e){let r=this.diffWholeYears(t,e);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(t,e),r!==null?{unit:"month",value:r}:(r=v3(t,e),r!==null?{unit:"week",value:r}:(r=pu(t,e),r!==null?{unit:"day",value:r}:(r=Nce(t,e),bf(r)?{unit:"hour",value:r}:(r=Rce(t,e),bf(r)?{unit:"minute",value:r}:(r=Fce(t,e),bf(r)?{unit:"second",value:r}:{unit:"millisecond",value:e.valueOf()-t.valueOf()}))))))}countDurationsBetween(t,e,r){let a;return r.years&&(a=this.diffWholeYears(t,e),a!==null)?a/Ace(r):r.months&&(a=this.diffWholeMonths(t,e),a!==null)?a/Ice(r):r.days&&(a=pu(t,e),a!==null)?a/uu(r):(e.valueOf()-t.valueOf())/ia(r)}startOf(t,e){return e==="year"?this.startOfYear(t):e==="month"?this.startOfMonth(t):e==="week"?this.startOfWeek(t):e==="day"?ct(t):e==="hour"?Oce(t):e==="minute"?Lce(t):e==="second"?Bce(t):null}startOfYear(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t)])}startOfMonth(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t)])}startOfWeek(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t),t.getUTCDate()-(t.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(t){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(t)):jce(t,this.weekDow,this.weekDoy)}format(t,e,r={}){return e.format({marker:t,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(t)},this)}formatRange(t,e,r,a={}){return a.isEndExclusive&&(e=Ii(e,-1)),r.formatRange({marker:t,timeZoneOffset:a.forcedStartTzo!=null?a.forcedStartTzo:this.offsetForMarker(t)},{marker:e,timeZoneOffset:a.forcedEndTzo!=null?a.forcedEndTzo:this.offsetForMarker(e)},this,a.defaultSeparator)}formatIso(t,e={}){let r=null;return e.omitTimeZoneOffset||(e.forcedTzo!=null?r=e.forcedTzo:r=this.offsetForMarker(t)),rT(t,r,e.omitTime)}timestampToMarker(t){return this.timeZone==="local"?Mn(ZY(new Date(t))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(t):Mn(this.namedTimeZoneImpl.timestampToArray(t))}offsetForMarker(t){return this.timeZone==="local"?-JY(Ao(t)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ao(t)):null}toDate(t,e){return this.timeZone==="local"?JY(Ao(t)):this.timeZone==="UTC"?new Date(t.valueOf()):this.namedTimeZoneImpl?new Date(t.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ao(t))*1e3*60):new Date(t.valueOf()-(e||0))}},Is=class{constructor(t){this.iconOverrideOption&&this.setIconOverride(t[this.iconOverrideOption])}setIconOverride(t){let e,r;if(typeof t=="object"&&t){e=Object.assign({},this.iconClasses);for(r in t)e[r]=this.applyIconOverridePrefix(t[r]);this.iconClasses=e}else t===!1&&(this.iconClasses={})}applyIconOverridePrefix(t){let e=this.iconOverridePrefix;return e&&t.indexOf(e)!==0&&(t=e+t),t}getClass(t){return this.classes[t]||""}getIconClass(t,e){let r;return e&&this.rtlIconClasses?r=this.rtlIconClasses[t]||this.iconClasses[t]:r=this.iconClasses[t],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(t){let e;return this.iconOverrideCustomButtonOption&&(e=t[this.iconOverrideCustomButtonOption],e)?`${this.baseIconClass} ${this.applyIconOverridePrefix(e)}`:""}};Is.prototype.classes={};Is.prototype.iconClasses={};Is.prototype.baseIconClass="";Is.prototype.iconOverridePrefix="";qx=class extends Lr{render(){return E("div",{})}componentDidMount(){this.setState({})}};Yb=class{constructor(t,e,r,a){this.execFunc=t,this.emitter=e,this.scrollTime=r,this.scrollTimeReset=a,this.handleScrollRequest=i=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},i),this.drain()},e.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(t){t&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},Ra=S3({});_i=class extends Lr{shouldComponentUpdate(t,e){return!Ub(this.props,t,this.propEquality)||!Ub(this.state,e,this.stateEquality)}safeSetState(t){Ub(this.state,Object.assign(Object.assign({},this.state),t),this.stateEquality)||this.setState(t)}};_i.addPropsEquality=sde;_i.addStateEquality=ode;_i.contextType=Ra;_i.prototype.propEquality={};_i.prototype.stateEquality={};Ue=class extends _i{};Ue.contextType=Ra;Sf=class extends Ue{constructor(){super(...arguments),this.id=Fs(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=t=>{let{options:e}=this.context,{generatorName:r}=this.props;(!e.customRenderingReplaces||!Vx(r,e))&&this.updateElRef(t)},this.updateElRef=t=>{this.props.elRef&&oa(this.props.elRef,t)}}render(){let{props:t,context:e}=this,{options:r}=e,{customGenerator:a,defaultGenerator:i,renderProps:s}=t,o=pC(t,[],this.handleEl),l=!1,c,d=[],u;if(a!=null){let p=typeof a=="function"?a(s,E):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?kx(p):typeof p!="function")?c=p:u=p}}else l=!Vx(t.generatorName,r);return l&&i&&(c=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=u,E(t.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(t){var e;let{props:r,context:a}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=a.options;if(i){let o=(e=this.currentGeneratorMeta)!==null&&e!==void 0?e:s==null?void 0:s[r.generatorName];o&&i(Object.assign(Object.assign({id:this.id,isActive:t,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:o},r),{elClasses:(r.elClasses||[]).filter(lde)}))}}applyQueueudDomNodes(){let{queuedDomNodes:t,currentDomNodes:e}=this,r=this.base;if(!Fi(t,e)){e.forEach(Rf);for(let a of t)r.appendChild(a);this.currentDomNodes=t}}};Sf.addPropsEquality({elClasses:Fi,elStyle:Jr,elAttrs:ede,renderProps:Jr});mC=S3(0),Kt=class extends Lr{constructor(){super(...arguments),this.InnerContent=cde.bind(void 0,this),this.handleEl=t=>{this.el=t,this.props.elRef&&(oa(this.props.elRef,t),t&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:t}=this,e=dde(t.classNameGenerator,t.renderProps);if(t.children){let r=pC(t,e,this.handleEl),a=t.children(this.InnerContent,t.renderProps,r);return t.elTag?E(t.elTag,r,a):a}else return E(Sf,Object.assign(Object.assign({},t),{elRef:this.handleEl,elTag:t.elTag||"div",elClasses:(t.elClasses||[]).concat(e),renderId:this.context}))}componentDidMount(){var t,e;this.el?(e=(t=this.props).didMount)===null||e===void 0||e.call(t,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var t,e;(e=(t=this.props).willUnmount)===null||e===void 0||e.call(t,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};Kt.contextType=mC;sa=class extends Ue{render(){let{props:t,context:e}=this,{options:r}=e,a={view:e.viewApi};return E(Kt,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:[...hC(t.viewSpec),...t.elClasses||[]],elStyle:t.elStyle,renderProps:a,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>t.children)}};mc=class{constructor(t){this.props=t,this.initHiddenDays()}buildPrev(t,e,r){let{dateEnv:a}=this.props,i=a.subtract(a.startOf(e,t.currentRangeUnit),t.dateIncrement);return this.build(i,-1,r)}buildNext(t,e,r){let{dateEnv:a}=this.props,i=a.add(a.startOf(e,t.currentRangeUnit),t.dateIncrement);return this.build(i,1,r)}build(t,e,r=!0){let{props:a}=this,i,s,o,l,c,d;return i=this.buildValidRange(),i=this.trimHiddenDays(i),r&&(t=mde(t,i)),s=this.buildCurrentRangeInfo(t,e),o=/^(year|month|week|day)$/.test(s.unit),l=this.buildRenderRange(this.trimHiddenDays(s.range),s.unit,o),l=this.trimHiddenDays(l),c=l,a.showNonCurrentDates||(c=mn(c,s.range)),c=this.adjustActiveRange(c),c=mn(c,i),d=sT(s.range,i),_a(l,t)||(t=l.start),{currentDate:t,validRange:i,currentRange:s.range,currentRangeUnit:s.unit,isRangeAllDay:o,activeRange:c,renderRange:l,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,isValid:d,dateIncrement:this.buildDateIncrement(s.duration)}}buildValidRange(){let t=this.props.validRangeInput,e=typeof t=="function"?t.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):t;return this.refineRange(e)||{start:null,end:null}}buildCurrentRangeInfo(t,e){let{props:r}=this,a=null,i=null,s=null,o;return r.duration?(a=r.duration,i=r.durationUnit,s=this.buildRangeFromDuration(t,e,a,i)):(o=this.props.dayCount)?(i="day",s=this.buildRangeFromDayCount(t,e,o)):(s=this.buildCustomVisibleRange(t))?i=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(a=this.getFallbackDuration(),i=Tf(a).unit,s=this.buildRangeFromDuration(t,e,a,i)),{duration:a,unit:i,range:s}}getFallbackDuration(){return Re({day:1})}adjustActiveRange(t){let{dateEnv:e,usesMinMaxTime:r,slotMinTime:a,slotMaxTime:i}=this.props,{start:s,end:o}=t;return r&&(uu(a)<0&&(s=ct(s),s=e.add(s,a)),uu(i)>1&&(o=ct(o),o=Bt(o,-1),o=e.add(o,i))),{start:s,end:o}}buildRangeFromDuration(t,e,r,a){let{dateEnv:i,dateAlignment:s}=this.props,o,l,c;if(!s){let{dateIncrement:u}=this.props;u&&ia(u){wf(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{wf(()=>{this.setState({forPrint:!1})})}}render(){let{props:t}=this,{options:e}=t,{forPrint:r}=this.state,a=r||e.height==="auto"||e.contentHeight==="auto",i=!a&&e.height!=null?e.height:"",s=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${e.direction}`,t.theme.getClass("root")];return PC()||s.push("fc-liquid-hack"),t.children(s,i,a,r)}componentDidMount(){let{emitter:t}=this.props;t.on("_beforeprint",this.handleBeforePrint),t.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:t}=this.props;t.off("_beforeprint",this.handleBeforePrint),t.off("_afterprint",this.handleAfterPrint)}},ii=class{constructor(t){this.component=t.component,this.isHitComboAllowed=t.isHitComboAllowed||null}destroy(){}};Ec={},An=class extends Lr{constructor(t,e){super(t,e),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:t,state:e}=this;return t.children(e.nowDate,e.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(t){t.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:t,context:e}=this,r=e.nowManager.getDateMarker(),{nowIndicatorSnap:a}=e.options;a==="auto"&&(a=/year|month|week|day/.test(t.unit)||(t.unitValue||1)===1);let i,s;return a?(i=e.dateEnv.startOf(r,t.unit),s=e.dateEnv.add(i,Re(1,t.unit)).valueOf()-r.valueOf()):(i=r,s=1e3*60),s=Math.min(1e3*60*60*24,s),{state:{nowDate:i,todayRange:Qde(i)},waitMs:s}}setTimeout(t=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};An.contextType=Ra;Cf=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(t){this.currentDataManager.dispatch(t)}get view(){return this.getCurrentData().viewApi}batchRendering(t){t()}updateSize(){this.trigger("_resize",!0)}setOption(t,e){this.dispatch({type:"SET_OPTION",optionName:t,rawOptionValue:e})}getOption(t){return this.currentDataManager.currentCalendarOptionsInput[t]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(t,e){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[t]?r.emitter.on(t,e):console.warn(`Unknown listener name '${t}'`)}off(t,e){this.currentDataManager.emitter.off(t,e)}trigger(t,...e){this.currentDataManager.emitter.trigger(t,...e)}changeView(t,e){this.batchRendering(()=>{if(this.unselect(),e)if(e.start&&e.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:e});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t,dateMarker:r.createMarker(e)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t})})}zoomTo(t,e){let r=this.getCurrentData(),a;e=e||"day",a=r.viewSpecs[e]||this.getUnitViewSpec(e),this.unselect(),a?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:a.type,dateMarker:t}):this.dispatch({type:"CHANGE_DATE",dateMarker:t})}getUnitViewSpec(t){let{viewSpecs:e,toolbarConfig:r}=this.getCurrentData(),a=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),i,s;for(let o in e)a.push(o);for(i=0;i{this.dispatch({type:"REMOVE_EVENTS",eventStore:_3(t)})}})}getEventById(t){let e=this.getCurrentData(),{defs:r,instances:a}=e.eventStore;t=String(t);for(let i in r){let s=r[i];if(s.publicId===t){if(s.recurringDef)return new St(e,s,null);for(let o in a){let l=a[o];if(l.defId===s.defId)return new St(e,s,l)}}}return null}getEvents(){let t=this.getCurrentData();return Bi(t.eventStore,t)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let t=this.getCurrentData(),e=t.eventSources,r=[];for(let a in e)r.push(new Mo(t,e[a]));return r}getEventSourceById(t){let e=this.getCurrentData(),r=e.eventSources;t=String(t);for(let a in r)if(r[a].publicId===t)return new Mo(e,r[a]);return null}addEventSource(t){let e=this.getCurrentData();if(t instanceof Mo)return e.eventSources[t.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[t.internalEventSource]}),t;let r=vC(t,e);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new Mo(e,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(t){let e=Re(t);e&&this.trigger("_scrollRequest",{time:e})}};Nx=vr(),Pf=class{constructor(){this.getKeysForEventDefs=pe(this._getKeysForEventDefs),this.splitDateSelection=pe(this._splitDateSpan),this.splitEventStore=pe(this._splitEventStore),this.splitIndividualUi=pe(this._splitIndividualUi),this.splitEventDrag=pe(this._splitInteraction),this.splitEventResize=pe(this._splitInteraction),this.eventUiBuilders={}}splitProps(t){let e=this.getKeyInfo(t),r=this.getKeysForEventDefs(t.eventStore),a=this.splitDateSelection(t.dateSelection),i=this.splitIndividualUi(t.eventUiBases,r),s=this.splitEventStore(t.eventStore,r),o=this.splitEventDrag(t.eventDrag),l=this.splitEventResize(t.eventResize),c={};this.eventUiBuilders=Na(e,(d,u)=>this.eventUiBuilders[u]||pe(Zde));for(let d in e){let u=e[d],p=s[d]||Nx,m=this.eventUiBuilders[d];c[d]={businessHours:u.businessHours||t.businessHours,dateSelection:a[d]||null,eventStore:p,eventUiBases:m(t.eventUiBases[""],u.ui,i[d]),eventSelection:p.instances[t.eventSelection]?t.eventSelection:"",eventDrag:o[d]||null,eventResize:l[d]||null}}return c}_splitDateSpan(t){let e={};if(t){let r=this.getKeysForDateSpan(t);for(let a of r)e[a]=t}return e}_getKeysForEventDefs(t){return Na(t.defs,e=>this.getKeysForEventDef(e))}_splitEventStore(t,e){let{defs:r,instances:a}=t,i={};for(let s in r)for(let o of e[s])i[o]||(i[o]=vr()),i[o].defs[s]=r[s];for(let s in a){let o=a[s];for(let l of e[o.defId])i[l]&&(i[l].instances[s]=o)}return i}_splitIndividualUi(t,e){let r={};for(let a in t)if(a)for(let i of e[a])r[i]||(r[i]={}),r[i][a]=t[a];return r}_splitInteraction(t){let e={};if(t){let r=this._splitEventStore(t.affectedEvents,this._getKeysForEventDefs(t.affectedEvents)),a=this._getKeysForEventDefs(t.mutatedEvents),i=this._splitEventStore(t.mutatedEvents,a),s=o=>{e[o]||(e[o]={affectedEvents:r[o]||Nx,mutatedEvents:i[o]||Nx,isEvent:t.isEvent})};for(let o in r)s(o);for(let o in i)s(o)}return e}};Jde=rt({year:"numeric",month:"long",day:"numeric"}),Xde=rt({week:"long"});Rx=null;si=class{constructor(t,e,r,a){this.els=e;let i=this.originClientRect=t.getBoundingClientRect();r&&this.buildElHorizontals(i.left),a&&this.buildElVerticals(i.top)}buildElHorizontals(t){let e=[],r=[];for(let a of this.els){let i=a.getBoundingClientRect();e.push(i.left-t),r.push(i.right-t)}this.lefts=e,this.rights=r}buildElVerticals(t){let e=[],r=[];for(let a of this.els){let i=a.getBoundingClientRect();e.push(i.top-t),r.push(i.bottom-t)}this.tops=e,this.bottoms=r}leftToIndex(t){let{lefts:e,rights:r}=this,a=e.length,i;for(i=0;i=e[i]&&t=e[i]&&t0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()0}canScrollRight(){return this.getScrollLeft()e.thickness||1){this.getEntryThickness=t,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(t){let e=[];for(let r of t)this.insertEntry(r,e);return e}insertEntry(t,e){let r=this.findInsertion(t);this.isInsertionValid(r,t)?this.insertEntryAt(t,r):this.handleInvalidInsertion(r,t,e)}isInsertionValid(t,e){return(this.maxCoord===-1||t.levelCoord+this.getEntryThickness(e)<=this.maxCoord)&&(this.maxStackCnt===-1||t.stackCnti.end&&this.insertEntry({index:t.index,thickness:t.thickness,span:{start:i.end,end:a.end}},r)}insertEntryAt(t,e){let{entriesByLevel:r,levelCoords:a}=this;e.lateral===-1?(Ox(a,e.level,e.levelCoord),Ox(r,e.level,[t])):Ox(r[e.level],e.lateral,t),this.stackCnts[Ni(t)]=e.stackCnt}findInsertion(t){let{levelCoords:e,entriesByLevel:r,strictOrder:a,stackCnts:i}=this,s=e.length,o=0,l=-1,c=-1,d=null,u=0;for(let h=0;h=o+this.getEntryThickness(t))break;let g=r[h],v,T=_f(g,t.span.start,If),k=T[0]+T[1];for(;(v=g[k])&&v.span.starto&&(o=w,d=v,l=h,c=k),w===o&&(u=Math.max(u,i[Ni(v)]+1)),k+=1}}let p=0;if(d)for(p=l+1;p1?ji(this.context,s):{},p=t.toDate(s);t.namedTimeZoneImpl&&(p=Ii(p,36e5));let m=Object.assign(Object.assign(Object.assign({date:p,view:a},i.extraRenderProps),{text:d}),l);return E(Kt,{elTag:"th",elClasses:c,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":l.isDisabled?void 0:Oo(s)},i.extraDataAttrs),renderProps:m,generatorName:"dayHeaderContent",customGenerator:e.dayHeaderContent,defaultGenerator:U3,classNameGenerator:e.dayHeaderClassNames,didMount:e.dayHeaderDidMount,willUnmount:e.dayHeaderWillUnmount},h=>E("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&E(h,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]})))}},iue=rt({weekday:"long"}),Jb=class extends Ue{render(){let{props:t}=this,{dateEnv:e,theme:r,viewApi:a,options:i}=this.context,s=Bt(new Date(2592e5),t.dow),o={dow:t.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=e.format(s,t.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:a}),t.extraRenderProps),{text:l});return E(Kt,{elTag:"th",elClasses:[z3,...Eu(o,r),...t.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:t.colSpan},t.extraDataAttrs),renderProps:c,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:U3,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},d=>E("div",{className:"fc-scrollgrid-sync-inner"},E(d,{elTag:"a",elClasses:["fc-col-header-cell-cushion",t.isSticky&&"fc-sticky"],elAttrs:{"aria-label":e.format(s,iue)}})))}},Ns=class extends Ue{constructor(){super(...arguments),this.createDayHeaderFormatter=pe(sue)}render(){let{context:t}=this,{dates:e,dateProfile:r,datesRepDistinctDays:a,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(t.options.dayHeaderFormat,a,e.length);return E(An,{unit:"day"},(o,l)=>E("tr",{role:"row"},i&&i("day"),e.map(c=>a?E(Zb,{key:c.toISOString(),date:c,dateProfile:r,todayRange:l,colCnt:e.length,dayHeaderFormat:s}):E(Jb,{key:c.getUTCDay(),dow:c.getUTCDay(),dayHeaderFormat:s}))))}};vc=class{constructor(t,e){let r=t.start,{end:a}=t,i=[],s=[],o=-1;for(;r=e.length?e[e.length-1]+1:e[r]}},bc=class{constructor(t,e){let{dates:r}=t,a,i,s;if(e){for(i=r[0].getUTCDay(),a=1;a{this.el=t,oa(this.props.elRef,t)}}render(){let{props:t}=this,{liquid:e,liquidIsAbsolute:r}=t,a=e&&r,i=["fc-scroller"];return e&&(r?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),E("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:t.overflowX,overflowY:t.overflowY,left:a&&-(t.overcomeLeft||0)||"",right:a&&-(t.overcomeRight||0)||"",bottom:a&&-(t.overcomeBottom||0)||"",marginLeft:!a&&-(t.overcomeLeft||0)||"",marginRight:!a&&-(t.overcomeRight||0)||"",marginBottom:!a&&-(t.overcomeBottom||0)||"",maxHeight:t.maxHeight||""}},t.children)}needsXScrolling(){if(zb.test(this.props.overflowX))return!1;let{el:t}=this,e=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=t;for(let a=0;ae)return!0;return!1}needsYScrolling(){if(zb.test(this.props.overflowY))return!1;let{el:t}=this,e=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=t;for(let a=0;ae)return!0;return!1}getXScrollbarWidth(){return zb.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return zb.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},In=class{constructor(t){this.masterCallback=t,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,r)=>{let{depths:a,currentMap:i}=this,s=!1,o=!1;e!==null?(s=r in i,i[r]=e,a[r]=(a[r]||0)+1,o=!0):(a[r]-=1,a[r]||(delete i[r],delete this.callbackMap[r],s=!0)),this.masterCallback&&(s&&this.masterCallback(null,String(r)),o&&this.masterCallback(e,String(r)))}}createRef(t){let e=this.callbackMap[t];return e||(e=this.callbackMap[t]=r=>{this.handleValue(r,String(t))}),e}collect(t,e,r){return T3(this.currentMap,t,e,r)}getAll(){return iT(this.currentMap)}};No=class extends Ue{constructor(){super(...arguments),this.processCols=pe(t=>t,K3),this.renderMicroColGroup=pe(Q3),this.scrollerRefs=new In,this.scrollerElRefs=new In(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:t,state:e,context:r}=this,a=t.sections||[],i=this.processCols(t.cols),s=this.renderMicroColGroup(i,e.shrinkWidth),o=X3(t.liquid,r);t.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let l=a.length,c=0,d,u=[],p=[],m=[];for(;c{}},a);return E(a?"th":"td",{ref:r.elRef,role:"presentation"},E("div",{className:`fc-scroller-harness${d?" fc-scroller-harness-liquid":""}`},E(fu,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:u,overflowX:i.liquid?"hidden":"visible",maxHeight:t.maxHeight,liquid:d,liquidIsAbsolute:!0},m)))}_handleScrollerEl(t,e){let r=uue(this.props.sections,e);r&&oa(r.chunk.scrollerElRef,t)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return J3(this.props.cols)?$3(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let t=L3(),{scrollerRefs:e,scrollerElRefs:r}=this,a=!1,i={},s={};for(let o in e.currentMap){let l=e.currentMap[o];if(l&&l.needsYScrolling()){a=!0;break}}for(let o of this.props.sections){let l=o.key,c=r.currentMap[l];if(c){let d=c.parentNode;i[l]=Math.floor(d.getBoundingClientRect().width-(a?t.y:0)),s[l]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:a,scrollerClientWidths:i,scrollerClientHeights:s}}};No.addStateEquality({scrollerClientWidths:Jr,scrollerClientHeights:Jr});Rs=class extends Ue{constructor(){super(...arguments),this.buildPublicEvent=pe((t,e,r)=>new St(t,e,r)),this.handleEl=t=>{this.el=t,oa(this.props.elRef,t),t&&n3(t,this.props.seg)}}render(){let{props:t,context:e}=this,{options:r}=e,{seg:a}=t,{eventRange:i}=a,{ui:s}=i,o={event:this.buildPublicEvent(e,i.def,i.instance),view:e.viewApi,timeText:t.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!t.disableDragging&&jde(a,e),isStartResizable:!t.disableResizing&&Hde(a,e),isEndResizable:!t.disableResizing&&zde(a),isMirror:!!(t.isDragging||t.isResizing||t.isDateSelecting),isStart:!!a.isStart,isEnd:!!a.isEnd,isPast:!!t.isPast,isFuture:!!t.isFuture,isToday:!!t.isToday,isSelected:!!t.isSelected,isDragging:!!t.isDragging,isResizing:!!t.isResizing};return E(Kt,{elRef:this.handleEl,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:[...Ude(o),...a.eventRange.ui.classNames,...t.elClasses||[]],elStyle:t.elStyle,renderProps:o,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:t.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},t.children)}componentDidUpdate(t){this.el&&this.props.seg!==t.seg&&n3(this.el,this.props.seg)}},Ro=class extends Ue{render(){let{props:t,context:e}=this,{options:r}=e,{seg:a}=t,{ui:i}=a.eventRange,s=r.eventTimeFormat||t.defaultTimeFormat,o=Bo(a,s,e,t.defaultDisplayEventTime,t.defaultDisplayEventEnd);return E(Rs,Object.assign({},t,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:Du(a,e),defaultGenerator:pue,timeText:o}),(l,c)=>E(tt,null,E(l,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:c.textColor}}),!!c.isStartResizable&&E("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!c.isEndResizable&&E("div",{className:"fc-event-resizer fc-event-resizer-end"})))}};Ro.addPropsEquality({seg:Jr});Qf=n=>E(Ra.Consumer,null,t=>{let{options:e}=t,r={isAxis:n.isAxis,date:t.dateEnv.toDate(n.date),view:t.viewApi};return E(Kt,{elRef:n.elRef,elTag:n.elTag||"div",elAttrs:n.elAttrs,elClasses:n.elClasses,elStyle:n.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:e.nowIndicatorContent,classNameGenerator:e.nowIndicatorClassNames,didMount:e.nowIndicatorDidMount,willUnmount:e.nowIndicatorWillUnmount},n.children)}),mue=rt({day:"numeric"}),Fo=class extends Ue{constructor(){super(...arguments),this.refineRenderProps=Tu(hue)}render(){let{props:t,context:e}=this,{options:r}=e,a=this.refineRenderProps({date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,isMonthStart:t.isMonthStart||!1,showDayNumber:t.showDayNumber,extraRenderProps:t.extraRenderProps,viewApi:e.viewApi,dateEnv:e.dateEnv,monthStartFormat:r.monthStartFormat});return E(Kt,{elRef:t.elRef,elTag:t.elTag,elAttrs:Object.assign(Object.assign({},t.elAttrs),a.isDisabled?{}:{"data-date":Oo(t.date)}),elClasses:[...Eu(a,e.theme),...t.elClasses||[]],elStyle:t.elStyle,renderProps:a,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:t.defaultGenerator,classNameGenerator:a.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},t.children)}};kc=class extends Ue{render(){let{props:t}=this,{seg:e}=t;return E(Rs,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:e.eventRange.ui.backgroundColor},defaultGenerator:fue,seg:e,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:t.isPast,isFuture:t.isFuture,isToday:t.isToday,disableDragging:!0,disableResizing:!0})}};Jf=n=>E(Ra.Consumer,null,t=>{let{dateEnv:e,options:r}=t,{date:a}=n,i=r.weekNumberFormat||n.defaultFormat,s=e.computeWeekNumber(a),o=e.format(a,i),l={num:s,text:o,date:a};return E(Kt,{elRef:n.elRef,elTag:n.elTag,elAttrs:n.elAttrs,elClasses:n.elClasses,elStyle:n.elStyle,renderProps:l,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:gue,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},n.children)});Bx=10,Yx=class extends Ue{constructor(){super(...arguments),this.state={titleId:_n()},this.handleRootEl=t=>{this.rootEl=t,this.props.elRef&&oa(this.props.elRef,t)},this.handleDocumentMouseDown=t=>{let e=eT(t);this.rootEl.contains(e)||this.handleCloseClick()},this.handleDocumentKeyDown=t=>{t.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:t}=this.props;t&&t()}}render(){let{theme:t,options:e}=this.context,{props:r,state:a}=this,i=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return Px(E("div",Object.assign({},r.extraAttrs,{id:r.id,className:i.join(" "),"aria-labelledby":a.titleId,ref:this.handleRootEl}),E("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},E("span",{className:"fc-popover-title",id:a.titleId},r.title),E("span",{className:"fc-popover-close "+t.getIconClass("close"),title:e.closeHint,onClick:this.handleCloseClick})),E("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:t}=this.context,{alignmentEl:e,alignGridTop:r}=this.props,{rootEl:a}=this,i=rue(e);if(i){let s=a.getBoundingClientRect(),o=r?yr(e,".fc-scrollgrid").getBoundingClientRect().top:i.top,l=t?i.right-s.width:i.left;o=Math.max(o,Bx),l=Math.min(l,document.documentElement.clientWidth-Bx-s.width),l=Math.max(l,Bx);let c=a.offsetParent.getBoundingClientRect();Sc(a,{top:o-c.top,left:l-c.left})}}},Gx=class extends or{constructor(){super(...arguments),this.handleRootEl=t=>{this.rootEl=t,t?this.context.registerInteractiveComponent(this,{el:t,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:t,dateEnv:e}=this.context,{props:r}=this,{startDate:a,todayRange:i,dateProfile:s}=r,o=e.format(a,t.dayPopoverFormat);return E(Fo,{elRef:this.handleRootEl,date:a,dateProfile:s,todayRange:i},(l,c,d)=>E(Yx,{elRef:d.ref,id:r.id,title:o,extraClassNames:["fc-more-popover"].concat(d.className||[]),extraAttrs:d,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},Pu(t)&&E(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(t,e,r,a){let{rootEl:i,props:s}=this;return t>=0&&t=0&&e{this.linkEl=t,this.props.elRef&&oa(this.props.elRef,t)},this.handleClick=t=>{let{props:e,context:r}=this,{moreLinkClick:a}=r.options,i=a3(e).start;function s(o){let{def:l,instance:c,range:d}=o.eventRange;return{event:new St(r,l,c),start:r.dateEnv.toDate(d.start),end:r.dateEnv.toDate(d.end),isStart:o.isStart,isEnd:o.isEnd}}typeof a=="function"&&(a=a({date:i,allDay:!!e.allDayDate,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:t,view:r.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&r.calendarApi.zoomTo(i,a)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:t,state:e}=this;return E(Ra.Consumer,null,r=>{let{viewApi:a,options:i,calendarApi:s}=r,{moreLinkText:o}=i,{moreCnt:l}=t,c=a3(t),d=typeof o=="function"?o.call(s,l):`+${l} ${o}`,u=vu(i.moreLinkHint,[l],d),p={num:l,shortText:`+${l}`,text:d,view:a};return E(tt,null,!!t.moreCnt&&E(Kt,{elTag:t.elTag||"a",elRef:this.handleLinkEl,elClasses:[...t.elClasses||[],"fc-more-link"],elStyle:t.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},t.elAttrs),u3(this.handleClick)),{title:u,"aria-expanded":e.isPopoverOpen,"aria-controls":e.isPopoverOpen?e.popoverId:""}),renderProps:p,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:t.defaultGenerator||yue,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},t.children),e.isPopoverOpen&&E(Gx,{id:e.popoverId,startDate:c.start,endDate:c.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:this.parentEl,alignmentEl:t.alignmentElRef?t.alignmentElRef.current:this.linkEl,alignGridTop:t.alignGridTop,forceTimed:t.forceTimed,onClose:this.handlePopoverClose},t.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=yr(this.linkEl,".fc-view-harness"))}}});function wue(n){let t=n.length>0?n[0].code:"en",e=kue.concat(n),r={en:lG};for(let a of e)r[a.code]=a;return{map:r,defaultCode:t}}function cG(n,t){return typeof n=="object"&&!Array.isArray(n)?dG(n.code,[n.code],n):Sue(n,t)}function Sue(n,t){let e=[].concat(n||[]),r=Due(e,t)||lG;return dG(n,e,r)}function Due(n,t){for(let e=0;e0;a-=1){let i=r.slice(0,a).join("-");if(t[i])return t[i]}}return null}function dG(n,t,e){let r=aT([oG,e],["buttonText"]);delete r.code;let{week:a}=r;return delete r.week,{codeArg:n,codes:t,week:a,simpleNumberFormat:new Intl.NumberFormat(n),options:r}}function Xr(n){return{id:Fs(),name:n.name,premiumReleaseDate:n.premiumReleaseDate?new Date(n.premiumReleaseDate):void 0,deps:n.deps||[],reducers:n.reducers||[],isLoadingFuncs:n.isLoadingFuncs||[],contextInit:[].concat(n.contextInit||[]),eventRefiners:n.eventRefiners||{},eventDefMemberAdders:n.eventDefMemberAdders||[],eventSourceRefiners:n.eventSourceRefiners||{},isDraggableTransformers:n.isDraggableTransformers||[],eventDragMutationMassagers:n.eventDragMutationMassagers||[],eventDefMutationAppliers:n.eventDefMutationAppliers||[],dateSelectionTransformers:n.dateSelectionTransformers||[],datePointTransforms:n.datePointTransforms||[],dateSpanTransforms:n.dateSpanTransforms||[],views:n.views||{},viewPropsTransformers:n.viewPropsTransformers||[],isPropsValid:n.isPropsValid||null,externalDefTransforms:n.externalDefTransforms||[],viewContainerAppends:n.viewContainerAppends||[],eventDropTransformers:n.eventDropTransformers||[],componentInteractions:n.componentInteractions||[],calendarInteractions:n.calendarInteractions||[],themeClasses:n.themeClasses||{},eventSourceDefs:n.eventSourceDefs||[],cmdFormatter:n.cmdFormatter,recurringTypes:n.recurringTypes||[],namedTimeZonedImpl:n.namedTimeZonedImpl,initialView:n.initialView||"",elementDraggingImpl:n.elementDraggingImpl,optionChangeHandlers:n.optionChangeHandlers||{},scrollGridImpl:n.scrollGridImpl||null,listenerRefiners:n.listenerRefiners||{},optionRefiners:n.optionRefiners||{},propSetHandlers:n.propSetHandlers||{}}}function Eue(n,t){let e={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function a(i){for(let s of i){let o=s.name,l=e[o];l===void 0?(e[o]=s.id,a(s.deps),r=Cue(r,s)):l!==s.id&&console.warn(`Duplicate plugin '${o}'`)}}return n&&a(n),a(t),r}function xue(){let n=[],t=[],e;return(r,a)=>((!e||!Fi(r,n)||!Fi(a,t))&&(e=Eue(r,a)),n=r,t=a,e)}function Cue(n,t){return{premiumReleaseDate:Pue(n.premiumReleaseDate,t.premiumReleaseDate),reducers:n.reducers.concat(t.reducers),isLoadingFuncs:n.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:n.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},n.eventRefiners),t.eventRefiners),eventDefMemberAdders:n.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},n.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:n.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:n.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:n.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:n.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:n.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:n.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},n.views),t.views),viewPropsTransformers:n.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||n.isPropsValid,externalDefTransforms:n.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:n.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:n.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:n.calendarInteractions.concat(t.calendarInteractions),componentInteractions:n.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},n.themeClasses),t.themeClasses),eventSourceDefs:n.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||n.cmdFormatter,recurringTypes:n.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||n.namedTimeZonedImpl,initialView:n.initialView||t.initialView,elementDraggingImpl:n.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},n.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||n.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},n.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},n.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},n.propSetHandlers),t.propSetHandlers)}}function Pue(n,t){return n===void 0?t:t===void 0?n:new Date(Math.max(n.valueOf(),t.valueOf()))}function Mue(n,t){let e={},r;for(r in n)jC(r,e,n,t);for(r in t)jC(r,e,n,t);return e}function jC(n,t,e,r){if(t[n])return t[n];let a=Aue(n,t,e,r);return a&&(t[n]=a),a}function Aue(n,t,e,r){let a=e[n],i=r[n],s=d=>a&&a[d]!==null?a[d]:i&&i[d]!==null?i[d]:null,o=s("component"),l=s("superType"),c=null;if(l){if(l===n)throw new Error("Can't have a custom view type that references itself");c=jC(l,t,e,r)}return!o&&c&&(o=c.component),o?{type:n,component:o,defaults:Object.assign(Object.assign({},c?c.defaults:{}),a?a.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),i?i.rawOptions:{})}:null}function tG(n){return Na(n,Iue)}function Iue(n){let t=typeof n=="function"?{component:n}:n,{component:e}=t;return t.content?e=rG(t):e&&!(e.prototype instanceof Ue)&&(e=rG(Object.assign(Object.assign({},t),{content:e}))),{superType:t.type,component:e,rawOptions:t}}function rG(n){return t=>E(Ra.Consumer,null,e=>E(Kt,{elTag:"div",elClasses:hC(e.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:e.options.nextDayThreshold}),generatorName:void 0,customGenerator:n.content,classNameGenerator:n.classNames,didMount:n.didMount,willUnmount:n.willUnmount}))}function _ue(n,t,e,r){let a=tG(n),i=tG(t.views),s=Mue(a,i);return Na(s,o=>Nue(o,i,t,e,r))}function Nue(n,t,e,r,a){let i=n.overrides.duration||n.defaults.duration||r.duration||e.duration,s=null,o="",l="",c={};if(i&&(s=Rue(i),s)){let p=Tf(s);o=p.unit,p.value===1&&(l=o,c=t[o]?t[o].rawOptions:{})}let d=p=>{let m=p.buttonText||{},h=n.defaults.buttonTextKey;return h!=null&&m[h]!=null?m[h]:m[n.type]!=null?m[n.type]:m[l]!=null?m[l]:null},u=p=>{let m=p.buttonHints||{},h=n.defaults.buttonTextKey;return h!=null&&m[h]!=null?m[h]:m[n.type]!=null?m[n.type]:m[l]!=null?m[l]:null};return{type:n.type,component:n.component,duration:s,durationUnit:o,singleUnit:l,optionDefaults:n.defaults,optionOverrides:Object.assign(Object.assign({},c),n.overrides),buttonTextOverride:d(r)||d(e)||n.overrides.buttonText,buttonTextDefault:d(a)||n.defaults.buttonText||d(Li)||n.type,buttonTitleOverride:u(r)||u(e)||n.overrides.buttonHint,buttonTitleDefault:u(a)||n.defaults.buttonHint||u(Li)}}function Rue(n){let t=JSON.stringify(n),e=nG[t];return e===void 0&&(e=Re(n),nG[t]=e),e}function Fue(n,t){switch(t.type){case"CHANGE_VIEW_TYPE":n=t.viewType}return n}function Oue(n,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return n}}function Lue(n,t,e){let r=n.initialDate;return r!=null?t.createMarker(r):e.getDateMarker()}function Bue(n,t){switch(t.type){case"SET_OPTION":return Object.assign(Object.assign({},n),{[t.optionName]:t.rawOptionValue});default:return n}}function jue(n,t,e,r){let a;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||e);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(a=r.buildPrev(n,e),a.isValid)return a;break;case"NEXT":if(a=r.buildNext(n,e),a.isValid)return a;break}return n}function Hue(n,t,e){let r=t?t.activeRange:null;return pG({},Yue(n,e),r,e)}function zue(n,t,e,r){let a=e?e.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return pG(n,t.sources,a,r);case"REMOVE_EVENT_SOURCE":return Wue(n,t.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return e?mG(n,a,r):n;case"FETCH_EVENT_SOURCES":return GC(n,t.sourceIds?uC(t.sourceIds):hG(n,r),a,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return $ue(n,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return n}}function Uue(n,t,e){let r=t?t.activeRange:null;return GC(n,hG(n,e),r,!0,e)}function uG(n){for(let t in n)if(n[t].isFetching)return!0;return!1}function pG(n,t,e,r){let a={};for(let i of t)a[i.sourceId]=i;return e&&(a=mG(a,e,r)),Object.assign(Object.assign({},n),a)}function Wue(n,t){return As(n,e=>e.sourceId!==t)}function mG(n,t,e){return GC(n,As(n,r=>que(r,t,e)),t,!1,e)}function que(n,t,e){return fG(n,e)?!e.options.lazyFetching||!n.fetchRange||n.isFetching||t.startn.fetchRange.end:!n.latestFetchId}function GC(n,t,e,r,a){let i={};for(let s in n){let o=n[s];t[s]?i[s]=Vue(o,e,r,a):i[s]=o}return i}function Vue(n,t,e,r){let{options:a,calendarApi:i}=r,s=r.pluginHooks.eventSourceDefs[n.sourceDefId],o=Fs();return s.fetch({eventSource:n,range:t,isRefetch:e,context:r},l=>{let{rawEvents:c}=l;a.eventSourceSuccess&&(c=a.eventSourceSuccess.call(i,c,l.response)||c),n.success&&(c=n.success.call(i,c,l.response)||c),r.dispatch({type:"RECEIVE_EVENTS",sourceId:n.sourceId,fetchId:o,fetchRange:t,rawEvents:c})},l=>{let c=!1;a.eventSourceFailure&&(a.eventSourceFailure.call(i,l),c=!0),n.failure&&(n.failure(l),c=!0),c||console.warn(l.message,l),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:n.sourceId,fetchId:o,fetchRange:t,error:l})}),Object.assign(Object.assign({},n),{isFetching:!0,latestFetchId:o})}function $ue(n,t,e,r){let a=n[t];return a&&e===a.latestFetchId?Object.assign(Object.assign({},n),{[t]:Object.assign(Object.assign({},a),{isFetching:!1,fetchRange:r})}):n}function hG(n,t){return As(n,e=>fG(e,t))}function Yue(n,t){let e=bC(t),r=[].concat(n.eventSources||[]),a=[];n.initialEvents&&r.unshift(n.initialEvents),n.events&&r.unshift(n.events);for(let i of r){let s=vC(i,t,e);s&&a.push(s)}return a}function fG(n,t){return!t.pluginHooks.eventSourceDefs[n.sourceDefId].ignoreRange}function Gue(n,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return n}}function Kue(n,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return n}}function Que(n,t){let e;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return e=t.state,{affectedEvents:e.affectedEvents,mutatedEvents:e.mutatedEvents,isEvent:e.isEvent};default:return n}}function Zue(n,t){let e;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return e=t.state,{affectedEvents:e.affectedEvents,mutatedEvents:e.mutatedEvents,isEvent:e.isEvent};default:return n}}function Jue(n,t,e,r,a){let i=n.headerToolbar?aG(n.headerToolbar,n,t,e,r,a):null,s=n.footerToolbar?aG(n.footerToolbar,n,t,e,r,a):null;return{header:i,footer:s}}function aG(n,t,e,r,a,i){let s={},o=[],l=!1;for(let c in n){let d=n[c],u=Xue(d,t,e,r,a,i);s[c]=u.widgets,o.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:s,viewsWithButtons:o,hasTitle:l}}function Xue(n,t,e,r,a,i){let s=t.direction==="rtl",o=t.customButtons||{},l=e.buttonText||{},c=t.buttonText||{},d=e.buttonHints||{},u=t.buttonHints||{},p=n?n.split(" "):[],m=[],h=!1;return{widgets:p.map(g=>g.split(",").map(v=>{if(v==="title")return h=!0,{buttonName:v};let T,k,w,S,x,I;if(T=o[v])w=A=>{T.click&&T.click.call(A.target,A,A.target)},(S=r.getCustomButtonIconClass(T))||(S=r.getIconClass(v,s))||(x=T.text),I=T.hint||T.text;else if(k=a[v]){m.push(v),w=()=>{i.changeView(v)},(x=k.buttonTextOverride)||(S=r.getIconClass(v,s))||(x=k.buttonTextDefault);let A=k.buttonTextOverride||k.buttonTextDefault;I=vu(k.buttonTitleOverride||k.buttonTitleDefault||t.viewHint,[A,v],A)}else if(i[v])if(w=()=>{i[v]()},(x=l[v])||(S=r.getIconClass(v,s))||(x=c[v]),v==="prevYear"||v==="nextYear"){let A=v==="prevYear"?"prev":"next";I=vu(d[A]||u[A],[c.year||"year","year"],c[v])}else I=A=>vu(d[v]||u[v],[c[A]||A,A],c[v]);return{buttonName:v,buttonClick:w,buttonIcon:S,buttonText:x,buttonHint:I}})),viewsWithButtons:m,hasTitle:h}}function ope(n,t,e){let{dateEnv:r,options:a}=e,i,s,o,l,c={};return i=n.startParam,i==null&&(i=a.startParam),s=n.endParam,s==null&&(s=a.endParam),o=n.timeZoneParam,o==null&&(o=a.timeZoneParam),typeof n.extraParams=="function"?l=n.extraParams():l=n.extraParams||{},Object.assign(c,l),c[i]=r.formatIso(t.start),c[s]=r.formatIso(t.end),r.timeZone!=="local"&&(c[o]=r.timeZone),c}function upe(n,t,e,r,a){let i=n?uC(n):null,s=ct(a.start),o=a.end,l=[];for(t&&(t.milliseconds<0?o=Bt(o,1):t.milliseconds>=1e3*60*60*24&&(s=Bt(s,-1)));s1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}function vpe(n,t,e,r,a,i,s,o){let l=cG(t||s.defaultCode,s.map);return new kf({calendarSystem:"gregory",timeZone:n,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:e,firstDay:r,weekText:a,cmdFormatter:i.cmdFormatter,defaultSeparator:o})}function bpe(n,t){let e=t.themeClasses[n.themeSystem]||Hi;return new e(n)}function Tpe(n){let t=n.dateProfileGeneratorClass||mc;return new t(n)}function kpe(n,t,e){return new HC(n,t,e)}function wpe(n){return Na(n,t=>t.ui)}function Spe(n,t,e){let r={"":t};for(let a in n){let i=n[a];i.sourceId&&e[i.sourceId]&&(r[a]=e[i.sourceId])}return r}function Dpe(n){let{options:t}=n;return{eventUiSingleBase:Su({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap=="boolean"?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},n),selectionConfig:Su({constraint:t.selectConstraint,overlap:typeof t.selectOverlap=="boolean"?t.selectOverlap:void 0,allow:t.selectAllow},n)}}function BC(n,t){for(let e of t.pluginHooks.isLoadingFuncs)if(e(n))return!0;return!1}function Epe(n){return kC(n.options.businessHours,n)}function sG(n,t){for(let e in n)console.warn(`Unknown option '${e}'`+(t?` for view '${t}'`:""))}function xpe(n,t,e,r,a,i){let s=e.build(a,void 0,!1),o=e.buildPrev(t,r,!1),l=e.buildNext(t,r,!1);return{title:i,activeButton:n.type,navUnit:n.singleUnit,isTodayEnabled:s.isValid&&!_a(t.currentRange,a),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}function Cpe(n){return n.map(t=>new t)}var kue,oG,lG,Hi,nG,HC,epe,tpe,rpe,npe,ape,ipe,spe,lpe,cpe,dpe,ppe,fpe,zC,hT,UC,WC,fT,qC,VC,$C,YC,gT,Cc=b(()=>{LC();Ms();vf();kue=[],oG={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"},lG=Object.assign(Object.assign({},oG),{buttonHints:{prev:"Previous $0",next:"Next $0",today(n,t){return t==="day"?"Today":`This ${n}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(n){return`Show ${n} more event${n===1?"":"s"}`}});Hi=class extends Is{};Hi.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Hi.prototype.baseIconClass="fc-icon";Hi.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"};Hi.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Hi.prototype.iconOverrideOption="buttonIcons";Hi.prototype.iconOverrideCustomButtonOption="icon";Hi.prototype.iconOverridePrefix="fc-icon-";nG={};HC=class{constructor(t,e,r){this.type=t,this.getCurrentData=e,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(t){return this.getCurrentData().options[t]}},epe={ignoreRange:!0,parseMeta(n){return Array.isArray(n.events)?n.events:null},fetch(n,t){t({rawEvents:n.eventSource.meta})}},tpe=Xr({name:"array-event-source",eventSourceDefs:[epe]}),rpe={parseMeta(n){return typeof n.events=="function"?n.events:null},fetch(n,t,e){let{dateEnv:r}=n.context,a=n.eventSource.meta;xC(a.bind(null,EC(n.range,r)),i=>t({rawEvents:i}),e)}},npe=Xr({name:"func-event-source",eventSourceDefs:[rpe]}),ape={method:String,extraParams:F,startParam:String,endParam:String,timeZoneParam:String},ipe={parseMeta(n){return n.url&&(n.format==="json"||!n.format)?{url:n.url,format:"json",method:(n.method||"GET").toUpperCase(),extraParams:n.extraParams,startParam:n.startParam,endParam:n.endParam,timeZoneParam:n.timeZoneParam}:null},fetch(n,t,e){let{meta:r}=n.eventSource,a=ope(r,n.range,n.context);CC(r.method,r.url,a).then(([i,s])=>{t({rawEvents:i,response:s})},e)}},spe=Xr({name:"json-event-source",eventSourceRefiners:ape,eventSourceDefs:[ipe]});lpe={daysOfWeek:F,startTime:Re,endTime:Re,duration:Re,startRecur:F,endRecur:F},cpe={parse(n,t){if(n.daysOfWeek||n.startTime||n.endTime||n.startRecur||n.endRecur){let e={daysOfWeek:n.daysOfWeek||null,startTime:n.startTime||null,endTime:n.endTime||null,startRecur:n.startRecur?t.createMarker(n.startRecur):null,endRecur:n.endRecur?t.createMarker(n.endRecur):null,dateEnv:t},r;return n.duration&&(r=n.duration),!r&&n.startTime&&n.endTime&&(r=g3(n.endTime,n.startTime)),{allDayGuess:!n.startTime&&!n.endTime,duration:r,typeData:e}}return null},expand(n,t,e){let r=mn(t,{start:n.startRecur,end:n.endRecur});return r?upe(n.daysOfWeek,n.startTime,n.dateEnv,e,r):[]}},dpe=Xr({name:"simple-recurring-event",recurringTypes:[cpe],eventRefiners:lpe});ppe=Xr({name:"change-handler",optionChangeHandlers:{events(n,t){iG([n],t)},eventSources:iG}});fpe=[tpe,npe,spe,dpe,ppe,Xr({name:"misc",isLoadingFuncs:[n=>uG(n.eventSources)],propSetHandlers:{dateProfile:mpe,eventStore:hpe}})],zC=class{constructor(t,e){this.runTaskOption=t,this.drainedOption=e,this.queue=[],this.delayedRunner=new pc(this.drain.bind(this))}request(t,e){this.queue.push(t),this.delayedRunner.request(e)}pause(t){this.delayedRunner.pause(t)}resume(t,e){this.delayedRunner.resume(t,e)}drain(){let{queue:t}=this;for(;t.length;){let e=[],r;for(;r=t.shift();)this.runTask(r),e.push(r);this.drained(e)}}runTask(t){this.runTaskOption&&this.runTaskOption(t)}drained(t){this.drainedOption&&this.drainedOption(t)}};hT=class{constructor(){this.resetListeners=new Set}handleInput(t,e){let r=this.dateEnv;if(t!==r&&(typeof e=="function"?this.nowFn=e:r||(this.nowAnchorDate=t.toDate(e?t.createMarker(e):t.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=t,r))for(let a of this.resetListeners.values())a()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(t){this.resetListeners.add(t)}removeResetListener(t){this.resetListeners.delete(t)}},UC=class{constructor(t){this.computeCurrentViewData=pe(this._computeCurrentViewData),this.organizeRawLocales=pe(wue),this.buildLocale=pe(cG),this.buildPluginHooks=xue(),this.buildDateEnv=pe(vpe),this.buildTheme=pe(bpe),this.parseToolbars=pe(Jue),this.buildViewSpecs=pe(_ue),this.buildDateProfileGenerator=Tu(Tpe),this.buildViewApi=pe(kpe),this.buildViewUiProps=Tu(Dpe),this.buildEventUiBySource=pe(wpe,Jr),this.buildEventUiBases=pe(Spe),this.parseContextBusinessHours=Tu(Epe),this.buildTitle=pe(gpe),this.nowManager=new hT,this.emitter=new _s,this.actionRunner=new zC(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=t,this.actionRunner.pause(),this.nowManager=new hT;let e={},r=this.computeOptionsData(t.optionOverrides,e,t.calendarApi),a=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(a,r,t.optionOverrides,e);t.calendarApi.currentDataManager=this,this.emitter.setThisContext(t.calendarApi),this.emitter.setOptions(i.options);let s={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=Lue(r.calendarOptions,r.dateEnv,this.nowManager),l=i.dateProfileGenerator.build(o);_a(l.activeRange,o)||(o=l.currentRange.start);for(let p of r.pluginHooks.contextInit)p(s);let c=Hue(r.calendarOptions,l,s),d={dynamicOptionOverrides:e,currentViewType:a,currentDate:o,dateProfile:l,businessHours:this.parseContextBusinessHours(s),eventSources:c,eventUiBases:{},eventStore:vr(),renderableEventStore:vr(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},u=Object.assign(Object.assign({},s),d);for(let p of r.pluginHooks.reducers)Object.assign(d,p(null,null,u));BC(d,s)&&this.emitter.trigger("loading",!0),this.state=d,this.updateData(),this.actionRunner.resume()}resetOptions(t,e){let{props:r}=this;e===void 0?r.optionOverrides=t:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),t),this.optionsForRefining.push(...e)),(e===void 0||e.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(t){let{props:e,state:r,emitter:a}=this,i=Bue(r.dynamicOptionOverrides,t),s=this.computeOptionsData(e.optionOverrides,i,e.calendarApi),o=Fue(r.currentViewType,t),l=this.computeCurrentViewData(o,s,e.optionOverrides,i);e.calendarApi.currentDataManager=this,a.setThisContext(e.calendarApi),a.setOptions(l.options);let c={nowManager:this.nowManager,dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:a,getCurrentData:this.getCurrentData},{currentDate:d,dateProfile:u}=r;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(u=l.dateProfileGenerator.build(d)),d=Oue(d,t),u=jue(u,t,d,l.dateProfileGenerator),(t.type==="PREV"||t.type==="NEXT"||!_a(u.currentRange,d))&&(d=u.currentRange.start);let p=zue(r.eventSources,t,u,c),m=M3(r.eventStore,t,p,u,c),f=uG(p)&&!l.options.progressiveEventRendering&&r.renderableEventStore||m,{eventUiSingleBase:g,selectionConfig:v}=this.buildViewUiProps(c),T=this.buildEventUiBySource(p),k=this.buildEventUiBases(f.defs,g,T),w={dynamicOptionOverrides:i,currentViewType:o,currentDate:d,dateProfile:u,eventSources:p,eventStore:m,renderableEventStore:f,selectionConfig:v,eventUiBases:k,businessHours:this.parseContextBusinessHours(c),dateSelection:Gue(r.dateSelection,t),eventSelection:Kue(r.eventSelection,t),eventDrag:Que(r.eventDrag,t),eventResize:Zue(r.eventResize,t)},S=Object.assign(Object.assign({},c),w);for(let A of s.pluginHooks.reducers)Object.assign(w,A(r,t,S));let x=BC(r,c),I=BC(w,c);!x&&I?a.trigger("loading",!0):x&&!I&&a.trigger("loading",!1),this.state=w,e.onAction&&e.onAction(t)}updateData(){let{props:t,state:e}=this,r=this.data,a=this.computeOptionsData(t.optionOverrides,e.dynamicOptionOverrides,t.calendarApi),i=this.computeCurrentViewData(e.currentViewType,a,t.optionOverrides,e.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(e.dateProfile,i.options,a.dateEnv),calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},a),i),e),o=a.pluginHooks.optionChangeHandlers,l=r&&r.calendarOptions,c=a.calendarOptions;if(l&&l!==c){l.timeZone!==c.timeZone&&(e.eventSources=s.eventSources=Uue(s.eventSources,e.dateProfile,s),e.eventStore=s.eventStore=TC(s.eventStore,r.dateEnv,s.dateEnv),e.renderableEventStore=s.renderableEventStore=TC(s.renderableEventStore,r.dateEnv,s.dateEnv));for(let d in o)(this.optionsForHandling.indexOf(d)!==-1||l[d]!==c[d])&&o[d](c[d],s)}this.optionsForHandling=[],t.onData&&t.onData(s)}computeOptionsData(t,e,r){if(!this.optionsForRefining.length&&t===this.stableOptionOverrides&&e===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:a,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:l}=this.processRawCalendarOptions(t,e);sG(l);let c=this.buildDateEnv(a.timeZone,a.locale,a.weekNumberCalculation,a.firstDay,a.weekText,i,o,a.defaultRangeSeparator),d=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),u=this.buildTheme(a,i),p=this.parseToolbars(a,this.stableOptionOverrides,u,d,r);return this.stableCalendarOptionsData={calendarOptions:a,pluginHooks:i,dateEnv:c,viewSpecs:d,theme:u,toolbarConfig:p,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(t,e){let{locales:r,locale:a}=nT([Li,t,e]),i=this.organizeRawLocales(r),s=i.map,o=this.buildLocale(a||i.defaultCode,s).options,l=this.buildPluginHooks(t.plugins||[],fpe),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},lC),cC),dC),l.listenerRefiners),l.optionRefiners),d={},u=nT([Li,o,t,e]),p={},m=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,f=!1;for(let g in u)this.optionsForRefining.indexOf(g)===-1&&(u[g]===m[g]||Lo[g]&&g in m&&Lo[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=t,this.stableDynamicOptionOverrides=e),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:o,extra:d}}_computeCurrentViewData(t,e,r,a){let i=e.viewSpecs[t];if(!i)throw new Error(`viewType "${t}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,e.pluginHooks,e.localeDefaults,r,a);sG(o),this.nowManager.handleInput(e.dateEnv,s.now);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:e.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),c=this.buildViewApi(t,this.getCurrentData,e.dateEnv);return{viewSpec:i,options:s,dateProfileGenerator:l,viewApi:c}}processRawViewOptions(t,e,r,a,i){let s=nT([Li,t.optionDefaults,r,a,t.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},lC),cC),dC),b3),e.listenerRefiners),e.optionRefiners),l={},c=this.currentViewOptionsInput,d=this.currentViewOptionsRefined,u=!1,p={};for(let m in s)s[m]===c[m]||Lo[m]&&Lo[m](s[m],c[m])?l[m]=d[m]:(s[m]===this.currentCalendarOptionsInput[m]||Lo[m]&&Lo[m](s[m],this.currentCalendarOptionsInput[m])?m in this.currentCalendarOptionsRefined&&(l[m]=this.currentCalendarOptionsRefined[m]):o[m]?l[m]=o[m](s[m]):p[m]=s[m],u=!0);return u&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}}};WC=class extends Ue{render(){let t=this.props.widgetGroups.map(e=>this.renderWidgetGroup(e));return E("div",{className:"fc-toolbar-chunk"},...t)}renderWidgetGroup(t){let{props:e}=this,{theme:r}=this.context,a=[],i=!0;for(let s of t){let{buttonName:o,buttonClick:l,buttonText:c,buttonIcon:d,buttonHint:u}=s;if(o==="title")i=!1,a.push(E("h2",{className:"fc-toolbar-title",id:e.titleId},e.title));else{let p=o===e.activeButton,m=!e.isTodayEnabled&&o==="today"||!e.isPrevEnabled&&o==="prev"||!e.isNextEnabled&&o==="next",h=[`fc-${o}-button`,r.getClass("button")];p&&h.push(r.getClass("buttonActive")),a.push(E("button",{type:"button",title:typeof u=="function"?u(e.navUnit):u,disabled:m,"aria-pressed":p,className:h.join(" "),onClick:l},c||(d?E("span",{className:d,role:"img"}):"")))}}if(a.length>1){let s=i&&r.getClass("buttonGroup")||"";return E("div",{className:s},...a)}return a[0]}},fT=class extends Ue{render(){let{model:t,extraClassName:e}=this.props,r=!1,a,i,s=t.sectionWidgets,o=s.center;return s.left?(r=!0,a=s.left):a=s.start,s.right?(r=!0,i=s.right):i=s.end,E("div",{className:[e||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",a||[]),this.renderSection("center",o||[]),this.renderSection("end",i||[]))}renderSection(t,e){let{props:r}=this;return E(WC,{key:t,widgetGroups:e,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}},qC=class extends Ue{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=t=>{this.el=t,oa(this.props.elRef,t),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:t,state:e}=this,{aspectRatio:r}=t,a=["fc-view-harness",r||t.liquid||t.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return r?e.availableWidth!==null?i=e.availableWidth/r:s=`${1/r*100}%`:i=t.height||"",E("div",{"aria-labelledby":t.labeledById,ref:this.handleEl,className:a.join(" "),style:{height:i,paddingBottom:s}},t.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})}},VC=class extends ii{constructor(t){super(t),this.handleSegClick=(e,r)=>{let{component:a}=this,{context:i}=a,s=Os(r);if(s&&a.isValidSegDownEl(e.target)){let o=yr(e.target,".fc-event-forced-url"),l=o?o.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:r,event:new St(a.context,s.eventRange.def,s.eventRange.instance),jsEvent:e,view:i.viewApi}),l&&!e.defaultPrevented&&(window.location.href=l)}},this.destroy=Qx(t.el,"click",".fc-event",this.handleSegClick)}},$C=class extends ii{constructor(t){super(t),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,r)=>{Os(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",e,r))},this.handleSegLeave=(e,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,r))},this.removeHoverListeners=d3(t.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(t,e,r){let{component:a}=this,{context:i}=a,s=Os(r);(!e||a.isValidSegDownEl(e.target))&&i.emitter.trigger(t,{el:r,event:new St(i,s.eventRange.def,s.eventRange.instance),jsEvent:e,view:i.viewApi})}},YC=class extends _i{constructor(){super(...arguments),this.buildViewContext=pe(D3),this.buildViewPropTransformers=pe(Cpe),this.buildToolbarProps=pe(xpe),this.headerRef=zt(),this.footerRef=zt(),this.interactionsStore={},this.state={viewLabelId:_n()},this.registerInteractiveComponent=(t,e)=>{let r=F3(t,e),s=[VC,$C].concat(this.props.pluginHooks.componentInteractions).map(o=>new o(r));this.interactionsStore[t.uid]=s,Ec[t.uid]=r},this.unregisterInteractiveComponent=t=>{let e=this.interactionsStore[t.uid];if(e){for(let r of e)r.destroy();delete this.interactionsStore[t.uid]}delete Ec[t.uid]},this.resizeRunner=new pc(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=t=>{let{options:e}=this.props;e.handleWindowResize&&t.target===window&&this.resizeRunner.request(e.windowResizeDelay)}}render(){let{props:t}=this,{toolbarConfig:e,options:r}=t,a=!1,i="",s;t.isHeightAuto||t.forPrint?i="":r.height!=null?a=!0:r.contentHeight!=null?i=r.contentHeight:s=Math.max(r.aspectRatio,.5);let o=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.nowManager,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=e.header&&e.header.hasTitle?this.state.viewLabelId:void 0;return E(Ra.Provider,{value:o},E(An,{unit:"day"},c=>{let d=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,c,t.viewTitle);return E(tt,null,e.header&&E(fT,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:e.header,titleId:l},d)),E(qC,{liquid:a,height:i,aspectRatio:s,labeledById:l},this.renderView(t),this.buildAppendContent()),e.footer&&E(fT,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:e.footer,titleId:""},d)))}))}componentDidMount(){let{props:t}=this;this.calendarInteractions=t.pluginHooks.calendarInteractions.map(r=>new r(t)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:e}=t.pluginHooks;for(let r in e)e[r](t[r],t)}componentDidUpdate(t){let{props:e}=this,{propSetHandlers:r}=e.pluginHooks;for(let a in r)e[a]!==t[a]&&r[a](e[a],e)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let t of this.calendarInteractions)t.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:t}=this,e=t.pluginHooks.viewContainerAppends.map(r=>r(t));return E(tt,{},...e)}renderView(t){let{pluginHooks:e}=t,{viewSpec:r}=t,a={dateProfile:t.dateProfile,businessHours:t.businessHours,eventStore:t.renderableEventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isHeightAuto:t.isHeightAuto,forPrint:t.forPrint},i=this.buildViewPropTransformers(e.viewPropsTransformers);for(let o of i)Object.assign(a,o.transform(a,t));let s=r.component;return E(s,Object.assign({},a))}};gT=class extends Cf{constructor(t,e={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;wf(()=>{Po(E(xf,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(a,i,s,o)=>(this.setClassNames(a),this.setHeight(i),E(mC.Provider,{value:this.customContentRenderId},E(YC,Object.assign({isHeightAuto:s,forPrint:o},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Po(null,this.el),this.setClassNames([]),this.setHeight(""))},s3(t),this.el=t,this.renderRunner=new pc(this.handleRenderRequest),new UC({optionOverrides:e,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let t=this.isRendering;t?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),t&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){wf(()=>{super.updateSize()})}batchRendering(t){this.renderRunner.pause("batchRendering"),t(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(t,e){this.currentDataManager.resetOptions(t,e)}setClassNames(t){if(!Fi(t,this.currentClassNames)){let{classList:e}=this.el;for(let r of this.currentClassNames)e.remove(r);for(let r of t)e.add(r);this.currentClassNames=t}}setHeight(t){Kx(this.el,"height",t)}}});var Pc=b(()=>{LC();Ms();vf()});function Ppe(n){return n.button===0&&!n.ctrlKey}function Mpe(){KC+=1,setTimeout(()=>{KC-=1},xu.touchMouseIgnoreWait)}function Ape(){yT+=1,yT===1&&window.addEventListener("touchmove",yG,{passive:!1})}function Ipe(){yT-=1,yT||window.removeEventListener("touchmove",yG,{passive:!1})}function yG(n){QC&&n.preventDefault()}function _pe(n){let t=n.tagName;return t==="HTML"||t==="BODY"}function wT(n,t){return!n&&!t?!0:!!n!=!!t?!1:DC(n.dateSpan,t.dateSpan)}function sP(n,t){let e={};for(let r of t.pluginHooks.datePointTransforms)Object.assign(e,r(n,t));return Object.assign(e,Npe(n,t.dateEnv)),e}function Npe(n,t){return{date:t.toDate(n.range.start),dateStr:t.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay}}function Rpe(n){let{options:t}=n.context,e=t.selectLongPressDelay;return e==null&&(e=t.longPressDelay),e}function Fpe(n,t,e){let r=n.dateSpan,a=t.dateSpan,i=[r.range.start,r.range.end,a.range.start,a.range.end];i.sort(rC);let s={};for(let o of e){let l=o(n,t);if(l===!1)return null;l&&Object.assign(s,l)}return s.range={start:i[0],end:i[3]},s.allDay=r.allDay,s}function Ope(n,t,e,r){let a=n.dateSpan,i=t.dateSpan,s=a.range.start,o=i.range.start,l={};a.allDay!==i.allDay&&(l.allDay=i.allDay,l.hasEnd=t.context.options.allDayMaintainDuration,i.allDay?s=ct(e):s=e);let c=_o(s,o,n.context.dateEnv,n.componentId===t.componentId?n.largeUnit:null);c.milliseconds&&(l.allDay=!1);let d={datesDelta:c,standardProps:l};for(let u of r)u(d,n,t);return d}function Lpe(n){let{options:t}=n.context,e=t.eventLongPressDelay;return e==null&&(e=t.longPressDelay),e}function Bpe(n,t,e,r){let a=n.context.dateEnv,i=n.dateSpan.range.start,s=t.dateSpan.range.start,o=_o(i,s,a,n.largeUnit);if(e){if(a.add(r.start,o)r.start)return{endDelta:o};return null}function zpe(n,t,e){let r=Object.assign({},t.leftoverProps);for(let d of e.pluginHooks.externalDefTransforms)Object.assign(r,d(n,t));let{refined:a,extra:i}=jf(r,e),s=mu(a,i,t.sourceId,n.allDay,e.options.forceEventDuration||!!t.duration,e),o=n.range.start;n.allDay&&t.startTime&&(o=e.dateEnv.add(o,t.startTime));let l=t.duration?e.dateEnv.add(o,t.duration):Ef(n.allDay,o,e),c=wu(s.defId,{start:o,end:l});return{def:s,instance:c}}function Upe(n){let t=Wpe(n,"event"),e=t?JSON.parse(t):{create:!1};return Yf(e)}function Wpe(n,t){let e=xu.dataAttrPrefix,r=(e?e+"-":"")+t;return n.getAttribute("data-"+r)||""}var KC,yT,QC,vT,ZC,bT,TT,JC,gG,XC,jo,eP,Mc,tP,rP,Xf,nP,aP,jpe,Hpe,iP,kT,vG,oP=b(()=>{Cc();Pc();xu.touchMouseIgnoreWait=500;KC=0,yT=0,QC=!1,vT=class{constructor(t){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=e=>{if(!this.shouldIgnoreMouse()&&Ppe(e)&&this.tryStart(e)){let r=this.createEventFromMouse(e,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=e=>{let r=this.createEventFromMouse(e);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=e=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(e)),this.cleanup()},this.handleTouchStart=e=>{if(this.tryStart(e)){this.isTouchDragging=!0;let r=this.createEventFromTouch(e,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let a=e.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=e=>{let r=this.createEventFromTouch(e);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=e=>{if(this.isDragging){let r=e.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(e)),this.cleanup(),this.isTouchDragging=!1,Mpe()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=e=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,a=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:e,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:a,deltaX:r-this.origPageX,deltaY:a-this.origPageY})}},this.containerEl=t,this.emitter=new _s,t.addEventListener("mousedown",this.handleMouseDown),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Ape()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Ipe()}tryStart(t){let e=this.querySubjectEl(t),r=t.target;return e&&(!this.handleSelector||yr(r,this.handleSelector))?(this.subjectEl=e,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){QC=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(t){return this.selector?yr(t.target,this.selector):this.containerEl}shouldIgnoreMouse(){return KC||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(QC=!0)}initScrollWatch(t){this.shouldWatchScroll&&(this.recordCoords(t),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(t){this.shouldWatchScroll&&(this.prevPageX=t.pageX,this.prevPageY=t.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(t,e){let r=0,a=0;return e?(this.origPageX=t.pageX,this.origPageY=t.pageY):(r=t.pageX-this.origPageX,a=t.pageY-this.origPageY),{origEvent:t,isTouch:!1,subjectEl:this.subjectEl,pageX:t.pageX,pageY:t.pageY,deltaX:r,deltaY:a}}createEventFromTouch(t,e){let r=t.touches,a,i,s=0,o=0;return r&&r.length?(a=r[0].pageX,i=r[0].pageY):(a=t.pageX,i=t.pageY),e?(this.origPageX=a,this.origPageY=i):(s=a-this.origPageX,o=i-this.origPageY),{origEvent:t,isTouch:!0,subjectEl:this.subjectEl,pageX:a,pageY:i,deltaX:s,deltaY:o}}};ZC=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(t,e,r){this.sourceEl=t,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=e-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(t,e){this.deltaX=t-window.scrollX-this.origScreenX,this.deltaY=e-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(t){t?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=t,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=t)}stop(t,e){let r=()=>{this.cleanup(),e()};t&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(t,e){let r=this.mirrorEl,a=this.sourceEl.getBoundingClientRect();r.style.transition="top "+e+"ms,left "+e+"ms",Sc(r,{left:a.left,top:a.top}),Zx(r,()=>{r.style.transition="",t()})}cleanup(){this.mirrorEl&&(Rf(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Sc(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let t=this.sourceElRect,e=this.mirrorEl;return e||(e=this.mirrorEl=this.sourceEl.cloneNode(!0),e.style.userSelect="none",e.style.webkitUserSelect="none",e.style.pointerEvents="none",e.classList.add("fc-event-dragging"),Sc(e,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:t.right-t.left,height:t.bottom-t.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(e)),e}},bT=class extends gc{constructor(t,e){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=t,this.doesListening=e,this.scrollTop=this.origScrollTop=t.getScrollTop(),this.scrollLeft=this.origScrollLeft=t.getScrollLeft(),this.scrollWidth=t.getScrollWidth(),this.scrollHeight=t.getScrollHeight(),this.clientWidth=t.getClientWidth(),this.clientHeight=t.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(t){this.scrollController.setScrollTop(t),this.doesListening||(this.scrollTop=Math.max(Math.min(t,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(t){this.scrollController.setScrollLeft(t),this.doesListening||(this.scrollLeft=Math.max(Math.min(t,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}},TT=class extends bT{constructor(t,e){super(new Mf(t),e)}getEventTarget(){return this.scrollController.el}computeClientRect(){return NC(this.scrollController.el)}},JC=class extends bT{constructor(t){super(new Af,t)}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()}},gG=typeof performance=="function"?performance.now:Date.now,XC=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 t=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(t){let e=gG();this.handleSide(t,(e-this.msSinceRequest)/1e3),this.requestAnimation(e)}else this.isAnimating=!1}}}start(t,e,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(t,e))}handleMove(t,e){if(this.isEnabled){let r=t-window.scrollX,a=e-window.scrollY,i=this.pointerScreenY===null?0:a-this.pointerScreenY,s=this.pointerScreenX===null?0:r-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),s<0?this.everMovedLeft=!0:s>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=a,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(gG()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let t of this.scrollCaches)t.destroy();this.scrollCaches=null}}requestAnimation(t){this.msSinceRequest=t,requestAnimationFrame(this.animate)}handleSide(t,e){let{scrollCache:r}=t,{edgeThreshold:a}=this,i=a-t.distance,s=i*i/(a*a)*this.maxVelocity*e,o=1;switch(t.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+s*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+s*o);break}}computeBestEdge(t,e){let{edgeThreshold:r}=this,a=null,i=this.scrollCaches||[];for(let s of i){let o=s.clientRect,l=t-o.left,c=o.right-t,d=e-o.top,u=o.bottom-e;l>=0&&c>=0&&d>=0&&u>=0&&(d<=r&&this.everMovedUp&&s.canScrollUp()&&(!a||a.distance>d)&&(a={scrollCache:s,name:"top",distance:d}),u<=r&&this.everMovedDown&&s.canScrollDown()&&(!a||a.distance>u)&&(a={scrollCache:s,name:"bottom",distance:u}),l<=r&&this.everMovedLeft&&s.canScrollLeft()&&(!a||a.distance>l)&&(a={scrollCache:s,name:"left",distance:l}),c<=r&&this.everMovedRight&&s.canScrollRight()&&(!a||a.distance>c)&&(a={scrollCache:s,name:"right",distance:c}))}return a}buildCaches(t){return this.queryScrollEls(t).map(e=>e===window?new JC(!1):new TT(e,!1))}queryScrollEls(t){let e=[];for(let r of this.scrollQuery)typeof r=="object"?e.push(r):e.push(...Array.prototype.slice.call(t.getRootNode().querySelectorAll(r)));return e}},jo=class extends Nf{constructor(t,e){super(t),this.containerEl=t,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,Jx(document.body),eC(document.body),a.isTouch||a.origEvent.preventDefault(),this.emitter.trigger("pointerdown",a),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(a.subjectEl,a.pageX,a.pageY),this.startDelay(a),this.minDistance||this.handleDistanceSurpassed(a)))},this.onPointerMove=a=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",a),!this.isDistanceSurpassed){let i=this.minDistance,s,{deltaX:o,deltaY:l}=a;s=o*o+l*l,s>=i*i&&this.handleDistanceSurpassed(a)}this.isDragging&&(a.origEvent.type!=="scroll"&&(this.mirror.handleMove(a.pageX,a.pageY),this.autoScroller.handleMove(a.pageX,a.pageY)),this.emitter.trigger("dragmove",a))}},this.onPointerUp=a=>{this.isInteracting&&(this.isInteracting=!1,Xx(document.body),tC(document.body),this.emitter.trigger("pointerup",a),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(a)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new vT(t);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),e&&(r.selector=e),this.mirror=new ZC,this.autoScroller=new XC}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(t){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)}handleDelayEnd(t){this.isDelayEnded=!0,this.tryStartDrag(t)}handleDistanceSurpassed(t){this.isDistanceSurpassed=!0,this.tryStartDrag(t)}tryStartDrag(t){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(t.pageX,t.pageY,this.containerEl),this.emitter.trigger("dragstart",t),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(t){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,t))}stopDrag(t){this.isDragging=!1,this.emitter.trigger("dragend",t)}setIgnoreMove(t){this.pointer.shouldIgnoreMove=t}setMirrorIsVisible(t){this.mirror.setIsVisible(t)}setMirrorNeedsRevert(t){this.mirrorNeedsRevert=t}setAutoScrollEnabled(t){this.autoScroller.isEnabled=t}},eP=class{constructor(t){this.el=t,this.origRect=Vf(t),this.scrollCaches=pT(t).map(e=>new TT(e,!0))}destroy(){for(let t of this.scrollCaches)t.destroy()}computeLeft(){let t=this.origRect.left;for(let e of this.scrollCaches)t+=e.origScrollLeft-e.getScrollLeft();return t}computeTop(){let t=this.origRect.top;for(let e of this.scrollCaches)t+=e.origScrollTop-e.getScrollTop();return t}isWithinClipping(t,e){let r={left:t,top:e};for(let a of this.scrollCaches)if(!_pe(a.getEventTarget())&&!MC(r,a.clientRect))return!1;return!0}};Mc=class{constructor(t,e){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:a}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(a.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):a.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=e,t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragstart",this.handleDragStart),t.emitter.on("dragmove",this.handleDragMove),t.emitter.on("pointerup",this.handlePointerUp),t.emitter.on("dragend",this.handleDragEnd),this.dragging=t,this.emitter=new _s}processFirstCoord(t){let e={left:t.pageX,top:t.pageY},r=e,a=t.subjectEl,i;a instanceof HTMLElement&&(i=Vf(a),r=AC(r,i));let s=this.initialHit=this.queryHitForOffset(r.left,r.top);if(s){if(this.useSubjectCenter&&i){let o=uT(i,s.rect);o&&(r=IC(o))}this.coordAdjust=_C(r,e)}else this.coordAdjust={left:0,top:0}}handleMove(t,e){let r=this.queryHitForOffset(t.pageX+this.coordAdjust.left,t.pageY+this.coordAdjust.top);(e||!wT(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,t))}prepareHits(){this.offsetTrackers=Na(this.droppableStore,t=>(t.component.prepareHits(),new eP(t.el)))}releaseHits(){let{offsetTrackers:t}=this;for(let e in t)t[e].destroy();this.offsetTrackers={}}queryHitForOffset(t,e){let{droppableStore:r,offsetTrackers:a}=this,i=null;for(let s in r){let o=r[s].component,l=a[s];if(l&&l.isWithinClipping(t,e)){let c=l.computeLeft(),d=l.computeTop(),u=t-c,p=e-d,{origRect:m}=l,h=m.right-m.left,f=m.bottom-m.top;if(u>=0&&u=0&&pi.layer)&&(g.componentId=s,g.context=o.context,g.rect.left+=c,g.rect.right+=c,g.rect.top+=d,g.rect.bottom+=d,i=g)}}}return i}};tP=class extends ii{constructor(t){super(t),this.handlePointerDown=r=>{let{dragging:a}=this,i=r.origEvent.target;a.setIgnoreMove(!this.component.isValidDateDownEl(i))},this.handleDragEnd=r=>{let{component:a}=this,{pointer:i}=this.dragging;if(!i.wasTouchScroll){let{initialHit:s,finalHit:o}=this.hitDragging;if(s&&o&&wT(s,o)){let{context:l}=a,c=Object.assign(Object.assign({},sP(s.dateSpan,l)),{dayEl:s.dayEl,jsEvent:r.origEvent,view:l.viewApi||l.calendarApi.view});l.emitter.trigger("dateClick",c)}}},this.dragging=new jo(t.el),this.dragging.autoScroller.isEnabled=!1;let e=this.hitDragging=new Mc(this.dragging,Wf(t));e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},rP=class extends ii{constructor(t){super(t),this.dragSelection=null,this.handlePointerDown=s=>{let{component:o,dragging:l}=this,{options:c}=o.context,d=c.selectable&&o.isValidDateDownEl(s.origEvent.target);l.setIgnoreMove(!d),l.delay=s.isTouch?Rpe(o):null},this.handleDragStart=s=>{this.component.context.calendarApi.unselect(s)},this.handleHitUpdate=(s,o)=>{let{context:l}=this.component,c=null,d=!1;if(s){let u=this.hitDragging.initialHit;s.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,s)||(c=Fpe(u,s,l.pluginHooks.dateSelectionTransformers)),(!c||!FC(c,s.dateProfile,l))&&(d=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),d?gu():yu(),o||(this.dragSelection=c)},this.handlePointerUp=s=>{this.dragSelection&&(dT(this.dragSelection,s,this.component.context),this.dragSelection=null)};let{component:e}=t,{options:r}=e.context,a=this.dragging=new jo(t.el);a.touchScrollAllowed=!1,a.minDistance=r.selectMinDistance||0,a.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Mc(this.dragging,Wf(t));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}};Xf=class n extends ii{constructor(t){super(t),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let o=s.origEvent.target,{component:l,dragging:c}=this,{mirror:d}=c,{options:u}=l.context,p=l.context;this.subjectEl=s.subjectEl;let m=this.subjectSeg=Os(s.subjectEl),f=(this.eventRange=m.eventRange).instance.instanceId;this.relevantEvents=Hf(p.getCurrentData().eventStore,f),c.minDistance=s.isTouch?0:u.eventDragMinDistance,c.delay=s.isTouch&&f!==l.props.eventSelection?Lpe(l):null,u.fixedMirrorParent?d.parentNode=u.fixedMirrorParent:d.parentNode=yr(o,".fc"),d.revertDuration=u.dragRevertDuration;let g=l.isValidSegDownEl(o)&&!yr(o,".fc-event-resizer");c.setIgnoreMove(!g),this.isDragging=g&&s.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=s=>{let o=this.component.context,l=this.eventRange,c=l.instance.instanceId;s.isTouch?c!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(s),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new St(o,l.def,l.instance),jsEvent:s.origEvent,view:o.viewApi}))},this.handleHitUpdate=(s,o)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,d=this.component.context,u=null,p=null,m=null,h=!1,f={affectedEvents:l,mutatedEvents:vr(),isEvent:!0};if(s){u=s.context;let g=u.options;d===u||g.editable&&g.droppable?(p=Ope(c,s,this.eventRange.instance.range.start,u.getCurrentData().pluginHooks.eventDragMutationMassagers),p&&(m=zf(l,u.getCurrentData().eventUiBases,p,u),f.mutatedEvents=m,Gf(f,s.dateProfile,u)||(h=!0,p=null,m=null,f.mutatedEvents=vr()))):u=null}this.displayDrag(u,f),h?gu():yu(),o||(d===u&&wT(c,s)&&(p=null),this.dragging.setMirrorNeedsRevert(!p),this.dragging.setMirrorIsVisible(!s||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=u,this.validMutation=p,this.mutatedRelevantEvents=m)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=s=>{if(this.isDragging){let o=this.component.context,l=o.viewApi,{receivingContext:c,validMutation:d}=this,u=this.eventRange.def,p=this.eventRange.instance,m=new St(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:s.origEvent,view:l}),d){if(c===o){let v=new St(o,f.defs[u.defId],p?f.instances[p.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:f});let T={oldEvent:m,event:v,relatedEvents:Bi(f,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:h})}},k={};for(let w of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(k,w(d,o));o.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},T),k),{el:s.subjectEl,delta:d.datesDelta,jsEvent:s.origEvent,view:l})),o.emitter.trigger("eventChange",T)}else if(c){let v={event:m,relatedEvents:Bi(h,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:h})}};o.emitter.trigger("eventLeave",Object.assign(Object.assign({},v),{draggedEl:s.subjectEl,view:l})),o.dispatch({type:"REMOVE_EVENTS",eventStore:h}),o.emitter.trigger("eventRemove",v);let T=f.defs[u.defId],k=f.instances[p.instanceId],w=new St(c,T,k);c.dispatch({type:"MERGE_EVENTS",eventStore:f});let S={event:w,relatedEvents:Bi(f,c,k),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:f})}};c.emitter.trigger("eventAdd",S),s.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:p.instanceId}),c.emitter.trigger("drop",Object.assign(Object.assign({},sP(g.dateSpan,c)),{draggedEl:s.subjectEl,jsEvent:s.origEvent,view:g.context.viewApi})),c.emitter.trigger("eventReceive",Object.assign(Object.assign({},S),{draggedEl:s.subjectEl,view:g.context.viewApi}))}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:e}=this,{options:r}=e.context,a=this.dragging=new jo(t.el);a.pointer.selector=n.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Mc(this.dragging,Ec);i.useSubjectCenter=t.useEventCenter,i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(t,e){let r=this.component.context,a=this.receivingContext;a&&a!==t&&(a===r?a.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:e.affectedEvents,mutatedEvents:vr(),isEvent:!0}}):a.dispatch({type:"UNSET_EVENT_DRAG"})),t&&t.dispatch({type:"SET_EVENT_DRAG",state:e})}clearDrag(){let t=this.component.context,{receivingContext:e}=this;e&&e.dispatch({type:"UNSET_EVENT_DRAG"}),t!==e&&t.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}};Xf.SELECTOR=".fc-event-draggable, .fc-event-resizable";nP=class extends ii{constructor(t){super(t),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=i=>{let{component:s}=this,o=this.querySegEl(i),l=Os(o),c=this.eventRange=l.eventRange;this.dragging.minDistance=s.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(i.origEvent.target)||i.isTouch&&this.component.props.eventSelection!==c.instance.instanceId)},this.handleDragStart=i=>{let{context:s}=this.component,o=this.eventRange;this.relevantEvents=Hf(s.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingSeg=Os(l),s.calendarApi.unselect(),s.emitter.trigger("eventResizeStart",{el:l,event:new St(s,o.def,o.instance),jsEvent:i.origEvent,view:s.viewApi})},this.handleHitUpdate=(i,s,o)=>{let{context:l}=this.component,c=this.relevantEvents,d=this.hitDragging.initialHit,u=this.eventRange.instance,p=null,m=null,h=!1,f={affectedEvents:c,mutatedEvents:vr(),isEvent:!0};i&&(i.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,i)||(p=Bpe(d,i,o.subjectEl.classList.contains("fc-event-resizer-start"),u.range))),p&&(m=zf(c,l.getCurrentData().eventUiBases,p,l),f.mutatedEvents=m,Gf(f,i.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?gu():yu(),s||(p&&wT(d,i)&&(p=null),this.validMutation=p,this.mutatedRelevantEvents=m)},this.handleDragEnd=i=>{let{context:s}=this.component,o=this.eventRange.def,l=this.eventRange.instance,c=new St(s,o,l),d=this.relevantEvents,u=this.mutatedRelevantEvents;if(s.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:i.origEvent,view:s.viewApi}),this.validMutation){let p=new St(s,u.defs[o.defId],l?u.instances[l.instanceId]:null);s.dispatch({type:"MERGE_EVENTS",eventStore:u});let m={oldEvent:c,event:p,relatedEvents:Bi(u,s,l),revert(){s.dispatch({type:"MERGE_EVENTS",eventStore:d})}};s.emitter.trigger("eventResize",Object.assign(Object.assign({},m),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||Re(0),endDelta:this.validMutation.endDelta||Re(0),jsEvent:i.origEvent,view:s.viewApi})),s.emitter.trigger("eventChange",m)}else s.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:e}=t,r=this.dragging=new jo(t.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=e.context.options.dragScroll;let a=this.hitDragging=new Mc(this.dragging,Wf(t));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(t){return yr(t.subjectEl,".fc-event")}};aP=class{constructor(t){this.context=t,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let a=this.context.options.unselectCancel,i=eT(r.origEvent);this.matchesCancel=!!yr(i,a),this.matchesEvent=!!yr(i,Xf.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:a}=this,{documentPointer:i}=this,s=a.getCurrentData();if(!i.wasTouchScroll){if(s.dateSelection&&!this.isRecentPointerDateSelect){let o=a.options.unselectAuto;o&&(!o||!this.matchesCancel)&&a.calendarApi.unselect(r)}s.eventSelection&&!this.matchesEvent&&a.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let e=this.documentPointer=new vT(document);e.shouldIgnoreMove=!0,e.shouldWatchScroll=!1,e.emitter.on("pointerdown",this.onDocumentPointerDown),e.emitter.on("pointerup",this.onDocumentPointerUp),t.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}},jpe={fixedMirrorParent:F},Hpe={dateClick:F,eventDragStart:F,eventDragStop:F,eventDrop:F,eventResizeStart:F,eventResizeStop:F,eventResize:F,drop:F,eventReceive:F,eventLeave:F},iP=class{constructor(t,e){this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=a=>{this.dragMeta=this.buildDragMeta(a.subjectEl)},this.handleHitUpdate=(a,i,s)=>{let{dragging:o}=this.hitDragging,l=null,c=null,d=!1,u={affectedEvents:vr(),mutatedEvents:vr(),isEvent:this.dragMeta.create};a&&(l=a.context,this.canDropElOnCalendar(s.subjectEl,l)&&(c=zpe(a.dateSpan,this.dragMeta,l),u.mutatedEvents=fc(c),d=!Gf(u,a.dateProfile,l),d&&(u.mutatedEvents=vr(),c=null))),this.displayDrag(l,u),o.setMirrorIsVisible(i||!c||!document.querySelector(".fc-event-mirror")),d?gu():yu(),i||(o.setMirrorNeedsRevert(!c),this.receivingContext=l,this.droppableEvent=c)},this.handleDragEnd=a=>{let{receivingContext:i,droppableEvent:s}=this;if(this.clearDrag(),i&&s){let o=this.hitDragging.finalHit,l=o.context.viewApi,c=this.dragMeta;if(i.emitter.trigger("drop",Object.assign(Object.assign({},sP(o.dateSpan,i)),{draggedEl:a.subjectEl,jsEvent:a.origEvent,view:l})),c.create){let d=fc(s);i.dispatch({type:"MERGE_EVENTS",eventStore:d}),a.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:s.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new St(i,s.def,s.instance),relatedEvents:[],revert(){i.dispatch({type:"REMOVE_EVENTS",eventStore:d})},draggedEl:a.subjectEl,view:l})}}this.receivingContext=null,this.droppableEvent=null};let r=this.hitDragging=new Mc(t,Ec);r.requireInitial=!1,r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=e}buildDragMeta(t){return typeof this.suppliedDragMeta=="object"?Yf(this.suppliedDragMeta):typeof this.suppliedDragMeta=="function"?Yf(this.suppliedDragMeta(t)):Upe(t)}displayDrag(t,e){let r=this.receivingContext;r&&r!==t&&r.dispatch({type:"UNSET_EVENT_DRAG"}),t&&t.dispatch({type:"SET_EVENT_DRAG",state:e})}clearDrag(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})}canDropElOnCalendar(t,e){let r=e.options.dropAccept;return typeof r=="function"?r.call(e.calendarApi,t):typeof r=="string"&&r?!!Xb(t,r):!0}};xu.dataAttrPrefix="";kT=class{constructor(t,e={}){this.handlePointerDown=a=>{let{dragging:i}=this,{minDistance:s,longPressDelay:o}=this.settings;i.minDistance=s!=null?s:a.isTouch?0:Li.eventDragMinDistance,i.delay=a.isTouch?o!=null?o:Li.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=e;let r=this.dragging=new jo(t);r.touchScrollAllowed=!1,e.itemSelector!=null&&(r.pointer.selector=e.itemSelector),e.appendTo!=null&&(r.mirror.parentNode=e.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new iP(r,e.eventData)}destroy(){this.dragging.destroy()}},vG=Xr({name:"@fullcalendar/interaction",componentInteractions:[tP,rP,Xf,nP],calendarInteractions:[aP],elementDraggingImpl:jo,optionRefiners:jpe,listenerRefiners:Hpe})});var ze=D(xe=>{"use strict";xe.secondsInYear=xe.secondsInWeek=xe.secondsInQuarter=xe.secondsInMonth=xe.secondsInMinute=xe.secondsInHour=xe.secondsInDay=xe.quartersInYear=xe.monthsInYear=xe.monthsInQuarter=xe.minutesInYear=xe.minutesInMonth=xe.minutesInHour=xe.minutesInDay=xe.minTime=xe.millisecondsInWeek=xe.millisecondsInSecond=xe.millisecondsInMinute=xe.millisecondsInHour=xe.millisecondsInDay=xe.maxTime=xe.daysInYear=xe.daysInWeek=xe.constructFromSymbol=void 0;var Qat=xe.daysInWeek=7,kme=xe.daysInYear=365.2425,wme=xe.maxTime=Math.pow(10,8)*24*60*60*1e3,Zat=xe.minTime=-wme,Jat=xe.millisecondsInWeek=6048e5,Xat=xe.millisecondsInDay=864e5,eit=xe.millisecondsInMinute=6e4,tit=xe.millisecondsInHour=36e5,rit=xe.millisecondsInSecond=1e3,nit=xe.minutesInYear=525600,ait=xe.minutesInMonth=43200,iit=xe.minutesInDay=1440,sit=xe.minutesInHour=60,oit=xe.monthsInQuarter=3,lit=xe.monthsInYear=12,cit=xe.quartersInYear=4,Sme=xe.secondsInHour=3600,dit=xe.secondsInMinute=60,p4=xe.secondsInDay=Sme*24,uit=xe.secondsInWeek=p4*7,Dme=xe.secondsInYear=p4*kme,Eme=xe.secondsInMonth=Dme/12,pit=xe.secondsInQuarter=Eme*3,mit=xe.constructFromSymbol=Symbol.for("constructDateFrom")});var ke=D(h4=>{"use strict";h4.constructFrom=xme;var m4=ze();function xme(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&m4.constructFromSymbol in n?n[m4.constructFromSymbol](t):n instanceof Date?new n.constructor(t):new Date(t)}});var $=D(f4=>{"use strict";f4.toDate=Pme;var Cme=ke();function Pme(n,t){return(0,Cme.constructFrom)(t||n,n)}});var Wi=D(g4=>{"use strict";g4.addDays=Ime;var Mme=ke(),Ame=$();function Ime(n,t,e){let r=(0,Ame.toDate)(n,e==null?void 0:e.in);return isNaN(t)?(0,Mme.constructFrom)((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}});var Hu=D(v4=>{"use strict";v4.addMonths=Nme;var y4=ke(),_me=$();function Nme(n,t,e){let r=(0,_me.toDate)(n,e==null?void 0:e.in);if(isNaN(t))return(0,y4.constructFrom)((e==null?void 0:e.in)||n,NaN);if(!t)return r;let a=r.getDate(),i=(0,y4.constructFrom)((e==null?void 0:e.in)||n,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return a>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}});var gP=D(b4=>{"use strict";b4.add=Bme;var Rme=Wi(),Fme=Hu(),Ome=ke(),Lme=$();function Bme(n,t,e){let{years:r=0,months:a=0,weeks:i=0,days:s=0,hours:o=0,minutes:l=0,seconds:c=0}=t,d=(0,Lme.toDate)(n,e==null?void 0:e.in),u=a||r?(0,Fme.addMonths)(d,a+r*12):d,p=s||i?(0,Rme.addDays)(u,s+i*7):u,m=l+o*60,f=(c+m*60)*1e3;return(0,Ome.constructFrom)((e==null?void 0:e.in)||n,+p+f)}});var yP=D(T4=>{"use strict";T4.isSaturday=Hme;var jme=$();function Hme(n,t){return(0,jme.toDate)(n,t==null?void 0:t.in).getDay()===6}});var vP=D(k4=>{"use strict";k4.isSunday=Ume;var zme=$();function Ume(n,t){return(0,zme.toDate)(n,t==null?void 0:t.in).getDay()===0}});var lg=D(w4=>{"use strict";w4.isWeekend=qme;var Wme=$();function qme(n,t){let e=(0,Wme.toDate)(n,t==null?void 0:t.in).getDay();return e===0||e===6}});var TP=D(S4=>{"use strict";S4.addBusinessDays=Kme;var Vme=ke(),$me=yP(),Yme=vP(),bP=lg(),Gme=$();function Kme(n,t,e){let r=(0,Gme.toDate)(n,e==null?void 0:e.in),a=(0,bP.isWeekend)(r,e);if(isNaN(t))return(0,Vme.constructFrom)(e==null?void 0:e.in,NaN);let i=r.getHours(),s=t<0?-1:1,o=Math.trunc(t/5);r.setDate(r.getDate()+o*7);let l=Math.abs(t%5);for(;l>0;)r.setDate(r.getDate()+s),(0,bP.isWeekend)(r,e)||(l-=1);return a&&(0,bP.isWeekend)(r,e)&&t!==0&&((0,$me.isSaturday)(r,e)&&r.setDate(r.getDate()+(s<0?2:-1)),(0,Yme.isSunday)(r,e)&&r.setDate(r.getDate()+(s<0?1:-2))),r.setHours(i),r}});var cg=D(D4=>{"use strict";D4.addMilliseconds=Jme;var Qme=ke(),Zme=$();function Jme(n,t,e){return(0,Qme.constructFrom)((e==null?void 0:e.in)||n,+(0,Zme.toDate)(n)+t)}});var kP=D(E4=>{"use strict";E4.addHours=the;var Xme=cg(),ehe=ze();function the(n,t,e){return(0,Xme.addMilliseconds)(n,t*ehe.millisecondsInHour,e)}});var tn=D(wP=>{"use strict";wP.getDefaultOptions=rhe;wP.setDefaultOptions=nhe;var x4={};function rhe(){return x4}function nhe(n){x4=n}});var ci=D(C4=>{"use strict";C4.startOfWeek=she;var ahe=tn(),ihe=$();function she(n,t){var o,l,c,d,u,p,m,h;let e=(0,ahe.getDefaultOptions)(),r=(h=(m=(d=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:e.weekStartsOn)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:0,a=(0,ihe.toDate)(n,t==null?void 0:t.in),i=a.getDay(),s=(i{"use strict";P4.startOfISOWeek=lhe;var ohe=ci();function lhe(n,t){return(0,ohe.startOfWeek)(n,{...t,weekStartsOn:1})}});var $o=D(I4=>{"use strict";I4.getISOWeekYear=dhe;var M4=ke(),A4=qi(),che=$();function dhe(n,t){let e=(0,che.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=(0,M4.constructFrom)(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=(0,A4.startOfISOWeek)(a),s=(0,M4.constructFrom)(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let o=(0,A4.startOfISOWeek)(s);return e.getTime()>=i.getTime()?r+1:e.getTime()>=o.getTime()?r:r-1}});var Ws=D(_4=>{"use strict";_4.getTimezoneOffsetInMilliseconds=phe;var uhe=$();function phe(n){let t=(0,uhe.toDate)(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}});var wt=D(N4=>{"use strict";N4.normalizeDates=hhe;var mhe=ke();function hhe(n,...t){let e=mhe.constructFrom.bind(null,n||t.find(r=>typeof r=="object"));return t.map(e)}});var dg=D(R4=>{"use strict";R4.startOfDay=ghe;var fhe=$();function ghe(n,t){let e=(0,fhe.toDate)(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}});var qs=D(L4=>{"use strict";L4.differenceInCalendarDays=bhe;var F4=Ws(),yhe=wt(),vhe=ze(),O4=dg();function bhe(n,t,e){let[r,a]=(0,yhe.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,O4.startOfDay)(r),s=(0,O4.startOfDay)(a),o=+i-(0,F4.getTimezoneOffsetInMilliseconds)(i),l=+s-(0,F4.getTimezoneOffsetInMilliseconds)(s);return Math.round((o-l)/vhe.millisecondsInDay)}});var zu=D(B4=>{"use strict";B4.startOfISOWeekYear=She;var The=ke(),khe=$o(),whe=qi();function She(n,t){let e=(0,khe.getISOWeekYear)(n,t),r=(0,The.constructFrom)((t==null?void 0:t.in)||n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),(0,whe.startOfISOWeek)(r)}});var SP=D(H4=>{"use strict";H4.setISOWeekYear=Che;var Dhe=ke(),Ehe=qs(),j4=zu(),xhe=$();function Che(n,t,e){let r=(0,xhe.toDate)(n,e==null?void 0:e.in),a=(0,Ehe.differenceInCalendarDays)(r,(0,j4.startOfISOWeekYear)(r,e)),i=(0,Dhe.constructFrom)((e==null?void 0:e.in)||n,0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),r=(0,j4.startOfISOWeekYear)(i),r.setDate(r.getDate()+a),r}});var DP=D(z4=>{"use strict";z4.addISOWeekYears=Ahe;var Phe=$o(),Mhe=SP();function Ahe(n,t,e){return(0,Mhe.setISOWeekYear)(n,(0,Phe.getISOWeekYear)(n,e)+t,e)}});var JT=D(U4=>{"use strict";U4.addMinutes=Nhe;var Ihe=ze(),_he=$();function Nhe(n,t,e){let r=(0,_he.toDate)(n,e==null?void 0:e.in);return r.setTime(r.getTime()+t*Ihe.millisecondsInMinute),r}});var XT=D(W4=>{"use strict";W4.addQuarters=Fhe;var Rhe=Hu();function Fhe(n,t,e){return(0,Rhe.addMonths)(n,t*3,e)}});var EP=D(q4=>{"use strict";q4.addSeconds=Lhe;var Ohe=cg();function Lhe(n,t,e){return(0,Ohe.addMilliseconds)(n,t*1e3,e)}});var ug=D(V4=>{"use strict";V4.addWeeks=jhe;var Bhe=Wi();function jhe(n,t,e){return(0,Bhe.addDays)(n,t*7,e)}});var xP=D($4=>{"use strict";$4.addYears=zhe;var Hhe=Hu();function zhe(n,t,e){return(0,Hhe.addMonths)(n,t*12,e)}});var G4=D(Y4=>{"use strict";Y4.areIntervalsOverlapping=Uhe;var ek=$();function Uhe(n,t,e){let[r,a]=[+(0,ek.toDate)(n.start,e==null?void 0:e.in),+(0,ek.toDate)(n.end,e==null?void 0:e.in)].sort((o,l)=>o-l),[i,s]=[+(0,ek.toDate)(t.start,e==null?void 0:e.in),+(0,ek.toDate)(t.end,e==null?void 0:e.in)].sort((o,l)=>o-l);return e!=null&&e.inclusive?r<=s&&i<=a:r{"use strict";Q4.max=qhe;var K4=ke(),Whe=$();function qhe(n,t){let e,r=t==null?void 0:t.in;return n.forEach(a=>{!r&&typeof a=="object"&&(r=K4.constructFrom.bind(null,a));let i=(0,Whe.toDate)(a,r);(!e||e{"use strict";J4.min=$he;var Z4=ke(),Vhe=$();function $he(n,t){let e,r=t==null?void 0:t.in;return n.forEach(a=>{!r&&typeof a=="object"&&(r=Z4.constructFrom.bind(null,a));let i=(0,Vhe.toDate)(a,r);(!e||e>i||isNaN(+i))&&(e=i)}),(0,Z4.constructFrom)(r,e||NaN)}});var e6=D(X4=>{"use strict";X4.clamp=Qhe;var Yhe=wt(),Ghe=CP(),Khe=PP();function Qhe(n,t,e){let[r,a,i]=(0,Yhe.normalizeDates)(e==null?void 0:e.in,n,t.start,t.end);return(0,Khe.min)([(0,Ghe.max)([r,a],e),i],e)}});var MP=D(r6=>{"use strict";r6.closestIndexTo=Zhe;var t6=$();function Zhe(n,t){let e=+(0,t6.toDate)(n);if(isNaN(e))return NaN;let r,a;return t.forEach((i,s)=>{let o=(0,t6.toDate)(i);if(isNaN(+o)){r=NaN,a=NaN;return}let l=Math.abs(e-+o);(r==null||l{"use strict";n6.closestTo=tfe;var Jhe=wt(),Xhe=MP(),efe=ke();function tfe(n,t,e){let[r,...a]=(0,Jhe.normalizeDates)(e==null?void 0:e.in,n,...t),i=(0,Xhe.closestIndexTo)(r,a);if(typeof i=="number"&&isNaN(i))return(0,efe.constructFrom)(r,NaN);if(i!==void 0)return a[i]}});var Oc=D(s6=>{"use strict";s6.compareAsc=rfe;var i6=$();function rfe(n,t){let e=+(0,i6.toDate)(n)-+(0,i6.toDate)(t);return e<0?-1:e>0?1:e}});var c6=D(l6=>{"use strict";l6.compareDesc=nfe;var o6=$();function nfe(n,t){let e=+(0,o6.toDate)(n)-+(0,o6.toDate)(t);return e>0?-1:e<0?1:e}});var br=D(d6=>{"use strict";d6.constructNow=ife;var afe=ke();function ife(n){return(0,afe.constructFrom)(n,Date.now())}});var p6=D(u6=>{"use strict";u6.daysToWeeks=ofe;var sfe=ze();function ofe(n){let t=Math.trunc(n/sfe.daysInWeek);return t===0?0:t}});var Uu=D(h6=>{"use strict";h6.isSameDay=cfe;var lfe=wt(),m6=dg();function cfe(n,t,e){let[r,a]=(0,lfe.normalizeDates)(e==null?void 0:e.in,n,t);return+(0,m6.startOfDay)(r)==+(0,m6.startOfDay)(a)}});var AP=D(f6=>{"use strict";f6.isDate=dfe;function dfe(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}});var Vs=D(g6=>{"use strict";g6.isValid=mfe;var ufe=AP(),pfe=$();function mfe(n){return!(!(0,ufe.isDate)(n)&&typeof n!="number"||isNaN(+(0,pfe.toDate)(n)))}});var T6=D(b6=>{"use strict";b6.differenceInBusinessDays=vfe;var hfe=wt(),y6=Wi(),ffe=qs(),gfe=Uu(),v6=Vs(),yfe=lg();function vfe(n,t,e){let[r,a]=(0,hfe.normalizeDates)(e==null?void 0:e.in,n,t);if(!(0,v6.isValid)(r)||!(0,v6.isValid)(a))return NaN;let i=(0,ffe.differenceInCalendarDays)(r,a),s=i<0?-1:1,o=Math.trunc(i/7),l=o*5,c=(0,y6.addDays)(a,o*7);for(;!(0,gfe.isSameDay)(r,c);)l+=(0,yfe.isWeekend)(c,e)?0:s,c=(0,y6.addDays)(c,s);return l===0?0:l}});var IP=D(w6=>{"use strict";w6.differenceInCalendarISOWeekYears=Tfe;var bfe=wt(),k6=$o();function Tfe(n,t,e){let[r,a]=(0,bfe.normalizeDates)(e==null?void 0:e.in,n,t);return(0,k6.getISOWeekYear)(r,e)-(0,k6.getISOWeekYear)(a,e)}});var x6=D(E6=>{"use strict";E6.differenceInCalendarISOWeeks=Sfe;var S6=Ws(),kfe=wt(),wfe=ze(),D6=qi();function Sfe(n,t,e){let[r,a]=(0,kfe.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,D6.startOfISOWeek)(r),s=(0,D6.startOfISOWeek)(a),o=+i-(0,S6.getTimezoneOffsetInMilliseconds)(i),l=+s-(0,S6.getTimezoneOffsetInMilliseconds)(s);return Math.round((o-l)/wfe.millisecondsInWeek)}});var tk=D(C6=>{"use strict";C6.differenceInCalendarMonths=Efe;var Dfe=wt();function Efe(n,t,e){let[r,a]=(0,Dfe.normalizeDates)(e==null?void 0:e.in,n,t),i=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return i*12+s}});var _P=D(P6=>{"use strict";P6.getQuarter=Cfe;var xfe=$();function Cfe(n,t){let e=(0,xfe.toDate)(n,t==null?void 0:t.in);return Math.trunc(e.getMonth()/3)+1}});var NP=D(A6=>{"use strict";A6.differenceInCalendarQuarters=Mfe;var Pfe=wt(),M6=_P();function Mfe(n,t,e){let[r,a]=(0,Pfe.normalizeDates)(e==null?void 0:e.in,n,t),i=r.getFullYear()-a.getFullYear(),s=(0,M6.getQuarter)(r)-(0,M6.getQuarter)(a);return i*4+s}});var rk=D(N6=>{"use strict";N6.differenceInCalendarWeeks=_fe;var I6=Ws(),Afe=wt(),Ife=ze(),_6=ci();function _fe(n,t,e){let[r,a]=(0,Afe.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,_6.startOfWeek)(r,e),s=(0,_6.startOfWeek)(a,e),o=+i-(0,I6.getTimezoneOffsetInMilliseconds)(i),l=+s-(0,I6.getTimezoneOffsetInMilliseconds)(s);return Math.round((o-l)/Ife.millisecondsInWeek)}});var nk=D(R6=>{"use strict";R6.differenceInCalendarYears=Rfe;var Nfe=wt();function Rfe(n,t,e){let[r,a]=(0,Nfe.normalizeDates)(e==null?void 0:e.in,n,t);return r.getFullYear()-a.getFullYear()}});var ak=D(O6=>{"use strict";O6.differenceInDays=Lfe;var Ffe=wt(),Ofe=qs();function Lfe(n,t,e){let[r,a]=(0,Ffe.normalizeDates)(e==null?void 0:e.in,n,t),i=F6(r,a),s=Math.abs((0,Ofe.differenceInCalendarDays)(r,a));r.setDate(r.getDate()-i*s);let o=+(F6(r,a)===-i),l=i*(s-o);return l===0?0:l}function F6(n,t){let e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}});var $s=D(L6=>{"use strict";L6.getRoundingMethod=Bfe;function Bfe(n){return t=>{let r=(n?Math[n]:Math.trunc)(t);return r===0?0:r}}});var ik=D(B6=>{"use strict";B6.differenceInHours=Ufe;var jfe=$s(),Hfe=wt(),zfe=ze();function Ufe(n,t,e){let[r,a]=(0,Hfe.normalizeDates)(e==null?void 0:e.in,n,t),i=(+r-+a)/zfe.millisecondsInHour;return(0,jfe.getRoundingMethod)(e==null?void 0:e.roundingMethod)(i)}});var RP=D(j6=>{"use strict";j6.subISOWeekYears=qfe;var Wfe=DP();function qfe(n,t,e){return(0,Wfe.addISOWeekYears)(n,-t,e)}});var U6=D(z6=>{"use strict";z6.differenceInISOWeekYears=Gfe;var Vfe=wt(),H6=Oc(),$fe=IP(),Yfe=RP();function Gfe(n,t,e){let[r,a]=(0,Vfe.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,H6.compareAsc)(r,a),s=Math.abs((0,$fe.differenceInCalendarISOWeekYears)(r,a,e)),o=(0,Yfe.subISOWeekYears)(r,i*s,e),l=+((0,H6.compareAsc)(o,a)===-i),c=i*(s-l);return c===0?0:c}});var sk=D(q6=>{"use strict";q6.differenceInMilliseconds=Kfe;var W6=$();function Kfe(n,t){return+(0,W6.toDate)(n)-+(0,W6.toDate)(t)}});var ok=D(V6=>{"use strict";V6.differenceInMinutes=Xfe;var Qfe=$s(),Zfe=ze(),Jfe=sk();function Xfe(n,t,e){let r=(0,Jfe.differenceInMilliseconds)(n,t)/Zfe.millisecondsInMinute;return(0,Qfe.getRoundingMethod)(e==null?void 0:e.roundingMethod)(r)}});var lk=D($6=>{"use strict";$6.endOfDay=tge;var ege=$();function tge(n,t){let e=(0,ege.toDate)(n,t==null?void 0:t.in);return e.setHours(23,59,59,999),e}});var ck=D(Y6=>{"use strict";Y6.endOfMonth=nge;var rge=$();function nge(n,t){let e=(0,rge.toDate)(n,t==null?void 0:t.in),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}});var FP=D(G6=>{"use strict";G6.isLastDayOfMonth=oge;var age=lk(),ige=ck(),sge=$();function oge(n,t){let e=(0,sge.toDate)(n,t==null?void 0:t.in);return+(0,age.endOfDay)(e,t)==+(0,ige.endOfMonth)(e,t)}});var pg=D(K6=>{"use strict";K6.differenceInMonths=uge;var lge=wt(),OP=Oc(),cge=tk(),dge=FP();function uge(n,t,e){let[r,a,i]=(0,lge.normalizeDates)(e==null?void 0:e.in,n,n,t),s=(0,OP.compareAsc)(a,i),o=Math.abs((0,cge.differenceInCalendarMonths)(a,i));if(o<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*o);let l=(0,OP.compareAsc)(a,i)===-s;(0,dge.isLastDayOfMonth)(r)&&o===1&&(0,OP.compareAsc)(r,i)===1&&(l=!1);let c=s*(o-+l);return c===0?0:c}});var Z6=D(Q6=>{"use strict";Q6.differenceInQuarters=hge;var pge=$s(),mge=pg();function hge(n,t,e){let r=(0,mge.differenceInMonths)(n,t,e)/3;return(0,pge.getRoundingMethod)(e==null?void 0:e.roundingMethod)(r)}});var mg=D(J6=>{"use strict";J6.differenceInSeconds=yge;var fge=$s(),gge=sk();function yge(n,t,e){let r=(0,gge.differenceInMilliseconds)(n,t)/1e3;return(0,fge.getRoundingMethod)(e==null?void 0:e.roundingMethod)(r)}});var e5=D(X6=>{"use strict";X6.differenceInWeeks=Tge;var vge=$s(),bge=ak();function Tge(n,t,e){let r=(0,bge.differenceInDays)(n,t,e)/7;return(0,vge.getRoundingMethod)(e==null?void 0:e.roundingMethod)(r)}});var LP=D(r5=>{"use strict";r5.differenceInYears=Sge;var kge=wt(),t5=Oc(),wge=nk();function Sge(n,t,e){let[r,a]=(0,kge.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,t5.compareAsc)(r,a),s=Math.abs((0,wge.differenceInCalendarYears)(r,a));r.setFullYear(1584),a.setFullYear(1584);let o=(0,t5.compareAsc)(r,a)===-i,l=i*(s-+o);return l===0?0:l}});var Vi=D(n5=>{"use strict";n5.normalizeInterval=Ege;var Dge=wt();function Ege(n,t){let[e,r]=(0,Dge.normalizeDates)(n,t.start,t.end);return{start:e,end:r}}});var BP=D(a5=>{"use strict";a5.eachDayOfInterval=Pge;var xge=Vi(),Cge=ke();function Pge(n,t){var c;let{start:e,end:r}=(0,xge.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?+e:+r,s=a?r:e;s.setHours(0,0,0,0);let o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,Cge.constructFrom)(e,s)),s.setDate(s.getDate()+o),s.setHours(0,0,0,0);return a?l.reverse():l}});var s5=D(i5=>{"use strict";i5.eachHourOfInterval=Ige;var Mge=Vi(),Age=ke();function Ige(n,t){var c;let{start:e,end:r}=(0,Mge.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?+e:+r,s=a?r:e;s.setMinutes(0,0,0);let o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,Age.constructFrom)(e,s)),s.setHours(s.getHours()+o);return a?l.reverse():l}});var l5=D(o5=>{"use strict";o5.eachMinuteOfInterval=Fge;var _ge=Vi(),Nge=JT(),Rge=ke();function Fge(n,t){var c;let{start:e,end:r}=(0,_ge.normalizeInterval)(t==null?void 0:t.in,n);e.setSeconds(0,0);let a=+e>+r,i=a?+e:+r,s=a?r:e,o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,Rge.constructFrom)(e,s)),s=(0,Nge.addMinutes)(s,o);return a?l.reverse():l}});var d5=D(c5=>{"use strict";c5.eachMonthOfInterval=Bge;var Oge=Vi(),Lge=ke();function Bge(n,t){var c;let{start:e,end:r}=(0,Oge.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?+e:+r,s=a?r:e;s.setHours(0,0,0,0),s.setDate(1);let o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,Lge.constructFrom)(e,s)),s.setMonth(s.getMonth()+o);return a?l.reverse():l}});var dk=D(u5=>{"use strict";u5.startOfQuarter=Hge;var jge=$();function Hge(n,t){let e=(0,jge.toDate)(n,t==null?void 0:t.in),r=e.getMonth(),a=r-r%3;return e.setMonth(a,1),e.setHours(0,0,0,0),e}});var m5=D(p5=>{"use strict";p5.eachQuarterOfInterval=qge;var zge=Vi(),Uge=XT(),Wge=ke(),uk=dk();function qge(n,t){var c;let{start:e,end:r}=(0,zge.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?+(0,uk.startOfQuarter)(e):+(0,uk.startOfQuarter)(r),s=a?(0,uk.startOfQuarter)(r):(0,uk.startOfQuarter)(e),o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,Wge.constructFrom)(e,s)),s=(0,Uge.addQuarters)(s,o);return a?l.reverse():l}});var f5=D(h5=>{"use strict";h5.eachWeekOfInterval=Gge;var Vge=Vi(),$ge=ug(),Yge=ke(),pk=ci();function Gge(n,t){var u;let{start:e,end:r}=(0,Vge.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?(0,pk.startOfWeek)(r,t):(0,pk.startOfWeek)(e,t),s=a?(0,pk.startOfWeek)(e,t):(0,pk.startOfWeek)(r,t);i.setHours(15),s.setHours(15);let o=+s.getTime(),l=i,c=(u=t==null?void 0:t.step)!=null?u:1;if(!c)return[];c<0&&(c=-c,a=!a);let d=[];for(;+l<=o;)l.setHours(0),d.push((0,Yge.constructFrom)(e,l)),l=(0,$ge.addWeeks)(l,c),l.setHours(15);return a?d.reverse():d}});var mk=D(g5=>{"use strict";g5.eachWeekendOfInterval=Xge;var Kge=Vi(),Qge=ke(),Zge=BP(),Jge=lg();function Xge(n,t){let{start:e,end:r}=(0,Kge.normalizeInterval)(t==null?void 0:t.in,n),a=(0,Zge.eachDayOfInterval)({start:e,end:r},t),i=[],s=0;for(;s{"use strict";y5.startOfMonth=tye;var eye=$();function tye(n,t){let e=(0,eye.toDate)(n,t==null?void 0:t.in);return e.setDate(1),e.setHours(0,0,0,0),e}});var b5=D(v5=>{"use strict";v5.eachWeekendOfMonth=iye;var rye=mk(),nye=ck(),aye=hg();function iye(n,t){let e=(0,aye.startOfMonth)(n,t),r=(0,nye.endOfMonth)(n,t);return(0,rye.eachWeekendOfInterval)({start:e,end:r},t)}});var jP=D(T5=>{"use strict";T5.endOfYear=oye;var sye=$();function oye(n,t){let e=(0,sye.toDate)(n,t==null?void 0:t.in),r=e.getFullYear();return e.setFullYear(r+1,0,0),e.setHours(23,59,59,999),e}});var hk=D(k5=>{"use strict";k5.startOfYear=cye;var lye=$();function cye(n,t){let e=(0,lye.toDate)(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}});var S5=D(w5=>{"use strict";w5.eachWeekendOfYear=mye;var dye=mk(),uye=jP(),pye=hk();function mye(n,t){let e=(0,pye.startOfYear)(n,t),r=(0,uye.endOfYear)(n,t);return(0,dye.eachWeekendOfInterval)({start:e,end:r},t)}});var E5=D(D5=>{"use strict";D5.eachYearOfInterval=gye;var hye=Vi(),fye=ke();function gye(n,t){var c;let{start:e,end:r}=(0,hye.normalizeInterval)(t==null?void 0:t.in,n),a=+e>+r,i=a?+e:+r,s=a?r:e;s.setHours(0,0,0,0),s.setMonth(0,1);let o=(c=t==null?void 0:t.step)!=null?c:1;if(!o)return[];o<0&&(o=-o,a=!a);let l=[];for(;+s<=i;)l.push((0,fye.constructFrom)(e,s)),s.setFullYear(s.getFullYear()+o);return a?l.reverse():l}});var C5=D(x5=>{"use strict";x5.endOfDecade=vye;var yye=$();function vye(n,t){let e=(0,yye.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=9+Math.floor(r/10)*10;return e.setFullYear(a,11,31),e.setHours(23,59,59,999),e}});var M5=D(P5=>{"use strict";P5.endOfHour=Tye;var bye=$();function Tye(n,t){let e=(0,bye.toDate)(n,t==null?void 0:t.in);return e.setMinutes(59,59,999),e}});var HP=D(A5=>{"use strict";A5.endOfWeek=Sye;var kye=tn(),wye=$();function Sye(n,t){var o,l,c,d,u,p,m,h;let e=(0,kye.getDefaultOptions)(),r=(h=(m=(d=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:e.weekStartsOn)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:0,a=(0,wye.toDate)(n,t==null?void 0:t.in),i=a.getDay(),s=(i{"use strict";I5.endOfISOWeek=Eye;var Dye=HP();function Eye(n,t){return(0,Dye.endOfWeek)(n,{...t,weekStartsOn:1})}});var R5=D(N5=>{"use strict";N5.endOfISOWeekYear=Mye;var xye=ke(),Cye=$o(),Pye=qi();function Mye(n,t){let e=(0,Cye.getISOWeekYear)(n,t),r=(0,xye.constructFrom)((t==null?void 0:t.in)||n,0);r.setFullYear(e+1,0,4),r.setHours(0,0,0,0);let a=(0,Pye.startOfISOWeek)(r,t);return a.setMilliseconds(a.getMilliseconds()-1),a}});var O5=D(F5=>{"use strict";F5.endOfMinute=Iye;var Aye=$();function Iye(n,t){let e=(0,Aye.toDate)(n,t==null?void 0:t.in);return e.setSeconds(59,999),e}});var B5=D(L5=>{"use strict";L5.endOfQuarter=Nye;var _ye=$();function Nye(n,t){let e=(0,_ye.toDate)(n,t==null?void 0:t.in),r=e.getMonth(),a=r-r%3+3;return e.setMonth(a,0),e.setHours(23,59,59,999),e}});var H5=D(j5=>{"use strict";j5.endOfSecond=Fye;var Rye=$();function Fye(n,t){let e=(0,Rye.toDate)(n,t==null?void 0:t.in);return e.setMilliseconds(999),e}});var U5=D(z5=>{"use strict";z5.endOfToday=Lye;var Oye=lk();function Lye(n){return(0,Oye.endOfDay)(Date.now(),n)}});var V5=D(q5=>{"use strict";q5.endOfTomorrow=Bye;var W5=br();function Bye(n){let t=(0,W5.constructNow)(n==null?void 0:n.in),e=t.getFullYear(),r=t.getMonth(),a=t.getDate(),i=(0,W5.constructNow)(n==null?void 0:n.in);return i.setFullYear(e,r,a+1),i.setHours(23,59,59,999),n!=null&&n.in?n.in(i):i}});var Y5=D($5=>{"use strict";$5.endOfYesterday=zye;var jye=ke(),Hye=br();function zye(n){let t=(0,Hye.constructNow)(n==null?void 0:n.in),e=(0,jye.constructFrom)(n==null?void 0:n.in,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()-1),e.setHours(23,59,59,999),e}});var G5=D(zP=>{"use strict";zP.formatDistance=void 0;var Uye={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"}},Wye=(n,t,e)=>{let r,a=Uye[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};zP.formatDistance=Wye});var Q5=D(K5=>{"use strict";K5.buildFormatLongFn=qye;function qye(n){return(t={})=>{let e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}});var Z5=D(WP=>{"use strict";WP.formatLong=void 0;var UP=Q5(),Vye={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$ye={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yye={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jst=WP.formatLong={date:(0,UP.buildFormatLongFn)({formats:Vye,defaultWidth:"full"}),time:(0,UP.buildFormatLongFn)({formats:$ye,defaultWidth:"full"}),dateTime:(0,UP.buildFormatLongFn)({formats:Yye,defaultWidth:"full"})}});var J5=D(qP=>{"use strict";qP.formatRelative=void 0;var Gye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Kye=(n,t,e,r)=>Gye[n];qP.formatRelative=Kye});var eK=D(X5=>{"use strict";X5.buildLocalizeFn=Qye;function Qye(n){return(t,e)=>{let r=e!=null&&e.context?String(e.context):"standalone",a;if(r==="formatting"&&n.formattingValues){let s=n.defaultFormattingWidth||n.defaultWidth,o=e!=null&&e.width?String(e.width):s;a=n.formattingValues[o]||n.formattingValues[s]}else{let s=n.defaultWidth,o=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[o]||n.values[s]}let i=n.argumentCallback?n.argumentCallback(t):t;return a[i]}}});var tK=D(VP=>{"use strict";VP.localize=void 0;var fg=eK(),Zye={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jye={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xye={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"]},eve={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"]},tve={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"}},rve={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"}},nve=(n,t)=>{let e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},rot=VP.localize={ordinalNumber:nve,era:(0,fg.buildLocalizeFn)({values:Zye,defaultWidth:"wide"}),quarter:(0,fg.buildLocalizeFn)({values:Jye,defaultWidth:"wide",argumentCallback:n=>n-1}),month:(0,fg.buildLocalizeFn)({values:Xye,defaultWidth:"wide"}),day:(0,fg.buildLocalizeFn)({values:eve,defaultWidth:"wide"}),dayPeriod:(0,fg.buildLocalizeFn)({values:tve,defaultWidth:"wide",formattingValues:rve,defaultFormattingWidth:"wide"})}});var nK=D(rK=>{"use strict";rK.buildMatchFn=ave;function ave(n){return(t,e={})=>{let r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],i=t.match(a);if(!i)return null;let s=i[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?sve(o,u=>u.test(s)):ive(o,u=>u.test(s)),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;let d=t.slice(s.length);return{value:c,rest:d}}}function ive(n,t){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function sve(n,t){for(let e=0;e{"use strict";aK.buildMatchPatternFn=ove;function ove(n){return(t,e={})=>{let r=t.match(n.matchPattern);if(!r)return null;let a=r[0],i=t.match(n.parsePattern);if(!i)return null;let s=n.valueCallback?n.valueCallback(i[0]):i[0];s=e.valueCallback?e.valueCallback(s):s;let o=t.slice(a.length);return{value:s,rest:o}}}});var sK=D($P=>{"use strict";$P.match=void 0;var gg=nK(),lve=iK(),cve=/^(\d+)(th|st|nd|rd)?/i,dve=/\d+/i,uve={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},pve={any:[/^b/i,/^(a|c)/i]},mve={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hve={any:[/1/i,/2/i,/3/i,/4/i]},fve={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},gve={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]},yve={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},vve={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]},bve={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},Tve={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}},sot=$P.match={ordinalNumber:(0,lve.buildMatchPatternFn)({matchPattern:cve,parsePattern:dve,valueCallback:n=>parseInt(n,10)}),era:(0,gg.buildMatchFn)({matchPatterns:uve,defaultMatchWidth:"wide",parsePatterns:pve,defaultParseWidth:"any"}),quarter:(0,gg.buildMatchFn)({matchPatterns:mve,defaultMatchWidth:"wide",parsePatterns:hve,defaultParseWidth:"any",valueCallback:n=>n+1}),month:(0,gg.buildMatchFn)({matchPatterns:fve,defaultMatchWidth:"wide",parsePatterns:gve,defaultParseWidth:"any"}),day:(0,gg.buildMatchFn)({matchPatterns:yve,defaultMatchWidth:"wide",parsePatterns:vve,defaultParseWidth:"any"}),dayPeriod:(0,gg.buildMatchFn)({matchPatterns:bve,defaultMatchWidth:"any",parsePatterns:Tve,defaultParseWidth:"any"})}});var oK=D(YP=>{"use strict";YP.enUS=void 0;var kve=G5(),wve=Z5(),Sve=J5(),Dve=tK(),Eve=sK(),lot=YP.enUS={code:"en-US",formatDistance:kve.formatDistance,formatLong:wve.formatLong,formatRelative:Sve.formatRelative,localize:Dve.localize,match:Eve.match,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var Lc=D(lK=>{"use strict";Object.defineProperty(lK,"defaultLocale",{enumerable:!0,get:function(){return xve.enUS}});var xve=oK()});var GP=D(cK=>{"use strict";cK.getDayOfYear=Ave;var Cve=qs(),Pve=hk(),Mve=$();function Ave(n,t){let e=(0,Mve.toDate)(n,t==null?void 0:t.in);return(0,Cve.differenceInCalendarDays)(e,(0,Pve.startOfYear)(e))+1}});var fk=D(dK=>{"use strict";dK.getISOWeek=Fve;var Ive=ze(),_ve=qi(),Nve=zu(),Rve=$();function Fve(n,t){let e=(0,Rve.toDate)(n,t==null?void 0:t.in),r=+(0,_ve.startOfISOWeek)(e)-+(0,Nve.startOfISOWeekYear)(e);return Math.round(r/Ive.millisecondsInWeek)+1}});var yg=D(mK=>{"use strict";mK.getWeekYear=Bve;var Ove=tn(),uK=ke(),pK=ci(),Lve=$();function Bve(n,t){var d,u,p,m,h,f,g,v;let e=(0,Lve.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=(0,Ove.getDefaultOptions)(),i=(v=(g=(m=(p=t==null?void 0:t.firstWeekContainsDate)!=null?p:(u=(d=t==null?void 0:t.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?v:1,s=(0,uK.constructFrom)((t==null?void 0:t.in)||n,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let o=(0,pK.startOfWeek)(s,t),l=(0,uK.constructFrom)((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);let c=(0,pK.startOfWeek)(l,t);return+e>=+o?r+1:+e>=+c?r:r-1}});var gk=D(hK=>{"use strict";hK.startOfWeekYear=Wve;var jve=tn(),Hve=ke(),zve=yg(),Uve=ci();function Wve(n,t){var o,l,c,d,u,p,m,h;let e=(0,jve.getDefaultOptions)(),r=(h=(m=(d=(c=t==null?void 0:t.firstWeekContainsDate)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)!=null?d:e.firstWeekContainsDate)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)!=null?h:1,a=(0,zve.getWeekYear)(n,t),i=(0,Hve.constructFrom)((t==null?void 0:t.in)||n,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),(0,Uve.startOfWeek)(i,t)}});var yk=D(fK=>{"use strict";fK.getWeek=Gve;var qve=ze(),Vve=ci(),$ve=gk(),Yve=$();function Gve(n,t){let e=(0,Yve.toDate)(n,t==null?void 0:t.in),r=+(0,Vve.startOfWeek)(e,t)-+(0,$ve.startOfWeekYear)(e,t);return Math.round(r/qve.millisecondsInWeek)+1}});var Bc=D(gK=>{"use strict";gK.addLeadingZeros=Kve;function Kve(n,t){let e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}});var QP=D(KP=>{"use strict";KP.lightFormatters=void 0;var Yo=Bc(),yot=KP.lightFormatters={y(n,t){let e=n.getFullYear(),r=e>0?e:1-e;return(0,Yo.addLeadingZeros)(t==="yy"?r%100:r,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):(0,Yo.addLeadingZeros)(e+1,2)},d(n,t){return(0,Yo.addLeadingZeros)(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return(0,Yo.addLeadingZeros)(n.getHours()%12||12,t.length)},H(n,t){return(0,Yo.addLeadingZeros)(n.getHours(),t.length)},m(n,t){return(0,Yo.addLeadingZeros)(n.getMinutes(),t.length)},s(n,t){return(0,Yo.addLeadingZeros)(n.getSeconds(),t.length)},S(n,t){let e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return(0,Yo.addLeadingZeros)(a,t.length)}}});var bK=D(ZP=>{"use strict";ZP.formatters=void 0;var Qve=GP(),Zve=fk(),Jve=$o(),Xve=yk(),ebe=yg(),Xt=Bc(),Go=QP(),Wu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bot=ZP.formatters={G:function(n,t,e){let r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return Go.lightFormatters.y(n,t)},Y:function(n,t,e,r){let a=(0,ebe.getWeekYear)(n,r),i=a>0?a:1-a;if(t==="YY"){let s=i%100;return(0,Xt.addLeadingZeros)(s,2)}return t==="Yo"?e.ordinalNumber(i,{unit:"year"}):(0,Xt.addLeadingZeros)(i,t.length)},R:function(n,t){let e=(0,Jve.getISOWeekYear)(n);return(0,Xt.addLeadingZeros)(e,t.length)},u:function(n,t){let e=n.getFullYear();return(0,Xt.addLeadingZeros)(e,t.length)},Q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return(0,Xt.addLeadingZeros)(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return(0,Xt.addLeadingZeros)(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){let r=n.getMonth();switch(t){case"M":case"MM":return Go.lightFormatters.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){let r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return(0,Xt.addLeadingZeros)(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){let a=(0,Xve.getWeek)(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):(0,Xt.addLeadingZeros)(a,t.length)},I:function(n,t,e){let r=(0,Zve.getISOWeek)(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):(0,Xt.addLeadingZeros)(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Go.lightFormatters.d(n,t)},D:function(n,t,e){let r=(0,Qve.getDayOfYear)(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):(0,Xt.addLeadingZeros)(r,t.length)},E:function(n,t,e){let r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return(0,Xt.addLeadingZeros)(i,2);case"eo":return e.ordinalNumber(i,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return(0,Xt.addLeadingZeros)(i,t.length);case"co":return e.ordinalNumber(i,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){let r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return(0,Xt.addLeadingZeros)(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){let a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){let r=n.getHours(),a;switch(r===12?a=Wu.noon:r===0?a=Wu.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){let r=n.getHours(),a;switch(r>=17?a=Wu.evening:r>=12?a=Wu.afternoon:r>=4?a=Wu.morning:a=Wu.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Go.lightFormatters.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Go.lightFormatters.H(n,t)},K:function(n,t,e){let r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):(0,Xt.addLeadingZeros)(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):(0,Xt.addLeadingZeros)(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Go.lightFormatters.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Go.lightFormatters.s(n,t)},S:function(n,t){return Go.lightFormatters.S(n,t)},X:function(n,t,e){let r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vK(r);case"XXXX":case"XX":return jc(r);case"XXXXX":case"XXX":default:return jc(r,":")}},x:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"x":return vK(r);case"xxxx":case"xx":return jc(r);case"xxxxx":case"xxx":default:return jc(r,":")}},O:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yK(r,":");case"OOOO":default:return"GMT"+jc(r,":")}},z:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yK(r,":");case"zzzz":default:return"GMT"+jc(r,":")}},t:function(n,t,e){let r=Math.trunc(+n/1e3);return(0,Xt.addLeadingZeros)(r,t.length)},T:function(n,t,e){return(0,Xt.addLeadingZeros)(+n,t.length)}};function yK(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),i=r%60;return i===0?e+String(a):e+String(a)+t+(0,Xt.addLeadingZeros)(i,2)}function vK(n,t){return n%60===0?(n>0?"-":"+")+(0,Xt.addLeadingZeros)(Math.abs(n)/60,2):jc(n,t)}function jc(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=(0,Xt.addLeadingZeros)(Math.trunc(r/60),2),i=(0,Xt.addLeadingZeros)(r%60,2);return e+a+t+i}});var XP=D(JP=>{"use strict";JP.longFormatters=void 0;var TK=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kK=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},tbe=(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return TK(n,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",TK(r,t)).replace("{{time}}",kK(a,t))},kot=JP.longFormatters={p:kK,P:tbe}});var e0=D(vk=>{"use strict";vk.isProtectedDayOfYearToken=ibe;vk.isProtectedWeekYearToken=sbe;vk.warnOrThrowProtectedError=obe;var rbe=/^D+$/,nbe=/^Y+$/,abe=["D","DD","YY","YYYY"];function ibe(n){return rbe.test(n)}function sbe(n){return nbe.test(n)}function obe(n,t,e){let r=lbe(n,t,e);if(console.warn(r),abe.includes(n))throw new RangeError(r)}function lbe(n,t,e){let r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}});var n0=D(vg=>{"use strict";vg.format=vg.formatDate=vbe;Object.defineProperty(vg,"formatters",{enumerable:!0,get:function(){return r0.formatters}});Object.defineProperty(vg,"longFormatters",{enumerable:!0,get:function(){return wK.longFormatters}});var cbe=Lc(),dbe=tn(),r0=bK(),wK=XP(),t0=e0(),ube=Vs(),pbe=$(),mbe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hbe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fbe=/^'([^]*?)'?$/,gbe=/''/g,ybe=/[a-zA-Z]/;function vbe(n,t,e){var d,u,p,m,h,f,g,v,T,k,w,S,x,I,A,B,z,U;let r=(0,dbe.getDefaultOptions)(),a=(u=(d=e==null?void 0:e.locale)!=null?d:r.locale)!=null?u:cbe.defaultLocale,i=(k=(T=(f=(h=e==null?void 0:e.firstWeekContainsDate)!=null?h:(m=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:r.firstWeekContainsDate)!=null?T:(v=(g=r.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)!=null?k:1,s=(U=(z=(I=(x=e==null?void 0:e.weekStartsOn)!=null?x:(S=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:S.weekStartsOn)!=null?I:r.weekStartsOn)!=null?z:(B=(A=r.locale)==null?void 0:A.options)==null?void 0:B.weekStartsOn)!=null?U:0,o=(0,pbe.toDate)(n,e==null?void 0:e.in);if(!(0,ube.isValid)(o))throw new RangeError("Invalid time value");let l=t.match(hbe).map(N=>{let P=N[0];if(P==="p"||P==="P"){let _=wK.longFormatters[P];return _(N,a.formatLong)}return N}).join("").match(mbe).map(N=>{if(N==="''")return{isToken:!1,value:"'"};let P=N[0];if(P==="'")return{isToken:!1,value:bbe(N)};if(r0.formatters[P])return{isToken:!0,value:N};if(P.match(ybe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return{isToken:!1,value:N}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));let c={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return l.map(N=>{if(!N.isToken)return N.value;let P=N.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&(0,t0.isProtectedWeekYearToken)(P)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&(0,t0.isProtectedDayOfYearToken)(P))&&(0,t0.warnOrThrowProtectedError)(P,t,String(n));let _=r0.formatters[P[0]];return _(o,P,a.localize,c)}).join("")}function bbe(n){let t=n.match(fbe);return t?t[1].replace(gbe,"'"):n}});var a0=D(DK=>{"use strict";DK.formatDistance=xbe;var Tbe=Lc(),kbe=tn(),SK=Ws(),wbe=wt(),Sbe=Oc(),qu=ze(),Dbe=pg(),Ebe=mg();function xbe(n,t,e){var h,f;let r=(0,kbe.getDefaultOptions)(),a=(f=(h=e==null?void 0:e.locale)!=null?h:r.locale)!=null?f:Tbe.defaultLocale,i=2520,s=(0,Sbe.compareAsc)(n,t);if(isNaN(s))throw new RangeError("Invalid time value");let o=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:s}),[l,c]=(0,wbe.normalizeDates)(e==null?void 0:e.in,...s>0?[t,n]:[n,t]),d=(0,Ebe.differenceInSeconds)(c,l),u=((0,SK.getTimezoneOffsetInMilliseconds)(c)-(0,SK.getTimezoneOffsetInMilliseconds)(l))/1e3,p=Math.round((d-u)/60),m;if(p<2)return e!=null&&e.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";xK.formatDistanceStrict=_be;var Cbe=Lc(),Pbe=tn(),Mbe=$s(),EK=Ws(),Abe=wt(),Ibe=Oc(),Ko=ze();function _be(n,t,e){var g,v,T;let r=(0,Pbe.getDefaultOptions)(),a=(v=(g=e==null?void 0:e.locale)!=null?g:r.locale)!=null?v:Cbe.defaultLocale,i=(0,Ibe.compareAsc)(n,t);if(isNaN(i))throw new RangeError("Invalid time value");let s=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:i}),[o,l]=(0,Abe.normalizeDates)(e==null?void 0:e.in,...i>0?[t,n]:[n,t]),c=(0,Mbe.getRoundingMethod)((T=e==null?void 0:e.roundingMethod)!=null?T:"round"),d=l.getTime()-o.getTime(),u=d/Ko.millisecondsInMinute,p=(0,EK.getTimezoneOffsetInMilliseconds)(l)-(0,EK.getTimezoneOffsetInMilliseconds)(o),m=(d-p)/Ko.millisecondsInMinute,h=e==null?void 0:e.unit,f;if(h?f=h:u<1?f="second":u<60?f="minute":u{"use strict";CK.formatDistanceToNow=Fbe;var Nbe=br(),Rbe=a0();function Fbe(n,t){return(0,Rbe.formatDistance)(n,(0,Nbe.constructNow)(n),t)}});var AK=D(MK=>{"use strict";MK.formatDistanceToNowStrict=Bbe;var Obe=br(),Lbe=i0();function Bbe(n,t){return(0,Lbe.formatDistanceStrict)(n,(0,Obe.constructNow)(n),t)}});var _K=D(IK=>{"use strict";IK.formatDuration=Ube;var jbe=Lc(),Hbe=tn(),zbe=["years","months","weeks","days","hours","minutes","seconds"];function Ube(n,t){var l,c,d,u,p;let e=(0,Hbe.getDefaultOptions)(),r=(c=(l=t==null?void 0:t.locale)!=null?l:e.locale)!=null?c:jbe.defaultLocale,a=(d=t==null?void 0:t.format)!=null?d:zbe,i=(u=t==null?void 0:t.zero)!=null?u:!1,s=(p=t==null?void 0:t.delimiter)!=null?p:" ";return r.formatDistance?a.reduce((m,h)=>{let f=`x${h.replace(/(^.)/,v=>v.toUpperCase())}`,g=n[h];return g!==void 0&&(i||n[h])?m.concat(r.formatDistance(f,g)):m},[]).join(s):""}});var RK=D(NK=>{"use strict";NK.formatISO=qbe;var Qo=Bc(),Wbe=$();function qbe(n,t){var c,d;let e=(0,Wbe.toDate)(n,t==null?void 0:t.in);if(isNaN(+e))throw new RangeError("Invalid time value");let r=(c=t==null?void 0:t.format)!=null?c:"extended",a=(d=t==null?void 0:t.representation)!=null?d:"complete",i="",s="",o=r==="extended"?"-":"",l=r==="extended"?":":"";if(a!=="time"){let u=(0,Qo.addLeadingZeros)(e.getDate(),2),p=(0,Qo.addLeadingZeros)(e.getMonth()+1,2);i=`${(0,Qo.addLeadingZeros)(e.getFullYear(),4)}${o}${p}${o}${u}`}if(a!=="date"){let u=e.getTimezoneOffset();if(u!==0){let v=Math.abs(u),T=(0,Qo.addLeadingZeros)(Math.trunc(v/60),2),k=(0,Qo.addLeadingZeros)(v%60,2);s=`${u<0?"+":"-"}${T}:${k}`}else s="Z";let p=(0,Qo.addLeadingZeros)(e.getHours(),2),m=(0,Qo.addLeadingZeros)(e.getMinutes(),2),h=(0,Qo.addLeadingZeros)(e.getSeconds(),2),f=i===""?"":"T",g=[p,m,h].join(l);i=`${i}${f}${g}${s}`}return i}});var OK=D(FK=>{"use strict";FK.formatISO9075=Ybe;var Vu=Bc(),Vbe=Vs(),$be=$();function Ybe(n,t){var l,c;let e=(0,$be.toDate)(n,t==null?void 0:t.in);if(!(0,Vbe.isValid)(e))throw new RangeError("Invalid time value");let r=(l=t==null?void 0:t.format)!=null?l:"extended",a=(c=t==null?void 0:t.representation)!=null?c:"complete",i="",s=r==="extended"?"-":"",o=r==="extended"?":":"";if(a!=="time"){let d=(0,Vu.addLeadingZeros)(e.getDate(),2),u=(0,Vu.addLeadingZeros)(e.getMonth()+1,2);i=`${(0,Vu.addLeadingZeros)(e.getFullYear(),4)}${s}${u}${s}${d}`}if(a!=="date"){let d=(0,Vu.addLeadingZeros)(e.getHours(),2),u=(0,Vu.addLeadingZeros)(e.getMinutes(),2),p=(0,Vu.addLeadingZeros)(e.getSeconds(),2);i=`${i}${i===""?"":" "}${d}${o}${u}${o}${p}`}return i}});var BK=D(LK=>{"use strict";LK.formatISODuration=Gbe;function Gbe(n){let{years:t=0,months:e=0,days:r=0,hours:a=0,minutes:i=0,seconds:s=0}=n;return`P${t}Y${e}M${r}DT${a}H${i}M${s}S`}});var HK=D(jK=>{"use strict";jK.formatRFC3339=Zbe;var Zo=Bc(),Kbe=Vs(),Qbe=$();function Zbe(n,t){var m;let e=(0,Qbe.toDate)(n,t==null?void 0:t.in);if(!(0,Kbe.isValid)(e))throw new RangeError("Invalid time value");let r=(m=t==null?void 0:t.fractionDigits)!=null?m:0,a=(0,Zo.addLeadingZeros)(e.getDate(),2),i=(0,Zo.addLeadingZeros)(e.getMonth()+1,2),s=e.getFullYear(),o=(0,Zo.addLeadingZeros)(e.getHours(),2),l=(0,Zo.addLeadingZeros)(e.getMinutes(),2),c=(0,Zo.addLeadingZeros)(e.getSeconds(),2),d="";if(r>0){let h=e.getMilliseconds(),f=Math.trunc(h*Math.pow(10,r-3));d="."+(0,Zo.addLeadingZeros)(f,r)}let u="",p=e.getTimezoneOffset();if(p!==0){let h=Math.abs(p),f=(0,Zo.addLeadingZeros)(Math.trunc(h/60),2),g=(0,Zo.addLeadingZeros)(h%60,2);u=`${p<0?"+":"-"}${f}:${g}`}else u="Z";return`${s}-${i}-${a}T${o}:${l}:${c}${d}${u}`}});var UK=D(zK=>{"use strict";zK.formatRFC7231=rTe;var bk=Bc(),Jbe=Vs(),Xbe=$(),eTe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],tTe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rTe(n){let t=(0,Xbe.toDate)(n);if(!(0,Jbe.isValid)(t))throw new RangeError("Invalid time value");let e=eTe[t.getUTCDay()],r=(0,bk.addLeadingZeros)(t.getUTCDate(),2),a=tTe[t.getUTCMonth()],i=t.getUTCFullYear(),s=(0,bk.addLeadingZeros)(t.getUTCHours(),2),o=(0,bk.addLeadingZeros)(t.getUTCMinutes(),2),l=(0,bk.addLeadingZeros)(t.getUTCSeconds(),2);return`${e}, ${r} ${a} ${i} ${s}:${o}:${l} GMT`}});var qK=D(WK=>{"use strict";WK.formatRelative=lTe;var nTe=Lc(),aTe=tn(),iTe=wt(),sTe=qs(),oTe=n0();function lTe(n,t,e){var u,p,m,h,f,g,v,T,k,w;let[r,a]=(0,iTe.normalizeDates)(e==null?void 0:e.in,n,t),i=(0,aTe.getDefaultOptions)(),s=(p=(u=e==null?void 0:e.locale)!=null?u:i.locale)!=null?p:nTe.defaultLocale,o=(w=(k=(g=(f=e==null?void 0:e.weekStartsOn)!=null?f:(h=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:h.weekStartsOn)!=null?g:i.weekStartsOn)!=null?k:(T=(v=i.locale)==null?void 0:v.options)==null?void 0:T.weekStartsOn)!=null?w:0,l=(0,sTe.differenceInCalendarDays)(r,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=s.formatRelative(c,r,a,{locale:s,weekStartsOn:o});return(0,oTe.format)(r,d,{locale:s,weekStartsOn:o})}});var $K=D(VK=>{"use strict";VK.fromUnixTime=dTe;var cTe=$();function dTe(n,t){return(0,cTe.toDate)(n*1e3,t==null?void 0:t.in)}});var s0=D(YK=>{"use strict";YK.getDate=pTe;var uTe=$();function pTe(n,t){return(0,uTe.toDate)(n,t==null?void 0:t.in).getDate()}});var bg=D(GK=>{"use strict";GK.getDay=hTe;var mTe=$();function hTe(n,t){return(0,mTe.toDate)(n,t==null?void 0:t.in).getDay()}});var o0=D(KK=>{"use strict";KK.getDaysInMonth=yTe;var fTe=ke(),gTe=$();function yTe(n,t){let e=(0,gTe.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=e.getMonth(),i=(0,fTe.constructFrom)(e,0);return i.setFullYear(r,a+1,0),i.setHours(0,0,0,0),i.getDate()}});var l0=D(QK=>{"use strict";QK.isLeapYear=bTe;var vTe=$();function bTe(n,t){let r=(0,vTe.toDate)(n,t==null?void 0:t.in).getFullYear();return r%400===0||r%4===0&&r%100!==0}});var JK=D(ZK=>{"use strict";ZK.getDaysInYear=wTe;var TTe=l0(),kTe=$();function wTe(n,t){let e=(0,kTe.toDate)(n,t==null?void 0:t.in);return Number.isNaN(+e)?NaN:(0,TTe.isLeapYear)(e)?366:365}});var e8=D(XK=>{"use strict";XK.getDecade=DTe;var STe=$();function DTe(n,t){let r=(0,STe.toDate)(n,t==null?void 0:t.in).getFullYear();return Math.floor(r/10)*10}});var c0=D(t8=>{"use strict";t8.getDefaultOptions=xTe;var ETe=tn();function xTe(){return Object.assign({},(0,ETe.getDefaultOptions)())}});var n8=D(r8=>{"use strict";r8.getHours=PTe;var CTe=$();function PTe(n,t){return(0,CTe.toDate)(n,t==null?void 0:t.in).getHours()}});var d0=D(a8=>{"use strict";a8.getISODay=ATe;var MTe=$();function ATe(n,t){let e=(0,MTe.toDate)(n,t==null?void 0:t.in).getDay();return e===0?7:e}});var o8=D(s8=>{"use strict";s8.getISOWeeksInYear=NTe;var ITe=ug(),_Te=ze(),i8=zu();function NTe(n,t){let e=(0,i8.startOfISOWeekYear)(n,t),a=+(0,i8.startOfISOWeekYear)((0,ITe.addWeeks)(e,60))-+e;return Math.round(a/_Te.millisecondsInWeek)}});var c8=D(l8=>{"use strict";l8.getMilliseconds=FTe;var RTe=$();function FTe(n){return(0,RTe.toDate)(n).getMilliseconds()}});var u8=D(d8=>{"use strict";d8.getMinutes=LTe;var OTe=$();function LTe(n,t){return(0,OTe.toDate)(n,t==null?void 0:t.in).getMinutes()}});var m8=D(p8=>{"use strict";p8.getMonth=jTe;var BTe=$();function jTe(n,t){return(0,BTe.toDate)(n,t==null?void 0:t.in).getMonth()}});var g8=D(f8=>{"use strict";f8.getOverlappingDaysInIntervals=zTe;var h8=Ws(),HTe=ze(),Tk=$();function zTe(n,t){let[e,r]=[+(0,Tk.toDate)(n.start),+(0,Tk.toDate)(n.end)].sort((u,p)=>u-p),[a,i]=[+(0,Tk.toDate)(t.start),+(0,Tk.toDate)(t.end)].sort((u,p)=>u-p);if(!(er?r:i,d=c-(0,h8.getTimezoneOffsetInMilliseconds)(c);return Math.ceil((d-l)/HTe.millisecondsInDay)}});var v8=D(y8=>{"use strict";y8.getSeconds=WTe;var UTe=$();function WTe(n){return(0,UTe.toDate)(n).getSeconds()}});var T8=D(b8=>{"use strict";b8.getTime=VTe;var qTe=$();function VTe(n){return+(0,qTe.toDate)(n)}});var w8=D(k8=>{"use strict";k8.getUnixTime=YTe;var $Te=$();function YTe(n){return Math.trunc(+(0,$Te.toDate)(n)/1e3)}});var D8=D(S8=>{"use strict";S8.getWeekOfMonth=XTe;var GTe=tn(),KTe=s0(),QTe=bg(),ZTe=hg(),JTe=$();function XTe(n,t){var l,c,d,u,p,m,h,f;let e=(0,GTe.getDefaultOptions)(),r=(f=(h=(u=(d=t==null?void 0:t.weekStartsOn)!=null?d:(c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)!=null?u:e.weekStartsOn)!=null?h:(m=(p=e.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)!=null?f:0,a=(0,KTe.getDate)((0,JTe.toDate)(n,t==null?void 0:t.in));if(isNaN(a))return NaN;let i=(0,QTe.getDay)((0,ZTe.startOfMonth)(n,t)),s=r-i;s<=0&&(s+=7);let o=a-s;return Math.ceil(o/7)+1}});var u0=D(x8=>{"use strict";x8.lastDayOfMonth=eke;var E8=$();function eke(n,t){let e=(0,E8.toDate)(n,t==null?void 0:t.in),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(0,0,0,0),(0,E8.toDate)(e,t==null?void 0:t.in)}});var P8=D(C8=>{"use strict";C8.getWeeksInMonth=ike;var tke=rk(),rke=u0(),nke=hg(),ake=$();function ike(n,t){let e=(0,ake.toDate)(n,t==null?void 0:t.in);return(0,tke.differenceInCalendarWeeks)((0,rke.lastDayOfMonth)(e,t),(0,nke.startOfMonth)(e,t),t)+1}});var A8=D(M8=>{"use strict";M8.getYear=oke;var ske=$();function oke(n,t){return(0,ske.toDate)(n,t==null?void 0:t.in).getFullYear()}});var _8=D(I8=>{"use strict";I8.hoursToMilliseconds=cke;var lke=ze();function cke(n){return Math.trunc(n*lke.millisecondsInHour)}});var R8=D(N8=>{"use strict";N8.hoursToMinutes=uke;var dke=ze();function uke(n){return Math.trunc(n*dke.minutesInHour)}});var O8=D(F8=>{"use strict";F8.hoursToSeconds=mke;var pke=ze();function mke(n){return Math.trunc(n*pke.secondsInHour)}});var B8=D(L8=>{"use strict";L8.interval=fke;var hke=wt();function fke(n,t,e){let[r,a]=(0,hke.normalizeDates)(e==null?void 0:e.in,n,t);if(isNaN(+r))throw new TypeError("Start date is invalid");if(isNaN(+a))throw new TypeError("End date is invalid");if(e!=null&&e.assertPositive&&+r>+a)throw new TypeError("End date must be after start date");return{start:r,end:a}}});var H8=D(j8=>{"use strict";j8.intervalToDuration=Ske;var gke=Vi(),Tg=gP(),yke=ak(),vke=ik(),bke=ok(),Tke=pg(),kke=mg(),wke=LP();function Ske(n,t){let{start:e,end:r}=(0,gke.normalizeInterval)(t==null?void 0:t.in,n),a={},i=(0,wke.differenceInYears)(r,e);i&&(a.years=i);let s=(0,Tg.add)(e,{years:a.years}),o=(0,Tke.differenceInMonths)(r,s);o&&(a.months=o);let l=(0,Tg.add)(s,{months:a.months}),c=(0,yke.differenceInDays)(r,l);c&&(a.days=c);let d=(0,Tg.add)(l,{days:a.days}),u=(0,vke.differenceInHours)(r,d);u&&(a.hours=u);let p=(0,Tg.add)(d,{hours:a.hours}),m=(0,bke.differenceInMinutes)(r,p);m&&(a.minutes=m);let h=(0,Tg.add)(p,{minutes:a.minutes}),f=(0,kke.differenceInSeconds)(r,h);return f&&(a.seconds=f),a}});var U8=D(z8=>{"use strict";z8.intlFormat=Eke;var Dke=$();function Eke(n,t,e){let r;return xke(t)?r=t:e=t,new Intl.DateTimeFormat(e==null?void 0:e.locale,r).format((0,Dke.toDate)(n))}function xke(n){return n!==void 0&&!("locale"in n)}});var G8=D(Y8=>{"use strict";Y8.intlFormatDistance=Pke;var Cke=wt(),Hc=ze(),p0=qs(),W8=tk(),m0=NP(),q8=rk(),h0=nk(),V8=ik(),$8=ok(),f0=mg();function Pke(n,t,e){let r=0,a,[i,s]=(0,Cke.normalizeDates)(e==null?void 0:e.in,n,t);if(e!=null&&e.unit)a=e==null?void 0:e.unit,a==="second"?r=(0,f0.differenceInSeconds)(i,s):a==="minute"?r=(0,$8.differenceInMinutes)(i,s):a==="hour"?r=(0,V8.differenceInHours)(i,s):a==="day"?r=(0,p0.differenceInCalendarDays)(i,s):a==="week"?r=(0,q8.differenceInCalendarWeeks)(i,s):a==="month"?r=(0,W8.differenceInCalendarMonths)(i,s):a==="quarter"?r=(0,m0.differenceInCalendarQuarters)(i,s):a==="year"&&(r=(0,h0.differenceInCalendarYears)(i,s));else{let l=(0,f0.differenceInSeconds)(i,s);Math.abs(l){"use strict";Q8.isAfter=Mke;var K8=$();function Mke(n,t){return+(0,K8.toDate)(n)>+(0,K8.toDate)(t)}});var e9=D(X8=>{"use strict";X8.isBefore=Ake;var J8=$();function Ake(n,t){return+(0,J8.toDate)(n)<+(0,J8.toDate)(t)}});var n9=D(r9=>{"use strict";r9.isEqual=Ike;var t9=$();function Ike(n,t){return+(0,t9.toDate)(n)==+(0,t9.toDate)(t)}});var i9=D(a9=>{"use strict";a9.isExists=_ke;function _ke(n,t,e){let r=new Date(n,t,e);return r.getFullYear()===n&&r.getMonth()===t&&r.getDate()===e}});var o9=D(s9=>{"use strict";s9.isFirstDayOfMonth=Rke;var Nke=$();function Rke(n,t){return(0,Nke.toDate)(n,t==null?void 0:t.in).getDate()===1}});var c9=D(l9=>{"use strict";l9.isFriday=Oke;var Fke=$();function Oke(n,t){return(0,Fke.toDate)(n,t==null?void 0:t.in).getDay()===5}});var u9=D(d9=>{"use strict";d9.isFuture=Bke;var Lke=$();function Bke(n){return+(0,Lke.toDate)(n)>Date.now()}});var g0=D(p9=>{"use strict";p9.transpose=Hke;var jke=ke();function Hke(n,t){let e=zke(t)?new t(0):(0,jke.constructFrom)(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function zke(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}});var b0=D(zc=>{"use strict";zc.ValueSetter=zc.Setter=zc.DateTimezoneSetter=void 0;var m9=ke(),Uke=g0(),Wke=10,kg=class{constructor(){C(this,"subPriority",0)}validate(t,e){return!0}};zc.Setter=kg;var y0=class extends kg{constructor(t,e,r,a,i){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=a,i&&(this.subPriority=i)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}};zc.ValueSetter=y0;var v0=class extends kg{constructor(e,r){super();C(this,"priority",Wke);C(this,"subPriority",-1);this.context=e||(a=>(0,m9.constructFrom)(r,a))}set(e,r){return r.timestampIsSet?e:(0,m9.constructFrom)(e,(0,Uke.transpose)(e,this.context))}};zc.DateTimezoneSetter=v0});var dt=D(k0=>{"use strict";k0.Parser=void 0;var qke=b0(),T0=class{run(t,e,r,a){let i=this.parse(t,e,r,a);return i?{setter:new qke.ValueSetter(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,e,r){return!0}};k0.Parser=T0});var h9=D(S0=>{"use strict";S0.EraParser=void 0;var Vke=dt(),w0=class extends Vke.Parser{constructor(){super(...arguments);C(this,"priority",140);C(this,"incompatibleTokens",["R","u","t","T"])}parse(e,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}set(e,r,a){return r.era=a,e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}};S0.EraParser=w0});var rn=D(wg=>{"use strict";wg.timezonePatterns=wg.numericPatterns=void 0;var Dlt=wg.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}/},Elt=wg.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 bt=D($i=>{"use strict";$i.dayPeriodEnumToHours=Zke;$i.isLeapYearIndex=Xke;$i.mapValue=$ke;$i.normalizeTwoDigitYear=Jke;$i.parseAnyDigitsSigned=Gke;$i.parseNDigits=Kke;$i.parseNDigitsSigned=Qke;$i.parseNumericPattern=Ba;$i.parseTimezonePattern=Yke;var D0=ze(),Ys=rn();function $ke(n,t){return n&&{value:t(n.value),rest:n.rest}}function Ba(n,t){let e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Yke(n,t){let e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};let r=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,i=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(a*D0.millisecondsInHour+i*D0.millisecondsInMinute+s*D0.millisecondsInSecond),rest:t.slice(e[0].length)}}function Gke(n){return Ba(Ys.numericPatterns.anyDigitsSigned,n)}function Kke(n,t){switch(n){case 1:return Ba(Ys.numericPatterns.singleDigit,t);case 2:return Ba(Ys.numericPatterns.twoDigits,t);case 3:return Ba(Ys.numericPatterns.threeDigits,t);case 4:return Ba(Ys.numericPatterns.fourDigits,t);default:return Ba(new RegExp("^\\d{1,"+n+"}"),t)}}function Qke(n,t){switch(n){case 1:return Ba(Ys.numericPatterns.singleDigitSigned,t);case 2:return Ba(Ys.numericPatterns.twoDigitsSigned,t);case 3:return Ba(Ys.numericPatterns.threeDigitsSigned,t);case 4:return Ba(Ys.numericPatterns.fourDigitsSigned,t);default:return Ba(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Zke(n){switch(n){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 Jke(n,t){let e=t>0,r=e?t:1-t,a;if(r<=50)a=n||100;else{let i=r+50,s=Math.trunc(i/100)*100,o=n>=i%100;a=n+s-(o?100:0)}return e?a:1-a}function Xke(n){return n%400===0||n%4===0&&n%100!==0}});var f9=D(x0=>{"use strict";x0.YearParser=void 0;var ewe=dt(),$u=bt(),E0=class extends ewe.Parser{constructor(){super(...arguments);C(this,"priority",130);C(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,r,a){let i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return(0,$u.mapValue)((0,$u.parseNDigits)(4,e),i);case"yo":return(0,$u.mapValue)(a.ordinalNumber(e,{unit:"year"}),i);default:return(0,$u.mapValue)((0,$u.parseNDigits)(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a){let i=e.getFullYear();if(a.isTwoDigitYear){let o=(0,$u.normalizeTwoDigitYear)(a.year,i);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}let s=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};x0.YearParser=E0});var y9=D(P0=>{"use strict";P0.LocalWeekYearParser=void 0;var twe=yg(),g9=ci(),rwe=dt(),Yu=bt(),C0=class extends rwe.Parser{constructor(){super(...arguments);C(this,"priority",130);C(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,r,a){let i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return(0,Yu.mapValue)((0,Yu.parseNDigits)(4,e),i);case"Yo":return(0,Yu.mapValue)(a.ordinalNumber(e,{unit:"year"}),i);default:return(0,Yu.mapValue)((0,Yu.parseNDigits)(r.length,e),i)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a,i){let s=(0,twe.getWeekYear)(e,i);if(a.isTwoDigitYear){let l=(0,Yu.normalizeTwoDigitYear)(a.year,s);return e.setFullYear(l,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),(0,g9.startOfWeek)(e,i)}let o=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(o,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),(0,g9.startOfWeek)(e,i)}};P0.LocalWeekYearParser=C0});var b9=D(A0=>{"use strict";A0.ISOWeekYearParser=void 0;var nwe=qi(),awe=ke(),iwe=dt(),v9=bt(),M0=class extends iwe.Parser{constructor(){super(...arguments);C(this,"priority",130);C(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,r){return r==="R"?(0,v9.parseNDigitsSigned)(4,e):(0,v9.parseNDigitsSigned)(r.length,e)}set(e,r,a){let i=(0,awe.constructFrom)(e,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),(0,nwe.startOfISOWeek)(i)}};A0.ISOWeekYearParser=M0});var k9=D(_0=>{"use strict";_0.ExtendedYearParser=void 0;var swe=dt(),T9=bt(),I0=class extends swe.Parser{constructor(){super(...arguments);C(this,"priority",130);C(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,r){return r==="u"?(0,T9.parseNDigitsSigned)(4,e):(0,T9.parseNDigitsSigned)(r.length,e)}set(e,r,a){return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}};_0.ExtendedYearParser=I0});var w9=D(R0=>{"use strict";R0.QuarterParser=void 0;var owe=dt(),lwe=bt(),N0=class extends owe.Parser{constructor(){super(...arguments);C(this,"priority",120);C(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"Q":case"QQ":return(0,lwe.parseNDigits)(r.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}};R0.QuarterParser=N0});var S9=D(O0=>{"use strict";O0.StandAloneQuarterParser=void 0;var cwe=dt(),dwe=bt(),F0=class extends cwe.Parser{constructor(){super(...arguments);C(this,"priority",120);C(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"q":case"qq":return(0,dwe.parseNDigits)(r.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}};O0.StandAloneQuarterParser=F0});var D9=D(B0=>{"use strict";B0.MonthParser=void 0;var uwe=rn(),pwe=dt(),Sg=bt(),L0=class extends pwe.Parser{constructor(){super(...arguments);C(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);C(this,"priority",110)}parse(e,r,a){let i=s=>s-1;switch(r){case"M":return(0,Sg.mapValue)((0,Sg.parseNumericPattern)(uwe.numericPatterns.month,e),i);case"MM":return(0,Sg.mapValue)((0,Sg.parseNDigits)(2,e),i);case"Mo":return(0,Sg.mapValue)(a.ordinalNumber(e,{unit:"month"}),i);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}};B0.MonthParser=L0});var E9=D(H0=>{"use strict";H0.StandAloneMonthParser=void 0;var mwe=rn(),hwe=dt(),Dg=bt(),j0=class extends hwe.Parser{constructor(){super(...arguments);C(this,"priority",110);C(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,r,a){let i=s=>s-1;switch(r){case"L":return(0,Dg.mapValue)((0,Dg.parseNumericPattern)(mwe.numericPatterns.month,e),i);case"LL":return(0,Dg.mapValue)((0,Dg.parseNDigits)(2,e),i);case"Lo":return(0,Dg.mapValue)(a.ordinalNumber(e,{unit:"month"}),i);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}};H0.StandAloneMonthParser=j0});var z0=D(C9=>{"use strict";C9.setWeek=gwe;var fwe=yk(),x9=$();function gwe(n,t,e){let r=(0,x9.toDate)(n,e==null?void 0:e.in),a=(0,fwe.getWeek)(r,e)-t;return r.setDate(r.getDate()-a*7),(0,x9.toDate)(r,e==null?void 0:e.in)}});var M9=D(W0=>{"use strict";W0.LocalWeekParser=void 0;var ywe=z0(),vwe=ci(),bwe=rn(),Twe=dt(),P9=bt(),U0=class extends Twe.Parser{constructor(){super(...arguments);C(this,"priority",100);C(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,r,a){switch(r){case"w":return(0,P9.parseNumericPattern)(bwe.numericPatterns.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return(0,P9.parseNDigits)(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a,i){return(0,vwe.startOfWeek)((0,ywe.setWeek)(e,a,i),i)}};W0.LocalWeekParser=U0});var q0=D(A9=>{"use strict";A9.setISOWeek=Swe;var kwe=fk(),wwe=$();function Swe(n,t,e){let r=(0,wwe.toDate)(n,e==null?void 0:e.in),a=(0,kwe.getISOWeek)(r,e)-t;return r.setDate(r.getDate()-a*7),r}});var _9=D($0=>{"use strict";$0.ISOWeekParser=void 0;var Dwe=q0(),Ewe=qi(),xwe=rn(),Cwe=dt(),I9=bt(),V0=class extends Cwe.Parser{constructor(){super(...arguments);C(this,"priority",100);C(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,r,a){switch(r){case"I":return(0,I9.parseNumericPattern)(xwe.numericPatterns.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return(0,I9.parseNDigits)(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a){return(0,Ewe.startOfISOWeek)((0,Dwe.setISOWeek)(e,a))}};$0.ISOWeekParser=V0});var N9=D(K0=>{"use strict";K0.DateParser=void 0;var Pwe=rn(),Mwe=dt(),Y0=bt(),Awe=[31,28,31,30,31,30,31,31,30,31,30,31],Iwe=[31,29,31,30,31,30,31,31,30,31,30,31],G0=class extends Mwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"subPriority",1);C(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"d":return(0,Y0.parseNumericPattern)(Pwe.numericPatterns.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return(0,Y0.parseNDigits)(r.length,e)}}validate(e,r){let a=e.getFullYear(),i=(0,Y0.isLeapYearIndex)(a),s=e.getMonth();return i?r>=1&&r<=Iwe[s]:r>=1&&r<=Awe[s]}set(e,r,a){return e.setDate(a),e.setHours(0,0,0,0),e}};K0.DateParser=G0});var R9=D(J0=>{"use strict";J0.DayOfYearParser=void 0;var _we=rn(),Nwe=dt(),Q0=bt(),Z0=class extends Nwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"subpriority",1);C(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,r,a){switch(r){case"D":case"DD":return(0,Q0.parseNumericPattern)(_we.numericPatterns.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return(0,Q0.parseNDigits)(r.length,e)}}validate(e,r){let a=e.getFullYear();return(0,Q0.isLeapYearIndex)(a)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,a){return e.setMonth(0,a),e.setHours(0,0,0,0),e}};J0.DayOfYearParser=Z0});var Eg=D(F9=>{"use strict";F9.setDay=Lwe;var Rwe=tn(),Fwe=Wi(),Owe=$();function Lwe(n,t,e){var u,p,m,h,f,g,v,T;let r=(0,Rwe.getDefaultOptions)(),a=(T=(v=(h=(m=e==null?void 0:e.weekStartsOn)!=null?m:(p=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:r.weekStartsOn)!=null?v:(g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)!=null?T:0,i=(0,Owe.toDate)(n,e==null?void 0:e.in),s=i.getDay(),l=(t%7+7)%7,c=7-a,d=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return(0,Fwe.addDays)(i,d,e)}});var O9=D(eM=>{"use strict";eM.DayParser=void 0;var Bwe=Eg(),jwe=dt(),X0=class extends jwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,i){return e=(0,Bwe.setDay)(e,a,i),e.setHours(0,0,0,0),e}};eM.DayParser=X0});var L9=D(nM=>{"use strict";nM.LocalDayParser=void 0;var Hwe=Eg(),zwe=dt(),tM=bt(),rM=class extends zwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,r,a,i){let s=o=>{let l=Math.floor((o-1)/7)*7;return(o+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return(0,tM.mapValue)((0,tM.parseNDigits)(r.length,e),s);case"eo":return(0,tM.mapValue)(a.ordinalNumber(e,{unit:"day"}),s);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,i){return e=(0,Hwe.setDay)(e,a,i),e.setHours(0,0,0,0),e}};nM.LocalDayParser=rM});var B9=D(sM=>{"use strict";sM.StandAloneLocalDayParser=void 0;var Uwe=Eg(),Wwe=dt(),aM=bt(),iM=class extends Wwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,r,a,i){let s=o=>{let l=Math.floor((o-1)/7)*7;return(o+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return(0,aM.mapValue)((0,aM.parseNDigits)(r.length,e),s);case"co":return(0,aM.mapValue)(a.ordinalNumber(e,{unit:"day"}),s);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,i){return e=(0,Uwe.setDay)(e,a,i),e.setHours(0,0,0,0),e}};sM.StandAloneLocalDayParser=iM});var oM=D(j9=>{"use strict";j9.setISODay=Ywe;var qwe=Wi(),Vwe=d0(),$we=$();function Ywe(n,t,e){let r=(0,$we.toDate)(n,e==null?void 0:e.in),a=(0,Vwe.getISODay)(r,e),i=t-a;return(0,qwe.addDays)(r,i,e)}});var H9=D(cM=>{"use strict";cM.ISODayParser=void 0;var Gwe=oM(),Kwe=dt(),xg=bt(),lM=class extends Kwe.Parser{constructor(){super(...arguments);C(this,"priority",90);C(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,r,a){let i=s=>s===0?7:s;switch(r){case"i":case"ii":return(0,xg.parseNDigits)(r.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return(0,xg.mapValue)(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return(0,xg.mapValue)(a.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return(0,xg.mapValue)(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),i);case"iiii":default:return(0,xg.mapValue)(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,r){return r>=1&&r<=7}set(e,r,a){return e=(0,Gwe.setISODay)(e,a),e.setHours(0,0,0,0),e}};cM.ISODayParser=lM});var z9=D(uM=>{"use strict";uM.AMPMParser=void 0;var Qwe=dt(),Zwe=bt(),dM=class extends Qwe.Parser{constructor(){super(...arguments);C(this,"priority",80);C(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours((0,Zwe.dayPeriodEnumToHours)(a),0,0,0),e}};uM.AMPMParser=dM});var U9=D(mM=>{"use strict";mM.AMPMMidnightParser=void 0;var Jwe=dt(),Xwe=bt(),pM=class extends Jwe.Parser{constructor(){super(...arguments);C(this,"priority",80);C(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours((0,Xwe.dayPeriodEnumToHours)(a),0,0,0),e}};mM.AMPMMidnightParser=pM});var W9=D(fM=>{"use strict";fM.DayPeriodParser=void 0;var eSe=dt(),tSe=bt(),hM=class extends eSe.Parser{constructor(){super(...arguments);C(this,"priority",80);C(this,"incompatibleTokens",["a","b","t","T"])}parse(e,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours((0,tSe.dayPeriodEnumToHours)(a),0,0,0),e}};fM.DayPeriodParser=hM});var V9=D(yM=>{"use strict";yM.Hour1to12Parser=void 0;var rSe=rn(),nSe=dt(),q9=bt(),gM=class extends nSe.Parser{constructor(){super(...arguments);C(this,"priority",70);C(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,r,a){switch(r){case"h":return(0,q9.parseNumericPattern)(rSe.numericPatterns.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return(0,q9.parseNDigits)(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,a){let i=e.getHours()>=12;return i&&a<12?e.setHours(a+12,0,0,0):!i&&a===12?e.setHours(0,0,0,0):e.setHours(a,0,0,0),e}};yM.Hour1to12Parser=gM});var Y9=D(bM=>{"use strict";bM.Hour0to23Parser=void 0;var aSe=rn(),iSe=dt(),$9=bt(),vM=class extends iSe.Parser{constructor(){super(...arguments);C(this,"priority",70);C(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,r,a){switch(r){case"H":return(0,$9.parseNumericPattern)(aSe.numericPatterns.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return(0,$9.parseNDigits)(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,a){return e.setHours(a,0,0,0),e}};bM.Hour0to23Parser=vM});var K9=D(kM=>{"use strict";kM.Hour0To11Parser=void 0;var sSe=rn(),oSe=dt(),G9=bt(),TM=class extends oSe.Parser{constructor(){super(...arguments);C(this,"priority",70);C(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,r,a){switch(r){case"K":return(0,G9.parseNumericPattern)(sSe.numericPatterns.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return(0,G9.parseNDigits)(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.getHours()>=12&&a<12?e.setHours(a+12,0,0,0):e.setHours(a,0,0,0),e}};kM.Hour0To11Parser=TM});var Z9=D(SM=>{"use strict";SM.Hour1To24Parser=void 0;var lSe=rn(),cSe=dt(),Q9=bt(),wM=class extends cSe.Parser{constructor(){super(...arguments);C(this,"priority",70);C(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,r,a){switch(r){case"k":return(0,Q9.parseNumericPattern)(lSe.numericPatterns.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return(0,Q9.parseNDigits)(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,a){let i=a<=24?a%24:a;return e.setHours(i,0,0,0),e}};SM.Hour1To24Parser=wM});var X9=D(EM=>{"use strict";EM.MinuteParser=void 0;var dSe=rn(),uSe=dt(),J9=bt(),DM=class extends uSe.Parser{constructor(){super(...arguments);C(this,"priority",60);C(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"m":return(0,J9.parseNumericPattern)(dSe.numericPatterns.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return(0,J9.parseNDigits)(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setMinutes(a,0,0),e}};EM.MinuteParser=DM});var t7=D(CM=>{"use strict";CM.SecondParser=void 0;var pSe=rn(),mSe=dt(),e7=bt(),xM=class extends mSe.Parser{constructor(){super(...arguments);C(this,"priority",50);C(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"s":return(0,e7.parseNumericPattern)(pSe.numericPatterns.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return(0,e7.parseNDigits)(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setSeconds(a,0),e}};CM.SecondParser=xM});var n7=D(MM=>{"use strict";MM.FractionOfSecondParser=void 0;var hSe=dt(),r7=bt(),PM=class extends hSe.Parser{constructor(){super(...arguments);C(this,"priority",30);C(this,"incompatibleTokens",["t","T"])}parse(e,r){let a=i=>Math.trunc(i*Math.pow(10,-r.length+3));return(0,r7.mapValue)((0,r7.parseNDigits)(r.length,e),a)}set(e,r,a){return e.setMilliseconds(a),e}};MM.FractionOfSecondParser=PM});var a7=D(IM=>{"use strict";IM.ISOTimezoneWithZParser=void 0;var fSe=ke(),gSe=Ws(),Cg=rn(),ySe=dt(),Pg=bt(),AM=class extends ySe.Parser{constructor(){super(...arguments);C(this,"priority",10);C(this,"incompatibleTokens",["t","T","x"])}parse(e,r){switch(r){case"X":return(0,Pg.parseTimezonePattern)(Cg.timezonePatterns.basicOptionalMinutes,e);case"XX":return(0,Pg.parseTimezonePattern)(Cg.timezonePatterns.basic,e);case"XXXX":return(0,Pg.parseTimezonePattern)(Cg.timezonePatterns.basicOptionalSeconds,e);case"XXXXX":return(0,Pg.parseTimezonePattern)(Cg.timezonePatterns.extendedOptionalSeconds,e);case"XXX":default:return(0,Pg.parseTimezonePattern)(Cg.timezonePatterns.extended,e)}}set(e,r,a){return r.timestampIsSet?e:(0,fSe.constructFrom)(e,e.getTime()-(0,gSe.getTimezoneOffsetInMilliseconds)(e)-a)}};IM.ISOTimezoneWithZParser=AM});var i7=D(NM=>{"use strict";NM.ISOTimezoneParser=void 0;var vSe=ke(),bSe=Ws(),Mg=rn(),TSe=dt(),Ag=bt(),_M=class extends TSe.Parser{constructor(){super(...arguments);C(this,"priority",10);C(this,"incompatibleTokens",["t","T","X"])}parse(e,r){switch(r){case"x":return(0,Ag.parseTimezonePattern)(Mg.timezonePatterns.basicOptionalMinutes,e);case"xx":return(0,Ag.parseTimezonePattern)(Mg.timezonePatterns.basic,e);case"xxxx":return(0,Ag.parseTimezonePattern)(Mg.timezonePatterns.basicOptionalSeconds,e);case"xxxxx":return(0,Ag.parseTimezonePattern)(Mg.timezonePatterns.extendedOptionalSeconds,e);case"xxx":default:return(0,Ag.parseTimezonePattern)(Mg.timezonePatterns.extended,e)}}set(e,r,a){return r.timestampIsSet?e:(0,vSe.constructFrom)(e,e.getTime()-(0,bSe.getTimezoneOffsetInMilliseconds)(e)-a)}};NM.ISOTimezoneParser=_M});var s7=D(FM=>{"use strict";FM.TimestampSecondsParser=void 0;var kSe=ke(),wSe=dt(),SSe=bt(),RM=class extends wSe.Parser{constructor(){super(...arguments);C(this,"priority",40);C(this,"incompatibleTokens","*")}parse(e){return(0,SSe.parseAnyDigitsSigned)(e)}set(e,r,a){return[(0,kSe.constructFrom)(e,a*1e3),{timestampIsSet:!0}]}};FM.TimestampSecondsParser=RM});var o7=D(LM=>{"use strict";LM.TimestampMillisecondsParser=void 0;var DSe=ke(),ESe=dt(),xSe=bt(),OM=class extends ESe.Parser{constructor(){super(...arguments);C(this,"priority",20);C(this,"incompatibleTokens","*")}parse(e){return(0,xSe.parseAnyDigitsSigned)(e)}set(e,r,a){return[(0,DSe.constructFrom)(e,a),{timestampIsSet:!0}]}};LM.TimestampMillisecondsParser=OM});var l7=D(BM=>{"use strict";BM.parsers=void 0;var CSe=h9(),PSe=f9(),MSe=y9(),ASe=b9(),ISe=k9(),_Se=w9(),NSe=S9(),RSe=D9(),FSe=E9(),OSe=M9(),LSe=_9(),BSe=N9(),jSe=R9(),HSe=O9(),zSe=L9(),USe=B9(),WSe=H9(),qSe=z9(),VSe=U9(),$Se=W9(),YSe=V9(),GSe=Y9(),KSe=K9(),QSe=Z9(),ZSe=X9(),JSe=t7(),XSe=n7(),eDe=a7(),tDe=i7(),rDe=s7(),nDe=o7(),Bct=BM.parsers={G:new CSe.EraParser,y:new PSe.YearParser,Y:new MSe.LocalWeekYearParser,R:new ASe.ISOWeekYearParser,u:new ISe.ExtendedYearParser,Q:new _Se.QuarterParser,q:new NSe.StandAloneQuarterParser,M:new RSe.MonthParser,L:new FSe.StandAloneMonthParser,w:new OSe.LocalWeekParser,I:new LSe.ISOWeekParser,d:new BSe.DateParser,D:new jSe.DayOfYearParser,E:new HSe.DayParser,e:new zSe.LocalDayParser,c:new USe.StandAloneLocalDayParser,i:new WSe.ISODayParser,a:new qSe.AMPMParser,b:new VSe.AMPMMidnightParser,B:new $Se.DayPeriodParser,h:new YSe.Hour1to12Parser,H:new GSe.Hour0to23Parser,K:new KSe.Hour0To11Parser,k:new QSe.Hour1To24Parser,m:new ZSe.MinuteParser,s:new JSe.SecondParser,S:new XSe.FractionOfSecondParser,X:new eDe.ISOTimezoneWithZParser,x:new tDe.ISOTimezoneParser,t:new rDe.TimestampSecondsParser,T:new nDe.TimestampMillisecondsParser}});var HM=D(wk=>{"use strict";Object.defineProperty(wk,"longFormatters",{enumerable:!0,get:function(){return jM.longFormatters}});wk.parse=hDe;Object.defineProperty(wk,"parsers",{enumerable:!0,get:function(){return d7.parsers}});var aDe=Lc(),jM=XP(),kk=e0(),iDe=ke(),sDe=c0(),c7=$(),oDe=b0(),d7=l7(),lDe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cDe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dDe=/^'([^]*?)'?$/,uDe=/''/g,pDe=/\S/,mDe=/[a-zA-Z]/;function hDe(n,t,e,r){var g,v,T,k,w,S,x,I,A,B,z,U,N,P,_,Y,Q,W;let a=()=>(0,iDe.constructFrom)((r==null?void 0:r.in)||e,NaN),i=(0,sDe.getDefaultOptions)(),s=(v=(g=r==null?void 0:r.locale)!=null?g:i.locale)!=null?v:aDe.defaultLocale,o=(B=(A=(S=(w=r==null?void 0:r.firstWeekContainsDate)!=null?w:(k=(T=r==null?void 0:r.locale)==null?void 0:T.options)==null?void 0:k.firstWeekContainsDate)!=null?S:i.firstWeekContainsDate)!=null?A:(I=(x=i.locale)==null?void 0:x.options)==null?void 0:I.firstWeekContainsDate)!=null?B:1,l=(W=(Q=(P=(N=r==null?void 0:r.weekStartsOn)!=null?N:(U=(z=r==null?void 0:r.locale)==null?void 0:z.options)==null?void 0:U.weekStartsOn)!=null?P:i.weekStartsOn)!=null?Q:(Y=(_=i.locale)==null?void 0:_.options)==null?void 0:Y.weekStartsOn)!=null?W:0;if(!t)return n?a():(0,c7.toDate)(e,r==null?void 0:r.in);let c={firstWeekContainsDate:o,weekStartsOn:l,locale:s},d=[new oDe.DateTimezoneSetter(r==null?void 0:r.in,e)],u=t.match(cDe).map(H=>{let K=H[0];if(K in jM.longFormatters){let ae=jM.longFormatters[K];return ae(H,s.formatLong)}return H}).join("").match(lDe),p=[];for(let H of u){!(r!=null&&r.useAdditionalWeekYearTokens)&&(0,kk.isProtectedWeekYearToken)(H)&&(0,kk.warnOrThrowProtectedError)(H,t,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&(0,kk.isProtectedDayOfYearToken)(H)&&(0,kk.warnOrThrowProtectedError)(H,t,n);let K=H[0],ae=d7.parsers[K];if(ae){let{incompatibleTokens:ye}=ae;if(Array.isArray(ye)){let Je=p.find(Rt=>ye.includes(Rt.token)||Rt.token===K);if(Je)throw new RangeError(`The format string mustn't contain \`${Je.fullToken}\` and \`${H}\` at the same time`)}else if(ae.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 Z=ae.run(n,H,s.match,c);if(!Z)return a();d.push(Z.setter),n=Z.rest}else{if(K.match(mDe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");if(H==="''"?H="'":K==="'"&&(H=fDe(H)),n.indexOf(H)===0)n=n.slice(H.length);else return a()}}if(n.length>0&&pDe.test(n))return a();let m=d.map(H=>H.priority).sort((H,K)=>K-H).filter((H,K,ae)=>ae.indexOf(H)===K).map(H=>d.filter(K=>K.priority===H).sort((K,ae)=>ae.subPriority-K.subPriority)).map(H=>H[0]),h=(0,c7.toDate)(e,r==null?void 0:r.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 fDe(n){return n.match(dDe)[1].replace(uDe,"'")}});var p7=D(u7=>{"use strict";u7.isMatch=vDe;var gDe=Vs(),yDe=HM();function vDe(n,t,e){return(0,gDe.isValid)((0,yDe.parse)(n,t,new Date,e))}});var h7=D(m7=>{"use strict";m7.isMonday=TDe;var bDe=$();function TDe(n,t){return(0,bDe.toDate)(n,t==null?void 0:t.in).getDay()===1}});var g7=D(f7=>{"use strict";f7.isPast=wDe;var kDe=$();function wDe(n){return+(0,kDe.toDate)(n){"use strict";y7.startOfHour=DDe;var SDe=$();function DDe(n,t){let e=(0,SDe.toDate)(n,t==null?void 0:t.in);return e.setMinutes(0,0,0),e}});var UM=D(b7=>{"use strict";b7.isSameHour=xDe;var EDe=wt(),v7=zM();function xDe(n,t,e){let[r,a]=(0,EDe.normalizeDates)(e==null?void 0:e.in,n,t);return+(0,v7.startOfHour)(r)==+(0,v7.startOfHour)(a)}});var Sk=D(k7=>{"use strict";k7.isSameWeek=PDe;var CDe=wt(),T7=ci();function PDe(n,t,e){let[r,a]=(0,CDe.normalizeDates)(e==null?void 0:e.in,n,t);return+(0,T7.startOfWeek)(r,e)==+(0,T7.startOfWeek)(a,e)}});var WM=D(w7=>{"use strict";w7.isSameISOWeek=ADe;var MDe=Sk();function ADe(n,t,e){return(0,MDe.isSameWeek)(n,t,{...e,weekStartsOn:1})}});var E7=D(D7=>{"use strict";D7.isSameISOWeekYear=_De;var S7=zu(),IDe=wt();function _De(n,t,e){let[r,a]=(0,IDe.normalizeDates)(e==null?void 0:e.in,n,t);return+(0,S7.startOfISOWeekYear)(r)==+(0,S7.startOfISOWeekYear)(a)}});var qM=D(x7=>{"use strict";x7.startOfMinute=RDe;var NDe=$();function RDe(n,t){let e=(0,NDe.toDate)(n,t==null?void 0:t.in);return e.setSeconds(0,0),e}});var VM=D(P7=>{"use strict";P7.isSameMinute=FDe;var C7=qM();function FDe(n,t){return+(0,C7.startOfMinute)(n)==+(0,C7.startOfMinute)(t)}});var $M=D(M7=>{"use strict";M7.isSameMonth=LDe;var ODe=wt();function LDe(n,t,e){let[r,a]=(0,ODe.normalizeDates)(e==null?void 0:e.in,n,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}});var YM=D(I7=>{"use strict";I7.isSameQuarter=jDe;var BDe=wt(),A7=dk();function jDe(n,t,e){let[r,a]=(0,BDe.normalizeDates)(e==null?void 0:e.in,n,t);return+(0,A7.startOfQuarter)(r)==+(0,A7.startOfQuarter)(a)}});var GM=D(_7=>{"use strict";_7.startOfSecond=zDe;var HDe=$();function zDe(n,t){let e=(0,HDe.toDate)(n,t==null?void 0:t.in);return e.setMilliseconds(0),e}});var KM=D(R7=>{"use strict";R7.isSameSecond=UDe;var N7=GM();function UDe(n,t){return+(0,N7.startOfSecond)(n)==+(0,N7.startOfSecond)(t)}});var QM=D(F7=>{"use strict";F7.isSameYear=qDe;var WDe=wt();function qDe(n,t,e){let[r,a]=(0,WDe.normalizeDates)(e==null?void 0:e.in,n,t);return r.getFullYear()===a.getFullYear()}});var L7=D(O7=>{"use strict";O7.isThisHour=GDe;var VDe=br(),$De=UM(),YDe=$();function GDe(n,t){return(0,$De.isSameHour)((0,YDe.toDate)(n,t==null?void 0:t.in),(0,VDe.constructNow)((t==null?void 0:t.in)||n))}});var j7=D(B7=>{"use strict";B7.isThisISOWeek=JDe;var KDe=ke(),QDe=br(),ZDe=WM();function JDe(n,t){return(0,ZDe.isSameISOWeek)((0,KDe.constructFrom)((t==null?void 0:t.in)||n,n),(0,QDe.constructNow)((t==null?void 0:t.in)||n))}});var z7=D(H7=>{"use strict";H7.isThisMinute=tEe;var XDe=br(),eEe=VM();function tEe(n){return(0,eEe.isSameMinute)(n,(0,XDe.constructNow)(n))}});var W7=D(U7=>{"use strict";U7.isThisMonth=iEe;var rEe=ke(),nEe=br(),aEe=$M();function iEe(n,t){return(0,aEe.isSameMonth)((0,rEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,nEe.constructNow)((t==null?void 0:t.in)||n))}});var V7=D(q7=>{"use strict";q7.isThisQuarter=cEe;var sEe=ke(),oEe=br(),lEe=YM();function cEe(n,t){return(0,lEe.isSameQuarter)((0,sEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,oEe.constructNow)((t==null?void 0:t.in)||n))}});var Y7=D($7=>{"use strict";$7.isThisSecond=pEe;var dEe=br(),uEe=KM();function pEe(n){return(0,uEe.isSameSecond)(n,(0,dEe.constructNow)(n))}});var K7=D(G7=>{"use strict";G7.isThisWeek=gEe;var mEe=ke(),hEe=br(),fEe=Sk();function gEe(n,t){return(0,fEe.isSameWeek)((0,mEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,hEe.constructNow)((t==null?void 0:t.in)||n),t)}});var Z7=D(Q7=>{"use strict";Q7.isThisYear=TEe;var yEe=ke(),vEe=br(),bEe=QM();function TEe(n,t){return(0,bEe.isSameYear)((0,yEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,vEe.constructNow)((t==null?void 0:t.in)||n))}});var X7=D(J7=>{"use strict";J7.isThursday=wEe;var kEe=$();function wEe(n,t){return(0,kEe.toDate)(n,t==null?void 0:t.in).getDay()===4}});var tQ=D(eQ=>{"use strict";eQ.isToday=xEe;var SEe=ke(),DEe=br(),EEe=Uu();function xEe(n,t){return(0,EEe.isSameDay)((0,SEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,DEe.constructNow)((t==null?void 0:t.in)||n))}});var nQ=D(rQ=>{"use strict";rQ.isTomorrow=AEe;var CEe=Wi(),PEe=br(),MEe=Uu();function AEe(n,t){return(0,MEe.isSameDay)(n,(0,CEe.addDays)((0,PEe.constructNow)((t==null?void 0:t.in)||n),1),t)}});var iQ=D(aQ=>{"use strict";aQ.isTuesday=_Ee;var IEe=$();function _Ee(n,t){return(0,IEe.toDate)(n,t==null?void 0:t.in).getDay()===2}});var oQ=D(sQ=>{"use strict";sQ.isWednesday=REe;var NEe=$();function REe(n,t){return(0,NEe.toDate)(n,t==null?void 0:t.in).getDay()===3}});var cQ=D(lQ=>{"use strict";lQ.isWithinInterval=FEe;var ZM=$();function FEe(n,t,e){let r=+(0,ZM.toDate)(n,e==null?void 0:e.in),[a,i]=[+(0,ZM.toDate)(t.start,e==null?void 0:e.in),+(0,ZM.toDate)(t.end,e==null?void 0:e.in)].sort((s,o)=>s-o);return r>=a&&r<=i}});var Ig=D(dQ=>{"use strict";dQ.subDays=LEe;var OEe=Wi();function LEe(n,t,e){return(0,OEe.addDays)(n,-t,e)}});var pQ=D(uQ=>{"use strict";uQ.isYesterday=UEe;var BEe=ke(),jEe=br(),HEe=Uu(),zEe=Ig();function UEe(n,t){return(0,HEe.isSameDay)((0,BEe.constructFrom)((t==null?void 0:t.in)||n,n),(0,zEe.subDays)((0,jEe.constructNow)((t==null?void 0:t.in)||n),1))}});var fQ=D(hQ=>{"use strict";hQ.lastDayOfDecade=WEe;var mQ=$();function WEe(n,t){let e=(0,mQ.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=9+Math.floor(r/10)*10;return e.setFullYear(a+1,0,0),e.setHours(0,0,0,0),(0,mQ.toDate)(e,t==null?void 0:t.in)}});var JM=D(gQ=>{"use strict";gQ.lastDayOfWeek=$Ee;var qEe=tn(),VEe=$();function $Ee(n,t){var o,l,c,d,u,p,m,h;let e=(0,qEe.getDefaultOptions)(),r=(h=(m=(d=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:e.weekStartsOn)!=null?m:(p=(u=e.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?h:0,a=(0,VEe.toDate)(n,t==null?void 0:t.in),i=a.getDay(),s=(i{"use strict";yQ.lastDayOfISOWeek=GEe;var YEe=JM();function GEe(n,t){return(0,YEe.lastDayOfWeek)(n,{...t,weekStartsOn:1})}});var TQ=D(bQ=>{"use strict";bQ.lastDayOfISOWeekYear=JEe;var KEe=ke(),QEe=$o(),ZEe=qi();function JEe(n,t){let e=(0,QEe.getISOWeekYear)(n,t),r=(0,KEe.constructFrom)((t==null?void 0:t.in)||n,0);r.setFullYear(e+1,0,4),r.setHours(0,0,0,0);let a=(0,ZEe.startOfISOWeek)(r,t);return a.setDate(a.getDate()-1),a}});var wQ=D(kQ=>{"use strict";kQ.lastDayOfQuarter=exe;var XEe=$();function exe(n,t){let e=(0,XEe.toDate)(n,t==null?void 0:t.in),r=e.getMonth(),a=r-r%3+3;return e.setMonth(a,0),e.setHours(0,0,0,0),e}});var DQ=D(SQ=>{"use strict";SQ.lastDayOfYear=rxe;var txe=$();function rxe(n,t){let e=(0,txe.toDate)(n,t==null?void 0:t.in),r=e.getFullYear();return e.setFullYear(r+1,0,0),e.setHours(0,0,0,0),e}});var xQ=D(XM=>{"use strict";XM.lightFormat=cxe;Object.defineProperty(XM,"lightFormatters",{enumerable:!0,get:function(){return EQ.lightFormatters}});var EQ=QP(),nxe=Vs(),axe=$(),ixe=/(\w)\1*|''|'(''|[^'])+('|$)|./g,sxe=/^'([^]*?)'?$/,oxe=/''/g,lxe=/[a-zA-Z]/;function cxe(n,t){let e=(0,axe.toDate)(n);if(!(0,nxe.isValid)(e))throw new RangeError("Invalid time value");let r=t.match(ixe);return r?r.map(i=>{if(i==="''")return"'";let s=i[0];if(s==="'")return dxe(i);let o=EQ.lightFormatters[s];if(o)return o(e,i);if(s.match(lxe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return i}).join(""):""}function dxe(n){let t=n.match(sxe);return t?t[1].replace(oxe,"'"):n}});var MQ=D(PQ=>{"use strict";PQ.milliseconds=uxe;var CQ=ze();function uxe({years:n,months:t,weeks:e,days:r,hours:a,minutes:i,seconds:s}){let o=0;n&&(o+=n*CQ.daysInYear),t&&(o+=t*(CQ.daysInYear/12)),e&&(o+=e*7),r&&(o+=r);let l=o*24*60*60;return a&&(l+=a*60*60),i&&(l+=i*60),s&&(l+=s),Math.trunc(l*1e3)}});var IQ=D(AQ=>{"use strict";AQ.millisecondsToHours=mxe;var pxe=ze();function mxe(n){let t=n/pxe.millisecondsInHour;return Math.trunc(t)}});var NQ=D(_Q=>{"use strict";_Q.millisecondsToMinutes=fxe;var hxe=ze();function fxe(n){let t=n/hxe.millisecondsInMinute;return Math.trunc(t)}});var FQ=D(RQ=>{"use strict";RQ.millisecondsToSeconds=yxe;var gxe=ze();function yxe(n){let t=n/gxe.millisecondsInSecond;return Math.trunc(t)}});var LQ=D(OQ=>{"use strict";OQ.minutesToHours=bxe;var vxe=ze();function bxe(n){let t=n/vxe.minutesInHour;return Math.trunc(t)}});var jQ=D(BQ=>{"use strict";BQ.minutesToMilliseconds=kxe;var Txe=ze();function kxe(n){return Math.trunc(n*Txe.millisecondsInMinute)}});var zQ=D(HQ=>{"use strict";HQ.minutesToSeconds=Sxe;var wxe=ze();function Sxe(n){return Math.trunc(n*wxe.secondsInMinute)}});var WQ=D(UQ=>{"use strict";UQ.monthsToQuarters=Exe;var Dxe=ze();function Exe(n){let t=n/Dxe.monthsInQuarter;return Math.trunc(t)}});var VQ=D(qQ=>{"use strict";qQ.monthsToYears=Cxe;var xxe=ze();function Cxe(n){let t=n/xxe.monthsInYear;return Math.trunc(t)}});var Gs=D($Q=>{"use strict";$Q.nextDay=Axe;var Pxe=Wi(),Mxe=bg();function Axe(n,t,e){let r=t-(0,Mxe.getDay)(n,e);return r<=0&&(r+=7),(0,Pxe.addDays)(n,r,e)}});var GQ=D(YQ=>{"use strict";YQ.nextFriday=_xe;var Ixe=Gs();function _xe(n,t){return(0,Ixe.nextDay)(n,5,t)}});var QQ=D(KQ=>{"use strict";KQ.nextMonday=Rxe;var Nxe=Gs();function Rxe(n,t){return(0,Nxe.nextDay)(n,1,t)}});var JQ=D(ZQ=>{"use strict";ZQ.nextSaturday=Oxe;var Fxe=Gs();function Oxe(n,t){return(0,Fxe.nextDay)(n,6,t)}});var eZ=D(XQ=>{"use strict";XQ.nextSunday=Bxe;var Lxe=Gs();function Bxe(n,t){return(0,Lxe.nextDay)(n,0,t)}});var rZ=D(tZ=>{"use strict";tZ.nextThursday=Hxe;var jxe=Gs();function Hxe(n,t){return(0,jxe.nextDay)(n,4,t)}});var aZ=D(nZ=>{"use strict";nZ.nextTuesday=Uxe;var zxe=Gs();function Uxe(n,t){return(0,zxe.nextDay)(n,2,t)}});var sZ=D(iZ=>{"use strict";iZ.nextWednesday=qxe;var Wxe=Gs();function qxe(n,t){return(0,Wxe.nextDay)(n,3,t)}});var dZ=D(cZ=>{"use strict";cZ.parseISO=$xe;var Ek=ze(),Vxe=ke(),oZ=$();function $xe(n,t){var c;let e=()=>(0,Vxe.constructFrom)(t==null?void 0:t.in,NaN),r=(c=t==null?void 0:t.additionalDigits)!=null?c:2,a=Qxe(n),i;if(a.date){let d=Zxe(a.date,r);i=Jxe(d.restDateString,d.year)}if(!i||isNaN(+i))return e();let s=+i,o=0,l;if(a.time&&(o=Xxe(a.time),isNaN(o)))return e();if(a.timezone){if(l=eCe(a.timezone),isNaN(l))return e()}else{let d=new Date(s+o),u=(0,oZ.toDate)(0,t==null?void 0:t.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return(0,oZ.toDate)(s+o+l,t==null?void 0:t.in)}var Dk={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Yxe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Gxe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Kxe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Qxe(n){let t={},e=n.split(Dk.dateTimeDelimiter),r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Dk.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Dk.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){let a=Dk.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function Zxe(n,t){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};let a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:n.slice((r[1]||r[2]).length)}}function Jxe(n,t){if(t===null)return new Date(NaN);let e=n.match(Yxe);if(!e)return new Date(NaN);let r=!!e[4],a=_g(e[1]),i=_g(e[2])-1,s=_g(e[3]),o=_g(e[4]),l=_g(e[5])-1;if(r)return iCe(t,o,l)?tCe(t,o,l):new Date(NaN);{let c=new Date(0);return!nCe(t,i,s)||!aCe(t,a)?new Date(NaN):(c.setUTCFullYear(t,i,Math.max(a,s)),c)}}function _g(n){return n?parseInt(n):1}function Xxe(n){let t=n.match(Gxe);if(!t)return NaN;let e=eA(t[1]),r=eA(t[2]),a=eA(t[3]);return sCe(e,r,a)?e*Ek.millisecondsInHour+r*Ek.millisecondsInMinute+a*1e3:NaN}function eA(n){return n&&parseFloat(n.replace(",","."))||0}function eCe(n){if(n==="Z")return 0;let t=n.match(Kxe);if(!t)return 0;let e=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return oCe(r,a)?e*(r*Ek.millisecondsInHour+a*Ek.millisecondsInMinute):NaN}function tCe(n,t,e){let r=new Date(0);r.setUTCFullYear(n,0,4);let a=r.getUTCDay()||7,i=(t-1)*7+e+1-a;return r.setUTCDate(r.getUTCDate()+i),r}var rCe=[31,null,31,30,31,30,31,31,30,31,30,31];function lZ(n){return n%400===0||n%4===0&&n%100!==0}function nCe(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(rCe[t]||(lZ(n)?29:28))}function aCe(n,t){return t>=1&&t<=(lZ(n)?366:365)}function iCe(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function sCe(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function oCe(n,t){return t>=0&&t<=59}});var mZ=D(pZ=>{"use strict";pZ.parseJSON=lCe;var uZ=$();function lCe(n,t){let e=n.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return e?(0,uZ.toDate)(Date.UTC(+e[1],+e[2]-1,+e[3],+e[4]-(+e[9]||0)*(e[8]=="-"?-1:1),+e[5]-(+e[10]||0)*(e[8]=="-"?-1:1),+e[6],+((e[7]||"0")+"00").substring(0,3)),t==null?void 0:t.in):(0,uZ.toDate)(NaN,t==null?void 0:t.in)}});var Ks=D(hZ=>{"use strict";hZ.previousDay=uCe;var cCe=bg(),dCe=Ig();function uCe(n,t,e){let r=(0,cCe.getDay)(n,e)-t;return r<=0&&(r+=7),(0,dCe.subDays)(n,r,e)}});var gZ=D(fZ=>{"use strict";fZ.previousFriday=mCe;var pCe=Ks();function mCe(n,t){return(0,pCe.previousDay)(n,5,t)}});var vZ=D(yZ=>{"use strict";yZ.previousMonday=fCe;var hCe=Ks();function fCe(n,t){return(0,hCe.previousDay)(n,1,t)}});var TZ=D(bZ=>{"use strict";bZ.previousSaturday=yCe;var gCe=Ks();function yCe(n,t){return(0,gCe.previousDay)(n,6,t)}});var wZ=D(kZ=>{"use strict";kZ.previousSunday=bCe;var vCe=Ks();function bCe(n,t){return(0,vCe.previousDay)(n,0,t)}});var DZ=D(SZ=>{"use strict";SZ.previousThursday=kCe;var TCe=Ks();function kCe(n,t){return(0,TCe.previousDay)(n,4,t)}});var xZ=D(EZ=>{"use strict";EZ.previousTuesday=SCe;var wCe=Ks();function SCe(n,t){return(0,wCe.previousDay)(n,2,t)}});var PZ=D(CZ=>{"use strict";CZ.previousWednesday=ECe;var DCe=Ks();function ECe(n,t){return(0,DCe.previousDay)(n,3,t)}});var AZ=D(MZ=>{"use strict";MZ.quartersToMonths=CCe;var xCe=ze();function CCe(n){return Math.trunc(n*xCe.monthsInQuarter)}});var _Z=D(IZ=>{"use strict";IZ.quartersToYears=MCe;var PCe=ze();function MCe(n){let t=n/PCe.quartersInYear;return Math.trunc(t)}});var RZ=D(NZ=>{"use strict";NZ.roundToNearestHours=NCe;var ACe=$s(),ICe=ke(),_Ce=$();function NCe(n,t){var u,p;let e=(u=t==null?void 0:t.nearestTo)!=null?u:1;if(e<1||e>12)return(0,ICe.constructFrom)((t==null?void 0:t.in)||n,NaN);let r=(0,_Ce.toDate)(n,t==null?void 0:t.in),a=r.getMinutes()/60,i=r.getSeconds()/60/60,s=r.getMilliseconds()/1e3/60/60,o=r.getHours()+a+i+s,l=(p=t==null?void 0:t.roundingMethod)!=null?p:"round",d=(0,ACe.getRoundingMethod)(l)(o/e)*e;return r.setHours(d,0,0,0),r}});var OZ=D(FZ=>{"use strict";FZ.roundToNearestMinutes=LCe;var RCe=$s(),FCe=ke(),OCe=$();function LCe(n,t){var d,u;let e=(d=t==null?void 0:t.nearestTo)!=null?d:1;if(e<1||e>30)return(0,FCe.constructFrom)(n,NaN);let r=(0,OCe.toDate)(n,t==null?void 0:t.in),a=r.getSeconds()/60,i=r.getMilliseconds()/1e3/60,s=r.getMinutes()+a+i,o=(u=t==null?void 0:t.roundingMethod)!=null?u:"round",c=(0,RCe.getRoundingMethod)(o)(s/e)*e;return r.setMinutes(c,0,0),r}});var BZ=D(LZ=>{"use strict";LZ.secondsToHours=jCe;var BCe=ze();function jCe(n){let t=n/BCe.secondsInHour;return Math.trunc(t)}});var HZ=D(jZ=>{"use strict";jZ.secondsToMilliseconds=zCe;var HCe=ze();function zCe(n){return n*HCe.millisecondsInSecond}});var UZ=D(zZ=>{"use strict";zZ.secondsToMinutes=WCe;var UCe=ze();function WCe(n){let t=n/UCe.secondsInMinute;return Math.trunc(t)}});var xk=D(WZ=>{"use strict";WZ.setMonth=YCe;var qCe=ke(),VCe=o0(),$Ce=$();function YCe(n,t,e){let r=(0,$Ce.toDate)(n,e==null?void 0:e.in),a=r.getFullYear(),i=r.getDate(),s=(0,qCe.constructFrom)((e==null?void 0:e.in)||n,0);s.setFullYear(a,t,15),s.setHours(0,0,0,0);let o=(0,VCe.getDaysInMonth)(s);return r.setMonth(t,Math.min(i,o)),r}});var VZ=D(qZ=>{"use strict";qZ.set=ZCe;var GCe=ke(),KCe=xk(),QCe=$();function ZCe(n,t,e){let r=(0,QCe.toDate)(n,e==null?void 0:e.in);return isNaN(+r)?(0,GCe.constructFrom)((e==null?void 0:e.in)||n,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=(0,KCe.setMonth)(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}});var YZ=D($Z=>{"use strict";$Z.setDate=XCe;var JCe=$();function XCe(n,t,e){let r=(0,JCe.toDate)(n,e==null?void 0:e.in);return r.setDate(t),r}});var KZ=D(GZ=>{"use strict";GZ.setDayOfYear=tPe;var ePe=$();function tPe(n,t,e){let r=(0,ePe.toDate)(n,e==null?void 0:e.in);return r.setMonth(0),r.setDate(t),r}});var JZ=D(ZZ=>{"use strict";ZZ.setDefaultOptions=rPe;var QZ=tn();function rPe(n){let t={},e=(0,QZ.getDefaultOptions)();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]===void 0?delete t[r]:t[r]=n[r]);(0,QZ.setDefaultOptions)(t)}});var eJ=D(XZ=>{"use strict";XZ.setHours=aPe;var nPe=$();function aPe(n,t,e){let r=(0,nPe.toDate)(n,e==null?void 0:e.in);return r.setHours(t),r}});var rJ=D(tJ=>{"use strict";tJ.setMilliseconds=sPe;var iPe=$();function sPe(n,t,e){let r=(0,iPe.toDate)(n,e==null?void 0:e.in);return r.setMilliseconds(t),r}});var aJ=D(nJ=>{"use strict";nJ.setMinutes=lPe;var oPe=$();function lPe(n,t,e){let r=(0,oPe.toDate)(n,e==null?void 0:e.in);return r.setMinutes(t),r}});var sJ=D(iJ=>{"use strict";iJ.setQuarter=uPe;var cPe=xk(),dPe=$();function uPe(n,t,e){let r=(0,dPe.toDate)(n,e==null?void 0:e.in),a=Math.trunc(r.getMonth()/3)+1,i=t-a;return(0,cPe.setMonth)(r,r.getMonth()+i*3)}});var lJ=D(oJ=>{"use strict";oJ.setSeconds=mPe;var pPe=$();function mPe(n,t,e){let r=(0,pPe.toDate)(n,e==null?void 0:e.in);return r.setSeconds(t),r}});var uJ=D(dJ=>{"use strict";dJ.setWeekYear=vPe;var hPe=tn(),fPe=ke(),gPe=qs(),cJ=gk(),yPe=$();function vPe(n,t,e){var l,c,d,u,p,m,h,f;let r=(0,hPe.getDefaultOptions)(),a=(f=(h=(u=(d=e==null?void 0:e.firstWeekContainsDate)!=null?d:(c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)!=null?u:r.firstWeekContainsDate)!=null?h:(m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?f:1,i=(0,gPe.differenceInCalendarDays)((0,yPe.toDate)(n,e==null?void 0:e.in),(0,cJ.startOfWeekYear)(n,e),e),s=(0,fPe.constructFrom)((e==null?void 0:e.in)||n,0);s.setFullYear(t,0,a),s.setHours(0,0,0,0);let o=(0,cJ.startOfWeekYear)(s,e);return o.setDate(o.getDate()+i),o}});var mJ=D(pJ=>{"use strict";pJ.setYear=kPe;var bPe=ke(),TPe=$();function kPe(n,t,e){let r=(0,TPe.toDate)(n,e==null?void 0:e.in);return isNaN(+r)?(0,bPe.constructFrom)((e==null?void 0:e.in)||n,NaN):(r.setFullYear(t),r)}});var fJ=D(hJ=>{"use strict";hJ.startOfDecade=SPe;var wPe=$();function SPe(n,t){let e=(0,wPe.toDate)(n,t==null?void 0:t.in),r=e.getFullYear(),a=Math.floor(r/10)*10;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}});var yJ=D(gJ=>{"use strict";gJ.startOfToday=EPe;var DPe=dg();function EPe(n){return(0,DPe.startOfDay)(Date.now(),n)}});var bJ=D(vJ=>{"use strict";vJ.startOfTomorrow=PPe;var xPe=ke(),CPe=br();function PPe(n){let t=(0,CPe.constructNow)(n==null?void 0:n.in),e=t.getFullYear(),r=t.getMonth(),a=t.getDate(),i=(0,xPe.constructFrom)(n==null?void 0:n.in,0);return i.setFullYear(e,r,a+1),i.setHours(0,0,0,0),i}});var wJ=D(kJ=>{"use strict";kJ.startOfYesterday=MPe;var TJ=br();function MPe(n){let t=(0,TJ.constructNow)(n==null?void 0:n.in),e=t.getFullYear(),r=t.getMonth(),a=t.getDate(),i=(0,TJ.constructNow)(n==null?void 0:n.in);return i.setFullYear(e,r,a-1),i.setHours(0,0,0,0),i}});var tA=D(SJ=>{"use strict";SJ.subMonths=IPe;var APe=Hu();function IPe(n,t,e){return(0,APe.addMonths)(n,-t,e)}});var EJ=D(DJ=>{"use strict";DJ.sub=FPe;var _Pe=ke(),NPe=Ig(),RPe=tA();function FPe(n,t,e){let{years:r=0,months:a=0,weeks:i=0,days:s=0,hours:o=0,minutes:l=0,seconds:c=0}=t,d=(0,RPe.subMonths)(n,a+r*12,e),u=(0,NPe.subDays)(d,s+i*7,e),p=l+o*60,h=(c+p*60)*1e3;return(0,_Pe.constructFrom)((e==null?void 0:e.in)||n,+u-h)}});var CJ=D(xJ=>{"use strict";xJ.subBusinessDays=LPe;var OPe=TP();function LPe(n,t,e){return(0,OPe.addBusinessDays)(n,-t,e)}});var MJ=D(PJ=>{"use strict";PJ.subHours=jPe;var BPe=kP();function jPe(n,t,e){return(0,BPe.addHours)(n,-t,e)}});var IJ=D(AJ=>{"use strict";AJ.subMilliseconds=zPe;var HPe=cg();function zPe(n,t,e){return(0,HPe.addMilliseconds)(n,-t,e)}});var NJ=D(_J=>{"use strict";_J.subMinutes=WPe;var UPe=JT();function WPe(n,t,e){return(0,UPe.addMinutes)(n,-t,e)}});var FJ=D(RJ=>{"use strict";RJ.subQuarters=VPe;var qPe=XT();function VPe(n,t,e){return(0,qPe.addQuarters)(n,-t,e)}});var LJ=D(OJ=>{"use strict";OJ.subSeconds=YPe;var $Pe=EP();function YPe(n,t,e){return(0,$Pe.addSeconds)(n,-t,e)}});var jJ=D(BJ=>{"use strict";BJ.subWeeks=KPe;var GPe=ug();function KPe(n,t,e){return(0,GPe.addWeeks)(n,-t,e)}});var zJ=D(HJ=>{"use strict";HJ.subYears=ZPe;var QPe=xP();function ZPe(n,t,e){return(0,QPe.addYears)(n,-t,e)}});var WJ=D(UJ=>{"use strict";UJ.weeksToDays=XPe;var JPe=ze();function XPe(n){return Math.trunc(n*JPe.daysInWeek)}});var VJ=D(qJ=>{"use strict";qJ.yearsToDays=t0e;var e0e=ze();function t0e(n){return Math.trunc(n*e0e.daysInYear)}});var YJ=D($J=>{"use strict";$J.yearsToMonths=n0e;var r0e=ze();function n0e(n){return Math.trunc(n*r0e.monthsInYear)}});var KJ=D(GJ=>{"use strict";GJ.yearsToQuarters=i0e;var a0e=ze();function i0e(n){return Math.trunc(n*a0e.quartersInYear)}});var IR=D(y=>{"use strict";var rA=gP();Object.keys(rA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===rA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return rA[n]}})});var nA=TP();Object.keys(nA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===nA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return nA[n]}})});var aA=Wi();Object.keys(aA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===aA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return aA[n]}})});var iA=kP();Object.keys(iA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===iA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return iA[n]}})});var sA=DP();Object.keys(sA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===sA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return sA[n]}})});var oA=cg();Object.keys(oA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===oA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return oA[n]}})});var lA=JT();Object.keys(lA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===lA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return lA[n]}})});var cA=Hu();Object.keys(cA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===cA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return cA[n]}})});var dA=XT();Object.keys(dA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===dA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return dA[n]}})});var uA=EP();Object.keys(uA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===uA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return uA[n]}})});var pA=ug();Object.keys(pA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===pA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return pA[n]}})});var mA=xP();Object.keys(mA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===mA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return mA[n]}})});var hA=G4();Object.keys(hA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===hA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return hA[n]}})});var fA=e6();Object.keys(fA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===fA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return fA[n]}})});var gA=MP();Object.keys(gA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===gA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return gA[n]}})});var yA=a6();Object.keys(yA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===yA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return yA[n]}})});var vA=Oc();Object.keys(vA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===vA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return vA[n]}})});var bA=c6();Object.keys(bA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===bA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return bA[n]}})});var TA=ke();Object.keys(TA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===TA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return TA[n]}})});var kA=br();Object.keys(kA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===kA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return kA[n]}})});var wA=p6();Object.keys(wA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===wA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return wA[n]}})});var SA=T6();Object.keys(SA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===SA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return SA[n]}})});var DA=qs();Object.keys(DA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===DA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return DA[n]}})});var EA=IP();Object.keys(EA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===EA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return EA[n]}})});var xA=x6();Object.keys(xA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===xA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return xA[n]}})});var CA=tk();Object.keys(CA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===CA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return CA[n]}})});var PA=NP();Object.keys(PA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===PA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return PA[n]}})});var MA=rk();Object.keys(MA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===MA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return MA[n]}})});var AA=nk();Object.keys(AA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===AA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return AA[n]}})});var IA=ak();Object.keys(IA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===IA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return IA[n]}})});var _A=ik();Object.keys(_A).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===_A[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return _A[n]}})});var NA=U6();Object.keys(NA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===NA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return NA[n]}})});var RA=sk();Object.keys(RA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===RA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return RA[n]}})});var FA=ok();Object.keys(FA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===FA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return FA[n]}})});var OA=pg();Object.keys(OA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===OA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return OA[n]}})});var LA=Z6();Object.keys(LA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===LA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return LA[n]}})});var BA=mg();Object.keys(BA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===BA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return BA[n]}})});var jA=e5();Object.keys(jA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===jA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return jA[n]}})});var HA=LP();Object.keys(HA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===HA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return HA[n]}})});var zA=BP();Object.keys(zA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===zA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return zA[n]}})});var UA=s5();Object.keys(UA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===UA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return UA[n]}})});var WA=l5();Object.keys(WA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===WA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return WA[n]}})});var qA=d5();Object.keys(qA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===qA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return qA[n]}})});var VA=m5();Object.keys(VA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===VA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return VA[n]}})});var $A=f5();Object.keys($A).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===$A[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return $A[n]}})});var YA=mk();Object.keys(YA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===YA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return YA[n]}})});var GA=b5();Object.keys(GA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===GA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return GA[n]}})});var KA=S5();Object.keys(KA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===KA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return KA[n]}})});var QA=E5();Object.keys(QA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===QA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return QA[n]}})});var ZA=lk();Object.keys(ZA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===ZA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return ZA[n]}})});var JA=C5();Object.keys(JA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===JA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return JA[n]}})});var XA=M5();Object.keys(XA).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===XA[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return XA[n]}})});var eI=_5();Object.keys(eI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===eI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return eI[n]}})});var tI=R5();Object.keys(tI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===tI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return tI[n]}})});var rI=O5();Object.keys(rI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===rI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return rI[n]}})});var nI=ck();Object.keys(nI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===nI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return nI[n]}})});var aI=B5();Object.keys(aI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===aI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return aI[n]}})});var iI=H5();Object.keys(iI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===iI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return iI[n]}})});var sI=U5();Object.keys(sI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===sI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return sI[n]}})});var oI=V5();Object.keys(oI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===oI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return oI[n]}})});var lI=HP();Object.keys(lI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===lI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return lI[n]}})});var cI=jP();Object.keys(cI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===cI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return cI[n]}})});var dI=Y5();Object.keys(dI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===dI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return dI[n]}})});var uI=n0();Object.keys(uI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===uI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return uI[n]}})});var pI=a0();Object.keys(pI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===pI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return pI[n]}})});var mI=i0();Object.keys(mI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===mI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return mI[n]}})});var hI=PK();Object.keys(hI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===hI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return hI[n]}})});var fI=AK();Object.keys(fI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===fI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return fI[n]}})});var gI=_K();Object.keys(gI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===gI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return gI[n]}})});var yI=RK();Object.keys(yI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===yI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return yI[n]}})});var vI=OK();Object.keys(vI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===vI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return vI[n]}})});var bI=BK();Object.keys(bI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===bI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return bI[n]}})});var TI=HK();Object.keys(TI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===TI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return TI[n]}})});var kI=UK();Object.keys(kI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===kI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return kI[n]}})});var wI=qK();Object.keys(wI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===wI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return wI[n]}})});var SI=$K();Object.keys(SI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===SI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return SI[n]}})});var DI=s0();Object.keys(DI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===DI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return DI[n]}})});var EI=bg();Object.keys(EI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===EI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return EI[n]}})});var xI=GP();Object.keys(xI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===xI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return xI[n]}})});var CI=o0();Object.keys(CI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===CI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return CI[n]}})});var PI=JK();Object.keys(PI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===PI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return PI[n]}})});var MI=e8();Object.keys(MI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===MI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return MI[n]}})});var AI=c0();Object.keys(AI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===AI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return AI[n]}})});var II=n8();Object.keys(II).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===II[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return II[n]}})});var _I=d0();Object.keys(_I).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===_I[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return _I[n]}})});var NI=fk();Object.keys(NI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===NI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return NI[n]}})});var RI=$o();Object.keys(RI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===RI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return RI[n]}})});var FI=o8();Object.keys(FI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===FI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return FI[n]}})});var OI=c8();Object.keys(OI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===OI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return OI[n]}})});var LI=u8();Object.keys(LI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===LI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return LI[n]}})});var BI=m8();Object.keys(BI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===BI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return BI[n]}})});var jI=g8();Object.keys(jI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===jI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return jI[n]}})});var HI=_P();Object.keys(HI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===HI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return HI[n]}})});var zI=v8();Object.keys(zI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===zI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return zI[n]}})});var UI=T8();Object.keys(UI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===UI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return UI[n]}})});var WI=w8();Object.keys(WI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===WI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return WI[n]}})});var qI=yk();Object.keys(qI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===qI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return qI[n]}})});var VI=D8();Object.keys(VI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===VI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return VI[n]}})});var $I=yg();Object.keys($I).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===$I[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return $I[n]}})});var YI=P8();Object.keys(YI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===YI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return YI[n]}})});var GI=A8();Object.keys(GI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===GI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return GI[n]}})});var KI=_8();Object.keys(KI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===KI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return KI[n]}})});var QI=R8();Object.keys(QI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===QI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return QI[n]}})});var ZI=O8();Object.keys(ZI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===ZI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return ZI[n]}})});var JI=B8();Object.keys(JI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===JI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return JI[n]}})});var XI=H8();Object.keys(XI).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===XI[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return XI[n]}})});var e_=U8();Object.keys(e_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===e_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return e_[n]}})});var t_=G8();Object.keys(t_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===t_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return t_[n]}})});var r_=Z8();Object.keys(r_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===r_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return r_[n]}})});var n_=e9();Object.keys(n_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===n_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return n_[n]}})});var a_=AP();Object.keys(a_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===a_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return a_[n]}})});var i_=n9();Object.keys(i_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===i_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return i_[n]}})});var s_=i9();Object.keys(s_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===s_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return s_[n]}})});var o_=o9();Object.keys(o_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===o_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return o_[n]}})});var l_=c9();Object.keys(l_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===l_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return l_[n]}})});var c_=u9();Object.keys(c_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===c_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return c_[n]}})});var d_=FP();Object.keys(d_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===d_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return d_[n]}})});var u_=l0();Object.keys(u_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===u_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return u_[n]}})});var p_=p7();Object.keys(p_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===p_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return p_[n]}})});var m_=h7();Object.keys(m_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===m_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return m_[n]}})});var h_=g7();Object.keys(h_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===h_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return h_[n]}})});var f_=Uu();Object.keys(f_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===f_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return f_[n]}})});var g_=UM();Object.keys(g_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===g_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return g_[n]}})});var y_=WM();Object.keys(y_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===y_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return y_[n]}})});var v_=E7();Object.keys(v_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===v_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return v_[n]}})});var b_=VM();Object.keys(b_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===b_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return b_[n]}})});var T_=$M();Object.keys(T_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===T_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return T_[n]}})});var k_=YM();Object.keys(k_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===k_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return k_[n]}})});var w_=KM();Object.keys(w_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===w_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return w_[n]}})});var S_=Sk();Object.keys(S_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===S_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return S_[n]}})});var D_=QM();Object.keys(D_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===D_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return D_[n]}})});var E_=yP();Object.keys(E_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===E_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return E_[n]}})});var x_=vP();Object.keys(x_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===x_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return x_[n]}})});var C_=L7();Object.keys(C_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===C_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return C_[n]}})});var P_=j7();Object.keys(P_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===P_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return P_[n]}})});var M_=z7();Object.keys(M_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===M_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return M_[n]}})});var A_=W7();Object.keys(A_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===A_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return A_[n]}})});var I_=V7();Object.keys(I_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===I_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return I_[n]}})});var __=Y7();Object.keys(__).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===__[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return __[n]}})});var N_=K7();Object.keys(N_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===N_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return N_[n]}})});var R_=Z7();Object.keys(R_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===R_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return R_[n]}})});var F_=X7();Object.keys(F_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===F_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return F_[n]}})});var O_=tQ();Object.keys(O_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===O_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return O_[n]}})});var L_=nQ();Object.keys(L_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===L_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return L_[n]}})});var B_=iQ();Object.keys(B_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===B_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return B_[n]}})});var j_=Vs();Object.keys(j_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===j_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return j_[n]}})});var H_=oQ();Object.keys(H_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===H_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return H_[n]}})});var z_=lg();Object.keys(z_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===z_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return z_[n]}})});var U_=cQ();Object.keys(U_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===U_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return U_[n]}})});var W_=pQ();Object.keys(W_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===W_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return W_[n]}})});var q_=fQ();Object.keys(q_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===q_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return q_[n]}})});var V_=vQ();Object.keys(V_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===V_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return V_[n]}})});var $_=TQ();Object.keys($_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===$_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return $_[n]}})});var Y_=u0();Object.keys(Y_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===Y_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return Y_[n]}})});var G_=wQ();Object.keys(G_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===G_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return G_[n]}})});var K_=JM();Object.keys(K_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===K_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return K_[n]}})});var Q_=DQ();Object.keys(Q_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===Q_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return Q_[n]}})});var Z_=xQ();Object.keys(Z_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===Z_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return Z_[n]}})});var J_=CP();Object.keys(J_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===J_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return J_[n]}})});var X_=MQ();Object.keys(X_).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===X_[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return X_[n]}})});var eN=IQ();Object.keys(eN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===eN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return eN[n]}})});var tN=NQ();Object.keys(tN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===tN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return tN[n]}})});var rN=FQ();Object.keys(rN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===rN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return rN[n]}})});var nN=PP();Object.keys(nN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===nN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return nN[n]}})});var aN=LQ();Object.keys(aN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===aN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return aN[n]}})});var iN=jQ();Object.keys(iN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===iN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return iN[n]}})});var sN=zQ();Object.keys(sN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===sN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return sN[n]}})});var oN=WQ();Object.keys(oN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===oN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return oN[n]}})});var lN=VQ();Object.keys(lN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===lN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return lN[n]}})});var cN=Gs();Object.keys(cN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===cN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return cN[n]}})});var dN=GQ();Object.keys(dN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===dN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return dN[n]}})});var uN=QQ();Object.keys(uN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===uN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return uN[n]}})});var pN=JQ();Object.keys(pN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===pN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return pN[n]}})});var mN=eZ();Object.keys(mN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===mN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return mN[n]}})});var hN=rZ();Object.keys(hN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===hN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return hN[n]}})});var fN=aZ();Object.keys(fN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===fN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return fN[n]}})});var gN=sZ();Object.keys(gN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===gN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return gN[n]}})});var yN=HM();Object.keys(yN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===yN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return yN[n]}})});var vN=dZ();Object.keys(vN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===vN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return vN[n]}})});var bN=mZ();Object.keys(bN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===bN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return bN[n]}})});var TN=Ks();Object.keys(TN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===TN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return TN[n]}})});var kN=gZ();Object.keys(kN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===kN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return kN[n]}})});var wN=vZ();Object.keys(wN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===wN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return wN[n]}})});var SN=TZ();Object.keys(SN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===SN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return SN[n]}})});var DN=wZ();Object.keys(DN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===DN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return DN[n]}})});var EN=DZ();Object.keys(EN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===EN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return EN[n]}})});var xN=xZ();Object.keys(xN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===xN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return xN[n]}})});var CN=PZ();Object.keys(CN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===CN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return CN[n]}})});var PN=AZ();Object.keys(PN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===PN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return PN[n]}})});var MN=_Z();Object.keys(MN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===MN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return MN[n]}})});var AN=RZ();Object.keys(AN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===AN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return AN[n]}})});var IN=OZ();Object.keys(IN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===IN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return IN[n]}})});var _N=BZ();Object.keys(_N).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===_N[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return _N[n]}})});var NN=HZ();Object.keys(NN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===NN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return NN[n]}})});var RN=UZ();Object.keys(RN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===RN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return RN[n]}})});var FN=VZ();Object.keys(FN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===FN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return FN[n]}})});var ON=YZ();Object.keys(ON).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===ON[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return ON[n]}})});var LN=Eg();Object.keys(LN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===LN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return LN[n]}})});var BN=KZ();Object.keys(BN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===BN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return BN[n]}})});var jN=JZ();Object.keys(jN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===jN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return jN[n]}})});var HN=eJ();Object.keys(HN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===HN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return HN[n]}})});var zN=oM();Object.keys(zN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===zN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return zN[n]}})});var UN=q0();Object.keys(UN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===UN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return UN[n]}})});var WN=SP();Object.keys(WN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===WN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return WN[n]}})});var qN=rJ();Object.keys(qN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===qN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return qN[n]}})});var VN=aJ();Object.keys(VN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===VN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return VN[n]}})});var $N=xk();Object.keys($N).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===$N[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return $N[n]}})});var YN=sJ();Object.keys(YN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===YN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return YN[n]}})});var GN=lJ();Object.keys(GN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===GN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return GN[n]}})});var KN=z0();Object.keys(KN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===KN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return KN[n]}})});var QN=uJ();Object.keys(QN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===QN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return QN[n]}})});var ZN=mJ();Object.keys(ZN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===ZN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return ZN[n]}})});var JN=dg();Object.keys(JN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===JN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return JN[n]}})});var XN=fJ();Object.keys(XN).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===XN[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return XN[n]}})});var eR=zM();Object.keys(eR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===eR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return eR[n]}})});var tR=qi();Object.keys(tR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===tR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return tR[n]}})});var rR=zu();Object.keys(rR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===rR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return rR[n]}})});var nR=qM();Object.keys(nR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===nR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return nR[n]}})});var aR=hg();Object.keys(aR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===aR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return aR[n]}})});var iR=dk();Object.keys(iR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===iR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return iR[n]}})});var sR=GM();Object.keys(sR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===sR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return sR[n]}})});var oR=yJ();Object.keys(oR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===oR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return oR[n]}})});var lR=bJ();Object.keys(lR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===lR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return lR[n]}})});var cR=ci();Object.keys(cR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===cR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return cR[n]}})});var dR=gk();Object.keys(dR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===dR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return dR[n]}})});var uR=hk();Object.keys(uR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===uR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return uR[n]}})});var pR=wJ();Object.keys(pR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===pR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return pR[n]}})});var mR=EJ();Object.keys(mR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===mR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return mR[n]}})});var hR=CJ();Object.keys(hR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===hR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return hR[n]}})});var fR=Ig();Object.keys(fR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===fR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return fR[n]}})});var gR=MJ();Object.keys(gR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===gR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return gR[n]}})});var yR=RP();Object.keys(yR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===yR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return yR[n]}})});var vR=IJ();Object.keys(vR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===vR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return vR[n]}})});var bR=NJ();Object.keys(bR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===bR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return bR[n]}})});var TR=tA();Object.keys(TR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===TR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return TR[n]}})});var kR=FJ();Object.keys(kR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===kR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return kR[n]}})});var wR=LJ();Object.keys(wR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===wR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return wR[n]}})});var SR=jJ();Object.keys(SR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===SR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return SR[n]}})});var DR=zJ();Object.keys(DR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===DR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return DR[n]}})});var ER=$();Object.keys(ER).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===ER[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return ER[n]}})});var xR=g0();Object.keys(xR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===xR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return xR[n]}})});var CR=WJ();Object.keys(CR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===CR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return CR[n]}})});var PR=VJ();Object.keys(PR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===PR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return PR[n]}})});var MR=YJ();Object.keys(MR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===MR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return MR[n]}})});var AR=KJ();Object.keys(AR).forEach(function(n){n==="default"||n==="__esModule"||n in y&&y[n]===AR[n]||Object.defineProperty(y,n,{enumerable:!0,get:function(){return AR[n]}})})});var ZJ={};Be(ZJ,{TaskSelectionService:()=>_R});var _R,JJ=b(()=>{_R=class{constructor(t){this.selectedTaskPaths=new Set;this.lastSelectedPath=null;this.primarySelectedPath=null;this.selectionModeActive=!1;this.selectionModeListeners=[];this.selectionChangeListeners=[];this.plugin=t}isSelectionModeActive(){return this.selectionModeActive}enterSelectionMode(){this.selectionModeActive||(this.selectionModeActive=!0,this.notifySelectionModeChange(!0))}exitSelectionMode(t=!1){this.selectionModeActive&&(this.selectionModeActive=!1,t&&this.clearSelection(),this.notifySelectionModeChange(!1))}toggleSelectionMode(){this.selectionModeActive?this.exitSelectionMode():this.enterSelectionMode()}isSelected(t){return this.selectedTaskPaths.has(t)}toggleSelection(t){this.selectedTaskPaths.has(t)?(this.selectedTaskPaths.delete(t),this.primarySelectedPath===t&&(this.primarySelectedPath=this.selectedTaskPaths.size>0?Array.from(this.selectedTaskPaths)[0]:null)):(this.selectedTaskPaths.size===0&&(this.primarySelectedPath=t),this.selectedTaskPaths.add(t)),this.lastSelectedPath=t,this.selectedTaskPaths.size>0&&!this.selectionModeActive&&this.enterSelectionMode(),this.selectedTaskPaths.size===0&&this.selectionModeActive&&this.exitSelectionMode(),this.notifySelectionChange()}selectTask(t){this.selectedTaskPaths.clear(),this.selectedTaskPaths.add(t),this.lastSelectedPath=t,this.primarySelectedPath=t,this.notifySelectionChange()}addToSelection(t){this.selectedTaskPaths.size===0&&(this.primarySelectedPath=t),this.selectedTaskPaths.add(t),this.lastSelectedPath=t,this.notifySelectionChange()}removeFromSelection(t){this.selectedTaskPaths.delete(t),this.notifySelectionChange()}selectRange(t,e){if(!this.lastSelectedPath){this.selectTask(t);return}let r=e.indexOf(this.lastSelectedPath),a=e.indexOf(t);if(r===-1||a===-1){this.toggleSelection(t);return}let i=Math.min(r,a),s=Math.max(r,a);for(let o=i;o<=s;o++)this.selectedTaskPaths.add(e[o]);this.lastSelectedPath=t,this.notifySelectionChange()}selectAll(t){this.selectedTaskPaths.size===0&&t.length>0&&(this.primarySelectedPath=t[0]);for(let e of t)this.selectedTaskPaths.add(e);t.length>0&&(this.lastSelectedPath=t[t.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 t=[];for(let e of this.selectedTaskPaths){let r=await this.plugin.cacheManager.getTaskInfo(e);r&&t.push(r)}return t}onSelectionModeChange(t){return this.selectionModeListeners.push(t),()=>{let e=this.selectionModeListeners.indexOf(t);e!==-1&&this.selectionModeListeners.splice(e,1)}}onSelectionChange(t){return this.selectionChangeListeners.push(t),()=>{let e=this.selectionChangeListeners.indexOf(t);e!==-1&&this.selectionChangeListeners.splice(e,1)}}notifySelectionModeChange(t){for(let e of this.selectionModeListeners)try{e(t)}catch(r){console.error("[TaskSelectionService] Error in selection mode listener:",r)}}notifySelectionChange(){let t=this.getSelectedPaths();for(let e of this.selectionChangeListeners)try{e(t)}catch(r){console.error("[TaskSelectionService] Error in selection change listener:",r)}}destroy(){this.selectedTaskPaths.clear(),this.selectionModeListeners=[],this.selectionChangeListeners=[]}}});var XJ={};Be(XJ,{BasesFilterConverter:()=>NR});var NR,eX=b(()=>{NR=class{constructor(t){this.plugin=t,this.statusManager=t.statusManager,this.priorityManager=t.priorityManager}convertToBasesFilter(t){try{let e=this.convertNodeToObject(t);return e||null}catch(e){throw console.error("Error converting TaskNotes filter to Bases:",e),new Error(`Failed to convert filter: ${e.message}`)}}convertNodeToObject(t){return t.type=="group"?this.convertGroupToObject(t):t.type=="condition"?this.convertConditionToString(t):null}convertGroupToObject(t){let e=t.children.filter(i=>i.type=="condition"?this.isConditionComplete(i):!0);if(e.length==0)return null;let r=e.map(i=>this.convertNodeToObject(i)).filter(i=>i!==null);return r.length==0?null:r.length===1?r[0]:{[t.conjunction=="and"?"and":"or"]:r}}convertConditionToString(t){let{property:e,operator:r,value:a}=t;if(e=="status.isCompleted")return this.convertCompletedStatusCondition(r,a);if(e.startsWith("user:"))return this.convertUserFieldCondition(e,r,a);let i=this.getBasesPropertyPath(e);return this.convertOperator(i,r,a,e)}isConditionComplete(t){let{property:e,operator:r,value:a}=t;return!e||!r?!1:["is-empty","is-not-empty","is-checked","is-not-checked"].includes(r)?!0:a!=null&&a!==""}convertCompletedStatusCondition(t,e){let r=this.statusManager.getCompletedStatuses(),a=this.plugin.fieldMapper,i=a.toUserField("status"),s=r.map(u=>`note.${i} == "${this.escapeString(u)}"`).join(" || "),o=r.length>1?`(${s})`:s,l=a.toUserField("completeInstances"),c=`note.${l} && note.${l}.map(date(value).format("YYYY-MM-DD")).contains(today().format("YYYY-MM-DD"))`,d=`(${o}) || (${c})`;return t=="is-not-checked"||t=="is-not"?`!(${d})`:d}convertUserFieldCondition(t,e,r){let a=t.slice(5),s=(this.plugin.settings.userFields||[]).find(l=>(l.id||l.key)===a||l.key===a);if(!s)return console.warn(`User field not found: ${a}`),"true";let o=`note.${s.key}`;return this.convertOperator(o,e,r,t,s.type)}getBasesPropertyPath(t){let e=this.plugin.fieldMapper,r;switch(t){case"title":r=e.toUserField("title");break;case"status":r=e.toUserField("status");break;case"priority":r=e.toUserField("priority");break;case"due":r=e.toUserField("due");break;case"scheduled":r=e.toUserField("scheduled");break;case"contexts":r=e.toUserField("contexts");break;case"projects":r=e.toUserField("projects");break;case"tags":return"file.tags";case"path":return"file.path";case"dateCreated":return"file.ctime";case"dateModified":return"file.mtime";case"archived":return`file.tags.contains("${this.escapeString(e.toUserField("archiveTag"))}")`;case"timeEstimate":r=e.toUserField("timeEstimate");break;case"completedDate":r=e.toUserField("completedDate");break;case"recurrence":r=e.toUserField("recurrence");break;case"blockedBy":r=e.toUserField("blockedBy");break;case"blocking":r="blocking";break;case"dependencies.isBlocked":case"dependencies.isBlocking":return t=="dependencies.isBlocked"?`note.${e.toUserField("blockedBy")} && note.${e.toUserField("blockedBy")}.length > 0`:"false";default:r=t}return`note.${r}`}convertOperator(t,e,r,a,i){switch(e){case"is":return this.convertIsOperator(t,r,i);case"is-not":return`!(${this.convertIsOperator(t,r,i)})`;case"contains":return this.convertContainsOperator(t,r,a);case"does-not-contain":return`!(${this.convertContainsOperator(t,r,a)})`;case"is-before":return`${t} < "${this.escapeString(String(r))}"`;case"is-after":return`${t} > "${this.escapeString(String(r))}"`;case"is-on-or-before":return`${t} <= "${this.escapeString(String(r))}"`;case"is-on-or-after":return`${t} >= "${this.escapeString(String(r))}"`;case"is-empty":return`${t}.isEmpty()`;case"is-not-empty":return`!${t}.isEmpty()`;case"is-checked":return`${t} == true`;case"is-not-checked":return`${t} != true`;case"is-greater-than":return`${t} > ${this.formatNumericValue(r)}`;case"is-less-than":return`${t} < ${this.formatNumericValue(r)}`;case"is-greater-than-or-equal":return`${t} >= ${this.formatNumericValue(r)}`;case"is-less-than-or-equal":return`${t} <= ${this.formatNumericValue(r)}`;default:return console.warn(`Unknown operator: ${e}`),"true"}}convertIsOperator(t,e,r){if(Array.isArray(e)){if(e.length==0)return`(!${t} || ${t}.length == 0)`;let a=e.map(i=>`${t}.contains("${this.escapeString(String(i))}")`);return a.length>1?`(${a.join(" || ")})`:a[0]}return r=="list"?`${t}.contains("${this.escapeString(String(e))}")`:typeof e=="boolean"||r=="boolean"?`${t} == ${e}`:typeof e=="number"||r=="number"?`${t} == ${e}`:e==null||e==""?`(!${t} || ${t} == "" || ${t} == null)`:`${t} == "${this.escapeString(String(e))}"`}convertContainsOperator(t,e,r){if(["tags","contexts","projects"].includes(r)){if(Array.isArray(e)){let i=e.map(s=>`${t}.contains("${this.escapeString(String(s))}")`);return i.length>1?`(${i.join(" || ")})`:i[0]}if(r=="projects"){let i=String(e);return i.startsWith("[[")&&i.endsWith("]]")?`${t}.contains("${this.escapeString(i)}")`:`(${t}.contains("[[${this.escapeString(i)}]]") || ${t}.contains("${this.escapeString(i)}"))`}return`${t}.contains("${this.escapeString(String(e))}")`}return`${t}.lower().contains("${this.escapeString(String(e).toLowerCase())}")`}formatNumericValue(t){if(typeof t=="number")return String(t);let e=parseFloat(String(t));return isNaN(e)?"0":String(e)}escapeString(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}filterObjectToYAML(t,e=0){let r=" ".repeat(e);if(typeof t=="string")return`'${t.replace(/'/g,"\\'")}'`;if(Array.isArray(t))return t.map(a=>` +${r}- ${this.filterObjectToYAML(a,e+1)}`).join("");if(typeof t=="object"&&t!==null){let a=Object.keys(t)[0],i=t[a];return Array.isArray(i)?` +${r}${a}:${i.map(s=>` +${r} - ${this.filterObjectToYAML(s,e+2)}`).join("")}`:` +${r}${a}: ${this.filterObjectToYAML(i,e+1)}`}return String(t)}convertSavedViewToBasesFile(t,e="tasknotesTaskList"){let r=this.convertToBasesFilter(t.query),a=`# ${t.name} + +`;if(r&&(a+=`filters:${this.filterObjectToYAML(r,1)} + +`),a+=`views: +`,a+=` - type: ${e} +`,a+=` name: "${t.name}" +`,t.query.sortKey&&t.query.sortKey!=="none"){let i=this.mapSortKeyToBasesColumn(t.query.sortKey),s=(t.query.sortDirection||"asc").toUpperCase();a+=` sort: +`,a+=` - column: ${i} +`,a+=` direction: ${s} +`}if(t.query.groupKey&&t.query.groupKey!=="none"){let i=this.mapGroupKeyToBasesColumn(t.query.groupKey),s=(t.query.sortDirection||"asc").toUpperCase();a+=` groupBy: +`,a+=` property: ${i} +`,a+=` direction: ${s} +`}return t.viewOptions&&Object.keys(t.viewOptions).length>0&&(a+=` options: +`,Object.entries(t.viewOptions).forEach(([i,s])=>{let o;typeof s=="boolean"||typeof s=="number"?o=String(s):typeof s=="string"?o=`"${this.escapeString(s)}"`:o=JSON.stringify(s),a+=` ${i}: ${o} +`})),a}mapSortKeyToBasesColumn(t){let e=this.plugin.fieldMapper;switch(t){case"due":return e.toUserField("due");case"scheduled":return e.toUserField("scheduled");case"priority":return e.toUserField("priority");case"status":return e.toUserField("status");case"title":return e.toUserField("title");case"dateCreated":return"file.ctime";case"dateModified":return"file.mtime";case"completedDate":return e.toUserField("completedDate");case"tags":return"file.tags";case"path":return"file.path";case"timeEstimate":return e.toUserField("timeEstimate");case"recurrence":return e.toUserField("recurrence");default:if(t.startsWith("user:")){let r=t.slice(5),i=(this.plugin.settings.userFields||[]).find(s=>(s.id||s.key)===r||s.key===r);return(i==null?void 0:i.key)||t}return t}}mapGroupKeyToBasesColumn(t){return this.mapSortKeyToBasesColumn(t)}convertAllSavedViewsToBasesFile(t){if(!t||t.length==0)return"";let e=`# All Saved Views +`;e+=`# Converted from TaskNotes saved views + +`;let r=[];for(let a of t){let i=this.detectViewType(a),s=this.convertToBasesFilter(a.query),o=` - type: ${i} +`;if(o+=` name: "${a.name}" +`,s&&(o+=` filters:${this.filterObjectToYAML(s,3)} +`),a.query.sortKey&&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} +`})),r.push(o)}return e+=`views: +`,e+=r.join(` +`),e}detectViewType(t){let e=t.viewOptions||{};return["showScheduled","showDue","showRecurring","showTimeEntries","showTimeblocks","showPropertyBasedEvents","calendarView","customDayCount","firstDay","slotMinTime","slotMaxTime","slotDuration"].some(o=>o in e)?"tasknotesCalendar":["columnWidth","hideEmptyColumns"].some(o=>o in e)?"tasknotesKanban":"tasknotesTaskList"}}});var Ak,tX=b(()=>{Ak=class{constructor(t){this.basesView=t}extractDataItems(){return this.basesView.data.data.map(e=>({key:e.file.path,data:e,file:e.file,path:e.file.path,properties:this.extractEntryProperties(e),basesData:e}))}getGroupedData(){return this.basesView.data.groupedData}isGrouped(){let t=this.basesView.data.groupedData;return t.length!==1?!0:t[0].hasKey()}getSortConfig(){return this.basesView.config.getSort()}getVisiblePropertyIds(){return this.basesView.config.getOrder()}getPropertyDisplayName(t){return this.basesView.config.getDisplayName(t)}getPropertyValue(t,e){try{let r=t.getValue(e);return this.convertValueToNative(r)}catch(r){return console.warn(`[BasesDataAdapter] Failed to get property ${e}:`,r),null}}convertValueToNative(t){var e,r;if(t==null||((e=t.constructor)==null?void 0:e.name)==="NullValue")return null;if(typeof t.data!="undefined")return t.data;if(typeof t.length=="function"){let a=t.length(),i=[];for(let s=0;s0?e.join(", "):"None":String(e)}extractEntryProperties(t){let r={...t.frontmatter||t.properties||{}},a=t.file;return a&&(a.name!==void 0&&(r["file.name"]=a.name),a.basename!==void 0&&(r["file.basename"]=a.basename),a.extension!==void 0&&(r["file.extension"]=a.extension),a.path!==void 0&&(r["file.path"]=a.path),a.stat&&(a.stat.size!==void 0&&(r["file.size"]=a.stat.size),a.stat.ctime!==void 0&&(r["file.ctime"]=a.stat.ctime),a.stat.mtime!==void 0&&(r["file.mtime"]=a.stat.mtime))),r}getComputedProperty(t,e){if(!t)return null;try{let r=t.getValue(e);return this.convertValueToNative(r)}catch(r){return null}}stripPropertyPrefix(t){let e=t.split(".");return e.length>1&&["note","file","formula"].includes(e[0])?e.slice(1).join("."):t}}});var Ik,rX=b(()=>{Ik=class{constructor(t,e){this.plugin=t;this.fieldMapper=e}basesToTaskCardProperty(t){if(this.fieldMapper&&this.fieldMapper.isRecognizedProperty(t))return this.applySpecialTransformations(t);if(t.startsWith("note.")){let e=t.substring(5);return this.fieldMapper&&this.fieldMapper.isRecognizedProperty(e)?this.applySpecialTransformations(e):e==="dateCreated"?"dateCreated":e==="dateModified"?"dateModified":e==="completedDate"?"completedDate":this.applySpecialTransformations(e)}if(t.startsWith("task.")){let e=t.substring(5);return this.fieldMapper&&this.fieldMapper.isRecognizedProperty(e)?this.applySpecialTransformations(e):this.applySpecialTransformations(e)}return t.startsWith("file.")?t==="file.ctime"?"dateCreated":t==="file.mtime"?"dateModified":t:t.startsWith("formula.")?t:this.applySpecialTransformations(t)}internalToUserProperty(t){let e=this.fieldMapper.getMapping();return t in e?this.fieldMapper.toUserField(t):t}userPropertyToInternal(t){return this.fieldMapper.fromUserField(t)||t}basesToUserProperty(t){let e=this.basesToInternal(t);return this.internalToUserProperty(e)}applySpecialTransformations(t){return t==="timeEntries"?"totalTrackedTime":t==="blockedBy"?"blocked":t}basesToInternal(t){return this.basesToTaskCardProperty(t)}basesToTaskInfoProperty(t){var a;let e=t.replace(/^(note\.|file\.|task\.)/,""),r=(a=this.fieldMapper)==null?void 0:a.fromUserField(e);return r||(e==="ctime"||t==="file.ctime"?"dateCreated":e==="mtime"||t==="file.mtime"?"dateModified":e==="name"||e==="basename"?"title":e)}mapVisibleProperties(t){return t.map(e=>this.basesToTaskCardProperty(e))}}});var nX,_k,aX=b(()=>{nX=require("obsidian");es();_k=class{constructor(t,e,r=300){this.searchBoxEl=null;this.inputEl=null;this.clearBtnEl=null;this.debouncedSearch=null;this.destroyed=!1;this.handleInput=()=>{if(!this.inputEl)return;let t=this.inputEl.value;this.updateClearButtonVisibility(),this.debouncedSearch&&this.debouncedSearch(t)};this.handleKeydown=t=>{t.key==="Escape"&&(this.clear(),this.debouncedSearch&&this.debouncedSearch(""))};this.handleClear=()=>{var t;this.clear(),this.debouncedSearch&&this.debouncedSearch(""),(t=this.inputEl)==null||t.focus()};this.container=t,this.onSearch=e,this.debounceMs=r,this.debouncedSearch=nd(a=>{this.destroyed||this.onSearch(a)},this.debounceMs,!1)}render(){this.searchBoxEl=document.createElement("div"),this.searchBoxEl.className="tn-search-box";let t=document.createElement("div");t.className="tn-search-box__input-wrapper";let e=document.createElement("div");e.className="tn-search-box__icon",(0,nX.setIcon)(e,"search"),this.inputEl=document.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 r=document.createElement("button");return r.type="button",r.className="tn-search-box__clear",r.textContent="\xD7",r.setAttribute("aria-label","Clear search"),this.clearBtnEl=r,t.appendChild(e),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 t;return((t=this.inputEl)==null?void 0:t.value)||""}setValue(t){this.inputEl&&(this.inputEl.value=t,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 Nk,iX=b(()=>{Nk=class{constructor(t){this.visibleProperties=t||[]}filterTasks(t,e){let r=this.normalizeSearchTerm(e);return r?t.filter(a=>this.extractSearchableText(a).includes(r)):t}extractSearchableText(t){let e=[];if(e.push(t.title||""),e.push(t.status||""),e.push(t.priority||""),t.tags&&Array.isArray(t.tags)&&e.push(t.tags.join(" ")),t.contexts&&Array.isArray(t.contexts)&&e.push(t.contexts.join(" ")),t.projects&&Array.isArray(t.projects)&&e.push(t.projects.join(" ")),t.customProperties&&this.visibleProperties.length>0)for(let r of this.visibleProperties){let a=t.customProperties[r];a!=null&&(Array.isArray(a)?e.push(a.join(" ")):e.push(String(a)))}return e.join(" ").toLowerCase()}normalizeSearchTerm(t){return t.trim().toLowerCase()}}});var Rk,Gi,Ng=b(()=>{Rk=require("obsidian");tX();rX();Wn();ko();to();aX();iX();qv();Gi=class extends Rk.Component{constructor(e,r,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=r,this.dataAdapter=new Ak(this),this.propertyMapper=new Ik(a,a.fieldMapper),this.createFileForView=this.createFileForView.bind(this)}onload(){this.setupContainer(),this.setupTaskUpdateListener(),this.setupSelectionHandling(),this.updateRelevantPathsCache(),this.render()}onDataUpdated(){var e;(e=this.rootElement)!=null&&e.isConnected&&(this.dataUpdateDebounceTimer&&clearTimeout(this.dataUpdateDebounceTimer),this.dataUpdateDebounceTimer=window.setTimeout(()=>{this.dataUpdateDebounceTimer=null;try{this.render()}catch(r){console.error(`[TaskNotes][${this.type}] Render error:`,r),this.renderError(r)}},500))}updateRelevantPathsCache(){this.relevantPathsCache.clear();try{let e=this.dataAdapter.extractDataItems();for(let r of e)r.path&&this.relevantPathsCache.add(r.path)}catch(e){}}getEphemeralState(){var e;return{scrollTop:((e=this.rootElement)==null?void 0:e.scrollTop)||0}}setEphemeralState(e){if(!(!e||!this.rootElement||!this.rootElement.isConnected))try{e.scrollTop!==void 0&&(this.rootElement.scrollTop=e.scrollTop)}catch(r){console.debug("[TaskNotes][Bases] Failed to restore ephemeral state:",r)}}focus(){var e;try{(e=this.rootElement)!=null&&e.isConnected&&typeof this.rootElement.focus=="function"&&this.rootElement.focus()}catch(r){console.debug("[TaskNotes][Bases] Failed to focus view:",r)}}refresh(){this.render()}onResize(){}setupContainer(){this.containerEl.empty();let e=document.createElement("div");e.className=`tn-bases-integration tasknotes-plugin tasknotes-container tn-${this.type}`,e.tabIndex=-1,this.containerEl.appendChild(e),this.rootElement=e,this.setupNewTaskButton()}setupNewTaskButton(){setTimeout(()=>this.injectNewTaskButton(),100),this.register(()=>this.cleanupNewTaskButton())}cleanupNewTaskButton(){let e=this.containerEl.closest(".bases-view"),r=e==null?void 0:e.parentElement;r==null||r.classList.remove("tasknotes-view-active")}injectNewTaskButton(){let e=this.containerEl.closest(".bases-view");if(!e){console.debug("[TaskNotes][Bases] No .bases-view found");return}let r=e.parentElement;if(!r){console.debug("[TaskNotes][Bases] No parent element found");return}r.classList.add("tasknotes-view-active");let a=r.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 i=document.createElement("div");i.className="bases-toolbar-item tn-bases-new-task-btn";let s=document.createElement("div");s.className="text-icon-button",s.tabIndex=0;let o=document.createElement("span");o.className="text-button-icon",(0,Rk.setIcon)(o,"plus"),s.appendChild(o);let l=document.createElement("span");l.className="text-button-label",l.textContent=this.plugin.i18n.translate("common.new"),s.appendChild(l),i.appendChild(s),i.addEventListener("click",()=>{this.createFileForView("New Task")});let c=a.querySelector(".bases-toolbar-new-item-menu");c?c.before(i):a.appendChild(i),console.debug("[TaskNotes][Bases] Injected New Task button into toolbar")}setupTaskUpdateListener(){this.taskUpdateListener||(this.taskUpdateListener=this.plugin.emitter.on(gt,async e=>{var r;try{let a=(e==null?void 0:e.task)||(e==null?void 0:e.taskInfo);if(!(a!=null&&a.path)||!((r=this.rootElement)!=null&&r.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),this.updateDebounceTimer=window.setTimeout(()=>{this.render(),this.updateDebounceTimer=null},300)}async createFileForView(e,r){let{TaskCreationModal:a}=await Promise.resolve().then(()=>(sb(),V$)),i={},s={};if(r){let d={};r(d);let u=this.plugin.fieldMapper;if(d[u.toUserField("title")]&&(i.title=String(d[u.toUserField("title")])),d[u.toUserField("status")]&&(i.status=String(d[u.toUserField("status")])),d[u.toUserField("priority")]&&(i.priority=String(d[u.toUserField("priority")])),d[u.toUserField("due")]&&(i.due=String(d[u.toUserField("due")])),d[u.toUserField("scheduled")]&&(i.scheduled=String(d[u.toUserField("scheduled")])),d[u.toUserField("contexts")]){let h=d[u.toUserField("contexts")];i.contexts=Array.isArray(h)?h:[h]}if(d[u.toUserField("projects")]){let h=d[u.toUserField("projects")];i.projects=Array.isArray(h)?h:[h]}if(d.tags){let h=d.tags;i.tags=Array.isArray(h)?h:[h]}if(d.tags&&Array.isArray(d.tags)){let h=u.toUserField("archiveTag");i.archived=d.tags.includes(h)}if(d[u.toUserField("timeEstimate")]&&(i.timeEstimate=Number(d[u.toUserField("timeEstimate")])),d[u.toUserField("recurrence")]&&(i.recurrence=String(d[u.toUserField("recurrence")])),d[u.toUserField("completedDate")]&&(i.completedDate=String(d[u.toUserField("completedDate")])),d[u.toUserField("dateCreated")]&&(i.dateCreated=String(d[u.toUserField("dateCreated")])),d[u.toUserField("blockedBy")]){let h=d[u.toUserField("blockedBy")];i.blockedBy=Array.isArray(h)?h:[h]}let p=this.plugin.settings.userFields||[];for(let h of p)d[h.key]!==void 0&&(s[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)||(s[h]=f)}let o={...i};Object.keys(s).length>0&&(o.customFrontmatter=s);let l=this.app||this.plugin.app;new a(l,this.plugin,{prePopulatedValues:o,onTaskCreated:d=>{this.refresh()}}).open()}getVisibleProperties(){let e=this.config.getOrder(),r=this.propertyMapper.mapVisibleProperties(e);if(!r||r.length===0){let a=this.plugin.settings.defaultVisibleProperties||[...rd,"tags"];r=pn(a,this.plugin)}return r}setupSearch(e){if(this.searchBox){this.currentSearchTerm&&this.searchBox.getValue()!==this.currentSearchTerm&&this.searchBox.setValue(this.currentSearchTerm);return}if(!this.enableSearch)return;let r=document.createElement("div");r.className="tn-search-container",e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r);let a=[];try{this.config&&(a=this.getVisibleProperties())}catch(i){console.debug(`[${this.type}] Could not get visible properties during search setup:`,i)}this.searchFilter=new Nk(a),this.searchBox=new _k(r,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(e){let r=performance.now();this.currentSearchTerm=e,this.render();let a=performance.now()-r;a>200&&console.warn(`[${this.type}] Slow search: ${a.toFixed(2)}ms for search term "${e}"`)}applySearchFilter(e){if(!this.searchFilter||!this.currentSearchTerm)return e;let r=performance.now(),a=this.searchFilter.filterTasks(e,this.currentSearchTerm),i=performance.now()-r;return i>100&&console.warn(`[${this.type}] Filter operation took ${i.toFixed(2)}ms for ${e.length} tasks`),a}isSearchWithNoResults(e,r){return this.currentSearchTerm.length>0&&e.length===0&&r>0}renderSearchNoResults(e){let r=document.createElement("div");r.className="tn-search-no-results";let a=document.createElement("div");a.className="tn-search-no-results__text",a.textContent=`No tasks match "${this.currentSearchTerm}"`;let i=document.createElement("div");i.className="tn-search-no-results__hint",i.textContent="Try a different search term or clear the search",r.appendChild(a),r.appendChild(i),e.appendChild(r)}setupSelectionHandling(){if(!this.rootElement)return;let e=this.plugin.taskSelectionService;if(!e)return;let r=s=>{if(s.key==="Escape"&&e.isSelectionModeActive()&&(e.exitSelectionMode(!0),this.updateSelectionModeUI(!1)),(s.ctrlKey||s.metaKey)&&s.key==="a"&&e.isSelectionModeActive()){s.preventDefault();let o=this.getVisibleTaskPaths();e.selectAll(o),this.updateSelectionVisuals()}};this.rootElement.addEventListener("keydown",r);let a=e.onSelectionChange(s=>{this.updateSelectionVisuals(),this.updateSelectionIndicator(s.length)}),i=e.onSelectionModeChange(s=>{this.updateSelectionModeUI(s)});this.register(()=>{var s;(s=this.rootElement)==null||s.removeEventListener("keydown",r),a(),i()})}updateSelectionModeUI(e){this.rootElement&&(e?(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 e=this.plugin.taskSelectionService;if(!e)return;let r=e.getPrimarySelectedPath(),a=this.rootElement.querySelectorAll(".task-card");for(let s of a){let o=s.dataset.taskPath;o&&(e.isSelected(o)?(s.classList.add("task-card--selected"),o===r?s.classList.add("task-card--selected-primary"):s.classList.remove("task-card--selected-primary")):(s.classList.remove("task-card--selected"),s.classList.remove("task-card--selected-primary")))}let i=this.rootElement.querySelectorAll(".kanban-view__card-wrapper");for(let s of i){let o=s.dataset.taskPath;o&&(e.isSelected(o)?(s.classList.add("kanban-view__card-wrapper--selected"),o===r?s.classList.add("kanban-view__card-wrapper--selected-primary"):s.classList.remove("kanban-view__card-wrapper--selected-primary")):(s.classList.remove("kanban-view__card-wrapper--selected"),s.classList.remove("kanban-view__card-wrapper--selected-primary")))}}clearSelectionVisuals(){if(!this.rootElement)return;let e=this.rootElement.querySelectorAll(".task-card--selected");for(let a of e)a.classList.remove("task-card--selected"),a.classList.remove("task-card--selected-primary");let r=this.rootElement.querySelectorAll(".kanban-view__card-wrapper--selected");for(let a of r)a.classList.remove("kanban-view__card-wrapper--selected"),a.classList.remove("kanban-view__card-wrapper--selected-primary")}updateSelectionIndicator(e){this.rootElement&&(e>0?(this.selectionIndicatorEl||(this.selectionIndicatorEl=document.createElement("div"),this.selectionIndicatorEl.className="tn-selection-indicator",this.selectionIndicatorEl.addEventListener("click",()=>{var r,a;(r=this.plugin.taskSelectionService)==null||r.clearSelection(),(a=this.plugin.taskSelectionService)==null||a.exitSelectionMode()}),this.rootElement.appendChild(this.selectionIndicatorEl)),this.selectionIndicatorEl.textContent=`${e} selected`,this.selectionIndicatorEl.style.display="block"):this.selectionIndicatorEl&&(this.selectionIndicatorEl.style.display="none"))}handleSelectionClick(e,r){let a=this.plugin.taskSelectionService;if(!a||!a.isSelectionModeActive()&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey)return!1;if(e.shiftKey&&!a.isSelectionModeActive()&&a.enterSelectionMode(),e.shiftKey){let i=this.getVisibleTaskPaths();a.selectRange(r,i)}else(e.ctrlKey||e.metaKey||a.isSelectionModeActive())&&a.toggleSelection(r);return this.updateSelectionVisuals(),!0}showBatchContextMenu(e){let r=this.plugin.taskSelectionService;if(!r)return;let a=r.getSelectedPaths();if(a.length===0)return;new af({plugin:this.plugin,selectedPaths:a,onUpdate:()=>{this.render()}}).show(e)}getVisibleTaskPaths(){if(!this.rootElement)return[];let e=this.rootElement.querySelectorAll(".task-card[data-task-path]"),r=[];for(let a of e){let i=a.dataset.taskPath;i&&r.push(i)}return r}}});function sX(n,t,e){var c,d;let r=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(n).forEach(u=>{r.has(u)||(a[u]=n[u])});let i=n.timeEntries?$r(n.timeEntries):0,s=!1,o=[],l=!1;return e!=null&&e.dependencyCache&&t.path?(s=e.dependencyCache.isTaskBlocked(t.path),o=e.dependencyCache.getBlockedTaskPaths(t.path),l=o.length>0):s=Array.isArray(n.blockedBy)&&n.blockedBy.length>0,{title:n.title||t.name||((d=(c=t.path)==null?void 0:c.split("/").pop())==null?void 0:d.replace(".md",""))||"Untitled",status:n.status||"open",priority:n.priority||"normal",path:t.path||"",archived:n.archived||!1,due:n.due,scheduled:n.scheduled,contexts:Array.isArray(n.contexts)?n.contexts:n.contexts?[n.contexts]:void 0,projects:Array.isArray(n.projects)?n.projects:n.projects?[n.projects]:void 0,tags:Array.isArray(n.tags)?n.tags:n.tags?[n.tags]:void 0,timeEstimate:n.timeEstimate,completedDate:n.completedDate,recurrence:n.recurrence,dateCreated:n.dateCreated,dateModified:n.dateModified,timeEntries:n.timeEntries,totalTrackedTime:i,reminders:n.reminders,icsEventId:n.icsEventId,complete_instances:n.complete_instances,skipped_instances:n.skipped_instances,blockedBy:n.blockedBy,blocking:o.length>0?o:void 0,isBlocked:s,isBlocking:l,customProperties:Object.keys(a).length>0?a:void 0,basesData:t.basesData}}function l0e(n,t){if(!(n!=null&&n.path))return null;let e=n.properties||n.frontmatter||{};if(t!=null&&t.fieldMapper){let r=t.fieldMapper.mapFromFrontmatter(e,n.path,t.settings.storeTitleInFilename),a=sX(r,n,t),i={};return Object.keys(e).forEach(s=>{s.startsWith("file.")&&(i[s]=e[s])}),{...a,customProperties:{...r.customProperties,...a.customProperties,...i}}}else return sX(e,n,t)}async function Uc(n,t,e){let r=e||l0e,a=[];for(let i of n)if(i!=null&&i.path)try{let s=r(i,t);s&&a.push(s)}catch(s){console.warn("[TaskNotes][BasesPOC] Error converting Bases item to TaskInfo:",s)}return a}var o0e,Fk=b(()=>{o0e=require("obsidian");Dr();ko();to()});function Lk(n,t,e){let r=t.match(/^\[\[([^\]]+)\]\]$/);if(r){let s=r[1],o=(0,Ok.parseLinktext)(s),l=o.path,c=o.subpath?`${o.path}${o.subpath}`:s.contains("|")?s.split("|")[1].trim():o.path;Ss(n,l,c,e,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}let a=t.endsWith(".md")?t.replace(/\.md$/,""):t,i=e.metadataCache.getFirstLinkpathDest(a,"");if(i instanceof Ok.TFile){let s=i.basename;Ss(n,a,s,e,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}n.textContent=t}var Ok,RR=b(()=>{Ok=require("obsidian");Gv()});var Jo,FR=b(()=>{Jo=class{constructor(t){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 e,r,a;this.container=t.container,this.items=t.items,this.estimatedHeight=(e=t.itemHeight)!=null?e:0,this.overscan=(r=t.overscan)!=null?r:5,this.renderItem=t.renderItem,this.getItemKey=(a=t.getItemKey)!=null?a:((i,s)=>String(s)),this.setupDOM(),this.attachScrollListener(),this.setupResizeObserver(),!t.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 t=Math.min(5,this.items.length),e=[],r=this.contentContainer.createDiv({cls:"virtual-scroller__sample"});r.style.cssText=` + position: absolute; + visibility: hidden; + pointer-events: none; + `;for(let a=0;a0&&e.push(s)}if(r.remove(),e.length>0){let a=e.reduce((i,s)=>i+s,0);this.estimatedHeight=Math.ceil(a/e.length)}else this.estimatedHeight=60}findScrollContainer(t){let e=t;for(;e;){let a=window.getComputedStyle(e).overflowY;if(a==="scroll"||a==="auto")return e;e=e.parentElement}return t}updateSpacerHeight(){this.spacer.style.height=`${this.totalHeight}px`}binarySearchPosition(t){if(this.positionCache.length===0)return 0;let e=0,r=this.positionCache.length-1;for(;e=this.positionCache.length?0:this.positionCache[t]}rebuildPositionCache(){this.positionCache=[];let t=0;for(let e=0;e{for(let e of t){let r=e.target,a=parseInt(r.dataset.virtualIndex||"-1",10);a>=0&&a{this.processPendingMeasurements(),this.measurementRAF=null}))})}processPendingMeasurements(){if(this.pendingMeasurements.size===0)return;let t=!1;for(let e of this.pendingMeasurements){let r=this.contentContainer.querySelector(`[data-virtual-index="${e}"]`);if(r){let a=r.getBoundingClientRect().height;this.itemHeights.get(e)!==a&&a>0&&(this.itemHeights.set(e,a),t=!0)}}this.pendingMeasurements.clear(),t&&this.rebuildPositionCache()}measureRenderedItems(){let t=this.contentContainer.querySelectorAll("[data-virtual-index]"),e=!1;for(let r of t){let a=parseInt(r.dataset.virtualIndex||"-1",10);if(a>=0&&a0&&(this.itemHeights.set(a,i),e=!0)}}e&&this.rebuildPositionCache()}attachScrollListener(){this.scrollContainer.addEventListener("scroll",this.handleScroll)}updateVisibleRange(){var o;let t=this.scrollContainer.scrollTop,e=this.scrollContainer.clientHeight;e===0&&(e=((o=this.scrollContainer.parentElement)==null?void 0:o.clientHeight)||0),e===0&&(e=window.innerHeight,console.warn("[VirtualScroller] Using window height as fallback:",e));let r=Math.max(0,this.binarySearchPosition(t)-this.overscan),a=r,i=t+e;for(;ai);)a++;a=Math.min(this.items.length-1,a+this.overscan);let s=this.getItemPosition(r);(r!==this.state.startIndex||a!==this.state.endIndex||this.items.length!==this.state.totalItems)&&(this.state={startIndex:r,endIndex:a,totalItems:this.items.length,offsetY:s},this.renderVisibleItems())}renderVisibleItems(){let{startIndex:t,endIndex:e,offsetY:r}=this.state,a=new Set;this.contentContainer.style.transform=`translateY(${r}px)`;let i=new Map;for(let[o,l]of this.renderedElements)l.parentElement===this.contentContainer&&i.set(o,l);let s=null;for(let o=t;o<=e;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)),s?d.previousElementSibling!==s&&s.after(d):this.contentContainer.firstChild!==d&&this.contentContainer.prepend(d),s=d}for(let[o,l]of this.renderedElements)a.has(o)||(this.resizeObserver&&this.resizeObserver.unobserve(l),l.remove(),this.renderedElements.delete(o));requestAnimationFrame(()=>{this.measureRenderedItems()})}updateItems(t){let e=this.scrollContainer.scrollTop;this.items=t,this.state.totalItems=t.length;let r=this.itemHeights.size;for(let a=t.length;a=0&&this.itemHeights.delete(r),this.renderedElements.delete(t),e.remove()}this.rebuildPositionCache(),this.updateVisibleRange()}invalidateHeights(t){for(let e of t)this.itemHeights.delete(e);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 oX(n){return function(t,e){if(!e)throw console.error("[TaskNotes][TaskListView] No containerEl provided"),new Error("TaskListView requires a containerEl");return new OR(t,e,n)}}var Ln,OR,lX=b(()=>{Ln=require("obsidian");Ng();Fk();Or();RR();rc();nf();Zd();Kd();Ke();FR();OR=class extends Gi{constructor(e,r,a){super(e,r,a);this.type="tasknoteTaskList";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=mt(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 e=>{let r=e.target,a=r.closest(".task-group-header");if(a){let i=a.closest(".task-group"),s=i==null?void 0:i.dataset.groupKey;if(s){if(r.closest("a"))return;e.preventDefault(),e.stopPropagation(),await this.handleGroupToggle(s);return}}};this.handleItemContextMenu=async e=>{let r=this.getTaskContextFromEvent(e);if(!r)return;e.preventDefault(),e.stopPropagation();let a=this.plugin.taskSelectionService;if(a&&a.getSelectionCount()>1){a.isSelected(r.task.path)||a.addToSelection(r.task.path),this.showBatchContextMenu(e);return}await eu(e,r.task.path,this.plugin,this.currentTargetDate)};this.handleItemPointerOver=e=>{if("pointerType"in e&&e.pointerType!=="mouse")return;let r=this.getTaskContextFromEvent(e);if(!r)return;let a=e.relatedTarget;if(a&&r.card.contains(a))return;let i=this.app||this.plugin.app;i.vault.getAbstractFileByPath(r.task.path)&&i.workspace.trigger("hover-link",{event:e,source:"tasknotes-task-card",hoverParent:r.card,targetEl:r.card,linktext:r.task.path,sourcePath:r.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 e=this.config.get("enableSearch");this.enableSearch=e!=null?e:!1,this.configLoaded=!0}catch(e){console.warn("[TaskListView] Failed to parse config:",e)}}setupContainer(){var r;super.setupContainer(),this.rootElement&&(this.rootElement.style.cssText="display: flex; flex-direction: column; height: 100%;");let e=document.createElement("div");e.className="tn-bases-items-container",e.style.cssText="margin-top: 12px; flex: 1; max-height: 100vh; overflow-y: auto; position: relative;",(r=this.rootElement)==null||r.appendChild(e),this.itemsContainer=e,this.registerContainerListeners()}async render(){var e;if(!(!this.itemsContainer||!this.rootElement)){!this.configLoaded&&this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{if(!((e=this.data)!=null&&e.data))return;let r=this.dataAdapter.extractDataItems();await this.computeFormulas(r);let a=await Uc(r,this.plugin);if(a.length===0){this.clearAllTaskElements(),this.renderEmptyState(),this.lastRenderWasGrouped=!1;return}let i=this.dataAdapter.isGrouped();!i&&this.subGroupPropertyId?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGroupedBySubProperty(a),this.lastRenderWasGrouped=!0):i?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGrouped(a),this.lastRenderWasGrouped=!0):(this.lastRenderWasGrouped&&this.clearAllTaskElements(),await this.renderFlat(a),this.lastRenderWasGrouped=!1)}catch(r){console.error("[TaskNotes][TaskListView] Error rendering:",r),this.clearAllTaskElements(),this.renderError(r)}}}async computeFormulas(e){var a,i,s;let r=(i=(a=this.data)==null?void 0:a.ctx)==null?void 0:i.formulas;if(!(!r||typeof r!="object"||e.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(e){let r=this.getVisibleProperties(),a=this.applySearchFilter(e);if(this.isSearchWithNoResults(a,e.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let i=mt(new Date);this.currentTargetDate=i;let s=this.getCardOptions(i),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,r,s):await this.renderFlatNormal(a,r,s)}async renderFlatVirtual(e,r,a){this.itemsContainer&&(this.virtualScroller?this.virtualScroller.updateItems(e):(this.virtualScroller=new Jo({container:this.itemsContainer,items:e,overscan:5,renderItem:(i,s)=>{let o=Ct(i,this.plugin,r,a);return this.taskInfoCache.set(i.path,i),this.lastTaskSignatures.set(i.path,this.buildTaskSignature(i)),o},getItemKey:i=>i.path}),setTimeout(()=>{var i;(i=this.virtualScroller)==null||i.recalculate()},0)),this.lastFlatPaths=e.map(i=>i.path))}async renderFlatNormal(e,r,a){if(!this.itemsContainer)return;let i=new Set,s=!this.arePathArraysEqual(e,this.lastFlatPaths);s&&(this.itemsContainer.empty(),this.currentTaskElements.clear());for(let o of e){let l=s?null:this.currentTaskElements.get(o.path)||null,c=this.buildTaskSignature(o),d=this.lastTaskSignatures.get(o.path);if(!l||(c!==d||!l)){let p=Ct(o,this.plugin,r,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),i.add(o.path)}if(!s&&i.size!==this.currentTaskElements.size){for(let[o,l]of this.currentTaskElements)if(!i.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=e.map(o=>o.path)}buildGroupedRenderItems(e,r){let a=[],i=this.subGroupPropertyId?this.buildPathToPropsMap():new Map;for(let s of e){let o=this.dataAdapter.convertGroupKeyToString(s.key),l=new Set(s.entries.map(u=>u.file.path)),c=r.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:s.entries,isCollapsed:d}),!d)if(this.subGroupPropertyId){let u=this.groupTasksBySubProperty(c,this.subGroupPropertyId,i);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(e){let r=this.getVisibleProperties(),a=this.applySearchFilter(e);if(this.isSearchWithNoResults(a,e.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let i=mt(new Date);this.currentTargetDate=i;let s=this.getCardOptions(i),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=e.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,r,s):await this.renderGroupedNormal(c,r,s),this.lastFlatPaths=e.map(u=>u.path)}async renderGrouped(e){let r=this.getVisibleProperties(),a=this.dataAdapter.getGroupedData(),i=this.applySearchFilter(e);if(this.isSearchWithNoResults(i,e.length)){this.clearAllTaskElements(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let s=mt(new Date);this.currentTargetDate=s;let o=this.getCardOptions(s),l=this.buildGroupedRenderItems(a,i),c=l.length>=this.VIRTUAL_SCROLL_THRESHOLD;if(this.useVirtualScrolling&&c&&this.virtualScroller){this.virtualScroller.updateItems(l),this.lastFlatPaths=e.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,r,o):await this.renderGroupedNormal(l,r,o),this.lastFlatPaths=e.map(d=>d.path)}async renderGroupedVirtual(e,r,a){this.virtualScroller?this.virtualScroller.updateItems(e):(this.virtualScroller=new Jo({container:this.itemsContainer,items:e,overscan:5,renderItem:i=>{if(i.type==="primary-header"||i.type==="sub-header")return this.createGroupHeader(i);{let s=Ct(i.task,this.plugin,r,a);return this.taskInfoCache.set(i.task.path,i.task),this.lastTaskSignatures.set(i.task.path,this.buildTaskSignature(i.task)),s}},getItemKey:i=>i.type==="primary-header"?`primary-${i.groupKey}`:i.type==="sub-header"?`sub-${i.groupKey}:${i.subGroupKey}`:i.task.path}),setTimeout(()=>{var i;(i=this.virtualScroller)==null||i.recalculate()},0))}async renderGroupedNormal(e,r,a){for(let i of e)if(i.type==="primary-header"||i.type==="sub-header"){let s=this.createGroupHeader(i);this.itemsContainer.appendChild(s)}else{let s=Ct(i.task,this.plugin,r,a);this.itemsContainer.appendChild(s),this.currentTaskElements.set(i.task.path,s),this.taskInfoCache.set(i.task.path,i.task),this.lastTaskSignatures.set(i.task.path,this.buildTaskSignature(i.task))}}createGroupHeader(e){let r=document.createElement("div");r.className="task-section task-group";let a=e.type==="sub-header",i=a?"sub":"primary";r.dataset.level=i,a?(r.dataset.groupKey=`${e.groupKey}:${e.subGroupKey}`,r.dataset.parentKey=e.parentKey):r.dataset.groupKey=e.groupKey,e.isCollapsed&&r.classList.add("is-collapsed");let s=document.createElement("h3");s.className="task-group-header task-list-view__group-header",r.appendChild(s);let o=document.createElement("button");o.className="task-group-toggle",o.setAttribute("aria-label","Toggle group"),o.setAttribute("aria-expanded",String(!e.isCollapsed)),o.dataset.groupKey=r.dataset.groupKey,s.appendChild(o),(0,Ln.setIcon)(o,"chevron-right");let l=o.querySelector("svg");l&&(l.classList.add("chevron"),l.setAttribute("width","16"),l.setAttribute("height","16"));let c=s.createSpan({cls:"task-group-title"}),d=a?e.subGroupTitle:e.groupTitle;return this.renderGroupTitle(c,d),s.createSpan({text:` (${e.taskCount})`,cls:"agenda-view__item-count"}),r}async handleTaskUpdate(e){if(this.taskInfoCache.set(e.path,e),this.lastTaskSignatures.set(e.path,this.buildTaskSignature(e)),this.useVirtualScrolling)this.debouncedRefresh();else{let r=this.currentTaskElements.get(e.path);if(r&&r.isConnected){let a=this.getVisibleProperties(),i=Ct(e,this.plugin,a,this.getCardOptions(this.currentTargetDate));r.replaceWith(i),i.classList.add("task-card--updated"),window.setTimeout(()=>{i.classList.remove("task-card--updated")},1e3),this.currentTaskElements.set(e.path,i)}else this.debouncedRefresh()}}renderEmptyState(){let e=document.createElement("div");e.className="tn-bases-empty",e.style.cssText="padding: 20px; text-align: center; color: #666;",e.textContent="No TaskNotes tasks found for this Base.",this.itemsContainer.appendChild(e)}renderError(e){let r=document.createElement("div");r.className="tn-bases-error",r.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",r.textContent=`Error loading tasks: ${e.message||"Unknown error"}`,this.itemsContainer.appendChild(r)}renderGroupTitle(e,r){let a=this.app||this.plugin.app,i={metadataCache:a.metadataCache,workspace:a.workspace};Lk(e,r,i)}onunload(){this.unregisterContainerListeners(),this.destroyVirtualScroller(),this.currentTaskElements.clear(),this.itemsContainer=null,this.lastRenderWasGrouped=!1,this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),this.lastFlatPaths=[],this.useVirtualScrolling=!1,this.collapsedGroups.clear(),this.collapsedSubGroups.clear()}getEphemeralState(){var e;return{scrollTop:((e=this.rootElement)==null?void 0:e.scrollTop)||0,collapsedGroups:Array.from(this.collapsedGroups),collapsedSubGroups:Array.from(this.collapsedSubGroups)}}setEphemeralState(e){e&&(e.collapsedGroups&&Array.isArray(e.collapsedGroups)&&(this.collapsedGroups=new Set(e.collapsedGroups)),e.collapsedSubGroups&&Array.isArray(e.collapsedSubGroups)&&(this.collapsedSubGroups=new Set(e.collapsedSubGroups)),e.scrollTop!==void 0&&this.rootElement&&requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=e.scrollTop)}))}clearAllTaskElements(){var e;this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),(e=this.itemsContainer)==null||e.empty(),this.currentTaskElements.forEach(r=>r.remove()),this.currentTaskElements.clear(),this.lastFlatPaths=[],this.lastTaskSignatures.clear(),this.taskInfoCache.clear(),this.clearClickTimeouts()}getCardOptions(e){return{targetDate:e}}clearClickTimeouts(){for(let e of this.clickTimeouts.values())e&&clearTimeout(e);this.clickTimeouts.clear()}registerContainerListeners(){!this.itemsContainer||this.containerListenersRegistered||(this.registerDomEvent(this.itemsContainer,"click",this.handleItemClick),this.containerListenersRegistered=!0)}unregisterContainerListeners(){this.containerListenersRegistered=!1}getTaskContextFromEvent(e){let r=e.target;if(!r)return null;let a=r.closest(".task-card");if(!a)return null;let i=a.dataset.taskPath;if(!i)return null;let s=this.taskInfoCache.get(i);return s?{task:s,card:a}:null}async handleGroupToggle(e){e.includes(":")?this.collapsedSubGroups.has(e)?this.collapsedSubGroups.delete(e):this.collapsedSubGroups.add(e):this.collapsedGroups.has(e)?this.collapsedGroups.delete(e):this.collapsedGroups.add(e),this.lastRenderWasGrouped&&await this.refreshGroupedView()}async refreshGroupedView(){var s;if(!((s=this.data)!=null&&s.data))return;let e=this.dataAdapter.extractDataItems();await this.computeFormulas(e);let r=await Uc(e,this.plugin),a=this.dataAdapter.getGroupedData(),i=this.buildGroupedRenderItems(a,r);this.useVirtualScrolling&&this.virtualScroller?this.virtualScroller.updateItems(i):await this.render()}async handleActionClick(e,r,a,i){switch(e){case"toggle-status":await this.handleToggleStatus(r,i);return;case"priority-menu":this.showPriorityMenu(r,i);return;case"recurrence-menu":this.showRecurrenceMenu(r,i);return;case"reminder-menu":this.showReminderModal(r);return;case"task-context-menu":await eu(i,r.path,this.plugin,this.getTaskActionDate(r));return;case"edit-date":await this.openDateContextMenu(r,a.dataset.tnDateType,i);return;case"filter-project-subtasks":await this.filterProjectSubtasks(r);return;case"toggle-subtasks":await this.toggleSubtasks(r,a);return;case"toggle-blocking-tasks":await this.toggleBlockingTasks(r,a);return;default:await this.handleCardClick(r,i)}}async handleToggleStatus(e,r){try{if(e.recurrence){let a=this.getTaskActionDate(e);await this.plugin.toggleRecurringTaskComplete(e,a)}else await this.plugin.toggleTaskStatus(e)}catch(a){let i=a instanceof Error?a.message:String(a);console.error("[TaskNotes][TaskListView] Failed to toggle status",{error:i,taskPath:e.path}),new Ln.Notice(`Failed to toggle task status: ${i}`)}}getTaskActionDate(e){let r=_e(e.scheduled||e.due||"");return r?je(r):this.currentTargetDate}showPriorityMenu(e,r){new ri({currentValue:e.priority,onSelect:async i=>{try{await this.plugin.updateTaskProperty(e,"priority",i)}catch(s){console.error("[TaskNotes][TaskListView] Failed to update priority",s),new Ln.Notice("Failed to update priority")}},plugin:this.plugin}).show(r)}showRecurrenceMenu(e,r){new ti({currentValue:typeof e.recurrence=="string"?e.recurrence:void 0,currentAnchor:e.recurrence_anchor||"scheduled",onSelect:async(i,s)=>{try{await this.plugin.updateTaskProperty(e,"recurrence",i||void 0),s!==void 0&&await this.plugin.updateTaskProperty(e,"recurrence_anchor",s)}catch(o){console.error("[TaskNotes][TaskListView] Failed to update recurrence",o),new Ln.Notice("Failed to update recurrence")}},app:this.plugin.app,plugin:this.plugin}).show(r)}showReminderModal(e){new ei(this.plugin.app,this.plugin,e,async a=>{try{await this.plugin.updateTaskProperty(e,"reminders",a.length>0?a:void 0)}catch(i){console.error("[TaskNotes][TaskListView] Failed to update reminders",i),new Ln.Notice("Failed to update reminders")}}).open()}async openDateContextMenu(e,r,a){if(!r)return;let i=r==="due"?e.due:e.scheduled;new Cn({currentValue:_e(i||""),currentTime:Hr(i||""),onSelect:async(o,l)=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await this.plugin.updateTaskProperty(e,r,c)}catch(c){let d=c instanceof Error?c.message:String(c);console.error("[TaskNotes][TaskListView] Failed to update date",{error:d,taskPath:e.path,dateType:r}),new Ln.Notice(`Failed to update ${r} date: ${d}`)}},plugin:this.plugin,app:this.app||this.plugin.app}).show(a)}async handleCardClick(e,r){if(this.handleSelectionClick(r,e.path))return;if(this.plugin.settings.doubleClickAction==="none"){await this.executeSingleClickAction(e,r);return}let a=this.clickTimeouts.get(e.path);if(a)clearTimeout(a),this.clickTimeouts.delete(e.path),await this.executeDoubleClickAction(e,r);else{let i=window.setTimeout(async()=>{this.clickTimeouts.delete(e.path),await this.executeSingleClickAction(e,r)},250);this.clickTimeouts.set(e.path,i)}}async executeSingleClickAction(e,r){if(r.ctrlKey||r.metaKey){this.openTaskNote(e,!0);return}switch(this.plugin.settings.singleClickAction){case"edit":await this.editTask(e);break;case"openNote":this.openTaskNote(e,!1);break;default:break}}async executeDoubleClickAction(e,r){switch(this.plugin.settings.doubleClickAction){case"edit":await this.editTask(e);break;case"openNote":this.openTaskNote(e,!1);break;default:break}}async editTask(e){await this.plugin.openTaskEditModal(e)}openTaskNote(e,r){let a=this.app||this.plugin.app,i=a.vault.getAbstractFileByPath(e.path);i instanceof Ln.TFile&&(r?a.workspace.openLinkText(e.path,"",!0):a.workspace.getLeaf(!1).openFile(i))}async filterProjectSubtasks(e){try{await this.plugin.applyProjectSubtaskFilter(e)}catch(r){console.error("[TaskNotes][TaskListView] Failed to filter project subtasks",r),new Ln.Notice("Failed to filter project subtasks")}}async toggleSubtasks(e,r){try{if(!this.plugin.expandedProjectsService){console.error("[TaskNotes][TaskListView] ExpandedProjectsService not initialized"),new Ln.Notice("Service not available. Please try reloading the plugin.");return}let a=this.plugin.expandedProjectsService.toggle(e.path);r.classList.toggle("task-card__chevron--expanded",a),r.setAttribute("aria-label",a?"Collapse subtasks":"Expand subtasks");let i=r.closest(".task-card");if(i){let{toggleSubtasks:s}=await Promise.resolve().then(()=>(Or(),Es));await s(i,e,this.plugin,a)}}catch(a){console.error("[TaskNotes][TaskListView] Failed to toggle subtasks",a),new Ln.Notice("Failed to toggle subtasks")}}async toggleBlockingTasks(e,r){try{let a=r.classList.toggle("task-card__blocking-toggle--expanded"),i=r.closest(".task-card");if(i){let{toggleBlockingTasks:s}=await Promise.resolve().then(()=>(Or(),Es));await s(i,e,this.plugin,a)}}catch(a){console.error("[TaskNotes][TaskListView] Failed to toggle blocking tasks",a),new Ln.Notice("Failed to toggle blocking tasks")}}arePathArraysEqual(e,r){if(e.length!==r.length)return!1;for(let a=0;athis.valueToString(o)).join(", ")}return e.toString()||"None"}return typeof e=="string"?e||"None":typeof e=="number"?String(e):typeof e=="boolean"?e?"True":"False":Array.isArray(e)?e.length>0?e.map(i=>this.valueToString(i)).join(", "):"None":String(e)}groupTasksBySubProperty(e,r,a){let i=new Map;for(let s of e){let o=a.get(s.path)||{},l=this.getPropertyValue(o,r),c=this.valueToString(l);i.has(c)||i.set(c,[]),i.get(c).push(s)}return i}buildTaskSignature(e){var r,a,i,s;return`${e.path}|${e.title}|${e.status}|${e.priority}|${e.due}|${e.scheduled}|${e.recurrence}|${e.archived}|${(r=e.complete_instances)==null?void 0:r.join(",")}|${(a=e.reminders)==null?void 0:a.length}|${(i=e.blocking)==null?void 0:i.length}|${(s=e.blockedBy)==null?void 0:s.length}`}}});function cX(n){return function(t,e){if(!e)throw console.error("[TaskNotes][KanbanView] No containerEl provided"),new Error("KanbanView requires a containerEl");return new LR(t,e,n)}}var Gu,LR,dX=b(()=>{Gu=require("obsidian");Ng();Fk();Or();RR();FR();Ke();LR=class extends Gi{constructor(e,r,a){super(e,r,a);this.type="tasknoteKanban";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.swimLanePropertyId=null;this.columnWidth=280;this.maxSwimlaneHeight=600;this.hideEmptyColumns=!1;this.explodeListColumns=!0;this.columnOrders={};this.configLoaded=!1;this.VIRTUAL_SCROLL_THRESHOLD=15;this.handleBoardClick=async e=>{let r=this.getTaskContextFromEvent(e);if(!r)return;let{task:a,card:i}=r,o=e.target.closest("[data-tn-action]");if(o&&o!==i){let l=o.dataset.tnAction;if(l){e.preventDefault(),e.stopPropagation(),await this.handleCardAction(l,a,o,e);return}}};this.handleBoardContextMenu=async e=>{let r=this.getTaskContextFromEvent(e);if(!r)return;e.preventDefault(),e.stopPropagation();let{showTaskContextMenu:a}=await Promise.resolve().then(()=>(Or(),Es));await a(e,r.task.path,this.plugin,this.getTaskActionDate(r.task))};this.basesController=e,this.dataAdapter.basesView=this}onload(){this.readViewOptions(),super.onload()}onDataUpdated(){let e=this.getEphemeralState();try{this.render()}catch(r){console.error(`[TaskNotes][${this.type}] Render error:`,r),this.renderError(r)}this.setEphemeralState(e)}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 e=this.config.get("explodeListColumns");this.explodeListColumns=e!==!1;let r=this.config.get("columnOrder")||"{}";this.columnOrders=JSON.parse(r);let a=this.config.get("enableSearch");this.enableSearch=a!=null?a:!1,this.configLoaded=!0}catch(e){console.warn("[KanbanView] Failed to parse config:",e)}}getEphemeralState(){var r;let e={};for(let[a,i]of this.columnScrollers){let s=i.scrollContainer;s&&(e[a]=s.scrollTop)}return this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(s=>{let o=s.getAttribute("data-group"),l=s.querySelector(".kanban-view__cards");o&&l&&!(o in e)&&(e[o]=l.scrollTop)}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(s=>{let o=s.getAttribute("data-column"),l=s.getAttribute("data-swimlane");if(o&&l){let c=`${l}:${o}`,d=s.querySelector(".kanban-view__tasks-container");d&&!(c in e)&&(e[c]=d.scrollTop)}})),{scrollTop:((r=this.rootElement)==null?void 0:r.scrollTop)||0,columnScroll:e}}setEphemeralState(e){e&&(e.scrollTop!==void 0&&this.rootElement&&requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=e.scrollTop)}),e.columnScroll&&typeof e.columnScroll=="object"&&requestAnimationFrame(()=>{for(let[r,a]of this.columnScrollers){let i=e.columnScroll[r];if(i!==void 0){let s=a.scrollContainer;s&&(s.scrollTop=i)}}this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(i=>{let s=i.getAttribute("data-group");if(s&&e.columnScroll[s]!==void 0){let o=i.querySelector(".kanban-view__cards");o&&!this.columnScrollers.has(s)&&(o.scrollTop=e.columnScroll[s])}}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(i=>{let s=i.getAttribute("data-column"),o=i.getAttribute("data-swimlane");if(s&&o){let l=`${o}:${s}`;if(e.columnScroll[l]!==void 0){let c=i.querySelector(".kanban-view__tasks-container");c&&!this.columnScrollers.has(l)&&(c.scrollTop=e.columnScroll[l])}}}))}))}async render(){var e;if(!(!this.boardEl||!this.rootElement)&&(e=this.data)!=null&&e.data){!this.configLoaded&&this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{let r=this.dataAdapter.extractDataItems(),a=await Uc(r,this.plugin),i=this.applySearchFilter(a);if(this.destroyColumnScrollers(),this.boardEl.empty(),i.length===0){this.isSearchWithNoResults(i,a.length)?this.renderSearchNoResults(this.boardEl):this.renderEmptyState();return}let s=this.buildPathToPropsMap(),o=this.getGroupByPropertyId();if(!o){this.renderNoGroupByError();return}let l=this.groupTasks(i,o,s);this.swimLanePropertyId?await this.renderWithSwimLanes(l,i,s,o):await this.renderFlat(l)}catch(r){console.error("[TaskNotes][KanbanView] Error rendering:",r),this.renderError(r)}}}getGroupByPropertyId(){var r;let e=this.basesController;if((r=e==null?void 0:e.query)!=null&&r.views&&(e!=null&&e.viewName)){let a=e.query.views,i=e.viewName;for(let s=0;s<20;s++){let o=a[s];if(o&&o.name===i){if(o.groupBy){if(typeof o.groupBy=="object"&&o.groupBy.property)return o.groupBy.property;if(typeof o.groupBy=="string")return o.groupBy}return null}}}return null}groupTasks(e,r,a){let i=new Map,s=this.stripPropertyPrefix(r);if(this.explodeListColumns&&this.isListTypeProperty(s))for(let l of e){let c=this.getListPropertyValue(l,s,a);if(Array.isArray(c)&&c.length>0)for(let d of c){let u=String(d)||"None";i.has(u)||i.set(u,[]),i.get(u).push(l)}else{let d="None";i.has(d)||i.set(d,[]),i.get(d).push(l)}}else{let l=this.dataAdapter.getGroupedData(),c=new Map(e.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)}i.set(u,p)}}return this.augmentWithEmptyStatusColumns(i,r),this.augmentWithEmptyPriorityColumns(i,r),i}isListTypeProperty(e){let r=this.plugin.app.metadataTypeManager;if(r!=null&&r.properties){let o=r.properties[e.toLowerCase()];if(o!=null&&o.type&&new Set(["multitext","tags","aliases"]).has(o.type))return!0}let a=this.plugin.fieldMapper.toUserField("contexts"),i=this.plugin.fieldMapper.toUserField("projects");return new Set(["contexts",a,"projects",i,"tags","aliases"]).has(e)}getListPropertyValue(e,r,a){let i=this.plugin.fieldMapper.toUserField("contexts"),s=this.plugin.fieldMapper.toUserField("projects");return r==="contexts"||r===i?e.contexts:r==="projects"||r===s?e.projects:r==="tags"?e.tags:(a.get(e.path)||{})[r]}augmentWithEmptyStatusColumns(e,r){let a=this.plugin.fieldMapper.toUserField("status");if(r.replace(/^(note\.|file\.|task\.)/,"")!==a)return;let s=this.plugin.settings.customStatuses;if(!(!s||s.length===0))for(let o of s){let l=o.value;e.has(l)||e.set(l,[])}}augmentWithEmptyPriorityColumns(e,r){let a=this.plugin.fieldMapper.toUserField("priority");if(r.replace(/^(note\.|file\.|task\.)/,"")!==a)return;let s=this.plugin.priorityManager.getAllPriorities();if(!(!s||s.length===0))for(let o of s){let l=o.value;e.has(l)||e.set(l,[])}}async renderFlat(e){if(!this.boardEl)return;this.boardEl.style.setProperty("--kanban-column-width",`${this.columnWidth}px`);let r=this.getVisibleProperties(),a=this.getGroupByPropertyId(),i=Array.from(e.keys()),s=a?this.applyColumnOrder(a,i):i;for(let o of s){let l=e.get(o)||[];if(this.hideEmptyColumns&&l.length===0)continue;let c=await this.createColumn(o,l,r);this.boardEl&&this.boardEl.appendChild(c)}}async renderWithSwimLanes(e,r,a,i){if(!this.swimLanePropertyId)return;let s=new Map,o=new Set;for(let p of r){let m=a.get(p.path)||{},h=this.getPropertyValue(m,this.swimLanePropertyId),f=this.valueToString(h);o.add(f)}for(let p of o){let m=new Map;s.set(p,m);for(let[h]of e)m.set(h,[])}let l=this.stripPropertyPrefix(i),c=this.explodeListColumns&&this.isListTypeProperty(l);for(let p of r){let m=a.get(p.path)||{},h=this.getPropertyValue(m,this.swimLanePropertyId),f=this.valueToString(h),g=s.get(f);if(g)if(c){let v=this.getListPropertyValue(p,l,a);if(Array.isArray(v)&&v.length>0)for(let T of v){let k=String(T)||"None";g.has(k)&&g.get(k).push(p)}else g.has("None")&&g.get("None").push(p)}else{let v=this.getPropertyValue(m,i),T=this.valueToString(v);g.has(T)&&g.get(T).push(p)}}let d=Array.from(e.keys()),u=this.applyColumnOrder(i,d);await this.renderSwimLaneTable(s,u,a)}async renderSwimLaneTable(e,r,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 i=this.boardEl.createEl("div",{cls:"kanban-view__swimlane-row kanban-view__swimlane-row--header"});i.createEl("div",{cls:"kanban-view__swimlane-label"});for(let o of r){let l=i.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"});c.textContent="\u22EE\u22EE";let d=l.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(d,o),this.setupColumnHeaderDragHandlers(l)}let s=this.getVisibleProperties();for(let[o,l]of e){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);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 r){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,s);else{let v=this.getCardOptions();for(let T of h){let k=g.createDiv({cls:"kanban-view__card-wrapper"});k.setAttribute("draggable","true"),k.setAttribute("data-task-path",T.path);let w=Ct(T,this.plugin,s,v);k.appendChild(w),this.currentTaskElements.set(T.path,k),this.taskInfoCache.set(T.path,T),this.setupCardDragHandlers(k,T)}}}}}async createColumn(e,r,a){let i=document.createElement("div");i.className="kanban-view__column",i.style.width=`${this.columnWidth}px`,i.setAttribute("data-group",e);let s=i.createDiv({cls:"kanban-view__column-header"});s.setAttribute("draggable","true"),s.setAttribute("data-column-key",e);let o=s.createSpan({cls:"kanban-view__drag-handle"});o.textContent="\u22EE\u22EE";let l=s.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(l,e),s.createSpan({cls:"kanban-view__column-count",text:` (${r.length})`}),this.setupColumnHeaderDragHandlers(s);let c=i.createDiv({cls:"kanban-view__cards"});this.setupColumnDragDrop(i,c,e);let d=this.getCardOptions();return r.length>=this.VIRTUAL_SCROLL_THRESHOLD?this.createVirtualColumn(c,e,r,a,d):this.createNormalColumn(c,r,a,d),i}createVirtualColumn(e,r,a,i,s){e.style.cssText="overflow-y: auto; max-height: 100vh; position: relative;";let o=new Jo({container:e,items:a,overscan:3,renderItem:l=>{let c=document.createElement("div");c.className="kanban-view__card-wrapper",c.setAttribute("draggable","true"),c.setAttribute("data-task-path",l.path);let d=Ct(l,this.plugin,i,s);return c.appendChild(d),this.taskInfoCache.set(l.path,l),this.setupCardDragHandlers(c,l),c},getItemKey:l=>l.path});this.columnScrollers.set(r,o)}async createVirtualSwimLaneCell(e,r,a,i){e.style.cssText="overflow-y: auto; height: 100%; position: relative;";let s=this.getCardOptions(),o=new Jo({container:e,items:a,overscan:3,renderItem:l=>{let c=document.createElement("div");c.className="kanban-view__card-wrapper",c.setAttribute("draggable","true"),c.setAttribute("data-task-path",l.path);let d=Ct(l,this.plugin,i,s);return c.appendChild(d),this.taskInfoCache.set(l.path,l),this.setupCardDragHandlers(c,l),c},getItemKey:l=>l.path});this.columnScrollers.set(r,o)}createNormalColumn(e,r,a,i){for(let s of r){let o=e.createDiv({cls:"kanban-view__card-wrapper"});o.setAttribute("draggable","true"),o.setAttribute("data-task-path",s.path);let l=Ct(s,this.plugin,a,i);o.appendChild(l),this.currentTaskElements.set(s.path,o),this.taskInfoCache.set(s.path,s),this.setupCardDragHandlers(o,s)}}setupColumnHeaderDragHandlers(e){let r=e.dataset.columnKey;if(!r)return;let a=e.classList.contains("kanban-view__column-header-cell"),i=a?"kanban-view__column-header-cell--dragging":"kanban-view__column-header--dragging";e.addEventListener("dragstart",s=>{s.dataTransfer&&(s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("text/x-kanban-column",r),e.classList.add(i))}),e.addEventListener("dragover",s=>{var o;(o=s.dataTransfer)!=null&&o.types.includes("text/x-kanban-column")&&(s.preventDefault(),s.stopPropagation(),s.dataTransfer.dropEffect="move",e.classList.add("kanban-view__column-header--dragover"))}),e.addEventListener("dragleave",s=>{var o;(o=s.dataTransfer)!=null&&o.types.includes("text/x-kanban-column")&&s.target===e&&e.classList.remove("kanban-view__column-header--dragover")}),e.addEventListener("drop",async s=>{var f;if(!((f=s.dataTransfer)!=null&&f.types.includes("text/x-kanban-column")))return;s.preventDefault(),s.stopPropagation(),e.classList.remove("kanban-view__column-header--dragover");let o=s.dataTransfer.getData("text/x-kanban-column"),l=e.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()}),e.addEventListener("dragend",()=>{e.classList.remove(i)})}setupColumnDragDrop(e,r,a){e.addEventListener("dragover",i=>{var s;(s=i.dataTransfer)!=null&&s.types.includes("text/x-kanban-column")||(i.preventDefault(),i.stopPropagation(),i.dataTransfer&&(i.dataTransfer.dropEffect="move"),e.classList.add("kanban-view__column--dragover"))}),e.addEventListener("dragleave",i=>{let s=e.getBoundingClientRect(),o=i.clientX,l=i.clientY;(o=s.right||l=s.bottom)&&e.classList.remove("kanban-view__column--dragover")}),e.addEventListener("drop",async i=>{var s;(s=i.dataTransfer)!=null&&s.types.includes("text/x-kanban-column")||(i.preventDefault(),i.stopPropagation(),e.classList.remove("kanban-view__column--dragover"),this.draggedTaskPath&&(await this.handleTaskDrop(this.draggedTaskPath,a,null),this.draggedTaskPath=null,this.draggedFromColumn=null))}),e.addEventListener("dragend",()=>{e.classList.remove("kanban-view__column--dragover")})}setupSwimLaneCellDragDrop(e,r,a){e.addEventListener("dragover",i=>{i.preventDefault(),i.stopPropagation(),i.dataTransfer&&(i.dataTransfer.dropEffect="move"),e.classList.add("kanban-view__swimlane-column--dragover")}),e.addEventListener("dragleave",i=>{let s=e.getBoundingClientRect(),o=i.clientX,l=i.clientY;(o=s.right||l=s.bottom)&&e.classList.remove("kanban-view__swimlane-column--dragover")}),e.addEventListener("drop",async i=>{i.preventDefault(),i.stopPropagation(),e.classList.remove("kanban-view__swimlane-column--dragover"),this.draggedTaskPath&&(await this.handleTaskDrop(this.draggedTaskPath,r,a),this.draggedTaskPath=null,this.draggedFromColumn=null)}),e.addEventListener("dragend",()=>{e.classList.remove("kanban-view__swimlane-column--dragover")})}setupCardDragHandlers(e,r){e.addEventListener("click",a=>{if(this.handleSelectionClick(a,r.path)){a.stopPropagation();return}}),e.addEventListener("contextmenu",a=>{a.preventDefault(),a.stopPropagation();let i=this.plugin.taskSelectionService;if(i&&i.getSelectionCount()>1){i.isSelected(r.path)||i.addToSelection(r.path),this.showBatchContextMenu(a);return}let{showTaskContextMenu:s}=(Or(),Wa(Es));s(a,r.path,this.plugin,new Date)}),e.addEventListener("dragstart",a=>{let i=this.plugin.taskSelectionService;if(i&&i.isSelected(r.path)&&i.getSelectionCount()>1){this.draggedTaskPaths=i.getSelectedPaths(),this.draggedTaskPath=r.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=r.path,this.draggedTaskPaths=[r.path],e.classList.add("kanban-view__card--dragging"),a.dataTransfer&&(a.dataTransfer.effectAllowed="move",a.dataTransfer.setData("text/plain",r.path));let s=e.closest("[data-group]"),o=e.closest("[data-column]"),l=e.closest("[data-swimlane]");this.draggedFromColumn=(s==null?void 0:s.dataset.group)||(o==null?void 0:o.dataset.column)||null,this.draggedFromSwimlane=(l==null?void 0:l.dataset.swimlane)||null}),e.addEventListener("dragend",()=>{var a,i;for(let s of this.draggedTaskPaths){let o=this.currentTaskElements.get(s);o&&o.classList.remove("kanban-view__card--dragging")}e.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(s=>{s.classList.remove("kanban-view__column--dragover")}),(i=this.boardEl)==null||i.querySelectorAll(".kanban-view__swimlane-column--dragover").forEach(s=>{s.classList.remove("kanban-view__swimlane-column--dragover")})})}async handleTaskDrop(e,r,a){var i,s,o;try{let l=this.getGroupByPropertyId();if(!l)return;if(l.startsWith("formula.")){new Gu.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&&((i=this.swimLanePropertyId)!=null&&i.startsWith("formula."))){new Gu.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:[e],h=m.length>1;for(let f of m){let g=h?this.draggedSourceColumns.get(f):this.draggedFromColumn,v=h?this.draggedSourceSwimlanes.get(f):this.draggedFromSwimlane;d&&g?await this.updateListPropertyOnDrop(f,l,g,r):await this.updateTaskFrontmatterProperty(f,l,r),a!==null&&this.swimLanePropertyId&&(p&&v?await this.updateListPropertyOnDrop(f,this.swimLanePropertyId,v,a):await this.updateTaskFrontmatterProperty(f,this.swimLanePropertyId,a))}h&&((s=this.plugin.taskSelectionService)==null||s.clearSelection(),(o=this.plugin.taskSelectionService)==null||o.exitSelectionMode()),this.debouncedRefresh()}catch(l){console.error("[TaskNotes][KanbanView] Error updating task:",l)}}async updateListPropertyOnDrop(e,r,a,i){if(a===i)return;let s=this.plugin.app.vault.getAbstractFileByPath(e);if(!s||!(s instanceof Gu.TFile))throw new Error(`Cannot find task file: ${e}`);let o=r.replace(/^(note\.|file\.|task\.)/,"");await this.plugin.app.fileManager.processFrontMatter(s,l=>{let c=l[o];Array.isArray(c)||(c=c?[c]:[]);let d=c.filter(u=>u!==a);!d.includes(i)&&i!=="None"&&d.push(i),l[o]=d.length>0?d:[]})}async updateTaskFrontmatterProperty(e,r,a){let i=this.plugin.app.vault.getAbstractFileByPath(e);if(!i||!(i instanceof Gu.TFile))throw new Error(`Cannot find task file: ${e}`);let s=r.replace(/^(note\.|file\.|task\.)/,""),o=await this.plugin.cacheManager.getTaskInfo(e),l=this.plugin.fieldMapper.lookupMappingKey(s);o&&l?await this.plugin.taskService.updateProperty(o,l,a):await this.plugin.app.fileManager.processFrontMatter(i,c=>{c[s]=a})}setupContainer(){var r;super.setupContainer();let e=document.createElement("div");e.className="kanban-view__board",(r=this.rootElement)==null||r.appendChild(e),this.boardEl=e,this.registerBoardListeners()}async handleTaskUpdate(e){this.debouncedRefresh()}debouncedRefresh(){this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer);let e=this.getEphemeralState();this.updateDebounceTimer=window.setTimeout(async()=>{await this.render(),this.updateDebounceTimer=null,this.setEphemeralState(e)},150)}renderEmptyState(){if(!this.boardEl)return;let e=document.createElement("div");e.className="tn-bases-empty",e.style.cssText="padding: 20px; text-align: center; color: var(--text-muted);",e.textContent="No TaskNotes tasks found for this Base.",this.boardEl.appendChild(e)}renderNoGroupByError(){if(!this.boardEl)return;let e=document.createElement("div");e.className="tn-bases-error",e.style.cssText="padding: 20px; text-align: center; color: var(--text-error);",e.textContent=this.plugin.i18n.translate("views.kanban.errors.noGroupBy"),this.boardEl.appendChild(e)}renderError(e){if(!this.boardEl)return;let r=document.createElement("div");r.className="tn-bases-error",r.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",r.textContent=`Error loading kanban: ${e.message||"Unknown error"}`,this.boardEl.appendChild(r)}buildPathToPropsMap(){var a,i;let e=this.dataAdapter.extractDataItems(),r=new Map;for(let s of e){if(!s.path)continue;let o={...s.properties||{}},l=(i=(a=s.basesData)==null?void 0:a.formulaResults)==null?void 0:i.cachedFormulaOutputs;if(l&&typeof l=="object")for(let[c,d]of Object.entries(l))o[`formula.${c}`]=d;r.set(s.path,o)}return r}getPropertyValue(e,r){var i;if(r.startsWith("formula."))return(i=e[r])!=null?i:null;let a=this.stripPropertyPrefix(r);return e[r]!==void 0?e[r]:e[a]!==void 0?e[a]:null}stripPropertyPrefix(e){let r=e.split(".");return r.length>1&&["note","file","formula","task"].includes(r[0])?r.slice(1).join("."):e}valueToString(e){var r,a;if(e==null)return"None";if(typeof e=="object"&&e!==null&&typeof e.toString=="function"){if(((r=e.constructor)==null?void 0:r.name)==="NullValue"||e.isTruthy&&!e.isTruthy())return"None";if(((a=e.constructor)==null?void 0:a.name)==="ListValue"||Array.isArray(e.value)){let s=e.value||[];return s.length===0?"None":s.map(o=>this.valueToString(o)).join(", ")}return e.toString()||"None"}return typeof e=="string"?e||"None":typeof e=="number"?String(e):typeof e=="boolean"?e?"True":"False":Array.isArray(e)?e.length>0?e.map(i=>this.valueToString(i)).join(", "):"None":String(e)}renderGroupTitleWrapper(e,r){let a=this.app||this.plugin.app,i={metadataCache:a.metadataCache,workspace:a.workspace};Lk(e,r,i)}applyColumnOrder(e,r){let a=this.columnOrders[e];if(!a||a.length===0)return r.sort();let i=[],s=[];for(let o of a)r.includes(o)&&i.push(o);for(let o of r)a.includes(o)||s.push(o);return[...i,...s.sort()]}async saveColumnOrder(e,r){this.columnOrders[e]=r;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 e=new Date;return{targetDate:new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}}registerBoardListeners(){}unregisterBoardListeners(){}getTaskContextFromEvent(e){let r=e.target;if(!r)return null;let a=r.closest(".task-card");if(!a)return null;let i=a.closest(".kanban-view__card-wrapper");if(!i)return null;let s=i.dataset.taskPath;if(!s)return null;let o=this.taskInfoCache.get(s);return o?{task:o,card:a}:null}async handleCardAction(e,r,a,i){let[{DateContextMenu:s},{PriorityContextMenu:o},{RecurrenceContextMenu:l},{ReminderModal:c},{showTaskContextMenu:d}]=await Promise.all([Promise.resolve().then(()=>(rc(),n$)),Promise.resolve().then(()=>(nf(),o$)),Promise.resolve().then(()=>(Zd(),a$)),Promise.resolve().then(()=>(Kd(),XV)),Promise.resolve().then(()=>(Or(),Es))]);switch(e){case"toggle-status":await this.handleToggleStatus(r,i);return;case"priority-menu":this.showPriorityMenu(r,i,o);return;case"recurrence-menu":this.showRecurrenceMenu(r,i,l);return;case"reminder-menu":this.showReminderModal(r,c);return;case"task-context-menu":await d(i,r.path,this.plugin,this.getTaskActionDate(r));return;case"edit-date":await this.openDateContextMenu(r,a.dataset.tnDateType,i,s);return;case"toggle-subtasks":await this.handleToggleSubtasks(r,a);return;case"toggle-blocking-tasks":await this.handleToggleBlockingTasks(r,a);return}}async handleToggleStatus(e,r){try{if(e.recurrence){let a=this.getTaskActionDate(e);await this.plugin.toggleRecurringTaskComplete(e,a)}else await this.plugin.toggleTaskStatus(e)}catch(a){console.error("[TaskNotes][KanbanView] Failed to toggle status",a)}}getTaskActionDate(e){let r=_e(e.scheduled||e.due||"");return r?je(r):mt(new Date)}showPriorityMenu(e,r,a){new a({currentValue:e.priority,onSelect:async s=>{try{await this.plugin.updateTaskProperty(e,"priority",s)}catch(o){console.error("[TaskNotes][KanbanView] Failed to update priority",o)}},plugin:this.plugin}).show(r)}showRecurrenceMenu(e,r,a){new a({currentValue:typeof e.recurrence=="string"?e.recurrence:void 0,currentAnchor:e.recurrence_anchor||"scheduled",onSelect:async(s,o)=>{try{await this.plugin.updateTaskProperty(e,"recurrence",s||void 0),o!==void 0&&await this.plugin.updateTaskProperty(e,"recurrence_anchor",o)}catch(l){console.error("[TaskNotes][KanbanView] Failed to update recurrence",l)}},app:this.plugin.app,plugin:this.plugin}).show(r)}showReminderModal(e,r){new r(this.plugin.app,this.plugin,e,async i=>{try{await this.plugin.updateTaskProperty(e,"reminders",i.length>0?i:void 0)}catch(s){console.error("[TaskNotes][KanbanView] Failed to update reminders",s)}}).open()}async openDateContextMenu(e,r,a,i){if(!r)return;let{getDatePart:s,getTimePart:o}=await Promise.resolve().then(()=>(Ke(),pH)),l=r==="due"?e.due:e.scheduled;new i({currentValue:s(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(e,r,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(e,r){var l,c,d;let{toggleSubtasks:a}=await Promise.resolve().then(()=>(Or(),Es)),i=r.closest(".task-card");if(!i)return;let o=!(((l=this.plugin.expandedProjectsService)==null?void 0:l.isExpanded(e.path))||!1);o?(c=this.plugin.expandedProjectsService)==null||c.setExpanded(e.path,!0):(d=this.plugin.expandedProjectsService)==null||d.setExpanded(e.path,!1),r.classList.toggle("is-rotated",o),await a(i,e,this.plugin,o)}async handleToggleBlockingTasks(e,r){let{toggleBlockingTasks:a}=await Promise.resolve().then(()=>(Or(),Es)),i=r.closest(".task-card");if(!i)return;let s=r.classList.toggle("task-card__blocking-toggle--expanded");await a(i,e,this.plugin,s)}destroyColumnScrollers(){for(let e of this.columnScrollers.values())e.destroy();this.columnScrollers.clear()}onunload(){this.unregisterBoardListeners(),this.destroyColumnScrollers(),this.currentTaskElements.clear(),this.taskInfoCache.clear(),this.boardEl=null}}});var Rg=b(()=>{Ms();vf()});function jk(n,t){let e=[];for(let r=0;r{let T=n[v.index].eventRange.instance.instanceId+":"+v.span.start+":"+(v.span.end-1);return a[T]||1});o.allowReslicing=!0,o.strictOrder=r,t===!0||e===!0?(o.maxCoord=i,o.hiddenConsumes=!0):typeof t=="number"?o.maxStackCnt=t:typeof e=="number"&&(o.maxStackCnt=e,o.hiddenConsumes=!0);let l=[],c=[];for(let v=0;v1,g=m.span.start===o;u+=m.levelCoord-d,d=m.levelCoord+m.thickness,f?(u+=m.thickness,g&&p.push({seg:Ku(h,m.span.start,m.span.end,e),isVisible:!0,isAbsolute:!0,absoluteTop:m.levelCoord,marginTop:0})):g&&(p.push({seg:Ku(h,m.span.start,m.span.end,e),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:u}),u=0)}a.push(c),i.push(p),s.push(u)}return{singleColPlacements:a,multiColPlacements:i,leftoverMargins:s}}function g0e(n,t){let e=[];for(let r=0;r({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:e[r.eventRange.instance.instanceId],marginTop:0}))}function v0e(n){let t={};for(let e of n)for(let r of e)t[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return t}function b0e(n,t){return jk(n.filter(T0e),t)}function T0e(n){return n.eventRange.def.allDay}function k0e(n,t){let e;return t.currentRangeUnit.match(/year|month/)&&(e=n.querySelector(`[data-date="${bu(t.currentDate)}-01"]`)),e||(e=n.querySelector(`[data-date="${Oo(t.currentDate)}"]`)),e}function WR(n,t){let e=new vc(n.renderRange,t);return new bc(e,/year|month|week/.test(n.currentRangeUnit))}function qR(n){let{dateEnv:t,currentRange:e}=n,{start:r,end:a}=e,i;if(n.snapToWeek&&(r=t.startOfWeek(r),i=t.startOfWeek(a),i.valueOf()!==a.valueOf()&&(a=tT(i,1))),n.fixedWeekCount){let s=t.startOfWeek(t.startOfMonth(Bt(e.end,-1))),o=Math.ceil(aC(s,a));a=tT(a,6-o)}return{start:r,end:a}}var BR,pX,Hk,zk,jR,u0e,HR,zR,Uk,Fg,UR,Og,Lg,Wk,Qu,w0e,qk=b(()=>{Pc();Rg();BR=class extends or{constructor(){super(...arguments),this.headerElRef=zt()}renderSimpleLayout(t,e){let{props:r,context:a}=this,i=[],s=xc(a.options);return t&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:e}}),E(sa,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},E(No,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:i}))}renderHScrollLayout(t,e,r,a){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,l=!s.forPrint&&xc(o.options),c=!s.forPrint&&Kf(o.options),d=[];return t&&d.push({type:"header",key:"header",isSticky:l,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}]}),d.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:e}]}),c&&d.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Cu}]}),E(sa,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},E(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:r,minWidth:a}]}],sections:d}))}};pX=rt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});Hk=class extends Ue{render(){let{props:t}=this;return E(Ro,Object.assign({},t,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:pX,defaultDisplayEventEnd:t.defaultDisplayEventEnd,disableResizing:!t.seg.eventRange.def.allDay}))}},zk=class extends Ue{render(){let{props:t,context:e}=this,{options:r}=e,{seg:a}=t,i=r.eventTimeFormat||pX,s=Bo(a,i,e,!0,t.defaultDisplayEventEnd);return E(Rs,Object.assign({},t,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Du(t.seg,e),defaultGenerator:c0e,timeText:s,isResizing:!1,isDateSelecting:!1}))}};jR=class extends Ue{constructor(){super(...arguments),this.compileSegs=pe(d0e)}render(){let{props:t}=this,{allSegs:e,invisibleSegs:r}=this.compileSegs(t.singlePlacements);return E(wc,{elClasses:["fc-daygrid-more-link"],dateProfile:t.dateProfile,todayRange:t.todayRange,allDayDate:t.allDayDate,moreCnt:t.moreCnt,allSegs:e,hiddenSegs:r,alignmentElRef:t.alignmentElRef,alignGridTop:t.alignGridTop,extraDateSpan:t.extraDateSpan,popoverContent:()=>{let a=(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{};return E(tt,null,e.map(i=>{let s=i.eventRange.instance.instanceId;return E("div",{className:"fc-daygrid-event-harness",key:s,style:{visibility:a[s]?"hidden":""}},mX(i)?E(zk,Object.assign({seg:i,isDragging:!1,isSelected:s===t.eventSelection,defaultDisplayEventEnd:!1},la(i,t.todayRange))):E(Hk,Object.assign({seg:i,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:s===t.eventSelection,defaultDisplayEventEnd:!1},la(i,t.todayRange))))}))}})}};u0e=rt({week:"narrow"}),HR=class extends or{constructor(){super(...arguments),this.rootElRef=zt(),this.state={dayNumberId:_n()},this.handleRootEl=t=>{oa(this.rootElRef,t),oa(this.props.elRef,t)}}render(){let{context:t,props:e,state:r,rootElRef:a}=this,{options:i,dateEnv:s}=t,{date:o,dateProfile:l}=e,c=e.showDayNumber&&m0e(o,l.currentRange,s);return E(Fo,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...e.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},e.extraDataAttrs),e.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:p0e,date:o,dateProfile:l,todayRange:e.todayRange,showDayNumber:e.showDayNumber,isMonthStart:c,extraRenderProps:e.extraRenderProps},(d,u)=>E("div",{ref:e.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:e.minHeight}},e.showWeekNumber&&E(Jf,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:ji(t,o,"week"),date:o,defaultFormat:u0e}),!u.isDisabled&&(e.showDayNumber||Pu(i)||e.forceDayTop)?E("div",{className:"fc-daygrid-day-top"},E(d,{elTag:"a",elClasses:["fc-daygrid-day-number",c&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},ji(t,o)),{id:r.dayNumberId})})):e.showDayNumber?E("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},E("a",{className:"fc-daygrid-day-number"},"\xA0")):void 0,E("div",{className:"fc-daygrid-day-events",ref:e.fgContentElRef},e.fgContent,E("div",{className:"fc-daygrid-day-bottom",style:{marginTop:e.moreMarginTop}},E(jR,{allDayDate:o,singlePlacements:e.singlePlacements,moreCnt:e.moreCnt,alignmentElRef:a,alignGridTop:!e.showDayNumber,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange}))),E("div",{className:"fc-daygrid-day-bg"},e.bgContent)))}};zR=class extends yc{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(t){let e=super.addSegs(t),{entriesByLevel:r}=this,a=i=>!this.forceHidden[Ni(i)];for(let i=0;i{t&&this.updateSizing(!0)}}render(){let{props:t,state:e,context:r}=this,{options:a}=r,i=t.cells.length,s=Bk(t.businessHourSegs,i),o=Bk(t.bgEventSegs,i),l=Bk(this.getHighlightSegs(),i),c=Bk(this.getMirrorSegs(),i),{singleColPlacements:d,multiColPlacements:u,moreCnts:p,moreMarginTops:m}=h0e(Dc(t.fgEventSegs,a.eventOrder),t.dayMaxEvents,t.dayMaxEventRows,a.eventOrderStrict,e.segHeights,e.maxContentHeight,t.cells),h=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return E("tr",{ref:this.rootElRef,role:"row"},t.renderIntro&&t.renderIntro(),t.cells.map((f,g)=>{let v=this.renderFgSegs(g,t.forPrint?d[g]:u[g],t.todayRange,h),T=this.renderFgSegs(g,y0e(c[g],u),t.todayRange,{},!!t.eventDrag,!!t.eventResize,!1);return E(HR,{key:f.key,elRef:this.cellElRefs.createRef(f.key),innerElRef:this.frameElRefs.createRef(f.key),dateProfile:t.dateProfile,date:f.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&g===0,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.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:E(tt,null,E(tt,null,v),E(tt,null,T)),bgContent:E(tt,null,this.renderFillSegs(l[g],"highlight"),this.renderFillSegs(s[g],"non-business"),this.renderFillSegs(o[g],"bg-event")),minHeight:t.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(t,e){let r=this.props;this.updateSizing(!Jr(t,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:t}=this;return t.eventDrag&&t.eventDrag.segs.length?t.eventDrag.segs:t.eventResize&&t.eventResize.segs.length?t.eventResize.segs:t.dateSelectionSegs}getMirrorSegs(){let{props:t}=this;return t.eventResize&&t.eventResize.segs.length?t.eventResize.segs:[]}renderFgSegs(t,e,r,a,i,s,o){let{context:l}=this,{eventSelection:c}=this.props,{framePositions:d}=this.state,u=this.props.cells.length===1,p=i||s||o,m=[];if(d)for(let h of e){let{seg:f}=h,{instanceId:g}=f.eventRange.instance,v=h.isVisible&&!a[g],T=h.isAbsolute,k="",w="";T&&(l.isRtl?(w=0,k=d.lefts[f.lastCol]-d.lefts[f.firstCol]):(k=0,w=d.rights[f.firstCol]-d.rights[f.lastCol])),m.push(E("div",{className:"fc-daygrid-event-harness"+(T?" fc-daygrid-event-harness-abs":""),key:hX(f),ref:p?null:this.segHarnessRefs.createRef(fX(f)),style:{visibility:v?"":"hidden",marginTop:T?"":h.marginTop,top:T?h.absoluteTop:"",left:k,right:w}},mX(f)?E(zk,Object.assign({seg:f,isDragging:i,isSelected:g===c,defaultDisplayEventEnd:u},la(f,r))):E(Hk,Object.assign({seg:f,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:g===c,defaultDisplayEventEnd:u},la(f,r)))))}return m}renderFillSegs(t,e){let{isRtl:r}=this.context,{todayRange:a}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of t){let l=r?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(E("div",{key:Uf(o.eventRange),className:"fc-daygrid-bg-harness",style:l},e==="bg-event"?E(kc,Object.assign({seg:o},la(o,a))):Zf(e)))}return E(tt,{},...s)}updateSizing(t){let{props:e,state:r,frameElRefs:a}=this;if(!e.forPrint&&e.clientWidth!==null){if(t){let l=e.cells.map(c=>a.currentMap[c.key]);if(l.length){let c=this.rootElRef.current,d=new si(c,l,!0,!1);(!r.framePositions||!r.framePositions.similarTo(d))&&this.setState({framePositions:new si(c,l,!0,!1)})}}let i=this.state.segHeights,s=this.querySegHeights(),o=e.dayMaxEvents===!0||e.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let t=this.segHarnessRefs.currentMap,e={};for(let r in t){let a=Math.round(t[r].getBoundingClientRect().height);e[r]=Math.max(e[r]||0,a)}return e}computeMaxContentHeight(){let t=this.props.cells[0].key,e=this.cellElRefs.currentMap[t],r=this.fgElRefs.currentMap[t];return e.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let t=this.cellElRefs.currentMap;return this.props.cells.map(e=>t[e.key])}};Uk.addStateEquality({segHeights:Jr});Fg=class extends or{constructor(){super(...arguments),this.splitBusinessHourSegs=pe(jk),this.splitBgEventSegs=pe(b0e),this.splitFgEventSegs=pe(jk),this.splitDateSelectionSegs=pe(jk),this.splitEventDrag=pe(uX),this.splitEventResize=pe(uX),this.rowRefs=new In}render(){let{props:t,context:e}=this,r=t.cells.length,a=this.splitBusinessHourSegs(t.businessHourSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitDateSelectionSegs(t.dateSelectionSegs,r),l=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r),d=r>=7&&t.clientWidth?t.clientWidth/e.options.aspectRatio/6:null;return E(An,{unit:"day"},(u,p)=>E(tt,null,t.cells.map((m,h)=>E(Uk,{ref:this.rowRefs.createRef(h),key:m.length?m[0].date.toISOString():h,showDayNumbers:r>1,showWeekNumbers:t.showWeekNumbers,todayRange:p,dateProfile:t.dateProfile,cells:m,renderIntro:t.renderRowIntro,businessHourSegs:a[h],eventSelection:t.eventSelection,bgEventSegs:i[h],fgEventSegs:s[h],dateSelectionSegs:o[h],eventDrag:l[h],eventResize:c[h],dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,clientWidth:t.clientWidth,clientHeight:t.clientHeight,cellMinHeight:d,forPrint:t.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let t=this.rowRefs.currentMap[0].getCellEls()[0],e=t?t.closest(".fc-daygrid-body"):null;e&&(this.rootEl=e,this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new si(this.rootEl,this.rowRefs.collect().map(t=>t.getCellEls()[0]),!1,!0),this.colPositions=new si(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(t,e){let{colPositions:r,rowPositions:a}=this,i=r.leftToIndex(t),s=a.topToIndex(e);if(s!=null&&i!=null){let o=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:r.lefts[i],right:r.rights[i],top:a.tops[s],bottom:a.bottoms[s]},layer:0}}return null}getCellEl(t,e){return this.rowRefs.currentMap[t].getCellEls()[e]}getCellRange(t,e){let r=this.props.cells[t][e].date,a=Bt(r,1);return{start:r,end:a}}};UR=class extends or{constructor(){super(...arguments),this.elRef=zt(),this.needsScrollReset=!1}render(){let{props:t}=this,{dayMaxEventRows:e,dayMaxEvents:r,expandRows:a}=t,i=r===!0||e===!0;i&&!a&&(i=!1,e=null,r=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",a?"":"fc-daygrid-body-natural"];return E("div",{ref:this.elRef,className:s.join(" "),style:{width:t.clientWidth,minWidth:t.tableMinWidth}},E("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:a?t.clientHeight:""}},t.colGroupNode,E("tbody",{role:"presentation"},E(Fg,{dateProfile:t.dateProfile,cells:t.cells,renderRowIntro:t.renderRowIntro,showWeekNumbers:t.showWeekNumbers,clientWidth:t.clientWidth,clientHeight:t.clientHeight,businessHourSegs:t.businessHourSegs,bgEventSegs:t.bgEventSegs,fgEventSegs:t.fgEventSegs,dateSelectionSegs:t.dateSelectionSegs,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,dayMaxEvents:r,dayMaxEventRows:e,forPrint:t.forPrint,isHitComboAllowed:t.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(t){t.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let t=k0e(this.elRef.current,this.props.dateProfile);if(t){let e=t.closest(".fc-daygrid-body"),r=e.closest(".fc-scroller"),a=t.getBoundingClientRect().top-e.getBoundingClientRect().top;r.scrollTop=a?a+1:0}this.needsScrollReset=!1}}};Og=class extends Tc{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(t,e){return e.sliceRange(t)}},Lg=class extends or{constructor(){super(...arguments),this.slicer=new Og,this.tableRef=zt()}render(){let{props:t,context:e}=this;return E(UR,Object.assign({ref:this.tableRef},this.slicer.sliceProps(t,t.dateProfile,t.nextDayThreshold,e,t.dayTableModel),{dateProfile:t.dateProfile,cells:t.dayTableModel.cells,colGroupNode:t.colGroupNode,tableMinWidth:t.tableMinWidth,renderRowIntro:t.renderRowIntro,dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,showWeekNumbers:t.showWeekNumbers,expandRows:t.expandRows,headerAlignElRef:t.headerAlignElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint}))}},Wk=class extends BR{constructor(){super(...arguments),this.buildDayTableModel=pe(WR),this.headerRef=zt(),this.tableRef=zt()}render(){let{options:t,dateProfileGenerator:e}=this.context,{props:r}=this,a=this.buildDayTableModel(r.dateProfile,e),i=t.dayHeaders&&E(Ns,{ref:this.headerRef,dateProfile:r.dateProfile,dates:a.headerDates,datesRepDistinctDays:a.rowCnt===1}),s=o=>E(Lg,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:a,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:t.nextDayThreshold,colGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,showWeekNumbers:t.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:r.forPrint});return t.dayMinWidth?this.renderHScrollLayout(i,s,a.colCnt,t.dayMinWidth):this.renderSimpleLayout(i,s)}};Qu=class extends mc{buildRenderRange(t,e,r){let a=super.buildRenderRange(t,e,r),{props:i}=this;return qR({currentRange:a,snapToWeek:/^(year|month)$/.test(e),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};w0e=':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}';Ri(w0e)});var gX,yX=b(()=>{Cc();qk();gX=Xr({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Wk,dateProfileGeneratorClass:Qu},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 wX(n){let t=["fc-timegrid-slot","fc-timegrid-slot-label",n.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return E(Ra.Consumer,null,e=>{if(!n.isLabeled)return E("td",{className:t.join(" "),"data-time":n.isoTimeStr});let{dateEnv:r,options:a,viewApi:i}=e,s=a.slotLabelFormat==null?S0e:Array.isArray(a.slotLabelFormat)?rt(a.slotLabelFormat[0]):rt(a.slotLabelFormat),o={level:0,time:n.time,date:r.toDate(n.date),view:i,text:r.format(n.date,s)};return E(Kt,{elTag:"td",elClasses:t,elAttrs:{"data-time":n.isoTimeStr},renderProps:o,generatorName:"slotLabelContent",customGenerator:a.slotLabelContent,defaultGenerator:D0e,classNameGenerator:a.slotLabelClassNames,didMount:a.slotLabelDidMount,willUnmount:a.slotLabelWillUnmount},l=>E("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},E(l,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function D0e(n){return n.text}function C0e(n){return n.text}function P0e(n,t){return t.map(e=>n[e.key])}function Bg(n,t){let e=[],r;for(r=0;rr+":"+a,(r,a)=>{let i=R0e(n,r,a),s=bX(i,e),o=t[r][a];return[Object.assign(Object.assign({},o),{nextLevelNodes:s[0]}),o.thickness+s[1]]});return bX(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,e)[0]}function bX(n,t){if(!n)return[[],0];let{level:e,lateralStart:r,lateralEnd:a}=n,i=r,s=[];for(;iNi(r),(r,a,i)=>{let{nextLevelNodes:s,thickness:o}=r,l=o+i,c=o/l,d,u=[];if(!s.length)d=t;else for(let m of s)if(d===void 0){let h=e(m,a,l);d=h[0],u.push(h[1])}else{let h=e(m,d,0);u.push(h[1])}let p=(d-a)*c;return[d-p,Object.assign(Object.assign({},r),{thickness:p,nextLevelNodes:u})]});return n.map(r=>e(r,0,0)[1])}function O0e(n){let t=[],e=aF((a,i,s)=>Ni(a),(a,i,s)=>{let o=Object.assign(Object.assign({},a),{levelCoord:i,stackDepth:s,stackForward:0});return t.push(o),o.stackForward=r(a.nextLevelNodes,i+a.thickness,s+1)+1});function r(a,i,s){let o=0;for(let l of a)o=Math.max(e(l,i,s),o);return o}return r(n,0,0),t}function aF(n,t){let e={};return(...r)=>{let a=n(...r);return a in e?e[a]:e[a]=t(...r)}}function TX(n,t,e=null,r=0){let a=[];if(e)for(let i=0;i{let l=o.eventRange.instance.instanceId;return E("div",{key:l,style:{visibility:s[l]?"hidden":""}},E(Vk,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===r,isShort:!1},la(o,t,e))))}))}function VR(n){return n?{top:n.start,bottom:-n.end}:{top:"",bottom:""}}function j0e(n,t){return n.map(e=>t[e.index])}function H0e(n,t){return t.map(e=>n[e.key])}function z0e(n,t){let e=t||n,r=Lf(n,e);return r===null&&(e=n,r=1),{snapDuration:e,snapsPerSlot:r}}function U0e(n,t,e){let r=[];for(let a of n.headerDates)r.push({start:e.add(a,t.slotMinTime),end:e.add(a,t.slotMaxTime)});return r}function W0e(n,t,e,r,a){let i=new Date(0),s=n,o=Re(0),l=e||q0e(r),c=[];for(;ia(s)=0;t-=1)if(e=Re(kX[t]),r=Lf(e,n),r!==null&&r>1)return e;return n}function V0e(n,t){let e=new vc(n.renderRange,t);return new bc(e,!1)}var $R,S0e,YR,E0e,x0e,GR,KR,QR,ZR,JR,B0e,Vk,XR,eF,tF,rF,nF,kX,$k,$0e,DX=b(()=>{Pc();Rg();qk();$R=class extends Pf{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(t){return t.allDay?["allDay"]:["timed"]}getKeysForEventDef(t){return t.allDay?SC(t)?["timed","allDay"]:["allDay"]:["timed"]}},S0e=rt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});YR=class extends Ue{render(){return this.props.slatMetas.map(t=>E("tr",{key:t.key},E(wX,Object.assign({},t))))}},E0e=rt({week:"short"}),x0e=5,GR=class extends or{constructor(){super(...arguments),this.allDaySplitter=new $R,this.headerElRef=zt(),this.rootElRef=zt(),this.scrollerElRef=zt(),this.state={slatCoords:null},this.handleScrollTopRequest=t=>{let e=this.scrollerElRef.current;e&&(e.scrollTop=t)},this.renderHeadAxis=(t,e="")=>{let{options:r}=this.context,{dateProfile:a}=this.props,i=a.renderRange,o=Oi(i.start,i.end)===1?ji(this.context,i.start,"week"):{};return r.weekNumbers&&t==="day"?E(Jf,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:E0e},l=>E("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:e}},E(l,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:o}))):E("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},E("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},this.renderTableRowAxis=t=>{let{options:e,viewApi:r}=this.context,a={text:e.allDayText,view:r};return E(Kt,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:a,generatorName:"allDayContent",customGenerator:e.allDayContent,defaultGenerator:C0e,classNameGenerator:e.allDayClassNames,didMount:e.allDayDidMount,willUnmount:e.allDayWillUnmount},i=>E("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",t==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:t}},E(i,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=t=>{this.setState({slatCoords:t})}}renderSimpleLayout(t,e,r){let{context:a,props:i}=this,s=[],o=xc(a.options);return t&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}}),e&&(s.push({type:"body",key:"all-day",chunk:{content:e}}),s.push({type:"body",key:"all-day-divider",outerContent:E("tr",{role:"presentation",className:"fc-scrollgrid-section"},E("td",{className:"fc-timegrid-divider "+a.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:!!a.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),E(sa,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:a.viewSpec},E(No,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(t,e,r,a,i,s,o){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:c,props:d}=this,u=!d.forPrint&&xc(c.options),p=!d.forPrint&&Kf(c.options),m=[];t&&m.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:f=>E("tr",{role:"presentation"},this.renderHeadAxis("day",f.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}]}),e&&(m.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:f=>E("tr",{role:"presentation"},this.renderTableRowAxis(f.rowSyncHeights[0]))},{key:"cols",content:e}]}),m.push({key:"all-day-divider",type:"body",outerContent:E("tr",{role:"presentation",className:"fc-scrollgrid-section"},E("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=>E("div",{className:"fc-timegrid-axis-chunk"},E("table",{"aria-hidden":!0,style:{height:f.expandRows?f.clientHeight:""}},f.tableColGroupNode,E("tbody",null,E(YR,{slatMetas:s}))),E("div",{className:"fc-timegrid-now-indicator-container"},E(An,{unit:h?"minute":"day"},g=>{let v=h&&o&&o.safeComputeTop(g);return typeof v=="number"?E(Qf,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:v},isAxis:!0,date:g}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),p&&m.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Cu},{key:"cols",content:Cu}]}),E(sa,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:c.viewSpec},E(l,{liquid:!d.isHeightAuto&&!d.forPrint,forPrint:d.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:a,minWidth:i}]}],sections:m}))}getAllDayMaxEventProps(){let{dayMaxEvents:t,dayMaxEventRows:e}=this.context.options;return(t===!0||e===!0)&&(t=void 0,e=x0e),{dayMaxEvents:t,dayMaxEventRows:e}}};KR=class{constructor(t,e,r){this.positions=t,this.dateProfile=e,this.slotDuration=r}safeComputeTop(t){let{dateProfile:e}=this;if(_a(e.currentRange,t)){let r=ct(t),a=t.valueOf()-r.valueOf();if(a>=ia(e.slotMinTime)&&a{let o={time:i.time,date:e.dateEnv.toDate(i.date),view:e.viewApi};return E("tr",{key:i.key,ref:a.createRef(i.key)},t.axis&&E(wX,Object.assign({},i)),E(Kt,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}},ZR=class extends Ue{constructor(){super(...arguments),this.rootElRef=zt(),this.slatElRefs=new In}render(){let{props:t,context:e}=this;return E("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},E("table",{"aria-hidden":!0,className:e.theme.getClass("table"),style:{minWidth:t.tableMinWidth,width:t.clientWidth,height:t.minHeight}},t.tableColGroupNode,E(QR,{slatElRefs:this.slatElRefs,axis:t.axis,slatMetas:t.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:t,props:e}=this;e.onCoords&&e.clientWidth!==null&&this.rootElRef.current.offsetHeight&&e.onCoords(new KR(new si(this.rootElRef.current,P0e(this.slatElRefs.currentMap,e.slatMetas),!1,!0),this.props.dateProfile,t.options.slotDuration))}};JR=class extends Ue{render(){let{props:t}=this;return E(wc,{elClasses:["fc-timegrid-more-link"],elStyle:{top:t.top,bottom:t.bottom},allDayDate:null,moreCnt:t.hiddenSegs.length,allSegs:t.hiddenSegs,hiddenSegs:t.hiddenSegs,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,todayRange:t.todayRange,popoverContent:()=>SX(t.hiddenSegs,t),defaultGenerator:M0e,forceTimed:!0},e=>E(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}};B0e=rt({hour:"numeric",minute:"2-digit",meridiem:!1}),Vk=class extends Ue{render(){return E(Ro,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:B0e}))}},XR=class extends Ue{constructor(){super(...arguments),this.sortEventSegs=pe(Dc)}render(){let{props:t,context:e}=this,{options:r}=e,a=r.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||a&&t.dateSelectionSegs||[],s=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{},o=this.sortEventSegs(t.fgEventSegs,r.eventOrder);return E(Fo,{elTag:"td",elRef:t.elRef,elClasses:["fc-timegrid-col",...t.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},t.extraDataAttrs),date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraRenderProps:t.extraRenderProps},l=>E("div",{className:"fc-timegrid-col-frame"},E("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(t.businessHourSegs,"non-business"),this.renderFillSegs(t.bgEventSegs,"bg-event"),this.renderFillSegs(t.dateSelectionSegs,"highlight")),E("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),E("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},!!t.eventDrag,!!t.eventResize,!!a,"mirror")),E("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(t.nowIndicatorSegs)),Pu(r)&&E(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(t,e,r,a,i,s){let{props:o}=this;return o.forPrint?SX(t,o):this.renderPositionedFgSegs(t,e,r,a,i,s)}renderPositionedFgSegs(t,e,r,a,i,s){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=r||a||i,v=TX(t,u,p,d),{segPlacements:T,hiddenGroups:k}=L0e(t,v,c,o);return E(tt,null,this.renderHiddenGroups(k,t),T.map(w=>{let{seg:S,rect:x}=w,I=S.eventRange.instance.instanceId,A=g||!!(!e[I]&&x),B=VR(x&&x.span),z=!g&&x?this.computeSegHStyle(x):{left:0,right:0},U=!!x&&x.stackForward>0,N=!!x&&x.span.end-x.span.start{let u=VR(d.span),p=j0e(d.entries,e);return E(JR,{key:rT(mT(p)),hiddenSegs:p,top:u.top,bottom:u.bottom,extraDateSpan:r,dateProfile:a,todayRange:i,nowDate:s,eventSelection:o,eventDrag:l,eventResize:c})}))}renderFillSegs(t,e){let{props:r,context:a}=this,s=TX(t,r.date,r.slatCoords,a.options.eventMinHeight).map((o,l)=>{let c=t[l];return E("div",{key:Uf(c.eventRange),className:"fc-timegrid-bg-harness",style:VR(o)},e==="bg-event"?E(kc,Object.assign({seg:c},la(c,r.todayRange,r.nowDate))):Zf(e))});return E(tt,null,s)}renderNowIndicator(t){let{slatCoords:e,date:r}=this.props;return e?t.map((a,i)=>E(Qf,{key:i,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:e.computeDateTop(a.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(t){let{isRtl:e,options:r}=this.context,a=r.slotEventOverlap,i=t.levelCoord,s=t.levelCoord+t.thickness,o,l;a&&(s=Math.min(1,i+(s-i)*2)),e?(o=1-s,l=i):(o=i,l=1-s);let c={zIndex:t.stackDepth+1,left:o*100+"%",right:l*100+"%"};return a&&!t.stackForward&&(c[e?"marginLeft":"marginRight"]=20),c}};eF=class extends Ue{constructor(){super(...arguments),this.splitFgEventSegs=pe(Bg),this.splitBgEventSegs=pe(Bg),this.splitBusinessHourSegs=pe(Bg),this.splitNowIndicatorSegs=pe(Bg),this.splitDateSelectionSegs=pe(Bg),this.splitEventDrag=pe(vX),this.splitEventResize=pe(vX),this.rootElRef=zt(),this.cellElRefs=new In}render(){let{props:t,context:e}=this,r=e.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),a=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,a),s=this.splitBgEventSegs(t.bgEventSegs,a),o=this.splitBusinessHourSegs(t.businessHourSegs,a),l=this.splitNowIndicatorSegs(t.nowIndicatorSegs,a),c=this.splitDateSelectionSegs(t.dateSelectionSegs,a),d=this.splitEventDrag(t.eventDrag,a),u=this.splitEventResize(t.eventResize,a);return E("div",{className:"fc-timegrid-cols",ref:this.rootElRef},E("table",{role:"presentation",style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,E("tbody",{role:"presentation"},E("tr",{role:"row"},t.axis&&E("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},E("div",{className:"fc-timegrid-col-frame"},E("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&E(Qf,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:t.nowDate})))),t.cells.map((p,m)=>E(XR,{key:p.key,elRef:this.cellElRefs.createRef(p.key),dateProfile:t.dateProfile,date:p.date,nowDate:t.nowDate,todayRange:t.todayRange,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,fgEventSegs:i[m],bgEventSegs:s[m],businessHourSegs:o[m],nowIndicatorSegs:l[m],dateSelectionSegs:c[m],eventDrag:d[m],eventResize:u[m],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:t}=this;t.onColCoords&&t.clientWidth!==null&&t.onColCoords(new si(this.rootElRef.current,H0e(this.cellElRefs.currentMap,t.cells),!0,!1))}};tF=class extends or{constructor(){super(...arguments),this.processSlotOptions=pe(z0e),this.state={slatCoords:null},this.handleRootEl=t=>{t?this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=t=>{let{onScrollTopRequest:e}=this.props,{slatCoords:r}=this.state;if(e&&r){if(t.time){let a=r.computeTimeTop(t.time);a=Math.ceil(a),a&&(a+=1),e(a)}return!0}return!1},this.handleColCoords=t=>{this.colCoords=t},this.handleSlatCoords=t=>{this.setState({slatCoords:t}),this.props.onSlatCoords&&this.props.onSlatCoords(t)}}render(){let{props:t,state:e}=this;return E("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},E(ZR,{axis:t.axis,dateProfile:t.dateProfile,slatMetas:t.slatMetas,clientWidth:t.clientWidth,minHeight:t.expandRows?t.clientHeight:"",tableMinWidth:t.tableMinWidth,tableColGroupNode:t.axis?t.tableColGroupNode:null,onCoords:this.handleSlatCoords}),E(eF,{cells:t.cells,axis:t.axis,dateProfile:t.dateProfile,businessHourSegs:t.businessHourSegs,bgEventSegs:t.bgEventSegs,fgEventSegs:t.fgEventSegs,dateSelectionSegs:t.dateSelectionSegs,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange,nowDate:t.nowDate,nowIndicatorSegs:t.nowIndicatorSegs,clientWidth:t.clientWidth,tableMinWidth:t.tableMinWidth,tableColGroupNode:t.tableColGroupNode,slatCoords:e.slatCoords,onColCoords:this.handleColCoords,forPrint:t.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(t){this.scrollResponder.update(t.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(t,e){let{dateEnv:r,options:a}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:l,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,a.snapDuration),d=i.leftToIndex(t),u=o.positions.topToIndex(e);if(d!=null&&u!=null){let p=this.props.cells[d],m=o.positions.tops[u],h=o.positions.getHeight(u),f=(e-m)/h,g=Math.floor(f*c),v=u*c+g,T=this.props.cells[d].date,k=Of(s.slotMinTime,nC(l,v)),w=r.add(T,k),S=r.add(w,l);return{dateProfile:s,dateSpan:Object.assign({range:{start:w,end:S},allDay:!1},p.extraDateSpan),dayEl:i.els[d],rect:{left:i.lefts[d],right:i.rights[d],top:m,bottom:m+h},layer:0}}return null}};rF=class extends Tc{sliceRange(t,e){let r=[];for(let a=0;aE(tF,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(t,r,null,e,o),{forPrint:t.forPrint,axis:t.axis,dateProfile:r,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:a.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:i&&this.slicer.sliceNowDate(l,r,s,e,o),todayRange:c,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords})))}};kX=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];$k=class extends GR{constructor(){super(...arguments),this.buildTimeColsModel=pe(V0e),this.buildSlatMetas=pe(W0e)}render(){let{options:t,dateEnv:e,dateProfileGenerator:r}=this.context,{props:a}=this,{dateProfile:i}=a,s=this.buildTimeColsModel(i,r),o=this.allDaySplitter.splitProps(a),l=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,t.slotLabelInterval,t.slotDuration,e),{dayMinWidth:c}=t,d=!c,u=c,p=t.dayHeaders&&E(Ns,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:d?this.renderHeadAxis:null}),m=t.allDaySlot!==!1&&(f=>E(Lg,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:t.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=>E(nF,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:d,slotDuration:t.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,s.colCnt,c,l,this.state.slatCoords):this.renderSimpleLayout(p,m,h)}};$0e='.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}';Ri($0e)});var Y0e,EX,xX=b(()=>{Cc();DX();Y0e={allDaySlot:Boolean},EX=Xr({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:Y0e,views:{timeGrid:{component:$k,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}})});function G0e(n){return E(tt,null,n.text&&E("a",Object.assign({id:n.textId,className:"fc-list-day-text"},n.navLinkAttrs),n.text),n.sideText&&E("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},n.sideNavLinkAttrs),n.sideText))}function Q0e(n,t){let e=Du(n,t);return E("a",Object.assign({},e),n.eventRange.def.title)}function Z0e(n,t,e,r,a){let{options:i}=e;if(i.displayEventTime!==!1){let s=n.eventRange.def,o=n.eventRange.instance,l=!1,c;if(s.allDay?l=!0:fC(n.eventRange.range)?n.isStart?c=Bo(n,t,e,null,null,o.range.start,n.end):n.isEnd?c=Bo(n,t,e,null,null,n.start,o.range.end):l=!0:c=Bo(n,t,e),l){let d={text:e.options.allDayText,view:e.viewApi};return E(Kt,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${a}`},renderProps:d,generatorName:"allDayContent",customGenerator:i.allDayContent,defaultGenerator:J0e,classNameGenerator:i.allDayClassNames,didMount:i.allDayDidMount,willUnmount:i.allDayWillUnmount})}return E("td",{className:"fc-list-event-time"},c)}return null}function J0e(n){return n.text}function X0e(n){return n.text}function eMe(n){let t=ct(n.renderRange.start),e=n.renderRange.end,r=[],a=[];for(;t{Pc();Rg();iF=class extends Ue{constructor(){super(...arguments),this.state={textId:_n()}}render(){let{theme:t,dateEnv:e,options:r,viewApi:a}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:l}=this.state,c=qf(s,o),d=r.listDayFormat?e.format(s,r.listDayFormat):"",u=r.listDaySideFormat?e.format(s,r.listDaySideFormat):"",p=Object.assign({date:e.toDate(s),view:a,textId:l,text:d,sideText:u,navLinkAttrs:ji(this.context,s),sideNavLinkAttrs:ji(this.context,s,"day",!1)},c);return E(Kt,{elTag:"tr",elClasses:["fc-list-day",...Eu(c,t)],elAttrs:{"data-date":Oo(s)},renderProps:p,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:G0e,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},m=>E("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":l},E(m,{elTag:"div",elClasses:["fc-list-day-cushion",t.getClass("tableCellShaded")]})))}};K0e=rt({hour:"numeric",minute:"2-digit",meridiem:"short"}),sF=class extends Ue{render(){let{props:t,context:e}=this,{options:r}=e,{seg:a,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=t,l=r.eventTimeFormat||K0e;return E(Rs,Object.assign({},t,{elTag:"tr",elClasses:["fc-list-event",a.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>Q0e(a,e),seg:a,timeText:"",disableDragging:!0,disableResizing:!0}),(c,d)=>E(tt,null,Z0e(a,l,e,i,o),E("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},E("span",{className:"fc-list-event-dot",style:{borderColor:d.borderColor||d.backgroundColor}})),E(c,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}})))}};Yk=class extends or{constructor(){super(...arguments),this.computeDateVars=pe(eMe),this.eventStoreToSegs=pe(this._eventStoreToSegs),this.state={timeHeaderId:_n(),eventHeaderId:_n(),dateHeaderIdRoot:_n()},this.setRootEl=t=>{t?this.context.registerInteractiveComponent(this,{el:t}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:t,context:e}=this,{dayDates:r,dayRanges:a}=this.computeDateVars(t.dateProfile),i=this.eventStoreToSegs(t.eventStore,t.eventUiBases,a);return E(sa,{elRef:this.setRootEl,elClasses:["fc-list",e.theme.getClass("table"),e.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:e.viewSpec},E(fu,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:t,viewApi:e}=this.context,r={text:t.noEventsText,view:e};return E(Kt,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:t.noEventsContent,defaultGenerator:X0e,classNameGenerator:t.noEventsClassNames,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},a=>E(a,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(t,e){let{theme:r,options:a}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,l=tMe(t);return E(An,{unit:"day"},(c,d)=>{let u=[];for(let p=0;p{Cc();CX();Pc();nMe={listDayFormat:PX,listDaySideFormat:PX,noEventsClassNames:F,noEventsContent:F,noEventsDidMount:F,noEventsWillUnmount:F};MX=Xr({name:"@fullcalendar/list",optionRefiners:nMe,views:{list:{component:Yk,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 iMe(n,t,e,r,a){let{start:i,end:s}=t.currentRange,o=i,l=[];for(;o.valueOf(){Cc();qk();Pc();Rg();oF=class extends or{constructor(){super(...arguments),this.buildDayTableModel=pe(WR),this.slicer=new Og,this.state={labelId:_n()}}render(){let{props:t,state:e,context:r}=this,{dateProfile:a,forPrint:i}=t,{options:s}=r,o=this.buildDayTableModel(a,r.dateProfileGenerator),l=this.slicer.sliceProps(t,a,s.nextDayThreshold,r,o),c=t.tableWidth!=null?t.tableWidth/s.aspectRatio:null,d=o.cells.length,u=c!=null?c/d:null;return E("div",{ref:t.elRef,"data-date":t.isoDateStr,className:"fc-multimonth-month",style:{width:t.width},role:"grid","aria-labelledby":e.labelId},E("div",{className:"fc-multimonth-header",style:{marginBottom:u},role:"presentation"},E("div",{className:"fc-multimonth-title",id:e.labelId},r.dateEnv.format(t.dateProfile.currentRange.start,t.titleFormat)),E("table",{className:["fc-multimonth-header-table",r.theme.getClass("table")].join(" "),role:"presentation"},E("thead",{role:"rowgroup"},E(Ns,{dateProfile:t.dateProfile,dates:o.headerDates,datesRepDistinctDays:!1})))),E("div",{className:["fc-multimonth-daygrid","fc-daygrid","fc-daygrid-body",!i&&"fc-daygrid-body-balanced",i&&"fc-daygrid-body-unbalanced",i&&"fc-daygrid-body-natural"].join(" "),style:{marginTop:-u}},E("table",{className:["fc-multimonth-daygrid-table",r.theme.getClass("table")].join(" "),style:{height:i?"":c},role:"presentation"},E("tbody",{role:"rowgroup"},E(Fg,Object.assign({},l,{dateProfile:a,cells:o.cells,eventSelection:t.eventSelection,dayMaxEvents:!i,dayMaxEventRows:!i,showWeekNumbers:s.weekNumbers,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i}))))))}},lF=class extends or{constructor(){super(...arguments),this.splitDateProfileByMonth=pe(iMe),this.buildMonthFormat=pe(lMe),this.scrollElRef=zt(),this.firstMonthElRef=zt(),this.needsScrollReset=!1,this.handleSizing=t=>{t&&this.updateSize()}}render(){let{context:t,props:e,state:r}=this,{options:a}=t,{clientWidth:i,clientHeight:s}=r,o=r.monthHPadding||0,l=Math.min(i!=null?Math.floor(i/(a.multiMonthMinWidth+o)):1,a.multiMonthMaxColumns)||1,c=100/l+"%",d=i==null?null:i/l-o,u=i!=null&&l===1,p=this.splitDateProfileByMonth(t.dateProfileGenerator,e.dateProfile,t.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":"",e.isHeightAuto?"":"fc-scroller"];return E(sa,{elRef:this.scrollElRef,elClasses:h,viewSpec:t.viewSpec},p.map((f,g)=>{let v=bu(f.currentRange.start);return E(oF,Object.assign({},e,{key:v,isoDateStr:v,elRef:g===0?this.firstMonthElRef:void 0,titleFormat:m,dateProfile:f,width:c,tableWidth:d,clientWidth:i,clientHeight:s}))}))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleSizing),this.requestScrollReset()}componentDidUpdate(t){Jr(t,this.props)||this.handleSizing(!1),t.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}updateSize(){let t=this.scrollElRef.current,e=this.firstMonthElRef.current;t&&this.setState({clientWidth:t.clientWidth,clientHeight:t.clientHeight}),e&&t&&this.state.monthHPadding==null&&this.setState({monthHPadding:t.clientWidth-e.firstChild.offsetWidth})}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.state.monthHPadding!=null){let{currentDate:t}=this.props.dateProfile,e=this.scrollElRef.current,r=e.querySelector(`[data-date="${bu(t)}"]`);e.scrollTop=r.getBoundingClientRect().top-this.firstMonthElRef.current.getBoundingClientRect().top,this.needsScrollReset=!1}}shouldComponentUpdate(){return!0}},aMe=Re(1,"month");sMe=rt({year:"numeric",month:"long"}),oMe=rt({month:"long"});cMe={multiMonthTitleFormat:rt,multiMonthMaxColumns:Number,multiMonthMinWidth:Number},dMe=".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}";Ri(dMe);IX=Xr({name:"@fullcalendar/multimonth",initialView:"multiMonthYear",optionRefiners:cMe,views:{multiMonth:{component:lF,dateProfileGeneratorClass:Qu,multiMonthMinWidth:350,multiMonthMaxColumns:3},multiMonthYear:{type:"multiMonth",duration:{years:1},fixedWeekCount:!0,showNonCurrentDates:!1}}})});function Xo(n,t,e){new cF(n.app,n,{placeholder:e==null?void 0:e.placeholder,title:e==null?void 0:e.title,filter:e==null?void 0:e.filter,newFileFolder:e==null?void 0:e.newFileFolder,onResult:a=>{a.type==="selected"||a.type==="created"?t(a.file):t(null)}}).open()}var Bn,cF,jg=b(()=>{Bn=require("obsidian"),cF=class extends Bn.SuggestModal{constructor(e,r,a){super(e);this.currentQuery="";this.resultHandled=!1;this.createFooterEl=null;this.handleInputChange=()=>{this.currentQuery=this.inputEl.value.trim(),this.updateCreateFooter()};this.plugin=r,this.options=a,this.setPlaceholder(a.placeholder||"Search files or type to create new..."),this.setInstructions([{command:"\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",e=>(e.preventDefault(),e.stopPropagation(),this.createNewFile(),!1)),this.inputEl.addEventListener("input",this.handleInputChange),setTimeout(()=>this.createFooter(),0)}createFooter(){var r;let e=this.modalEl.querySelector(".prompt");e&&(this.createFooterEl=((r=e.parentElement)==null?void 0:r.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 r=this.createFooterEl.createDiv({cls:"file-selector-create-footer__content"}).createDiv({cls:"file-selector-create-footer__title-line"}),a=r.createSpan({cls:"file-selector-create-footer__shortcut",text:"\u21E7\u21B5"});r.createSpan({cls:"file-selector-create-footer__hint-text",text:" to create: "}),r.createSpan({cls:"file-selector-create-footer__filename",text:this.getNewFileName()})}getNewFileName(){let e=this.currentQuery;return e.toLowerCase().endsWith(".md")&&(e=e.slice(0,-3)),e+".md"}async createNewFile(){if(!this.currentQuery){new Bn.Notice("Please enter a file name");return}try{let e=this.currentQuery;e.toLowerCase().endsWith(".md")&&(e=e.slice(0,-3));let r=this.options.newFileFolder||"",a=r?`${r}/${e}.md`:`${e}.md`;if(this.app.vault.getAbstractFileByPath(a)){new Bn.Notice(`File "${a}" already exists`);return}r&&(this.app.vault.getAbstractFileByPath(r)||await this.app.vault.createFolder(r));let s=await this.app.vault.create(a,"");this.resultHandled=!0,this.close(),this.options.onResult({type:"created",file:s})}catch(e){console.error("Error creating file:",e),new Bn.Notice("Failed to create file")}}getSuggestions(e){this.currentQuery=e.trim(),this.updateCreateFooter();let r=this.app.vault.getAllLoadedFiles(),a=e.toLowerCase(),i,s=this.options.filter||"markdown";return typeof s=="function"?i=r.filter(s):s==="markdown"?i=r.filter(o=>o instanceof Bn.TFile&&o.extension==="md"&&!o.path.includes(".trash")):i=r.filter(o=>o instanceof Bn.TFile&&!o.path.includes(".trash")),e?i.filter(o=>this.getSearchText(o).toLowerCase().includes(a)).slice(0,50):i.slice(0,50)}getSearchText(e){let r=`${e.name} ${e.path}`;if(e instanceof Bn.TFile){let a=this.app.metadataCache.getFileCache(e);if(a!=null&&a.frontmatter){let i=this.plugin.fieldMapper.toUserField("title"),s=a.frontmatter[i];s&&(r+=` ${s}`);let o=(0,Bn.parseFrontMatterAliases)(a.frontmatter);o&&o.length>0&&(r+=` ${o.join(" ")}`)}}return r}renderSuggestion(e,r){let a=r.createDiv({cls:"file-selector-suggestion"});if(a.createDiv({cls:"file-selector-suggestion__name",text:e.name}),e instanceof Bn.TFile){let i=this.app.metadataCache.getFileCache(e);if(i!=null&&i.frontmatter){let s=this.plugin.fieldMapper.toUserField("title"),o=i.frontmatter[s];if(o)a.createDiv({cls:"file-selector-suggestion__title",text:o});else{let l=(0,Bn.parseFrontMatterAliases)(i.frontmatter);l&&l.length>0&&a.createDiv({cls:"file-selector-suggestion__aliases",text:l.join(", ")})}}}e.parent&&e.parent.path!=="/"&&a.createDiv({cls:"file-selector-suggestion__path",text:e.parent.path})}onChooseSuggestion(e,r){this.resultHandled=!0,this.options.onResult({type:"selected",file:e})}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 Wt,el,Gk,NX=b(()=>{Wt=require("obsidian");Dr();jg();Ke();el=Ie(Xi()),Gk=class extends Wt.Modal{constructor(e,r,a){super(e);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=r,this.options=a,this.translate=r.i18n.translate.bind(r.i18n)}onOpen(){let{contentEl:e}=this;e.empty(),e.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 Wt.Setting(e).setName(this.translate("modals.timeblockCreation.heading")).setHeading();let r=e.createDiv({cls:"timeblock-date-display"});r.createEl("strong",{text:this.translate("modals.timeblockCreation.dateLabel")});let a=ml(this.options.date);r.createSpan({text:a.toLocaleDateString()}),new Wt.Setting(e).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 i=e.createDiv({cls:"timeblock-time-container"});new Wt.Setting(i).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 Wt.Setting(i).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 Wt.Setting(e).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 Wt.Setting(e).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("#6366f1"),this.colorInput.type="color"}),new Wt.Setting(e).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(()=>{Xo(this.plugin,d=>{d&&this.addAttachment(d)},{placeholder:"Search files or type to create new...",filter:"all"})})}),this.attachmentsList=e.createDiv({cls:"timeblock-attachments-list"}),this.renderAttachmentsList();let s=e.createDiv({cls:"timeblock-modal-buttons"});s.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),s.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 e=this.contentEl.querySelector(".timeblock-create-button");if(!e)return;let r=(o=this.titleInput)==null?void 0:o.value.trim(),a=(l=this.startTimeInput)==null?void 0:l.value,i=(c=this.endTimeInput)==null?void 0:c.value,s=!!(r&&a&&i);if(s&&a&&i){let[d,u]=a.split(":").map(Number),[p,m]=i.split(":").map(Number),h=d*60+u,f=p*60+m;f===0&&(f=1439),f<=h&&(s=!1)}e.disabled=!s,e.style.opacity=s?"1":"0.5"}async handleSubmit(){try{let e=this.titleInput.value.trim(),r=this.startTimeInput.value,a=this.endTimeInput.value,i=this.descriptionInput.value.trim(),s=this.colorInput.value;if(!e||!r||!a){new Wt.Notice(this.translate("notices.timeblockRequiredFieldsMissing"));return}a==="00:00"&&(a="23:59");let o=this.selectedAttachments.map(c=>`[[${c.path}]]`),l={id:LS(),title:e,startTime:r,endTime:a};i&&(l.description=i),s&&(l.color=s),o.length>0&&(l.attachments=o),await this.saveTimeblockToDailyNote(l),this.plugin.emitter.trigger("data-changed"),new Wt.Notice(`Timeblock "${e}" created successfully`),this.close()}catch(e){console.error("Error creating timeblock:",e),new Wt.Notice("Failed to create timeblock. Check console for details.")}}async saveTimeblockToDailyNote(e){if(!(0,el.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let r=window.moment(this.options.date),a=(0,el.getAllDailyNotes)(),i=(0,el.getDailyNote)(r,a);if(!i){try{i=await(0,el.createDailyNote)(r)}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(!i)throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.")}let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=(0,Wt.parseYaml)(p)||{}}catch(m){console.error("Error parsing existing frontmatter:",m),o={}}}}o.timeblocks||(o.timeblocks=[]),o.timeblocks.push(e);let d=`--- +${(0,Wt.stringifyYaml)(o)}---${l}`;await this.app.vault.modify(i,d)}addAttachment(e){if(this.selectedAttachments.some(r=>r.path===e.path)){new Wt.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:e.name}));return}this.selectedAttachments.push(e),this.renderAttachmentsList(),new Wt.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:e.name}))}removeAttachment(e){this.selectedAttachments=this.selectedAttachments.filter(r=>r.path!==e.path),this.renderAttachmentsList(),new Wt.Notice(this.translate("notices.timeblockAttachmentRemoved",{fileName:e.name}))}renderAttachmentsList(){if(this.attachmentsList.empty(),this.selectedAttachments.length===0){let e=this.attachmentsList.createDiv({cls:"timeblock-attachments-empty"});e.textContent="No attachments added yet";return}this.selectedAttachments.forEach(e=>{let r=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=r.createDiv({cls:"timeblock-attachment-info"}),i=a.createSpan({cls:"timeblock-attachment-name"});if(i.textContent=e.name,e.path!==e.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=e.path}let s=r.createEl("button",{cls:"timeblock-attachment-remove",text:"\xD7"});(0,Wt.setTooltip)(s,"Remove attachment",{placement:"top"}),s.addEventListener("click",()=>{this.removeAttachment(e)})})}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:e}=this;e.empty()}}});var Tt,Zs,Kk,RX=b(()=>{Tt=require("obsidian");jg();Zs=Ie(Xi());Ke();Kk=class extends Tt.Modal{constructor(e,r,a,i,s){super(e);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=r,this.timeblock={...a},this.originalTimeblock=a,this.eventDate=i,this.timeblockDate=s||le(i),this.translate=r.i18n.translate.bind(r.i18n)}async onOpen(){let{contentEl:e}=this;e.empty(),e.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 Tt.Setting(e).setName(this.translate("modals.timeblockInfo.editHeading")).setHeading();let r=e.createDiv({cls:"timeblock-date-display"});r.createEl("strong",{text:this.translate("modals.timeblockInfo.dateTimeLabel")});let a=`${this.eventDate.toLocaleDateString()} from ${this.timeblock.startTime} to ${this.timeblock.endTime}`;r.createSpan({text:a}),new Tt.Setting(e).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 Tt.Setting(e).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 Tt.Setting(e).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||"#6366f1"),this.colorInput.type="color"}),new Tt.Setting(e).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(()=>{Xo(this.plugin,u=>{u&&this.addAttachment(u)},{placeholder:"Search files or type to create new...",filter:"all"})})}),this.attachmentsList=e.createDiv({cls:"timeblock-attachments-list"}),await this.initializeAttachments(),this.renderAttachmentsList();let i=e.createDiv({cls:"timeblock-modal-buttons"});i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center",i.style.marginTop="20px",i.createEl("button",{text:this.translate("modals.timeblockInfo.deleteButton"),cls:"mod-warning timeblock-delete-button"}).addEventListener("click",()=>this.handleDelete());let o=i.createDiv({cls:"timeblock-modal-buttons-right"});o.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 i;let e=this.contentEl.querySelector(".timeblock-save-button");if(!e)return;let a=!!((i=this.titleInput)==null?void 0:i.value.trim());e.disabled=!a,e.style.opacity=a?"1":"0.5"}async initializeAttachments(){if(this.timeblock.attachments)for(let e of this.timeblock.attachments){let r=e.replace(/^\[\[|\]\]$/g,""),a=this.app.vault.getAbstractFileByPath(r);a&&this.selectedAttachments.push(a)}}addAttachment(e){if(this.selectedAttachments.some(r=>r.path===e.path)){new Tt.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:e.name}));return}this.selectedAttachments.push(e),this.renderAttachmentsList(),new Tt.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:e.name}))}removeAttachment(e){this.selectedAttachments=this.selectedAttachments.filter(r=>r.path!==e.path),this.renderAttachmentsList(),new Tt.Notice(this.translate("notices.timeblockAttachmentRemoved",{fileName:e.name}))}openAttachment(e){e instanceof Tt.TFile?this.app.workspace.getLeaf(!1).openFile(e):new Tt.Notice(this.translate("notices.timeblockFileTypeNotSupported",{fileName:e.name}))}renderAttachmentsList(){if(this.attachmentsList.empty(),this.selectedAttachments.length===0){let e=this.attachmentsList.createDiv({cls:"timeblock-attachments-empty"});e.textContent="No attachments";return}this.selectedAttachments.forEach(e=>{let r=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=r.createDiv({cls:"timeblock-attachment-info"});a.style.cursor="pointer",(0,Tt.setTooltip)(a,"Click to open",{placement:"top"}),a.addEventListener("click",()=>this.openAttachment(e));let i=a.createSpan({cls:"timeblock-attachment-name"});if(i.textContent=e.name,e.path!==e.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=e.path}let s=r.createEl("button",{cls:"timeblock-attachment-remove",text:"\xD7"});(0,Tt.setTooltip)(s,"Remove attachment",{placement:"top"}),s.addEventListener("click",o=>{o.stopPropagation(),this.removeAttachment(e)})})}async handleSave(){try{let e=this.titleInput.value.trim();if(!e){new Tt.Notice(this.translate("notices.timeblockTitleRequired"));return}this.timeblock.title=e,this.timeblock.description=this.descriptionInput.value.trim()||void 0,this.timeblock.color=this.colorInput.value||void 0;let r=this.selectedAttachments.map(a=>`[[${a.path}]]`);this.timeblock.attachments=r.length>0?r:void 0,await this.updateTimeblockInDailyNote(),this.plugin.emitter.trigger("data-changed"),new Tt.Notice(this.translate("notices.timeblockUpdatedSuccess",{title:e})),this.close()}catch(e){console.error("Error updating timeblock:",e),new Tt.Notice(this.translate("notices.timeblockUpdateFailed"))}}async updateTimeblockInDailyNote(){if(!(0,Zs.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let e=this.timeblockDate,r=window.moment(e,"YYYY-MM-DD"),a=(0,Zs.getAllDailyNotes)(),i=(0,Zs.getDailyNote)(r,a);if(!i)throw new Error("Daily note not found");let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=(0,Tt.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,Tt.stringifyYaml)(o)}---${l}`;await this.app.vault.modify(i,d)}async handleDelete(){if(await this.showDeleteConfirmation())try{await this.deleteTimeblockFromDailyNote(),this.plugin.emitter.trigger("data-changed"),new Tt.Notice(this.translate("notices.timeblockDeletedSuccess",{title:this.timeblock.title})),this.close()}catch(r){console.error("Error deleting timeblock:",r),new Tt.Notice(this.translate("notices.timeblockDeleteFailed"))}}async showDeleteConfirmation(){return new Promise(e=>{let r=new Tt.Modal(this.app);r.titleEl.setText(this.translate("modals.timeblockInfo.deleteConfirmationTitle"));let a=r.contentEl;a.createEl("p",{text:`Are you sure you want to delete the timeblock "${this.timeblock.title}"?`}),a.createEl("p",{text:"This action cannot be undone.",cls:"mod-warning"});let i=a.createDiv({cls:"modal-button-container"});i.style.display="flex",i.style.justifyContent="flex-end",i.style.gap="8px",i.style.marginTop="20px";let s=i.createEl("button",{text:this.translate("common.cancel")});s.addEventListener("click",()=>{r.close(),e(!1)}),i.createEl("button",{text:"Delete",cls:"mod-warning"}).addEventListener("click",()=>{r.close(),e(!0)}),r.open(),setTimeout(()=>s.focus(),50)})}async deleteTimeblockFromDailyNote(){if(!(0,Zs.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let e=this.timeblockDate,r=window.moment(e,"YYYY-MM-DD"),a=(0,Zs.getAllDailyNotes)(),i=(0,Zs.getDailyNote)(r,a);if(!i)throw new Error("Daily note not found");let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=(0,Tt.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,Tt.stringifyYaml)(o):"",d=c?`--- +${c}---${l}`:l.trim();await this.app.vault.modify(i,d)}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:e}=this;e.empty()}}});function Hg(n,t){if(n.startsWith("var("))return n;if(n=n.replace("#",""),!/^[0-9A-Fa-f]{6}$/.test(n))return`rgba(128, 128, 128, ${t})`;let e=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);return`rgba(${e}, ${r}, ${a}, ${t})`}function uMe(){return document.body.classList.contains("theme-dark")}function Zu(n=!1){return n?uMe()?"#e8eaed":"#202124":""}function Zk(n){return n.startsWith("var(")}function OX(n,t){let e=n.title;if(n.projects&&n.projects.length>0&&(e+=` +Project: ${n.projects[0]}`),n.priority){let r=t.priorityManager.getPriorityConfig(n.priority);e+=` +Priority: ${(r==null?void 0:r.label)||n.priority}`}if(n.status){let r=t.statusManager.getStatusConfig(n.status);e+=` +Status: ${(r==null?void 0:r.label)||n.status}`}if(n.timeEstimate){let r=Math.floor(n.timeEstimate/60),a=n.timeEstimate%60;e+=` +Estimate: ${r>0?`${r}h `:""}${a}m`}return e}function LX(n,t){let{isNextScheduledOccurrence:e=!1,isPatternInstance:r=!1,isRecurringInstance:a=!1,isCompleted:i=!1}=t;if(e?(n.style.borderStyle="solid",n.style.borderWidth="2px",n.setAttribute("data-next-scheduled","true"),n.classList.add("fc-next-scheduled-event"),i&&(n.style.opacity="0.6")):r?(n.style.borderStyle="dashed",n.style.borderWidth="2px",n.style.opacity=i?"0.4":"0.7",n.setAttribute("data-pattern-instance","true"),n.classList.add("fc-pattern-instance-event")):a&&(n.style.borderStyle="dashed",n.style.borderWidth="2px",n.setAttribute("data-recurring","true"),n.classList.add("fc-recurring-event"),i&&(n.style.opacity="0.6")),i){let s=n.querySelector(".fc-event-title, .fc-event-title-container");s?s.style.textDecoration="line-through":n.style.textDecoration="line-through",n.classList.add("fc-completed-event")}}async function pMe(n,t,e,r){try{if(!n.recurrence||typeof n.recurrence!="string")throw new Error("Task does not have a valid RRULE string");let a=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/),i;if(a){let s=a[1],o;if(e)o=s.slice(0,8);else{let l=s.slice(0,8),c=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0");o=`${l}T${c}${d}00Z`}i=n.recurrence.replace(/DTSTART:[^;]+/,`DTSTART:${o}`),new Tr.Notice("Updated recurring pattern time. All future instances now appear at this time.")}else{let s=HS(n,t,e);if(!s)throw new Error("Failed to add DTSTART to recurrence rule");i=s,new Tr.Notice("Added time information to recurring pattern. All future instances now appear at this time.")}await r.taskService.updateProperty(n,"recurrence",i)}catch(a){throw console.error("Error updating pattern instance time:",a),a}}async function BX(n,t,e){let{isRecurringInstance:r,isNextScheduledOccurrence:a,isPatternInstance:i}=n.event.extendedProps,s=n.event.start,o=n.event.allDay;if(a){let l;o?l=M(s,"yyyy-MM-dd"):l=M(s,"yyyy-MM-dd'T'HH:mm"),await e.taskService.updateProperty(t,"scheduled",l),new Tr.Notice("Rescheduled next occurrence. This does not change the recurrence pattern.")}else if(i)await pMe(t,s,o,e);else if(r){let l=_e(t.scheduled),c;if(o)c=l,new Tr.Notice("Updated recurring task to all-day. This affects all future instances.");else{let d=M(s,"HH:mm");c=`${l}T${d}`,new Tr.Notice(`Updated recurring task time to ${d}. This affects all future instances.`)}await e.taskService.updateProperty(t,"scheduled",c)}}function uF(n){let t=n.event||n,e=t.extendedProps||{},{isRecurringInstance:r,isNextScheduledOccurrence:a,isPatternInstance:i,instanceDate:s}=e;if((r||a||i)&&s)return je(s);let o=t.start;if(o){let l=M(o,"yyyy-MM-dd");return je(l)}return ft()}function pF(n,t){if(!t)return;let e=Math.ceil(t/1440),r=je(n),a=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()+e));return le(a)}function mMe(n,t){if(!n.scheduled)return null;let e=Ft(n.scheduled),r=n.scheduled,a;if(e&&n.timeEstimate){let c=$t(r),d=new Date(c.getTime()+n.timeEstimate*60*1e3);a=M(d,"yyyy-MM-dd'T'HH:mm")}else e||(a=pF(r,n.timeEstimate));let i=t.priorityManager.getPriorityConfig(n.priority),s=(i==null?void 0:i.color)||"var(--color-accent)",o=t.statusManager.isCompletedStatus(n.status),l=Zk(s)?Zu(!0):s;return{id:`scheduled-${n.path}`,title:n.title,start:r,end:a,allDay:!e,backgroundColor:"transparent",borderColor:s,textColor:l,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduled",isCompleted:o}}}function hMe(n,t){if(!n.due)return null;let e=Ft(n.due),r=n.due,a;if(e){let d=$t(r),u=new Date(d.getTime()+1800*1e3);a=M(u,"yyyy-MM-dd'T'HH:mm")}let i=t.priorityManager.getPriorityConfig(n.priority),s=(i==null?void 0:i.color)||"var(--color-orange)",o=Hg(s,.15),l=t.statusManager.isCompletedStatus(n.status),c=Zk(s)?Zu(!0):s;return{id:`due-${n.path}`,title:`DUE: ${n.title}`,start:r,end:a,allDay:!e,backgroundColor:o,borderColor:s,textColor:c,editable:!1,extendedProps:{taskInfo:n,eventType:"due",isCompleted:l}}}function fMe(n,t){if(!n.timeEntries)return[];let e=t.statusManager.isCompletedStatus(n.status);return n.timeEntries.filter(r=>r.endTime).map((r,a)=>({id:`timeentry-${n.path}-${a}`,title:n.title,start:r.startTime,end:r.endTime,allDay:!1,editable:!0,extendedProps:{taskInfo:n,eventType:"timeEntry",isCompleted:e,timeEntryIndex:a}}))}function zg(n,t){var e;try{let r=n.subscriptionId.startsWith("google-"),a=n.subscriptionId.startsWith("microsoft-"),i,s,o,l;if(r)s=n.color||"#4285F4",i=Hg(s,.2),o=Zu(!0),l="Google Calendar";else if(a)s=n.color||"#0078D4",i=Hg(s,.2),o=Zu(!0),l="Microsoft Calendar";else{let c=(e=t.icsSubscriptionService)==null?void 0:e.getSubscriptions().find(d=>d.id===n.subscriptionId);if(!c||!c.enabled)return null;i=Hg(c.color,.2),s=c.color,o=s,l=c.name}return{id:n.id,title:n.title,start:n.start,end:n.end,allDay:n.allDay,backgroundColor:i,borderColor:s,textColor:o,editable:r||a,extendedProps:{icsEvent:n,eventType:"ics",subscriptionName:l,isGoogleCalendar:r,isMicrosoftCalendar:a}}}catch(r){return console.error("Error creating ICS event:",r),null}}function gMe(n){if(n.recurrence&&typeof n.recurrence=="string"){let t=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(t&&t[1].includes("T")){let e=t[1].split("T")[1];if(e.length>=4){let r=e.slice(0,2),a=e.slice(2,4);return`${r}:${a}`}}}if(n.scheduled){let t=Hr(n.scheduled);if(t)return t}return"09:00"}function yMe(n,t,e,r,a){var m,h;let i=Ft(t),s;if(i&&n.timeEstimate){let f=$t(t),g=new Date(f.getTime()+n.timeEstimate*60*1e3);s=M(g,"yyyy-MM-dd'T'HH:mm")}else i||(s=pF(t,n.timeEstimate));let o=a.priorityManager.getPriorityConfig(n.priority),l=(o==null?void 0:o.color)||"var(--color-accent)",c=((m=n.complete_instances)==null?void 0:m.includes(e))||!1,d=((h=n.skipped_instances)==null?void 0:h.includes(e))||!1,u=Zk(l)?Zu(!0):l,p="transparent";return c?p="rgba(0,0,0,0.3)":d&&(p="rgba(128,128,128,0.2)"),{id:`next-scheduled-${n.path}-${e}`,title:n.title,start:t,end:s,allDay:!i,backgroundColor:p,borderColor:l,textColor:u,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduled",isCompleted:c,isSkipped:d,isNextScheduledOccurrence:!0,instanceDate:e,recurringTemplateTime:r}}}function vMe(n,t,e,r,a){var h,f;let i=Ft(t),s;if(i&&n.timeEstimate){let g=$t(t),v=new Date(g.getTime()+n.timeEstimate*60*1e3);s=M(v,"yyyy-MM-dd'T'HH:mm")}else i||(s=pF(t,n.timeEstimate));let o=a.priorityManager.getPriorityConfig(n.priority),l=(o==null?void 0:o.color)||"var(--color-accent)",c=((h=n.complete_instances)==null?void 0:h.includes(e))||!1,d=((f=n.skipped_instances)==null?void 0:f.includes(e))||!1,u=Hg(l,.5),p=Zk(l)?Zu(!0):u,m="transparent";return c?m="rgba(0,0,0,0.2)":d&&(m="rgba(128,128,128,0.15)"),{id:`recurring-${n.path}-${e}`,title:n.title,start:t,end:s,allDay:!i,backgroundColor:m,borderColor:u,textColor:p,editable:!0,extendedProps:{taskInfo:n,eventType:"recurring",isCompleted:c,isSkipped:d,isPatternInstance:!0,instanceDate:e,recurringTemplateTime:r}}}function bMe(n,t,e,r){if(!n.recurrence||!n.scheduled)return[];let a=[],i=Ft(n.scheduled),s=gMe(n),o=_e(n.scheduled),l=i?Hr(n.scheduled):null,c=l?`${o}T${l}`:o,d=yMe(n,c,o,l||"09:00",r);d&&a.push(d);let u=e;typeof n.recurrence=="string"&&n.recurrence.includes("FREQ=YEARLY")&&(u=new Date(t.getTime()+800*24*60*60*1e3));let p=_l(n,t,u),m=e.getTime();for(let h of p){let f=le(h);if(h.getTime()>m||f===o)continue;let g=i?`${f}T${s}`:f,v=vMe(n,g,f,s,r);v&&a.push(v)}return a}function TMe(n,t){let e=`${t}T${n.startTime}:00`,r=`${t}T${n.endTime}:00`,a=n.color||"#6366f1",i=n.color||"#4f46e5";return{id:`timeblock-${n.id}`,title:n.title,start:e,end:r,allDay:!1,backgroundColor:a,borderColor:i,textColor:"var(--text-on-accent)",editable:!0,extendedProps:{eventType:"timeblock",timeblock:n,originalDate:t}}}function kMe(n,t){if(!(n!=null&&n.timeblocks)||!Array.isArray(n.timeblocks))return[];let e=[];for(let r of n.timeblocks)r&&typeof r.id=="string"&&typeof r.startTime=="string"&&typeof r.endTime=="string"&&e.push(r);return e}async function SMe(n,t,e){try{let r=Date.now();(!dF||r-FX>wMe)&&(dF=(0,Ki.getAllDailyNotes)(),FX=r);let a=dF,i=[];for(let s=new Date(t);s<=e;s.setUTCDate(s.getUTCDate()+1)){let o=le(s),l=new Date(`${o}T12:00:00`),c=window.moment(l),d=(0,Ki.getDailyNote)(c,a);if(d){let u=n.app.metadataCache.getFileCache(d);if(u!=null&&u.frontmatter){let p=kMe(u.frontmatter,d.path);for(let m of p)i.push(TMe(m,o))}}}return i}catch(r){return console.error("Error getting timeblock events:",r),[]}}function Qk(n,t,e,r){if(!t||!e)return!0;try{let i=$t(n).getTime();if(isNaN(i))return!0;let s=i;return r&&(s=i+r*60*1e3),i=t.getTime()}catch(a){return!0}}async function jX(n,t,e={}){let{showScheduled:r=!0,showDue:a=!0,showTimeEntries:i=!0,showRecurring:s=!0,showICSEvents:o=!0,showTimeblocks:l=!1,visibleStart:c,visibleEnd:d}=e,u=[];for(let p of n){if(p.recurrence){if(!p.scheduled)continue;if(s&&c&&d){let m=bMe(p,c,d,t);u.push(...m)}}else{if(r&&p.scheduled&&Qk(p.scheduled,c,d,p.timeEstimate)){let m=mMe(p,t);m&&u.push(m)}if(a&&p.due&&Qk(p.due,c,d)){let m=hMe(p,t);m&&u.push(m)}}if(i&&p.timeEntries){let m=fMe(p,t);for(let h of m)Qk(h.start,c,d)&&u.push(h)}}if(o&&t.icsSubscriptionService){let p=t.icsSubscriptionService.getAllEvents();for(let m of p)if(Qk(m.start,c,d)){let h=zg(m,t);h&&u.push(h)}}if(l&&c&&d){let p=await SMe(t,c,d);u.push(...p)}return u}async function HX(n,t,e,r){if(e){new Tr.Notice("Timeblocks must have specific times. Please select a time range in week or day view.");return}let a=M(n,"yyyy-MM-dd"),i=M(n,"HH:mm"),s=M(t,"HH:mm");new Gk(r.app,r,{date:a,startTime:i,endTime:s}).open()}async function zX(n,t,e,r){if(e){new Tr.Notice(r.i18n.translate("modals.timeEntry.mustHaveSpecificTime"));return}try{let i=(await r.cacheManager.getAllTasks()).filter(s=>!s.archived);if(i.length===0){new Tr.Notice(r.i18n.translate("modals.timeEntry.noTasksAvailable"));return}Fr(r,i,async s=>{if(s)try{let o=Math.round((t.getTime()-n.getTime())/6e4),l={startTime:n.toISOString(),endTime:t.toISOString(),description:"",duration:o},c=[...s.timeEntries||[],l];await r.taskService.updateTask(s,{timeEntries:c}),r.emitter.trigger(Ga),new Tr.Notice(r.i18n.translate("modals.timeEntry.created",{taskTitle:s.title,duration:o.toString()}))}catch(o){console.error("Error creating time entry:",o),new Tr.Notice(r.i18n.translate("modals.timeEntry.createFailed"))}})}catch(a){console.error("Error opening task selector for time entry:",a),new Tr.Notice(r.i18n.translate("modals.timeEntry.createFailed"))}}async function UX(n,t,e,r){try{let a=n.event.start,i=n.event.end,s=M(a,"yyyy-MM-dd"),o=M(a,"HH:mm"),l=M(i,"HH:mm");await tv(r.app,t.id,e,s,o,l),new Tr.Notice("Timeblock moved successfully")}catch(a){console.error("Error moving timeblock:",a),new Tr.Notice(`Failed to move timeblock: ${a.message}`),n.revert()}}async function WX(n,t,e,r){try{let a=n.event.start,i=n.event.end;if(!a||!i){n.revert();return}let s=M(a,"HH:mm"),o=M(i,"HH:mm");await tv(r.app,t.id,e,e,s,o),new Tr.Notice("Timeblock duration updated")}catch(a){console.error("Error resizing timeblock:",a),new Tr.Notice(`Failed to resize timeblock: ${a.message}`),n.revert()}}async function Jk(n,t,e,r){new Kk(r.app,r,n,t,e).open()}function qX(n,t){n.setAttribute("data-timeblock-id",t.id||""),n.style.borderStyle="solid",n.style.borderWidth="2px",n.classList.add("fc-timeblock-event")}function VX(n){var e;let t=((e=n.attachments)==null?void 0:e.length)||0;return`${n.title||"Timeblock"}${n.description?` - ${n.description}`:""}${t>0?` (${t} attachment${t>1?"s":""})`:""}`}function $X(n,t,e,r="tasknotes-calendar"){n.addEventListener("mouseover",a=>{e.app.vault.getAbstractFileByPath(t.path)&&e.app.workspace.trigger("hover-link",{event:a,source:r,hoverParent:n,targetEl:n,linktext:t.path,sourcePath:t.path})})}async function YX(n,t){try{if(!(0,Ki.appHasDailyNotesPluginLoaded)()){new Tr.Notice("Daily Notes core plugin is not enabled. Please enable it in Settings > Core plugins.");return}let e=window.moment(n),r=(0,Ki.getAllDailyNotes)(),a=(0,Ki.getDailyNote)(e,r);if(!a)try{a=await(0,Ki.createDailyNote)(e)}catch(i){let s=i instanceof Error?i.message:String(i);console.error("Failed to create daily note:",i),new Tr.Notice(`Failed to create daily note: ${s}`);return}a&&await t.app.workspace.getLeaf(!1).openFile(a)}catch(e){let r=e instanceof Error?e.message:String(e);console.error("Failed to navigate to daily note:",e),new Tr.Notice(`Failed to navigate to daily note: ${r}`)}}function GX(n,t,e,r){let a=e?M(n,"yyyy-MM-dd"):M(n,"yyyy-MM-dd'T'HH:mm"),i=Math.round((t.getTime()-n.getTime())/(1e3*60)),s=!e&&i>r,o={scheduled:a};if(e){let c=Math.round((t.getTime()-n.getTime())/864e5);c>1&&(o.timeEstimate=c*1440)}else s&&(o.timeEstimate=i);return o}var Tr,Ki,dF,FX,wMe,mF=b(()=>{rr();Wn();Ke();Dr();Tr=require("obsidian"),Ki=Ie(Xi());NX();To();RX();dF=null,FX=0,wMe=5e3});var Xk,jn,ew=b(()=>{Xk=require("obsidian"),jn=class{static async execute(t,e={}){let{fallback:r,errorMessage:a="An error occurred",showNotice:i=!0,logError:s=!0}=e;try{return await t()}catch(o){if(s&&console.error(a,o),i){let l=o instanceof Error?o.message:String(o);new Xk.Notice(`${a}: ${l}`)}return r}}static async executeWithRetry(t,e={}){let{maxRetries:r=3,retryDelay:a=1e3,errorMessage:i="Operation failed",showNotice:s=!0}=e,o;for(let l=0;l<=r;l++)try{return await t()}catch(c){if(o=c instanceof Error?c:new Error(String(c)),lsetTimeout(d,a));continue}console.error(`${i} after ${r+1} attempts:`,o),s&&new Xk.Notice(`${i}: ${o.message}`);return}}static async executeWithValidation(t,e,r={}){let{showNotice:a=!0}=r;for(let i of e)if(!i.condition){a&&new Xk.Notice(i.message);return}return this.execute(t,r)}}});var Js,Ju,hF=b(()=>{Js=require("obsidian");rr();ew();Ju=class extends Js.Modal{constructor(e,r,a){super(e);this.title="";this.folder="";this.template="";this.useTemplate=!1;this.keyboardHandler=null;this.plugin=r,this.options=a,this.translate=r.i18n.translate.bind(r.i18n),this.title=this.generateDefaultTitle(),this.folder=this.getDefaultFolder(),this.template=this.getDefaultTemplate()}onOpen(){this.containerEl.addClass("tasknotes-plugin","ics-note-creation-modal"),this.keyboardHandler=e=>{e.key==="Enter"&&(e.ctrlKey||e.metaKey)&&(e.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:e}=this;e.empty(),e.createDiv("modal-header").createEl("h2",{text:this.translate("modals.icsNoteCreation.heading")});let a=e.createDiv("ics-event-preview");this.createEventPreview(a),new Js.Setting(e).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 Js.Setting(e).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=e.createDiv("template-settings"),this.createTemplateSettings(),this.previewContainer=e.createDiv("content-preview"),this.updatePreview();let i=e.createDiv("modal-button-container"),s=i.createEl("button",{text:this.translate("modals.icsNoteCreation.createButton"),cls:"mod-cta"});s.onclick=l=>{l.preventDefault(),l.stopPropagation(),console.log("Create button clicked"),this.handleCreate()};let o=i.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(e){let{icsEvent:r,subscriptionName:a}=this.options;e.createEl("h3",{text:r.title});let i=e.createDiv("event-details");if(r.start){let o=r.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(r.start)?r.start+"T00:00:00":r.start,l=new Date(o),c=i.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.startLabel")}),c.appendText(M(l,"PPPp"))}if(r.end&&!r.allDay){let o=/^\d{4}-\d{2}-\d{2}$/.test(r.end)?r.end+"T00:00:00":r.end,l=new Date(o),c=i.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.endLabel")}),c.appendText(M(l,"PPPp"))}if(r.location){let o=i.createDiv();o.createEl("strong",{text:this.translate("modals.icsNoteCreation.locationLabel")}),o.appendText(r.location)}let s=i.createDiv();s.createEl("strong",{text:this.translate("modals.icsNoteCreation.calendarLabel")}),s.appendText(a)}createTemplateSettings(){this.templateContainer.empty(),new Js.Setting(this.templateContainer).setName(this.translate("modals.icsNoteCreation.useTemplateLabel")).setDesc(this.translate("modals.icsNoteCreation.useTemplateDesc")).addToggle(e=>{e.setValue(this.useTemplate).onChange(r=>{this.useTemplate=r,this.updateTemplateInput(),this.updatePreview()})}),this.useTemplate&&new Js.Setting(this.templateContainer).setName(this.translate("modals.icsNoteCreation.templatePathLabel")).setDesc(this.translate("modals.icsNoteCreation.templatePathDesc")).addText(e=>{this.templateInput=e.inputEl,e.setValue(this.template).setPlaceholder(this.translate("modals.icsNoteCreation.templatePathPlaceholder")).onChange(r=>{this.template=r,this.updatePreview()})})}updateDefaultsForContentType(){var e,r;this.folder=((e=this.plugin.settings.icsIntegration)==null?void 0:e.defaultNoteFolder)||"",this.template=((r=this.plugin.settings.icsIntegration)==null?void 0:r.defaultNoteTemplate)||"",this.folderInput&&(this.folderInput.value=this.folder),this.templateInput&&(this.templateInput.value=this.template)}updateTemplateInput(){this.createTemplateSettings()}updatePreview(){if(!this.previewContainer)return;this.previewContainer.empty(),this.previewContainer.createEl("h4",{text:"Summary"});let e=this.previewContainer.createDiv("preview-details"),r=e.createDiv();r.createEl("strong",{text:"Type: "}),r.appendText("Note");let a=e.createDiv();a.createEl("strong",{text:"Title: "}),a.appendText(this.title||"Untitled");let i=e.createDiv();if(i.createEl("strong",{text:"Folder: "}),i.appendText(this.folder||"Vault root"),this.useTemplate&&this.template){let c=e.createDiv();c.createEl("strong",{text:"Template: "}),c.appendText(this.template)}else{let c=e.createDiv();c.createEl("strong",{text:"Template: "}),c.appendText("Default format")}let s=this.previewContainer.createDiv("template-variables");s.createEl("h5",{text:"Available Template Variables"});let o=["{{title}}","{{icsEventTitle}}","{{icsEventStart}}","{{icsEventEnd}}","{{icsEventLocation}}","{{icsEventDescription}}","{{icsEventUrl}}","{{icsEventSubscription}}","{{icsEventId}}","{{date}}","{{time}}"],l=s.createDiv("variables-list");o.forEach(c=>{l.createSpan({text:c,cls:"template-variable"})})}generateDefaultTitle(){let{icsEvent:e}=this.options,r=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,a=new Date(r);return`${e.title} - ${M(a,"PPP")}`}getDefaultFolder(){var e;return((e=this.plugin.settings.icsIntegration)==null?void 0:e.defaultNoteFolder)||""}getDefaultTemplate(){var e;return((e=this.plugin.settings.icsIntegration)==null?void 0:e.defaultNoteTemplate)||""}async handleCreate(){await jn.executeWithValidation(async()=>{var a,i;let{icsEvent:e}=this.options,r=await this.plugin.icsNoteService.createNoteFromICS(e,{title:this.title,folder:this.folder||void 0,template:this.useTemplate&&this.template?this.template:void 0});new Js.Notice(`Note created: ${this.title}`),(i=(a=this.options).onContentCreated)==null||i.call(a,r.file,r.noteInfo),this.close()},[{condition:!!this.title.trim(),message:"Title is required"}],{errorMessage:"Failed to create note from ICS event"})}}});var Pt,tl,tw=b(()=>{Pt=require("obsidian");hF();jg();ew();tl=class extends Pt.Modal{constructor(e,r,a,i){super(e);this.relatedNotes=[];this.plugin=r,this.icsEvent=a,this.subscriptionName=i,this.translate=r.i18n.translate.bind(r.i18n)}async onOpen(){await this.renderContent()}async renderContent(){let{contentEl:e}=this;e.empty(),await this.loadRelatedNotes(),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.calendarEventHeading")).setHeading(),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.titleLabel")).setDesc(this.icsEvent.title||this.translate("ui.icsCard.untitledEvent")),this.subscriptionName&&new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.calendarLabel")).setDesc(this.subscriptionName);let r=this.icsEvent.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(this.icsEvent.start)?this.icsEvent.start+"T00:00:00":this.icsEvent.start,a=new Date(r),i=a.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});if(!this.icsEvent.allDay&&(i+=` at ${a.toLocaleTimeString()}`,this.icsEvent.end)){let s=/^\d{4}-\d{2}-\d{2}$/.test(this.icsEvent.end)?this.icsEvent.end+"T00:00:00":this.icsEvent.end,o=new Date(s);i+=` - ${o.toLocaleTimeString()}`}new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.dateTimeLabel")).setDesc(i),this.icsEvent.location&&new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.locationLabel")).setDesc(this.icsEvent.location),this.icsEvent.description&&new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.descriptionLabel")).setDesc(this.icsEvent.description),this.icsEvent.url&&new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.urlLabel")).descEl.createEl("a",{cls:"external-link",href:this.icsEvent.url,text:this.icsEvent.url}).setAttribute("target","_blank"),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.relatedNotesHeading")).setHeading(),this.relatedNotes.length===0?new Pt.Setting(e).setDesc(this.translate("modals.icsEventInfo.noRelatedItems")):this.relatedNotes.forEach(s=>{let l=this.isTaskNote(s)?this.translate("modals.icsEventInfo.typeTask"):this.translate("modals.icsEventInfo.typeNote");new Pt.Setting(e).setName(s.title).setDesc(`Type: ${l}`).addButton(c=>{c.setButtonText("Open").onClick(async()=>{await this.safeOpenFile(s.path),this.close()})})}),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.actionsHeading")).setHeading(),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.createFromEventLabel")).setDesc(this.translate("modals.icsEventInfo.createFromEventDesc")).addButton(s=>{s.setButtonText("Create Note").onClick(()=>{console.log("Create Note clicked"),this.openCreationModal()})}).addButton(s=>{s.setButtonText("Create Task").onClick(async()=>{console.log("Create Task clicked"),await this.createTaskDirectly()})}),new Pt.Setting(e).setName(this.translate("modals.icsEventInfo.linkExistingLabel")).setDesc(this.translate("modals.icsEventInfo.linkExistingDesc")).addButton(s=>{s.setButtonText("Link Note").onClick(()=>{console.log("Link Note clicked"),this.linkExistingNote()})}).addButton(s=>{s.setButtonText("Refresh").onClick(()=>{console.log("Refresh clicked"),this.refreshRelatedNotes()})})}async loadRelatedNotes(){let e=await jn.execute(()=>this.plugin.icsNoteService.findRelatedNotes(this.icsEvent),{fallback:[],errorMessage:"Failed to load related notes",showNotice:!1});this.relatedNotes=e||[]}openCreationModal(){console.log("Opening note creation modal");try{new Ju(this.app,this.plugin,{icsEvent:this.icsEvent,subscriptionName:this.subscriptionName||"Unknown Calendar",onContentCreated:async(r,a)=>{new Pt.Notice(this.translate("notices.icsNoteCreatedSuccess")),this.refreshRelatedNotes(),await this.safeOpenFile(r.path)}}).open()}catch(e){console.error("Error opening creation modal:",e),new Pt.Notice(this.translate("notices.icsCreationModalOpenFailed"))}}async linkExistingNote(){await jn.execute(async()=>{Xo(this.plugin,async e=>{e&&await jn.execute(async()=>{await this.plugin.icsNoteService.linkNoteToICS(e.path,this.icsEvent),new Pt.Notice(this.translate("notices.icsNoteLinkSuccess",{fileName:e.name})),this.refreshRelatedNotes()},{errorMessage:"Failed to link note"})},{placeholder:"Search notes to link...",filter:"markdown"})},{errorMessage:"Failed to open note selection"})}async createTaskDirectly(){await jn.execute(async()=>{let e=await this.plugin.icsNoteService.createTaskFromICS(this.icsEvent);new Pt.Notice(this.translate("notices.icsTaskCreatedSuccess",{taskTitle:e.taskInfo.title})),await this.safeOpenFile(e.file.path),this.refreshRelatedNotes()},{errorMessage:"Failed to create task from ICS event"})}async refreshRelatedNotes(){await jn.execute(async()=>{await this.loadRelatedNotes(),await this.renderContent(),new Pt.Notice(this.translate("notices.icsRelatedItemsRefreshed"))},{errorMessage:"Failed to refresh related notes"})}isTaskNote(e){var a;let r=this.plugin.settings.taskTag;return((a=e.tags)==null?void 0:a.includes(r))||!1}async safeOpenFile(e){try{let r=this.app.vault.getAbstractFileByPath(e);r instanceof Pt.TFile?await this.app.workspace.getLeaf().openFile(r):(new Pt.Notice(this.translate("notices.icsFileNotFound")),console.error("Invalid file path or file not found:",e))}catch(r){console.error("Error opening file:",r),new Pt.Notice(this.translate("notices.icsFileOpenFailed"))}}onClose(){let{contentEl:e}=this;e.empty()}}});var fn,Xu,fF=b(()=>{fn=require("obsidian");tw();hF();jg();ew();ws();Xu=class{constructor(t){this.menu=new Mr,this.options=t,this.buildMenu()}t(t,e){return this.options.plugin.i18n.translate(t,e)}getLocale(){return this.options.plugin.i18n.getCurrentLocale()||"en"}buildMenu(){let{icsEvent:t,plugin:e,subscriptionName:r}=this.options;this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.showDetails")).setIcon("info").onClick(()=>{new tl(e.app,e,t,r).open()})),this.menu.addSeparator(),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.createTask")).setIcon("check-circle").onClick(async()=>{await this.createTaskFromEvent()})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.createNote")).setIcon("file-plus").onClick(()=>{this.createNoteFromEvent()})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.linkNote")).setIcon("link").onClick(()=>{this.linkExistingNote()})),this.menu.addSeparator(),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyTitle")).setIcon("copy").onClick(async()=>{try{await navigator.clipboard.writeText(t.title),new fn.Notice(this.t("contextMenus.ics.notices.copyTitleSuccess"))}catch(i){new fn.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),t.location&&this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyLocation")).setIcon("map-pin").onClick(async()=>{try{await navigator.clipboard.writeText(t.location||""),new fn.Notice(this.t("contextMenus.ics.notices.copyLocationSuccess"))}catch(i){new fn.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),t.url&&this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyUrl")).setIcon("external-link").onClick(async()=>{try{await navigator.clipboard.writeText(t.url||""),new fn.Notice(this.t("contextMenus.ics.notices.copyUrlSuccess"))}catch(i){new fn.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyMarkdown")).setIcon("file-text").onClick(async()=>{let i=this.formatEventAsMarkdown();try{await navigator.clipboard.writeText(i),new fn.Notice(this.t("contextMenus.ics.notices.copyMarkdownSuccess"))}catch(s){new fn.Notice(this.t("contextMenus.ics.notices.copyFailure"))}}))}async createTaskFromEvent(){await jn.execute(async()=>{let t=await this.options.plugin.icsNoteService.createTaskFromICS(this.options.icsEvent);new fn.Notice(this.t("contextMenus.ics.notices.taskCreated",{title:t.taskInfo.title}));let e=this.options.plugin.app.vault.getAbstractFileByPath(t.file.path);e instanceof fn.TFile&&await this.options.plugin.app.workspace.getLeaf().openFile(e),this.options.onUpdate&&this.options.onUpdate()},{errorMessage:this.t("contextMenus.ics.notices.taskCreateFailure")})}createNoteFromEvent(){try{new Ju(this.options.plugin.app,this.options.plugin,{icsEvent:this.options.icsEvent,subscriptionName:this.options.subscriptionName||this.t("contextMenus.ics.subscriptionUnknown"),onContentCreated:async e=>{new fn.Notice(this.t("contextMenus.ics.notices.noteCreated")),await this.options.plugin.app.workspace.getLeaf().openFile(e),this.options.onUpdate&&this.options.onUpdate()}}).open()}catch(t){console.error("Error opening creation modal:",t),new fn.Notice(this.t("contextMenus.ics.notices.creationFailure"))}}async linkExistingNote(){await jn.execute(async()=>{Xo(this.options.plugin,async t=>{t&&await jn.execute(async()=>{await this.options.plugin.icsNoteService.linkNoteToICS(t.path,this.options.icsEvent),new fn.Notice(this.t("contextMenus.ics.notices.linkSuccess",{name:t.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:t,subscriptionName:e}=this.options,r=[],a=t.title||this.t("contextMenus.ics.markdown.titleFallback");r.push(`## ${a}`),r.push(""),e&&r.push(this.t("contextMenus.ics.markdown.calendar",{value:e}));let i=this.getLocale(),s=t.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(t.start)?t.start+"T00:00:00":t.start,o=new Date(s),l=new Intl.DateTimeFormat(i,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),c=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit"}),d=l.format(o);if(!t.allDay&&(d+=this.t("contextMenus.ics.markdown.at",{time:c.format(o)}),t.end)){let u=/^\d{4}-\d{2}-\d{2}$/.test(t.end)?t.end+"T00:00:00":t.end,p=new Date(u);d+=` - ${c.format(p)}`}return r.push(this.t("contextMenus.ics.markdown.date",{value:d})),t.location&&r.push(this.t("contextMenus.ics.markdown.location",{value:t.location})),t.description&&(r.push(""),r.push(this.t("contextMenus.ics.markdown.descriptionHeading")),r.push(t.description)),t.url&&(r.push(""),r.push(this.t("contextMenus.ics.markdown.url",{value:t.url}))),r.join(` +`)}show(t){this.menu.showAtMouseEvent(t)}showAtElement(t){this.menu.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4})}}});function DMe(n,t){try{if(!n.start)return"";let e=new Date(n.start);if(n.allDay)return t.i18n.translate("ui.icsCard.allDay");let r=t.settings.calendarViewSettings.timeFormat,a=od(e,r);if(n.end){let i=new Date(n.end),s=od(i,r);return`${a} \u2013 ${s}`}return a}catch(e){return""}}function QX(n,t,e={}){var f;let r=document.createElement("div");r.className="task-card task-card--ics",r.dataset.key=n.id;let a=(f=t.icsSubscriptionService)==null?void 0:f.getSubscriptions().find(g=>g.id===n.subscriptionId),i=(a==null?void 0:a.color)||"var(--color-accent)",s=(a==null?void 0:a.name)||t.i18n.translate("ui.icsCard.calendarFallback"),o=r.createEl("div",{cls:"task-card__main-row"}),l=o.createEl("span",{cls:"ics-card__icon"}),c=l.createDiv({attr:{"aria-label":t.i18n.translate("ui.icsCard.calendarEvent")}});(0,KX.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=i;let u=o.createEl("div",{cls:"task-card__content"});u.createEl("div",{cls:"task-card__title",text:n.title||t.i18n.translate("ui.icsCard.untitledEvent")});let p=u.createEl("div",{cls:"task-card__metadata"}),m=[],h=DMe(n,t);return h&&m.push(h),n.location&&m.push(n.location),m.push(s),p.textContent=m.join(" \u2022 "),r.addEventListener("click",()=>{new tl(t.app,t,n,s).open()}),r.addEventListener("contextmenu",g=>{g.preventDefault(),g.stopPropagation(),new Xu({icsEvent:n,plugin:t,subscriptionName:s,onUpdate:()=>{t.app.workspace.trigger("tasknotes:refresh-views")}}).show(g)}),r.style.setProperty("--current-status-color",i),r}var KX,ZX=b(()=>{KX=require("obsidian");fF();Ke();tw()});function XX(n,t,e,r={}){var u,p,m,h,f;let a={...EMe,...r},i=document.createElement("div");i.className="task-card task-card--property-event";let s=n.file;if(!s)return i.textContent=t.i18n.translate("ui.propertyEventCard.unknownFile"),i;i.dataset.key=`property-${s.path}`,i.dataset.filePath=s.path;let o=i.createEl("div",{cls:"task-card__main-row"}),l=o.createEl("span",{cls:"property-event-card__icon"}),c=l.createDiv();(0,JX.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:s.basename||s.name}),a.showProperties&&e){let g=d.createEl("div",{cls:"task-card__metadata"}),v=[];try{let T=((u=e.getOrder)==null?void 0:u.call(e))||[],k=(p=e.getAsPropertyId)==null?void 0:p.call(e,"startDateProperty"),w=(m=e.getAsPropertyId)==null?void 0:m.call(e,"endDateProperty");for(let S of T){if(S===k||S===w)continue;let x=(h=n.getValue)==null?void 0:h.call(n,S);if(x&&x.data!==null&&x.data!==void 0){let I=((f=e.getDisplayName)==null?void 0:f.call(e,S))||S,A=String(x.data);A.length>30&&(A=A.substring(0,27)+"..."),v.push(`${I}: ${A}`)}}}catch(T){console.debug("[TaskNotes][PropertyEventCard] Error reading properties:",T)}v.length>0?g.textContent=v.join(" \u2022 "):g.textContent=s.path}return i.addEventListener("click",g=>{let v=g.ctrlKey||g.metaKey;t.app.workspace.openLinkText(s.path,"",v)}),i.addEventListener("mouseover",g=>{t.app.workspace.trigger("hover-link",{event:g,source:"tasknotes-property-event-card",hoverParent:i,targetEl:i,linktext:s.path,sourcePath:s.path})}),i.style.setProperty("--current-status-color","var(--color-accent)"),i}var JX,EMe,eee=b(()=>{JX=require("obsidian"),EMe={showProperties:!0}});function ree(n,t,e={}){let r={...xMe,...e},a=document.createElement("div");a.className="task-card task-card--timeblock",a.dataset.key=`timeblock-${n.id}`;let i=a.createEl("div",{cls:"task-card__main-row"}),s=i.createEl("span",{cls:"timeblock-card__icon"}),o=s.createDiv();(0,tee.setIcon)(o,"clock"),s.style.display="inline-flex",s.style.width="16px",s.style.height="16px",s.style.marginRight="8px",s.style.alignItems="center",s.style.justifyContent="center",s.style.flexShrink="0",o.style.width="100%",o.style.height="100%",o.style.color=n.color||"var(--color-accent)";let l=i.createEl("div",{cls:"task-card__content"}),c=n.title||"Timeblock",d=`${n.startTime} - ${n.endTime}`;l.createEl("div",{cls:"task-card__title",text:c});let u=l.createEl("div",{cls:"task-card__metadata"});if(u.textContent=d,r.showDescription&&n.description){let p=l.createEl("div",{cls:"task-card__description",text:n.description});p.style.fontSize="var(--tn-font-size-sm)",p.style.color="var(--tn-text-muted)",p.style.marginTop="4px"}if(r.showAttachments&&n.attachments&&n.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=n.attachments.length===1?"1 attachment":`${n.attachments.length} attachments`;p.textContent=`\u{1F4CE} ${m}`}return a.addEventListener("click",p=>{r.eventDate&&r.originalDate&&Jk(n,r.eventDate,r.originalDate,t)}),n.color?a.style.setProperty("--current-status-color",n.color):a.style.setProperty("--current-status-color","var(--color-accent)"),a}var tee,xMe,nee=b(()=>{tee=require("obsidian");mF();xMe={showDescription:!0,showAttachments:!0}});function rw(n){if(typeof n=="string"){let t=n.trim();if(!t)return null;if(Ft(t)){let e=$t(t);return isNaN(e.getTime())?null:{value:M(e,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}}try{let e=je(t);return{value:le(e),isAllDay:!0}}catch(e){return null}}if(typeof n=="number"){let t=new Date(n);return isNaN(t.getTime())?null:{value:le(t),isAllDay:!0}}return n instanceof Date?isNaN(n.getTime())?null:n.getHours()!==0||n.getMinutes()!==0||n.getSeconds()!==0||n.getMilliseconds()!==0?{value:M(n,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}:{value:le(n),isAllDay:!0}:null}function aee(n){return function(t,e){if(!e)throw console.error("[TaskNotes][CalendarView] No containerEl provided"),new Error("CalendarView requires a containerEl");return new gF(t,e,n)}}var Hn,gF,iee=b(()=>{Ng();Fk();Cc();yX();xX();AX();oP();_X();mF();ZE();sb();tw();Hn=require("obsidian");rr();Or();ZX();eee();nee();GE();fF();Ke();gF=class extends Gi{constructor(e,r,a){super(e,r,a);this.type="tasknoteCalendar";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.icsCalendarToggles=new Map;this.googleCalendarToggles=new Map;this.microsoftCalendarToggles=new Map;this.configLoaded=!1;this.dataAdapter.basesView=this;let i=this.plugin.settings.calendarViewSettings;this.viewOptions={showScheduled:i.defaultShowScheduled,showDue:i.defaultShowDue,showRecurring:i.defaultShowRecurring,showTimeEntries:i.defaultShowTimeEntries,showTimeblocks:i.defaultShowTimeblocks,showPropertyBasedEvents:!0,initialDate:"",initialDateProperty:null,initialDateStrategy:"first",calendarView:i.defaultView,customDayCount:i.customDayCount,listDayCount:7,slotMinTime:this.validateTimeValue(i.slotMinTime,"00:00:00",!1),slotMaxTime:this.validateTimeValue(i.slotMaxTime,"24:00:00",!0),slotDuration:this.validateTimeValue(i.slotDuration,"00:30:00",!1),scrollTime:this.validateTimeValue(i.scrollTime,"08:00:00",!1),firstDay:i.firstDay,weekNumbers:i.weekNumbers,nowIndicator:i.nowIndicator,showWeekends:i.showWeekends,showAllDaySlot:!0,showTodayHighlight:i.showTodayHighlight,selectMirror:i.selectMirror,timeFormat:i.timeFormat,eventMinHeight:i.eventMinHeight,slotEventOverlap:i.slotEventOverlap,eventMaxStack:i.eventMaxStack,dayMaxEvents:i.dayMaxEvents,dayMaxEventRows:i.dayMaxEventRows,locale:i.locale,startDateProperty:null,endDateProperty:null,titleProperty:null}}onload(){this.readViewOptions(),super.onload()}onResize(){this.calendar&&this.calendar.updateSize()}onDataUpdated(){var e;if((e=this.rootElement)!=null&&e.isConnected){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}this.dataUpdateDebounceTimer=window.setTimeout(()=>{this.dataUpdateDebounceTimer=null,this.render()},5e3)}}expectImmediateUpdate(){this._expectingImmediateUpdate=!0,setTimeout(()=>{this._expectingImmediateUpdate=!1},2e3)}validateTimeValue(e,r,a=!1){if(!e)return r;if(/^\d{2}:\d{2}:\d{2}$/.test(e)){let[i,s]=e.split(":").map(Number),o=a?24:23;return i<0||i>o||s<0||s>59?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${e}, using default: ${r}`),r):i===24&&s!==0?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${e}, using default: ${r}`),r):e}if(/^\d{2}:\d{2}$/.test(e)){let[i,s]=e.split(":").map(Number),o=a?24:23;return i<0||i>o||s<0||s>59?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${e}, using default: ${r}`),r):i===24&&s!==0?(console.warn(`[TaskNotes][CalendarView] Invalid time value: ${e}, using default: ${r}`),r):`${e}:00`}return console.warn(`[TaskNotes][CalendarView] Invalid time format: ${e}, using default: ${r}`),r}readEventToggles(){var e,r,a,i,s,o,l,c,d;if(!(!this.config||typeof this.config.get!="function"))try{if(this.viewOptions.showScheduled=(e=this.config.get("showScheduled"))!=null?e:this.viewOptions.showScheduled,this.viewOptions.showDue=(r=this.config.get("showDue"))!=null?r:this.viewOptions.showDue,this.viewOptions.showRecurring=(a=this.config.get("showRecurring"))!=null?a:this.viewOptions.showRecurring,this.viewOptions.showTimeEntries=(i=this.config.get("showTimeEntries"))!=null?i:this.viewOptions.showTimeEntries,this.viewOptions.showTimeblocks=(s=this.config.get("showTimeblocks"))!=null?s:this.viewOptions.showTimeblocks,this.viewOptions.showPropertyBasedEvents=(o=this.config.get("showPropertyBasedEvents"))!=null?o:this.viewOptions.showPropertyBasedEvents,this.plugin.icsSubscriptionService){let u=this.plugin.icsSubscriptionService.getSubscriptions();for(let p of u){let m=`showICS_${p.id}`;this.icsCalendarToggles.set(p.id,(l=this.config.get(m))!=null?l:!0)}}if(this.plugin.googleCalendarService){let u=this.plugin.googleCalendarService.getAvailableCalendars();for(let p of u){let m=`showGoogleCalendar_${p.id}`;this.googleCalendarToggles.set(p.id,(c=this.config.get(m))!=null?c:!0)}}if(this.plugin.microsoftCalendarService){let u=this.plugin.microsoftCalendarService.getAvailableCalendars();for(let p of u){let m=`showMicrosoftCalendar_${p.id}`;this.microsoftCalendarToggles.set(p.id,(d=this.config.get(m))!=null?d:!0)}}}catch(u){console.error("[TaskNotes][CalendarView] Error reading event toggles:",u)}}readViewOptions(){var e,r,a,i,s,o,l,c,d,u,p,m,h,f,g,v,T,k,w;if(!(!this.config||typeof this.config.get!="function"))try{this.readEventToggles(),this.viewOptions.initialDate=(e=this.config.get("initialDate"))!=null?e:this.viewOptions.initialDate,this.viewOptions.initialDateProperty=(r=this.config.get("initialDateProperty"))!=null?r:this.viewOptions.initialDateProperty,this.viewOptions.initialDateStrategy=(a=this.config.get("initialDateStrategy"))!=null?a:this.viewOptions.initialDateStrategy,this.viewOptions.calendarView=(i=this.config.get("calendarView"))!=null?i:this.viewOptions.calendarView,this.viewOptions.customDayCount=(s=this.config.get("customDayCount"))!=null?s: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=(v=this.config.get("slotEventOverlap"))!=null?v: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 I=this.config.get("dayMaxEventRows");I!==void 0&&(this.viewOptions.dayMaxEventRows=I===0?!1:I),this.viewOptions.startDateProperty=(T=this.config.get("startDateProperty"))!=null?T:this.viewOptions.startDateProperty,this.viewOptions.endDateProperty=(k=this.config.get("endDateProperty"))!=null?k:this.viewOptions.endDateProperty,this.viewOptions.titleProperty=(w=this.config.get("titleProperty"))!=null?w:this.viewOptions.titleProperty;let A=this.config.get("enableSearch");this.enableSearch=A!=null?A:!1,this.configLoaded=!0,this.calendar&&this.applyTodayHighlightStyling()}catch(S){console.error("[TaskNotes][CalendarView] Error reading view options:",S)}}async render(){var e,r,a;if(this._isRendering){this._pendingRender=!0;return}if(this._isRendering=!0,this._pendingRender=!1,!this.calendarEl||!this.rootElement){this._isRendering=!1;return}if(!((e=this.data)!=null&&e.data)){this._isRendering=!1;return}!this.configLoaded&&this.config?this.readViewOptions():this.config&&this.readEventToggles(),this.rootElement&&this.setupSearch(this.rootElement);try{let i=this.dataAdapter.extractDataItems(),s=await Uc(i,this.plugin),o=this.applySearchFilter(s);if(this.currentTasks=o,this.basesEntryByPath.clear(),(r=this.data)!=null&&r.data)for(let l of this.data.data)(a=l.file)!=null&&a.path&&this.basesEntryByPath.set(l.file.path,l);this.calendar?await this.updateCalendarEvents(s):await this.initializeCalendar(s)}catch(i){console.error("[TaskNotes][CalendarView] Error rendering:",i),this.renderError(i)}finally{this._isRendering=!1}this._pendingRender&&(this._pendingRender=!1,setTimeout(()=>this.render(),0))}async initializeCalendar(e){var i;if(!this.calendarEl)return;let r=this.determineInitialDate(e),a={plugins:[gX,EX,MX,vG,IX],initialView:this.viewOptions.calendarView,initialDate:r,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")},customButtons:{listWeekButton:{text:this.plugin.i18n.translate("views.basesCalendar.buttonText.list"),hint:this.plugin.i18n.translate("views.basesCalendar.buttonText.list")||"List",click:()=>{var s;this.calendar&&((s=this.calendar.view)==null?void 0:s.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(s){console.error("[TaskNotes][CalendarView] Error refreshing calendars:",s)}}}},views:{timeGridCustom:{type:"timeGrid",duration:{days:this.viewOptions.customDayCount},buttonText:this.plugin.i18n.translate("views.basesCalendar.buttonText.customDays",{count:this.viewOptions.customDayCount.toString()})},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:(i=this.viewOptions.eventMaxStack)!=null?i:void 0,navLinks:!0,navLinkDayClick:s=>YX(s,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:(s,o,l)=>{this.fetchEvents(s,o,l)},eventDidMount:s=>this.handleEventDidMount(s),eventClick:s=>this.handleEventClick(s),eventDrop:s=>this.handleEventDrop(s),eventResize:s=>this.handleEventResize(s),select:s=>this.handleDateSelect(s),viewDidMount:s=>{let o=s.view.type;o&&o!==this.viewOptions.calendarView&&(this.viewOptions.calendarView=o,console.debug("[TaskNotes][CalendarView] View type changed to:",o,"(not saving to avoid recreation)"))}};this.calendar=new gT(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"))}determineInitialDate(e){var r;if(this.viewOptions.initialDate){let a=rw(this.viewOptions.initialDate);return(r=a==null?void 0:a.value)!=null?r:this.viewOptions.initialDate}if(this.viewOptions.initialDateProperty){let a=this.viewOptions.initialDateProperty,i=this.propertyMapper.basesToInternal(a),s=[];for(let o of e){let l=o[i],c=rw(l);if(!c)continue;let d=c.isAllDay?je(c.value):new Date(c.value);isNaN(d.getTime())||s.push({compare:d,value:c.value})}if(s.length>0)return this.viewOptions.initialDateStrategy==="earliest"?s.reduce((l,c)=>c.compare.getTime()c.compare.getTime()>l.compare.getTime()?c:l).value:s[0].value}}async fetchEvents(e,r,a){try{let i=await this.buildAllEvents(e);r(i)}catch(i){console.error("[TaskNotes][CalendarView] Error fetching events:",i),a(i)}}async buildAllEvents(e){let r=[],a={showScheduled:this.viewOptions.showScheduled,showDue:this.viewOptions.showDue,showRecurring:this.viewOptions.showRecurring,showTimeEntries:this.viewOptions.showTimeEntries,showTimeblocks:this.viewOptions.showTimeblocks,showICSEvents:!1,visibleStart:e.start,visibleEnd:e.end},i=await jX(this.currentTasks,this.plugin,a);if(r.push(...i),this.viewOptions.showPropertyBasedEvents&&this.viewOptions.startDateProperty){let s=await this.buildPropertyBasedEvents();r.push(...s)}if(this.plugin.icsSubscriptionService){let s=await this.buildICSEvents();r.push(...s)}if(this.plugin.googleCalendarService){let s=await this.buildGoogleCalendarEvents();r.push(...s)}if(this.plugin.microsoftCalendarService){let s=await this.buildMicrosoftCalendarEvents();r.push(...s)}return r}async buildPropertyBasedEvents(){var r;if(!((r=this.data)!=null&&r.data))return[];if(!this.viewOptions.startDateProperty)return[];let e=[];for(let a of this.data.data)try{let i=a.file;if(!i)continue;let s=this.dataAdapter.getPropertyValue(a,this.viewOptions.startDateProperty),o=rw(s);if(!o)continue;let l=typeof o.value=="string"?o.value:M(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=rw(m);h&&(c=typeof h.value=="string"?h.value:M(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);e.push({id:`property-${i.path}`,title:u||i.basename||i.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:i.path,file:i,basesEntry:a}})}catch(i){console.warn("[TaskNotes][CalendarView] Error processing property-based entry:",i)}return e}async buildICSEvents(){if(!this.plugin.icsSubscriptionService)return[];let e=[],r=this.plugin.icsSubscriptionService.getAllEvents();for(let a of r){if(this.icsCalendarToggles.get(a.subscriptionId)===!1)continue;let i=zg(a,this.plugin);i&&e.push(i)}return e}async buildGoogleCalendarEvents(){if(!this.plugin.googleCalendarService)return[];let e=[],r=this.plugin.googleCalendarService.getAllEvents();for(let a of r){let i=a.subscriptionId.replace("google-","");if(this.googleCalendarToggles.get(i)===!1)continue;let s=zg(a,this.plugin);s&&e.push(s)}return e}async buildMicrosoftCalendarEvents(){if(!this.plugin.microsoftCalendarService)return[];let e=[],r=this.plugin.microsoftCalendarService.getAllEvents();for(let a of r){let i=a.subscriptionId.replace("microsoft-","");if(this.microsoftCalendarToggles.get(i)===!1)continue;let s=zg(a,this.plugin);s&&e.push(s)}return e}async updateCalendarEvents(e){this.calendar&&this.calendar.refetchEvents()}async refreshCalendarWithFreshData(){if(this.calendar)try{let e=[];for(let r of this.currentTasks){let a=this.plugin.cacheManager.getCachedTaskInfoSync(r.path);a&&(a.basesData=r.basesData,e.push(a))}this.currentTasks=e,this.calendar.refetchEvents()}catch(e){console.error("[TaskNotes][CalendarView] Error refreshing calendar:",e)}}async handleEventClick(e){let{taskInfo:r,timeblock:a,eventType:i,filePath:s,icsEvent:o,subscriptionName:l}=e.event.extendedProps||{},c=e.jsEvent;if(i==="timeblock"&&a){let d=M(e.event.start,"yyyy-MM-dd");Jk(a,e.event.start,d,this.plugin);return}if(i==="timeEntry"&&r&&c.button===0){this.plugin.openTimeEntryEditor(r);return}if(i==="ics"&&o){new tl(this.plugin.app,this.plugin,o,l).open();return}if(i==="property-based"&&s){let d=this.plugin.app.vault.getAbstractFileByPath(s);if(d instanceof Hn.TFile){let p=c.ctrlKey||c.metaKey||c.button===1;this.plugin.app.workspace.getLeaf(p).openFile(d)}return}r!=null&&r.path&&c.button===0&&d$(r,this.plugin,c,e.event.id)}async handleEventDrop(e){var u,p;if(this.expectImmediateUpdate(),!((u=e==null?void 0:e.event)!=null&&u.extendedProps)){console.warn("[TaskNotes][CalendarView] Event dropped without extendedProps");return}let{taskInfo:r,timeblock:a,eventType:i,isRecurringInstance:s,isNextScheduledOccurrence:o,isPatternInstance:l,filePath:c,icsEvent:d}=e.event.extendedProps;if(i==="timeblock"){let m=M(e.oldEvent.start,"yyyy-MM-dd");await UX(e,a,m,this.plugin);return}if(i==="property-based"&&c){try{let m=this.plugin.app.vault.getAbstractFileByPath(c);if(!m||!(m instanceof Hn.TFile)){e.revert();return}let h=this.viewOptions.startDateProperty,f=this.viewOptions.endDateProperty;if(!h){e.revert();return}let g=h.includes(".")?h.split(".").pop():h,v=f&&f.includes(".")?f.split(".").pop():f;if(!g){e.revert();return}let T=e.oldEvent.start,w=e.event.start.getTime()-T.getTime();await this.plugin.app.fileManager.processFrontMatter(m,S=>{let x=S[g];if(x){let I=new Date(x);if(isNaN(I.getTime()))return;let A=new Date(I.getTime()+w);if(isNaN(A.getTime()))return;S[g]=M(A,e.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm")}if(v){let I=S[v];if(I){let A=new Date(I);if(isNaN(A.getTime()))return;let B=new Date(A.getTime()+w);if(isNaN(B.getTime()))return;S[v]=M(B,e.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm")}}})}catch(m){console.error("[TaskNotes][CalendarView] Error updating property-based event:",m),e.revert()}return}if(i==="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=e.event.start,v=e.event.allDay,T=e.event.end;T||(T=new Date(g),v?T.setDate(T.getDate()+1):T.setHours(T.getHours()+1));let k={};if(v)k.start={date:M(g,"yyyy-MM-dd")},k.end={date:M(T,"yyyy-MM-dd")};else{let w=Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC";k.start={dateTime:M(g,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:w},k.end={dateTime:M(T,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:w}}await m.updateEvent(h,f,k)}catch(h){console.error(`[TaskNotes][CalendarView] Error updating ${m.providerName} event:`,h),e.revert()}return}else{e.revert();return}}if(i==="timeEntry"){let m=e.event.extendedProps.timeEntryIndex;if(typeof m!="number"){e.revert();return}try{let h=e.event.start,f=e.event.end;if(!h||!f){e.revert();return}let g=e.oldEvent.start,v=h.getTime()-g.getTime(),T=[...r.timeEntries||[]],k=T[m];if(k){let w=new Date(k.startTime);if(!k.endTime){e.revert();return}let S=new Date(k.endTime);k.startTime=new Date(w.getTime()+v).toISOString(),k.endTime=new Date(S.getTime()+v).toISOString(),k.duration=Math.round((new Date(k.endTime).getTime()-new Date(k.startTime).getTime())/6e4),await this.plugin.taskService.updateTask(r,{timeEntries:T})}}catch(h){console.error("Error updating time entry:",h),e.revert()}return}if(i==="due"){e.revert();return}if(r&&(s||o||l)){await BX(e,r,this.plugin);return}if(r)try{if(i==="scheduled"){let m=e.event.start,f=e.event.allDay?M(m,"yyyy-MM-dd"):M(m,"yyyy-MM-dd'T'HH:mm");await this.plugin.taskService.updateProperty(r,"scheduled",f)}}catch(m){console.error("[TaskNotes][CalendarView] Error updating task date:",m),e.revert()}}async handleEventResize(e){var c,d;if(this.expectImmediateUpdate(),!((c=e==null?void 0:e.event)!=null&&c.extendedProps)){console.warn("[TaskNotes][CalendarView] Event resized without extendedProps");return}let{taskInfo:r,timeblock:a,eventType:i,filePath:s,timeEntryIndex:o,icsEvent:l}=e.event.extendedProps;if(i==="timeEntry"){if(typeof o!="number"){e.revert();return}try{let u=e.event.start,p=e.event.end;if(!u||!p){e.revert();return}let m=[...r.timeEntries||[]],h=m[o];h&&(h.startTime=u.toISOString(),h.endTime=p.toISOString(),h.duration=Math.round((p.getTime()-u.getTime())/6e4),await this.plugin.taskService.updateTask(r,{timeEntries:m}))}catch(u){console.error("Error resizing time entry:",u),e.revert()}return}if(i==="timeblock"){let u=M(e.event.start,"yyyy-MM-dd");await WX(e,a,u,this.plugin);return}if(i==="property-based"&&s){try{let u=this.plugin.app.vault.getAbstractFileByPath(s);if(!u||!(u instanceof Hn.TFile)){e.revert();return}let p=this.viewOptions.endDateProperty;if(!p){e.revert();return}let m=p.includes(".")?p.split(".").pop():p;if(!m){e.revert();return}let h=e.event.end;if(!h){e.revert();return}await this.plugin.app.fileManager.processFrontMatter(u,f=>{isNaN(h.getTime())||(f[m]=M(h,e.event.allDay?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm"))})}catch(u){console.error("[TaskNotes][CalendarView] Error resizing property-based event:",u),e.revert()}return}if(i==="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=e.event.start,f=e.event.end;if(!f){e.revert();return}let g=e.event.allDay,v={};if(g)v.start={date:M(h,"yyyy-MM-dd")},v.end={date:M(f,"yyyy-MM-dd")};else{let T=Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC";v.start={dateTime:M(h,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:T},v.end={dateTime:M(f,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:T}}await u.updateEvent(p,m,v)}catch(p){console.error(`[TaskNotes][CalendarView] Error resizing ${u.providerName} event:`,p),e.revert()}return}}if(i!=="scheduled"&&i!=="recurring"){e.revert();return}try{let u=e.event.start,p=e.event.end;if(u&&p){let m;e.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(r,"timeEstimate",m)}}catch(u){console.error("[TaskNotes][CalendarView] Error updating task duration:",u),e.revert()}}async handleDateSelect(e){let r=new Hn.Menu;r.addItem(a=>{a.setTitle("Create task").setIcon("check-square").onClick(async()=>{let i=this.viewOptions.slotDuration.split(":"),s=parseInt(i[0])*60+parseInt(i[1]||"0"),o=GX(e.start,e.end,e.allDay,s);new So(this.plugin.app,this.plugin,{prePopulatedValues:o}).open()})}),this.plugin.settings.calendarViewSettings.enableTimeblocking&&r.addItem(a=>{a.setTitle("Create timeblock").setIcon("clock").onClick(async()=>{this.expectImmediateUpdate(),await HX(e.start,e.end,e.allDay,this.plugin)})}),r.addItem(a=>{a.setTitle("Create time entry").setIcon("play").onClick(async()=>{this.expectImmediateUpdate(),await zX(e.start,e.end,e.allDay,this.plugin)})}),r.showAtMouseEvent(e.jsEvent),this.calendar&&this.calendar.unselect()}handleEventDidMount(e){var l,c,d,u,p;if(!((l=e==null?void 0:e.event)!=null&&l.extendedProps))return;let{taskInfo:r,timeblock:a,icsEvent:i,eventType:s,basesEntry:o}=e.event.extendedProps;if(i&&e.view.type!=="listWeek"&&((c=this.plugin.calendarProviderRegistry)==null?void 0:c.findProviderForEvent(i))){let h=e.el.querySelector(".fc-event-title");if(h){let f=document.createElement("span");f.style.marginRight="4px",f.style.display="inline-flex",f.style.alignItems="center";let g=document.createElement("span");g.style.width="12px",g.style.height="12px",g.style.display="inline-flex",g.style.flexShrink="0",(0,Hn.setIcon)(g,"calendar"),f.appendChild(g),h.insertBefore(f,h.firstChild)}}if(e.view.type==="listWeek"){e.el.innerHTML="";let m=null,h=this.getVisibleProperties();if(r&&s!=="ics"&&s!=="property-based"){let f={...r},g=this.basesEntryByPath.get(r.path);if(g){if(f.basesData=g,h){for(let T of h)if(T.startsWith("formula."))try{(d=g.getValue)==null||d.call(g,T)}catch(k){console.debug("[TaskNotes][CalendarView] Error getting formula:",T,k)}}if(!f.dateCreated)try{let T=(u=g.getValue)==null?void 0:u.call(g,"file.ctime");T!=null&&T.data&&(f.dateCreated=T.data)}catch(T){console.debug("[TaskNotes][CalendarView] Error getting file.ctime:",T)}if(!f.dateModified)try{let T=(p=g.getValue)==null?void 0:p.call(g,"file.mtime");T!=null&&T.data&&(f.dateModified=T.data)}catch(T){console.debug("[TaskNotes][CalendarView] Error getting file.mtime:",T)}}let v=uF(e);m=Ct(f,this.plugin,h,{targetDate:v})}else if(i&&s==="ics")m=QX(i,this.plugin);else if(s==="property-based"&&o)m=XX(o,this.plugin,this.config);else if(s==="timeblock"&&a){let f=e.event.start?M(e.event.start,"yyyy-MM-dd"):void 0;m=ree(a,this.plugin,{eventDate:e.event.start,originalDate:f})}if(m){e.el.appendChild(m),e.el.classList.remove("fc-event","fc-event-start","fc-event-end");return}else e.el.classList.add("fc-event-default-list")}if(e.el.setAttribute("data-event-type",s||"unknown"),s==="timeblock"&&a){qX(e.el,a),e.event.setProp&&e.event.setProp("editable",!0);let m=VX(a);(0,Hn.setTooltip)(e.el,m,{placement:"top"});return}if(r&&r.path){if(e.el.setAttribute("data-task-path",r.path),e.el.classList.add("fc-task-event"),r.tags&&r.tags.length>0&&r.tags.forEach(m=>{let h=m.replace(/[^a-zA-Z0-9-_]/g,"");h&&e.el.classList.add(`fc-tag-${h}`)}),e.event.setProp)switch(s){case"scheduled":case"recurring":case"timeEntry":e.event.setProp("editable",!0);break;case"due":e.event.setProp("editable",!1);break;default:e.event.setProp("editable",!0)}LX(e.el,e.event.extendedProps)}if(r){let m=OX(r,this.plugin);(0,Hn.setTooltip)(e.el,m)}else if(i){let m=i.description?`${i.title} + +${i.description}`:i.title;(0,Hn.setTooltip)(e.el,m)}r&&s!=="ics"&&$X(e.el,r,this.plugin,"tasknotes-bases-calendar"),r&&e.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=uF(e);new Jd({task:r,plugin:this.plugin,targetDate:h,onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(m)}),i&&s==="ics"&&e.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=e.event.extendedProps.subscriptionName;new Xu({icsEvent:i,plugin:this.plugin,subscriptionName:h,onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(m)}),s==="property-based"&&e.event.extendedProps.filePath&&e.el.addEventListener("mouseover",m=>{this.plugin.app.vault.getAbstractFileByPath(e.event.extendedProps.filePath)&&this.plugin.app.workspace.trigger("hover-link",{event:m,source:"tasknotes-bases-calendar",hoverParent:e.el,targetEl:e.el,linktext:e.event.extendedProps.filePath,sourcePath:e.event.extendedProps.filePath})}),s==="property-based"&&e.event.extendedProps.filePath&&e.el.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();let h=this.plugin.app.vault.getAbstractFileByPath(e.event.extendedProps.filePath);if(h instanceof Hn.TFile){let f=new Hn.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 e=document.createElement("div");e.id="bases-calendar",e.style.cssText="flex: 1; min-height: 700px; overflow: auto;",this.rootElement.appendChild(e),this.calendarEl=e}}async handleTaskUpdate(e){this.debouncedRefresh()}renderError(e){if(!this.calendarEl)return;let r=document.createElement("div");r.className="tn-bases-error",r.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",r.textContent=`Error loading calendar: ${e.message||"Unknown error"}`,this.calendarEl.appendChild(r)}onunload(){var e;if(this.calendar&&this.config){let r=(e=this.calendar.view)==null?void 0:e.type;if(r)try{this.config.get("calendarView")!==r&&(this.config.set("calendarView",r),console.debug("[TaskNotes][CalendarView] Saved view type on unload:",r))}catch(a){console.debug("[TaskNotes][CalendarView] Failed to save view type on unload:",a)}}this.calendar&&(this.calendar.destroy(),this.calendar=null),this.calendarEl=null,this.currentTasks=[]}getEphemeralState(){var r;let e=super.getEphemeralState();if(this.calendar){let a=this.calendar.getDate(),i=(r=this.calendar.view)==null?void 0:r.type;return{...e,calendarDate:a?a.toISOString():null,calendarView:i||null}}return e}setEphemeralState(e){var r;if(super.setEphemeralState(e),!!e&&this.calendar){if(e.calendarDate)try{this.calendar.gotoDate(new Date(e.calendarDate))}catch(a){console.debug("[CalendarView] Failed to restore calendar date:",a)}if(e.calendarView&&e.calendarView!==((r=this.calendar.view)==null?void 0:r.type))try{this.calendar.changeView(e.calendarView)}catch(a){console.debug("[CalendarView] Failed to restore calendar view:",a)}}}}});function see(n){return function(t,e){if(!e)throw console.error("[TaskNotes][MiniCalendarView] No containerEl provided"),new Error("MiniCalendarView requires a containerEl");return new yF(t,e,n)}}var rl,nl,yF,nw,oee=b(()=>{rl=require("obsidian");Ng();rr();Ke();Dr();nl=Ie(Xi()),yF=class extends Gi{constructor(e,r,a){super(e,r,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 i=ft(),s=mt(i);this.selectedDate=s,this.displayedMonth=s.getUTCMonth(),this.displayedYear=s.getUTCFullYear()}onload(){this.readViewOptions(),super.onload()}readViewOptions(){if(!(!this.config||typeof this.config.get!="function"))try{this.dateProperty=this.config.get("dateProperty")||"file.ctime",this.titleProperty=this.config.get("titleProperty")||"file.name",this.configLoaded=!0}catch(e){console.error("[TaskNotes][MiniCalendarView] Error reading view options:",e)}}async render(){var e;if(!(!this.calendarEl||!this.rootElement)&&(e=this.data)!=null&&e.data){this.config&&this.readViewOptions();try{let r=this.calendarEl.querySelector(".mini-calendar-view__grid")===document.activeElement;this.calendarEl.empty();let a=this.data.data;this.indexNotesByDate(a),this.renderCalendarControls(),this.renderCalendarGrid(),(this.isInitialRender||this.shouldRestoreFocus||r)&&(this.isInitialRender&&(this.isInitialRender=!1),this.shouldRestoreFocus=!1,setTimeout(()=>{var o;let s=(o=this.calendarEl)==null?void 0:o.querySelector(".mini-calendar-view__grid");s&&s.focus()},10))}catch(r){console.error("[TaskNotes][MiniCalendarView] Error rendering:",r),this.renderError(r)}}}indexNotesByDate(e){var r;if(this.notesByDate.clear(),!!this.dateProperty)for(let a of e)try{let i=a.file;if(!i)continue;let s=this.getDateValueFromProperty(a,this.dateProperty);if(!s)continue;let o=_e(s);if(!o)continue;let l=i.basename||i.name;if(this.titleProperty)try{let u=(r=a.getValue)==null?void 0:r.call(a,this.titleProperty);if(u!=null)if(typeof u=="object"&&u.toString){let p=u.toString();p&&p!=="null"&&p!==""&&(l=p)}else if(typeof u=="string")l=u;else{let p=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:i,title:l,path:i.path,dateValue:s,basesEntry:a};this.notesByDate.has(o)||this.notesByDate.set(o,[]);let d=this.notesByDate.get(o);d&&d.push(c)}catch(i){console.warn("[TaskNotes][MiniCalendarView] Error indexing note:",i)}}getDateValueFromProperty(e,r){try{let a=this.dataAdapter.getPropertyValue(e,r);if(!a)return null;if(typeof a=="string")return this.extractDateFromString(a);if(typeof a=="number")return this.toAnchoredDateString(new Date(a));if(a instanceof Date)return this.toAnchoredDateString(a);if(typeof a=="object"){let i=a.date;if(i instanceof Date)return this.toAnchoredDateString(i);let s=a.toISOString;if(typeof s=="function")return this.extractDateFromString(s.call(a))}return null}catch(a){return console.warn("[TaskNotes][MiniCalendarView] Error getting date value:",a),null}}extractDateFromString(e){let r=e==null?void 0:e.trim();if(!r)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(r))return this.validateCalendarDate(r);if(r.includes("T")||/\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}/.test(r)||/[+-]\d{2}:\d{2}$/.test(r)){let s=r.includes(" ")&&!r.includes("T")?r.replace(" ","T"):r,o=new Date(s);if(!isNaN(o.getTime()))return this.toAnchoredDateString(o)}let a=r.match(/^(\d{4})[/.](\d{2})[/.](\d{2})$/);if(a){let[,s,o,l]=a;return this.validateCalendarDate(`${s}-${o}-${l}`)}let i=r.match(/(\d{4}-\d{2}-\d{2})/);return i?this.validateCalendarDate(i[1]):null}toAnchoredDateString(e){if(!(e instanceof Date)||isNaN(e.getTime()))return null;let r=mt(e);return le(r)}validateCalendarDate(e){if(!e)return null;let a=e.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!a)return null;let[,i,s,o]=a,l=Number(i),c=Number(s)-1,d=Number(o);if(Number.isNaN(l)||Number.isNaN(c)||Number.isNaN(d))return null;let u=Qw(l,c,d);return u.getUTCFullYear()!==l||u.getUTCMonth()!==c||u.getUTCDate()!==d?null:le(u)}renderCalendarControls(){if(!this.calendarEl)return;let r=this.calendarEl.createDiv({cls:"mini-calendar-view__controls"}).createDiv({cls:"mini-calendar-view__header"}),a=r.createDiv({cls:"mini-calendar-view__navigation"});a.createEl("button",{text:"\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:M(ao(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()),r.createEl("button",{text:"Today",cls:"mini-calendar-view__today-button tn-btn tn-btn--ghost tn-btn--sm",attr:{"aria-label":"Go to today",title:"Go to today"}}).addEventListener("click",()=>this.navigateToToday())}renderCalendarGrid(){if(!this.calendarEl)return;let e=this.calendarEl.createDiv({cls:"mini-calendar-view__grid-container"}),r=this.displayedMonth,a=this.displayedYear,i=new Date(Date.UTC(a,r,1)),s=new Date(Date.UTC(a,r+1,0)),o=this.plugin.settings.calendarViewSettings.firstDay||0,l=(i.getUTCDay()-o+7)%7,c=e.createDiv({cls:"mini-calendar-view__grid",attr:{role:"grid","aria-label":`Calendar for ${M(ao(new Date(Date.UTC(a,r,1))),"MMMM yyyy")}`,tabindex:"0"}});this.setupKeyboardNavigation(c),c.addEventListener("click",()=>{c.focus()});let d=c.createDiv({cls:"mini-calendar-view__grid-header",attr:{role:"row"}});d.createDiv({text:"",cls:"mini-calendar-view__week-header",attr:{role:"columnheader"}});let u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];[...u.slice(o),...u.slice(0,o)].forEach(w=>{d.createDiv({text:w,cls:"mini-calendar-view__day-header",attr:{role:"columnheader","aria-label":w}})});let m=l,h=42,f=s.getUTCDate(),g=h-f-m,v=new Date(Date.UTC(a,r,0)).getUTCDate(),T=[],k=[];for(let w=0;w0&&T.push(k),T.forEach(w=>{this.renderWeekRow(c,w)})}renderWeekRow(e,r){let a=e.createDiv({cls:"mini-calendar-view__week",attr:{role:"row"}}),i=this.getWeekNumber(r[0]);a.createDiv({cls:"mini-calendar-week-number",text:`W${i}`}).addEventListener("click",o=>{var c;o.preventDefault(),o.stopPropagation(),this.selectWeek(r);let l=(c=this.calendarEl)==null?void 0:c.querySelector(".mini-calendar-view__grid");l&&l.focus()}),r.forEach((o,l)=>{let c=this.displayedMonth,d=this.displayedYear,u=o.getUTCMonth()!==c||o.getUTCFullYear()!==d,p=o.getUTCDate();this.renderDay(a,o,p,u)})}renderDay(e,r,a,i){let s=ft(),o=mt(s),l=ev(r,o),c=ev(r,this.selectedDate),d="mini-calendar-view__day";l&&(d+=" mini-calendar-view__day--today"),c&&(d+=" mini-calendar-view__day--selected"),i&&(d+=" mini-calendar-view__day--outside-month");let u=e.createDiv({cls:d,text:a.toString(),attr:{role:"gridcell","aria-label":M(ao(r),"EEEE, MMMM d, yyyy")+(l?" (Today)":""),"aria-selected":c?"true":"false","aria-current":l?"date":null}}),p=le(r),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,rl.setTooltip)(u,f,{placement:"top"})}u.addEventListener("click",h=>{var g;h.preventDefault(),h.stopPropagation(),this.handleDayClick(r,h);let f=(g=this.calendarEl)==null?void 0:g.querySelector(".mini-calendar-view__grid");f&&f.focus()})}async handleDayClick(e,r){if(this.selectedDate=e,r&&(r.ctrlKey||r.metaKey)){await this.openDailyNoteForDate(e);return}this.refresh();let a=le(e),i=this.notesByDate.get(a);i&&i.length>0&&new nw(this.plugin.app,this.plugin,i,o=>{o&&this.plugin.app.workspace.getLeaf(!1).openFile(o.file)}).open()}async openDailyNoteForDate(e){if(!(0,nl.appHasDailyNotesPluginLoaded)()){new rl.Notice("Daily Notes core plugin is not enabled. Please enable it in Settings > Core plugins.");return}let r=ao(e),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,0),i=window.moment(a),s=(0,nl.getAllDailyNotes)(),o=(0,nl.getDailyNote)(i,s);if(!o)try{o=await(0,nl.createDailyNote)(i)}catch(l){let c=l instanceof Error?l.message:String(l);console.error("Failed to create daily note:",l),new rl.Notice(`Failed to create daily note: ${c}`);return}o&&await this.plugin.app.workspace.getLeaf(!1).openFile(o)}navigateToPreviousMonth(){let e=new Date(this.selectedDate.getTime());e.setUTCMonth(this.selectedDate.getUTCMonth()-1),this.selectedDate=e,this.displayedMonth=e.getUTCMonth(),this.displayedYear=e.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}navigateToNextMonth(){let e=new Date(this.selectedDate.getTime());e.setUTCMonth(this.selectedDate.getUTCMonth()+1),this.selectedDate=e,this.displayedMonth=e.getUTCMonth(),this.displayedYear=e.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}navigateToToday(){let e=ft(),r=mt(e);this.selectedDate=r,this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}setupKeyboardNavigation(e){this.keyboardHandler&&e.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=async r=>{if(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"){r.preventDefault(),this.navigateByArrowKey(r.key);return}if(r.key==="PageUp"){r.preventDefault(),r.shiftKey?this.navigateToYear(-1):this.navigateToPreviousMonth();return}if(r.key==="PageDown"){r.preventDefault(),r.shiftKey?this.navigateToYear(1):this.navigateToNextMonth();return}if(r.key==="Home"){r.preventDefault(),r.ctrlKey||r.metaKey?this.navigateToStartOfMonth():this.navigateToStartOfWeek();return}if(r.key==="End"){r.preventDefault(),r.ctrlKey||r.metaKey?this.navigateToEndOfMonth():this.navigateToEndOfWeek();return}if(r.key==="t"||r.key==="T"){r.preventDefault(),this.navigateToToday();return}if(r.key==="Escape"){this.multiSelectMode&&(r.preventDefault(),this.multiSelectMode=!1,this.selectedDates.clear(),this.refresh());return}if(r.key==="Enter"||r.key===" "){r.preventDefault(),r.ctrlKey||r.metaKey?await this.openDailyNoteForDate(this.selectedDate):await this.handleDayClick(this.selectedDate);return}},e.addEventListener("keydown",this.keyboardHandler)}navigateByArrowKey(e){let r=new Date(this.selectedDate.getTime());switch(e){case"ArrowLeft":r.setUTCDate(r.getUTCDate()-1);break;case"ArrowRight":r.setUTCDate(r.getUTCDate()+1);break;case"ArrowUp":r.setUTCDate(r.getUTCDate()-7);break;case"ArrowDown":r.setUTCDate(r.getUTCDate()+7);break}this.selectedDate=r,(r.getUTCMonth()!==this.displayedMonth||r.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToStartOfWeek(){let e=this.plugin.settings.calendarViewSettings.firstDay||0,a=(this.selectedDate.getUTCDay()-e+7)%7,i=new Date(this.selectedDate.getTime());i.setUTCDate(i.getUTCDate()-a),this.selectedDate=i,(i.getUTCMonth()!==this.displayedMonth||i.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=i.getUTCMonth(),this.displayedYear=i.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToEndOfWeek(){let e=this.plugin.settings.calendarViewSettings.firstDay||0,r=this.selectedDate.getUTCDay(),i=((e+6)%7-r+7)%7,s=new Date(this.selectedDate.getTime());s.setUTCDate(s.getUTCDate()+i),this.selectedDate=s,(s.getUTCMonth()!==this.displayedMonth||s.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=s.getUTCMonth(),this.displayedYear=s.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToStartOfMonth(){let e=new Date(Date.UTC(this.selectedDate.getUTCFullYear(),this.selectedDate.getUTCMonth(),1));this.selectedDate=e,this.shouldRestoreFocus=!0,this.refresh()}navigateToEndOfMonth(){let e=new Date(Date.UTC(this.selectedDate.getUTCFullYear(),this.selectedDate.getUTCMonth()+1,0));this.selectedDate=e,this.shouldRestoreFocus=!0,this.refresh()}navigateToYear(e){let r=new Date(this.selectedDate.getTime());r.setUTCFullYear(r.getUTCFullYear()+e),this.selectedDate=r,this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}getWeekNumber(e){let r=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),a=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-a);let i=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-i.getTime())/864e5+1)/7)}selectWeek(e){this.multiSelectMode=!0,this.selectedDates.clear(),e.forEach(r=>{this.selectedDates.add(le(r))}),this.shouldRestoreFocus=!0,this.refresh(),this.showCombinedNotes()}showCombinedNotes(){let e=[];this.selectedDates.forEach(r=>{let a=this.notesByDate.get(r);a&&e.push(...a)}),e.length>0?new nw(this.plugin.app,this.plugin,e,a=>{a&&this.plugin.app.workspace.getLeaf(!1).openFile(a.file)}).open():new rl.Notice("No notes found for selected dates")}createNotePreviewText(e){let r=[];return r.push(`${e.length} note${e.length>1?"s":""}`),r.push(""),e.slice(0,5).forEach(a=>{var o,l;let i=`\u2022 ${a.title}`,s=(l=(o=a.basesEntry)==null?void 0:o.getValue)==null?void 0:l.call(o,"type");if(s){let c=null;if(typeof s=="object"&&s.toString){let d=s.toString();d&&d!=="null"&&d!==""&&(c=d)}else typeof s=="string"&&(c=s);c&&(i+=` (${c})`)}r.push(i)}),e.length>5&&r.push(`+ ${e.length-5} more...`),r.join(` +`)}getHeatMapIntensity(e){return e===0?"none":e===1?"low":e<=3?"medium":e<=5?"high":"very-high"}setupContainer(){var r;super.setupContainer();let e=document.createElement("div");e.className="mini-calendar-bases-view",(r=this.rootElement)==null||r.appendChild(e),this.calendarEl=e}async handleTaskUpdate(e){this.debouncedRefresh()}renderError(e){if(!this.calendarEl)return;let r=document.createElement("div");r.className="tn-bases-error",r.style.cssText="padding: 20px; color: #d73a49; background: #ffeaea; border-radius: 4px; margin: 10px 0;",r.textContent=`Error loading mini calendar: ${e.message||"Unknown error"}`,this.calendarEl.appendChild(r)}onunload(){this.calendarEl=null,this.notesByDate.clear(),this.monthCalculationCache.clear(),this.keyboardHandler=null}},nw=class extends rl.FuzzySuggestModal{constructor(t,e,r,a){super(t),this.plugin=e,this.notes=r,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((t,e)=>t.title.localeCompare(e.title))}getItemText(t){return t.title}renderSuggestion(t,e){let r=t.item,a=e.createDiv({cls:"note-selector-modal__suggestion"});a.createDiv({cls:"note-selector-modal__title",text:r.title}),r.path!==r.title&&a.createDiv({cls:"note-selector-modal__path",text:r.path})}onChooseItem(t,e){this.onChooseNote(t)}}});function CMe(n){var t,e;try{let r=n.internalPlugins;if(!r)return console.debug("[TaskNotes][Bases] Internal plugins manager not available"),null;let a=(t=r.getEnabledPluginById)==null?void 0:t.call(r,"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:((e=a.manifest)==null?void 0:e.version)||"unknown"}:(console.debug("[TaskNotes][Bases] Bases plugin not found or not enabled"),null)}catch(r){return console.warn("[TaskNotes][Bases] Error accessing Bases plugin API:",r),null}}function Ug(n,t,e){var r;if(typeof n.registerBasesView=="function")try{return n.registerBasesView(t,e)?(console.debug(`[TaskNotes][Bases] Successfully registered view via public API: ${t}`),!0):(console.debug("[TaskNotes][Bases] Public API returned false (Bases may be disabled)"),!1)}catch(a){return(r=a==null?void 0:a.message)!=null&&r.includes("already exists")?(console.debug(`[TaskNotes][Bases] View ${t} already registered via public API`),!0):(console.warn(`[TaskNotes][Bases] Public API registration failed for ${t}:`,a),!1)}return console.warn("[TaskNotes][Bases] Cannot register view: Bases public API not available (requires Obsidian 1.10.0+)"),!1}function Wg(n,t){let e=CMe(n.app);if(!e)return!0;try{return e.registrations[t]&&delete e.registrations[t],!0}catch(r){return console.error(`[TaskNotes][Bases] Error unregistering view ${t}:`,r),!1}}var lee=b(()=>{});var aw={};Be(aw,{registerBasesTaskList:()=>PMe,unregisterBasesViews:()=>MMe});async function PMe(n){if(!n.settings.enableBases||!(0,cee.requireApiVersion)("1.10.1"))return;let t=async()=>{try{let e=Ug(n,"tasknotesTaskList",{name:"TaskNotes Task List",icon:"tasknotes-simple",factory:oX(n),options:()=>[{type:"property",key:"subGroup",displayName:"Sub-group by",placeholder:"Select property for sub-grouping (optional)",filter:s=>s.startsWith("note.")||s.startsWith("task.")||s.startsWith("formula.")},{type:"toggle",key:"enableSearch",displayName:"Enable search box",default:!1}]}),r=Ug(n,"tasknotesKanban",{name:"TaskNotes Kanban",icon:"tasknotes-simple",factory:cX(n),options:()=>[{type:"property",key:"swimLane",displayName:"Swim Lane",placeholder:"Select property for swim lanes (optional)",filter:s=>s.startsWith("note.")||s.startsWith("task.")||s.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:"multitext",key:"columnOrder",displayName:"Column Order (Advanced)",placeholder:"Auto-managed when dragging columns",default:"{}"}]}),a=Ug(n,"tasknotesCalendar",{name:"TaskNotes Calendar",icon:"tasknotes-simple",factory:aee(n),options:()=>{var c;let s=n.settings.calendarViewSettings,o=d=>n.i18n.translate(`views.basesCalendar.settings.${d}`),l=[{type:"group",displayName:o("groups.events"),items:[{type:"toggle",key:"showScheduled",displayName:o("events.showScheduledTasks"),default:s.defaultShowScheduled},{type:"toggle",key:"showDue",displayName:o("events.showDueTasks"),default:s.defaultShowDue},{type:"toggle",key:"showRecurring",displayName:o("events.showRecurringTasks"),default:s.defaultShowRecurring},{type:"toggle",key:"showTimeEntries",displayName:o("events.showTimeEntries"),default:s.defaultShowTimeEntries},{type:"toggle",key:"showTimeblocks",displayName:o("events.showTimeblocks"),default:s.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:s.defaultView,options:{dayGridMonth:"Month",timeGridWeek:"Week",timeGridCustom:"Custom days",timeGridDay:"Day",listWeek:"List",multiMonthYear:"Year"}},{type:"slider",key:"customDayCount",displayName:o("layout.customDayCount"),default:s.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:s.slotMinTime,placeholder:o("layout.dayStartTimePlaceholder")},{type:"text",key:"slotMaxTime",displayName:o("layout.dayEndTime"),default:s.slotMaxTime,placeholder:o("layout.dayEndTimePlaceholder")},{type:"text",key:"slotDuration",displayName:o("layout.timeSlotDuration"),default:s.slotDuration,placeholder:o("layout.timeSlotDurationPlaceholder")},{type:"dropdown",key:"firstDay",displayName:o("layout.weekStartsOn"),default:String(s.firstDay),options:{0:n.i18n.translate("common.weekdays.sunday"),1:n.i18n.translate("common.weekdays.monday"),2:n.i18n.translate("common.weekdays.tuesday"),3:n.i18n.translate("common.weekdays.wednesday"),4:n.i18n.translate("common.weekdays.thursday"),5:n.i18n.translate("common.weekdays.friday"),6:n.i18n.translate("common.weekdays.saturday")}},{type:"toggle",key:"weekNumbers",displayName:o("layout.showWeekNumbers"),default:s.weekNumbers},{type:"toggle",key:"nowIndicator",displayName:o("layout.showNowIndicator"),default:s.nowIndicator},{type:"toggle",key:"showWeekends",displayName:o("layout.showWeekends"),default:s.showWeekends},{type:"toggle",key:"showAllDaySlot",displayName:o("layout.showAllDaySlot"),default:!0},{type:"toggle",key:"showTodayHighlight",displayName:o("layout.showTodayHighlight"),default:s.showTodayHighlight},{type:"toggle",key:"selectMirror",displayName:o("layout.showSelectionPreview"),default:s.selectMirror},{type:"toggle",key:"slotEventOverlap",displayName:o("layout.slotEventOverlap"),default:s.slotEventOverlap},{type:"toggle",key:"enableSearch",displayName:o("layout.enableSearch"),default:!1},{type:"dropdown",key:"timeFormat",displayName:o("layout.timeFormat"),default:s.timeFormat,options:{12:o("layout.timeFormat12"),24:o("layout.timeFormat24")}},{type:"text",key:"scrollTime",displayName:o("layout.initialScrollTime"),default:s.scrollTime,placeholder:o("layout.initialScrollTimePlaceholder")},{type:"slider",key:"eventMinHeight",displayName:o("layout.minimumEventHeight"),default:s.eventMinHeight,min:15,max:100,step:5},{type:"slider",key:"eventMaxStack",displayName:o("layout.eventMaxStack"),default:(c=s.eventMaxStack)!=null?c:0,min:0,max:10,step:1},{type:"slider",key:"dayMaxEvents",displayName:o("layout.dayMaxEvents"),default:typeof s.dayMaxEvents=="number"?s.dayMaxEvents:0,min:0,max:20,step:1},{type:"slider",key:"dayMaxEventRows",displayName:o("layout.dayMaxEventRows"),default:typeof s.dayMaxEventRows=="number"?s.dayMaxEventRows:0,min:0,max:10,step:1}]},{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(n.icsSubscriptionService){let d=n.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(n.googleCalendarService){let d=n.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(n.microsoftCalendarService){let d=n.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}}),i=Ug(n,"tasknotesMiniCalendar",{name:"TaskNotes Mini Calendar",icon:"tasknotes-simple",factory:see(n),options:()=>[{type:"property",key:"dateProperty",displayName:"Date Property",placeholder:"Select property to show on calendar",default:"file.ctime",filter:s=>s.startsWith("note.")||s.startsWith("file.")||s.startsWith("task.")},{type:"property",key:"titleProperty",displayName:"Title Property",placeholder:"Select property to use as title",default:"file.name",filter:s=>s.startsWith("note.")||s.startsWith("formula.")||s.startsWith("file.")}]});return!e&&!r&&!a&&!i?(console.debug("[TaskNotes][Bases] Bases plugin not available for registration"),!1):(n.app.workspace.iterateAllLeaves(s=>{var o,l;if(((l=(o=s.view)==null?void 0:o.getViewType)==null?void 0:l.call(o))==="bases"){let c=s.view;if(typeof c.refresh=="function")try{c.refresh()}catch(d){console.debug("[TaskNotes][Bases] Error refreshing view:",d)}}}),!0)}catch(e){return console.warn("[TaskNotes][Bases] Registration attempt failed:",e),!1}};if(!await t()){for(let e=0;e<5;e++)if(await new Promise(r=>setTimeout(r,200)),await t())return;console.warn("[TaskNotes][Bases] Failed to register views after multiple attempts")}}function MMe(n){try{Wg(n,"tasknotesTaskList"),Wg(n,"tasknotesKanban"),Wg(n,"tasknotesCalendar"),Wg(n,"tasknotesMiniCalendar")}catch(t){console.error("[TaskNotes][Bases] Error during view unregistration:",t)}}var cee,iw=b(()=>{cee=require("obsidian");lX();dX();iee();oee();lee()});var uee=D(()=>{var dee;(function(n){(function(t){var e=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:o(),r=a(n);typeof e.Reflect!="undefined"&&(r=a(e.Reflect,r)),t(r,e),typeof e.Reflect=="undefined"&&(e.Reflect=n);function a(l,c){return function(d,u){Object.defineProperty(l,d,{configurable:!0,writable:!0,value:u}),c&&c(d,u)}}function i(){try{return Function("return this;")()}catch(l){}}function s(){try{return(0,eval)("(function() { return this; })()")}catch(l){}}function o(){return i()||s()}})(function(t,e){var r=Object.prototype.hasOwnProperty,a=typeof Symbol=="function",i=a&&typeof Symbol.toPrimitive!="undefined"?Symbol.toPrimitive:"@@toPrimitive",s=a&&typeof Symbol.iterator!="undefined"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",l={__proto__:[]}instanceof Array,c=!o&&!l,d={create:o?function(){return uw(Object.create(null))}:l?function(){return uw({__proto__:null})}:function(){return uw({})},has:c?function(R,L){return r.call(R,L)}:function(R,L){return L in R},get:c?function(R,L){return r.call(R,L)?R[L]:void 0}:function(R,L){return R[L]}},u=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Uee(),m=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wee(),h=typeof WeakMap=="function"?WeakMap:qee(),f=a?Symbol.for("@reflect-metadata:registry"):void 0,g=jee(),v=Hee(g);function T(R,L,q,ee){if(Z(q)){if(!it(R))throw new TypeError;if(!Dt(L))throw new TypeError;return N(R,L)}else{if(!it(R))throw new TypeError;if(!Ye(L))throw new TypeError;if(!Ye(ee)&&!Z(ee)&&!Je(ee))throw new TypeError;return Je(ee)&&(ee=void 0),q=ge(q),P(R,L,q,ee)}}t("decorate",T);function k(R,L){function q(ee,Te){if(!Ye(ee))throw new TypeError;if(!Z(Te)&&!za(Te))throw new TypeError;H(R,L,ee,Te)}return q}t("metadata",k);function w(R,L,q,ee){if(!Ye(q))throw new TypeError;return Z(ee)||(ee=ge(ee)),H(R,L,q,ee)}t("defineMetadata",w);function S(R,L,q){if(!Ye(L))throw new TypeError;return Z(q)||(q=ge(q)),_(R,L,q)}t("hasMetadata",S);function x(R,L,q){if(!Ye(L))throw new TypeError;return Z(q)||(q=ge(q)),Y(R,L,q)}t("hasOwnMetadata",x);function I(R,L,q){if(!Ye(L))throw new TypeError;return Z(q)||(q=ge(q)),Q(R,L,q)}t("getMetadata",I);function A(R,L,q){if(!Ye(L))throw new TypeError;return Z(q)||(q=ge(q)),W(R,L,q)}t("getOwnMetadata",A);function B(R,L){if(!Ye(R))throw new TypeError;return Z(L)||(L=ge(L)),K(R,L)}t("getMetadataKeys",B);function z(R,L){if(!Ye(R))throw new TypeError;return Z(L)||(L=ge(L)),ae(R,L)}t("getOwnMetadataKeys",z);function U(R,L,q){if(!Ye(L))throw new TypeError;if(Z(q)||(q=ge(q)),!Ye(L))throw new TypeError;Z(q)||(q=ge(q));var ee=np(L,q,!1);return Z(ee)?!1:ee.OrdinaryDeleteMetadata(R,L,q)}t("deleteMetadata",U);function N(R,L){for(var q=R.length-1;q>=0;--q){var ee=R[q],Te=ee(L);if(!Z(Te)&&!Je(Te)){if(!Dt(Te))throw new TypeError;L=Te}}return L}function P(R,L,q,ee){for(var Te=R.length-1;Te>=0;--Te){var Qt=R[Te],cr=Qt(L,q,ee);if(!Z(cr)&&!Je(cr)){if(!Ye(cr))throw new TypeError;ee=cr}}return ee}function _(R,L,q){var ee=Y(R,L,q);if(ee)return!0;var Te=dw(L);return Je(Te)?!1:_(R,Te,q)}function Y(R,L,q){var ee=np(L,q,!1);return Z(ee)?!1:J(ee.OrdinaryHasOwnMetadata(R,L,q))}function Q(R,L,q){var ee=Y(R,L,q);if(ee)return W(R,L,q);var Te=dw(L);if(!Je(Te))return Q(R,Te,q)}function W(R,L,q){var ee=np(L,q,!1);if(!Z(ee))return ee.OrdinaryGetOwnMetadata(R,L,q)}function H(R,L,q,ee){var Te=np(q,ee,!0);Te.OrdinaryDefineOwnMetadata(R,L,q,ee)}function K(R,L){var q=ae(R,L),ee=dw(R);if(ee===null)return q;var Te=K(ee,L);if(Te.length<=0)return q;if(q.length<=0)return Te;for(var Qt=new m,cr=[],Ve=0,ne=q;Ve=0&&ne=this._keys.length?(this._index=-1,this._keys=L,this._values=L):this._index++,{value:oe,done:!1}}return{value:void 0,done:!0}},Ve.prototype.throw=function(ne){throw this._index>=0&&(this._index=-1,this._keys=L,this._values=L),ne},Ve.prototype.return=function(ne){return this._index>=0&&(this._index=-1,this._keys=L,this._values=L),{value:ne,done:!0}},Ve})(),ee=(function(){function Ve(){this._keys=[],this._values=[],this._cacheKey=R,this._cacheIndex=-2}return Object.defineProperty(Ve.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ve.prototype.has=function(ne){return this._find(ne,!1)>=0},Ve.prototype.get=function(ne){var oe=this._find(ne,!1);return oe>=0?this._values[oe]:void 0},Ve.prototype.set=function(ne,oe){var de=this._find(ne,!0);return this._values[de]=oe,this},Ve.prototype.delete=function(ne){var oe=this._find(ne,!1);if(oe>=0){for(var de=this._keys.length,fe=oe+1;feVg,Get:()=>er,OpenAPI:()=>AMe,OpenAPIController:()=>bF,Post:()=>tr,Put:()=>TF,Route:()=>qg,generateOpenAPISpec:()=>kF,getOpenAPIOperation:()=>RMe,getRouteInfo:()=>NMe,getRoutes:()=>sw,hasOpenAPIEndpoints:()=>FMe});function bF(n){return Reflect.hasMetadata(ep,n)||Reflect.defineMetadata(ep,[],n),n}function qg(n,t){return function(e,r,a){Reflect.defineMetadata(vF,{method:n.toLowerCase(),path:t,handler:r},e,r);let i=Reflect.getMetadata("routes",e.constructor)||[];i.push({method:n.toLowerCase(),path:t,handler:r}),Reflect.defineMetadata("routes",i,e.constructor)}}function er(n){return qg("GET",n)}function tr(n){return qg("POST",n)}function TF(n){return qg("PUT",n)}function Vg(n){return qg("DELETE",n)}function AMe(n){return function(t,e,r){Reflect.defineMetadata(pee,n,t,e);let a=Reflect.getMetadata(ep,t.constructor)||[],i=Reflect.getMetadata(vF,t,e),{path:s,method:o}=i||IMe(e);a.push({path:s,method:o,operation:n}),Reflect.defineMetadata(ep,a,t.constructor)}}function IMe(n){return console.warn(`extractPathAndMethod is deprecated. Use @Route decorators on method: ${n}`),{path:"/api/unknown",method:"get"}}function kF(n){let t=Reflect.getMetadata(ep,n.constructor)||[],e=sw(n.constructor)||[],r={openapi:"3.0.0",info:{title:"TaskNotes API",version:"1.0.0",description:"RESTful API for managing tasks, time tracking, and automation in TaskNotes",contact:{name:"TaskNotes",url:"https://github.com/your-repo/tasknotes"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],security:[{bearerAuth:[]}],paths:{},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",bearerFormat:"JWT",description:"Optional bearer token for API authentication"}},schemas:_Me()}};for(let a of t)r.paths[a.path]||(r.paths[a.path]={}),r.paths[a.path][a.method.toLowerCase()]=a.operation;for(let a of e)r.paths[a.path]||(r.paths[a.path]={}),r.paths[a.path][a.method.toLowerCase()]||(r.paths[a.path][a.method.toLowerCase()]={summary:`${a.method.toUpperCase()} ${a.path}`,description:`${a.method.toUpperCase()} endpoint for ${a.path}`,responses:{200:{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/APIResponse"}}}},400:{description:"Bad Request",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}},500:{description:"Internal Server Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}}}});return r}function _Me(){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 NMe(n,t){return Reflect.getMetadata(vF,n,t)}function sw(n){return Reflect.getMetadata("routes",n)||[]}function RMe(n,t){return Reflect.getMetadata(pee,n,t)}function FMe(n){return(Reflect.getMetadata(ep,n)||[]).length>0}var Wht,pee,ep,vF,Xs=b(()=>{Wht=Ie(uee()),pee=Symbol("openapi:operation"),ep=Symbol("openapi:endpoints"),vF=Symbol("route")});var hee,ow,fee=b(()=>{hee=require("url");Xs();ow=class{constructor(){this.routes=[]}compilePattern(t){let e=[],r=t.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(i,s)=>(e.push(s),"([^/]+)"));return{regex:new RegExp(`^${r}$`),paramNames:e}}register(t,e,r){let{regex:a,paramNames:i}=this.compilePattern(e);this.routes.push({method:t,pattern:e,handler:r,regex:a,paramNames:i})}get(t,e){this.register("GET",t,e)}post(t,e){this.register("POST",t,e)}put(t,e){this.register("PUT",t,e)}delete(t,e){this.register("DELETE",t,e)}options(t,e){this.register("OPTIONS",t,e)}async route(t,e){let a=(0,hee.parse)(t.url||"",!0).pathname||"",i=t.method;for(let s of this.routes)if(s.method===i){let o=a.match(s.regex);if(o){let l={};for(let c=0;c{ja=class{sendResponse(t,e,r){t.statusCode=e,t.setHeader("Content-Type","application/json"),t.setHeader("Access-Control-Allow-Origin","*"),t.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS"),t.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization"),t.end(JSON.stringify(r))}successResponse(t,e){return{success:!0,data:t,message:e}}errorResponse(t){return{success:!1,error:t}}async parseRequestBody(t){return new Promise((e,r)=>{let a="";t.on("data",i=>{a+=i.toString()}),t.on("end",()=>{try{e(a?JSON.parse(a):{})}catch(i){r(new Error("Invalid JSON"))}}),t.on("error",r)})}}});var gee,gn,yee=b(()=>{gee=require("url");tp();Xs();gn=class extends ja{constructor(e,r,a,i,s,o){super();this.plugin=e;this.taskService=r;this.filterService=a;this.cacheManager=i;this.statusManager=s;this.webhookNotifier=o}async getTasks(e,r){try{let i=(0,gee.parse)(e.url||"",!0).query;if(["status","priority","project","tag","overdue","completed","archived","due_before","due_after","sort"].some(h=>i[h])){this.sendResponse(r,400,this.errorResponse("For filtering tasks, please use POST /api/tasks/query which supports advanced filtering capabilities. GET /api/tasks is for basic listing only. See API documentation for details."));return}let l=await this.cacheManager.getAllTasks(),c=0,d=50;i.offset&&(c=parseInt(i.offset,10),(isNaN(c)||c<0)&&(c=0)),i.limit&&(d=parseInt(i.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(r,200,this.successResponse({tasks:u,pagination:{total:l.length,offset:c,limit:d,hasMore:c+dthis.statusManager.isCompletedStatus(s.status)).length,active:a.filter(s=>!this.statusManager.isCompletedStatus(s.status)&&!s.archived).length,overdue:a.filter(s=>this.statusManager.isCompletedStatus(s.status)||s.archived?!1:s.due&&new Date(s.due)s.archived).length,withTimeTracking:a.filter(s=>s.timeEntries&&s.timeEntries.length>0).length};this.sendResponse(r,200,this.successResponse(i))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}};He([er("/api/tasks")],gn.prototype,"getTasks",1),He([tr("/api/tasks")],gn.prototype,"createTask",1),He([er("/api/tasks/:id")],gn.prototype,"getTask",1),He([TF("/api/tasks/:id")],gn.prototype,"updateTask",1),He([Vg("/api/tasks/:id")],gn.prototype,"deleteTask",1),He([tr("/api/tasks/:id/toggle-status")],gn.prototype,"toggleStatus",1),He([tr("/api/tasks/:id/archive")],gn.prototype,"toggleArchive",1),He([tr("/api/tasks/:id/complete-instance")],gn.prototype,"completeRecurringInstance",1),He([tr("/api/tasks/query")],gn.prototype,"queryTasks",1),He([er("/api/filter-options")],gn.prototype,"getFilterOptions",1),He([er("/api/stats")],gn.prototype,"getStats",1)});var vee,Qi,bee=b(()=>{vee=require("url");tp();Xs();Qi=class extends ja{constructor(e,r,a,i,s){super();this.plugin=e;this.taskService=r;this.cacheManager=a;this.statusManager=i;this.webhookNotifier=s}async startTimeTracking(e,r,a){var i;try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let o=await this.cacheManager.getTaskInfo(s);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let l=await this.taskService.startTimeTracking(o);await this.webhookNotifier.triggerWebhook("time.started",{task:l,session:(i=l.timeEntries)==null?void 0:i[l.timeEntries.length-1]}),this.sendResponse(r,200,this.successResponse(l))}catch(s){this.sendResponse(r,400,this.errorResponse(s.message))}}async stopTimeTracking(e,r,a){var i;try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let o=await this.cacheManager.getTaskInfo(s);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let l=await this.taskService.stopTimeTracking(o);await this.webhookNotifier.triggerWebhook("time.stopped",{task:l,session:(i=l.timeEntries)==null?void 0:i[l.timeEntries.length-1]}),this.sendResponse(r,200,this.successResponse(l))}catch(s){this.sendResponse(r,400,this.errorResponse(s.message))}}async startTimeTrackingWithDescription(e,r,a){var i;try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let o=await this.cacheManager.getTaskInfo(s);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let c=(await this.parseRequestBody(e)).description||"",d=await this.taskService.startTimeTracking(o);if(c&&d.timeEntries&&d.timeEntries.length>0){let u=d.timeEntries[d.timeEntries.length-1];u&&!u.endTime&&(u.description=c,await this.taskService.updateTask(d,{timeEntries:d.timeEntries}))}await this.webhookNotifier.triggerWebhook("time.started",{task:d,session:(i=d.timeEntries)==null?void 0:i[d.timeEntries.length-1]}),this.sendResponse(r,200,this.successResponse({task:d,message:c?`Time tracking started with description: ${c}`:"Time tracking started"}))}catch(s){this.sendResponse(r,400,this.errorResponse(s.message))}}async getActiveTimeSessions(e,r){try{let a=await this.cacheManager.getAllTasks(),i=[];for(let s of a){let o=this.plugin.getActiveTimeSession(s);if(o){let l=new Date(o.startTime),c=Math.floor((Date.now()-l.getTime())/(1e3*60));i.push({task:{id:s.path,title:s.title,status:s.status,priority:s.priority,tags:s.tags||[],projects:s.projects||[]},session:{startTime:o.startTime,description:o.description,elapsedMinutes:c},elapsedMinutes:c})}}this.sendResponse(r,200,this.successResponse({activeSessions:i,totalActiveSessions:i.length,totalElapsedMinutes:i.reduce((s,o)=>s+o.elapsedMinutes,0)}))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}async getTimeSummary(e,r){try{let i=(0,vee.parse)(e.url||"",!0).query,s=await this.cacheManager.getAllTasks(),o=i.period||"today",l=i.from?new Date(i.from):null,c=i.to?new Date(i.to):null,d,u=new Date;switch(o){case"today":d=new Date,d.setHours(0,0,0,0);break;case"week":d=new Date,d.setDate(d.getDate()-d.getDay()),d.setHours(0,0,0,0);break;case"month":d=new Date,d.setDate(1),d.setHours(0,0,0,0);break;case"all":d=new Date(0);break;default:l?(d=l,c&&(u=c)):(d=new Date,d.setHours(0,0,0,0))}let p=0,m=0,h=0,f=[],g=new Map,v=new Map;for(let S of s){if(!S.timeEntries||S.timeEntries.length===0)continue;let x=0,I=!1;for(let A of S.timeEntries){let B=new Date(A.startTime),z=A.endTime?new Date(A.endTime):new Date;if(B>=d&&B<=u)if(A.duration)x+=A.duration;else if(A.endTime){let U=z.getTime()-B.getTime();x+=Math.floor(U/(1e3*60))}else{let U=Math.floor((Date.now()-B.getTime())/6e4);x+=U,I=!0}}if(x>0){if(p+=x,f.push({task:S.path,title:S.title,minutes:x}),I?h++:this.statusManager.isCompletedStatus(S.status)&&m++,S.projects)for(let A of S.projects){let B=g.get(A)||0;g.set(A,B+x)}if(S.tags)for(let A of S.tags){let B=v.get(A)||0;v.set(A,B+x)}}}f.sort((S,x)=>x.minutes-S.minutes);let T=f.slice(0,10),k=Array.from(g.entries()).sort((S,x)=>x[1]-S[1]).slice(0,10).map(([S,x])=>({project:S,minutes:x})),w=Array.from(v.entries()).sort((S,x)=>x[1]-S[1]).slice(0,10).map(([S,x])=>({tag:S,minutes:x}));this.sendResponse(r,200,this.successResponse({period:o,dateRange:{from:d.toISOString(),to:u.toISOString()},summary:{totalMinutes:p,totalHours:Math.round(p/60*100)/100,tasksWithTime:f.length,activeTasks:h,completedTasks:m},topTasks:T,topProjects:k,topTags:w}))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}async getTaskTimeData(e,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=s.timeEntries||[],l=this.plugin.getActiveTimeSession(s),c=this.calculateTotalTimeSpent(o),d=o.filter(h=>h.endTime).length,u=l?1:0,p=o.filter(h=>h.endTime&&h.duration),m=p.length>0?Math.round(p.reduce((h,f)=>h+(f.duration||0),0)/p.length*100)/100:0;this.sendResponse(r,200,this.successResponse({task:{id:s.path,title:s.title,status:s.status,priority:s.priority},summary:{totalMinutes:c,totalHours:Math.round(c/60*100)/100,totalSessions:o.length,completedSessions:d,activeSessions:u,averageSessionMinutes:m},activeSession:l?{startTime:l.startTime,description:l.description,elapsedMinutes:Math.floor((Date.now()-new Date(l.startTime).getTime())/(1e3*60))}:null,timeEntries:o.map(h=>({startTime:h.startTime,endTime:h.endTime||null,description:h.description||null,duration:h.duration||(h.endTime?Math.floor((new Date(h.endTime).getTime()-new Date(h.startTime).getTime())/(1e3*60)):Math.floor((Date.now()-new Date(h.startTime).getTime())/(1e3*60))),isActive:!h.endTime}))}))}catch(i){this.sendResponse(r,500,this.errorResponse(i.message))}}calculateTotalTimeSpent(e){return!e||e.length===0?0:e.reduce((r,a)=>{if(a.duration)return r+a.duration;if(a.endTime){let i=new Date(a.endTime).getTime()-new Date(a.startTime).getTime();return r+Math.floor(i/(1e3*60))}else{let i=Date.now()-new Date(a.startTime).getTime();return r+Math.floor(i/(1e3*60))}},0)}};He([tr("/api/tasks/:id/time/start")],Qi.prototype,"startTimeTracking",1),He([tr("/api/tasks/:id/time/stop")],Qi.prototype,"stopTimeTracking",1),He([tr("/api/tasks/:id/time/start-with-description")],Qi.prototype,"startTimeTrackingWithDescription",1),He([er("/api/time/active")],Qi.prototype,"getActiveTimeSessions",1),He([er("/api/time/summary")],Qi.prototype,"getTimeSummary",1),He([er("/api/tasks/:id/time")],Qi.prototype,"getTaskTimeData",1)});var wF,di,Tee=b(()=>{wF=require("url");tp();Xs();di=class extends ja{constructor(e,r){super();this.plugin=e;this.cacheManager=r}async startPomodoro(e,r){try{let a=await this.parseRequestBody(e),i;if(a.taskId){let c=await this.cacheManager.getTaskInfo(a.taskId);if(!c){this.sendResponse(r,404,this.errorResponse("Task not found"));return}i=c}if(this.plugin.pomodoroService.getState().isRunning){this.sendResponse(r,400,this.errorResponse("Pomodoro session is already running. Stop or pause the current session first."));return}let o=a.duration?parseInt(a.duration):void 0;await this.plugin.pomodoroService.startPomodoro(i,o);let l=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({session:l.currentSession,task:i||null,message:"Pomodoro session started"}))}catch(a){this.sendResponse(r,400,this.errorResponse(a.message))}}async stopPomodoro(e,r){try{if(!this.plugin.pomodoroService.getState().currentSession){this.sendResponse(r,400,this.errorResponse("No active pomodoro session to stop"));return}await this.plugin.pomodoroService.stopPomodoro(),this.sendResponse(r,200,this.successResponse({message:"Pomodoro session stopped and reset"}))}catch(a){this.sendResponse(r,400,this.errorResponse(a.message))}}async pausePomodoro(e,r){try{let a=this.plugin.pomodoroService.getState();if(!a.isRunning||!a.currentSession){this.sendResponse(r,400,this.errorResponse("No running pomodoro session to pause"));return}await this.plugin.pomodoroService.pausePomodoro();let i=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({timeRemaining:i.timeRemaining,message:"Pomodoro session paused"}))}catch(a){this.sendResponse(r,400,this.errorResponse(a.message))}}async resumePomodoro(e,r){try{let a=this.plugin.pomodoroService.getState();if(a.isRunning){this.sendResponse(r,400,this.errorResponse("Pomodoro session is already running"));return}if(!a.currentSession){this.sendResponse(r,400,this.errorResponse("No paused session to resume"));return}await this.plugin.pomodoroService.resumePomodoro();let i=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({timeRemaining:i.timeRemaining,message:"Pomodoro session resumed"}))}catch(a){this.sendResponse(r,400,this.errorResponse(a.message))}}async getPomodoroStatus(e,r){try{let i={...this.plugin.pomodoroService.getState(),totalPomodoros:await this.plugin.pomodoroService.getPomodorosCompleted(),currentStreak:await this.plugin.pomodoroService.getCurrentStreak(),totalMinutesToday:await this.plugin.pomodoroService.getTotalMinutesToday()};this.sendResponse(r,200,this.successResponse(i))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}async getPomodoroSessions(e,r){try{let i=(0,wF.parse)(e.url||"",!0).query,s=await this.plugin.pomodoroService.getSessionHistory();if(i.date&&typeof i.date=="string"){let l=i.date;s=s.filter(c=>new Date(c.startTime).toISOString().split("T")[0]===l)}let o=s.length;if(i.limit&&typeof i.limit=="string"){let l=parseInt(i.limit);l>0&&(s=s.slice(-l))}this.sendResponse(r,200,this.successResponse({sessions:s,total:o}))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}async getPomodoroStats(e,r){try{let i=(0,wF.parse)(e.url||"",!0).query,s;if(i.date&&typeof i.date=="string"){let o=new Date(i.date);s=await this.plugin.pomodoroService.getStatsForDate(o)}else s=await this.plugin.pomodoroService.getTodayStats();this.sendResponse(r,200,this.successResponse(s))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}};He([tr("/api/pomodoro/start")],di.prototype,"startPomodoro",1),He([tr("/api/pomodoro/stop")],di.prototype,"stopPomodoro",1),He([tr("/api/pomodoro/pause")],di.prototype,"pausePomodoro",1),He([tr("/api/pomodoro/resume")],di.prototype,"resumePomodoro",1),He([er("/api/pomodoro/status")],di.prototype,"getPomodoroStatus",1),He([er("/api/pomodoro/sessions")],di.prototype,"getPomodoroSessions",1),He([er("/api/pomodoro/stats")],di.prototype,"getPomodoroStats",1)});var eo,kee=b(()=>{tp();Xs();eo=class extends ja{constructor(e,r,a,i,s){super();this.plugin=e;this.taskService=r;this.nlParser=a;this.webhookNotifier=i;this.httpAPIService=s}async healthCheck(e,r){let a=this.plugin.app.vault.getName(),i=this.plugin.app.vault.adapter,s=null;try{"basePath"in i&&typeof i.basePath=="string"?s=i.basePath:"path"in i&&typeof i.path=="string"&&(s=i.path)}catch(o){}this.sendResponse(r,200,this.successResponse({status:"ok",timestamp:new Date().toISOString(),vault:{name:a,path:s}}))}async handleNLPParse(e,r){try{let a=await this.parseRequestBody(e);if(!a.text||typeof a.text!="string"){this.sendResponse(r,400,this.errorResponse("Text field is required and must be a string"));return}let i=this.nlParser.parseInput(a.text),s={title:i.title,details:i.details,priority:i.priority,status:i.status||this.getDefaultStatus(),tags:i.tags,contexts:i.contexts,projects:i.projects,recurrence:i.recurrence,timeEstimate:i.estimate};i.dueDate&&(s.due=i.dueDate,i.dueTime&&(s.due=`${i.dueDate} ${i.dueTime}`)),i.scheduledDate&&(s.scheduled=i.scheduledDate,i.scheduledTime&&(s.scheduled=`${i.scheduledDate} ${i.scheduledTime}`)),this.sendResponse(r,200,this.successResponse({parsed:i,taskData:s}))}catch(a){this.sendResponse(r,500,this.errorResponse(a.message))}}async handleNLPCreate(e,r){try{let a=await this.parseRequestBody(e);if(!a.text||typeof a.text!="string"){this.sendResponse(r,400,this.errorResponse("Text field is required and must be a string"));return}let i=this.nlParser.parseInput(a.text),s={title:i.title,details:i.details,priority:i.priority,status:i.status||this.getDefaultStatus(),tags:i.tags,contexts:i.contexts,projects:i.projects,recurrence:i.recurrence,timeEstimate:i.estimate,creationContext:"api"};i.dueDate&&(s.due=i.dueDate,i.dueTime&&(s.due=`${i.dueDate} ${i.dueTime}`)),i.scheduledDate&&(s.scheduled=i.scheduledDate,i.scheduledTime&&(s.scheduled=`${i.scheduledDate} ${i.scheduledTime}`));let o=await this.taskService.createTask(s);await this.webhookNotifier.triggerWebhook("task.created",{task:o.taskInfo,source:"nlp",originalText:a.text}),this.sendResponse(r,201,this.successResponse({task:o.taskInfo,parsed:i}))}catch(a){this.sendResponse(r,400,this.errorResponse(a.message))}}async handleOpenAPISpec(e,r){try{let a=this.httpAPIService&&this.httpAPIService.generateOpenAPISpec?this.httpAPIService.generateOpenAPISpec():kF(this);r.statusCode=200,r.setHeader("Content-Type","application/json"),r.setHeader("Access-Control-Allow-Origin","*"),r.end(JSON.stringify(a,null,2))}catch(a){console.error("OpenAPI spec generation error:",a),this.sendResponse(r,500,this.errorResponse("Failed to generate API specification"))}}async handleSwaggerUI(e,r){try{let a=this.generateSwaggerUIHTML();r.statusCode=200,r.setHeader("Content-Type","text/html"),r.setHeader("Access-Control-Allow-Origin","*"),r.end(a)}catch(a){console.error("Swagger UI generation error:",a),this.sendResponse(r,500,this.errorResponse("Failed to generate API documentation"))}}getDefaultStatus(){let e=this.plugin.settings.customStatuses;return e&&e.length>0?[...e].sort((a,i)=>a.order-i.order)[0].value:"open"}generateSwaggerUIHTML(){return` + + + + + TaskNotes API Documentation + + + + +
+