From 14b96bf40978b554c3a172c17c75bd0a58ff4acc Mon Sep 17 00:00:00 2001 From: quanruzhuoxiu Date: Tue, 31 Dec 2024 15:53:24 +0800 Subject: [PATCH] feat: update plugins --- .obsidian/core-plugins.json | 3 +- .obsidian/plugins/better-search-views/main.js | 64 +- .../plugins/better-search-views/manifest.json | 20 +- .../plugins/better-search-views/styles.css | 15 +- .../plugins/obsidian-tasks-plugin/main.js | 182 +- .../obsidian-tasks-plugin/manifest.json | 2 +- .../plugins/obsidian-tasks-plugin/styles.css | 2 +- .obsidian/plugins/periodic-para/main.js | 15622 +++++++--------- .obsidian/plugins/periodic-para/manifest.json | 2 +- .obsidian/plugins/periodic-para/styles.css | 3 +- .obsidian/workspace.json | 1 - README.md | 4 +- 12 files changed, 7338 insertions(+), 8582 deletions(-) diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index cad6e8d..24cc7d3 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -27,5 +27,6 @@ "sync": false, "canvas": true, "bookmarks": true, - "properties": true + "properties": true, + "webviewer": false } \ No newline at end of file diff --git a/.obsidian/plugins/better-search-views/main.js b/.obsidian/plugins/better-search-views/main.js index 500a471..fffedf2 100644 --- a/.obsidian/plugins/better-search-views/main.js +++ b/.obsidian/plugins/better-search-views/main.js @@ -2768,7 +2768,10 @@ var require_plugin_context = __commonJS({ var _obsidian = require("obsidian"); var PluginContext = (0, _solidJs.createContext)(); function PluginContextProvider(props) { - const handleClick = async (path, line) => { + const handleClick = async (event, path, line) => { + if (event.target instanceof HTMLAnchorElement) { + return; + } const file = props.plugin.app.metadataCache.getFirstLinkpathDest(path, path); if (!file) { new _obsidian.Notice(`File ${path} does not exist`); @@ -2811,7 +2814,8 @@ var require_plugin_context = __commonJS({ handleClick, handleMouseover, handleHeightChange, - plugin: props.plugin + plugin: props.plugin, + app: props.plugin.app }; }, get children() { @@ -2838,29 +2842,13 @@ var require_list_icon = __commonJS({ }); exports.ListIcon = ListIcon; var _web = require_web(); - var _tmpl$ = /* @__PURE__ */ (0, _web.template)(``); + var _tmpl$ = /* @__PURE__ */ (0, _web.template)(``); function ListIcon() { return _tmpl$(); } } }); -// src/ui/solid/icons/arrow-right-icon.tsx -var require_arrow_right_icon = __commonJS({ - "src/ui/solid/icons/arrow-right-icon.tsx"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ArrowRightIcon = ArrowRightIcon; - var _web = require_web(); - var _tmpl$ = /* @__PURE__ */ (0, _web.template)(``); - function ArrowRightIcon() { - return _tmpl$(); - } - } -}); - // src/ui/solid/icons/heading-icon.tsx var require_heading_icon = __commonJS({ "src/ui/solid/icons/heading-icon.tsx"(exports) { @@ -2903,7 +2891,6 @@ var require_title = __commonJS({ var _solidJs = require_solid(); var _pluginContext = require_plugin_context(); var _listIcon = require_list_icon(); - var _arrowRightIcon = require_arrow_right_icon(); var _headingIcon = require_heading_icon(); var _patterns = (init_patterns(), __toCommonJS(patterns_exports)); var _tmpl$ = /* @__PURE__ */ (0, _web.template)(`
`); @@ -2923,32 +2910,25 @@ var require_title = __commonJS({ return props.breadcrumbs; }, children: (breadcrumb, i) => { - var _a; - const handleTitleClick = async () => await handleClick(props.contextTree.filePath, breadcrumb.position.start.line); + const handleTitleClick = async (event) => await handleClick(event, props.contextTree.filePath, breadcrumb.position.start.line); const handleTitleMouseover = (event) => handleMouseover(event, props.contextTree.filePath, breadcrumb.position.start.line); - const previousIsHeading = ((_a = props.breadcrumbs[i() - 1]) == null ? void 0 : _a.type) === "heading"; - const isFirstListItemInBreadcrumbs = breadcrumb.type === "list" && (i() === 0 || previousIsHeading); - const isFirstHeadingInBreadcrumbs = i() === 0 && breadcrumb.type === "heading"; return (() => { const _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling; _el$3.$$mouseover = handleTitleMouseover; _el$3.$$click = handleTitleClick; (0, _web.insert)(_el$4, (0, _web.createComponent)(_solidJs.Switch, { get fallback() { - return (0, _web.createComponent)(_arrowRightIcon.ArrowRightIcon, {}); + return (0, _web.createComponent)(_listIcon.ListIcon, {}); }, get children() { - return [(0, _web.createComponent)(_solidJs.Match, { - when: isFirstListItemInBreadcrumbs, - get children() { - return (0, _web.createComponent)(_listIcon.ListIcon, {}); - } - }), (0, _web.createComponent)(_solidJs.Match, { - when: isFirstHeadingInBreadcrumbs, + return (0, _web.createComponent)(_solidJs.Match, { + get when() { + return breadcrumb.type === "heading"; + }, get children() { return (0, _web.createComponent)(_headingIcon.HeadingIcon, {}); } - })]; + }); } })); (0, _web.insert)(_el$5, () => removeListToken(breadcrumb.text)); @@ -2980,7 +2960,8 @@ var require_match_section = __commonJS({ function MatchSection(props) { const { handleClick, - handleMouseover + handleMouseover, + app } = (0, _pluginContext.usePluginContext)(); const matchLifecycleManager = new _obsidian.Component(); (0, _solidJs.onCleanup)(() => { @@ -3003,11 +2984,11 @@ var require_match_section = __commonJS({ _el$2.$$mouseover = (event) => { handleMouseover(event, section.filePath, line); }; - _el$2.$$click = async () => { - await handleClick(section.filePath, line); + _el$2.$$click = async (event) => { + await handleClick(event, section.filePath, line); }; (0, _web.use)(async (el) => { - await _obsidian.MarkdownRenderer.renderMarkdown(section.text, el, section.filePath, matchLifecycleManager); + await _obsidian.MarkdownRenderer.render(app, section.text, el, section.filePath, matchLifecycleManager); matchLifecycleManager.load(); }, _el$2); return _el$2; @@ -4588,10 +4569,11 @@ var Patcher = class { addChild(old) { return function(child, ...args) { const thisIsSearchView = this.hasOwnProperty("searchQuery"); - if (thisIsSearchView && !patcher.triedPatchingSearchResultItem) { + const hasBacklinks = child == null ? void 0 : child.backlinkDom; + if ((thisIsSearchView || hasBacklinks) && !patcher.triedPatchingSearchResultItem) { patcher.triedPatchingSearchResultItem = true; try { - patcher.patchSearchResultDom(child.dom); + patcher.patchSearchResultDom(child.dom || child.backlinkDom); } catch (error) { patcher.reportError( error, @@ -4747,3 +4729,5 @@ mark.js/dist/mark.js: * Released under the MIT license https://git.io/vwTVl *****************************************************) */ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/better-search-views/manifest.json b/.obsidian/plugins/better-search-views/manifest.json index 8b0ab2f..ee9493e 100644 --- a/.obsidian/plugins/better-search-views/manifest.json +++ b/.obsidian/plugins/better-search-views/manifest.json @@ -1,11 +1,11 @@ { - "id": "better-search-views", - "name": "Better Search Views", - "version": "0.2.2", - "minAppVersion": "0.16.0", - "description": "Outliner-like breadcrumb trees for search, backlinks and embedded queries ", - "author": "ivan-lednev", - "authorUrl": "https://github.com/ivan-lednev", - "fundingUrl": "https://www.buymeacoffee.com/machineelf", - "isDesktopOnly": false -} + "id": "better-search-views", + "name": "Better Search Views", + "version": "0.3.0", + "minAppVersion": "0.16.0", + "description": "Outliner-like breadcrumb trees for search, backlinks and embedded queries ", + "author": "ivan-lednev", + "authorUrl": "https://github.com/ivan-lednev", + "fundingUrl": "https://www.buymeacoffee.com/machineelf", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/.obsidian/plugins/better-search-views/styles.css b/.obsidian/plugins/better-search-views/styles.css index 0c80e28..a44a761 100644 --- a/.obsidian/plugins/better-search-views/styles.css +++ b/.obsidian/plugins/better-search-views/styles.css @@ -6,6 +6,11 @@ white-space: normal; } +.better-search-views-file-match.markdown-rendered ul > li, +.better-search-views-file-match.markdown-rendered ol > li { + margin-inline-start: calc(var(--list-indent) * 0.8); +} + .better-search-views-file-match > blockquote { margin-inline-start: 0; margin-inline-end: 0; @@ -13,7 +18,7 @@ .better-search-views-file-match ul { position: relative; - padding-inline-start: var(--list-indent); + padding-inline-start: 0; } .better-search-views-file-match a { @@ -139,8 +144,8 @@ body:not(.is-grabbing) .better-search-views-tree .better-search-views-breadcrumb-container { flex-grow: 1; - padding-right: 4px; - padding-left: 4px; + padding-right: 2px; + padding-left: 2px; } .better-search-views-tree @@ -151,13 +156,15 @@ body:not(.is-grabbing) } .better-search-views-breadcrumb-token { + color: var(--text-faint); display: flex; align-items: center; + height: calc(1em * var(--line-height-tight)); } .better-search-views-tree .collapse-icon { display: flex; - align-items: flex-start; + align-items: center; align-self: flex-start; padding-top: 4px; diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 8c01f54..723dddd 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -147,14 +147,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var _E=Object.create;var pa=Object.defineProperty,vE=Object.defineProperties,wE=Object.getOwnPropertyDescriptor,kE=Object.getOwnPropertyDescriptors,EE=Object.getOwnPropertyNames,Xo=Object.getOwnPropertySymbols,SE=Object.getPrototypeOf,Nc=Object.prototype.hasOwnProperty,og=Object.prototype.propertyIsEnumerable;var ag=(r,e,t)=>e in r?pa(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,K=(r,e)=>{for(var t in e||(e={}))Nc.call(e,t)&&ag(r,t,e[t]);if(Xo)for(var t of Xo(e))og.call(e,t)&&ag(r,t,e[t]);return r},de=(r,e)=>vE(r,kE(e));var Zo=(r,e)=>{var t={};for(var n in r)Nc.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Xo)for(var n of Xo(r))e.indexOf(n)<0&&og.call(r,n)&&(t[n]=r[n]);return t};var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),OE=(r,e)=>{for(var t in e)pa(r,t,{get:e[t],enumerable:!0})},ug=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of EE(e))!Nc.call(r,i)&&i!==t&&pa(r,i,{get:()=>e[i],enumerable:!(n=wE(e,i))||n.enumerable});return r};var ma=(r,e,t)=>(t=r!=null?_E(SE(r)):{},ug(e||!r||!r.__esModule?pa(t,"default",{value:r,enumerable:!0}):t,r)),DE=r=>ug(pa({},"__esModule",{value:!0}),r);var A=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Re=E(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.matchAnyPattern=Gn.extractTerms=Gn.repeatedTimeunitPattern=void 0;function CE(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Gn.repeatedTimeunitPattern=CE;function lg(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Gn.extractTerms=lg;function AE(r){return`(?:${lg(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Gn.matchAnyPattern=AE});var we=E((Fc,Lc)=>{(function(r,e){typeof Fc=="object"&&typeof Lc!="undefined"?Lc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Fc,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,k={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("_")},_=function(j,$,D){var Y=String(j);return!Y||Y.length>=$?j:""+Array($+1-Y.length).join(D)+j},R={s:_,z:function(j){var $=-j.utcOffset(),D=Math.abs($),Y=Math.floor(D/60),I=D%60;return($<=0?"+":"-")+_(Y,2,"0")+":"+_(I,2,"0")},m:function j($,D){if($.date(){"use strict";var PE=Yn&&Yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.findYearClosestToRef=Yn.findMostLikelyADYear=void 0;var NE=PE(we());function IE(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Yn.findMostLikelyADYear=IE;function FE(r,e,t){let n=NE.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.parseTimeUnits=fe.TIME_UNITS_PATTERN=fe.parseYear=fe.YEAR_PATTERN=fe.parseOrdinalNumberPattern=fe.ORDINAL_NUMBER_PATTERN=fe.parseNumberPattern=fe.NUMBER_PATTERN=fe.TIME_UNIT_DICTIONARY=fe.ORDINAL_WORD_DICTIONARY=fe.INTEGER_WORD_DICTIONARY=fe.MONTH_DICTIONARY=fe.FULL_MONTH_NAME_DICTIONARY=fe.WEEKDAY_DICTIONARY=void 0;var tu=Re(),LE=lt();fe.WEEKDAY_DICTIONARY={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};fe.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};fe.MONTH_DICTIONARY=Object.assign(Object.assign({},fe.FULL_MONTH_NAME_DICTIONARY),{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});fe.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};fe.ORDINAL_WORD_DICTIONARY={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};fe.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};fe.NUMBER_PATTERN=`(?:${tu.matchAnyPattern(fe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function dg(r){let e=r.toLowerCase();return fe.INTEGER_WORD_DICTIONARY[e]!==void 0?fe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}fe.parseNumberPattern=dg;fe.ORDINAL_NUMBER_PATTERN=`(?:${tu.matchAnyPattern(fe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function UE(r){let e=r.toLowerCase();return fe.ORDINAL_WORD_DICTIONARY[e]!==void 0?fe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}fe.parseOrdinalNumberPattern=UE;fe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function WE(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return LE.findMostLikelyADYear(e)}fe.parseYear=WE;var fg=`(${fe.NUMBER_PATTERN})\\s{0,3}(${tu.matchAnyPattern(fe.TIME_UNIT_DICTIONARY)})`,cg=new RegExp(fg,"i");fe.TIME_UNITS_PATTERN=tu.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",fg);function qE(r){let e={},t=r,n=cg.exec(t);for(;n;)$E(e,n),t=t.substring(n[0].length).trim(),n=cg.exec(t);return e}fe.parseTimeUnits=qE;function $E(r,e){let t=dg(e[1]),n=fe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var pg=E((Uc,Wc)=>{(function(r,e){typeof Uc=="object"&&typeof Wc!="undefined"?Wc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Uc,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var ir=E(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.implySimilarTime=Vr.assignSimilarTime=Vr.assignSimilarDate=Vr.assignTheNextDay=void 0;var mg=Ke();function jE(r,e){e=e.add(1,"day"),hg(r,e),gg(r,e)}Vr.assignTheNextDay=jE;function hg(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Vr.assignSimilarDate=hg;function GE(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",mg.Meridiem.AM):r.assign("meridiem",mg.Meridiem.PM)}Vr.assignSimilarTime=GE;function gg(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Vr.implySimilarTime=gg});var yg=E(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.toTimezoneOffset=mi.TIMEZONE_ABBR_MAP=void 0;mi.TIMEZONE_ABBR_MAP={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:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,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:-300,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,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:-480,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 YE(r){var e;return r==null?null:typeof r=="number"?r:(e=mi.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}mi.toTimezoneOffset=YE});var We=E(zr=>{"use strict";var Tg=zr&&zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zr,"__esModule",{value:!0});zr.ParsingResult=zr.ParsingComponents=zr.ReferenceWithTimezone=void 0;var BE=Tg(pg()),ru=Tg(we()),qc=ir(),HE=yg();ru.default.extend(BE.default);var $c=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=HE.toTimezoneOffset(e.timezone))}};zr.ReferenceWithTimezone=$c;var hi=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=ru.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new hi(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return ru.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=ru.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new hi(e);return t.hour||t.minute||t.second?(qc.assignSimilarTime(i,n),qc.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(qc.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};zr.ParsingComponents=hi;var ha=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new hi(e),this.end=s}clone(){let e=new ha(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};zr.ParsingResult=ha});var H=E(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.AbstractParserWithWordBoundaryChecking=void 0;var jc=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var Yc=ct(),VE=We(),zE=H(),KE=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Yc.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),QE=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Yc.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Gc=class extends zE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?QE:KE}innerExtract(e,t){let n=Yc.parseTimeUnits(t[1]);return VE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Bc.default=Gc});var Sg=E(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var XE=lt(),kg=ct(),Eg=ct(),iu=ct(),ZE=Re(),JE=H(),eS=new RegExp(`(?:on\\s{0,3})?(${iu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${iu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${ZE.matchAnyPattern(kg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Eg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),_g=1,vg=2,tS=3,wg=4,Hc=class extends JE.AbstractParserWithWordBoundaryChecking{innerPattern(){return eS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=kg.MONTH_DICTIONARY[t[tS].toLowerCase()],s=iu.parseOrdinalNumberPattern(t[_g]);if(s>31)return t.index=t.index+t[_g].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[wg]){let a=Eg.parseYear(t[wg]);n.start.assign("year",a)}else{let a=XE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[vg]){let a=iu.parseOrdinalNumberPattern(t[vg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Vc.default=Hc});var Mg=E(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var rS=lt(),xg=ct(),su=ct(),Rg=ct(),nS=Re(),iS=H(),sS=new RegExp(`(${nS.matchAnyPattern(xg.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${su.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${su.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Rg.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),aS=1,oS=2,Og=3,Dg=4,zc=class extends iS.AbstractParserWithWordBoundaryChecking{innerPattern(){return sS}innerExtract(e,t){let n=xg.MONTH_DICTIONARY[t[aS].toLowerCase()],i=su.parseOrdinalNumberPattern(t[oS]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Dg]){let u=Rg.parseYear(t[Dg]);s.assign("year",u)}else{let u=rS.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Og])return s;let a=su.parseOrdinalNumberPattern(t[Og]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Kc.default=zc});var Pg=E(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Qc=ct(),uS=lt(),lS=Re(),Ag=ct(),cS=H(),dS=new RegExp(`((?:in)\\s*)?(${lS.matchAnyPattern(Qc.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Ag.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),fS=1,pS=2,Cg=3,Xc=class extends cS.AbstractParserWithWordBoundaryChecking{innerPattern(){return dS}innerExtract(e,t){let n=t[pS].toLowerCase();if(t[0].length<=3&&!Qc.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[fS]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Qc.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Cg]){let a=Ag.parseYear(t[Cg]);i.start.assign("year",a)}else{let a=uS.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Zc.default=Xc});var Fg=E(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var Ig=ct(),mS=Re(),hS=H(),gS=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${mS.matchAnyPattern(Ig.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),yS=1,TS=2,Ng=3,bS=4,Jc=class extends hS.AbstractParserWithWordBoundaryChecking{innerPattern(){return gS}innerExtract(e,t){let n=t[Ng]?parseInt(t[Ng]):Ig.MONTH_DICTIONARY[t[TS].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[yS]);return{day:parseInt(t[bS]),month:n,year:i}}};ed.default=Jc});var Lg=E(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var _S=H(),vS=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),wS=1,kS=2,td=class extends _S.AbstractParserWithWordBoundaryChecking{innerPattern(){return vS}innerExtract(e,t){let n=parseInt(t[kS]),i=parseInt(t[wS]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};rd.default=td});var gi=E(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.AbstractTimeExpressionParser=void 0;var Ot=Ke();function ES(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function SS(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Ug=2,Ji=3,au=4,ou=5,ga=6,nd=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Ug]);if(o>100){if(this.strictMode||t[Ji]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Ji]!=null){if(t[Ji].length==1&&!t[ga])return null;s=parseInt(t[Ji])}if(s>=60)return null;if(o>12&&(a=Ot.Meridiem.PM),t[ga]!=null){if(o>12)return null;let u=t[ga][0].toLowerCase();u=="a"&&(a=Ot.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ot.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",Ot.Meridiem.AM):i.imply("meridiem",Ot.Meridiem.PM),t[ou]!=null){let u=parseInt(t[ou].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[au]!=null){let u=parseInt(t[au]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[ou]!=null){let u=parseInt(t[ou].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[au]!=null){let u=parseInt(t[au]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Ug]),a=0,o=-1;if(t[Ji]!=null?a=parseInt(t[Ji]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Ot.Meridiem.PM),t[ga]!=null){if(s>12)return null;let u=t[ga][0].toLowerCase();u=="a"&&(o=Ot.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Ot.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Ot.Meridiem.AM?(n.start.imply("meridiem",Ot.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ot.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",Ot.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Ot.Meridiem.PM)):s>12?i.imply("meridiem",Ot.Meridiem.PM):s<=12&&i.imply("meridiem",Ot.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=ES(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=SS(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};uu.AbstractTimeExpressionParser=nd});var Wg=E(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var lu=Ke(),OS=gi(),id=class extends OS.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",lu.Meridiem.PM)):i<6&&n.assign("meridiem",lu.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",lu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",lu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};sd.default=id});var sr=E(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.addImpliedTimeUnits=es.reverseTimeUnits=void 0;function DS(r){let e={};for(let t in r)e[t]=-r[t];return e}es.reverseTimeUnits=DS;function xS(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}es.addImpliedTimeUnits=xS});var qg=E(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var od=ct(),RS=We(),MS=H(),CS=sr(),AS=new RegExp(`(${od.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),PS=new RegExp(`(${od.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),ad=class extends MS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?PS:AS}innerExtract(e,t){let n=od.parseTimeUnits(t[1]),i=CS.reverseTimeUnits(n);return RS.ParsingComponents.createRelativeFromReference(e.reference,i)}};ud.default=ad});var $g=E(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var cd=ct(),NS=We(),IS=H(),FS=new RegExp(`(${cd.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),LS=new RegExp("("+cd.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),US=1,ld=class extends IS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?LS:FS}innerExtract(e,t){let n=cd.parseTimeUnits(t[US]);return NS.ParsingComponents.createRelativeFromReference(e.reference,n)}};dd.default=ld});var rs=E(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.MergingRefiner=ts.Filter=void 0;var fd=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};ts.Filter=fd;var pd=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};ts.MergingRefiner=pd});var Kr=E(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var WS=rs(),md=class extends WS.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var qS=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var $S=qS(Kr()),gd=class extends $S.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ya.default=gd});var Gg=E(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.mergeDateTimeComponent=ns.mergeDateTimeResult=void 0;var jS=Ke();function GS(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=yd(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=yd(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var YS=rs(),Yg=Gg(),Td=class extends YS.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?Yg.mergeDateTimeResult(t,n):Yg.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};bd.default=Td});var Bg=E(Ta=>{"use strict";var BS=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var HS=BS(hn()),_d=class extends HS.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Ta.default=_d});var Hg=E(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var VS=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),zS={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:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,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:-300,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:240,MST:-420,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:-480,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},vd=class{constructor(e){this.timezone=Object.assign(Object.assign({},zS),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=VS.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};wd.default=vd});var cu=E(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var KS=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),QS=1,XS=2,ZS=3,kd=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=KS.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[XS]),o=parseInt(s[ZS]||"0"),u=a*60+o;u>14*60||(s[QS]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};Ed.default=kd});var Vg=E(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Sd=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};Od.default=Sd});var zg=E(ba=>{"use strict";var JS=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var eO=JS(we()),Dd=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=eO.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};ba.default=Dd});var Kg=E(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var tO=rs(),xd=class extends tO.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};Rd.default=xd});var Ad=E(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});var rO=H(),nO=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"),iO=1,sO=2,aO=3,Qg=4,oO=5,Xg=6,Zg=7,Jg=8,ey=9,Md=class extends rO.AbstractParserWithWordBoundaryChecking{innerPattern(){return nO}innerExtract(e,t){let n={};if(n.year=parseInt(t[iO]),n.month=parseInt(t[sO]),n.day=parseInt(t[aO]),t[Qg]!=null)if(n.hour=parseInt(t[Qg]),n.minute=parseInt(t[oO]),t[Xg]!=null&&(n.second=parseInt(t[Xg])),t[Zg]!=null&&(n.millisecond=parseInt(t[Zg])),t[Jg]==null)n.timezoneOffset=0;else{let i=parseInt(t[Jg]),s=0;t[ey]!=null&&(s=parseInt(t[ey]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Cd.default=Md});var ty=E(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var uO=rs(),Pd=class extends uO.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Nd.default=Pd});var gn=E(is=>{"use strict";var yi=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0});is.includeCommonConfiguration=void 0;var lO=yi(Hg()),cO=yi(cu()),ry=yi(Vg()),dO=yi(zg()),fO=yi(Kg()),pO=yi(Ad()),mO=yi(ty());function hO(r,e=!1){return r.parsers.unshift(new pO.default),r.refiners.unshift(new mO.default),r.refiners.unshift(new lO.default),r.refiners.unshift(new cO.default),r.refiners.unshift(new ry.default),r.refiners.push(new ry.default),r.refiners.push(new dO.default),r.refiners.push(new fO.default(e)),r}is.includeCommonConfiguration=hO});var Tn=E(Oe=>{"use strict";var gO=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.noon=Oe.morning=Oe.midnight=Oe.yesterdayEvening=Oe.evening=Oe.lastNight=Oe.tonight=Oe.theDayAfter=Oe.tomorrow=Oe.theDayBefore=Oe.yesterday=Oe.today=Oe.now=void 0;var Qr=We(),ss=gO(we()),yn=ir(),_a=Ke();function yO(r){let e=ss.default(r.instant),t=new Qr.ParsingComponents(r,{});return yn.assignSimilarDate(t,e),yn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Oe.now=yO;function TO(r){let e=ss.default(r.instant),t=new Qr.ParsingComponents(r,{});return yn.assignSimilarDate(t,e),yn.implySimilarTime(t,e),t}Oe.today=TO;function bO(r){return ny(r,1)}Oe.yesterday=bO;function ny(r,e){return Id(r,-e)}Oe.theDayBefore=ny;function _O(r){return Id(r,1)}Oe.tomorrow=_O;function Id(r,e){let t=ss.default(r.instant),n=new Qr.ParsingComponents(r,{});return t=t.add(e,"day"),yn.assignSimilarDate(n,t),yn.implySimilarTime(n,t),n}Oe.theDayAfter=Id;function vO(r,e=22){let t=ss.default(r.instant),n=new Qr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",_a.Meridiem.PM),yn.assignSimilarDate(n,t),n}Oe.tonight=vO;function wO(r,e=0){let t=ss.default(r.instant),n=new Qr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),yn.assignSimilarDate(n,t),n.imply("hour",e),n}Oe.lastNight=wO;function kO(r,e=20){let t=new Qr.ParsingComponents(r,{});return t.imply("meridiem",_a.Meridiem.PM),t.imply("hour",e),t}Oe.evening=kO;function EO(r,e=20){let t=ss.default(r.instant),n=new Qr.ParsingComponents(r,{});return t=t.add(-1,"day"),yn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",_a.Meridiem.PM),n}Oe.yesterdayEvening=EO;function SO(r){let e=new Qr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Oe.midnight=SO;function OO(r,e=6){let t=new Qr.ParsingComponents(r,{});return t.imply("meridiem",_a.Meridiem.AM),t.imply("hour",e),t}Oe.morning=OO;function DO(r){let e=new Qr.ParsingComponents(r,{});return e.imply("meridiem",_a.Meridiem.AM),e.imply("hour",12),e}Oe.noon=DO});var iy=E(Or=>{"use strict";var xO=Or&&Or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),RO=Or&&Or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),MO=Or&&Or.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xO(e,r,t);return RO(e,r),e},CO=Or&&Or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Or,"__esModule",{value:!0});var AO=CO(we()),PO=H(),NO=ir(),va=MO(Tn()),IO=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Fd=class extends PO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return IO}innerExtract(e,t){let n=AO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return va.now(e.reference);case"today":return va.today(e.reference);case"yesterday":return va.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return va.tomorrow(e.reference);case"tonight":return va.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),NO.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Or.default=Fd});var sy=E(wa=>{"use strict";var FO=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var du=Ke(),LO=H(),UO=FO(we()),WO=ir(),qO=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Ld=class extends LO.AbstractParserWithWordBoundaryChecking{innerPattern(){return qO}innerExtract(e,t){let n=UO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",du.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",du.Meridiem.PM),i.imply("hour",20);break;case"midnight":WO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",du.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",du.Meridiem.AM),i.imply("hour",12);break}return i}};wa.default=Ld});var Ti=E(Bn=>{"use strict";var $O=Bn&&Bn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.toDayJSClosestWeekday=Bn.toDayJSWeekday=void 0;var ay=$O(we());function jO(r,e,t){if(!t)return oy(r,e);let n=ay.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Bn.toDayJSWeekday=jO;function oy(r,e){let t=ay.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var uy=ct(),GO=Re(),YO=H(),BO=Ti(),HO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${GO.matchAnyPattern(uy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),VO=1,zO=2,KO=3,Ud=class extends YO.AbstractParserWithWordBoundaryChecking{innerPattern(){return HO}innerExtract(e,t){let n=t[zO].toLowerCase(),i=uy.WEEKDAY_DICTIONARY[n],s=t[VO],a=t[KO],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=BO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Wd.default=Ud});var fy=E(ka=>{"use strict";var QO=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var dy=ct(),cy=We(),XO=QO(we()),ZO=H(),JO=Re(),eD=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${JO.matchAnyPattern(dy.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),tD=1,rD=2,qd=class extends ZO.AbstractParserWithWordBoundaryChecking{innerPattern(){return eD}innerExtract(e,t){let n=t[tD].toLowerCase(),i=t[rD].toLowerCase(),s=dy.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,cy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,cy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=XO.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ka.default=qd});var Dr=E(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.ParsingContext=us.Chrono=void 0;var as=We(),nD=$d(),os=class{constructor(e){e=e||nD.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new os({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new fu(e,t,n),s=[];return this.parsers.forEach(a=>{let o=os.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof as.ParsingResult?c=l:l instanceof as.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};us.Chrono=os;var fu=class{constructor(e,t,n){this.text=e,this.reference=new as.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof as.ParsingComponents?e:new as.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new as.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};us.ParsingContext=fu});var bi=E(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var py=lt(),iD=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"),pu=1,my=5,hy=2,gy=3,jd=4,Gd=class{constructor(e){this.groupNumberMonth=e?gy:hy,this.groupNumberDay=e?hy:gy}pattern(){return iD}extract(e,t){if(t[pu]=="/"||t[my]=="/"){t.index+=t[0].length;return}let n=t.index+t[pu].length,i=t[0].substr(t[pu].length,t[0].length-t[pu].length-t[my].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[jd]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[jd]){let u=parseInt(t[jd]),l=py.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=py.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Yd.default=Gd});var Ty=E(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var yy=ct(),sD=We(),aD=H(),oD=sr(),uD=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${yy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Bd=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return uD}innerExtract(e,t){let n=t[1].toLowerCase(),i=yy.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=oD.reverseTimeUnits(i);break}return sD.ParsingComponents.createRelativeFromReference(e.reference,i)}};Hd.default=Bd});var _y=E(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var lD=rs(),Vd=We(),cD=ct(),dD=sr();function by(r){return r.text.match(/\s+(before|from)$/i)!=null}function fD(r){return r.text.match(/\s+(after|since)$/i)!=null}var zd=class extends lD.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!by(t)&&!fD(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=cD.parseTimeUnits(t.text);by(t)&&(i=dD.reverseTimeUnits(i));let s=Vd.ParsingComponents.createRelativeFromReference(new Vd.ReferenceWithTimezone(n.start.date()),i);return new Vd.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Kd.default=zd});var $d=E(Ye=>{"use strict";var Ze=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.GB=Ye.strict=Ye.casual=void 0;var pD=Ze(bg()),mD=Ze(Sg()),hD=Ze(Mg()),gD=Ze(Pg()),yD=Ze(Fg()),TD=Ze(Lg()),bD=Ze(Wg()),_D=Ze(qg()),vD=Ze($g()),wD=Ze(jg()),kD=Ze(Bg()),ED=gn(),SD=Ze(iy()),OD=Ze(sy()),DD=Ze(ly()),xD=Ze(fy()),Qd=Dr(),RD=Ze(bi()),MD=Ze(Ty()),CD=Ze(_y());Ye.casual=new Qd.Chrono(vy(!1));Ye.strict=new Qd.Chrono(mu(!0,!1));Ye.GB=new Qd.Chrono(mu(!1,!0));function AD(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=AD;function PD(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=PD;function vy(r=!1){let e=mu(!1,r);return e.parsers.unshift(new SD.default),e.parsers.unshift(new OD.default),e.parsers.unshift(new gD.default),e.parsers.unshift(new xD.default),e.parsers.unshift(new MD.default),e}Ye.createCasualConfiguration=vy;function mu(r=!0,e=!1){return ED.includeCommonConfiguration({parsers:[new RD.default(e),new pD.default,new mD.default,new hD.default,new DD.default,new yD.default,new TD.default,new bD.default(r),new _D.default(r),new vD.default(r)],refiners:[new CD.default,new kD.default,new wD.default]},r)}Ye.createConfiguration=mu});var wy=E(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var ND=gi(),Xd=class extends ND.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Zd.default=Xd});var Ea=E(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.parseTimeUnits=Ae.TIME_UNITS_PATTERN=Ae.parseYear=Ae.YEAR_PATTERN=Ae.parseNumberPattern=Ae.NUMBER_PATTERN=Ae.TIME_UNIT_DICTIONARY=Ae.INTEGER_WORD_DICTIONARY=Ae.MONTH_DICTIONARY=Ae.WEEKDAY_DICTIONARY=void 0;var Jd=Re(),ID=lt();Ae.WEEKDAY_DICTIONARY={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};Ae.MONTH_DICTIONARY={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};Ae.INTEGER_WORD_DICTIONARY={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};Ae.TIME_UNIT_DICTIONARY={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"};Ae.NUMBER_PATTERN=`(?:${Jd.matchAnyPattern(Ae.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Ey(r){let e=r.toLowerCase();return Ae.INTEGER_WORD_DICTIONARY[e]!==void 0?Ae.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Ae.parseNumberPattern=Ey;Ae.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function FD(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return ID.findMostLikelyADYear(e)}Ae.parseYear=FD;var Sy=`(${Ae.NUMBER_PATTERN})\\s{0,5}(${Jd.matchAnyPattern(Ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ky=new RegExp(Sy,"i");Ae.TIME_UNITS_PATTERN=Jd.repeatedTimeunitPattern("",Sy);function LD(r){let e={},t=r,n=ky.exec(t);for(;n;)UD(e,n),t=t.substring(n[0].length),n=ky.exec(t);return e}Ae.parseTimeUnits=LD;function UD(r,e){let t=Ey(e[1]),n=Ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Dy=E(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var Oy=Ea(),WD=Re(),qD=H(),$D=Ti(),jD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${WD.matchAnyPattern(Oy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),GD=1,YD=3,BD=2,ef=class extends qD.AbstractParserWithWordBoundaryChecking{innerPattern(){return jD}innerExtract(e,t){let n=t[BD].toLowerCase(),i=Oy.WEEKDAY_DICTIONARY[n],s=t[GD],a=t[YD],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=$D.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};tf.default=ef});var Cy=E(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var Hn=Ke(),HD=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"),VD=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"),zD=2,xy=3,Ry=4,My=5,ls=class{pattern(e){return HD}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ls.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=VD.exec(i);return s&&(n.end=ls.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[zD]),t[xy]!=null&&(i=parseInt(t[xy])),i>=60||n>24)return null;if(n>=12&&(s=Hn.Meridiem.PM),t[My]!=null){if(n>12)return null;let a=t[My].toLowerCase();a.match(/morgen|vormittag/)&&(s=Hn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Hn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Hn.Meridiem.AM,n=0):n<6?s=Hn.Meridiem.AM:(s=Hn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Hn.Meridiem.AM):e.imply("meridiem",Hn.Meridiem.PM),t[Ry]!=null){let a=parseInt(t[Ry]);if(a>=60)return null;e.assign("second",a)}return e}};rf.default=ls});var Ay=E(Sa=>{"use strict";var KD=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var QD=KD(Kr()),nf=class extends QD.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Sa.default=nf});var Py=E(Oa=>{"use strict";var XD=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var ZD=XD(hn()),sf=class extends ZD.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Oa.default=sf});var af=E(xa=>{"use strict";var JD=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var e0=JD(we()),_i=Ke(),t0=H(),r0=ir(),n0=sr(),Da=class extends t0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=e0.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return r0.implySimilarTime(s,n),Da.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=n0.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",_i.Meridiem.AM);break}return e}};xa.default=Da});var Fy=E(xr=>{"use strict";var i0=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),s0=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),a0=xr&&xr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&i0(e,r,t);return s0(e,r),e},Iy=xr&&xr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xr,"__esModule",{value:!0});var o0=Iy(we()),u0=H(),vi=ir(),l0=Iy(af()),Ny=a0(Tn()),c0=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),d0=1,f0=2,of=class extends u0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return c0}innerExtract(e,t){let n=o0.default(e.refDate),i=(t[d0]||"").toLowerCase(),s=(t[f0]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Ny.now(e.reference);break;case"heute":a=Ny.today(e.reference);break;case"morgen":vi.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),vi.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),vi.assignSimilarDate(a,n),vi.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),vi.assignSimilarDate(a,n),vi.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),vi.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=l0.default.extractTimeComponents(a,s)),a}};xr.default=of});var jy=E(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var p0=lt(),qy=Ea(),$y=Ea(),m0=Re(),h0=H(),g0=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${m0.matchAnyPattern(qy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${$y.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ly=1,Uy=2,y0=3,Wy=4,uf=class extends h0.AbstractParserWithWordBoundaryChecking{innerPattern(){return g0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=qy.MONTH_DICTIONARY[t[y0].toLowerCase()],s=parseInt(t[Ly]);if(s>31)return t.index=t.index+t[Ly].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Wy]){let a=$y.parseYear(t[Wy]);n.start.assign("year",a)}else{let a=p0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Uy]){let a=parseInt(t[Uy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};lf.default=uf});var Gy=E(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var hu=Ea(),T0=We(),b0=H(),_0=sr(),v0=Re(),cf=class extends b0.AbstractParserWithWordBoundaryChecking{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*)?(${hu.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${v0.matchAnyPattern(hu.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?hu.parseNumberPattern(t[2]):1,i=hu.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=_0.reverseTimeUnits(s)),T0.ParsingComponents.createRelativeFromReference(e.reference,s)}};df.default=cf});var Hy=E(Je=>{"use strict";var Rr=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var w0=gn(),Yy=Dr(),k0=Rr(bi()),E0=Rr(Ad()),S0=Rr(wy()),O0=Rr(Dy()),D0=Rr(Cy()),x0=Rr(Ay()),R0=Rr(Py()),M0=Rr(Fy()),C0=Rr(af()),A0=Rr(jy()),P0=Rr(Gy());Je.casual=new Yy.Chrono(By());Je.strict=new Yy.Chrono(ff(!0));function N0(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=N0;function I0(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=I0;function By(r=!0){let e=ff(!1,r);return e.parsers.unshift(new C0.default),e.parsers.unshift(new M0.default),e.parsers.unshift(new P0.default),e}Je.createCasualConfiguration=By;function ff(r=!0,e=!0){return w0.includeCommonConfiguration({parsers:[new E0.default,new k0.default(e),new S0.default,new D0.default,new A0.default,new O0.default],refiners:[new x0.default,new R0.default]},r)}Je.createConfiguration=ff});var zy=E(Mr=>{"use strict";var F0=Mr&&Mr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),L0=Mr&&Mr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),U0=Mr&&Mr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&F0(e,r,t);return L0(e,r),e},W0=Mr&&Mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mr,"__esModule",{value:!0});var q0=W0(we()),$0=Ke(),j0=H(),Vy=ir(),gu=U0(Tn()),pf=class extends j0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=q0.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return gu.now(e.reference);case"aujourd'hui":return gu.today(e.reference);case"hier":return gu.yesterday(e.reference);case"demain":return gu.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Vy.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",$0.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Vy.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Mr.default=pf});var Ky=E(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var Ra=Ke(),G0=H(),mf=class extends G0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Ra.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Ra.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Ra.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Ra.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Ra.Meridiem.AM);break}return i}};hf.default=mf});var Qy=E(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var Y0=gi(),gf=class extends Y0.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};yf.default=gf});var Xy=E(Ma=>{"use strict";var B0=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var H0=B0(hn()),Tf=class extends H0.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Ma.default=Tf});var Zy=E(Ca=>{"use strict";var V0=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var z0=V0(Kr()),bf=class extends z0.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ca.default=bf});var Vn=E(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.parseTimeUnits=ke.TIME_UNITS_PATTERN=ke.parseYear=ke.YEAR_PATTERN=ke.parseOrdinalNumberPattern=ke.ORDINAL_NUMBER_PATTERN=ke.parseNumberPattern=ke.NUMBER_PATTERN=ke.TIME_UNIT_DICTIONARY=ke.INTEGER_WORD_DICTIONARY=ke.MONTH_DICTIONARY=ke.WEEKDAY_DICTIONARY=void 0;var _f=Re();ke.WEEKDAY_DICTIONARY={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};ke.MONTH_DICTIONARY={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};ke.INTEGER_WORD_DICTIONARY={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};ke.TIME_UNIT_DICTIONARY={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"};ke.NUMBER_PATTERN=`(?:${_f.matchAnyPattern(ke.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function eT(r){let e=r.toLowerCase();return ke.INTEGER_WORD_DICTIONARY[e]!==void 0?ke.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}ke.parseNumberPattern=eT;ke.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function K0(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}ke.parseOrdinalNumberPattern=K0;ke.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function Q0(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}ke.parseYear=Q0;var tT=`(${ke.NUMBER_PATTERN})\\s{0,5}(${_f.matchAnyPattern(ke.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Jy=new RegExp(tT,"i");ke.TIME_UNITS_PATTERN=_f.repeatedTimeunitPattern("",tT);function X0(r){let e={},t=r,n=Jy.exec(t);for(;n;)Z0(e,n),t=t.substring(n[0].length),n=Jy.exec(t);return e}ke.parseTimeUnits=X0;function Z0(r,e){let t=eT(e[1]),n=ke.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var nT=E(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var rT=Vn(),J0=Re(),e1=H(),t1=Ti(),r1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${J0.matchAnyPattern(rT.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),n1=1,i1=2,vf=class extends e1.AbstractParserWithWordBoundaryChecking{innerPattern(){return r1}innerExtract(e,t){let n=t[n1].toLowerCase(),i=rT.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[i1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=t1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};wf.default=vf});var oT=E(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var Aa=Ke(),s1=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"),a1=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"),o1=2,iT=3,sT=4,aT=5,cs=class{pattern(e){return s1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=cs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=a1.exec(i);return s&&(n.end=cs.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[o1]),t[iT]!=null&&(i=parseInt(t[iT])),i>=60||n>24)return null;if(n>=12&&(s=Aa.Meridiem.PM),t[aT]!=null){if(n>12)return null;let a=t[aT][0].toLowerCase();a=="a"&&(s=Aa.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Aa.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Aa.Meridiem.AM):e.imply("meridiem",Aa.Meridiem.PM),t[sT]!=null){let a=parseInt(t[sT]);if(a>=60)return null;e.assign("second",a)}return e}};kf.default=cs});var pT=E(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var u1=lt(),dT=Vn(),fT=Vn(),yu=Vn(),l1=Re(),c1=H(),d1=new RegExp(`(?:on\\s*?)?(${yu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${yu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${l1.matchAnyPattern(dT.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${fT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),uT=1,lT=2,f1=3,cT=4,Ef=class extends c1.AbstractParserWithWordBoundaryChecking{innerPattern(){return d1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=dT.MONTH_DICTIONARY[t[f1].toLowerCase()],s=yu.parseOrdinalNumberPattern(t[uT]);if(s>31)return t.index=t.index+t[uT].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[cT]){let a=fT.parseYear(t[cT]);n.start.assign("year",a)}else{let a=u1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[lT]){let a=yu.parseOrdinalNumberPattern(t[lT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Sf.default=Ef});var hT=E(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var mT=Vn(),p1=We(),m1=H(),h1=sr(),Of=class extends m1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${mT.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=mT.parseTimeUnits(t[1]),i=h1.reverseTimeUnits(n);return p1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Df.default=Of});var yT=E(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var gT=Vn(),g1=We(),y1=H(),xf=class extends y1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${gT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=gT.parseTimeUnits(t[1]);return g1.ParsingComponents.createRelativeFromReference(e.reference,n)}};Rf.default=xf});var TT=E(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var Tu=Vn(),T1=We(),b1=H(),_1=sr(),v1=Re(),Mf=class extends b1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Tu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${v1.matchAnyPattern(Tu.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Tu.parseNumberPattern(t[1]):1,i=Tu.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=_1.reverseTimeUnits(s)),T1.ParsingComponents.createRelativeFromReference(e.reference,s)}};Cf.default=Mf});var vT=E(et=>{"use strict";var ar=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var w1=gn(),bT=Dr(),k1=ar(zy()),E1=ar(Ky()),S1=ar(bi()),O1=ar(Qy()),D1=ar(Xy()),x1=ar(Zy()),R1=ar(nT()),M1=ar(oT()),C1=ar(pT()),A1=ar(hT()),P1=ar(yT()),N1=ar(TT());et.casual=new bT.Chrono(_T());et.strict=new bT.Chrono(Af(!0));function I1(r,e,t){return et.casual.parse(r,e,t)}et.parse=I1;function F1(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=F1;function _T(r=!0){let e=Af(!1,r);return e.parsers.unshift(new k1.default),e.parsers.unshift(new E1.default),e.parsers.unshift(new N1.default),e}et.createCasualConfiguration=_T;function Af(r=!0,e=!0){return w1.includeCommonConfiguration({parsers:[new S1.default(e),new C1.default,new O1.default,new M1.default,new A1.default,new P1.default,new R1.default],refiners:[new D1.default,new x1.default]},r)}et.createConfiguration=Af});var wT=E(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.toHankaku=void 0;function L1(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,U1)}bu.toHankaku=L1;function U1(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var ET=E(Pa=>{"use strict";var W1=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var Pf=wT(),q1=lt(),$1=W1(we()),j1=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,kT=1,G1=2,Nf=3,Y1=4,B1=5,H1=6,If=class{pattern(){return j1}extract(e,t){let n=parseInt(Pf.toHankaku(t[B1])),i=parseInt(Pf.toHankaku(t[H1])),s=e.createParsingComponents({day:i,month:n});if(t[kT]&&t[kT].match("\u540C|\u4ECA|\u672C")){let a=$1.default(e.refDate);s.assign("year",a.year())}if(t[G1]){let a=t[Y1],o=a=="\u5143"?1:parseInt(Pf.toHankaku(a));t[Nf]=="\u4EE4\u548C"?o+=2018:t[Nf]=="\u5E73\u6210"?o+=1988:t[Nf]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=q1.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Pa.default=If});var ST=E(Na=>{"use strict";var V1=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var z1=V1(Kr()),Ff=class extends z1.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Na.default=Ff});var DT=E(Cr=>{"use strict";var K1=Cr&&Cr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Q1=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),X1=Cr&&Cr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&K1(e,r,t);return Q1(e,r),e},Z1=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var J1=Z1(we()),OT=Ke(),Lf=X1(Tn()),ex=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Uf=class{pattern(){return ex}extract(e,t){let n=t[0],i=J1.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Lf.yesterday(e.reference);case"\u660E\u65E5":return Lf.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Lf.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",OT.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",OT.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Cr.default=Uf});var MT=E(tt=>{"use strict";var Wf=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var tx=Wf(ET()),rx=Wf(ST()),nx=Wf(DT()),xT=Dr();tt.casual=new xT.Chrono(RT());tt.strict=new xT.Chrono(qf());function ix(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=ix;function sx(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=sx;function RT(){let r=qf();return r.parsers.unshift(new nx.default),r}tt.createCasualConfiguration=RT;function qf(){return{parsers:[new tx.default],refiners:[new rx.default]}}tt.createConfiguration=qf});var _u=E(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.parseYear=Xr.YEAR_PATTERN=Xr.MONTH_DICTIONARY=Xr.WEEKDAY_DICTIONARY=void 0;Xr.WEEKDAY_DICTIONARY={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};Xr.MONTH_DICTIONARY={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};Xr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function ax(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Xr.parseYear=ax});var AT=E(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var CT=_u(),ox=Re(),ux=H(),lx=Ti(),cx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${ox.matchAnyPattern(CT.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),dx=1,fx=2,px=3,$f=class extends ux.AbstractParserWithWordBoundaryChecking{innerPattern(){return cx}innerExtract(e,t){let n=t[fx].toLowerCase(),i=CT.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[dx],a=t[px],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=lx.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};jf.default=$f});var PT=E(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var mx=gi(),Gf=class extends mx.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Yf.default=Gf});var NT=E(Ia=>{"use strict";var hx=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var gx=hx(hn()),Bf=class extends gx.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Ia.default=Bf});var IT=E(Fa=>{"use strict";var yx=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var Tx=yx(Kr()),Hf=class extends Tx.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Fa.default=Hf});var $T=E(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var bx=lt(),WT=_u(),qT=_u(),_x=Re(),vx=H(),wx=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.matchAnyPattern(WT.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${qT.YEAR_PATTERN}))?(?=\\W|$)`,"i"),FT=1,LT=2,kx=3,UT=4,Vf=class extends vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return wx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=WT.MONTH_DICTIONARY[t[kx].toLowerCase()],s=parseInt(t[FT]);if(s>31)return t.index=t.index+t[FT].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[UT]){let a=qT.parseYear(t[UT]);n.start.assign("year",a)}else{let a=bx.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[LT]){let a=parseInt(t[LT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};zf.default=Vf});var jT=E(bn=>{"use strict";var Ex=bn&&bn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Sx=bn&&bn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ox=bn&&bn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Ex(e,r,t);return Sx(e,r),e};Object.defineProperty(bn,"__esModule",{value:!0});var Dx=H(),vu=Ox(Tn()),Kf=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return vu.now(e.reference);case"hoje":return vu.today(e.reference);case"amanha":case"amanh\xE3":return vu.tomorrow(e.reference);case"ontem":return vu.yesterday(e.reference)}return i}};bn.default=Kf});var GT=E(La=>{"use strict";var xx=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var wu=Ke(),Rx=H(),Mx=ir(),Cx=xx(we()),Qf=class extends Rx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=Cx.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",wu.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",wu.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",wu.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":Mx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",wu.Meridiem.AM),i.imply("hour",12);break}return i}};La.default=Qf});var HT=E(rt=>{"use strict";var zn=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var Ax=gn(),YT=Dr(),Px=zn(bi()),Nx=zn(AT()),Ix=zn(PT()),Fx=zn(NT()),Lx=zn(IT()),Ux=zn($T()),Wx=zn(jT()),qx=zn(GT());rt.casual=new YT.Chrono(BT());rt.strict=new YT.Chrono(Xf(!0));function $x(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=$x;function jx(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=jx;function BT(r=!0){let e=Xf(!1,r);return e.parsers.push(new Wx.default),e.parsers.push(new qx.default),e}rt.createCasualConfiguration=BT;function Xf(r=!0,e=!0){return Ax.includeCommonConfiguration({parsers:[new Px.default(e),new Nx.default,new Ix.default,new Ux.default],refiners:[new Fx.default,new Lx.default]},r)}rt.createConfiguration=Xf});var VT=E(Ua=>{"use strict";var Gx=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var Yx=Gx(Kr()),Zf=class extends Yx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ua.default=Zf});var zT=E(Wa=>{"use strict";var Bx=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var Hx=Bx(hn()),Jf=class extends Hx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Wa.default=Jf});var KT=E(_n=>{"use strict";var Vx=_n&&_n.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zx=_n&&_n.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Kx=_n&&_n.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Vx(e,r,t);return zx(e,r),e};Object.defineProperty(_n,"__esModule",{value:!0});var Qx=H(),ku=Kx(Tn()),ep=class extends Qx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return ku.now(e.reference);case"vandaag":return ku.today(e.reference);case"morgen":case"morgend":return ku.tomorrow(e.reference);case"gisteren":return ku.yesterday(e.reference)}return i}};_n.default=ep});var QT=E(qa=>{"use strict";var Xx=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var Eu=Ke(),Zx=H(),Jx=Xx(we()),eR=ir(),tR=1,rR=2,tp=class extends Zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Jx.default(e.refDate),i=e.createParsingComponents();switch(t[tR]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[rR].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Eu.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Eu.Meridiem.PM),i.imply("hour",20);break;case"middernacht":eR.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Eu.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Eu.Meridiem.AM),i.imply("hour",12);break}return i}};qa.default=tp});var Yt=E(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.ORDINAL_WORD_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var Su=Re(),nR=lt();Te.WEEKDAY_DICTIONARY={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};Te.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":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};Te.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};Te.ORDINAL_WORD_DICTIONARY={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};Te.TIME_UNIT_DICTIONARY={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"};Te.NUMBER_PATTERN=`(?:${Su.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function ZT(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}Te.parseNumberPattern=ZT;Te.ORDINAL_NUMBER_PATTERN=`(?:${Su.matchAnyPattern(Te.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function iR(r){let e=r.toLowerCase();return Te.ORDINAL_WORD_DICTIONARY[e]!==void 0?Te.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}Te.parseOrdinalNumberPattern=iR;Te.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function sR(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return nR.findMostLikelyADYear(e)}Te.parseYear=sR;var JT=`(${Te.NUMBER_PATTERN})\\s{0,5}(${Su.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,XT=new RegExp(JT,"i");Te.TIME_UNITS_PATTERN=Su.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",JT);function aR(r){let e={},t=r,n=XT.exec(t);for(;n;)oR(e,n),t=t.substring(n[0].length),n=XT.exec(t);return e}Te.parseTimeUnits=aR;function oR(r,e){let t=ZT(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var tb=E(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var eb=Yt(),uR=We(),lR=H(),rp=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+eb.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=eb.parseTimeUnits(t[1]);return uR.ParsingComponents.createRelativeFromReference(e.reference,n)}};np.default=rp});var nb=E(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var rb=Yt(),cR=Re(),dR=H(),fR=Ti(),pR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${cR.matchAnyPattern(rb.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),mR=1,hR=2,gR=3,ip=class extends dR.AbstractParserWithWordBoundaryChecking{innerPattern(){return pR}innerExtract(e,t){let n=t[hR].toLowerCase(),i=rb.WEEKDAY_DICTIONARY[n],s=t[mR],a=t[gR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=fR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};sp.default=ip});var lb=E(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var yR=lt(),ob=Yt(),Ou=Yt(),ub=Yt(),TR=Re(),bR=H(),_R=new RegExp(`(?:on\\s*?)?(${Ou.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Ou.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+TR.matchAnyPattern(ob.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${ub.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),vR=3,ib=1,sb=2,ab=4,ap=class extends bR.AbstractParserWithWordBoundaryChecking{innerPattern(){return _R}innerExtract(e,t){let n=ob.MONTH_DICTIONARY[t[vR].toLowerCase()],i=Ou.parseOrdinalNumberPattern(t[ib]);if(i>31)return t.index=t.index+t[ib].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[ab]){let u=ub.parseYear(t[ab]);s.assign("year",u)}else{let u=yR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[sb])return s;let a=Ou.parseOrdinalNumberPattern(t[sb]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};op.default=ap});var pb=E(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var db=Yt(),wR=lt(),kR=Re(),fb=Yt(),ER=H(),SR=new RegExp(`(${kR.matchAnyPattern(db.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${fb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),OR=1,cb=2,up=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return SR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[OR],s=db.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[cb]){let a=fb.parseYear(t[cb]);n.assign("year",a)}else{let a=wR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};lp.default=up});var mb=E(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var DR=H(),xR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),RR=1,MR=2,cp=class extends DR.AbstractParserWithWordBoundaryChecking{innerPattern(){return xR}innerExtract(e,t){let n=parseInt(t[MR]),i=parseInt(t[RR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};dp.default=cp});var hb=E(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});var CR=gi(),fp=class extends CR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};pp.default=fp});var Tb=E(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});var yb=Yt(),AR=Re(),PR=H(),NR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${AR.matchAnyPattern(yb.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),IR=1,FR=2,gb=3,LR=4,mp=class extends PR.AbstractParserWithWordBoundaryChecking{innerPattern(){return NR}innerExtract(e,t){let n=t[gb]?parseInt(t[gb]):yb.MONTH_DICTIONARY[t[FR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[IR]);return{day:parseInt(t[LR]),month:n,year:i}}};hp.default=mp});var bb=E($a=>{"use strict";var UR=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var WR=H(),Du=Ke(),gp=ir(),qR=UR(we()),$R=1,jR=2,yp=class extends WR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[$R].toLowerCase(),i=t[jR].toLowerCase(),s=e.createParsingComponents(),a=qR.default(e.refDate);switch(n){case"gisteren":gp.assignSimilarDate(s,a.add(-1,"day"));break;case"van":gp.assignSimilarDate(s,a);break;case"morgen":gp.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",Du.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",Du.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",Du.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",Du.Meridiem.PM),s.imply("hour",20);break}return s}};$a.default=yp});var vb=E(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var _b=Yt(),GR=We(),YR=H(),BR=sr(),HR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${_b.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Tp=class extends YR.AbstractParserWithWordBoundaryChecking{innerPattern(){return HR}innerExtract(e,t){let n=t[1].toLowerCase(),i=_b.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=BR.reverseTimeUnits(i);break}return GR.ParsingComponents.createRelativeFromReference(e.reference,i)}};bp.default=Tp});var Eb=E(ja=>{"use strict";var VR=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var kb=Yt(),wb=We(),zR=VR(we()),KR=H(),QR=Re(),XR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${QR.matchAnyPattern(kb.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),ZR=1,JR=2,_p=class extends KR.AbstractParserWithWordBoundaryChecking{innerPattern(){return XR}innerExtract(e,t){let n=t[ZR].toLowerCase(),i=t[JR].toLowerCase(),s=kb.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,wb.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,wb.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=zR.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ja.default=_p});var Sb=E(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var wp=Yt(),eM=We(),tM=H(),rM=sr(),nM=new RegExp("("+wp.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),iM=new RegExp("("+wp.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),vp=class extends tM.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?iM:nM}innerExtract(e,t){let n=wp.parseTimeUnits(t[1]),i=rM.reverseTimeUnits(n);return eM.ParsingComponents.createRelativeFromReference(e.reference,i)}};kp.default=vp});var Ob=E(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var Sp=Yt(),sM=We(),aM=H(),oM=new RegExp("("+Sp.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),uM=new RegExp("("+Sp.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),lM=1,Ep=class extends aM.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?uM:oM}innerExtract(e,t){let n=Sp.parseTimeUnits(t[lM]);return sM.ParsingComponents.createRelativeFromReference(e.reference,n)}};Op.default=Ep});var Mb=E(nt=>{"use strict";var dt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var cM=gn(),Db=Dr(),dM=dt(VT()),fM=dt(zT()),pM=dt(KT()),mM=dt(QT()),hM=dt(bi()),gM=dt(tb()),yM=dt(nb()),TM=dt(lb()),xb=dt(pb()),bM=dt(mb()),_M=dt(hb()),vM=dt(Tb()),wM=dt(bb()),kM=dt(vb()),EM=dt(Eb()),SM=dt(Sb()),OM=dt(Ob());nt.casual=new Db.Chrono(Rb());nt.strict=new Db.Chrono(Dp(!0));function DM(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=DM;function xM(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=xM;function Rb(r=!0){let e=Dp(!1,r);return e.parsers.unshift(new pM.default),e.parsers.unshift(new mM.default),e.parsers.unshift(new wM.default),e.parsers.unshift(new xb.default),e.parsers.unshift(new EM.default),e.parsers.unshift(new kM.default),e}nt.createCasualConfiguration=Rb;function Dp(r=!0,e=!0){return cM.includeCommonConfiguration({parsers:[new hM.default(e),new gM.default,new TM.default,new xb.default,new yM.default,new vM.default,new bM.default,new _M.default(r),new SM.default(r),new OM.default(r)],refiners:[new fM.default,new dM.default]},r)}nt.createConfiguration=Dp});var Nb=E(Ga=>{"use strict";var RM=Ga&&Ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ga,"__esModule",{value:!0});var MM=RM(we()),CM=H(),AM=1,Cb=2,PM=3,Ab=4,Pb=5,NM=6,xp=class extends CM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=MM.default(e.refDate),a=s;if(t[AM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Cb]){let o=t[Cb],u=t[PM];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Ab]){let u=t[Ab][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Pb]){let o=t[Pb];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[NM];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ga.default=xp});var ds=E(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.zhStringToYear=It.zhStringToNumber=It.WEEKDAY_OFFSET=It.NUMBER=void 0;It.NUMBER={\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};It.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function IM(r){let e=0;for(let t=0;t{"use strict";var LM=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var UM=LM(we()),WM=H(),wi=ds(),Rp=1,Ib=2,Mp=3,Cp=class extends WM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(wi.NUMBER).join("")+"]{4}|["+Object.keys(wi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(wi.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(wi.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=UM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ib]);if(isNaN(s)&&(s=wi.zhStringToNumber(t[Ib])),i.start.assign("month",s),t[Mp]){let a=parseInt(t[Mp]);isNaN(a)&&(a=wi.zhStringToNumber(t[Mp])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Rp]){let a=parseInt(t[Rp]);isNaN(a)&&(a=wi.zhStringToYear(t[Rp])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Ya.default=Cp});var Ub=E(Ba=>{"use strict";var qM=Ba&&Ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ba,"__esModule",{value:!0});var $M=qM(we()),jM=H(),Lb=ds(),GM=new RegExp("(\\d+|["+Object.keys(Lb.NUMBER).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"),Ap=1,YM=2,Pp=class extends jM.AbstractParserWithWordBoundaryChecking{innerPattern(){return GM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Ap]);if(isNaN(i)&&(i=Lb.zhStringToNumber(t[Ap])),isNaN(i)){let u=t[Ap];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=$M.default(e.refDate),o=t[YM][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ba.default=Pp});var qb=E(Ha=>{"use strict";var BM=Ha&&Ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ha,"__esModule",{value:!0});var HM=BM(we()),VM=H(),Wb=ds(),zM=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Wb.WEEKDAY_OFFSET).join("|")+")"),Np=class extends VM.AbstractParserWithWordBoundaryChecking{innerPattern(){return zM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Wb.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=HM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var KM=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var QM=KM(we()),XM=H(),ur=ds(),ZM=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(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),JM=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(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),xu=1,Ru=2,Mu=3,Cu=4,Au=5,Pu=6,or=7,fs=8,Nu=9,Ip=class extends XM.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=QM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[xu]){var a=t[xu];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Cu]){var o=t[Cu];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[fs]){var d=parseInt(t[fs]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[fs])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[Pu]),isNaN(u)&&(u=ur.zhStringToNumber(t[Pu])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Nu]){if(u>12)return null;var f=t[Nu][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[Ru]){var m=t[Ru],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Mu]){var b=t[Mu],k=b[0];k=="\u4E0A"||k=="\u671D"||k=="\u65E9"||k=="\u51CC"?(c=0,u==12&&(u=0)):(k=="\u4E0B"||k=="\u664F"||k=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Au]){var _=t[Au],R=_[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=JM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let S=s.clone();if(i.end=e.createParsingComponents(),t[xu]){var a=t[xu];a=="\u660E"||a=="\u807D"?n.hour()>1&&S.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?S.add(-1,"day"):a=="\u524D"?S.add(-2,"day"):a=="\u5927\u524D"?S.add(-3,"day"):a=="\u5F8C"?S.add(2,"day"):a=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else if(t[Cu]){var o=t[Cu];o=="\u660E"||o=="\u807D"?S.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?S.add(-1,"day"):o=="\u524D"?S.add(-2,"day"):o=="\u5927\u524D"?S.add(-3,"day"):o=="\u5F8C"?S.add(2,"day"):o=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else i.end.imply("day",S.date()),i.end.imply("month",S.month()+1),i.end.imply("year",S.year());if(u=0,l=0,c=-1,t[fs]){var d=parseInt(t[fs]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[fs])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[Pu]),isNaN(u)&&(u=ur.zhStringToNumber(t[Pu])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Nu]){if(u>12)return null;var f=t[Nu][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Ru]){var m=t[Ru],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Mu]){var b=t[Mu],k=b[0];k=="\u4E0A"||k=="\u671D"||k=="\u65E9"||k=="\u51CC"?(c=0,u==12&&(u=0)):(k=="\u4E0B"||k=="\u664F"||k=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Au]){var _=t[Au],R=_[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var eC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var tC=eC(we()),rC=H(),jb=ds(),nC=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(jb.WEEKDAY_OFFSET).join("|")+")"),Fp=class extends rC.AbstractParserWithWordBoundaryChecking{innerPattern(){return nC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=jb.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=tC.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var iC=Ka&&Ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ka,"__esModule",{value:!0});var sC=iC(Kr()),Lp=class extends sC.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ka.default=Lp});var Bb=E(Qa=>{"use strict";var aC=Qa&&Qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qa,"__esModule",{value:!0});var oC=aC(hn()),Up=class extends oC.default{patternBetween(){return/^\s*$/i}};Qa.default=Up});var Hb=E(Be=>{"use strict";var vn=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0});Be.createConfiguration=Be.createCasualConfiguration=Be.parseDate=Be.parse=Be.strict=Be.casual=Be.hant=void 0;var Wp=Dr(),uC=vn(cu()),lC=gn(),cC=vn(Nb()),dC=vn(Fb()),fC=vn(Ub()),pC=vn(qb()),mC=vn($b()),hC=vn(Gb()),gC=vn(Yb()),yC=vn(Bb());Be.hant=new Wp.Chrono(qp());Be.casual=new Wp.Chrono(qp());Be.strict=new Wp.Chrono($p());function TC(r,e,t){return Be.casual.parse(r,e,t)}Be.parse=TC;function bC(r,e,t){return Be.casual.parseDate(r,e,t)}Be.parseDate=bC;function qp(){let r=$p();return r.parsers.unshift(new cC.default),r}Be.createCasualConfiguration=qp;function $p(){let r=lC.includeCommonConfiguration({parsers:[new dC.default,new pC.default,new hC.default,new mC.default,new fC.default],refiners:[new gC.default,new yC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof uC.default)),r}Be.createConfiguration=$p});var Qb=E(Xa=>{"use strict";var _C=Xa&&Xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xa,"__esModule",{value:!0});var vC=_C(we()),wC=H(),kC=1,Vb=2,EC=3,zb=4,Kb=5,SC=6,jp=class extends wC.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=vC.default(e.refDate),a=s;if(t[kC])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Vb]){let o=t[Vb],u=t[EC];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[zb]){let u=t[zb][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Kb]){let o=t[Kb];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[SC];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Xa.default=jp});var ps=E(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.zhStringToYear=Ft.zhStringToNumber=Ft.WEEKDAY_OFFSET=Ft.NUMBER=void 0;Ft.NUMBER={\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};Ft.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function OC(r){let e=0;for(let t=0;t{"use strict";var xC=Za&&Za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Za,"__esModule",{value:!0});var RC=xC(we()),MC=H(),ki=ps(),Gp=1,Xb=2,Yp=3,Bp=class extends MC.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ki.NUMBER).join("")+"]{4}|["+Object.keys(ki.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ki.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ki.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=RC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Xb]);if(isNaN(s)&&(s=ki.zhStringToNumber(t[Xb])),i.start.assign("month",s),t[Yp]){let a=parseInt(t[Yp]);isNaN(a)&&(a=ki.zhStringToNumber(t[Yp])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Gp]){let a=parseInt(t[Gp]);isNaN(a)&&(a=ki.zhStringToYear(t[Gp])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Za.default=Bp});var e_=E(Ja=>{"use strict";var CC=Ja&&Ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ja,"__esModule",{value:!0});var AC=CC(we()),PC=H(),Jb=ps(),NC=new RegExp("(\\d+|["+Object.keys(Jb.NUMBER).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"),Hp=1,IC=2,Vp=class extends PC.AbstractParserWithWordBoundaryChecking{innerPattern(){return NC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Hp]);if(isNaN(i)&&(i=Jb.zhStringToNumber(t[Hp])),isNaN(i)){let u=t[Hp];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=AC.default(e.refDate),o=t[IC][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ja.default=Vp});var r_=E(eo=>{"use strict";var FC=eo&&eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(eo,"__esModule",{value:!0});var LC=FC(we()),UC=H(),t_=ps(),WC=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(t_.WEEKDAY_OFFSET).join("|")+")"),zp=class extends UC.AbstractParserWithWordBoundaryChecking{innerPattern(){return WC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=t_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=LC.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var qC=to&&to.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(to,"__esModule",{value:!0});var $C=qC(we()),jC=H(),cr=ps(),GC=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.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),YC=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.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Iu=1,Fu=2,Lu=3,Uu=4,Wu=5,qu=6,lr=7,ms=8,$u=9,Kp=class extends jC.AbstractParserWithWordBoundaryChecking{innerPattern(){return GC}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=$C.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Iu]){let c=t[Iu];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Uu]){let c=t[Uu];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[ms]){let c=parseInt(t[ms]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ms])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[qu]),isNaN(a)&&(a=cr.zhStringToNumber(t[qu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[$u]){if(a>12)return null;let c=t[$u][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Fu]){let d=t[Fu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Lu]){let d=t[Lu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Wu]){let d=t[Wu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=YC.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[Iu]){let c=t[Iu];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Uu]){let c=t[Uu];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[ms]){let c=parseInt(t[ms]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ms])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[qu]),isNaN(a)&&(a=cr.zhStringToNumber(t[qu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[$u]){if(a>12)return null;let c=t[$u][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Fu]){let d=t[Fu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Lu]){let d=t[Lu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Wu]){let d=t[Wu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var BC=ro&&ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ro,"__esModule",{value:!0});var HC=BC(we()),VC=H(),i_=ps(),zC=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(i_.WEEKDAY_OFFSET).join("|")+")"),Qp=class extends VC.AbstractParserWithWordBoundaryChecking{innerPattern(){return zC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=i_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=HC.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var KC=no&&no.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(no,"__esModule",{value:!0});var QC=KC(Kr()),Xp=class extends QC.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};no.default=Xp});var o_=E(io=>{"use strict";var XC=io&&io.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(io,"__esModule",{value:!0});var ZC=XC(hn()),Zp=class extends ZC.default{patternBetween(){return/^\s*$/i}};io.default=Zp});var u_=E(He=>{"use strict";var wn=He&&He.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(He,"__esModule",{value:!0});He.createConfiguration=He.createCasualConfiguration=He.parseDate=He.parse=He.strict=He.casual=He.hans=void 0;var Jp=Dr(),JC=wn(cu()),eA=gn(),tA=wn(Qb()),rA=wn(Zb()),nA=wn(e_()),iA=wn(r_()),sA=wn(n_()),aA=wn(s_()),oA=wn(a_()),uA=wn(o_());He.hans=new Jp.Chrono(em());He.casual=new Jp.Chrono(em());He.strict=new Jp.Chrono(tm());function lA(r,e,t){return He.casual.parse(r,e,t)}He.parse=lA;function cA(r,e,t){return He.casual.parseDate(r,e,t)}He.parseDate=cA;function em(){let r=tm();return r.parsers.unshift(new tA.default),r}He.createCasualConfiguration=em;function tm(){let r=eA.includeCommonConfiguration({parsers:[new rA.default,new iA.default,new aA.default,new sA.default,new nA.default],refiners:[new oA.default,new uA.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof JC.default)),r}He.createConfiguration=tm});var c_=E(Bt=>{"use strict";var l_=Bt&&Bt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),dA=Bt&&Bt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fA=Bt&&Bt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&l_(e,r,t)},pA=Bt&&Bt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&l_(e,r,t);return dA(e,r),e};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.hans=void 0;fA(Hb(),Bt);Bt.hans=pA(u_())});var Lt=E(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.parseTimeUnits=ae.TIME_UNITS_PATTERN=ae.parseYear=ae.YEAR_PATTERN=ae.parseOrdinalNumberPattern=ae.ORDINAL_NUMBER_PATTERN=ae.parseNumberPattern=ae.NUMBER_PATTERN=ae.TIME_UNIT_DICTIONARY=ae.ORDINAL_WORD_DICTIONARY=ae.INTEGER_WORD_DICTIONARY=ae.MONTH_DICTIONARY=ae.FULL_MONTH_NAME_DICTIONARY=ae.WEEKDAY_DICTIONARY=ae.REGEX_PARTS=void 0;var ju=Re(),mA=lt();ae.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ae.WEEKDAY_DICTIONARY={\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};ae.FULL_MONTH_NAME_DICTIONARY={\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\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\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};ae.MONTH_DICTIONARY=Object.assign(Object.assign({},ae.FULL_MONTH_NAME_DICTIONARY),{\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});ae.INTEGER_WORD_DICTIONARY={\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\u0435\u043C\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};ae.ORDINAL_WORD_DICTIONARY={\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};ae.TIME_UNIT_DICTIONARY={\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",\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"};ae.NUMBER_PATTERN=`(?:${ju.matchAnyPattern(ae.INTEGER_WORD_DICTIONARY)}|[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})`;function f_(r){let e=r.toLowerCase();return ae.INTEGER_WORD_DICTIONARY[e]!==void 0?ae.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ae.parseNumberPattern=f_;ae.ORDINAL_NUMBER_PATTERN=`(?:${ju.matchAnyPattern(ae.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function hA(r){let e=r.toLowerCase();return ae.ORDINAL_WORD_DICTIONARY[e]!==void 0?ae.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ae.parseOrdinalNumberPattern=hA;var rm="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ae.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${rm}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${rm}|[5-9][0-9]${rm})`;function gA(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return mA.findMostLikelyADYear(e)}ae.parseYear=gA;var p_=`(${ae.NUMBER_PATTERN})\\s{0,3}(${ju.matchAnyPattern(ae.TIME_UNIT_DICTIONARY)})`,d_=new RegExp(p_,"i");ae.TIME_UNITS_PATTERN=ju.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",p_);function yA(r){let e={},t=r,n=d_.exec(t);for(;n;)TA(e,n),t=t.substring(n[0].length).trim(),n=d_.exec(t);return e}ae.parseTimeUnits=yA;function TA(r,e){let t=f_(e[1]),n=ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var h_=E(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var so=Lt(),bA=We(),_A=H(),m_=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${so.TIME_UNITS_PATTERN})${so.REGEX_PARTS.rightBoundary}`,vA=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${m_}`,so.REGEX_PARTS.flags),wA=new RegExp(m_,"i"),nm=class extends _A.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return so.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?wA:vA}innerExtract(e,t){let n=so.parseTimeUnits(t[1]);return bA.ParsingComponents.createRelativeFromReference(e.reference,n)}};im.default=nm});var __=E(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var kA=lt(),ao=Lt(),b_=Lt(),Gu=Lt(),EA=Re(),SA=H(),OA=new RegExp(`(?:\u0441)?\\s*(${Gu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Gu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${EA.matchAnyPattern(ao.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${b_.YEAR_PATTERN}(?![^\\s]\\d)))?${ao.REGEX_PARTS.rightBoundary}`,ao.REGEX_PARTS.flags),g_=1,y_=2,DA=3,T_=4,sm=class extends SA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ao.REGEX_PARTS.leftBoundary}innerPattern(){return OA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ao.MONTH_DICTIONARY[t[DA].toLowerCase()],s=Gu.parseOrdinalNumberPattern(t[g_]);if(s>31)return t.index=t.index+t[g_].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[T_]){let a=b_.parseYear(t[T_]);n.start.assign("year",a)}else{let a=kA.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[y_]){let a=Gu.parseOrdinalNumberPattern(t[y_]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};am.default=sm});var k_=E(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var oo=Lt(),xA=lt(),RA=Re(),w_=Lt(),MA=H(),CA=new RegExp(`((?:\u0432)\\s*)?(${RA.matchAnyPattern(oo.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${w_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,oo.REGEX_PARTS.flags),AA=2,v_=3,om=class extends MA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return oo.REGEX_PARTS.leftBoundary}innerPattern(){return CA}innerExtract(e,t){let n=t[AA].toLowerCase();if(t[0].length<=3&&!oo.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=oo.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[v_]){let a=w_.parseYear(t[v_]);i.start.assign("year",a)}else{let a=xA.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};um.default=om});var S_=E(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var Yu=Ke(),PA=gi(),E_=Lt(),lm=class extends PA.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return E_.REGEX_PARTS.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))?(?!\\/)${E_.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Yu.Meridiem.PM)):i<6&&n.assign("meridiem",Yu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Yu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Yu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};cm.default=lm});var O_=E(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var Bu=Lt(),NA=We(),IA=H(),FA=sr(),LA=new RegExp(`(${Bu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Bu.REGEX_PARTS.flags),dm=class extends IA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Bu.REGEX_PARTS.leftBoundary}innerPattern(){return LA}innerExtract(e,t){let n=Bu.parseTimeUnits(t[1]),i=FA.reverseTimeUnits(n);return NA.ParsingComponents.createRelativeFromReference(e.reference,i)}};fm.default=dm});var D_=E(uo=>{"use strict";var UA=uo&&uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(uo,"__esModule",{value:!0});var WA=UA(Kr()),pm=class extends WA.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};uo.default=pm});var x_=E(lo=>{"use strict";var qA=lo&&lo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lo,"__esModule",{value:!0});var $A=qA(hn()),mm=class extends $A.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};lo.default=mm});var R_=E(kn=>{"use strict";var jA=kn&&kn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),GA=kn&&kn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YA=kn&&kn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&jA(e,r,t);return GA(e,r),e};Object.defineProperty(kn,"__esModule",{value:!0});var BA=H(),co=YA(Tn()),hm=Lt(),HA=new RegExp(`(?:\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\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${hm.REGEX_PARTS.rightBoundary}`,hm.REGEX_PARTS.flags),gm=class extends BA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return hm.REGEX_PARTS.leftBoundary}innerPattern(e){return HA}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return co.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return co.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return co.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return co.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return co.theDayBefore(e.reference,2)}return i}};kn.default=gm});var M_=E(Ar=>{"use strict";var VA=Ar&&Ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zA=Ar&&Ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),KA=Ar&&Ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&VA(e,r,t);return zA(e,r),e},QA=Ar&&Ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ar,"__esModule",{value:!0});var XA=H(),Ei=KA(Tn()),ZA=ir(),JA=QA(we()),ym=Lt(),eP=new RegExp(`(\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)${ym.REGEX_PARTS.rightBoundary}`,ym.REGEX_PARTS.flags),Tm=class extends XA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ym.REGEX_PARTS.leftBoundary}innerPattern(){return eP}innerExtract(e,t){let n=JA.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Ei.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Ei.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Ei.morning(e.reference);if(i.match(/в\s*полдень/))return Ei.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Ei.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Ei.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),ZA.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Ei.midnight(e.reference):s}};Ar.default=Tm});var C_=E(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var fo=Lt(),tP=Re(),rP=H(),nP=Ti(),iP=new RegExp(`(?:(?:,|\\(|\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*)?(${tP.matchAnyPattern(fo.WEEKDAY_DICTIONARY)})(?:\\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)?${fo.REGEX_PARTS.rightBoundary}`,fo.REGEX_PARTS.flags),sP=1,aP=2,oP=3,bm=class extends rP.AbstractParserWithWordBoundaryChecking{innerPattern(){return iP}patternLeftBoundary(){return fo.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[aP].toLowerCase(),i=fo.WEEKDAY_DICTIONARY[n],s=t[sP],a=t[oP],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="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"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=nP.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};_m.default=bm});var P_=E(mo=>{"use strict";var uP=mo&&mo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mo,"__esModule",{value:!0});var po=Lt(),A_=We(),lP=uP(we()),cP=H(),dP=Re(),fP=new RegExp(`(\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*(${dP.matchAnyPattern(po.TIME_UNIT_DICTIONARY)})(?=\\s*)${po.REGEX_PARTS.rightBoundary}`,po.REGEX_PARTS.flags),pP=1,mP=2,vm=class extends cP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return po.REGEX_PARTS.leftBoundary}innerPattern(){return fP}innerExtract(e,t){let n=t[pP].toLowerCase(),i=t[mP].toLowerCase(),s=po.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,A_.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,A_.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=lP.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};mo.default=vm});var N_=E(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var ho=Lt(),hP=We(),gP=H(),yP=sr(),TP=new RegExp(`(\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|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${ho.TIME_UNITS_PATTERN})${ho.REGEX_PARTS.rightBoundary}`,ho.REGEX_PARTS.flags),wm=class extends gP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ho.REGEX_PARTS.leftBoundary}innerPattern(){return TP}innerExtract(e,t){let n=t[1].toLowerCase(),i=ho.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=yP.reverseTimeUnits(i);break}return hP.ParsingComponents.createRelativeFromReference(e.reference,i)}};km.default=wm});var L_=E(it=>{"use strict";var Ht=it&&it.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(it,"__esModule",{value:!0});it.createConfiguration=it.createCasualConfiguration=it.parseDate=it.parse=it.strict=it.casual=void 0;var bP=Ht(h_()),_P=Ht(__()),vP=Ht(k_()),wP=Ht(S_()),kP=Ht(O_()),EP=Ht(D_()),SP=Ht(x_()),OP=gn(),DP=Ht(R_()),xP=Ht(M_()),RP=Ht(C_()),MP=Ht(P_()),I_=Dr(),CP=Ht(bi()),AP=Ht(N_());it.casual=new I_.Chrono(F_());it.strict=new I_.Chrono(Em(!0));function PP(r,e,t){return it.casual.parse(r,e,t)}it.parse=PP;function NP(r,e,t){return it.casual.parseDate(r,e,t)}it.parseDate=NP;function F_(){let r=Em(!1);return r.parsers.unshift(new DP.default),r.parsers.unshift(new xP.default),r.parsers.unshift(new vP.default),r.parsers.unshift(new MP.default),r.parsers.unshift(new AP.default),r}it.createCasualConfiguration=F_;function Em(r=!0){return OP.includeCommonConfiguration({parsers:[new CP.default(!0),new bP.default,new _P.default,new RP.default,new wP.default(r),new kP.default],refiners:[new SP.default,new EP.default]},r)}it.createConfiguration=Em});var Ke=E(he=>{"use strict";var IP=he&&he.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),FP=he&&he.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Kn=he&&he.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&IP(e,r,t);return FP(e,r),e};Object.defineProperty(he,"__esModule",{value:!0});he.parseDate=he.parse=he.casual=he.strict=he.ru=he.zh=he.nl=he.pt=he.ja=he.fr=he.de=he.Meridiem=he.Chrono=he.en=void 0;var Sm=Kn($d());he.en=Sm;var LP=Dr();Object.defineProperty(he,"Chrono",{enumerable:!0,get:function(){return LP.Chrono}});var UP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(UP=he.Meridiem||(he.Meridiem={}));var WP=Kn(Hy());he.de=WP;var qP=Kn(vT());he.fr=qP;var $P=Kn(MT());he.ja=$P;var jP=Kn(HT());he.pt=jP;var GP=Kn(Mb());he.nl=GP;var YP=Kn(c_());he.zh=YP;var BP=Kn(L_());he.ru=BP;he.strict=Sm.strict;he.casual=Sm.casual;function HP(r,e,t){return he.casual.parse(r,e,t)}he.parse=HP;function VP(r,e,t){return he.casual.parseDate(r,e,t)}he.parseDate=VP});var $v=E((Wv,qv)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(h){return Object.prototype.toString.call(h)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(p){var h=Object.getOwnPropertyNames(p);return h.push.apply(h,Object.getOwnPropertySymbols(p)),h}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(p){p&&(this._conf=p,p.delimiter&&(this.delimiter=p.delimiter),p.maxListeners!==r&&(this._maxListeners=p.maxListeners),p.wildcard&&(this.wildcard=p.wildcard),p.newListener&&(this._newListener=p.newListener),p.removeListener&&(this._removeListener=p.removeListener),p.verboseMemoryLeak&&(this.verboseMemoryLeak=p.verboseMemoryLeak),p.ignoreErrors&&(this.ignoreErrors=p.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(p,h){var g="(node) warning: possible EventEmitter memory leak detected. "+p+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(g+=" Event name: "+h+"."),typeof process!="undefined"&&process.emitWarning){var T=new Error(g);T.name="MaxListenersExceededWarning",T.emitter=this,T.count=p,process.emitWarning(T)}else console.error(g),console.trace&&console.trace()}var m=function(p,h,g){var T=arguments.length;switch(T){case 0:return[];case 1:return[p];case 2:return[p,h];case 3:return[p,h,g];default:for(var w=new Array(T);T--;)w[T]=arguments[T];return w}};function y(p,h){for(var g={},T,w=p.length,O=h?h.length:0,M=0;M0;)p=O[v],M.call(P,p,g[p]);this._listeners={},this._listenersCount=0,x()}}});function k(p,h,g,T){var w=Object.assign({},h);if(!p)return w;if(typeof p!="object")throw TypeError("options must be an object");var O=Object.keys(p),M=O.length,P,v,x;function N(ce){throw Error('Invalid "'+P+'" option value'+(ce?". Reason: "+ce:""))}for(var ie=0;ie0;)if(P===p[v])return O;M(h)}}var S=R(["function"]),F=R(["object","function"]);function q(p,h,g){var T,w,O=0,M,P=new p(function(v,x,N){g=k(g,{timeout:0,overload:!1},{timeout:function(Ne,Ce){return Ne*=1,(typeof Ne!="number"||Ne<0||!Number.isFinite(Ne))&&Ce("timeout must be a positive number"),Ne}}),T=!g.overload&&typeof p.prototype.cancel=="function"&&typeof N=="function";function ie(){w&&(w=null),O&&(clearTimeout(O),O=0)}var ce=function(Ne){ie(),v(Ne)},me=function(Ne){ie(),x(Ne)};T?h(ce,me,N):(w=[function(Ne){me(Ne||Error("canceled"))}],h(ce,me,function(Ne){if(M)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ne!="function")throw TypeError("onCancel callback must be a function");w.push(Ne)}),M=!0),g.timeout>0&&(O=setTimeout(function(){var Ne=Error("timeout");Ne.code="ETIMEDOUT",O=0,P.cancel(Ne),x(Ne)},g.timeout))});return T||(P.cancel=function(v){if(!!w){for(var x=w.length,N=1;N0;)me=Et[P],me!=="_listeners"&&(Ge=G(p,h,g[me],T+1,w),Ge&&(ce?ce.push.apply(ce,Ge):ce=Ge));return ce}else if(Br==="**"){for(fn=T+1===w||T+2===w&&ot==="*",fn&&g._listeners&&(ce=G(p,h,g,w,w)),Et=l(g),P=Et.length;P-- >0;)me=Et[P],me!=="_listeners"&&(me==="*"||me==="**"?(g[me]._listeners&&!fn&&(Ge=G(p,h,g[me],w,w),Ge&&(ce?ce.push.apply(ce,Ge):ce=Ge)),Ge=G(p,h,g[me],T,w)):me===ot?Ge=G(p,h,g[me],T+2,w):Ge=G(p,h,g[me],T,w),Ge&&(ce?ce.push.apply(ce,Ge):ce=Ge));return ce}else g[Br]&&(ce=G(p,h,g[Br],T+1,w));if(Ne=g["*"],Ne&&G(p,h,Ne,T+1,w),Ce=g["**"],Ce)if(T0;)me=Et[P],me!=="_listeners"&&(me===ot?G(p,h,Ce[me],T+2,w):me===Br?G(p,h,Ce[me],T+1,w):(Nt={},Nt[me]=Ce[me],G(p,h,{"**":Nt},T+1,w)));else Ce._listeners?G(p,h,Ce,w,w):Ce["*"]&&Ce["*"]._listeners&&G(p,h,Ce["*"],w,w);return ce}function B(p,h,g){var T=0,w=0,O,M=this.delimiter,P=M.length,v;if(typeof p=="string")if((O=p.indexOf(M))!==-1){v=new Array(5);do v[T++]=p.slice(w,O),w=O+P;while((O=p.indexOf(M,w))!==-1);v[T++]=p.slice(w)}else v=[p],T=1;else v=p,T=p.length;if(T>1){for(O=0;O+10&&x._listeners.length>this._maxListeners&&(x._listeners.warned=!0,f.call(this,x._listeners.length,N))):x._listeners=h,!0;return!0}function ge(p,h,g,T){for(var w=l(p),O=w.length,M,P,v,x=p._listeners,N;O-- >0;)P=w[O],M=p[P],P==="_listeners"?v=g:v=g?g.concat(P):[P],N=T||typeof P=="symbol",x&&h.push(N?v:v.join(this.delimiter)),typeof M=="object"&&ge.call(this,M,h,v,N);return h}function Pe(p){for(var h=l(p),g=h.length,T,w,O;g-- >0;)w=h[g],T=p[w],T&&(O=!0,w!=="_listeners"&&!Pe(T)&&delete p[w]);return O}function j(p,h,g){this.emitter=p,this.event=h,this.listener=g}j.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function $(p,h,g){if(g===!0)w=!0;else if(g===!1)T=!0;else{if(!g||typeof g!="object")throw TypeError("options should be an object or true");var T=g.async,w=g.promisify,O=g.nextTick,M=g.objectify}if(T||O||w){var P=h,v=h._origin||h;if(O&&!i)throw Error("process.nextTick is not supported");w===r&&(w=h.constructor.name==="AsyncFunction"),h=function(){var x=arguments,N=this,ie=this.event;return w?O?Promise.resolve():new Promise(function(ce){u(ce)}).then(function(){return N.event=ie,P.apply(N,x)}):(O?process.nextTick:u)(function(){N.event=ie,P.apply(N,x)})},h._async=!0,h._origin=v}return[h,M?new j(this,p,h):this]}function D(p){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,p)}D.EventEmitter2=D,D.prototype.listenTo=function(p,h,g){if(typeof p!="object")throw TypeError("target musts be an object");var T=this;g=k(g,{on:r,off:r,reducers:r},{on:S,off:S,reducers:F});function w(O){if(typeof O!="object")throw TypeError("events must be an object");var M=g.reducers,P=ne.call(T,p),v;P===-1?v=new b(T,p,g):v=T._observers[P];for(var x=l(O),N=x.length,ie,ce=typeof M=="function",me=0;me0;)w=g[T],(!p||w._target===p)&&(w.unsubscribe(h),O=!0);return O},D.prototype.delimiter=".",D.prototype.setMaxListeners=function(p){p!==r&&(this._maxListeners=p,this._conf||(this._conf={}),this._conf.maxListeners=p)},D.prototype.getMaxListeners=function(){return this._maxListeners},D.prototype.event="",D.prototype.once=function(p,h,g){return this._once(p,h,!1,g)},D.prototype.prependOnceListener=function(p,h,g){return this._once(p,h,!0,g)},D.prototype._once=function(p,h,g,T){return this._many(p,1,h,g,T)},D.prototype.many=function(p,h,g,T){return this._many(p,h,g,!1,T)},D.prototype.prependMany=function(p,h,g,T){return this._many(p,h,g,!0,T)},D.prototype._many=function(p,h,g,T,w){var O=this;if(typeof g!="function")throw new Error("many only accepts instances of Function");function M(){return--h===0&&O.off(p,M),g.apply(this,arguments)}return M._origin=g,this._on(p,M,T,w)},D.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var p=arguments[0],h,g=this.wildcard,T,w,O,M,P;if(p==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(g&&(h=p,p!=="newListener"&&p!=="removeListener"&&typeof p=="object")){if(w=p.length,s){for(O=0;O3)for(T=new Array(v-1),M=1;M3)for(w=new Array(x-1),P=1;P0&&this._events[p].length>this._maxListeners&&(this._events[p].warned=!0,f.call(this,this._events[p].length,p))):this._events[p]=h,w)},D.prototype.off=function(p,h){if(typeof h!="function")throw new Error("removeListener only takes instances of Function");var g,T=[];if(this.wildcard){var w=typeof p=="string"?p.split(this.delimiter):p.slice();if(T=G.call(this,null,w,this.listenerTree,0),!T)return this}else{if(!this._events[p])return this;g=this._events[p],T.push({_listeners:g})}for(var O=0;O0){for(T=this._all,h=0,g=T.length;h0;)T=h[g[O]],typeof T=="function"?w.push(T):w.push.apply(w,T);return w}else{if(this.wildcard){if(M=this.listenerTree,!M)return[];var P=[],v=typeof p=="string"?p.split(this.delimiter):p.slice();return G.call(this,P,v,M,0),P}return h?(T=h[p],T?typeof T=="function"?[T]:T:[]):[]}},D.prototype.eventNames=function(p){var h=this._events;return this.wildcard?ge.call(this,this.listenerTree,[],null,p):h?l(h):[]},D.prototype.listenerCount=function(p){return this.listeners(p).length},D.prototype.hasListeners=function(p){if(this.wildcard){var h=[],g=typeof p=="string"?p.split(this.delimiter):p.slice();return G.call(this,h,g,this.listenerTree,0),h.length>0}var T=this._events,w=this._all;return!!(w&&w.length||T&&(p===r?l(T).length:T[p]))},D.prototype.listenersAny=function(){return this._all?this._all:[]},D.prototype.waitFor=function(p,h){var g=this,T=typeof h;return T==="number"?h={timeout:h}:T==="function"&&(h={filter:h}),h=k(h,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:S,Promise:_}),q(h.Promise,function(w,O,M){function P(){var v=h.filter;if(!(v&&!v.apply(g,arguments)))if(g.off(p,P),h.handleError){var x=arguments[0];x?O(x):w(m.apply(null,arguments).slice(1))}else w(m.apply(null,arguments))}M(function(){g.off(p,P)}),g._on(p,P,!1)},{timeout:h.timeout,overload:h.overload})};function Y(p,h,g){g=k(g,{Promise,timeout:0,overload:!1},{Promise:_});var T=g.Promise;return q(T,function(w,O,M){var P;if(typeof p.addEventListener=="function"){P=function(){w(m.apply(null,arguments))},M(function(){p.removeEventListener(h,P)}),p.addEventListener(h,P,{once:!0});return}var v=function(){x&&p.removeListener("error",x),w(m.apply(null,arguments))},x;h!=="error"&&(x=function(N){p.removeListener(h,v),O(N)},p.once("error",x)),M(function(){x&&p.removeListener("error",x),p.removeListener(h,v)}),p.once(h,v)},{timeout:g.timeout,overload:g.overload})}var I=D.prototype;if(Object.defineProperties(D,{defaultMaxListeners:{get:function(){return I._maxListeners},set:function(p){if(typeof p!="number"||p<0||Number.isNaN(p))throw TypeError("n must be a non-negative number");I._maxListeners=p},enumerable:!0},once:{value:Y,writable:!0,configurable:!0}}),Object.defineProperties(I,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return D});else if(typeof Wv=="object")qv.exports=D;else{var J=new Function("","return this")();J.EventEmitter2=D}})()});var Kw=E(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Vw=Symbol("MustacheDataPath");function Hw({target:r,propertyName:e}){return[...r[Vw]||[],e]}function zw(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Hw({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[Vw]=Hw({target:t,propertyName:n}),zw(i,e)):i}})}wh.default=zw});var on=E(qr=>{"use strict";qr.__esModule=!0;qr.Tokens=qr.StructuralCharacters=qr.Operators=void 0;var kF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(kF=qr.Operators||(qr.Operators={}));var EF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(EF=qr.StructuralCharacters||(qr.StructuralCharacters={}));var SF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(SF=qr.Tokens||(qr.Tokens={}))});var Rh=E(Gs=>{"use strict";Gs.__esModule=!0;Gs.VALID_TOKENS=Gs.OPERATOR_PRECEDENCE=void 0;var qe=on();Gs.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Gs.VALID_TOKENS={identifierOnly:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS},{name:qe.Tokens.OPERATOR,value:qe.Operators.NOT}],binaryOperator:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR}],binaryOperatorOrClose:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Mh=E(wt=>{"use strict";wt.__esModule=!0;wt.ESCAPE_CHARACTER=wt.EOL=wt.COMMENT_DELIMITER=wt.QUOTED_IDENTIFIER_DELIMITER=wt.SEPARATORS=wt.OPERATORS=wt.STRUCTURAL_CHARACTERS=void 0;var Ys=on();wt.STRUCTURAL_CHARACTERS={"(":Ys.StructuralCharacters.OPEN_PARENTHESIS,")":Ys.StructuralCharacters.CLOSE_PARENTHESIS};wt.OPERATORS={AND:Ys.Operators.AND,OR:Ys.Operators.OR,XOR:Ys.Operators.XOR,NOT:Ys.Operators.NOT};wt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));wt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);wt.COMMENT_DELIMITER=String.fromCodePoint(35);wt.EOL=String.fromCodePoint(10);wt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var tk=E(wr=>{"use strict";var Ch=wr&&wr.__assign||function(){return Ch=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";ql.__esModule=!0;ql.lex=void 0;var Bs=on(),Jt=Mh(),Hs=tk(),RF=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var nk=er&&er.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var un=zs&&zs.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";kt.__esModule=!0;kt.throwInvalidExpression=kt.isOperator=kt.isIdentifier=kt.notUtil=kt.xorUtil=kt.orUtil=kt.andUtil=void 0;var ok=on(),FF=function(r,e){return r&&e};kt.andUtil=FF;var LF=function(r,e){return r||e};kt.orUtil=LF;var UF=function(r,e){return r!==e};kt.xorUtil=UF;var WF=function(r){return!r};kt.notUtil=WF;var qF=function(r){var e=r.name,t=r.value;return e===ok.Tokens.IDENTIFIER&&typeof t=="string"};kt.isIdentifier=qF;var $F=function(r){var e=r.name,t=r.value;return e===ok.Tokens.OPERATOR&&typeof t=="string"};kt.isOperator=$F;var jF=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};kt.throwInvalidExpression=jF});var uk=E(Gl=>{"use strict";var Go;Gl.__esModule=!0;Gl.OPERATOR_MAP=void 0;var Ih=on(),Fh=Nh();Gl.OPERATOR_MAP=(Go={},Go[Ih.Operators.AND]=Fh.andUtil,Go[Ih.Operators.OR]=Fh.orUtil,Go[Ih.Operators.XOR]=Fh.xorUtil,Go)});var ck=E(kr=>{"use strict";var Ks=kr&&kr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var Lh=ln&&ln.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});ln.__esModule=!0;ln.parse=ln.evaluate=ln.getEvaluator=void 0;var dk=ck();Lh(ln,dk,"getEvaluator");Lh(ln,dk,"evaluate");var zF=Ph();Lh(ln,zF,"parse")});var pL={};OE(pL,{default:()=>vc});module.exports=DE(pL);var sE=require("obsidian");var ks=require("obsidian");var hL=new Error("timeout while waiting for mutex to become available"),gL=new Error("mutex already locked"),xE=new Error("request for lock canceled"),RE=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Ic=class{constructor(e,t=xE){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return RE(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},ME=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Jo=class{constructor(e){this._semaphore=new Ic(1,e)}acquire(){return ME(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var eu=require("obsidian"),ut=class{constructor(e,t={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=e,this._cachedMetadata=t;let n=t.frontmatter;if(n!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(n)),this._frontmatter.tags=(i=(0,eu.parseFrontMatterTags)(n))!=null?i:[]),Object.keys(t).length!==0){let a=(s=(0,eu.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(e){let t=this.cachedMetadata.frontmatter,n=e.cachedMetadata.frontmatter;return t===n?!0:!t||!n?!1:JSON.stringify(t)===JSON.stringify(n)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return!1;let n=this.frontmatter[t];return!(n===null||n===void 0)}property(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return null;let n=this.frontmatter[t];return n===void 0?null:Array.isArray(n)?n.filter(i=>i!==null):n}findKeyInFrontmatter(e){let t=e.toLowerCase();return Object.keys(this.frontmatter).find(n=>n.toLowerCase()===t)}};var Gt=class{},Z=Gt;Z.dateFormat="YYYY-MM-DD",Z.dateTimeFormat="YYYY-MM-DD HH:mm",Z.indentationRegex=/^([\s\t>]*)/,Z.listMarkerRegex=/([-*+]|[0-9]+\.)/,Z.checkboxRegex=/\[(.)\]/u,Z.afterCheckboxRegex=/ *(.*)/u,Z.taskRegex=new RegExp(Gt.indentationRegex.source+Gt.listMarkerRegex.source+" +"+Gt.checkboxRegex.source+Gt.afterCheckboxRegex.source,"u"),Z.nonTaskRegex=new RegExp(Gt.indentationRegex.source+Gt.listMarkerRegex.source+"? *("+Gt.checkboxRegex.source+")?"+Gt.afterCheckboxRegex.source,"u"),Z.listItemRegex=new RegExp(Gt.indentationRegex.source+Gt.listMarkerRegex.source),Z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,Z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,Z.hashTagsFromEnd=new RegExp(Gt.hashTags.source+"$");var mn=class{constructor(e,t){this.parent=null;this.children=[];this.description=e.replace(Z.listItemRegex,"").trim(),this.originalMarkdown=e,this.parent=t,t!==null&&t.children.push(this)}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}identicalTo(e){return this.constructor.name!==e.constructor.name||this.originalMarkdown!==e.originalMarkdown?!1:mn.listsAreIdentical(this.children,e.children)}static listsAreIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}};var Hu=ma(Ke());var Dt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Dt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Dt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Vt=class{static parseDate(e,t=!1){return window.moment(Hu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Vt.parseRelativeDateRange,Vt.parseNumberedDateRange,Vt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return Dt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Hu.parse(e,void 0,{forwardDate:t});if(n.length===0)return Dt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new Dt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=Dt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Dt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new Dt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return Dt.buildInvalid()}};var zP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Vu(r){for(let[e,t]of Object.entries(zP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Om=ma(Ke());function dr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?1:!r.isValid()&&e.isValid()?-1:r.isAfter(e)?1:r.isBefore(e)?-1:0:0}function KP(r,e,t=void 0){if(!e)return`no ${r} date`;let n=Om.parseDate(e,t,{forwardDate:t!=null});return n!==null?window.moment(n).format("YYYY-MM-DD"):`invalid ${r} date`}function U_(r,e,t){return KP(r,e,t?new Date:void 0)}function Si(r,e){let t=null,n=Om.parseDate(r,new Date,{forwardDate:e});return n!==null&&(t=window.moment(n)),t}var fr=class{constructor({startDate:e=null,scheduledDate:t=null,dueDate:n=null}){this.startDate=e!=null?e:null,this.scheduledDate=t!=null?t:null,this.dueDate=n!=null?n:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(e){return!(dr(this.startDate,e.startDate)!==0||dr(this.scheduledDate,e.scheduledDate)!==0||dr(this.dueDate,e.dueDate)!==0)}next(e){return this.referenceDate===null?new fr({startDate:null,scheduledDate:null,dueDate:null}):new fr({startDate:this.nextOccurrenceDate(this.startDate,e),scheduledDate:this.nextOccurrenceDate(this.scheduledDate,e),dueDate:this.nextOccurrenceDate(this.dueDate,e)})}nextOccurrenceDate(e,t){if(e===null)return null;let n=window.moment.duration(e.diff(this.referenceDate)),i=window.moment(t);return i.add(Math.round(n.asDays()),"days"),i}};var zu=["MO","TU","WE","TH","FR","SA","SU"],Ve=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(zu.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=zu[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Fe=function(r){return r!=null},zt=function(r){return typeof r=="number"},Dm=function(r){return typeof r=="string"&&zu.includes(r)},ft=Array.isArray,pr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=be(t,e/t.length)),t.slice(0,e)+String(n))}var q_=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},yt=function(r,e){var t=r%e;return t*e<0?t+e:t},Ku=function(r,e){return{div:Math.floor(r/e),mod:yt(r,e)}},Kt=function(r){return!Fe(r)||r.length===0},$e=function(r){return!Kt(r)},_e=function(r,e){return $e(r)&&r.indexOf(e)!==-1};var Zr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},QP=[31,28,31,30,31,30,31,31,30,31,30,31],G_=1e3*60*60*24,Qu=9999,Y_=Zr(1970,1,1),XP=[6,0,1,2,3,4,5];var hs=function(r){return r%4===0&&r%100!==0||r%400===0},xm=function(r){return r instanceof Date},Di=function(r){return xm(r)&&!isNaN(r.getTime())},$_=function(r){return r.getTimezoneOffset()*60*1e3},ZP=function(r,e){var t=r.getTime()-$_(r),n=e.getTime()-$_(e),i=t-n;return Math.round(i/G_)},go=function(r){return ZP(r,Y_)},Xu=function(r){return new Date(Y_.getTime()+r*G_)},JP=function(r){var e=r.getUTCMonth();return e===1&&hs(r.getUTCFullYear())?29:QP[e]},En=function(r){return XP[r.getUTCDay()]},Rm=function(r,e){var t=Zr(r,e+1,1);return[En(t),JP(t)]},Zu=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Ju=function(r){var e=new Date(r.getTime());return e},Mm=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),On=eN;var Cm=function(r,e){return Cm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Cm(r,e)};function ys(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Cm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var pt=function(){return pt=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function To(r,e){e===void 0&&(e=xi);var t={},n=new aN(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=V.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=V.WEEKLY,t.byweekday=[V.MO,V.TU,V.WE,V.TH,V.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=V.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=V.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=V.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=V.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=V.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=V.WEEKLY;var m=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[V[m]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(V[y]),n.nextSymbol()}c(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=V.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var b=o();if(!b)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(b),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),m=n.accept("the");if(!!(f||m))do{var y=l(),b=u(),k=o();if(y)b?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(V[b].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(b)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(V[b]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[V.MO,V.TU,V.WE,V.TH,V.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var _=n.acceptNumber();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(_[0],10)];n.accept("comma");){if(_=n.acceptNumber(),!_)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(_[0],10))}}else if(k)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(k);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var m=n.acceptNumber();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(m[0],10)];n.accept("comma");){if(m=n.acceptNumber(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(m[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ye;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ye||(ye={}));function bo(r){return r12){var n=Math.floor(this.month/12),i=yt(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Ku(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Kt(i)||_e(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Ku(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Kt(i)||_e(i,this.hour))&&(Kt(s)||_e(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Ku(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Kt(i)||_e(i,this.hour))&&(Kt(s)||_e(s,this.minute))&&(Kt(a)||_e(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Rm(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Qu))return;t=Rm(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ye.YEARLY:return this.addYears(s);case ye.MONTHLY:return this.addMonths(s);case ye.WEEKLY:return this.addWeekly(s,a);case ye.DAILY:return this.addDaily(s);case ye.HOURLY:return this.addHours(s,n,o);case ye.MINUTELY:return this.addMinutes(s,n,o,u);case ye.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(bs);function Pm(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||$e(e.byweekno)||$e(e.byyearday)||Boolean(e.bymonthday)||$e(e.bymonthday)||Fe(e.byweekday)||Fe(e.byeaster)))switch(e.freq){case V.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case V.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case V.WEEKLY:e.byweekday=[En(e.dtstart)];break}if(Fe(e.bymonth)&&!ft(e.bymonth)&&(e.bymonth=[e.bymonth]),Fe(e.byyearday)&&!ft(e.byyearday)&&zt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Fe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ft(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Fe(e.byweekno)&&!ft(e.byweekno)&&(e.byweekno=[e.byweekno]),!Fe(e.byweekday))e.bynweekday=null;else if(zt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Dm(e.byweekday))e.byweekday=[Ve.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Ve)!e.byweekday.n||e.freq>V.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tV.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=$e(a)?a:null,e.bynweekday=$e(o)?o:null}return Fe(e.byhour)?zt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+yt(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=yt(l,7),m=Math.floor(d+f/4),y=0;y0&&b<=m){var k=void 0;b>1?(k=c+(b-1)*7,c!==u&&(k-=7-u)):k=c;for(var _=0;_<7&&(o.wnomask[k]=1,k++,o.wdaymask[k]!==e.wkst);_++);}}if(_e(e.byweekno,1)){var k=c+m*7;if(c!==u&&(k-=7-u),k=4?(F=0,ne=q+yt(S-e.wkst,7)):ne=n-c,R=Math.floor(52+yt(ne,7)/4)}if(_e(e.byweekno,R))for(var k=0;ks)return Dn(r);if(R>=t){var S=gv(R,e);if(!r.accept(S)||o&&(--o,!o))return Dn(r)}}else for(var _=m;_s)return Dn(r);if(R>=t){var S=gv(R,e);if(!r.accept(S)||o&&(--o,!o))return Dn(r)}}}if(e.interval===0||(u.add(e,b),u.year>Qu))return Dn(r);bo(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function TN(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return $e(n)&&!_e(n,r.mmask[e])||$e(i)&&!r.wnomask[e]||$e(s)&&!_e(s,r.wdaymask[e])||$e(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!_e(r.eastermask,e)||($e(o)||$e(u))&&!_e(o,r.mdaymask[e])&&!_e(u,r.nmdaymask[e])||$e(l)&&(e=r.yearlen&&!_e(l,e+1-r.yearlen)&&!_e(l,-r.nextyearlen+e-r.yearlen))}function gv(r,e){return new Ri(r,e.tzid).rezonedDate()}function Dn(r){return r.getValue()}function bN(r,e,t,n,i){for(var s=!1,a=e;a=V.HOURLY&&$e(i)&&!_e(i,e.hour)||n>=V.MINUTELY&&$e(s)&&!_e(s,e.minute)||n>=V.SECONDLY&&$e(a)&&!_e(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var mr={MO:new Ve(0),TU:new Ve(1),WE:new Ve(2),TH:new Ve(3),FR:new Ve(4),SA:new Ve(5),SU:new Ve(6)},_o={freq:ye.YEARLY,dtstart:null,interval:1,wkst:mr.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},J_=Object.keys(_o),V=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new rv,this.origOptions=Pm(e);var n=X_(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return To(e,t)},r.fromText=function(e,t){return V_(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return el(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new Am("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new On("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!Di(e)||!Di(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new Am("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new On("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Di(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new On("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Di(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new On("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return ko(this.origOptions)},r.prototype.toText=function(e,t,n){return z_(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return K_(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ye.YEARLY,r.MONTHLY=ye.MONTHLY,r.WEEKLY=ye.WEEKLY,r.DAILY=ye.DAILY,r.HOURLY=ye.HOURLY,r.MINUTELY=ye.MINUTELY,r.SECONDLY=ye.SECONDLY,r.MO=mr.MO,r.TU=mr.TU,r.WE=mr.WE,r.TH=mr.TH,r.FR=mr.FR,r.SA=mr.SA,r.SU=mr.SU,r.parseString=wo,r.optionsToString=ko,r}();function yv(r,e,t,n,i,s){var a={},o=r.accept;function u(f,m){t.forEach(function(y){y.between(f,m,!0).forEach(function(b){a[Number(b)]=!0})})}i.forEach(function(f){var m=new Ri(f,s).rezonedDate();a[Number(m)]=!0}),r.accept=function(f){var m=Number(f);return isNaN(m)?o.call(this,f):!a[m]&&(u(new Date(m-1),new Date(m+1)),!a[m])?(a[m]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var m=Number(f);return a[m]?!0:(a[m]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var c=new Fm(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new V(Im(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new V(Im(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new V(Im(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function tl(r,e){return e===void 0&&(e={}),wN(r,kN(e))}function Im(r,e,t){return pt(pt({},r),{dtstart:e,tzid:t})}function kN(r){var e=[],t=Object.keys(r),n=Object.keys(Tv);if(t.forEach(function(i){_e(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return pt(pt({},Tv),r)}function EN(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=q_(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function SN(r){var e=EN(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function ON(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function DN(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function bv(r,e){return DN(e),r.split(",").map(function(t){return yo(t)})}function _v(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));st.isSkippingTooManyYears(e,t,s);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new V(n),window.moment.utc(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}};var _s=(m=>(m.Description="description",m.Id="id",m.DependsOn="dependsOn",m.Priority="priority",m.RecurrenceRule="recurrenceRule",m.OnCompletion="onCompletion",m.CreatedDate="createdDate",m.StartDate="startDate",m.ScheduledDate="scheduledDate",m.DueDate="dueDate",m.CancelledDate="cancelledDate",m.DoneDate="doneDate",m.BlockLink="blockLink",m))(_s||{}),rl=Object.values(_s),en=class{constructor(){this.visible={};this.tagsVisible=!0;rl.forEach(e=>{this.visible[e]=!0})}isShown(e){return this.visible[e]}areTagsShown(){return this.tagsVisible}hide(e){this.visible[e]=!1}setVisibility(e,t){this.visible[e]=t}setTagsVisibility(e){this.tagsVisible=e}get shownComponents(){return rl.filter(e=>this.visible[e])}get hiddenComponents(){return rl.filter(e=>!this.visible[e])}get toggleableComponents(){return rl.filter(e=>e!=="description"&&e!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(e=>{this.visible[e]=!this.visible[e]}),this.setTagsVisibility(!this.areTagsShown())}};var xt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(xt||{}),Qe=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};function Ev(r){let e=r.trim().toLowerCase();return e==="delete"?"delete":e==="keep"?"keep":""}function xN(r,e){return r.filter(t=>t!==e)}function RN(r,e){let t=r.status,n=e.status,i=n.type===t.type;return n.type!=="DONE"||i}function Sv(r,e){let t=e.length;if(r.onCompletion===""||r.onCompletion==="keep"||t===0)return e;let n=e[t-1];if(RN(r,n))return e;let s=r.onCompletion;return s==="delete"?xN(e,n):(console.log(`OnCompletion action ${s} not yet implemented.`),e)}var Mi=/[a-zA-Z0-9-_]+/,Lm=new RegExp(Mi.source+"( *, *"+Mi.source+" *)*"),Eo={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])\uFE0F?$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu,onCompletionRegex:/🏁 ?([a-zA-Z]+)$/iu,dependsOnRegex:new RegExp("\u26D4\uFE0F? *("+Lm.source+")$","iu"),idRegex:new RegExp("\u{1F194} *("+Mi.source+")$","iu")}};function nl(r,e,t){return t?r?" "+e:` ${e} ${t}`:""}function vs(r,e,t){return t?r?" "+e:` ${e} ${t.format(Z.dateFormat)}`:""}function Ov(){let r=[];return Object.values(Eo.prioritySymbols).forEach(e=>{e.length>0&&r.push(e)}),Object.values(Eo).forEach(e=>{typeof e=="string"&&r.push(e)}),r}var Ci=class{constructor(e){this.symbols=e}serialize(e){let t=new en,n="",i=!1;for(let s of t.shownComponents)n+=this.componentToString(e,i,s);return n}componentToString(e,t,n){var b;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:f,dependsOnSymbol:m,idSymbol:y}=this.symbols;switch(n){case"description":return e.description;case"priority":{let k="";return e.priority==="0"?k=" "+i.Highest:e.priority==="1"?k=" "+i.High:e.priority==="2"?k=" "+i.Medium:e.priority==="4"?k=" "+i.Low:e.priority==="5"&&(k=" "+i.Lowest),k}case"startDate":return vs(t,s,e.startDate);case"createdDate":return vs(t,a,e.createdDate);case"scheduledDate":return e.scheduledDateIsInferred?"":vs(t,o,e.scheduledDate);case"doneDate":return vs(t,u,e.doneDate);case"cancelledDate":return vs(t,l,e.cancelledDate);case"dueDate":return vs(t,f,e.dueDate);case"recurrenceRule":return e.recurrence?nl(t,c,e.recurrence.toText()):"";case"onCompletion":return e.onCompletion===""?"":nl(t,d,e.onCompletion);case"dependsOn":return e.dependsOn.length===0?"":nl(t,m,e.dependsOn.join(","));case"id":return nl(t,y,e.id);case"blockLink":return(b=e.blockLink)!=null?b:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c=null,d="",f=null,m="",y="",b=[],k="",_=20,R=0;do{n=!1;let S=e.match(t.priorityRegex);S!==null&&(i=this.parsePriority(S[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let F=e.match(t.doneDateRegex);F!==null&&(u=window.moment(F[1],Z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let q=e.match(t.cancelledDateRegex);q!==null&&(l=window.moment(q[1],Z.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let ne=e.match(t.dueDateRegex);ne!==null&&(o=window.moment(ne[1],Z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let G=e.match(t.scheduledDateRegex);G!==null&&(a=window.moment(G[1],Z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let B=e.match(t.startDateRegex);B!==null&&(s=window.moment(B[1],Z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ge=e.match(t.createdDateRegex);ge!==null&&(c=window.moment(ge[1],Z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let Pe=e.match(t.recurrenceRegex);Pe!==null&&(d=Pe[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let j=e.match(t.onCompletionRegex);if(j!=null){e=e.replace(t.onCompletionRegex,"").trim();let I=j[1];m=Ev(I),n=!0}let $=e.match(Z.hashTagsFromEnd);if($!=null){e=e.replace(Z.hashTagsFromEnd,"").trim(),n=!0;let I=$[0].trim();k=k.length>0?[I,k].join(" "):I}let D=e.match(t.idRegex);D!=null&&(e=e.replace(t.idRegex,"").trim(),y=D[1].trim(),n=!0);let Y=e.match(t.dependsOnRegex);Y!=null&&(e=e.replace(t.dependsOnRegex,"").trim(),b=Y[1].replace(/ /g,"").split(",").filter(I=>I!==""),n=!0),R++}while(n&&R<=_);return d.length>0&&(f=st.fromText({recurrenceRuleText:d,occurrence:new fr({startDate:s,scheduledDate:a,dueDate:o})})),k.length>0&&(e+=" "+k),{description:e,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:f,onCompletion:m,id:y,dependsOn:b,tags:ee.extractHashtags(e)}}};function Oo(r){let e="",t=!0;for(;t;)e=Math.random().toString(36).substring(2,6+2),r.includes(e)||(t=!1);return e}function il(r,e){return r.id!==""?r:new ee(de(K({},r),{id:Oo(e)}))}function Dv(r,e){let t=r;if(!r.dependsOn.includes(e.id)){let n=[...r.dependsOn,e.id];t=new ee(de(K({},r),{dependsOn:n}))}return t}function xv(r,e){let t=r;if(r.dependsOn.includes(e.id)){let n=r.dependsOn.filter(i=>i!==e.id);t=new ee(de(K({},r),{dependsOn:n}))}return t}function Zn(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Jn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Jn.instance||(Jn.instance=new Jn),Jn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(Jn.empty)}isEmpty(){return this.get()===Jn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Zn(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ve=Jn;ve.empty="";var Mv=require("obsidian");var CN=20;function Ai(r){return ve.getInstance().removeAsWordFrom(r.description)}function AN(r,e){if(r==="")return e;let t=(0,Mv.prepareSimpleSearch)(r),n=-4;return e.map(a=>{let o=t(Ai(a));return o&&o.score>n?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function sl(r,e,t,n,i){let s=AN(r,e);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(t==null?void 0:t.description)&&a.taskLocation.path===(t==null?void 0:t.taskLocation.path)&&a.originalMarkdown===(t==null?void 0:t.originalMarkdown)||(n==null?void 0:n.includes(a))||(i==null?void 0:i.includes(a)))),t&&s.sort((a,o)=>{let u=a.taskLocation.path===t.taskLocation.path,l=o.taskLocation.path===t.taskLocation.path;return u&&l?Math.abs(a.taskLocation.lineNumber-t.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-t.taskLocation.lineNumber):u?-1:l?1:0}),s.slice(0,CN)}var Um=5,PN=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=PN;function Cv(r){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&r}function Wm(r,e,t){let n=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(i,s,a,o,u,l)=>{let c=[],{postfix:d,insertSkip:f}=NN(t,i,s),m={line:i,cursorPos:s,settings:a,dataviewMode:t,postfix:d,insertSkip:f};return c=c.concat(qN(n,e,m)),c=c.concat($N(r.recurrenceSymbol,m)),Cv(u)&&(c=c.concat(GN(r.idSymbol,o,m)),c=c.concat(YN(r.dependsOnSymbol,o,m,l))),c=c.concat(jN(r.onCompletionSymbol,e,m)),c=c.concat(IN(r,u,m)),c.length>0&&!c.some(y=>y.suggestionType==="match")&&(t||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function NN(r,e,t){let n=HN(e.substring(0,t),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&e.length>t&&e.charAt(t)===n?1:0;return{postfix:i,insertSkip:s}}function IN(r,e,t){let n=[],i=t.line;Pi(n,i,r.dueDateSymbol,"due date"),Pi(n,i,r.startDateSymbol,"start date"),Pi(n,i,r.scheduledDateSymbol,"scheduled date"),FN(n,r,t),Pi(n,i,r.recurrenceSymbol,"recurring (repeat)"),LN(n,r,t),Cv(e)&&(Pi(n,i,r.idSymbol,"id"),Pi(n,i,r.dependsOnSymbol,"depends on id")),Pi(n,i,r.onCompletionSymbol,"on completion");let s=UN(n,t);return s.length===0&&t.settings.autoSuggestMinMatch===0?n:s}function Pi(r,e,t,n){e.includes(t)||r.push({displayText:`${t} ${n}`,appendText:`${t} `})}function FN(r,e,t){if(!(i=>Object.values(e.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(t.line)){let i=e.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];r.push({displayText:t.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${t.postfix}`,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}}function LN(r,e,t){if(!t.line.includes(e.createdDateSymbol)){let i=Vt.parseDate("today",!0).format(Z.dateFormat);r.push({textToMatch:`${e.createdDateSymbol} created`,displayText:`${e.createdDateSymbol} created today (${i})`,appendText:`${e.createdDateSymbol} ${i}`+t.postfix,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}function UN(r,e){let t=ws(/([a-zA-Z'_-]*)/g,e),n=[];if(t&&t.length>0){let i=t[0];if(i.length>=Math.max(1,e.settings.autoSuggestMinMatch)){let s=r.filter(a=>{var u;return((u=a.textToMatch)!=null?u:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=e.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+e.insertSkip:i.length;n.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:t.index,insertSkip:o})}}}return n}function Av(r,e){let t=`${e}`,n=`${r} ${e}`;return{displayText:t,appendText:n}}function WN(r,e){let n=`${Vt.parseDate(e,!0).format(Z.dateFormat)}`,i=`${e} (${n})`,s=`${r} ${n}`;return{displayText:i,appendText:s}}function qN(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ws(s,t);if(a&&a.length>=2){let o=a[2];if(o.length1?Vt.parseDate(Vu(o),!0):null;if(u!=null&&u.isValid()){let c=u.format(Z.dateFormat);al(t,a,[c],Av,i)}let l=qm(n,o,e,!0);al(t,a,l,WN,i)}return i}function $N(r,e){var a;let t=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],n=[],i=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),s=ws(i,e);if(s&&s.length>=2){let o=s[1],u=s[2];if(u.length0){let f=(a=st.fromText({recurrenceRuleText:u,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let m=`${o} ${f}`+e.postfix;if(n.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:m,insertAt:s.index,insertSkip:$m(s[0],e)}),s[0]==m)return[]}}let l=e.settings.autoSuggestMaxItems/2,c=qm(t,u,l,!1);c.length===0&&u.trim().length===0&&(c=t.slice(0,l)),al(e,s,c,(f,m)=>{let y=`${m}`,b=`${f} ${m}`;return{displayText:y,appendText:b}},n)}return n}function jN(r,e,t){let n=["delete","keep"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ws(s,t);if(a&&a.length>=2){let o=a[2];if(o.lengtho.id));n.push({suggestionType:"match",displayText:"generate unique id",appendText:`${r} ${a}`+t.postfix,insertAt:s.index,insertSkip:$m(s[0],t)})}return n}function YN(r,e,t,n){let i=[],s=t.dataviewMode?Zn("()[]"):Ov(),a=new RegExp(`(${r})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=ws(a,t);if(o&&o.length>=1){let u=o[2]||"",l=o[3],c=[];if(u){let d=u.split(",").map(f=>f.trim());c=e.filter(f=>f.id&&d.includes(f.id))}if(l.length>=t.settings.autoSuggestMinMatch){let d=sl(l.trim(),e,n,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${r}${u}`,insertAt:o.index,insertSkip:r.length+u.length+l.length,taskItDependsOn:f})}}return i}function qm(r,e,t,n){let s=r.filter(a=>e&&e.length>=1&&a.toLowerCase().includes(e.toLowerCase())).slice(0,t);return n&&s.length===0&&(s=r.slice(0,t)),s}function al(r,e,t,n,i){let s=e[1];for(let a of t){let{displayText:o,appendText:u}=n(s,a);i.push({suggestionType:"match",displayText:o,appendText:u+r.postfix,insertAt:e.index,insertSkip:$m(e[0],r)})}}function ws(r,e){let t=e.line.matchAll(r),n=e.cursorPos;for(let i of t)if((i==null?void 0:i.index)&&i.index[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function HN(r,e){if(e.length===0)return null;let t=Object.fromEntries(e.map(([s,a])=>[s,0])),n=Object.fromEntries(e.map(([s,a])=>[a,s])),i=[];for(let s=0;s=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==n[a]){i.splice(o,1);break}}t[n[a]]=Math.max(0,t[n[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function Pv(r,e){return(t,n,i,s,a)=>BN(t.slice(0,n),e)?r(t,n,i,s,a):[]}function Nv(r,e,t){let n=ve.getInstance().includedIn(r),i=VN(t,e,n);return typeof i=="boolean"?i:n&&zN(r,e.ch)}function VN(r,e,t){var n,i;return(i=(n=r==null?void 0:r.editorComponent)==null?void 0:n.showTasksPluginAutoSuggest)==null?void 0:i.call(n,e,r,t)}function zN(r,e){if(r.length===0)return!1;let t=ee.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}function $m(r,e){return e.dataviewMode?r.length+e.insertSkip:r.length}function Pr(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var jm={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Pr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Pr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Pr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Pr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Pr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Pr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Pr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Pr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:Pr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:Pr(new RegExp("dependsOn:: *("+Lm.source+")")),idRegex:Pr(new RegExp("id:: *("+Mi.source+")"))}},ol=class extends Ci{constructor(){super(jm)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n),s=["blockLink","description"];return i!==""&&!s.includes(n)?` [${i.trim()}]`:i}};var hr=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return xt[e]||"TODO"}static createUnknownStatus(e){return new hr(new Qe(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=hr.getTypeFromStatusTypeString(e[3]);return new hr(new Qe(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return hr.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},re=hr;re.DONE=new hr(new Qe("x","Done"," ",!0,"DONE")),re.EMPTY=new hr(new Qe("","EMPTY","",!0,"EMPTY")),re.TODO=new hr(new Qe(" ","Todo","x",!0,"TODO")),re.CANCELLED=new hr(new Qe("-","Cancelled"," ",!0,"CANCELLED")),re.IN_PROGRESS=new hr(new Qe("/","In Progress","x",!0,"IN_PROGRESS")),re.NON_TASK=new hr(new Qe("Q","Non-Task","A",!0,"NON_TASK"));var ul=class{constructor(e=!1,t=!1,n=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t,this.recordTimings=n}};var Le=class{constructor(){this.coreStatuses=[re.TODO.configuration,re.DONE.configuration],this.customStatuses=[re.IN_PROGRESS.configuration,re.CANCELLED.configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new re(e);return t.findIndex(i=>new re(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Le.deleteAllCustomStatuses(e),new Le().customStatuses.forEach(n=>{Le.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Le.addStatus(e.customStatuses,re.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Le.allStatuses(e).forEach(n=>{t.add(n)})}};var Iv=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var xn=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return Iv.forEach(t=>{e=[...e,new xn(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return xn.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of xn.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Nr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Ci(Eo),buildSuggestions:Wm(Eo,Um,!1)},dataview:{displayName:"Dataview",taskSerializer:new ol,buildSuggestions:Pv(Wm(jm,Um,!0),[["(",")"],["[","]"]])}},Ym={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Le,features:xn.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new ul,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},Rn=K({},Ym);function Gm(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var Q=()=>(Gm(xn.settingsFlags,Rn.features),Gm(Ym.loggingOptions.minLevels,Rn.loggingOptions.minLevels),Gm(Ym.debugSettings,Rn.debugSettings),Rn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=re.getTypeFromStatusTypeString(r.type);t[e]=new Qe((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),K({},Rn)),ze=r=>(Rn=K(K({},Rn),r),Q());var Ni=(r,e)=>(Rn.generalSettings[r]=e,Q()),Fv=r=>{var e;return(e=Rn.features[r])!=null?e:!1};function Do(){return Nr[Q().taskFormat]}function ll(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function Lv(r){let e=[...r],t="";return e.forEach(n=>{t+=ll(n)}),t}var De=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==re.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof re?this._registeredStatuses.push(e):this._registeredStatuses.push(new re(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):re.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):re.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:re.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return re.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:re.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let i=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let i=0;i!this.hasSymbol(s.symbol)),n=new De,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=De.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Qe(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new re(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[re.TODO,re.IN_PROGRESS,re.DONE,re.CANCELLED].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,s,o,!0)}}),` +"use strict";var rD=Object.create;var ao=Object.defineProperty,nD=Object.defineProperties,iD=Object.getOwnPropertyDescriptor,sD=Object.getOwnPropertyDescriptors,aD=Object.getOwnPropertyNames,Bu=Object.getOwnPropertySymbols,oD=Object.getPrototypeOf,Md=Object.prototype.hasOwnProperty,Qg=Object.prototype.propertyIsEnumerable;var Kg=(r,t,e)=>t in r?ao(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ne=(r,t)=>{for(var e in t||(t={}))Md.call(t,e)&&Kg(r,e,t[e]);if(Bu)for(var e of Bu(t))Qg.call(t,e)&&Kg(r,e,t[e]);return r},Ee=(r,t)=>nD(r,sD(t));var Vu=(r,t)=>{var e={};for(var n in r)Md.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Bu)for(var n of Bu(r))t.indexOf(n)<0&&Qg.call(r,n)&&(e[n]=r[n]);return e};var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),uD=(r,t)=>{for(var e in t)ao(r,e,{get:t[e],enumerable:!0})},Xg=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aD(t))!Md.call(r,i)&&i!==e&&ao(r,i,{get:()=>t[i],enumerable:!(n=iD(t,i))||n.enumerable});return r};var oo=(r,t,e)=>(e=r!=null?rD(oD(r)):{},Xg(t||!r||!r.__esModule?ao(e,"default",{value:r,enumerable:!0}):e,r)),lD=r=>Xg(ao({},"__esModule",{value:!0}),r);var F=(r,t,e)=>new Promise((n,i)=>{var s=u=>{try{o(e.next(u))}catch(l){i(l)}},a=u=>{try{o(e.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((e=e.apply(r,t)).next())});var Be=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.matchAnyPattern=yi.extractTerms=yi.repeatedTimeunitPattern=void 0;function pD(r,t){let e=t.replace(/\((?!\?)/g,"(?:");return`${r}${e}\\s{0,5}(?:,?\\s{0,5}${e}){0,10}`}yi.repeatedTimeunitPattern=pD;function Zg(r){let t;return r instanceof Array?t=[...r]:r instanceof Map?t=Array.from(r.keys()):t=Object.keys(r),t}yi.extractTerms=Zg;function mD(r){return`(?:${Zg(r).sort((e,n)=>n.length-e.length).join("|").replace(/\./g,"\\.")})`}yi.matchAnyPattern=mD});var Ie=S((Rd,Ad)=>{(function(r,t){typeof Rd=="object"&&typeof Ad!="undefined"?Ad.exports=t():typeof define=="function"&&define.amd?define(t):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=t()})(Rd,function(){"use strict";var r=1e3,t=6e4,e=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,_={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("_")},x=function(Q,B,C){var Z=String(Q);return!Z||Z.length>=B?Q:""+Array(B+1-Z.length).join(C)+Q},O={s:x,z:function(Q){var B=-Q.utcOffset(),C=Math.abs(B),Z=Math.floor(C/60),W=C%60;return(B<=0?"+":"-")+x(Z,2,"0")+":"+x(W,2,"0")},m:function Q(B,C){if(B.date(){"use strict";var hD=bi&&bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bi,"__esModule",{value:!0});bi.findYearClosestToRef=bi.findMostLikelyADYear=void 0;var gD=hD(Ie());function yD(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}bi.findMostLikelyADYear=yD;function bD(r,t,e){let n=gD.default(r),i=n;i=i.month(e-1),i=i.date(t),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.parseTimeUnits=De.TIME_UNITS_PATTERN=De.parseYear=De.YEAR_PATTERN=De.parseOrdinalNumberPattern=De.ORDINAL_NUMBER_PATTERN=De.parseNumberPattern=De.NUMBER_PATTERN=De.TIME_UNIT_DICTIONARY=De.ORDINAL_WORD_DICTIONARY=De.INTEGER_WORD_DICTIONARY=De.MONTH_DICTIONARY=De.FULL_MONTH_NAME_DICTIONARY=De.WEEKDAY_DICTIONARY=void 0;var Qu=Be(),TD=Dt();De.WEEKDAY_DICTIONARY={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};De.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};De.MONTH_DICTIONARY=Object.assign(Object.assign({},De.FULL_MONTH_NAME_DICTIONARY),{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});De.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};De.ORDINAL_WORD_DICTIONARY={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};De.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};De.NUMBER_PATTERN=`(?:${Qu.matchAnyPattern(De.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function ey(r){let t=r.toLowerCase();return De.INTEGER_WORD_DICTIONARY[t]!==void 0?De.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}De.parseNumberPattern=ey;De.ORDINAL_NUMBER_PATTERN=`(?:${Qu.matchAnyPattern(De.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function _D(r){let t=r.toLowerCase();return De.ORDINAL_WORD_DICTIONARY[t]!==void 0?De.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}De.parseOrdinalNumberPattern=_D;De.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function vD(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let t=parseInt(r);return TD.findMostLikelyADYear(t)}De.parseYear=vD;var ty=`(${De.NUMBER_PATTERN})\\s{0,3}(${Qu.matchAnyPattern(De.TIME_UNIT_DICTIONARY)})`,Jg=new RegExp(ty,"i");De.TIME_UNITS_PATTERN=Qu.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",ty);function wD(r){let t={},e=r,n=Jg.exec(e);for(;n;)kD(t,n),e=e.substring(n[0].length).trim(),n=Jg.exec(e);return t}De.parseTimeUnits=wD;function kD(r,t){let e=ey(t[1]),n=De.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];r[n]=e}});var ry=S((Pd,Nd)=>{(function(r,t){typeof Pd=="object"&&typeof Nd!="undefined"?Nd.exports=t():typeof define=="function"&&define.amd?define(t):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=t()})(Pd,function(){"use strict";var r="month",t="quarter";return function(e,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===t?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===t){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Rr=S(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.implySimilarTime=wn.assignSimilarTime=wn.assignSimilarDate=wn.assignTheNextDay=void 0;var ny=dt();function ED(r,t){t=t.add(1,"day"),iy(r,t),sy(r,t)}wn.assignTheNextDay=ED;function iy(r,t){r.assign("day",t.date()),r.assign("month",t.month()+1),r.assign("year",t.year())}wn.assignSimilarDate=iy;function DD(r,t){r.assign("hour",t.hour()),r.assign("minute",t.minute()),r.assign("second",t.second()),r.assign("millisecond",t.millisecond()),r.get("hour")<12?r.assign("meridiem",ny.Meridiem.AM):r.assign("meridiem",ny.Meridiem.PM)}wn.assignSimilarTime=DD;function sy(r,t){r.imply("hour",t.hour()),r.imply("minute",t.minute()),r.imply("second",t.second()),r.imply("millisecond",t.millisecond())}wn.implySimilarTime=sy});var ay=S(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.toTimezoneOffset=Ki.TIMEZONE_ABBR_MAP=void 0;Ki.TIMEZONE_ABBR_MAP={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:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,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:-300,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,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:-480,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 SD(r){var t;return r==null?null:typeof r=="number"?r:(t=Ki.TIMEZONE_ABBR_MAP[r])!==null&&t!==void 0?t:null}Ki.toTimezoneOffset=SD});var Je=S(kn=>{"use strict";var oy=kn&&kn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kn,"__esModule",{value:!0});kn.ParsingResult=kn.ParsingComponents=kn.ReferenceWithTimezone=void 0;var OD=oy(ry()),Xu=oy(Ie()),Id=Rr(),xD=ay();Xu.default.extend(OD.default);var Fd=class{constructor(t){var e;t=t!=null?t:new Date,t instanceof Date?this.instant=t:(this.instant=(e=t.instant)!==null&&e!==void 0?e:new Date,this.timezoneOffset=xD.toTimezoneOffset(t.timezone))}};kn.ReferenceWithTimezone=Fd;var Qi=class{constructor(t,e){if(this.reference=t,this.knownValues={},this.impliedValues={},e)for(let i in e)this.knownValues[i]=e[i];let n=Xu.default(t.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),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 Qi(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")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&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 {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Xu.default(this.date())}date(){let t=this.dateWithoutTimezoneAdjustment();return new Date(t.getTime()+this.getSystemTimezoneAdjustmentMinute(t)*6e4)}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}getSystemTimezoneAdjustmentMinute(t){var e,n;(!t||t.getTime()<0)&&(t=new Date);let i=-t.getTimezoneOffset(),s=(n=(e=this.get("timezoneOffset"))!==null&&e!==void 0?e:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(t,e){let n=Xu.default(t.instant);for(let s in e)n=n.add(e[s],s);let i=new Qi(t);return e.hour||e.minute||e.second?(Id.assignSimilarTime(i,n),Id.assignSimilarDate(i,n),t.timezoneOffset!==null&&i.assign("timezoneOffset",-t.instant.getTimezoneOffset())):(Id.implySimilarTime(i,n),t.timezoneOffset!==null&&i.imply("timezoneOffset",-t.instant.getTimezoneOffset()),e.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(e.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),e.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),e.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};kn.ParsingComponents=Qi;var uo=class{constructor(t,e,n,i,s){this.reference=t,this.refDate=t.instant,this.index=e,this.text=n,this.start=i||new Qi(t),this.end=s}clone(){let t=new uo(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()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};kn.ParsingResult=uo});var ee=S(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractParserWithWordBoundaryChecking=void 0;var Ld=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(t){let e=this.innerPattern(t);return e==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${e.source}`,e.flags),this.cachedInnerPattern=e,this.cachedPattern)}extract(t,e){var n;let i=(n=e[1])!==null&&n!==void 0?n:"";e.index=e.index+i.length,e[0]=e[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Wd=St(),MD=Je(),CD=ee(),RD=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Wd.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),AD=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Wd.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ud=class extends CD.AbstractParserWithWordBoundaryChecking{innerPattern(t){return t.option.forwardDate?AD:RD}innerExtract(t,e){let n=Wd.parseTimeUnits(e[1]);return MD.ParsingComponents.createRelativeFromReference(t.reference,n)}};qd.default=Ud});var my=S(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var PD=Dt(),fy=St(),py=St(),Ju=St(),ND=Be(),ID=ee(),FD=new RegExp(`(?:on\\s{0,3})?(${Ju.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ju.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${ND.matchAnyPattern(fy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${py.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ly=1,cy=2,LD=3,dy=4,jd=class extends ID.AbstractParserWithWordBoundaryChecking{innerPattern(){return FD}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=fy.MONTH_DICTIONARY[e[LD].toLowerCase()],s=Ju.parseOrdinalNumberPattern(e[ly]);if(s>31)return e.index=e.index+e[ly].length,null;if(n.start.assign("month",i),n.start.assign("day",s),e[dy]){let a=py.parseYear(e[dy]);n.start.assign("year",a)}else{let a=PD.findYearClosestToRef(t.refDate,s,i);n.start.imply("year",a)}if(e[cy]){let a=Ju.parseOrdinalNumberPattern(e[cy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Yd.default=jd});var Ty=S(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var UD=Dt(),yy=St(),el=St(),by=St(),WD=Be(),qD=ee(),jD=new RegExp(`(${WD.matchAnyPattern(yy.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${el.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${el.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${by.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),YD=1,$D=2,hy=3,gy=4,$d=class extends qD.AbstractParserWithWordBoundaryChecking{innerPattern(){return jD}innerExtract(t,e){let n=yy.MONTH_DICTIONARY[e[YD].toLowerCase()],i=el.parseOrdinalNumberPattern(e[$D]);if(i>31)return null;let s=t.createParsingComponents({day:i,month:n});if(e[gy]){let u=by.parseYear(e[gy]);s.assign("year",u)}else{let u=UD.findYearClosestToRef(t.refDate,i,n);s.imply("year",u)}if(!e[hy])return s;let a=el.parseOrdinalNumberPattern(e[hy]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Gd.default=$d});var wy=S(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var Hd=St(),GD=Dt(),HD=Be(),vy=St(),BD=ee(),VD=new RegExp(`((?:in)\\s*)?(${HD.matchAnyPattern(Hd.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${vy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),zD=1,KD=2,_y=3,Bd=class extends BD.AbstractParserWithWordBoundaryChecking{innerPattern(){return VD}innerExtract(t,e){let n=e[KD].toLowerCase();if(e[0].length<=3&&!Hd.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=t.createParsingResult(e.index+(e[zD]||"").length,e.index+e[0].length);i.start.imply("day",1);let s=Hd.MONTH_DICTIONARY[n];if(i.start.assign("month",s),e[_y]){let a=vy.parseYear(e[_y]);i.start.assign("year",a)}else{let a=GD.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};Vd.default=Bd});var Dy=S(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var Ey=St(),QD=Be(),XD=ee(),ZD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${QD.matchAnyPattern(Ey.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),JD=1,eS=2,ky=3,tS=4,zd=class extends XD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZD}innerExtract(t,e){let n=e[ky]?parseInt(e[ky]):Ey.MONTH_DICTIONARY[e[eS].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(e[JD]);return{day:parseInt(e[tS]),month:n,year:i}}};Kd.default=zd});var Sy=S(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});var rS=ee(),nS=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),iS=1,sS=2,Qd=class extends rS.AbstractParserWithWordBoundaryChecking{innerPattern(){return nS}innerExtract(t,e){let n=parseInt(e[sS]),i=parseInt(e[iS]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Xd.default=Qd});var Xi=S(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.AbstractTimeExpressionParser=void 0;var Bt=dt();function aS(r,t,e,n){return new RegExp(`${r}${t}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,n)}function oS(r,t){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}var Oy=2,Us=3,tl=4,rl=5,lo=6,Zd=class{constructor(t=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,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 n=this.extractPrimaryTimeComponents(t,e);if(!n)return e.index+=e[0].length,null;let i=e.index+e[1].length,s=e[0].substring(e[1].length),a=t.createParsingResult(i,s,n);e.index+=e[0].length;let o=t.text.substring(e.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(t,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(t,e,n=!1){let i=t.createParsingComponents(),s=0,a=null,o=parseInt(e[Oy]);if(o>100){if(this.strictMode||e[Us]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(e[Us]!=null){if(e[Us].length==1&&!e[lo])return null;s=parseInt(e[Us])}if(s>=60)return null;if(o>12&&(a=Bt.Meridiem.PM),e[lo]!=null){if(o>12)return null;let u=e[lo][0].toLowerCase();u=="a"&&(a=Bt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Bt.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",Bt.Meridiem.AM):i.imply("meridiem",Bt.Meridiem.PM),e[rl]!=null){let u=parseInt(e[rl].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(e[tl]!=null){let u=parseInt(e[tl]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(t,e,n){let i=t.createParsingComponents();if(e[rl]!=null){let u=parseInt(e[rl].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(e[tl]!=null){let u=parseInt(e[tl]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(e[Oy]),a=0,o=-1;if(e[Us]!=null?a=parseInt(e[Us]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Bt.Meridiem.PM),e[lo]!=null){if(s>12)return null;let u=e[lo][0].toLowerCase();u=="a"&&(o=Bt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Bt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Bt.Meridiem.AM?(n.start.imply("meridiem",Bt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Bt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",Bt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Bt.Meridiem.PM)):s>12?i.imply("meridiem",Bt.Meridiem.PM):s<=12&&i.imply("meridiem",Bt.Meridiem.AM),i.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 n=e[1],i=e[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return t}getPrimaryTimePatternThroughCache(){let t=this.primaryPrefix(),e=this.primarySuffix();return this.cachedPrimaryPrefix===t&&this.cachedPrimarySuffix===e?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=aS(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=oS(t,e),this.cachedFollowingPhase=t,this.cachedFollowingSuffix=e,this.cachedFollowingTimePatten)}};nl.AbstractTimeExpressionParser=Zd});var xy=S(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var il=dt(),uS=Xi(),Jd=class extends uS.AbstractTimeExpressionParser{constructor(t){super(t)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\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 n=super.extractPrimaryTimeComponents(t,e);if(n){if(e[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",il.Meridiem.PM)):i<6&&n.assign("meridiem",il.Meridiem.AM)}if(e[0].endsWith("afternoon")){n.assign("meridiem",il.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}e[0].endsWith("morning")&&(n.assign("meridiem",il.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};ef.default=Jd});var Ar=S(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.addImpliedTimeUnits=Ws.reverseTimeUnits=void 0;function lS(r){let t={};for(let e in r)t[e]=-r[e];return t}Ws.reverseTimeUnits=lS;function cS(r,t){let e=r.clone(),n=r.dayjs();for(let i in t)n=n.add(t[i],i);return("day"in t||"d"in t||"week"in t||"month"in t||"year"in t)&&(e.imply("day",n.date()),e.imply("month",n.month()+1),e.imply("year",n.year())),("second"in t||"minute"in t||"hour"in t)&&(e.imply("second",n.second()),e.imply("minute",n.minute()),e.imply("hour",n.hour())),e}Ws.addImpliedTimeUnits=cS});var My=S(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var rf=St(),dS=Je(),fS=ee(),pS=Ar(),mS=new RegExp(`(${rf.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),hS=new RegExp(`(${rf.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),tf=class extends fS.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?hS:mS}innerExtract(t,e){let n=rf.parseTimeUnits(e[1]),i=pS.reverseTimeUnits(n);return dS.ParsingComponents.createRelativeFromReference(t.reference,i)}};nf.default=tf});var Cy=S(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var af=St(),gS=Je(),yS=ee(),bS=new RegExp(`(${af.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),TS=new RegExp("("+af.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),_S=1,sf=class extends yS.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?TS:bS}innerExtract(t,e){let n=af.parseTimeUnits(e[_S]);return gS.ParsingComponents.createRelativeFromReference(t.reference,n)}};of.default=sf});var js=S(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.MergingRefiner=qs.Filter=void 0;var uf=class{refine(t,e){return e.filter(n=>this.isValid(t,n))}};qs.Filter=uf;var lf=class{refine(t,e){if(e.length<2)return e;let n=[],i=e[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};qs.MergingRefiner=lf});var En=S(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var vS=js(),cf=class extends vS.MergingRefiner{shouldMergeResults(t,e,n){return!e.end&&!n.end&&t.match(this.patternBetween())!=null}mergeResults(t,e,n){if(!e.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{e.start.isCertain(s)||e.start.assign(s,n.start.get(s))}),e.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,e.start.get(s))})),e.start.date().getTime()>n.start.date().getTime()){let s=e.start.dayjs(),a=n.start.dayjs();e.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),e.start.imply("day",s.date()),e.start.imply("month",s.month()+1),e.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,e]=[e,n]}let i=e.clone();return i.start=e.start,i.end=n.start,i.index=Math.min(e.index,n.index),e.index{"use strict";var wS=co&&co.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(co,"__esModule",{value:!0});var kS=wS(En()),ff=class extends kS.default{patternBetween(){return/^\s*(to|-)\s*$/i}};co.default=ff});var Ay=S(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.mergeDateTimeComponent=Ys.mergeDateTimeResult=void 0;var ES=dt();function DS(r,t){let e=r.clone(),n=r.start,i=t.start;if(e.start=pf(n,i),r.end!=null||t.end!=null){let s=r.end==null?r.start:r.end,a=t.end==null?t.start:t.end,o=pf(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var SS=js(),Py=Ay(),mf=class extends SS.MergingRefiner{shouldMergeResults(t,e,n){return(e.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&e.start.isOnlyTime())&&t.match(this.patternBetween())!=null}mergeResults(t,e,n){let i=e.start.isOnlyDate()?Py.mergeDateTimeResult(e,n):Py.mergeDateTimeResult(n,e);return i.index=e.index,i.text=e.text+t+n.text,i}};hf.default=mf});var Ny=S(fo=>{"use strict";var OS=fo&&fo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fo,"__esModule",{value:!0});var xS=OS(Yn()),gf=class extends xS.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};fo.default=gf});var Iy=S(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var MS=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),CS={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:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,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:-300,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:240,MST:-420,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:-480,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},yf=class{constructor(t){this.timezone=Object.assign(Object.assign({},CS),t)}refine(t,e){var n;let i=(n=t.option.timezones)!==null&&n!==void 0?n:{};return e.forEach(s=>{var a,o;let u=t.text.substring(s.index+s.text.length),l=MS.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;t.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),e}};bf.default=yf});var sl=S(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var RS=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),AS=1,PS=2,NS=3,Tf=class{refine(t,e){return e.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=t.text.substring(n.index+n.text.length),s=RS.exec(i);if(!s)return;t.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[PS]),o=parseInt(s[NS]||"0"),u=a*60+o;u>14*60||(s[AS]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),e}};_f.default=Tf});var Fy=S(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var vf=class{refine(t,e){if(e.length<2)return e;let n=[],i=e[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};wf.default=vf});var Ly=S(po=>{"use strict";var IS=po&&po.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(po,"__esModule",{value:!0});var FS=IS(Ie()),kf=class{refine(t,e){return t.option.forwardDate&&e.forEach(function(n){let i=FS.default(t.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),e}};po.default=kf});var Uy=S(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var LS=js(),Ef=class extends LS.Filter{constructor(t){super(),this.strictMode=t}isValid(t,e){return e.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${e.text}'`)}),!1):e.start.isValidDate()?e.end&&!e.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,e):!0:(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.start})`)}),!1)}isStrictModeValid(t,e){return e.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${e} (${e.end})`)}),!1):e.start.isOnlyTime()&&(!e.start.isCertain("hour")||!e.start.isCertain("minute"))?(t.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${e} (${e.end})`)}),!1):!0}};Df.default=Ef});var xf=S(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var US=ee(),WS=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"),qS=1,jS=2,YS=3,Wy=4,$S=5,qy=6,jy=7,Yy=8,$y=9,Sf=class extends US.AbstractParserWithWordBoundaryChecking{innerPattern(){return WS}innerExtract(t,e){let n={};if(n.year=parseInt(e[qS]),n.month=parseInt(e[jS]),n.day=parseInt(e[YS]),e[Wy]!=null)if(n.hour=parseInt(e[Wy]),n.minute=parseInt(e[$S]),e[qy]!=null&&(n.second=parseInt(e[qy])),e[jy]!=null&&(n.millisecond=parseInt(e[jy])),e[Yy]==null)n.timezoneOffset=0;else{let i=parseInt(e[Yy]),s=0;e[$y]!=null&&(s=parseInt(e[$y]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Of.default=Sf});var Gy=S(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var GS=js(),Mf=class extends GS.MergingRefiner{mergeResults(t,e,n){let i=n.clone();return i.index=e.index,i.text=e.text+t+i.text,i.start.assign("weekday",e.start.get("weekday")),i.end&&i.end.assign("weekday",e.start.get("weekday")),i}shouldMergeResults(t,e,n){return e.start.isOnlyWeekdayComponent()&&!e.start.isCertain("hour")&&n.start.isCertain("day")&&t.match(/^,?\s*$/)!=null}};Cf.default=Mf});var $n=S($s=>{"use strict";var Zi=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});$s.includeCommonConfiguration=void 0;var HS=Zi(Iy()),BS=Zi(sl()),Hy=Zi(Fy()),VS=Zi(Ly()),zS=Zi(Uy()),KS=Zi(xf()),QS=Zi(Gy());function XS(r,t=!1){return r.parsers.unshift(new KS.default),r.refiners.unshift(new QS.default),r.refiners.unshift(new HS.default),r.refiners.unshift(new BS.default),r.refiners.unshift(new Hy.default),r.refiners.push(new Hy.default),r.refiners.push(new VS.default),r.refiners.push(new zS.default(t)),r}$s.includeCommonConfiguration=XS});var Hn=S(Ye=>{"use strict";var ZS=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.noon=Ye.morning=Ye.midnight=Ye.yesterdayEvening=Ye.evening=Ye.lastNight=Ye.tonight=Ye.theDayAfter=Ye.tomorrow=Ye.theDayBefore=Ye.yesterday=Ye.today=Ye.now=void 0;var Dn=Je(),Gs=ZS(Ie()),Gn=Rr(),mo=dt();function JS(r){let t=Gs.default(r.instant),e=new Dn.ParsingComponents(r,{});return Gn.assignSimilarDate(e,t),Gn.assignSimilarTime(e,t),r.timezoneOffset!==null&&e.assign("timezoneOffset",t.utcOffset()),e}Ye.now=JS;function e0(r){let t=Gs.default(r.instant),e=new Dn.ParsingComponents(r,{});return Gn.assignSimilarDate(e,t),Gn.implySimilarTime(e,t),e}Ye.today=e0;function t0(r){return By(r,1)}Ye.yesterday=t0;function By(r,t){return Rf(r,-t)}Ye.theDayBefore=By;function r0(r){return Rf(r,1)}Ye.tomorrow=r0;function Rf(r,t){let e=Gs.default(r.instant),n=new Dn.ParsingComponents(r,{});return e=e.add(t,"day"),Gn.assignSimilarDate(n,e),Gn.implySimilarTime(n,e),n}Ye.theDayAfter=Rf;function n0(r,t=22){let e=Gs.default(r.instant),n=new Dn.ParsingComponents(r,{});return n.imply("hour",t),n.imply("meridiem",mo.Meridiem.PM),Gn.assignSimilarDate(n,e),n}Ye.tonight=n0;function i0(r,t=0){let e=Gs.default(r.instant),n=new Dn.ParsingComponents(r,{});return e.hour()<6&&(e=e.add(-1,"day")),Gn.assignSimilarDate(n,e),n.imply("hour",t),n}Ye.lastNight=i0;function s0(r,t=20){let e=new Dn.ParsingComponents(r,{});return e.imply("meridiem",mo.Meridiem.PM),e.imply("hour",t),e}Ye.evening=s0;function a0(r,t=20){let e=Gs.default(r.instant),n=new Dn.ParsingComponents(r,{});return e=e.add(-1,"day"),Gn.assignSimilarDate(n,e),n.imply("hour",t),n.imply("meridiem",mo.Meridiem.PM),n}Ye.yesterdayEvening=a0;function o0(r){let t=new Dn.ParsingComponents(r,{});return t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t}Ye.midnight=o0;function u0(r,t=6){let e=new Dn.ParsingComponents(r,{});return e.imply("meridiem",mo.Meridiem.AM),e.imply("hour",t),e}Ye.morning=u0;function l0(r){let t=new Dn.ParsingComponents(r,{});return t.imply("meridiem",mo.Meridiem.AM),t.imply("hour",12),t}Ye.noon=l0});var Vy=S(tn=>{"use strict";var c0=tn&&tn.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),d0=tn&&tn.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),f0=tn&&tn.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&c0(t,r,e);return d0(t,r),t},p0=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tn,"__esModule",{value:!0});var m0=p0(Ie()),h0=ee(),g0=Rr(),ho=f0(Hn()),y0=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Af=class extends h0.AbstractParserWithWordBoundaryChecking{innerPattern(t){return y0}innerExtract(t,e){let n=m0.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"now":return ho.now(t.reference);case"today":return ho.today(t.reference);case"yesterday":return ho.yesterday(t.reference);case"tomorrow":case"tmr":case"tmrw":return ho.tomorrow(t.reference);case"tonight":return ho.tonight(t.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),g0.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};tn.default=Af});var zy=S(go=>{"use strict";var b0=go&&go.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(go,"__esModule",{value:!0});var al=dt(),T0=ee(),_0=b0(Ie()),v0=Rr(),w0=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Pf=class extends T0.AbstractParserWithWordBoundaryChecking{innerPattern(){return w0}innerExtract(t,e){let n=_0.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"afternoon":i.imply("meridiem",al.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",al.Meridiem.PM),i.imply("hour",20);break;case"midnight":v0.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",al.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",al.Meridiem.AM),i.imply("hour",12);break}return i}};go.default=Pf});var Ji=S(Ti=>{"use strict";var k0=Ti&&Ti.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.toDayJSClosestWeekday=Ti.toDayJSWeekday=void 0;var Ky=k0(Ie());function E0(r,t,e){if(!e)return Qy(r,t);let n=Ky.default(r);switch(e){case"this":n=n.day(t);break;case"next":n=n.day(t+7);break;case"last":n=n.day(t-7);break}return n}Ti.toDayJSWeekday=E0;function Qy(r,t){let e=Ky.default(r),n=e.day();return Math.abs(t-7-n){"use strict";Object.defineProperty(If,"__esModule",{value:!0});var Xy=St(),D0=Be(),S0=ee(),O0=Ji(),x0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${D0.matchAnyPattern(Xy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),M0=1,C0=2,R0=3,Nf=class extends S0.AbstractParserWithWordBoundaryChecking{innerPattern(){return x0}innerExtract(t,e){let n=e[C0].toLowerCase(),i=Xy.WEEKDAY_DICTIONARY[n],s=e[M0],a=e[R0],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=O0.toDayJSWeekday(t.refDate,i,u);return t.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};If.default=Nf});var tb=S(yo=>{"use strict";var A0=yo&&yo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yo,"__esModule",{value:!0});var eb=St(),Jy=Je(),P0=A0(Ie()),N0=ee(),I0=Be(),F0=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${I0.matchAnyPattern(eb.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),L0=1,U0=2,Ff=class extends N0.AbstractParserWithWordBoundaryChecking{innerPattern(){return F0}innerExtract(t,e){let n=e[L0].toLowerCase(),i=e[U0].toLowerCase(),s=eb.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Jy.ParsingComponents.createRelativeFromReference(t.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Jy.ParsingComponents.createRelativeFromReference(t.reference,u)}let a=t.createParsingComponents(),o=P0.default(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};yo.default=Ff});var rn=S(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.ParsingContext=Vs.Chrono=void 0;var Hs=Je(),W0=Lf(),Bs=class{constructor(t){t=t||W0.createCasualConfiguration(),this.parsers=[...t.parsers],this.refiners=[...t.refiners]}clone(){return new Bs({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(t,e,n){let i=this.parse(t,e,n);return i.length>0?i[0].start.date():null}parse(t,e,n){let i=new ol(t,e,n),s=[];return this.parsers.forEach(a=>{let o=Bs.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(t,e){let n=[],i=e.pattern(t),s=t.text,a=t.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=e.extract(t,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof Hs.ParsingResult?c=l:l instanceof Hs.ParsingComponents?(c=t.createParsingResult(o.index,o[0]),c.start=l):c=t.createParsingResult(o.index,o[0],l),t.debug(()=>console.log(`${e.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};Vs.Chrono=Bs;var ol=class{constructor(t,e,n){this.text=t,this.reference=new Hs.ReferenceWithTimezone(e),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(t){return t instanceof Hs.ParsingComponents?t:new Hs.ParsingComponents(this.reference,t)}createParsingResult(t,e,n,i){let s=typeof e=="string"?e:this.text.substring(t,e),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new Hs.ParsingResult(this.reference,t,s,a,o)}debug(t){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(t):this.option.debug.debug(t))}};Vs.ParsingContext=ol});var es=S(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var rb=Dt(),q0=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"),ul=1,nb=5,ib=2,sb=3,Uf=4,Wf=class{constructor(t){this.groupNumberMonth=t?sb:ib,this.groupNumberDay=t?ib:sb}pattern(){return q0}extract(t,e){if(e[ul]=="/"||e[nb]=="/"){e.index+=e[0].length;return}let n=e.index+e[ul].length,i=e[0].substr(e[ul].length,e[0].length-e[ul].length-e[nb].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!e[Uf]&&e[0].indexOf("/")<0)return;let s=t.createParsingResult(n,i),a=parseInt(e[this.groupNumberMonth]),o=parseInt(e[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),e[Uf]){let u=parseInt(e[Uf]),l=rb.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=rb.findYearClosestToRef(t.refDate,o,a);s.start.imply("year",u)}return s}};qf.default=Wf});var ob=S(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var ab=St(),j0=Je(),Y0=ee(),$0=Ar(),G0=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ab.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),jf=class extends Y0.AbstractParserWithWordBoundaryChecking{innerPattern(){return G0}innerExtract(t,e){let n=e[1].toLowerCase(),i=ab.parseTimeUnits(e[2]);switch(n){case"last":case"past":case"-":i=$0.reverseTimeUnits(i);break}return j0.ParsingComponents.createRelativeFromReference(t.reference,i)}};Yf.default=jf});var lb=S(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var H0=js(),$f=Je(),B0=St(),V0=Ar();function ub(r){return r.text.match(/\s+(before|from)$/i)!=null}function z0(r){return r.text.match(/\s+(after|since)$/i)!=null}var Gf=class extends H0.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(t,e,n){return!t.match(this.patternBetween())||!ub(e)&&!z0(e)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(t,e,n){let i=B0.parseTimeUnits(e.text);ub(e)&&(i=V0.reverseTimeUnits(i));let s=$f.ParsingComponents.createRelativeFromReference(new $f.ReferenceWithTimezone(n.start.date()),i);return new $f.ParsingResult(n.reference,e.index,`${e.text}${t}${n.text}`,s)}};Hf.default=Gf});var Lf=S(it=>{"use strict";var pt=it&&it.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(it,"__esModule",{value:!0});it.createConfiguration=it.createCasualConfiguration=it.parseDate=it.parse=it.GB=it.strict=it.casual=void 0;var K0=pt(uy()),Q0=pt(my()),X0=pt(Ty()),Z0=pt(wy()),J0=pt(Dy()),eO=pt(Sy()),tO=pt(xy()),rO=pt(My()),nO=pt(Cy()),iO=pt(Ry()),sO=pt(Ny()),aO=$n(),oO=pt(Vy()),uO=pt(zy()),lO=pt(Zy()),cO=pt(tb()),Bf=rn(),dO=pt(es()),fO=pt(ob()),pO=pt(lb());it.casual=new Bf.Chrono(cb(!1));it.strict=new Bf.Chrono(ll(!0,!1));it.GB=new Bf.Chrono(ll(!1,!0));function mO(r,t,e){return it.casual.parse(r,t,e)}it.parse=mO;function hO(r,t,e){return it.casual.parseDate(r,t,e)}it.parseDate=hO;function cb(r=!1){let t=ll(!1,r);return t.parsers.unshift(new oO.default),t.parsers.unshift(new uO.default),t.parsers.unshift(new Z0.default),t.parsers.unshift(new cO.default),t.parsers.unshift(new fO.default),t}it.createCasualConfiguration=cb;function ll(r=!0,t=!1){return aO.includeCommonConfiguration({parsers:[new dO.default(t),new K0.default,new Q0.default,new X0.default,new lO.default,new J0.default,new eO.default,new tO.default(r),new rO.default(r),new nO.default(r)],refiners:[new pO.default,new sO.default,new iO.default]},r)}it.createConfiguration=ll});var db=S(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var gO=Xi(),Vf=class extends gO.AbstractTimeExpressionParser{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)}};zf.default=Vf});var bo=S(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.parseTimeUnits=Ve.TIME_UNITS_PATTERN=Ve.parseYear=Ve.YEAR_PATTERN=Ve.parseNumberPattern=Ve.NUMBER_PATTERN=Ve.TIME_UNIT_DICTIONARY=Ve.INTEGER_WORD_DICTIONARY=Ve.MONTH_DICTIONARY=Ve.WEEKDAY_DICTIONARY=void 0;var Kf=Be(),yO=Dt();Ve.WEEKDAY_DICTIONARY={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};Ve.MONTH_DICTIONARY={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};Ve.INTEGER_WORD_DICTIONARY={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};Ve.TIME_UNIT_DICTIONARY={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"};Ve.NUMBER_PATTERN=`(?:${Kf.matchAnyPattern(Ve.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function pb(r){let t=r.toLowerCase();return Ve.INTEGER_WORD_DICTIONARY[t]!==void 0?Ve.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Ve.parseNumberPattern=pb;Ve.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function bO(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let t=parseInt(r);return yO.findMostLikelyADYear(t)}Ve.parseYear=bO;var mb=`(${Ve.NUMBER_PATTERN})\\s{0,5}(${Kf.matchAnyPattern(Ve.TIME_UNIT_DICTIONARY)})\\s{0,5}`,fb=new RegExp(mb,"i");Ve.TIME_UNITS_PATTERN=Kf.repeatedTimeunitPattern("",mb);function TO(r){let t={},e=r,n=fb.exec(e);for(;n;)_O(t,n),e=e.substring(n[0].length),n=fb.exec(e);return t}Ve.parseTimeUnits=TO;function _O(r,t){let e=pb(t[1]),n=Ve.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];r[n]=e}});var gb=S(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var hb=bo(),vO=Be(),wO=ee(),kO=Ji(),EO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${vO.matchAnyPattern(hb.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),DO=1,SO=3,OO=2,Qf=class extends wO.AbstractParserWithWordBoundaryChecking{innerPattern(){return EO}innerExtract(t,e){let n=e[OO].toLowerCase(),i=hb.WEEKDAY_DICTIONARY[n],s=e[DO],a=e[SO],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=kO.toDayJSWeekday(t.refDate,i,u);return t.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Xf.default=Qf});var _b=S(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var _i=dt(),xO=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"),MO=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"),CO=2,yb=3,bb=4,Tb=5,zs=class{pattern(t){return xO}extract(t,e){let n=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(n.text.match(/^\d{4}$/)||(n.start=zs.extractTimeComponent(n.start.clone(),e),!n.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=MO.exec(i);return s&&(n.end=zs.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(t,e){let n=0,i=0,s=null;if(n=parseInt(e[CO]),e[yb]!=null&&(i=parseInt(e[yb])),i>=60||n>24)return null;if(n>=12&&(s=_i.Meridiem.PM),e[Tb]!=null){if(n>12)return null;let a=e[Tb].toLowerCase();a.match(/morgen|vormittag/)&&(s=_i.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=_i.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=_i.Meridiem.AM,n=0):n<6?s=_i.Meridiem.AM:(s=_i.Meridiem.PM,n+=12))}if(t.assign("hour",n),t.assign("minute",i),s!==null?t.assign("meridiem",s):n<12?t.imply("meridiem",_i.Meridiem.AM):t.imply("meridiem",_i.Meridiem.PM),e[bb]!=null){let a=parseInt(e[bb]);if(a>=60)return null;t.assign("second",a)}return t}};Zf.default=zs});var vb=S(To=>{"use strict";var RO=To&&To.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(To,"__esModule",{value:!0});var AO=RO(En()),Jf=class extends AO.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};To.default=Jf});var wb=S(_o=>{"use strict";var PO=_o&&_o.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_o,"__esModule",{value:!0});var NO=PO(Yn()),ep=class extends NO.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};_o.default=ep});var tp=S(wo=>{"use strict";var IO=wo&&wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wo,"__esModule",{value:!0});var FO=IO(Ie()),ts=dt(),LO=ee(),UO=Rr(),WO=Ar(),vo=class extends LO.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(t,e){let n=FO.default(t.refDate),i=e[2].toLowerCase(),s=t.createParsingComponents();return UO.implySimilarTime(s,n),vo.extractTimeComponents(s,i)}static extractTimeComponents(t,e){switch(e){case"morgen":t.imply("hour",6),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"vormittag":t.imply("hour",9),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"mittag":case"mittags":t.imply("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"nachmittag":t.imply("hour",15),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"abend":t.imply("hour",18),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"nacht":t.imply("hour",22),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"mitternacht":t.get("hour")>1&&(t=WO.addImpliedTimeUnits(t,{day:1})),t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break}return t}};wo.default=vo});var Db=S(nn=>{"use strict";var qO=nn&&nn.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),jO=nn&&nn.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),YO=nn&&nn.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&qO(t,r,e);return jO(t,r),t},Eb=nn&&nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nn,"__esModule",{value:!0});var $O=Eb(Ie()),GO=ee(),rs=Rr(),HO=Eb(tp()),kb=YO(Hn()),BO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),VO=1,zO=2,rp=class extends GO.AbstractParserWithWordBoundaryChecking{innerPattern(t){return BO}innerExtract(t,e){let n=$O.default(t.refDate),i=(e[VO]||"").toLowerCase(),s=(e[zO]||"").toLowerCase(),a=t.createParsingComponents();switch(i){case"jetzt":a=kb.now(t.reference);break;case"heute":a=kb.today(t.reference);break;case"morgen":rs.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),rs.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),rs.assignSimilarDate(a,n),rs.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),rs.assignSimilarDate(a,n),rs.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),rs.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=HO.default.extractTimeComponents(a,s)),a}};nn.default=rp});var Rb=S(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var KO=Dt(),Mb=bo(),Cb=bo(),QO=Be(),XO=ee(),ZO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${QO.matchAnyPattern(Mb.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Cb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Sb=1,Ob=2,JO=3,xb=4,np=class extends XO.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZO}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=Mb.MONTH_DICTIONARY[e[JO].toLowerCase()],s=parseInt(e[Sb]);if(s>31)return e.index=e.index+e[Sb].length,null;if(n.start.assign("month",i),n.start.assign("day",s),e[xb]){let a=Cb.parseYear(e[xb]);n.start.assign("year",a)}else{let a=KO.findYearClosestToRef(t.refDate,s,i);n.start.imply("year",a)}if(e[Ob]){let a=parseInt(e[Ob]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};ip.default=np});var Ab=S(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var cl=bo(),e1=Je(),t1=ee(),r1=Ar(),n1=Be(),sp=class extends t1.AbstractParserWithWordBoundaryChecking{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*)?(${cl.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${n1.matchAnyPattern(cl.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(t,e){let n=e[2]?cl.parseNumberPattern(e[2]):1,i=cl.TIME_UNIT_DICTIONARY[e[4].toLowerCase()],s={};s[i]=n;let a=e[1]||e[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=r1.reverseTimeUnits(s)),e1.ParsingComponents.createRelativeFromReference(t.reference,s)}};ap.default=sp});var Ib=S(mt=>{"use strict";var sn=mt&&mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mt,"__esModule",{value:!0});mt.createConfiguration=mt.createCasualConfiguration=mt.parseDate=mt.parse=mt.strict=mt.casual=void 0;var i1=$n(),Pb=rn(),s1=sn(es()),a1=sn(xf()),o1=sn(db()),u1=sn(gb()),l1=sn(_b()),c1=sn(vb()),d1=sn(wb()),f1=sn(Db()),p1=sn(tp()),m1=sn(Rb()),h1=sn(Ab());mt.casual=new Pb.Chrono(Nb());mt.strict=new Pb.Chrono(op(!0));function g1(r,t,e){return mt.casual.parse(r,t,e)}mt.parse=g1;function y1(r,t,e){return mt.casual.parseDate(r,t,e)}mt.parseDate=y1;function Nb(r=!0){let t=op(!1,r);return t.parsers.unshift(new p1.default),t.parsers.unshift(new f1.default),t.parsers.unshift(new h1.default),t}mt.createCasualConfiguration=Nb;function op(r=!0,t=!0){return i1.includeCommonConfiguration({parsers:[new a1.default,new s1.default(t),new o1.default,new l1.default,new m1.default,new u1.default],refiners:[new c1.default,new d1.default]},r)}mt.createConfiguration=op});var Lb=S(an=>{"use strict";var b1=an&&an.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),T1=an&&an.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),_1=an&&an.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&b1(t,r,e);return T1(t,r),t},v1=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var w1=v1(Ie()),k1=dt(),E1=ee(),Fb=Rr(),dl=_1(Hn()),up=class extends E1.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(t,e){let n=w1.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"maintenant":return dl.now(t.reference);case"aujourd'hui":return dl.today(t.reference);case"hier":return dl.yesterday(t.reference);case"demain":return dl.tomorrow(t.reference);default:i.match(/cette\s*nuit/)?(Fb.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",k1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Fb.assignSimilarDate(s,n),s.imply("hour",0))}return s}};an.default=up});var Ub=S(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var ko=dt(),D1=ee(),lp=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(t,e){let n=e[2].toLowerCase(),i=t.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",ko.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",ko.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",ko.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",ko.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",ko.Meridiem.AM);break}return i}};cp.default=lp});var Wb=S(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var S1=Xi(),dp=class extends S1.AbstractTimeExpressionParser{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)}};fp.default=dp});var qb=S(Eo=>{"use strict";var O1=Eo&&Eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Eo,"__esModule",{value:!0});var x1=O1(Yn()),pp=class extends x1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Eo.default=pp});var jb=S(Do=>{"use strict";var M1=Do&&Do.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Do,"__esModule",{value:!0});var C1=M1(En()),mp=class extends C1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Do.default=mp});var vi=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.parseTimeUnits=Fe.TIME_UNITS_PATTERN=Fe.parseYear=Fe.YEAR_PATTERN=Fe.parseOrdinalNumberPattern=Fe.ORDINAL_NUMBER_PATTERN=Fe.parseNumberPattern=Fe.NUMBER_PATTERN=Fe.TIME_UNIT_DICTIONARY=Fe.INTEGER_WORD_DICTIONARY=Fe.MONTH_DICTIONARY=Fe.WEEKDAY_DICTIONARY=void 0;var hp=Be();Fe.WEEKDAY_DICTIONARY={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};Fe.MONTH_DICTIONARY={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};Fe.INTEGER_WORD_DICTIONARY={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};Fe.TIME_UNIT_DICTIONARY={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"};Fe.NUMBER_PATTERN=`(?:${hp.matchAnyPattern(Fe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function $b(r){let t=r.toLowerCase();return Fe.INTEGER_WORD_DICTIONARY[t]!==void 0?Fe.INTEGER_WORD_DICTIONARY[t]:t==="une"||t==="un"?1:t.match(/quelques?/)?3:t.match(/demi-?/)?.5:parseFloat(t)}Fe.parseNumberPattern=$b;Fe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function R1(r){let t=r.toLowerCase();return t=t.replace(/(?:er)$/i,""),parseInt(t)}Fe.parseOrdinalNumberPattern=R1;Fe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function A1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let t=parseInt(r);return t<100&&(t>50?t=t+1900:t=t+2e3),t}Fe.parseYear=A1;var Gb=`(${Fe.NUMBER_PATTERN})\\s{0,5}(${hp.matchAnyPattern(Fe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Yb=new RegExp(Gb,"i");Fe.TIME_UNITS_PATTERN=hp.repeatedTimeunitPattern("",Gb);function P1(r){let t={},e=r,n=Yb.exec(e);for(;n;)N1(t,n),e=e.substring(n[0].length),n=Yb.exec(e);return t}Fe.parseTimeUnits=P1;function N1(r,t){let e=$b(t[1]),n=Fe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];r[n]=e}});var Bb=S(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Hb=vi(),I1=Be(),F1=ee(),L1=Ji(),U1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${I1.matchAnyPattern(Hb.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),W1=1,q1=2,gp=class extends F1.AbstractParserWithWordBoundaryChecking{innerPattern(){return U1}innerExtract(t,e){let n=e[W1].toLowerCase(),i=Hb.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=e[q1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=L1.toDayJSWeekday(t.refDate,i,a);return t.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};yp.default=gp});var Qb=S(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var So=dt(),j1=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"),Y1=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"),$1=2,Vb=3,zb=4,Kb=5,Ks=class{pattern(t){return j1}extract(t,e){let n=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Ks.extractTimeComponent(n.start.clone(),e),!n.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=Y1.exec(i);return s&&(n.end=Ks.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(t,e){let n=0,i=0,s=null;if(n=parseInt(e[$1]),e[Vb]!=null&&(i=parseInt(e[Vb])),i>=60||n>24)return null;if(n>=12&&(s=So.Meridiem.PM),e[Kb]!=null){if(n>12)return null;let a=e[Kb][0].toLowerCase();a=="a"&&(s=So.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=So.Meridiem.PM,n!=12&&(n+=12))}if(t.assign("hour",n),t.assign("minute",i),s!==null?t.assign("meridiem",s):n<12?t.imply("meridiem",So.Meridiem.AM):t.imply("meridiem",So.Meridiem.PM),e[zb]!=null){let a=parseInt(e[zb]);if(a>=60)return null;t.assign("second",a)}return t}};bp.default=Ks});var rT=S(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var G1=Dt(),eT=vi(),tT=vi(),fl=vi(),H1=Be(),B1=ee(),V1=new RegExp(`(?:on\\s*?)?(${fl.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${fl.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${H1.matchAnyPattern(eT.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${tT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Xb=1,Zb=2,z1=3,Jb=4,Tp=class extends B1.AbstractParserWithWordBoundaryChecking{innerPattern(){return V1}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=eT.MONTH_DICTIONARY[e[z1].toLowerCase()],s=fl.parseOrdinalNumberPattern(e[Xb]);if(s>31)return e.index=e.index+e[Xb].length,null;if(n.start.assign("month",i),n.start.assign("day",s),e[Jb]){let a=tT.parseYear(e[Jb]);n.start.assign("year",a)}else{let a=G1.findYearClosestToRef(t.refDate,s,i);n.start.imply("year",a)}if(e[Zb]){let a=fl.parseOrdinalNumberPattern(e[Zb]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};_p.default=Tp});var iT=S(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var nT=vi(),K1=Je(),Q1=ee(),X1=Ar(),vp=class extends Q1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${nT.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(t,e){let n=nT.parseTimeUnits(e[1]),i=X1.reverseTimeUnits(n);return K1.ParsingComponents.createRelativeFromReference(t.reference,i)}};wp.default=vp});var aT=S(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var sT=vi(),Z1=Je(),J1=ee(),kp=class extends J1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${sT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(t,e){let n=sT.parseTimeUnits(e[1]);return Z1.ParsingComponents.createRelativeFromReference(t.reference,n)}};Ep.default=kp});var oT=S(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var pl=vi(),ex=Je(),tx=ee(),rx=Ar(),nx=Be(),Dp=class extends tx.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${pl.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${nx.matchAnyPattern(pl.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(t,e){let n=e[1]?pl.parseNumberPattern(e[1]):1,i=pl.TIME_UNIT_DICTIONARY[e[3].toLowerCase()],s={};s[i]=n;let a=e[2]||e[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=rx.reverseTimeUnits(s)),ex.ParsingComponents.createRelativeFromReference(t.reference,s)}};Sp.default=Dp});var cT=S(ht=>{"use strict";var Pr=ht&&ht.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ht,"__esModule",{value:!0});ht.createConfiguration=ht.createCasualConfiguration=ht.parseDate=ht.parse=ht.strict=ht.casual=void 0;var ix=$n(),uT=rn(),sx=Pr(Lb()),ax=Pr(Ub()),ox=Pr(es()),ux=Pr(Wb()),lx=Pr(qb()),cx=Pr(jb()),dx=Pr(Bb()),fx=Pr(Qb()),px=Pr(rT()),mx=Pr(iT()),hx=Pr(aT()),gx=Pr(oT());ht.casual=new uT.Chrono(lT());ht.strict=new uT.Chrono(Op(!0));function yx(r,t,e){return ht.casual.parse(r,t,e)}ht.parse=yx;function bx(r,t,e){return ht.casual.parseDate(r,t,e)}ht.parseDate=bx;function lT(r=!0){let t=Op(!1,r);return t.parsers.unshift(new sx.default),t.parsers.unshift(new ax.default),t.parsers.unshift(new gx.default),t}ht.createCasualConfiguration=lT;function Op(r=!0,t=!0){return ix.includeCommonConfiguration({parsers:[new ox.default(t),new px.default,new ux.default,new fx.default,new mx.default,new hx.default,new dx.default],refiners:[new lx.default,new cx.default]},r)}ht.createConfiguration=Op});var dT=S(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.toHankaku=void 0;function Tx(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,_x)}ml.toHankaku=Tx;function _x(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var pT=S(Oo=>{"use strict";var vx=Oo&&Oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oo,"__esModule",{value:!0});var xp=dT(),wx=Dt(),kx=vx(Ie()),Ex=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,fT=1,Dx=2,Mp=3,Sx=4,Ox=5,xx=6,Cp=class{pattern(){return Ex}extract(t,e){let n=parseInt(xp.toHankaku(e[Ox])),i=parseInt(xp.toHankaku(e[xx])),s=t.createParsingComponents({day:i,month:n});if(e[fT]&&e[fT].match("\u540C|\u4ECA|\u672C")){let a=kx.default(t.refDate);s.assign("year",a.year())}if(e[Dx]){let a=e[Sx],o=a=="\u5143"?1:parseInt(xp.toHankaku(a));e[Mp]=="\u4EE4\u548C"?o+=2018:e[Mp]=="\u5E73\u6210"?o+=1988:e[Mp]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=wx.findYearClosestToRef(t.refDate,i,n);s.imply("year",a)}return s}};Oo.default=Cp});var mT=S(xo=>{"use strict";var Mx=xo&&xo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xo,"__esModule",{value:!0});var Cx=Mx(En()),Rp=class extends Cx.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};xo.default=Rp});var gT=S(on=>{"use strict";var Rx=on&&on.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),Ax=on&&on.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),Px=on&&on.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&Rx(t,r,e);return Ax(t,r),t},Nx=on&&on.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(on,"__esModule",{value:!0});var Ix=Nx(Ie()),hT=dt(),Ap=Px(Hn()),Fx=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Pp=class{pattern(){return Fx}extract(t,e){let n=e[0],i=Ix.default(t.refDate),s=t.createParsingComponents();switch(n){case"\u6628\u65E5":return Ap.yesterday(t.reference);case"\u660E\u65E5":return Ap.tomorrow(t.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Ap.today(t.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",hT.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",hT.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};on.default=Pp});var TT=S(gt=>{"use strict";var Np=gt&>.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gt,"__esModule",{value:!0});gt.createConfiguration=gt.createCasualConfiguration=gt.parseDate=gt.parse=gt.strict=gt.casual=void 0;var Lx=Np(pT()),Ux=Np(mT()),Wx=Np(gT()),yT=rn();gt.casual=new yT.Chrono(bT());gt.strict=new yT.Chrono(Ip());function qx(r,t,e){return gt.casual.parse(r,t,e)}gt.parse=qx;function jx(r,t,e){return gt.casual.parseDate(r,t,e)}gt.parseDate=jx;function bT(){let r=Ip();return r.parsers.unshift(new Wx.default),r}gt.createCasualConfiguration=bT;function Ip(){return{parsers:[new Lx.default],refiners:[new Ux.default]}}gt.createConfiguration=Ip});var hl=S(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.parseYear=Sn.YEAR_PATTERN=Sn.MONTH_DICTIONARY=Sn.WEEKDAY_DICTIONARY=void 0;Sn.WEEKDAY_DICTIONARY={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};Sn.MONTH_DICTIONARY={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};Sn.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function Yx(r){if(r.match(/^[0-9]{1,4}$/)){let t=parseInt(r);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Sn.parseYear=Yx});var vT=S(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var _T=hl(),$x=Be(),Gx=ee(),Hx=Ji(),Bx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${$x.matchAnyPattern(_T.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),Vx=1,zx=2,Kx=3,Fp=class extends Gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Bx}innerExtract(t,e){let n=e[zx].toLowerCase(),i=_T.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=e[Vx],a=e[Kx],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=Hx.toDayJSWeekday(t.refDate,i,u);return t.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Lp.default=Fp});var wT=S(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Qx=Xi(),Up=class extends Qx.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Wp.default=Up});var kT=S(Mo=>{"use strict";var Xx=Mo&&Mo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mo,"__esModule",{value:!0});var Zx=Xx(Yn()),qp=class extends Zx.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Mo.default=qp});var ET=S(Co=>{"use strict";var Jx=Co&&Co.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Co,"__esModule",{value:!0});var eM=Jx(En()),jp=class extends eM.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Co.default=jp});var CT=S($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var tM=Dt(),xT=hl(),MT=hl(),rM=Be(),nM=ee(),iM=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*)(${rM.matchAnyPattern(xT.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${MT.YEAR_PATTERN}))?(?=\\W|$)`,"i"),DT=1,ST=2,sM=3,OT=4,Yp=class extends nM.AbstractParserWithWordBoundaryChecking{innerPattern(){return iM}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=xT.MONTH_DICTIONARY[e[sM].toLowerCase()],s=parseInt(e[DT]);if(s>31)return e.index=e.index+e[DT].length,null;if(n.start.assign("month",i),n.start.assign("day",s),e[OT]){let a=MT.parseYear(e[OT]);n.start.assign("year",a)}else{let a=tM.findYearClosestToRef(t.refDate,s,i);n.start.imply("year",a)}if(e[ST]){let a=parseInt(e[ST]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};$p.default=Yp});var RT=S(Bn=>{"use strict";var aM=Bn&&Bn.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),oM=Bn&&Bn.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),uM=Bn&&Bn.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&aM(t,r,e);return oM(t,r),t};Object.defineProperty(Bn,"__esModule",{value:!0});var lM=ee(),gl=uM(Hn()),Gp=class extends lM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(t,e){let n=e[0].toLowerCase(),i=t.createParsingComponents();switch(n){case"agora":return gl.now(t.reference);case"hoje":return gl.today(t.reference);case"amanha":case"amanh\xE3":return gl.tomorrow(t.reference);case"ontem":return gl.yesterday(t.reference)}return i}};Bn.default=Gp});var AT=S(Ro=>{"use strict";var cM=Ro&&Ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ro,"__esModule",{value:!0});var yl=dt(),dM=ee(),fM=Rr(),pM=cM(Ie()),Hp=class extends dM.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(t,e){let n=pM.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":i.imply("meridiem",yl.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",yl.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",yl.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":fM.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",yl.Meridiem.AM),i.imply("hour",12);break}return i}};Ro.default=Hp});var IT=S(yt=>{"use strict";var wi=yt&&yt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yt,"__esModule",{value:!0});yt.createConfiguration=yt.createCasualConfiguration=yt.parseDate=yt.parse=yt.strict=yt.casual=void 0;var mM=$n(),PT=rn(),hM=wi(es()),gM=wi(vT()),yM=wi(wT()),bM=wi(kT()),TM=wi(ET()),_M=wi(CT()),vM=wi(RT()),wM=wi(AT());yt.casual=new PT.Chrono(NT());yt.strict=new PT.Chrono(Bp(!0));function kM(r,t,e){return yt.casual.parse(r,t,e)}yt.parse=kM;function EM(r,t,e){return yt.casual.parseDate(r,t,e)}yt.parseDate=EM;function NT(r=!0){let t=Bp(!1,r);return t.parsers.push(new vM.default),t.parsers.push(new wM.default),t}yt.createCasualConfiguration=NT;function Bp(r=!0,t=!0){return mM.includeCommonConfiguration({parsers:[new hM.default(t),new gM.default,new yM.default,new _M.default],refiners:[new bM.default,new TM.default]},r)}yt.createConfiguration=Bp});var FT=S(Ao=>{"use strict";var DM=Ao&&Ao.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ao,"__esModule",{value:!0});var SM=DM(En()),Vp=class extends SM.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ao.default=Vp});var LT=S(Po=>{"use strict";var OM=Po&&Po.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Po,"__esModule",{value:!0});var xM=OM(Yn()),zp=class extends xM.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Po.default=zp});var UT=S(Vn=>{"use strict";var MM=Vn&&Vn.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),CM=Vn&&Vn.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),RM=Vn&&Vn.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&MM(t,r,e);return CM(t,r),t};Object.defineProperty(Vn,"__esModule",{value:!0});var AM=ee(),bl=RM(Hn()),Kp=class extends AM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(t,e){let n=e[0].toLowerCase(),i=t.createParsingComponents();switch(n){case"nu":return bl.now(t.reference);case"vandaag":return bl.today(t.reference);case"morgen":case"morgend":return bl.tomorrow(t.reference);case"gisteren":return bl.yesterday(t.reference)}return i}};Vn.default=Kp});var WT=S(No=>{"use strict";var PM=No&&No.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(No,"__esModule",{value:!0});var Tl=dt(),NM=ee(),IM=PM(Ie()),FM=Rr(),LM=1,UM=2,Qp=class extends NM.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(t,e){let n=IM.default(t.refDate),i=t.createParsingComponents();switch(e[LM]==="deze"&&(i.assign("day",t.refDate.getDate()),i.assign("month",t.refDate.getMonth()+1),i.assign("year",t.refDate.getFullYear())),e[UM].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Tl.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Tl.Meridiem.PM),i.imply("hour",20);break;case"middernacht":FM.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Tl.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Tl.Meridiem.AM),i.imply("hour",12);break}return i}};No.default=Qp});var pr=S(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.parseTimeUnits=Me.TIME_UNITS_PATTERN=Me.parseYear=Me.YEAR_PATTERN=Me.parseOrdinalNumberPattern=Me.ORDINAL_NUMBER_PATTERN=Me.parseNumberPattern=Me.NUMBER_PATTERN=Me.TIME_UNIT_DICTIONARY=Me.ORDINAL_WORD_DICTIONARY=Me.INTEGER_WORD_DICTIONARY=Me.MONTH_DICTIONARY=Me.WEEKDAY_DICTIONARY=void 0;var _l=Be(),WM=Dt();Me.WEEKDAY_DICTIONARY={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};Me.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":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};Me.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};Me.ORDINAL_WORD_DICTIONARY={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};Me.TIME_UNIT_DICTIONARY={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"};Me.NUMBER_PATTERN=`(?:${_l.matchAnyPattern(Me.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function jT(r){let t=r.toLowerCase();return Me.INTEGER_WORD_DICTIONARY[t]!==void 0?Me.INTEGER_WORD_DICTIONARY[t]:t==="paar"?2:t==="half"||t.match(/halve?/)?.5:parseFloat(t.replace(",","."))}Me.parseNumberPattern=jT;Me.ORDINAL_NUMBER_PATTERN=`(?:${_l.matchAnyPattern(Me.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function qM(r){let t=r.toLowerCase();return Me.ORDINAL_WORD_DICTIONARY[t]!==void 0?Me.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:ste|de)$/i,""),parseInt(t))}Me.parseOrdinalNumberPattern=qM;Me.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function jM(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let t=parseInt(r);return WM.findMostLikelyADYear(t)}Me.parseYear=jM;var YT=`(${Me.NUMBER_PATTERN})\\s{0,5}(${_l.matchAnyPattern(Me.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qT=new RegExp(YT,"i");Me.TIME_UNITS_PATTERN=_l.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",YT);function YM(r){let t={},e=r,n=qT.exec(e);for(;n;)$M(t,n),e=e.substring(n[0].length),n=qT.exec(e);return t}Me.parseTimeUnits=YM;function $M(r,t){let e=jT(t[1]),n=Me.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];r[n]=e}});var GT=S(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var $T=pr(),GM=Je(),HM=ee(),Xp=class extends HM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+$T.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(t,e){let n=$T.parseTimeUnits(e[1]);return GM.ParsingComponents.createRelativeFromReference(t.reference,n)}};Zp.default=Xp});var BT=S(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var HT=pr(),BM=Be(),VM=ee(),zM=Ji(),KM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${BM.matchAnyPattern(HT.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),QM=1,XM=2,ZM=3,Jp=class extends VM.AbstractParserWithWordBoundaryChecking{innerPattern(){return KM}innerExtract(t,e){let n=e[XM].toLowerCase(),i=HT.WEEKDAY_DICTIONARY[n],s=e[QM],a=e[ZM],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=zM.toDayJSWeekday(t.refDate,i,u);return t.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};em.default=Jp});var ZT=S(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var JM=Dt(),QT=pr(),vl=pr(),XT=pr(),eC=Be(),tC=ee(),rC=new RegExp(`(?:on\\s*?)?(${vl.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${vl.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+eC.matchAnyPattern(QT.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${XT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),nC=3,VT=1,zT=2,KT=4,tm=class extends tC.AbstractParserWithWordBoundaryChecking{innerPattern(){return rC}innerExtract(t,e){let n=QT.MONTH_DICTIONARY[e[nC].toLowerCase()],i=vl.parseOrdinalNumberPattern(e[VT]);if(i>31)return e.index=e.index+e[VT].length,null;let s=t.createParsingComponents({day:i,month:n});if(e[KT]){let u=XT.parseYear(e[KT]);s.assign("year",u)}else{let u=JM.findYearClosestToRef(t.refDate,i,n);s.imply("year",u)}if(!e[zT])return s;let a=vl.parseOrdinalNumberPattern(e[zT]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};rm.default=tm});var r_=S(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var e_=pr(),iC=Dt(),sC=Be(),t_=pr(),aC=ee(),oC=new RegExp(`(${sC.matchAnyPattern(e_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${t_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),uC=1,JT=2,nm=class extends aC.AbstractParserWithWordBoundaryChecking{innerPattern(){return oC}innerExtract(t,e){let n=t.createParsingComponents();n.imply("day",1);let i=e[uC],s=e_.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),e[JT]){let a=t_.parseYear(e[JT]);n.assign("year",a)}else{let a=iC.findYearClosestToRef(t.refDate,1,s);n.imply("year",a)}return n}};im.default=nm});var n_=S(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var lC=ee(),cC=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),dC=1,fC=2,sm=class extends lC.AbstractParserWithWordBoundaryChecking{innerPattern(){return cC}innerExtract(t,e){let n=parseInt(e[fC]),i=parseInt(e[dC]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};am.default=sm});var i_=S(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var pC=Xi(),om=class extends pC.AbstractTimeExpressionParser{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)}};um.default=om});var o_=S(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var a_=pr(),mC=Be(),hC=ee(),gC=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${mC.matchAnyPattern(a_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),yC=1,bC=2,s_=3,TC=4,lm=class extends hC.AbstractParserWithWordBoundaryChecking{innerPattern(){return gC}innerExtract(t,e){let n=e[s_]?parseInt(e[s_]):a_.MONTH_DICTIONARY[e[bC].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(e[yC]);return{day:parseInt(e[TC]),month:n,year:i}}};cm.default=lm});var u_=S(Io=>{"use strict";var _C=Io&&Io.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Io,"__esModule",{value:!0});var vC=ee(),wl=dt(),dm=Rr(),wC=_C(Ie()),kC=1,EC=2,fm=class extends vC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(t,e){let n=e[kC].toLowerCase(),i=e[EC].toLowerCase(),s=t.createParsingComponents(),a=wC.default(t.refDate);switch(n){case"gisteren":dm.assignSimilarDate(s,a.add(-1,"day"));break;case"van":dm.assignSimilarDate(s,a);break;case"morgen":dm.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",wl.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",wl.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",wl.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",wl.Meridiem.PM),s.imply("hour",20);break}return s}};Io.default=fm});var c_=S(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var l_=pr(),DC=Je(),SC=ee(),OC=Ar(),xC=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${l_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),pm=class extends SC.AbstractParserWithWordBoundaryChecking{innerPattern(){return xC}innerExtract(t,e){let n=e[1].toLowerCase(),i=l_.parseTimeUnits(e[2]);switch(n){case"vorige":case"afgelopen":case"-":i=OC.reverseTimeUnits(i);break}return DC.ParsingComponents.createRelativeFromReference(t.reference,i)}};mm.default=pm});var p_=S(Fo=>{"use strict";var MC=Fo&&Fo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fo,"__esModule",{value:!0});var f_=pr(),d_=Je(),CC=MC(Ie()),RC=ee(),AC=Be(),PC=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${AC.matchAnyPattern(f_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),NC=1,IC=2,hm=class extends RC.AbstractParserWithWordBoundaryChecking{innerPattern(){return PC}innerExtract(t,e){let n=e[NC].toLowerCase(),i=e[IC].toLowerCase(),s=f_.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,d_.ParsingComponents.createRelativeFromReference(t.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,d_.ParsingComponents.createRelativeFromReference(t.reference,u)}let a=t.createParsingComponents(),o=CC.default(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Fo.default=hm});var m_=S(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var ym=pr(),FC=Je(),LC=ee(),UC=Ar(),WC=new RegExp("("+ym.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),qC=new RegExp("("+ym.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),gm=class extends LC.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?qC:WC}innerExtract(t,e){let n=ym.parseTimeUnits(e[1]),i=UC.reverseTimeUnits(n);return FC.ParsingComponents.createRelativeFromReference(t.reference,i)}};bm.default=gm});var h_=S(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var _m=pr(),jC=Je(),YC=ee(),$C=new RegExp("("+_m.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),GC=new RegExp("("+_m.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),HC=1,Tm=class extends YC.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?GC:$C}innerExtract(t,e){let n=_m.parseTimeUnits(e[HC]);return jC.ParsingComponents.createRelativeFromReference(t.reference,n)}};vm.default=Tm});var T_=S(bt=>{"use strict";var Ot=bt&&bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bt,"__esModule",{value:!0});bt.createConfiguration=bt.createCasualConfiguration=bt.parseDate=bt.parse=bt.strict=bt.casual=void 0;var BC=$n(),g_=rn(),VC=Ot(FT()),zC=Ot(LT()),KC=Ot(UT()),QC=Ot(WT()),XC=Ot(es()),ZC=Ot(GT()),JC=Ot(BT()),eR=Ot(ZT()),y_=Ot(r_()),tR=Ot(n_()),rR=Ot(i_()),nR=Ot(o_()),iR=Ot(u_()),sR=Ot(c_()),aR=Ot(p_()),oR=Ot(m_()),uR=Ot(h_());bt.casual=new g_.Chrono(b_());bt.strict=new g_.Chrono(wm(!0));function lR(r,t,e){return bt.casual.parse(r,t,e)}bt.parse=lR;function cR(r,t,e){return bt.casual.parseDate(r,t,e)}bt.parseDate=cR;function b_(r=!0){let t=wm(!1,r);return t.parsers.unshift(new KC.default),t.parsers.unshift(new QC.default),t.parsers.unshift(new iR.default),t.parsers.unshift(new y_.default),t.parsers.unshift(new aR.default),t.parsers.unshift(new sR.default),t}bt.createCasualConfiguration=b_;function wm(r=!0,t=!0){return BC.includeCommonConfiguration({parsers:[new XC.default(t),new ZC.default,new eR.default,new y_.default,new JC.default,new nR.default,new tR.default,new rR.default(r),new oR.default(r),new uR.default(r)],refiners:[new zC.default,new VC.default]},r)}bt.createConfiguration=wm});var k_=S(Lo=>{"use strict";var dR=Lo&&Lo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lo,"__esModule",{value:!0});var fR=dR(Ie()),pR=ee(),mR=1,__=2,hR=3,v_=4,w_=5,gR=6,km=class extends pR.AbstractParserWithWordBoundaryChecking{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 n=e.index,i=t.createParsingResult(n,e[0]),s=fR.default(t.refDate),a=s;if(e[mR])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(e[__]){let o=e[__],u=e[hR];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[v_]){let u=e[v_][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(e[w_]){let o=e[w_];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=e[gR];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Lo.default=km});var Qs=S(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.zhStringToYear=er.zhStringToNumber=er.WEEKDAY_OFFSET=er.NUMBER=void 0;er.NUMBER={\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};er.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function yR(r){let t=0;for(let e=0;e{"use strict";var TR=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Uo,"__esModule",{value:!0});var _R=TR(Ie()),vR=ee(),ns=Qs(),Em=1,E_=2,Dm=3,Sm=class extends vR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ns.NUMBER).join("")+"]{4}|["+Object.keys(ns.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ns.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ns.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(t,e){let n=_R.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[E_]);if(isNaN(s)&&(s=ns.zhStringToNumber(e[E_])),i.start.assign("month",s),e[Dm]){let a=parseInt(e[Dm]);isNaN(a)&&(a=ns.zhStringToNumber(e[Dm])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(e[Em]){let a=parseInt(e[Em]);isNaN(a)&&(a=ns.zhStringToYear(e[Em])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Uo.default=Sm});var O_=S(Wo=>{"use strict";var wR=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wo,"__esModule",{value:!0});var kR=wR(Ie()),ER=ee(),S_=Qs(),DR=new RegExp("(\\d+|["+Object.keys(S_.NUMBER).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"),Om=1,SR=2,xm=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return DR}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=parseInt(e[Om]);if(isNaN(i)&&(i=S_.zhStringToNumber(e[Om])),isNaN(i)){let u=e[Om];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=kR.default(t.refDate),o=e[SR][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Wo.default=xm});var M_=S(qo=>{"use strict";var OR=qo&&qo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qo,"__esModule",{value:!0});var xR=OR(Ie()),MR=ee(),x_=Qs(),CR=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(x_.WEEKDAY_OFFSET).join("|")+")"),Mm=class extends MR.AbstractParserWithWordBoundaryChecking{innerPattern(){return CR}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=x_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=xR.default(t.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var RR=jo&&jo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jo,"__esModule",{value:!0});var AR=RR(Ie()),PR=ee(),Ir=Qs(),NR=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(Ir.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Ir.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Ir.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),IR=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(Ir.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Ir.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Ir.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),kl=1,El=2,Dl=3,Sl=4,Ol=5,xl=6,Nr=7,Xs=8,Ml=9,Cm=class extends PR.AbstractParserWithWordBoundaryChecking{innerPattern(){return NR}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let n=AR.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=n.clone();if(e[kl]){var a=e[kl];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(e[Sl]){var o=e[Sl];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(e[Xs]){var d=parseInt(e[Xs]);if(isNaN(d)&&(d=Ir.zhStringToNumber(e[Xs])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(e[xl]),isNaN(u)&&(u=Ir.zhStringToNumber(e[xl])),e[Nr]?e[Nr]=="\u534A"?l=30:e[Nr]=="\u6B63"||e[Nr]=="\u6574"?l=0:(l=parseInt(e[Nr]),isNaN(l)&&(l=Ir.zhStringToNumber(e[Nr]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),e[Ml]){if(u>12)return null;var f=e[Ml][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(e[El]){var m=e[El],b=m[0];b=="\u671D"||b=="\u65E9"?(c=0,u==12&&(u=0)):b=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(e[Dl]){var T=e[Dl],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,u==12&&(u=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(e[Ol]){var x=e[Ol],O=x[0];O=="\u4E0A"||O=="\u671D"||O=="\u65E9"||O=="\u51CC"?(c=0,u==12&&(u=0)):(O=="\u4E0B"||O=="\u664F"||O=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=IR.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let M=s.clone();if(i.end=t.createParsingComponents(),e[kl]){var a=e[kl];a=="\u660E"||a=="\u807D"?n.hour()>1&&M.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?M.add(-1,"day"):a=="\u524D"?M.add(-2,"day"):a=="\u5927\u524D"?M.add(-3,"day"):a=="\u5F8C"?M.add(2,"day"):a=="\u5927\u5F8C"&&M.add(3,"day"),i.end.assign("day",M.date()),i.end.assign("month",M.month()+1),i.end.assign("year",M.year())}else if(e[Sl]){var o=e[Sl];o=="\u660E"||o=="\u807D"?M.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?M.add(-1,"day"):o=="\u524D"?M.add(-2,"day"):o=="\u5927\u524D"?M.add(-3,"day"):o=="\u5F8C"?M.add(2,"day"):o=="\u5927\u5F8C"&&M.add(3,"day"),i.end.assign("day",M.date()),i.end.assign("month",M.month()+1),i.end.assign("year",M.year())}else i.end.imply("day",M.date()),i.end.imply("month",M.month()+1),i.end.imply("year",M.year());if(u=0,l=0,c=-1,e[Xs]){var d=parseInt(e[Xs]);if(isNaN(d)&&(d=Ir.zhStringToNumber(e[Xs])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(e[xl]),isNaN(u)&&(u=Ir.zhStringToNumber(e[xl])),e[Nr]?e[Nr]=="\u534A"?l=30:e[Nr]=="\u6B63"||e[Nr]=="\u6574"?l=0:(l=parseInt(e[Nr]),isNaN(l)&&(l=Ir.zhStringToNumber(e[Nr]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),e[Ml]){if(u>12)return null;var f=e[Ml][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(e[El]){var m=e[El],b=m[0];b=="\u671D"||b=="\u65E9"?(c=0,u==12&&(u=0)):b=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(e[Dl]){var T=e[Dl],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,u==12&&(u=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(e[Ol]){var x=e[Ol],O=x[0];O=="\u4E0A"||O=="\u671D"||O=="\u65E9"||O=="\u51CC"?(c=0,u==12&&(u=0)):(O=="\u4E0B"||O=="\u664F"||O=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+e[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var FR=Yo&&Yo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yo,"__esModule",{value:!0});var LR=FR(Ie()),UR=ee(),R_=Qs(),WR=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(R_.WEEKDAY_OFFSET).join("|")+")"),Rm=class extends UR.AbstractParserWithWordBoundaryChecking{innerPattern(){return WR}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=R_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=LR.default(t.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var qR=$o&&$o.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($o,"__esModule",{value:!0});var jR=qR(En()),Am=class extends jR.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};$o.default=Am});var N_=S(Go=>{"use strict";var YR=Go&&Go.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Go,"__esModule",{value:!0});var $R=YR(Yn()),Pm=class extends $R.default{patternBetween(){return/^\s*$/i}};Go.default=Pm});var I_=S(st=>{"use strict";var zn=st&&st.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(st,"__esModule",{value:!0});st.createConfiguration=st.createCasualConfiguration=st.parseDate=st.parse=st.strict=st.casual=st.hant=void 0;var Nm=rn(),GR=zn(sl()),HR=$n(),BR=zn(k_()),VR=zn(D_()),zR=zn(O_()),KR=zn(M_()),QR=zn(C_()),XR=zn(A_()),ZR=zn(P_()),JR=zn(N_());st.hant=new Nm.Chrono(Im());st.casual=new Nm.Chrono(Im());st.strict=new Nm.Chrono(Fm());function eA(r,t,e){return st.casual.parse(r,t,e)}st.parse=eA;function tA(r,t,e){return st.casual.parseDate(r,t,e)}st.parseDate=tA;function Im(){let r=Fm();return r.parsers.unshift(new BR.default),r}st.createCasualConfiguration=Im;function Fm(){let r=HR.includeCommonConfiguration({parsers:[new VR.default,new KR.default,new XR.default,new QR.default,new zR.default],refiners:[new ZR.default,new JR.default]});return r.refiners=r.refiners.filter(t=>!(t instanceof GR.default)),r}st.createConfiguration=Fm});var W_=S(Ho=>{"use strict";var rA=Ho&&Ho.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ho,"__esModule",{value:!0});var nA=rA(Ie()),iA=ee(),sA=1,F_=2,aA=3,L_=4,U_=5,oA=6,Lm=class extends iA.AbstractParserWithWordBoundaryChecking{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 n=e.index,i=t.createParsingResult(n,e[0]),s=nA.default(t.refDate),a=s;if(e[sA])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(e[F_]){let o=e[F_],u=e[aA];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[L_]){let u=e[L_][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(e[U_]){let o=e[U_];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=e[oA];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ho.default=Lm});var Zs=S(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.zhStringToYear=tr.zhStringToNumber=tr.WEEKDAY_OFFSET=tr.NUMBER=void 0;tr.NUMBER={\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};tr.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function uA(r){let t=0;for(let e=0;e{"use strict";var cA=Bo&&Bo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bo,"__esModule",{value:!0});var dA=cA(Ie()),fA=ee(),is=Zs(),Um=1,q_=2,Wm=3,qm=class extends fA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(is.NUMBER).join("")+"]{4}|["+Object.keys(is.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(is.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(is.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(t,e){let n=dA.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[q_]);if(isNaN(s)&&(s=is.zhStringToNumber(e[q_])),i.start.assign("month",s),e[Wm]){let a=parseInt(e[Wm]);isNaN(a)&&(a=is.zhStringToNumber(e[Wm])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(e[Um]){let a=parseInt(e[Um]);isNaN(a)&&(a=is.zhStringToYear(e[Um])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Bo.default=qm});var $_=S(Vo=>{"use strict";var pA=Vo&&Vo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vo,"__esModule",{value:!0});var mA=pA(Ie()),hA=ee(),Y_=Zs(),gA=new RegExp("(\\d+|["+Object.keys(Y_.NUMBER).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"),jm=1,yA=2,Ym=class extends hA.AbstractParserWithWordBoundaryChecking{innerPattern(){return gA}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=parseInt(e[jm]);if(isNaN(i)&&(i=Y_.zhStringToNumber(e[jm])),isNaN(i)){let u=e[jm];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=mA.default(t.refDate),o=e[yA][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Vo.default=Ym});var H_=S(zo=>{"use strict";var bA=zo&&zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zo,"__esModule",{value:!0});var TA=bA(Ie()),_A=ee(),G_=Zs(),vA=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(G_.WEEKDAY_OFFSET).join("|")+")"),$m=class extends _A.AbstractParserWithWordBoundaryChecking{innerPattern(){return vA}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=G_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=TA.default(t.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var wA=Ko&&Ko.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ko,"__esModule",{value:!0});var kA=wA(Ie()),EA=ee(),Lr=Zs(),DA=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(Lr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Lr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Lr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),SA=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(Lr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Lr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Lr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Cl=1,Rl=2,Al=3,Pl=4,Nl=5,Il=6,Fr=7,Js=8,Fl=9,Gm=class extends EA.AbstractParserWithWordBoundaryChecking{innerPattern(){return DA}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let n=kA.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=n.clone();if(e[Cl]){let c=e[Cl];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(e[Pl]){let c=e[Pl];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(e[Js]){let c=parseInt(e[Js]);if(isNaN(c)&&(c=Lr.zhStringToNumber(e[Js])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(e[Il]),isNaN(a)&&(a=Lr.zhStringToNumber(e[Il])),e[Fr]?e[Fr]=="\u534A"?o=30:e[Fr]=="\u6B63"||e[Fr]=="\u6574"?o=0:(o=parseInt(e[Fr]),isNaN(o)&&(o=Lr.zhStringToNumber(e[Fr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),e[Fl]){if(a>12)return null;let c=e[Fl][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(e[Rl]){let d=e[Rl][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(e[Al]){let d=e[Al][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(e[Nl]){let d=e[Nl][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=SA.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=t.createParsingComponents(),e[Cl]){let c=e[Cl];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(e[Pl]){let c=e[Pl];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,e[Js]){let c=parseInt(e[Js]);if(isNaN(c)&&(c=Lr.zhStringToNumber(e[Js])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(e[Il]),isNaN(a)&&(a=Lr.zhStringToNumber(e[Il])),e[Fr]?e[Fr]=="\u534A"?o=30:e[Fr]=="\u6B63"||e[Fr]=="\u6574"?o=0:(o=parseInt(e[Fr]),isNaN(o)&&(o=Lr.zhStringToNumber(e[Fr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),e[Fl]){if(a>12)return null;let c=e[Fl][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(e[Rl]){let d=e[Rl][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(e[Al]){let d=e[Al][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(e[Nl]){let d=e[Nl][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+e[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var OA=Qo&&Qo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qo,"__esModule",{value:!0});var xA=OA(Ie()),MA=ee(),V_=Zs(),CA=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(V_.WEEKDAY_OFFSET).join("|")+")"),Hm=class extends MA.AbstractParserWithWordBoundaryChecking{innerPattern(){return CA}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=V_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=xA.default(t.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var RA=Xo&&Xo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xo,"__esModule",{value:!0});var AA=RA(En()),Bm=class extends AA.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Xo.default=Bm});var Q_=S(Zo=>{"use strict";var PA=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0});var NA=PA(Yn()),Vm=class extends NA.default{patternBetween(){return/^\s*$/i}};Zo.default=Vm});var X_=S(at=>{"use strict";var Kn=at&&at.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(at,"__esModule",{value:!0});at.createConfiguration=at.createCasualConfiguration=at.parseDate=at.parse=at.strict=at.casual=at.hans=void 0;var zm=rn(),IA=Kn(sl()),FA=$n(),LA=Kn(W_()),UA=Kn(j_()),WA=Kn($_()),qA=Kn(H_()),jA=Kn(B_()),YA=Kn(z_()),$A=Kn(K_()),GA=Kn(Q_());at.hans=new zm.Chrono(Km());at.casual=new zm.Chrono(Km());at.strict=new zm.Chrono(Qm());function HA(r,t,e){return at.casual.parse(r,t,e)}at.parse=HA;function BA(r,t,e){return at.casual.parseDate(r,t,e)}at.parseDate=BA;function Km(){let r=Qm();return r.parsers.unshift(new LA.default),r}at.createCasualConfiguration=Km;function Qm(){let r=FA.includeCommonConfiguration({parsers:[new UA.default,new qA.default,new YA.default,new jA.default,new WA.default],refiners:[new $A.default,new GA.default]});return r.refiners=r.refiners.filter(t=>!(t instanceof IA.default)),r}at.createConfiguration=Qm});var J_=S(mr=>{"use strict";var Z_=mr&&mr.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),VA=mr&&mr.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),zA=mr&&mr.__exportStar||function(r,t){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Z_(t,r,e)},KA=mr&&mr.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&Z_(t,r,e);return VA(t,r),t};Object.defineProperty(mr,"__esModule",{value:!0});mr.hans=void 0;zA(I_(),mr);mr.hans=KA(X_())});var rr=S(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseTimeUnits=be.TIME_UNITS_PATTERN=be.parseYear=be.YEAR_PATTERN=be.parseOrdinalNumberPattern=be.ORDINAL_NUMBER_PATTERN=be.parseNumberPattern=be.NUMBER_PATTERN=be.TIME_UNIT_DICTIONARY=be.ORDINAL_WORD_DICTIONARY=be.INTEGER_WORD_DICTIONARY=be.MONTH_DICTIONARY=be.FULL_MONTH_NAME_DICTIONARY=be.WEEKDAY_DICTIONARY=be.REGEX_PARTS=void 0;var Ll=Be(),QA=Dt();be.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};be.WEEKDAY_DICTIONARY={\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};be.FULL_MONTH_NAME_DICTIONARY={\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\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\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};be.MONTH_DICTIONARY=Object.assign(Object.assign({},be.FULL_MONTH_NAME_DICTIONARY),{\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.INTEGER_WORD_DICTIONARY={\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\u0435\u043C\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};be.ORDINAL_WORD_DICTIONARY={\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};be.TIME_UNIT_DICTIONARY={\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",\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"};be.NUMBER_PATTERN=`(?:${Ll.matchAnyPattern(be.INTEGER_WORD_DICTIONARY)}|[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})`;function tv(r){let t=r.toLowerCase();return be.INTEGER_WORD_DICTIONARY[t]!==void 0?be.INTEGER_WORD_DICTIONARY[t]:t.match(/несколько/)?3:t.match(/пол/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}be.parseNumberPattern=tv;be.ORDINAL_NUMBER_PATTERN=`(?:${Ll.matchAnyPattern(be.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function XA(r){let t=r.toLowerCase();return be.ORDINAL_WORD_DICTIONARY[t]!==void 0?be.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}be.parseOrdinalNumberPattern=XA;var Xm="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";be.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Xm}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Xm}|[5-9][0-9]${Xm})`;function ZA(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let t=parseInt(r);return QA.findMostLikelyADYear(t)}be.parseYear=ZA;var rv=`(${be.NUMBER_PATTERN})\\s{0,3}(${Ll.matchAnyPattern(be.TIME_UNIT_DICTIONARY)})`,ev=new RegExp(rv,"i");be.TIME_UNITS_PATTERN=Ll.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",rv);function JA(r){let t={},e=r,n=ev.exec(e);for(;n;)eP(t,n),e=e.substring(n[0].length).trim(),n=ev.exec(e);return t}be.parseTimeUnits=JA;function eP(r,t){let e=tv(t[1]),n=be.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];r[n]=e}});var iv=S(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var Jo=rr(),tP=Je(),rP=ee(),nv=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Jo.TIME_UNITS_PATTERN})${Jo.REGEX_PARTS.rightBoundary}`,nP=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${nv}`,Jo.REGEX_PARTS.flags),iP=new RegExp(nv,"i"),Zm=class extends rP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Jo.REGEX_PARTS.leftBoundary}innerPattern(t){return t.option.forwardDate?iP:nP}innerExtract(t,e){let n=Jo.parseTimeUnits(e[1]);return tP.ParsingComponents.createRelativeFromReference(t.reference,n)}};Jm.default=Zm});var lv=S(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var sP=Dt(),eu=rr(),uv=rr(),Ul=rr(),aP=Be(),oP=ee(),uP=new RegExp(`(?:\u0441)?\\s*(${Ul.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ul.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${aP.matchAnyPattern(eu.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${uv.YEAR_PATTERN}(?![^\\s]\\d)))?${eu.REGEX_PARTS.rightBoundary}`,eu.REGEX_PARTS.flags),sv=1,av=2,lP=3,ov=4,eh=class extends oP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return eu.REGEX_PARTS.leftBoundary}innerPattern(){return uP}innerExtract(t,e){let n=t.createParsingResult(e.index,e[0]),i=eu.MONTH_DICTIONARY[e[lP].toLowerCase()],s=Ul.parseOrdinalNumberPattern(e[sv]);if(s>31)return e.index=e.index+e[sv].length,null;if(n.start.assign("month",i),n.start.assign("day",s),e[ov]){let a=uv.parseYear(e[ov]);n.start.assign("year",a)}else{let a=sP.findYearClosestToRef(t.refDate,s,i);n.start.imply("year",a)}if(e[av]){let a=Ul.parseOrdinalNumberPattern(e[av]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};th.default=eh});var fv=S(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var tu=rr(),cP=Dt(),dP=Be(),dv=rr(),fP=ee(),pP=new RegExp(`((?:\u0432)\\s*)?(${dP.matchAnyPattern(tu.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${dv.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,tu.REGEX_PARTS.flags),mP=2,cv=3,rh=class extends fP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return tu.REGEX_PARTS.leftBoundary}innerPattern(){return pP}innerExtract(t,e){let n=e[mP].toLowerCase();if(e[0].length<=3&&!tu.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=t.createParsingResult(e.index,e.index+e[0].length);i.start.imply("day",1);let s=tu.MONTH_DICTIONARY[n];if(i.start.assign("month",s),e[cv]){let a=dv.parseYear(e[cv]);i.start.assign("year",a)}else{let a=cP.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};nh.default=rh});var mv=S(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var Wl=dt(),hP=Xi(),pv=rr(),ih=class extends hP.AbstractTimeExpressionParser{constructor(t){super(t)}patternFlags(){return pv.REGEX_PARTS.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))?(?!\\/)${pv.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(t,e){let n=super.extractPrimaryTimeComponents(t,e);if(n){if(e[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Wl.Meridiem.PM)):i<6&&n.assign("meridiem",Wl.Meridiem.AM)}if(e[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Wl.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}e[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Wl.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};sh.default=ih});var hv=S(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var ql=rr(),gP=Je(),yP=ee(),bP=Ar(),TP=new RegExp(`(${ql.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,ql.REGEX_PARTS.flags),ah=class extends yP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ql.REGEX_PARTS.leftBoundary}innerPattern(){return TP}innerExtract(t,e){let n=ql.parseTimeUnits(e[1]),i=bP.reverseTimeUnits(n);return gP.ParsingComponents.createRelativeFromReference(t.reference,i)}};oh.default=ah});var gv=S(ru=>{"use strict";var _P=ru&&ru.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ru,"__esModule",{value:!0});var vP=_P(En()),uh=class extends vP.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ru.default=uh});var yv=S(nu=>{"use strict";var wP=nu&&nu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nu,"__esModule",{value:!0});var kP=wP(Yn()),lh=class extends kP.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};nu.default=lh});var bv=S(Qn=>{"use strict";var EP=Qn&&Qn.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),DP=Qn&&Qn.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),SP=Qn&&Qn.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&EP(t,r,e);return DP(t,r),t};Object.defineProperty(Qn,"__esModule",{value:!0});var OP=ee(),iu=SP(Hn()),ch=rr(),xP=new RegExp(`(?:\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\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${ch.REGEX_PARTS.rightBoundary}`,ch.REGEX_PARTS.flags),dh=class extends OP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ch.REGEX_PARTS.leftBoundary}innerPattern(t){return xP}innerExtract(t,e){let n=e[1].toLowerCase(),i=t.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return iu.today(t.reference);case"\u0432\u0447\u0435\u0440\u0430":return iu.yesterday(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return iu.tomorrow(t.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return iu.theDayAfter(t.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return iu.theDayBefore(t.reference,2)}return i}};Qn.default=dh});var Tv=S(un=>{"use strict";var MP=un&&un.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),CP=un&&un.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),RP=un&&un.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&MP(t,r,e);return CP(t,r),t},AP=un&&un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(un,"__esModule",{value:!0});var PP=ee(),ss=RP(Hn()),NP=Rr(),IP=AP(Ie()),fh=rr(),FP=new RegExp(`(\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)${fh.REGEX_PARTS.rightBoundary}`,fh.REGEX_PARTS.flags),ph=class extends PP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return fh.REGEX_PARTS.leftBoundary}innerPattern(){return FP}innerExtract(t,e){let n=IP.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return ss.now(t.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return ss.evening(t.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return ss.morning(t.reference);if(i.match(/в\s*полдень/))return ss.noon(t.reference);if(i.match(/прошлой\s*ночью/))return ss.lastNight(t.reference);if(i.match(/прошлым\s*вечером/))return ss.yesterdayEvening(t.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),NP.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?ss.midnight(t.reference):s}};un.default=ph});var _v=S(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var su=rr(),LP=Be(),UP=ee(),WP=Ji(),qP=new RegExp(`(?:(?:,|\\(|\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*)?(${LP.matchAnyPattern(su.WEEKDAY_DICTIONARY)})(?:\\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)?${su.REGEX_PARTS.rightBoundary}`,su.REGEX_PARTS.flags),jP=1,YP=2,$P=3,mh=class extends UP.AbstractParserWithWordBoundaryChecking{innerPattern(){return qP}patternLeftBoundary(){return su.REGEX_PARTS.leftBoundary}innerExtract(t,e){let n=e[YP].toLowerCase(),i=su.WEEKDAY_DICTIONARY[n],s=e[jP],a=e[$P],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="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"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=WP.toDayJSWeekday(t.refDate,i,u);return t.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};hh.default=mh});var wv=S(ou=>{"use strict";var GP=ou&&ou.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ou,"__esModule",{value:!0});var au=rr(),vv=Je(),HP=GP(Ie()),BP=ee(),VP=Be(),zP=new RegExp(`(\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*(${VP.matchAnyPattern(au.TIME_UNIT_DICTIONARY)})(?=\\s*)${au.REGEX_PARTS.rightBoundary}`,au.REGEX_PARTS.flags),KP=1,QP=2,gh=class extends BP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return au.REGEX_PARTS.leftBoundary}innerPattern(){return zP}innerExtract(t,e){let n=e[KP].toLowerCase(),i=e[QP].toLowerCase(),s=au.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,vv.ParsingComponents.createRelativeFromReference(t.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,vv.ParsingComponents.createRelativeFromReference(t.reference,u)}let a=t.createParsingComponents(),o=HP.default(t.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ou.default=gh});var kv=S(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var uu=rr(),XP=Je(),ZP=ee(),JP=Ar(),eN=new RegExp(`(\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|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${uu.TIME_UNITS_PATTERN})${uu.REGEX_PARTS.rightBoundary}`,uu.REGEX_PARTS.flags),yh=class extends ZP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return uu.REGEX_PARTS.leftBoundary}innerPattern(){return eN}innerExtract(t,e){let n=e[1].toLowerCase(),i=uu.parseTimeUnits(e[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=JP.reverseTimeUnits(i);break}return XP.ParsingComponents.createRelativeFromReference(t.reference,i)}};bh.default=yh});var Sv=S(Tt=>{"use strict";var hr=Tt&&Tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.createConfiguration=Tt.createCasualConfiguration=Tt.parseDate=Tt.parse=Tt.strict=Tt.casual=void 0;var tN=hr(iv()),rN=hr(lv()),nN=hr(fv()),iN=hr(mv()),sN=hr(hv()),aN=hr(gv()),oN=hr(yv()),uN=$n(),lN=hr(bv()),cN=hr(Tv()),dN=hr(_v()),fN=hr(wv()),Ev=rn(),pN=hr(es()),mN=hr(kv());Tt.casual=new Ev.Chrono(Dv());Tt.strict=new Ev.Chrono(Th(!0));function hN(r,t,e){return Tt.casual.parse(r,t,e)}Tt.parse=hN;function gN(r,t,e){return Tt.casual.parseDate(r,t,e)}Tt.parseDate=gN;function Dv(){let r=Th(!1);return r.parsers.unshift(new lN.default),r.parsers.unshift(new cN.default),r.parsers.unshift(new nN.default),r.parsers.unshift(new fN.default),r.parsers.unshift(new mN.default),r}Tt.createCasualConfiguration=Dv;function Th(r=!0){return uN.includeCommonConfiguration({parsers:[new pN.default(!0),new tN.default,new rN.default,new dN.default,new iN.default(r),new sN.default],refiners:[new oN.default,new aN.default]},r)}Tt.createConfiguration=Th});var dt=S(Oe=>{"use strict";var yN=Oe&&Oe.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e),Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[e]}})}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]}),bN=Oe&&Oe.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),ki=Oe&&Oe.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&yN(t,r,e);return bN(t,r),t};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseDate=Oe.parse=Oe.casual=Oe.strict=Oe.ru=Oe.zh=Oe.nl=Oe.pt=Oe.ja=Oe.fr=Oe.de=Oe.Meridiem=Oe.Chrono=Oe.en=void 0;var _h=ki(Lf());Oe.en=_h;var TN=rn();Object.defineProperty(Oe,"Chrono",{enumerable:!0,get:function(){return TN.Chrono}});var _N;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(_N=Oe.Meridiem||(Oe.Meridiem={}));var vN=ki(Ib());Oe.de=vN;var wN=ki(cT());Oe.fr=wN;var kN=ki(TT());Oe.ja=kN;var EN=ki(IT());Oe.pt=EN;var DN=ki(T_());Oe.nl=DN;var SN=ki(J_());Oe.zh=SN;var ON=ki(Sv());Oe.ru=ON;Oe.strict=_h.strict;Oe.casual=_h.casual;function xN(r,t,e){return Oe.casual.parse(r,t,e)}Oe.parse=xN;function MN(r,t,e){return Oe.casual.parseDate(r,t,e)}Oe.parseDate=MN});var Cw=S((xw,Mw)=>{(function(r){var t=Object.hasOwnProperty,e=Array.isArray?Array.isArray:function(y){return Object.prototype.toString.call(y)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(p){var y=Object.getOwnPropertyNames(p);return y.push.apply(y,Object.getOwnPropertySymbols(p)),y}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(p){p&&(this._conf=p,p.delimiter&&(this.delimiter=p.delimiter),p.maxListeners!==r&&(this._maxListeners=p.maxListeners),p.wildcard&&(this.wildcard=p.wildcard),p.newListener&&(this._newListener=p.newListener),p.removeListener&&(this._removeListener=p.removeListener),p.verboseMemoryLeak&&(this.verboseMemoryLeak=p.verboseMemoryLeak),p.ignoreErrors&&(this.ignoreErrors=p.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(p,y){var v="(node) warning: possible EventEmitter memory leak detected. "+p+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(v+=" Event name: "+y+"."),typeof process!="undefined"&&process.emitWarning){var w=new Error(v);w.name="MaxListenersExceededWarning",w.emitter=this,w.count=p,process.emitWarning(w)}else console.error(v),console.trace&&console.trace()}var m=function(p,y,v){var w=arguments.length;switch(w){case 0:return[];case 1:return[p];case 2:return[p,y];case 3:return[p,y,v];default:for(var D=new Array(w);w--;)D[w]=arguments[w];return D}};function b(p,y){for(var v={},w,D=p.length,R=y?y.length:0,N=0;N0;)p=R[E],N.call(L,p,v[p]);this._listeners={},this._listenersCount=0,P()}}});function _(p,y,v,w){var D=Object.assign({},y);if(!p)return D;if(typeof p!="object")throw TypeError("options must be an object");var R=Object.keys(p),N=R.length,L,E,P;function U(me){throw Error('Invalid "'+L+'" option value'+(me?". Reason: "+me:""))}for(var ue=0;ue0;)if(L===p[E])return R;N(y)}}var M=O(["function"]),Y=O(["object","function"]);function G(p,y,v){var w,D,R=0,N,L=new p(function(E,P,U){v=_(v,{timeout:0,overload:!1},{timeout:function(je,Ne){return je*=1,(typeof je!="number"||je<0||!Number.isFinite(je))&&Ne("timeout must be a positive number"),je}}),w=!v.overload&&typeof p.prototype.cancel=="function"&&typeof U=="function";function ue(){D&&(D=null),R&&(clearTimeout(R),R=0)}var me=function(je){ue(),E(je)},ve=function(je){ue(),P(je)};w?y(me,ve,U):(D=[function(je){ve(je||Error("canceled"))}],y(me,ve,function(je){if(N)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof je!="function")throw TypeError("onCancel callback must be a function");D.push(je)}),N=!0),v.timeout>0&&(R=setTimeout(function(){var je=Error("timeout");je.code="ETIMEDOUT",R=0,L.cancel(je),P(je)},v.timeout))});return w||(L.cancel=function(E){if(!!D){for(var P=D.length,U=1;U0;)ve=Nt[L],ve!=="_listeners"&&(tt=V(p,y,v[ve],w+1,D),tt&&(me?me.push.apply(me,tt):me=tt));return me}else if(dr==="**"){for(Xr=w+1===D||w+2===D&&X==="*",Xr&&v._listeners&&(me=V(p,y,v,D,D)),Nt=l(v),L=Nt.length;L-- >0;)ve=Nt[L],ve!=="_listeners"&&(ve==="*"||ve==="**"?(v[ve]._listeners&&!Xr&&(tt=V(p,y,v[ve],D,D),tt&&(me?me.push.apply(me,tt):me=tt)),tt=V(p,y,v[ve],w,D)):ve===X?tt=V(p,y,v[ve],w+2,D):tt=V(p,y,v[ve],w,D),tt&&(me?me.push.apply(me,tt):me=tt));return me}else v[dr]&&(me=V(p,y,v[dr],w+1,D));if(je=v["*"],je&&V(p,y,je,w+1,D),Ne=v["**"],Ne)if(w0;)ve=Nt[L],ve!=="_listeners"&&(ve===X?V(p,y,Ne[ve],w+2,D):ve===dr?V(p,y,Ne[ve],w+1,D):(Pt={},Pt[ve]=Ne[ve],V(p,y,{"**":Pt},w+1,D)));else Ne._listeners?V(p,y,Ne,D,D):Ne["*"]&&Ne["*"]._listeners&&V(p,y,Ne["*"],D,D);return me}function K(p,y,v){var w=0,D=0,R,N=this.delimiter,L=N.length,E;if(typeof p=="string")if((R=p.indexOf(N))!==-1){E=new Array(5);do E[w++]=p.slice(D,R),D=R+L;while((R=p.indexOf(N,D))!==-1);E[w++]=p.slice(D)}else E=[p],w=1;else E=p,w=p.length;if(w>1){for(R=0;R+10&&P._listeners.length>this._maxListeners&&(P._listeners.warned=!0,f.call(this,P._listeners.length,U))):P._listeners=y,!0;return!0}function Se(p,y,v,w){for(var D=l(p),R=D.length,N,L,E,P=p._listeners,U;R-- >0;)L=D[R],N=p[L],L==="_listeners"?E=v:E=v?v.concat(L):[L],U=w||typeof L=="symbol",P&&y.push(U?E:E.join(this.delimiter)),typeof N=="object"&&Se.call(this,N,y,E,U);return y}function Pe(p){for(var y=l(p),v=y.length,w,D,R;v-- >0;)D=y[v],w=p[D],w&&(R=!0,D!=="_listeners"&&!Pe(w)&&delete p[D]);return R}function Q(p,y,v){this.emitter=p,this.event=y,this.listener=v}Q.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function B(p,y,v){if(v===!0)D=!0;else if(v===!1)w=!0;else{if(!v||typeof v!="object")throw TypeError("options should be an object or true");var w=v.async,D=v.promisify,R=v.nextTick,N=v.objectify}if(w||R||D){var L=y,E=y._origin||y;if(R&&!i)throw Error("process.nextTick is not supported");D===r&&(D=y.constructor.name==="AsyncFunction"),y=function(){var P=arguments,U=this,ue=this.event;return D?R?Promise.resolve():new Promise(function(me){u(me)}).then(function(){return U.event=ue,L.apply(U,P)}):(R?process.nextTick:u)(function(){U.event=ue,L.apply(U,P)})},y._async=!0,y._origin=E}return[y,N?new Q(this,p,y):this]}function C(p){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,p)}C.EventEmitter2=C,C.prototype.listenTo=function(p,y,v){if(typeof p!="object")throw TypeError("target musts be an object");var w=this;v=_(v,{on:r,off:r,reducers:r},{on:M,off:M,reducers:Y});function D(R){if(typeof R!="object")throw TypeError("events must be an object");var N=v.reducers,L=oe.call(w,p),E;L===-1?E=new T(w,p,v):E=w._observers[L];for(var P=l(R),U=P.length,ue,me=typeof N=="function",ve=0;ve0;)D=v[w],(!p||D._target===p)&&(D.unsubscribe(y),R=!0);return R},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(p){p!==r&&(this._maxListeners=p,this._conf||(this._conf={}),this._conf.maxListeners=p)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(p,y,v){return this._once(p,y,!1,v)},C.prototype.prependOnceListener=function(p,y,v){return this._once(p,y,!0,v)},C.prototype._once=function(p,y,v,w){return this._many(p,1,y,v,w)},C.prototype.many=function(p,y,v,w){return this._many(p,y,v,!1,w)},C.prototype.prependMany=function(p,y,v,w){return this._many(p,y,v,!0,w)},C.prototype._many=function(p,y,v,w,D){var R=this;if(typeof v!="function")throw new Error("many only accepts instances of Function");function N(){return--y===0&&R.off(p,N),v.apply(this,arguments)}return N._origin=v,this._on(p,N,w,D)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var p=arguments[0],y,v=this.wildcard,w,D,R,N,L;if(p==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(v&&(y=p,p!=="newListener"&&p!=="removeListener"&&typeof p=="object")){if(D=p.length,s){for(R=0;R3)for(w=new Array(E-1),N=1;N3)for(D=new Array(P-1),L=1;L0&&this._events[p].length>this._maxListeners&&(this._events[p].warned=!0,f.call(this,this._events[p].length,p))):this._events[p]=y,D)},C.prototype.off=function(p,y){if(typeof y!="function")throw new Error("removeListener only takes instances of Function");var v,w=[];if(this.wildcard){var D=typeof p=="string"?p.split(this.delimiter):p.slice();if(w=V.call(this,null,D,this.listenerTree,0),!w)return this}else{if(!this._events[p])return this;v=this._events[p],w.push({_listeners:v})}for(var R=0;R0){for(w=this._all,y=0,v=w.length;y0;)w=y[v[R]],typeof w=="function"?D.push(w):D.push.apply(D,w);return D}else{if(this.wildcard){if(N=this.listenerTree,!N)return[];var L=[],E=typeof p=="string"?p.split(this.delimiter):p.slice();return V.call(this,L,E,N,0),L}return y?(w=y[p],w?typeof w=="function"?[w]:w:[]):[]}},C.prototype.eventNames=function(p){var y=this._events;return this.wildcard?Se.call(this,this.listenerTree,[],null,p):y?l(y):[]},C.prototype.listenerCount=function(p){return this.listeners(p).length},C.prototype.hasListeners=function(p){if(this.wildcard){var y=[],v=typeof p=="string"?p.split(this.delimiter):p.slice();return V.call(this,y,v,this.listenerTree,0),y.length>0}var w=this._events,D=this._all;return!!(D&&D.length||w&&(p===r?l(w).length:w[p]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(p,y){var v=this,w=typeof y;return w==="number"?y={timeout:y}:w==="function"&&(y={filter:y}),y=_(y,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:x}),G(y.Promise,function(D,R,N){function L(){var E=y.filter;if(!(E&&!E.apply(v,arguments)))if(v.off(p,L),y.handleError){var P=arguments[0];P?R(P):D(m.apply(null,arguments).slice(1))}else D(m.apply(null,arguments))}N(function(){v.off(p,L)}),v._on(p,L,!1)},{timeout:y.timeout,overload:y.overload})};function Z(p,y,v){v=_(v,{Promise,timeout:0,overload:!1},{Promise:x});var w=v.Promise;return G(w,function(D,R,N){var L;if(typeof p.addEventListener=="function"){L=function(){D(m.apply(null,arguments))},N(function(){p.removeEventListener(y,L)}),p.addEventListener(y,L,{once:!0});return}var E=function(){P&&p.removeListener("error",P),D(m.apply(null,arguments))},P;y!=="error"&&(P=function(U){p.removeListener(y,E),R(U)},p.once("error",P)),N(function(){P&&p.removeListener("error",P),p.removeListener(y,E)}),p.once(y,E)},{timeout:v.timeout,overload:v.overload})}var W=C.prototype;if(Object.defineProperties(C,{defaultMaxListeners:{get:function(){return W._maxListeners},set:function(p){if(typeof p!="number"||p<0||Number.isNaN(p))throw TypeError("n must be a non-negative number");W._maxListeners=p},enumerable:!0},once:{value:Z,writable:!0,configurable:!0}}),Object.defineProperties(W,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return C});else if(typeof xw=="object")Mw.exports=C;else{var ae=new Function("","return this")();ae.EventEmitter2=C}})()});var Lk=S(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});var Ik=Symbol("MustacheDataPath");function Nk({target:r,propertyName:t}){return[...r[Ik]||[],t]}function Fk(r,t){return typeof r!="object"?r:new Proxy(r,{get(e,n){let i=e[n];if(i===void 0&&!(n in e)){let s=Nk({target:e,propertyName:n});if(t!=null&&t.handleError)return t.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[Ik]=Nk({target:e,propertyName:n}),Fk(i,t)):i}})}yg.default=Fk});var In=S(hn=>{"use strict";hn.__esModule=!0;hn.Tokens=hn.StructuralCharacters=hn.Operators=void 0;var oL;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(oL=hn.Operators||(hn.Operators={}));var uL;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(uL=hn.StructuralCharacters||(hn.StructuralCharacters={}));var lL;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(lL=hn.Tokens||(hn.Tokens={}))});var Eg=S(Ca=>{"use strict";Ca.__esModule=!0;Ca.VALID_TOKENS=Ca.OPERATOR_PRECEDENCE=void 0;var et=In();Ca.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Ca.VALID_TOKENS={identifierOnly:[{name:et.Tokens.IDENTIFIER},{name:et.Tokens.STRUCTURAL_CHARACTER,value:et.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:et.Tokens.IDENTIFIER},{name:et.Tokens.STRUCTURAL_CHARACTER,value:et.StructuralCharacters.OPEN_PARENTHESIS},{name:et.Tokens.OPERATOR,value:et.Operators.NOT}],binaryOperator:[{name:et.Tokens.OPERATOR,value:et.Operators.AND},{name:et.Tokens.OPERATOR,value:et.Operators.OR},{name:et.Tokens.OPERATOR,value:et.Operators.XOR}],binaryOperatorOrClose:[{name:et.Tokens.OPERATOR,value:et.Operators.AND},{name:et.Tokens.OPERATOR,value:et.Operators.OR},{name:et.Tokens.OPERATOR,value:et.Operators.XOR},{name:et.Tokens.STRUCTURAL_CHARACTER,value:et.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Dg=S(jt=>{"use strict";jt.__esModule=!0;jt.ESCAPE_CHARACTER=jt.EOL=jt.COMMENT_DELIMITER=jt.QUOTED_IDENTIFIER_DELIMITER=jt.SEPARATORS=jt.OPERATORS=jt.STRUCTURAL_CHARACTERS=void 0;var Ra=In();jt.STRUCTURAL_CHARACTERS={"(":Ra.StructuralCharacters.OPEN_PARENTHESIS,")":Ra.StructuralCharacters.CLOSE_PARENTHESIS};jt.OPERATORS={AND:Ra.Operators.AND,OR:Ra.Operators.OR,XOR:Ra.Operators.XOR,NOT:Ra.Operators.NOT};jt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));jt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);jt.COMMENT_DELIMITER=String.fromCodePoint(35);jt.EOL=String.fromCodePoint(10);jt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var $k=S(Kr=>{"use strict";var Sg=Kr&&Kr.__assign||function(){return Sg=Object.assign||function(r){for(var t,e=1,n=arguments.length;e{"use strict";Lc.__esModule=!0;Lc.lex=void 0;var Aa=In(),kr=Dg(),Pa=$k(),pL=function(r){for(var t=null,e=null,n=null,i=0;i{"use strict";var Hk=Er&&Er.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,s;n{"use strict";var Fn=Ia&&Ia.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,s;n{"use strict";Yt.__esModule=!0;Yt.throwInvalidExpression=Yt.isOperator=Yt.isIdentifier=Yt.notUtil=Yt.xorUtil=Yt.orUtil=Yt.andUtil=void 0;var Kk=In(),_L=function(r,t){return r&&t};Yt.andUtil=_L;var vL=function(r,t){return r||t};Yt.orUtil=vL;var wL=function(r,t){return r!==t};Yt.xorUtil=wL;var kL=function(r){return!r};Yt.notUtil=kL;var EL=function(r){var t=r.name,e=r.value;return t===Kk.Tokens.IDENTIFIER&&typeof e=="string"};Yt.isIdentifier=EL;var DL=function(r){var t=r.name,e=r.value;return t===Kk.Tokens.OPERATOR&&typeof e=="string"};Yt.isOperator=DL;var SL=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};Yt.throwInvalidExpression=SL});var Qk=S(qc=>{"use strict";var Iu;qc.__esModule=!0;qc.OPERATOR_MAP=void 0;var Cg=In(),Rg=Mg();qc.OPERATOR_MAP=(Iu={},Iu[Cg.Operators.AND]=Rg.andUtil,Iu[Cg.Operators.OR]=Rg.orUtil,Iu[Cg.Operators.XOR]=Rg.xorUtil,Iu)});var Zk=S(Qr=>{"use strict";var Fa=Qr&&Qr.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,s;n{"use strict";var Ag=Ln&&Ln.__createBinding||(Object.create?function(r,t,e,n){n===void 0&&(n=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(r,n,i)}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]});Ln.__esModule=!0;Ln.parse=Ln.evaluate=Ln.getEvaluator=void 0;var Jk=Zk();Ag(Ln,Jk,"getEvaluator");Ag(Ln,Jk,"evaluate");var AL=xg();Ag(Ln,AL,"parse")});var JL={};uD(JL,{default:()=>Dd});module.exports=lD(JL);var tD=require("obsidian");var ca=require("obsidian");var t2=new Error("timeout while waiting for mutex to become available"),r2=new Error("mutex already locked"),cD=new Error("request for lock canceled"),dD=function(r,t,e,n){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,t||[])).next())})},Cd=class{constructor(t,e=cD){this._value=t,this._cancelError=e,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((e,n)=>{this._weightedQueues[t-1]||(this._weightedQueues[t-1]=[]),this._weightedQueues[t-1].push({resolve:e,reject:n}),this._dispatch()})}runExclusive(t,e=1){return dD(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(e);try{return yield t(n)}finally{i()}})}waitForUnlock(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(e=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),this._weightedWaiters[t-1].push(e),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatch()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatch()}cancel(){this._weightedQueues.forEach(t=>t.forEach(e=>e.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var t;for(let e=this._value;e>0;e--){let n=(t=this._weightedQueues[e-1])===null||t===void 0?void 0:t.shift();if(!n)continue;let i=this._value,s=e;this._value-=e,e=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){for(let t=this._value;t>0;t--)!this._weightedWaiters[t-1]||(this._weightedWaiters[t-1].forEach(e=>e()),this._weightedWaiters[t-1]=[])}},fD=function(r,t,e,n){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,t||[])).next())})},zu=class{constructor(t){this._semaphore=new Cd(1,t)}acquire(){return fD(this,void 0,void 0,function*(){let[,t]=yield this._semaphore.acquire();return t})}runExclusive(t){return this._semaphore.runExclusive(()=>t())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Ku=require("obsidian"),Et=class{constructor(t,e={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=t,this._cachedMetadata=e;let n=e.frontmatter;if(n!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(n)),this._frontmatter.tags=(i=(0,Ku.parseFrontMatterTags)(n))!=null?i:[]),Object.keys(e).length!==0){let a=(s=(0,Ku.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(t){let e=this.cachedMetadata.frontmatter,n=t.cachedMetadata.frontmatter;return e===n?!0:!e||!n?!1:JSON.stringify(e)===JSON.stringify(n)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(t){return t.replace(/\.md$/,"")}get root(){let t=this.path.replace(/\\/g,"/");t.charAt(0)==="/"&&(t=t.substring(1));let e=t.indexOf("/");return e==-1?"/":t.substring(0,e+1)}get folder(){let t=this.path,e=this.filename,n=t.substring(0,t.lastIndexOf(e));return n===""?"/":n}get filename(){let t=this.path.match(/([^/]+)$/);return t!==null?t[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return!1;let n=this.frontmatter[e];return!(n===null||n===void 0)}property(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return null;let n=this.frontmatter[e];return n===void 0?null:Array.isArray(n)?n.filter(i=>i!==null):n}findKeyInFrontmatter(t){let e=t.toLowerCase();return Object.keys(this.frontmatter).find(n=>n.toLowerCase()===e)}};var fr=class{},le=fr;le.dateFormat="YYYY-MM-DD",le.dateTimeFormat="YYYY-MM-DD HH:mm",le.indentationRegex=/^([\s\t>]*)/,le.listMarkerRegex=/([-*+]|[0-9]+\.)/,le.checkboxRegex=/\[(.)\]/u,le.afterCheckboxRegex=/ *(.*)/u,le.taskRegex=new RegExp(fr.indentationRegex.source+fr.listMarkerRegex.source+" +"+fr.checkboxRegex.source+fr.afterCheckboxRegex.source,"u"),le.nonTaskRegex=new RegExp(fr.indentationRegex.source+fr.listMarkerRegex.source+"? *("+fr.checkboxRegex.source+")?"+fr.afterCheckboxRegex.source,"u"),le.listItemRegex=new RegExp(fr.indentationRegex.source+fr.listMarkerRegex.source),le.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,le.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,le.hashTagsFromEnd=new RegExp(fr.hashTags.source+"$");var jn=class{constructor(t,e){this.parent=null;this.children=[];this.description=t.replace(le.listItemRegex,"").trim(),this.originalMarkdown=t,this.parent=e,e!==null&&e.children.push(this)}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}identicalTo(t){return this.constructor.name!==t.constructor.name||this.originalMarkdown!==t.originalMarkdown?!1:jn.listsAreIdentical(this.children,t.children)}static listsAreIdentical(t,e){return t.length!==e.length?!1:t.every((n,i)=>n.identicalTo(e[i]))}};var jl=oo(dt());var Vt=class{constructor(t,e){this.start=t,this.end=e,e.isBefore(t)&&(this.start=e,this.end=t),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(t){let e=t==="week"?"isoWeek":t;return new Vt(window.moment().startOf(e).startOf("day"),window.moment().endOf(e).startOf("day"))}static buildInvalid(){return new Vt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(t){let e=window.moment.duration(1,t);this.start.subtract(e),this.end.subtract(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}moveToNext(t){let e=window.moment.duration(1,t);this.start.add(e),this.end.add(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}};var gr=class{static parseDate(t,e=!1){return window.moment(jl.parseDate(t,void 0,{forwardDate:e})).startOf("day")}static parseDateRange(t,e=!1){let n=[gr.parseRelativeDateRange,gr.parseNumberedDateRange,gr.parseAbsoluteDateRange];for(let i of n){let s=i(t,e);if(s.isValid())return s}return Vt.buildInvalid()}static parseAbsoluteDateRange(t,e){let n=jl.parse(t,void 0,{forwardDate:e});if(n.length===0)return Vt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new Vt(a,o)}static parseRelativeDateRange(t,e){let n=/(last|this|next) (week|month|quarter|year)/,i=t.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=Vt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Vt.buildInvalid()}static parseNumberedDateRange(t,e){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=t.match(i);if(o){let u=o[0].trim();return new Vt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return Vt.buildInvalid()}};var CN={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Yl(r){for(let[t,e]of Object.entries(CN))r=r.replace(RegExp(`\\b${t}\\s`,"i"),e);return r}var vh=oo(dt());function Ur(r,t){return r!==null&&t===null?-1:r===null&&t!==null?1:r!==null&&t!==null?r.isValid()&&!t.isValid()?1:!r.isValid()&&t.isValid()?-1:r.isAfter(t)?1:r.isBefore(t)?-1:0:0}function RN(r,t,e=void 0){if(!t)return`no ${r} date`;let n=vh.parseDate(t,e,{forwardDate:e!=null});return n!==null?window.moment(n).format("YYYY-MM-DD"):`invalid ${r} date`}function Ov(r,t,e){return RN(r,t,e?new Date:void 0)}function as(r,t){let e=null,n=vh.parseDate(r,new Date,{forwardDate:t});return n!==null&&(e=window.moment(n)),e}var Wr=class{constructor({startDate:t=null,scheduledDate:e=null,dueDate:n=null}){this.startDate=t!=null?t:null,this.scheduledDate=e!=null?e:null,this.dueDate=n!=null?n:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(t){return!(Ur(this.startDate,t.startDate)!==0||Ur(this.scheduledDate,t.scheduledDate)!==0||Ur(this.dueDate,t.dueDate)!==0)}next(t){return this.referenceDate===null?new Wr({startDate:null,scheduledDate:null,dueDate:null}):new Wr({startDate:this.nextOccurrenceDate(this.startDate,t),scheduledDate:this.nextOccurrenceDate(this.scheduledDate,t),dueDate:this.nextOccurrenceDate(this.dueDate,t)})}nextOccurrenceDate(t,e){if(t===null)return null;let n=window.moment.duration(t.diff(this.referenceDate)),i=window.moment(e);return i.add(Math.round(n.asDays()),"days"),i}};var $l=["MO","TU","WE","TH","FR","SA","SU"],ot=function(){function r(t,e){if(e===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return r.fromStr=function(t){return new r($l.indexOf(t))},r.prototype.nth=function(t){return this.n===t?this:new r(this.weekday,t)},r.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},r.prototype.toString=function(){var t=$l[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Qe=function(r){return r!=null},yr=function(r){return typeof r=="number"},wh=function(r){return typeof r=="string"&&$l.includes(r)},xt=Array.isArray,qr=function(r,t){t===void 0&&(t=r),arguments.length===1&&(t=r,r=0);for(var e=[],n=r;n>0,n.length>t?String(n):(t=t-n.length,t>e.length&&(e+=Ce(e,t/e.length)),e.slice(0,t)+String(n))}var Mv=function(r,t,e){var n=r.split(t);return e?n.slice(0,e).concat([n.slice(e).join(t)]):n},It=function(r,t){var e=r%t;return e*t<0?e+t:e},Gl=function(r,t){return{div:Math.floor(r/t),mod:It(r,t)}},br=function(r){return!Qe(r)||r.length===0},rt=function(r){return!br(r)},Re=function(r,t){return rt(r)&&r.indexOf(t)!==-1};var On=function(r,t,e,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,t-1,e,n,i,s))},AN=[31,28,31,30,31,30,31,31,30,31,30,31],Av=1e3*60*60*24,Hl=9999,Pv=On(1970,1,1),PN=[6,0,1,2,3,4,5];var ea=function(r){return r%4===0&&r%100!==0||r%400===0},kh=function(r){return r instanceof Date},us=function(r){return kh(r)&&!isNaN(r.getTime())},Cv=function(r){return r.getTimezoneOffset()*60*1e3},NN=function(r,t){var e=r.getTime()-Cv(r),n=t.getTime()-Cv(t),i=e-n;return Math.round(i/Av)},lu=function(r){return NN(r,Pv)},Bl=function(r){return new Date(Pv.getTime()+r*Av)},IN=function(r){var t=r.getUTCMonth();return t===1&&ea(r.getUTCFullYear())?29:AN[t]},Xn=function(r){return PN[r.getUTCDay()]},Eh=function(r,t){var e=On(r,t+1,1);return[Xn(e),IN(e)]},Vl=function(r,t){return t=t||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},zl=function(r){var t=new Date(r.getTime());return t},Dh=function(r){for(var t=[],e=0;ethis.maxDate;if(this.method==="between"){if(e)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return e?!0:(this.add(t),!1);return this.add(t)},r.prototype.add=function(t){return this._result.push(t),!0},r.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}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Jn=FN;var Sh=function(r,t){return Sh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Sh(r,t)};function ra(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Sh(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Mt=function(){return Mt=Object.assign||function(t){for(var e,n=1,i=arguments.length;nt[0].length)&&(t=s,e=i)}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},r.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},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},r}();function du(r,t){t===void 0&&(t=ls);var e={},n=new YN(t.tokens);if(!n.start(r))return null;return i(),e;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(e.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":e.freq=re.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":e.freq=re.WEEKLY,e.byweekday=[re.MO,re.TU,re.WE,re.TH,re.FR],n.nextSymbol(),d();break;case"week(s)":e.freq=re.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":e.freq=re.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":e.freq=re.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":e.freq=re.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":e.freq=re.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":e.freq=re.WEEKLY;var m=n.symbol.substr(0,2).toUpperCase();if(e.byweekday=[re[m]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var b=u();if(!b)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");e.byweekday.push(re[b]),n.nextSymbol()}c(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(e.freq=re.YEARLY,e.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var T=o();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected month");e.bymonth.push(T),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),m=n.accept("the");if(!!(f||m))do{var b=l(),T=u(),_=o();if(b)T?(n.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(re[T].nth(b))):(e.bymonthday||(e.bymonthday=[]),e.bymonthday.push(b),n.accept("day(s)"));else if(T)n.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(re[T]);else if(n.symbol==="weekday(s)")n.nextSymbol(),e.byweekday||(e.byweekday=[re.MO,re.TU,re.WE,re.TH,re.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var x=n.acceptNumber();if(!x)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(e.byweekno=[parseInt(x[0],10)];n.accept("comma");){if(x=n.acceptNumber(),!x)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");e.byweekno.push(parseInt(x[0],10))}}else if(_)n.nextSymbol(),e.bymonth||(e.bymonth=[]),e.bymonth.push(_);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var m=n.acceptNumber();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(e.byhour=[parseInt(m[0],10)];n.accept("comma");){if(m=n.acceptNumber(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");e.byhour.push(parseInt(m[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(e.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");e.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);e.until=new Date(f)}else n.accept("for")&&(e.count=parseInt(n.value[0],10),n.expect("number"))}}var xe;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(xe||(xe={}));function fu(r){return r12){var n=Math.floor(this.month/12),i=It(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+e*7:this.day+=-(this.getWeekday()-n)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=Gl(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),br(i)||Re(i,this.hour))break}},t.prototype.addMinutes=function(e,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var a=Gl(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(br(i)||Re(i,this.hour))&&(br(s)||Re(s,this.minute)))break}},t.prototype.addSeconds=function(e,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var o=Gl(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(br(i)||Re(i,this.hour))&&(br(s)||Re(s,this.minute))&&(br(a)||Re(a,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=Eh(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>Hl))return;e=Eh(this.year,this.month-1)[1]}}},t.prototype.add=function(e,n){var i=e.freq,s=e.interval,a=e.wkst,o=e.byhour,u=e.byminute,l=e.bysecond;switch(i){case xe.YEARLY:return this.addYears(s);case xe.MONTHLY:return this.addMonths(s);case xe.WEEKLY:return this.addWeekly(s,a);case xe.DAILY:return this.addDaily(s);case xe.HOURLY:return this.addHours(s,n,o);case xe.MINUTELY:return this.addMinutes(s,n,o,u);case xe.SECONDLY:return this.addSeconds(s,n,o,u,l)}},t}(ia);function xh(r){for(var t=[],e=Object.keys(r),n=0,i=e;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||rt(t.byweekno)||rt(t.byyearday)||Boolean(t.bymonthday)||rt(t.bymonthday)||Qe(t.byweekday)||Qe(t.byeaster)))switch(t.freq){case re.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case re.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case re.WEEKLY:t.byweekday=[Xn(t.dtstart)];break}if(Qe(t.bymonth)&&!xt(t.bymonth)&&(t.bymonth=[t.bymonth]),Qe(t.byyearday)&&!xt(t.byyearday)&&yr(t.byyearday)&&(t.byyearday=[t.byyearday]),!Qe(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(xt(t.bymonthday)){for(var i=[],s=[],e=0;e0?i.push(n):n<0&&s.push(n)}t.bymonthday=i,t.bynmonthday=s}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Qe(t.byweekno)&&!xt(t.byweekno)&&(t.byweekno=[t.byweekno]),!Qe(t.byweekday))t.bynweekday=null;else if(yr(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(wh(t.byweekday))t.byweekday=[ot.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof ot)!t.byweekday.n||t.freq>re.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],e=0;ere.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}t.byweekday=rt(a)?a:null,t.bynweekday=rt(o)?o:null}return Qe(t.byhour)?yr(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq=4?(c=0,l=o.yearlen+It(a-t.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=It(l,7),m=Math.floor(d+f/4),b=0;b0&&T<=m){var _=void 0;T>1?(_=c+(T-1)*7,c!==u&&(_-=7-u)):_=c;for(var x=0;x<7&&(o.wnomask[_]=1,_++,o.wdaymask[_]!==t.wkst);x++);}}if(Re(t.byweekno,1)){var _=c+m*7;if(c!==u&&(_-=7-u),_=4?(Y=0,oe=G+It(M-t.wkst,7)):oe=n-c,O=Math.floor(52+It(oe,7)/4)}if(Re(t.byweekno,O))for(var _=0;_s)return ei(r);if(O>=e){var M=sw(O,t);if(!r.accept(M)||o&&(--o,!o))return ei(r)}}else for(var x=m;xs)return ei(r);if(O>=e){var M=sw(O,t);if(!r.accept(M)||o&&(--o,!o))return ei(r)}}}if(t.interval===0||(u.add(t,T),u.year>Hl))return ei(r);fu(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function eI(r,t,e){var n=e.bymonth,i=e.byweekno,s=e.byweekday,a=e.byeaster,o=e.bymonthday,u=e.bynmonthday,l=e.byyearday;return rt(n)&&!Re(n,r.mmask[t])||rt(i)&&!r.wnomask[t]||rt(s)&&!Re(s,r.wdaymask[t])||rt(r.nwdaymask)&&!r.nwdaymask[t]||a!==null&&!Re(r.eastermask,t)||(rt(o)||rt(u))&&!Re(o,r.mdaymask[t])&&!Re(u,r.nmdaymask[t])||rt(l)&&(t=r.yearlen&&!Re(l,t+1-r.yearlen)&&!Re(l,-r.nextyearlen+t-r.yearlen))}function sw(r,t){return new cs(r,t.tzid).rezonedDate()}function ei(r){return r.getValue()}function tI(r,t,e,n,i){for(var s=!1,a=t;a=re.HOURLY&&rt(i)&&!Re(i,t.hour)||n>=re.MINUTELY&&rt(s)&&!Re(s,t.minute)||n>=re.SECONDLY&&rt(a)&&!Re(a,t.second)?[]:r.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}var jr={MO:new ot(0),TU:new ot(1),WE:new ot(2),TH:new ot(3),FR:new ot(4),SA:new ot(5),SU:new ot(6)},pu={freq:xe.YEARLY,dtstart:null,interval:1,wkst:jr.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},Yv=Object.keys(pu),re=function(){function r(t,e){t===void 0&&(t={}),e===void 0&&(e=!1),this._cache=e?null:new Hv,this.origOptions=xh(t);var n=qv(t).parsedOptions;this.options=n}return r.parseText=function(t,e){return du(t,e)},r.fromText=function(t,e){return Fv(t,e)},r.fromString=function(t){return new r(r.parseString(t)||void 0)},r.prototype._iter=function(t){return Kl(t,this.options)},r.prototype._cacheGet=function(t,e){return this._cache?this._cache._cacheGet(t,e):!1},r.prototype._cacheAdd=function(t,e,n){if(!!this._cache)return this._cache._cacheAdd(t,e,n)},r.prototype.all=function(t){if(t)return this._iter(new Oh("all",{},t));var e=this._cacheGet("all");return e===!1&&(e=this._iter(new Jn("all",{})),this._cacheAdd("all",e)),e},r.prototype.between=function(t,e,n,i){if(n===void 0&&(n=!1),!us(t)||!us(e))throw new Error("Invalid date passed in to RRule.between");var s={before:e,after:t,inc:n};if(i)return this._iter(new Oh("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Jn("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(t,e){if(e===void 0&&(e=!1),!us(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:e},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Jn("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(t,e){if(e===void 0&&(e=!1),!us(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:e},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Jn("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return gu(this.origOptions)},r.prototype.toText=function(t,e,n){return Lv(this,t,e,n)},r.prototype.isFullyConvertibleToText=function(){return Uv(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=xe.YEARLY,r.MONTHLY=xe.MONTHLY,r.WEEKLY=xe.WEEKLY,r.DAILY=xe.DAILY,r.HOURLY=xe.HOURLY,r.MINUTELY=xe.MINUTELY,r.SECONDLY=xe.SECONDLY,r.MO=jr.MO,r.TU=jr.TU,r.WE=jr.WE,r.TH=jr.TH,r.FR=jr.FR,r.SA=jr.SA,r.SU=jr.SU,r.parseString=hu,r.optionsToString=gu,r}();function aw(r,t,e,n,i,s){var a={},o=r.accept;function u(f,m){e.forEach(function(b){b.between(f,m,!0).forEach(function(T){a[Number(T)]=!0})})}i.forEach(function(f){var m=new cs(f,s).rezonedDate();a[Number(m)]=!0}),r.accept=function(f){var m=Number(f);return isNaN(m)?o.call(this,f):!a[m]&&(u(new Date(m-1),new Date(m+1)),!a[m])?(a[m]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var m=Number(f);return a[m]?!0:(a[m]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var c=new Rh(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new re(Ch(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new re(Ch(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),t.compatible&&t.dtstart&&c.rdate(o),c}var d=n[0]||{};return new re(Ch(d,d.dtstart||t.dtstart||o,d.tzid||t.tzid||u),l)}function Ql(r,t){return t===void 0&&(t={}),iI(r,sI(t))}function Ch(r,t,e){return Mt(Mt({},r),{dtstart:t,tzid:e})}function sI(r){var t=[],e=Object.keys(r),n=Object.keys(ow);if(e.forEach(function(i){Re(n,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return Mt(Mt({},ow),r)}function aI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var t=Mv(r,":",1),e=t[0],n=t[1];return{name:e,value:n}}function oI(r){var t=aI(r),e=t.name,n=t.value,i=e.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function uI(r,t){if(t===void 0&&(t=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!t)return r.split(/\s/);for(var e=r.split(` +`),n=0;n0&&i[0]===" "?(e[n-1]+=i.slice(1),e.splice(n,1)):n+=1:e.splice(n,1)}return e}function lI(r){r.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function uw(r,t){return lI(t),r.split(",").map(function(e){return cu(e)})}function lw(r){var t=this;return function(e){if(e!==void 0&&(t["_".concat(r)]=e),t["_".concat(r)]!==void 0)return t["_".concat(r)];for(var n=0;nn}static nextAfterYears(t,e,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));_t.isSkippingTooManyYears(t,e,s);)e=_t.fromOneDayEarlier(t,n);return e}static isSkippingTooManyYears(t,e,n){return e.year()-t.year()>n}static fromOneDayEarlier(t,e){t.subtract(1,"days").endOf("day");let n=e.origOptions;return n.dtstart=t.startOf("day").toDate(),e=new re(n),window.moment.utc(e.after(t.toDate()))}static addTimezone(t){return window.moment.utc(t).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}};var sa=(m=>(m.Description="description",m.Id="id",m.DependsOn="dependsOn",m.Priority="priority",m.RecurrenceRule="recurrenceRule",m.OnCompletion="onCompletion",m.CreatedDate="createdDate",m.StartDate="startDate",m.ScheduledDate="scheduledDate",m.DueDate="dueDate",m.CancelledDate="cancelledDate",m.DoneDate="doneDate",m.BlockLink="blockLink",m))(sa||{}),Xl=Object.values(sa),Mn=class{constructor(){this.visible={};this.tagsVisible=!0;Xl.forEach(t=>{this.visible[t]=!0})}isShown(t){return this.visible[t]}areTagsShown(){return this.tagsVisible}hide(t){this.visible[t]=!1}setVisibility(t,e){this.visible[t]=e}setTagsVisibility(t){this.tagsVisible=t}get shownComponents(){return Xl.filter(t=>this.visible[t])}get hiddenComponents(){return Xl.filter(t=>!this.visible[t])}get toggleableComponents(){return Xl.filter(t=>t!=="description"&&t!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(t=>{this.visible[t]=!this.visible[t]}),this.setTagsVisibility(!this.areTagsShown())}};var zt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(zt||{}),ft=class{constructor(t,e,n,i,s="TODO"){this.symbol=t,this.name=e,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};function pw(r){let t=r.trim().toLowerCase();return t==="delete"?"delete":t==="keep"?"keep":""}function cI(r,t){return r.filter(e=>e!==t)}function dI(r,t){let e=r.status,n=t.status,i=n.type===e.type;return n.type!=="DONE"||i}function mw(r,t){let e=t.length;if(r.onCompletion===""||r.onCompletion==="keep"||e===0)return t;let n=t[e-1];if(dI(r,n))return t;let s=r.onCompletion;return s==="delete"?cI(t,n):(console.log(`OnCompletion action ${s} not yet implemented.`),t)}var ds=/[a-zA-Z0-9-_]+/,Ah=new RegExp(ds.source+"( *, *"+ds.source+" *)*");function aa(r){return ua(r,"(\\d{4}-\\d{2}-\\d{2})")}function ua(r,t){let e=r+"\uFE0F?";return t!==""&&(e+=" *"+t),e+="$",new RegExp(e,"u")}var yu={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:ua("([\u{1F53A}\u23EB\u{1F53C}\u{1F53D}\u23EC])",""),startDateRegex:aa("\u{1F6EB}"),createdDateRegex:aa("\u2795"),scheduledDateRegex:aa("[\u23F3\u231B]"),dueDateRegex:aa("[\u{1F4C5}\u{1F4C6}\u{1F5D3}]"),doneDateRegex:aa("\u2705"),cancelledDateRegex:aa("\u274C"),recurrenceRegex:ua("\u{1F501}","([a-zA-Z0-9, !]+)"),onCompletionRegex:ua("\u{1F3C1}","([a-zA-Z]+)"),dependsOnRegex:ua("\u26D4","("+Ah.source+")"),idRegex:ua("\u{1F194}","("+ds.source+")")}};function Zl(r,t,e){return e?r?" "+t:` ${t} ${e}`:""}function oa(r,t,e){return e?r?" "+t:` ${t} ${e.format(le.dateFormat)}`:""}function hw(){let r=[];return Object.values(yu.prioritySymbols).forEach(t=>{t.length>0&&r.push(t)}),Object.values(yu).forEach(t=>{typeof t=="string"&&r.push(t)}),r}var fs=class{constructor(t){this.symbols=t}serialize(t){let e=new Mn,n="",i=!1;for(let s of e.shownComponents)n+=this.componentToString(t,i,s);return n}componentToString(t,e,n){var T;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:f,dependsOnSymbol:m,idSymbol:b}=this.symbols;switch(n){case"description":return t.description;case"priority":{let _="";return t.priority==="0"?_=" "+i.Highest:t.priority==="1"?_=" "+i.High:t.priority==="2"?_=" "+i.Medium:t.priority==="4"?_=" "+i.Low:t.priority==="5"&&(_=" "+i.Lowest),_}case"startDate":return oa(e,s,t.startDate);case"createdDate":return oa(e,a,t.createdDate);case"scheduledDate":return t.scheduledDateIsInferred?"":oa(e,o,t.scheduledDate);case"doneDate":return oa(e,u,t.doneDate);case"cancelledDate":return oa(e,l,t.cancelledDate);case"dueDate":return oa(e,f,t.dueDate);case"recurrenceRule":return t.recurrence?Zl(e,c,t.recurrence.toText()):"";case"onCompletion":return t.onCompletion===""?"":Zl(e,d,t.onCompletion);case"dependsOn":return t.dependsOn.length===0?"":Zl(e,m,t.dependsOn.join(","));case"id":return Zl(e,b,t.id);case"blockLink":return(T=t.blockLink)!=null?T:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(t){let{prioritySymbols:e}=this.symbols;switch(t){case e.Lowest:return"5";case e.Low:return"4";case e.Medium:return"2";case e.High:return"1";case e.Highest:return"0";default:return"3"}}deserialize(t){let{TaskFormatRegularExpressions:e}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c=null,d="",f=null,m="",b="",T=[],_="",x=20,O=0;do{n=!1;let M=t.match(e.priorityRegex);M!==null&&(i=this.parsePriority(M[1]),t=t.replace(e.priorityRegex,"").trim(),n=!0);let Y=t.match(e.doneDateRegex);Y!==null&&(u=window.moment(Y[1],le.dateFormat),t=t.replace(e.doneDateRegex,"").trim(),n=!0);let G=t.match(e.cancelledDateRegex);G!==null&&(l=window.moment(G[1],le.dateFormat),t=t.replace(e.cancelledDateRegex,"").trim(),n=!0);let oe=t.match(e.dueDateRegex);oe!==null&&(o=window.moment(oe[1],le.dateFormat),t=t.replace(e.dueDateRegex,"").trim(),n=!0);let V=t.match(e.scheduledDateRegex);V!==null&&(a=window.moment(V[1],le.dateFormat),t=t.replace(e.scheduledDateRegex,"").trim(),n=!0);let K=t.match(e.startDateRegex);K!==null&&(s=window.moment(K[1],le.dateFormat),t=t.replace(e.startDateRegex,"").trim(),n=!0);let Se=t.match(e.createdDateRegex);Se!==null&&(c=window.moment(Se[1],le.dateFormat),t=t.replace(e.createdDateRegex,"").trim(),n=!0);let Pe=t.match(e.recurrenceRegex);Pe!==null&&(d=Pe[1].trim(),t=t.replace(e.recurrenceRegex,"").trim(),n=!0);let Q=t.match(e.onCompletionRegex);if(Q!=null){t=t.replace(e.onCompletionRegex,"").trim();let W=Q[1];m=pw(W),n=!0}let B=t.match(le.hashTagsFromEnd);if(B!=null){t=t.replace(le.hashTagsFromEnd,"").trim(),n=!0;let W=B[0].trim();_=_.length>0?[W,_].join(" "):W}let C=t.match(e.idRegex);C!=null&&(t=t.replace(e.idRegex,"").trim(),b=C[1].trim(),n=!0);let Z=t.match(e.dependsOnRegex);Z!=null&&(t=t.replace(e.dependsOnRegex,"").trim(),T=Z[1].replace(/ /g,"").split(",").filter(W=>W!==""),n=!0),O++}while(n&&O<=x);return d.length>0&&(f=_t.fromText({recurrenceRuleText:d,occurrence:new Wr({startDate:s,scheduledDate:a,dueDate:o})})),_.length>0&&(t+=" "+_),{description:t,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:f,onCompletion:m,id:b,dependsOn:T,tags:de.extractHashtags(t)}}};function bu(r){let t="",e=!0;for(;e;)t=Math.random().toString(36).substring(2,6+2),r.includes(t)||(e=!1);return t}function ec(r,t){return r.id!==""?r:new de(Ee(ne({},r),{id:bu(t)}))}function gw(r,t){let e=r;if(!r.dependsOn.includes(t.id)){let n=[...r.dependsOn,t.id];e=new de(Ee(ne({},r),{dependsOn:n}))}return e}function yw(r,t){let e=r;if(r.dependsOn.includes(t.id)){let n=r.dependsOn.filter(i=>i!==t.id);e=new de(Ee(ne({},r),{dependsOn:n}))}return e}function Si(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Oi=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Oi.instance||(Oi.instance=new Oi),Oi.instance}get(){return this._globalFilter}set(t){this._globalFilter=t}reset(){this.set(Oi.empty)}isEmpty(){return this.get()===Oi.empty}equals(t){return this.get()===t}includedIn(t){let e=this.get();return t.includes(e)}prependTo(t){return this.get()+" "+t}removeAsWordFromDependingOnSettings(t){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(t):t}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(t){this._removeGlobalFilter=t}removeAsWordFrom(t){if(this.isEmpty())return t;let e=RegExp("(^|\\s)"+Si(this.get())+"($|\\s)","ug");return t.search(e)>-1&&(t=t.replace(e,"$1$2").replace(" "," ").trim()),t}removeAsSubstringFrom(t){let e=this.get();return t.replace(e,"").trim()}},Ae=Oi;Ae.empty="";var Tw=require("obsidian");var pI=20;function ps(r){return Ae.getInstance().removeAsWordFrom(r.description)}function mI(r,t){if(r==="")return t;let e=(0,Tw.prepareSimpleSearch)(r),n=-4;return t.map(a=>{let o=e(ps(a));return o&&o.score>n?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function tc(r,t,e,n,i){let s=mI(r,t);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(e==null?void 0:e.description)&&a.taskLocation.path===(e==null?void 0:e.taskLocation.path)&&a.originalMarkdown===(e==null?void 0:e.originalMarkdown)||(n==null?void 0:n.includes(a))||(i==null?void 0:i.includes(a)))),e&&s.sort((a,o)=>{let u=a.taskLocation.path===e.taskLocation.path,l=o.taskLocation.path===e.taskLocation.path;return u&&l?Math.abs(a.taskLocation.lineNumber-e.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-e.taskLocation.lineNumber):u?-1:l?1:0}),s.slice(0,pI)}var Ph=5,hI=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=hI;function _w(r){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&r}function Nh(r,t,e){let n=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(i,s,a,o,u,l)=>{let c=[],{postfix:d,insertSkip:f}=gI(e,i,s),m={line:i,cursorPos:s,settings:a,dataviewMode:e,postfix:d,insertSkip:f};return c=c.concat(wI(n,t,m)),c=c.concat(kI(r.recurrenceSymbol,m)),_w(u)&&(c=c.concat(DI(r.idSymbol,o,m)),c=c.concat(SI(r.dependsOnSymbol,o,m,l))),c=c.concat(EI(r.onCompletionSymbol,t,m)),c=c.concat(yI(r,u,m)),c.length>0&&!c.some(b=>b.suggestionType==="match")&&(e||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function gI(r,t,e){let n=xI(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&t.length>e&&t.charAt(e)===n?1:0;return{postfix:i,insertSkip:s}}function yI(r,t,e){let n=[],i=e.line;ms(n,i,r.dueDateSymbol,"due date"),ms(n,i,r.startDateSymbol,"start date"),ms(n,i,r.scheduledDateSymbol,"scheduled date"),bI(n,r,e),ms(n,i,r.recurrenceSymbol,"recurring (repeat)"),TI(n,r,e),_w(t)&&(ms(n,i,r.idSymbol,"id"),ms(n,i,r.dependsOnSymbol,"depends on id")),ms(n,i,r.onCompletionSymbol,"on completion");let s=_I(n,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?n:s}function ms(r,t,e,n){t.includes(e)||r.push({displayText:`${e} ${n}`,appendText:`${e} `})}function bI(r,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];r.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function TI(r,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=gr.parseDate("today",!0).format(le.dateFormat);r.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function _I(r,t){let e=la(/([a-zA-Z'_-]*)/g,t),n=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=r.filter(a=>{var u;return((u=a.textToMatch)!=null?u:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;n.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return n}function vw(r,t){let e=`${t}`,n=`${r} ${t}`;return{displayText:e,appendText:n}}function vI(r,t){let n=`${gr.parseDate(t,!0).format(le.dateFormat)}`,i=`${t} (${n})`,s=`${r} ${n}`;return{displayText:i,appendText:s}}function wI(r,t,e){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=la(s,e);if(a&&a.length>=2){let o=a[2];if(o.length1?gr.parseDate(Yl(o),!0):null;if(u!=null&&u.isValid()){let c=u.format(le.dateFormat);rc(e,a,[c],vw,i)}let l=Ih(n,o,t,!0);rc(e,a,l,vI,i)}return i}function kI(r,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],n=[],i=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),s=la(i,t);if(s&&s.length>=2){let o=s[1],u=s[2];if(u.length0){let f=(a=_t.fromText({recurrenceRuleText:u,occurrence:new Wr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let m=`${o} ${f}`+t.postfix;if(n.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:m,insertAt:s.index,insertSkip:Fh(s[0],t)}),s[0]==m)return[]}}let l=t.settings.autoSuggestMaxItems/2,c=Ih(e,u,l,!1);c.length===0&&u.trim().length===0&&(c=e.slice(0,l)),rc(t,s,c,(f,m)=>{let b=`${m}`,T=`${f} ${m}`;return{displayText:b,appendText:T}},n)}return n}function EI(r,t,e){let n=["delete","keep"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=la(s,e);if(a&&a.length>=2){let o=a[2];if(o.lengtho.id));n.push({suggestionType:"match",displayText:"generate unique id",appendText:`${r} ${a}`+e.postfix,insertAt:s.index,insertSkip:Fh(s[0],e)})}return n}function SI(r,t,e,n){let i=[],s=e.dataviewMode?Si("()[]"):hw(),a=new RegExp(`(${r})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=la(a,e);if(o&&o.length>=1){let u=o[2]||"",l=o[3],c=[];if(u){let d=u.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(l.length>=e.settings.autoSuggestMinMatch){let d=tc(l.trim(),t,n,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${r}${u}`,insertAt:o.index,insertSkip:r.length+u.length+l.length,taskItDependsOn:f})}}return i}function Ih(r,t,e,n){let s=r.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return n&&s.length===0&&(s=r.slice(0,e)),s}function rc(r,t,e,n,i){let s=t[1];for(let a of e){let{displayText:o,appendText:u}=n(s,a);i.push({suggestionType:"match",displayText:o,appendText:u+r.postfix,insertAt:t.index,insertSkip:Fh(t[0],r)})}}function la(r,t){let e=t.line.matchAll(r),n=t.cursorPos;for(let i of e)if((i==null?void 0:i.index)&&i.index[i,0])),n=Object.fromEntries(t.map(([i,s])=>[s,i]));for(let i of r)i in e?e[i]++:i in n&&(e[n[i]]=Math.max(0,e[n[i]]-1));return Object.values(e).some(i=>i>0)}function xI(r,t){if(t.length===0)return null;let e=Object.fromEntries(t.map(([s,a])=>[s,0])),n=Object.fromEntries(t.map(([s,a])=>[a,s])),i=[];for(let s=0;s=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==n[a]){i.splice(o,1);break}}e[n[a]]=Math.max(0,e[n[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function ww(r,t){return(e,n,i,s,a)=>OI(e.slice(0,n),t)?r(e,n,i,s,a):[]}function kw(r,t,e){let n=Ae.getInstance().includedIn(r),i=MI(e,t,n);return typeof i=="boolean"?i:n&&CI(r,t.ch)}function MI(r,t,e){var n,i;return(i=(n=r==null?void 0:r.editorComponent)==null?void 0:n.showTasksPluginAutoSuggest)==null?void 0:i.call(n,t,r,e)}function CI(r,t){if(r.length===0)return!1;let e=de.extractTaskComponents(r);if(!e)return!1;let n=e.indentation+e.listMarker+" ["+e.status.symbol+"] ";return t>=n.length}function Fh(r,t){return t.dataviewMode?r.length+t.insertSkip:r.length}var Tr=class{static priorityNameUsingNone(t){let e="ERROR";switch(t){case"1":e="High";break;case"0":e="Highest";break;case"2":e="Medium";break;case"3":e="None";break;case"4":e="Low";break;case"5":e="Lowest";break}return e}static priorityNameUsingNormal(t){return Tr.priorityNameUsingNone(t).replace("None","Normal")}static priorityValue(t){switch(t.toLowerCase()){case"lowest":return"5";case"low":return"4";case"medium":return"2";case"high":return"1";case"highest":return"0";default:return"3"}}};function ln(r){let t=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(e=>e instanceof RegExp?e.source:e).join("");return new RegExp(t,r.flags)}var Lh={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:ln(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:ln(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:ln(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:ln(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:ln(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:ln(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:ln(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:ln(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:ln(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:ln(new RegExp("dependsOn:: *("+Ah.source+")")),idRegex:ln(new RegExp("id:: *("+ds.source+")"))}},nc=class extends fs{constructor(){super(Lh)}parsePriority(t){return Tr.priorityValue(t)}componentToString(t,e,n){let i=super.componentToString(t,e,n),s=["blockLink","description"];return i!==""&&!s.includes(n)?` [${i.trim()}]`:i}};var Yr=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let t=this.type,e;switch(t){case"IN_PROGRESS":e="1";break;case"TODO":e="2";break;case"DONE":e="3";break;case"CANCELLED":e="4";break;case"NON_TASK":e="5";break;case"EMPTY":e="6";break}return`%%${e}%%${t}`}constructor(t){this.configuration=t}static getTypeForUnknownSymbol(t){switch(t){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(t){return zt[t]||"TODO"}static createUnknownStatus(t){return new Yr(new ft(t,"Unknown","x",!1,"TODO"))}static createFromImportedValue(t){let e=t[0],n=Yr.getTypeFromStatusTypeString(t[3]);return new Yr(new ft(e,t[1],t[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(t){let e=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of e)if(this[n]!==t[n])return!1;return!0}previewText(){let t="";return Yr.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(t=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${t}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},pe=Yr;pe.DONE=new Yr(new ft("x","Done"," ",!0,"DONE")),pe.EMPTY=new Yr(new ft("","EMPTY","",!0,"EMPTY")),pe.TODO=new Yr(new ft(" ","Todo","x",!0,"TODO")),pe.CANCELLED=new Yr(new ft("-","Cancelled"," ",!0,"CANCELLED")),pe.IN_PROGRESS=new Yr(new ft("/","In Progress","x",!0,"IN_PROGRESS")),pe.NON_TASK=new Yr(new ft("Q","Non-Task","A",!0,"NON_TASK"));var ic=class{constructor(t=!1,e=!1,n=!1){this.ignoreSortInstructions=t,this.showTaskHiddenData=e,this.recordTimings=n}};var Xe=class{constructor(){this.coreStatuses=[pe.TODO.configuration,pe.DONE.configuration],this.customStatuses=[pe.IN_PROGRESS.configuration,pe.CANCELLED.configuration]}static addStatus(t,e){t.push(e)}static replaceStatus(t,e,n){let i=this.findStatusIndex(e,t);return i<=-1?!1:(t.splice(i,1,n),!0)}static findStatusIndex(t,e){let n=new pe(t);return e.findIndex(i=>new pe(i).previewText()==n.previewText())}static deleteStatus(t,e){let n=this.findStatusIndex(e,t);return n<=-1?!1:(t.splice(n,1),!0)}static deleteAllCustomStatuses(t){t.customStatuses.splice(0)}static resetAllCustomStatuses(t){Xe.deleteAllCustomStatuses(t),new Xe().customStatuses.forEach(n=>{Xe.addStatus(t.customStatuses,n)})}static bulkAddStatusCollection(t,e){let n=[];return e.forEach(i=>{t.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Xe.addStatus(t.customStatuses,pe.createFromImportedValue(i))}),n}static allStatuses(t){return t.coreStatuses.concat(t.customStatuses)}static applyToStatusRegistry(t,e){e.clearStatuses(),Xe.allStatuses(t).forEach(n=>{e.add(n)})}};var Ew=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var ti=class{constructor(t,e,n,i,s,a){this.internalName=t;this.index=e;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let t=[];return Ew.forEach(e=>{t=[...t,new ti(e.internalName,e.index,e.description,e.displayName,e.enabledByDefault,e.stable)]}),t}static get settingsFlags(){let t={};return ti.values.forEach(e=>{t[e.internalName]=e.enabledByDefault}),t}static fromString(t){for(let e of ti.values)if(t===e.internalName)return e;throw new RangeError(`Illegal argument passed to fromString(): ${t} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var cn={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new fs(yu),buildSuggestions:Nh(yu,Ph,!1)},dataview:{displayName:"Dataview",taskSerializer:new nc,buildSuggestions:ww(Nh(Lh,Ph,!0),[["(",")"],["[","]"]])}},Wh={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Xe,features:ti.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new ic,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},ri=ne({},Wh);function Uh(r,t){for(let e in r)t[e]===void 0&&(t[e]=r[e])}var ie=()=>(Uh(ti.settingsFlags,ri.features),Uh(Wh.loggingOptions.minLevels,ri.loggingOptions.minLevels),Uh(Wh.debugSettings,ri.debugSettings),ri.statusSettings.customStatuses.forEach((r,t,e)=>{var i,s;let n=pe.getTypeFromStatusTypeString(r.type);e[t]=new ft((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),ne({},ri)),ut=r=>(ri=ne(ne({},ri),r),ie());var hs=(r,t)=>(ri.generalSettings[r]=t,ie()),Dw=r=>{var t;return(t=ri.features[r])!=null?t:!1};function Tu(){return cn[ie().taskFormat]}function sc(r){let e={"<":"<",">":">","&":"&",'"':"""}[r];return e!==void 0?e:r}function Sw(r){let t=[...r],e="";return t.forEach(n=>{e+=sc(n)}),e}var $e=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(t){this.clearStatuses(),t.forEach(e=>{this.add(e)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:t})=>t!==pe.EMPTY.symbol)}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}add(t){this.hasSymbol(t.symbol)||(t instanceof pe?this._registeredStatuses.push(t):this._registeredStatuses.push(new pe(t)))}bySymbol(t){return this.hasSymbol(t)?this.getSymbol(t):pe.EMPTY}bySymbolOrCreate(t){return this.hasSymbol(t)?this.getSymbol(t):pe.createUnknownStatus(t)}byName(t){return this._registeredStatuses.filter(({name:e})=>e===t).length>0?this._registeredStatuses.filter(({name:e})=>e===t)[0]:pe.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(t){if(t.nextStatusSymbol!==""){let e=this.bySymbol(t.nextStatusSymbol);if(e!==null)return e}return pe.EMPTY}getNextStatusOrCreate(t){let e=this.getNextStatus(t);return e.type!=="EMPTY"?e:pe.createUnknownStatus(t.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(t){let e=this.getNextStatusOrCreate(t),n=this.getNextRecurrenceStatusOfType(e,"TODO");if(n)return n;let i=this.getNextRecurrenceStatusOfType(e,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(t,e){if(t.type===e)return t;let n=t;for(let i=0;i!this.hasSymbol(s.symbol)),n=new $e,i=[];return e.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=$e.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(t,e){let n=new ft(t.symbol,e,t.nextStatusSymbol,t.availableAsCommand,t.type);return new pe(n)}getSymbol(t){return this._registeredStatuses.filter(({symbol:e})=>e===t)[0]}hasSymbol(t){return this._registeredStatuses.find(e=>e.symbol===t)!==void 0}addDefaultStatusTypes(){[pe.TODO,pe.IN_PROGRESS,pe.DONE,pe.CANCELLED].forEach(e=>{this.add(e)})}mermaidDiagram(t=!1){let e=this.registeredStatuses,n="mermaid",i=[],s=[];return e.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,t);i.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(e,l,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(e,c,s,o,!0)}}),` \`\`\`${n} flowchart LR @@ -171,11 +171,11 @@ ${s.join(` linkStyle default stroke:gray \`\`\` -`}addEdgeIfNotToInternal(e,t,n,i,s){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=Lv(e.name),i=e.type;if(t){let s=ll(e.symbol),a=ll(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Uv=require("obsidian");var tn=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var mt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(Z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(Z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new tn("Overdue",1):t.isSame(e,"day")?new tn("Today",2):t.isValid()?new tn("Future",3):new tn("Invalid date",0):new tn("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new tn("",0);let t=this.fromNowOrder(e);return new tn(e.fromNow(),t)}fromNowOrder(e){if(!e.isValid())return 0;let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new Uv.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Mn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Mn.priorityNameUsingNone(e).replace("None","Normal")}};var QN=require("obsidian"),jv=ma($v());var Bm=class extends jv.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new Hm(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Rt=new Bm,Hm=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${i+1} : ${n.toFileLineString()}`)})}var _t=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),{filenameAsScheduledDateFormat:s}=Q();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ee(de(K({},e),{taskLocation:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ee(de(K({},i),{scheduledDateIsInferred:!1}))),i))}};var Ir=class{static calculate(e){var n,i,s;let t=0;if((n=e.dueDate)!=null&&n.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(e.dueDate)/Ir.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,t+=u*Ir.dueCoefficient}switch((i=e.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*Ir.scheduledCoefficient),(s=e.startDate)!=null&&s.isValid()&&window.moment().isBefore(e.startDate)&&(t+=1*Ir.startedCoefficient),e.priority){case"0":t+=1.5*Ir.priorityCoefficient;break;case"1":t+=1*Ir.priorityCoefficient;break;case"2":t+=.65*Ir.priorityCoefficient;break;case"3":t+=.325*Ir.priorityCoefficient;break;case"5":t-=.3*Ir.priorityCoefficient;break}return t}},Cn=Ir;Cn.dueCoefficient=12,Cn.scheduledCoefficient=5,Cn.startedCoefficient=-3,Cn.priorityCoefficient=6,Cn.milliSecondsPerDay=1e3*60*60*24;var ee=class extends mn{constructor({status:t,description:n,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:u,startDate:l,scheduledDate:c,dueDate:d,doneDate:f,cancelledDate:m,recurrence:y,onCompletion:b,dependsOn:k,id:_,blockLink:R,tags:S,originalMarkdown:F,scheduledDateIsInferred:q,parent:ne=null}){super(F,ne);this._urgency=null;this.status=t,this.description=n,this.indentation=s,this.listMarker=a,this.taskLocation=i,this.tags=S,this.priority=o,this.createdDate=u,this.startDate=l,this.scheduledDate=c,this.dueDate=d,this.doneDate=f,this.cancelledDate=m,this.recurrence=y,this.onCompletion=b,this.dependsOn=k,this.id=_,this.blockLink=R,this.scheduledDateIsInferred=q}static fromLine({line:t,taskLocation:n,fallbackDate:i}){let s=ee.extractTaskComponents(t);return s===null||!ve.getInstance().includedIn(s.body)?null:ee.parseTaskSignifiers(t,n,i)}static parseTaskSignifiers(t,n,i){let s=ee.extractTaskComponents(t);if(s===null)return null;let{taskSerializer:a}=Do(),o=a.deserialize(s.body),u=!1;return _t.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,u=!0),o.tags=o.tags.map(l=>l.trim()),o.tags=o.tags.filter(l=>!ve.getInstance().equals(l)),new ee(de(K(K({},s),o),{taskLocation:n,originalMarkdown:t,scheduledDateIsInferred:u}))}static extractTaskComponents(t){let n=t.match(Z.taskRegex);if(n===null)return null;let i=n[1],s=n[2],a=n[3],o=De.getInstance().bySymbolOrCreate(a),u=n[4].trim(),l=u.match(Z.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(Z.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:u,blockLink:c}}toString(){return Do().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let t=Rt.getLogger("tasks.Task"),n="toggle()";cl(t,n,this);let i=De.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return dl(t,n,s),s}handleNewStatus(t,n=window.moment()){if(t.identicalTo(this.status))return[this];let{setDoneDate:i}=Q(),s=this.newDate(t,"DONE",this.doneDate,i,n),{setCancelledDate:a}=Q(),o=this.newDate(t,"CANCELLED",this.cancelledDate,a,n),u=new ee(de(K({},this),{status:t,doneDate:s,cancelledDate:o})),l=!t.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(l||c||d)return[u];let m=this.recurrence.next(n);return m===null?[u]:[this.createNextOccurrence(t,m),u]}newDate(t,n,i,s,a){let o=null;return t.type===n&&(this.status.type!==n?s&&(o=a):o=i),o}createNextOccurrence(t,n){let{setCreatedDate:i}=Q(),s=null;i&&(s=window.moment());let a=null,o=null,l=De.getInstance().getNextRecurrenceStatusOrCreate(t);return new ee(de(K(K({},this),n),{status:l,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let t=this.toggle();return this.putRecurrenceInUsersOrder(t)}handleNewStatusWithRecurrenceInUsersOrder(t,n=window.moment()){Rt.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${t.symbol}'`);let s=this.handleNewStatus(t,n);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(t){let n=Sv(this,t),{recurrenceOnNextLine:i}=Q();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(t){if(this.dependsOn.length===0||this.isDone)return!1;for(let n of this.dependsOn)if(!!t.find(s=>s.id===n&&!s.isDone))return!0;return!1}isBlocking(t){return this.id===""||this.isDone?!1:t.some(n=>n.isDone?!1:n.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let t=Mn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${t} priority`}get descriptionWithoutTags(){return this.description.replace(Z.hashTags,"").trim()}get priorityName(){return Mn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Cn.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new mt(this.cancelledDate)}get created(){return new mt(this.createdDate)}get done(){return new mt(this.doneDate)}get due(){return new mt(this.dueDate)}get scheduled(){return new mt(this.scheduledDate)}get start(){return new mt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates,n=Array.from(t).sort(dr);for(let i of n)if(i!=null&&i.isValid())return new mt(i);return new mt(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return this.taskLocation.tasksFile}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:t}){let n;return t?n=this.filename:n="/"+this.path,n===null?null:(this.precedingHeader!==null&&this.precedingHeader!==n&&(n=n+" > "+this.precedingHeader),n)}identicalTo(t){var i,s;if(!super.identicalTo(t))return!1;let n=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of n)if(((i=this[a])==null?void 0:i.toString())!==((s=t[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(t.status)||this.tags.length!==t.tags.length||!this.tags.every(function(a,o){return a===t.tags[o]}))return!1;n=ee.allDateFields();for(let a of n){let o=this[a],u=t[a];if(dr(o,u)!==0)return!1}return this.recurrenceIdenticalTo(t)?this.file.rawFrontmatterIdenticalTo(t.file):!1}recurrenceIdenticalTo(t){let n=this.recurrence,i=t.recurrence;return!(n===null&&i!==null||n!==null&&i===null||n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(t){var n,i;return(i=(n=t.match(Z.hashTags))==null?void 0:n.map(s=>s.trim()))!=null?i:[]}};var xo=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ht=class{constructor(e,t,n,i,s){this._tasksFile=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ht(e,0,0,0,null)}fromRenamedFile(e){return new ht(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}};function XN(r,e,t,n,i,s){var y,b;let a=new ut(r,i),o=[],u=e.split(` -`),l=u.length,c=new xo(()=>_t.fromPath(r)),d=null,f=0,m=new Map;for(let k of t){let _=k.position.start.line;if(_>=l)return n.debug(`${r} Obsidian gave us a line number ${_} past the end of the file. ${l}.`),o;if((d===null||d.position.end.line<_)&&(d=Es.getSection(_,i.sections),f=0),d===null)continue;let R=u[_];if(R===void 0){n.debug(`${r}: line ${_} - ignoring 'undefined' line.`);continue}if(k.task!==void 0){let S;try{if(S=ee.fromLine({line:R,taskLocation:new ht(a,_,d.position.start.line,f,Es.getPrecedingHeader(_,i.headings)),fallbackDate:c.value}),S!==null){let F=(y=m.get(k.parent))!=null?y:null;F!==null&&(S=new ee(de(K({},S),{parent:F}))),m.set(_,S)}}catch(F){s(F,r,k,R);continue}S!==null&&(f++,o.push(S))}else{let S=k.position.start.line,F=(b=m.get(k.parent))!=null?b:null;m.set(S,new mn(u[S],F))}}return o}var Es=class{constructor({metadataCache:e,vault:t,workspace:n,events:i}){this.logger=Rt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.workspace=n,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new Jo,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>A(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof ks.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof ks.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof ks.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new ut(s.path,o!=null?o:void 0),l=new xo(()=>_t.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(u);return e?_t.updateTaskPath(c,d,l.value):new ee(de(K({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>A(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return A(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e.path,this.reportTaskParsingErrorToUser,this.logger)}mn.listsAreIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i,s,a){return XN(i,e,t,a,n,s)}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault. +`}addEdgeIfNotToInternal(t,e,n,i,s){let a=t.findIndex(l=>l.symbol===e.symbol),o=a!==-1,u=e.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(t,e){let n=Sw(t.name),i=t.type;if(e){let s=sc(t.symbol),a=sc(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Ow=require("obsidian");var Cn=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var Ct=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date}formatAsDate(t=""){return this.format(le.dateFormat,t)}formatAsDateAndTime(t=""){return this.format(le.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new Cn("Overdue",1):e.isSame(t,"day")?new Cn("Today",2):e.isValid()?new Cn("Future",3):new Cn("Invalid date",0):new Cn("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new Cn("",0);let e=this.fromNowOrder(t);return new Cn(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),n=t.isSameOrBefore(e,"day"),i=this.fromNowStartDateOfGroup(t,n,e);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(t,e,n){let i=t.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?n.subtract(s,o):n.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new Ow.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(e,t):n.add(e,t)}};var AI=require("obsidian"),Rw=oo(Cw());var qh=class extends Rw.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=e=>e.reduce((n,i)=>n+i,0)/e.length}configure(e){return this.options=Object.assign({},this.options,e),this}getLogger(e){let n="none",i="";for(let s in this.options.minLevels)e.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new jh(this,e,n)}onLogEntry(e){return this.on("log",e),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(e=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${e.level}][${e.module}]`;switch(e.traceId&&(n+=`[${e.traceId}]`),n+=` ${e.message}`,e.objects===void 0&&(e.objects=""),e.level){case"trace":console.trace(n,e.objects);break;case"debug":console.debug(n,e.objects);break;case"info":console.info(n,e.objects);break;case"warn":console.warn(n,e.objects);break;case"error":console.error(n,e.objects);break;default:console.log(`{${e.level}} ${n}`,e.objects)}}),this.consoleLoggerRegistered=!0,this)}},Kt=new qh,jh=class{constructor(t,e,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=t,this.module=e,this.minLevel=this.levelToInt(n)}levelToInt(t){return t.toLowerCase()in this.levels?this.levels[t.toLowerCase()]:99}log(t,e,n){if(this.levelToInt(t){r.debug(`${t} ==> ${i+1} : ${n.toFileLineString()}`)})}var Ut=class{static fromPath(t){let{useFilenameAsScheduledDate:e,filenameAsDateFolders:n}=ie();return!e||!this.matchesAnyFolder(n,t)?null:this.extractDateFromPath(t)}static matchesAnyFolder(t,e){return t.length===0?!0:t.some(n=>e.startsWith(n+"/"))}static extractDateFromPath(t){let e=Math.max(0,t.lastIndexOf("/")+1),n=t.lastIndexOf("."),i=t.substring(e,n),{filenameAsScheduledDateFormat:s}=ie();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:t,scheduledDate:e,dueDate:n}){return t===null&&n===null&&e===null}static updateTaskPath(t,e,n){let i=t.scheduledDate,s=t.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(t)&&(i=n,s=!0),new de(Ee(ne({},t),{taskLocation:e,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(t,e){let n=t.scheduledDateIsInferred?t.scheduledDate:null;return e.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new de(Ee(ne({},i),{scheduledDateIsInferred:!1}))),i))}};var dn=class{static calculate(t){var n,i,s;let e=0;if((n=t.dueDate)!=null&&n.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(t.dueDate)/dn.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,e+=u*dn.dueCoefficient}switch((i=t.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(t.scheduledDate)&&(e+=1*dn.scheduledCoefficient),(s=t.startDate)!=null&&s.isValid()&&window.moment().isBefore(t.startDate)&&(e+=1*dn.startedCoefficient),t.priority){case"0":e+=1.5*dn.priorityCoefficient;break;case"1":e+=1*dn.priorityCoefficient;break;case"2":e+=.65*dn.priorityCoefficient;break;case"3":e+=.325*dn.priorityCoefficient;break;case"5":e-=.3*dn.priorityCoefficient;break}return e}},ni=dn;ni.dueCoefficient=12,ni.scheduledCoefficient=5,ni.startedCoefficient=-3,ni.priorityCoefficient=6,ni.milliSecondsPerDay=1e3*60*60*24;var de=class extends jn{constructor({status:e,description:n,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:u,startDate:l,scheduledDate:c,dueDate:d,doneDate:f,cancelledDate:m,recurrence:b,onCompletion:T,dependsOn:_,id:x,blockLink:O,tags:M,originalMarkdown:Y,scheduledDateIsInferred:G,parent:oe=null}){super(Y,oe);this._urgency=null;this.status=e,this.description=n,this.indentation=s,this.listMarker=a,this.taskLocation=i,this.tags=M,this.priority=o,this.createdDate=u,this.startDate=l,this.scheduledDate=c,this.dueDate=d,this.doneDate=f,this.cancelledDate=m,this.recurrence=b,this.onCompletion=T,this.dependsOn=_,this.id=x,this.blockLink=O,this.scheduledDateIsInferred=G}static fromLine({line:e,taskLocation:n,fallbackDate:i}){let s=de.extractTaskComponents(e);return s===null||!Ae.getInstance().includedIn(s.body)?null:de.parseTaskSignifiers(e,n,i)}static parseTaskSignifiers(e,n,i){let s=de.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:a}=Tu(),o=a.deserialize(s.body),u=!1;return Ut.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,u=!0),o.tags=o.tags.map(l=>l.trim()),o.tags=o.tags.filter(l=>!Ae.getInstance().equals(l)),new de(Ee(ne(ne({},s),o),{taskLocation:n,originalMarkdown:e,scheduledDateIsInferred:u}))}static extractTaskComponents(e){let n=e.match(le.taskRegex);if(n===null)return null;let i=n[1],s=n[2],a=n[3],o=$e.getInstance().bySymbolOrCreate(a),u=n[4].trim(),l=u.match(le.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(le.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:u,blockLink:c}}toString(){return Tu().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Kt.getLogger("tasks.Task"),n="toggle()";ac(e,n,this);let i=$e.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return oc(e,n,s),s}handleNewStatus(e,n=window.moment()){if(e.identicalTo(this.status))return[this];let{setDoneDate:i}=ie(),s=this.newDate(e,"DONE",this.doneDate,i,n),{setCancelledDate:a}=ie(),o=this.newDate(e,"CANCELLED",this.cancelledDate,a,n),u=new de(Ee(ne({},this),{status:e,doneDate:s,cancelledDate:o})),l=!e.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(l||c||d)return[u];let m=this.recurrence.next(n);return m===null?[u]:[this.createNextOccurrence(e,m),u]}newDate(e,n,i,s,a){let o=null;return e.type===n&&(this.status.type!==n?s&&(o=a):o=i),o}createNextOccurrence(e,n){let{setCreatedDate:i}=ie(),s=null;i&&(s=window.moment());let a=null,o=null,l=$e.getInstance().getNextRecurrenceStatusOrCreate(e);return new de(Ee(ne(ne({},this),n),{status:l,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e,n=window.moment()){Kt.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let s=this.handleNewStatus(e,n);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(e){let n=mw(this,e),{recurrenceOnNextLine:i}=ie();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(e){if(this.dependsOn.length===0||this.isDone)return!1;for(let n of this.dependsOn)if(!!e.find(s=>s.id===n&&!s.isDone))return!0;return!1}isBlocking(e){return this.id===""||this.isDone?!1:e.some(n=>n.isDone?!1:n.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=Tr.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(le.hashTags,"").trim()}get priorityName(){return Tr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=ni.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new Ct(this.cancelledDate)}get created(){return new Ct(this.createdDate)}get done(){return new Ct(this.doneDate)}get due(){return new Ct(this.dueDate)}get scheduled(){return new Ct(this.scheduledDate)}get start(){return new Ct(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let e=this.happensDates,n=Array.from(e).sort(Ur);for(let i of n)if(i!=null&&i.isValid())return new Ct(i);return new Ct(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return this.taskLocation.tasksFile}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let n;return e?n=this.filename:n="/"+this.path,n===null?null:(this.precedingHeader!==null&&this.precedingHeader!==n&&(n=n+" > "+this.precedingHeader),n)}identicalTo(e){var i,s;if(!super.identicalTo(e))return!1;let n=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of n)if(((i=this[a])==null?void 0:i.toString())!==((s=e[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;n=de.allDateFields();for(let a of n){let o=this[a],u=e[a];if(Ur(o,u)!==0)return!1}return this.recurrenceIdenticalTo(e)?this.file.rawFrontmatterIdenticalTo(e.file):!1}recurrenceIdenticalTo(e){let n=this.recurrence,i=e.recurrence;return!(n===null&&i!==null||n!==null&&i===null||n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var n,i;return(i=(n=e.match(le.hashTags))==null?void 0:n.map(s=>s.trim()))!=null?i:[]}};var _u=class{constructor(t){this.fetch=t;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Rt=class{constructor(t,e,n,i,s){this._tasksFile=t,this._lineNumber=e,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(t){return new Rt(t,0,0,0,null)}fromRenamedFile(t){return new Rt(t,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}};function PI(r,t,e,n,i,s){var b,T;let a=[];if(e===void 0)return a;let o=new Et(r,i),u=t.split(` +`),l=u.length,c=new _u(()=>Ut.fromPath(r)),d=null,f=0,m=new Map;for(let _ of e){let x=_.position.start.line;if(x>=l)return n.debug(`${r} Obsidian gave us a line number ${x} past the end of the file. ${l}.`),a;if((d===null||d.position.end.line{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=ie(),e=this.vault.on("create",s=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(e);let n=this.vault.on("delete",s=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new Et(s.path,o!=null?o:void 0),l=new _u(()=>Ut.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(u);return t?Ut.updateTaskPath(c,d,l.value):new de(Ee(ne({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(e=>{e({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(t=>this.indexFile(t))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(t){return F(this,null,function*(){let e=this.metadataCache.getFileCache(t);if(e==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let n=this.tasks.filter(a=>a.path===t.path),i=e.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(t);s=this.getTasksFromFileContent(a,i,e,t.path,this.reportTaskParsingErrorToUser,this.logger)}jn.listsAreIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==t.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+t.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(t,e,n,i,s,a){return PI(i,t,e,a,n,s)}reportTaskParsingErrorToUser(t,e,n,i){let s=`There was an error reading one of the tasks in this vault. The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...' -Error: ${e} -File: ${t} +Error: ${t} +File: ${e} Line number: ${n.position.start.line} Task line: ${i} @@ -190,7 +190,7 @@ Include: The error popup will only be shown when Tasks is starting up, but if the error persists, it will be shown in the console every time this file is edited during the Obsidian session. -`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new ks.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var gh=require("obsidian");var $w=require("obsidian");function Ue(){}function Xm(r){return r()}function Gv(){return Object.create(null)}function Ut(r){r.forEach(Xm)}function ml(r){return typeof r=="function"}function rn(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Yv(r){return Object.keys(r).length===0}var Bv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Mo=class{constructor(e){this.options=e,this._listeners="WeakMap"in Bv?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)Mo.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};Mo.entries="WeakMap"in Bv?new WeakMap:void 0;var Hv=!1;function ZN(){Hv=!0}function JN(){Hv=!1}function U(r,e){r.appendChild(e)}function pe(r,e,t){r.insertBefore(e,t||null)}function oe(r){r.parentNode&&r.parentNode.removeChild(r)}function Li(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function zv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function W(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Kv(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function tI(r){return Array.from(r.childNodes)}function Fr(r,e){e=""+e,r.data!==e&&(r.data=e)}function yr(r,e){r.value=e==null?"":e}function Zm(r,e,t){for(let n=0;n{a.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{s=xe(n.contentWindow,"resize",e),e()}),U(r,n),()=>{(i||s&&n.contentWindow)&&s(),oe(n)}}function An(r,e,t){r.classList[t?"add":"remove"](e)}var xs=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=eI(t.nodeName):this.e=X(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;tr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Ds=e}var pl=new Set,Ii;function Jv(){Ii={r:0,c:[],p:Ii}}function ew(){Ii.r||Ut(Ii.c),Ii=Ii.p}function Wt(r,e){r&&r.i&&(pl.delete(r),r.i(e))}function Qt(r,e,t,n){if(r&&r.o){if(pl.has(r))return;pl.add(r),Ii.c.push(()=>{pl.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}var uI=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],_G=new Set([...uI]);function Ct(r,e,t){let n=r.$$.props[e];n!==void 0&&(r.$$.bound[n]=t,t(r.$$.ctx[n]))}function Lr(r){r&&r.c()}function Tr(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Fi(()=>{let a=r.$$.on_mount.map(Xm).filter(ml);r.$$.on_destroy?r.$$.on_destroy.push(...a):Ut(a),r.$$.on_mount=[]}),s.forEach(Fi)}function Xt(r,e){let t=r.$$;t.fragment!==null&&(oI(t.after_update),Ut(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function lI(r,e){r.$$.dirty[0]===-1&&(Os.push(r),sI(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=m.length?m[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=y)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](y),c&&lI(r,d)),f}):[],l.update(),c=!0,Ut(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){ZN();let d=tI(e.target);l.fragment&&l.fragment.l(d),d.forEach(oe)}else l.fragment&&l.fragment.c();e.intro&&Wt(r.$$.fragment),Tr(r,e.target,e.anchor,e.customElement),JN(),Zv()}Ro(u)}var cI;typeof HTMLElement=="function"&&(cI=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Xm).filter(ml);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Ut(this.$$.on_disconnect)}$destroy(){Xt(this,1),this.$destroy=Ue}$on(r,e){if(!ml(e))return Ue;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!Yv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var gr=class{$destroy(){Xt(this,1),this.$destroy=Ue}$on(e,t){if(!ml(t))return Ue;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Yv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};function tw(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})}function Rs(r){return r.charAt(0).toUpperCase()+r.slice(1)}function gt(r,e){if(e===null)return Rs(r);let t=r.toLowerCase().indexOf(e.toLowerCase());if(t===-1)return`${Rs(r)} (${e.toLowerCase()})`;let n=r.substring(0,t);return n+='',t===0?n+=r.substring(t,t+1).toUpperCase():n+=r.substring(t,t+1),n+="",n+=r.substring(t+1),n=Rs(n),n}function dI(r){let e,t=gt(r[3],r[5])+"",n,i,s,a,o,u,l,c,d;return{c(){e=X("label"),n=ue(),i=X("input"),s=ue(),a=X("code"),o=Me(r[4]),u=ue(),l=new xs(!1),W(e,"for",r[3]),W(i,"id",r[3]),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder",fI),W(i,"accesskey",r[5]),An(i,"tasks-modal-error",!r[2]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(f,m){pe(f,e,m),e.innerHTML=t,pe(f,n,m),pe(f,i,m),yr(i,r[0]),pe(f,s,m),pe(f,a,m),U(a,o),U(a,u),l.m(r[1],a),c||(d=xe(i,"input",r[7]),c=!0)},p(f,[m]){m&40&&t!==(t=gt(f[3],f[5])+"")&&(e.innerHTML=t),m&8&&W(e,"for",f[3]),m&8&&W(i,"id",f[3]),m&32&&W(i,"accesskey",f[5]),m&1&&i.value!==f[0]&&yr(i,f[0]),m&4&&An(i,"tasks-modal-error",!f[2]),m&16&&Fr(o,f[4]),m&2&&l.p(f[1])},i:Ue,o:Ue,d(f){f&&oe(e),f&&oe(n),f&&oe(i),f&&oe(s),f&&oe(a),c=!1,d()}}}var fI="Try 'Mon' or 'tm' then space";function pI(r,e,t){let{id:n}=e,{dateSymbol:i}=e,{date:s}=e,{isDateValid:a}=e,{forwardOnly:o}=e,{accesskey:u}=e,{parsedDate:l=""}=e;function c(){s=this.value,t(0,s),t(3,n),t(6,o),t(1,l)}return r.$$set=d=>{"id"in d&&t(3,n=d.id),"dateSymbol"in d&&t(4,i=d.dateSymbol),"date"in d&&t(0,s=d.date),"isDateValid"in d&&t(2,a=d.isDateValid),"forwardOnly"in d&&t(6,o=d.forwardOnly),"accesskey"in d&&t(5,u=d.accesskey),"parsedDate"in d&&t(1,l=d.parsedDate)},r.$$.update=()=>{if(r.$$.dirty&75){e:t(0,s=Vu(s)),t(1,l=U_(n,s,o)),t(2,a=!l.includes("invalid"))}},[s,l,a,n,i,u,o,c]}var eh=class extends gr{constructor(e){super(),nn(this,e,pI,dI,rn,{id:3,dateSymbol:4,date:0,isDateValid:2,forwardOnly:6,accesskey:5,parsedDate:1})}},Ui=eh;var Wi=Math.min,qt=Math.max,Po=Math.round;var Pn=r=>({x:r,y:r}),mI={left:"right",right:"left",bottom:"top",top:"bottom"},hI={start:"end",end:"start"};function th(r,e,t){return qt(r,Wi(e,t))}function Ms(r,e){return typeof r=="function"?r(e):r}function Nn(r){return r.split("-")[0]}function Cs(r){return r.split("-")[1]}function rh(r){return r==="x"?"y":"x"}function nh(r){return r==="y"?"height":"width"}function As(r){return["top","bottom"].includes(Nn(r))?"y":"x"}function ih(r){return rh(As(r))}function rw(r,e,t){t===void 0&&(t=!1);let n=Cs(r),i=ih(r),s=nh(i),a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Ao(a)),[a,Ao(a)]}function nw(r){let e=Ao(r);return[hl(r),e,hl(e)]}function hl(r){return r.replace(/start|end/g,e=>hI[e])}function gI(r,e,t){let n=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?s:a;default:return[]}}function iw(r,e,t,n){let i=Cs(r),s=gI(Nn(r),t==="start",n);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(hl)))),s}function Ao(r){return r.replace(/left|right|bottom|top/g,e=>mI[e])}function yI(r){return K({top:0,right:0,bottom:0,left:0},r)}function sw(r){return typeof r!="number"?yI(r):{top:r,right:r,bottom:r,left:r}}function qi(r){return de(K({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function aw(r,e,t){let{reference:n,floating:i}=r,s=As(e),a=ih(e),o=nh(a),u=Nn(e),l=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[o]/2-i[o]/2,m;switch(u){case"top":m={x:c,y:n.y-i.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-i.width,y:d};break;default:m={x:n.x,y:n.y}}switch(Cs(e)){case"start":m[a]-=f*(t&&l?-1:1);break;case"end":m[a]+=f*(t&&l?-1:1);break}return m}var ow=(r,e,t)=>A(void 0,null,function*(){let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=t,o=s.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(e),l=yield a.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:d}=aw(l,n,u),f=n,m={},y=0;for(let b=0;bY<=0)){var Pe,j;let Y=(((Pe=a.flip)==null?void 0:Pe.index)||0)+1,I=ne[Y];if(I)return{data:{index:Y,overflows:ge},reset:{placement:I}};let J=(j=ge.filter(p=>p.overflows[0]<=0).sort((p,h)=>p.overflows[1]-h.overflows[1])[0])==null?void 0:j.placement;if(!J)switch(y){case"bestFit":{var $;let p=($=ge.map(h=>[h.placement,h.overflows.filter(g=>g>0).reduce((g,T)=>g+T,0)]).sort((h,g)=>h[1]-g[1])[0])==null?void 0:$[0];p&&(J=p);break}case"initialPlacement":J=u;break}if(s!==J)return{reset:{placement:J}}}return{}})}}};function TI(r,e){return A(this,null,function*(){let{placement:t,platform:n,elements:i}=r,s=yield n.isRTL==null?void 0:n.isRTL(i.floating),a=Nn(t),o=Cs(t),u=As(t)==="y",l=["left","top"].includes(a)?-1:1,c=s&&u?-1:1,d=Ms(e,r),{mainAxis:f,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:K({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return o&&typeof y=="number"&&(m=o==="end"?y*-1:y),u?{x:m*c,y:f*l}:{x:f*l,y:m*c}})}var yl=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(t){return A(this,null,function*(){var n,i;let{x:s,y:a,placement:o,middlewareData:u}=t,l=yield TI(t,r);return o===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:de(K({},l),{placement:o})}})}}},Tl=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(t){return A(this,null,function*(){let{x:n,y:i,placement:s}=t,_=Ms(r,t),{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:R=>{let{x:S,y:F}=R;return{x:S,y:F}}}}=_,l=Zo(_,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},d=yield gl(t,l),f=As(Nn(s)),m=rh(f),y=c[m],b=c[f];if(a){let R=m==="y"?"top":"left",S=m==="y"?"bottom":"right",F=y+d[R],q=y-d[S];y=th(F,y,q)}if(o){let R=f==="y"?"top":"left",S=f==="y"?"bottom":"right",F=b+d[R],q=b-d[S];b=th(F,b,q)}let k=u.fn(de(K({},t),{[m]:y,[f]:b}));return de(K({},k),{data:{x:k.x-n,y:k.y-i}})})}}};var ah=function(r){return r===void 0&&(r={}),{name:"size",options:r,fn(t){return A(this,null,function*(){let{placement:n,rects:i,platform:s,elements:a}=t,G=Ms(r,t),{apply:o=()=>{}}=G,u=Zo(G,["apply"]),l=yield gl(t,u),c=Nn(n),d=Cs(n),f=As(n)==="y",{width:m,height:y}=i.floating,b,k;c==="top"||c==="bottom"?(b=c,k=d===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(k=c,b=d==="end"?"top":"bottom");let _=y-l[b],R=m-l[k],S=!t.middlewareData.shift,F=_,q=R;if(f){let B=m-l.left-l.right;q=d||S?Wi(R,B):B}else{let B=y-l.top-l.bottom;F=d||S?Wi(_,B):B}if(S&&!d){let B=qt(l.left,0),ge=qt(l.right,0),Pe=qt(l.top,0),j=qt(l.bottom,0);f?q=m-2*(B!==0||ge!==0?B+ge:qt(l.left,l.right)):F=y-2*(Pe!==0||j!==0?Pe+j:qt(l.top,l.bottom))}yield o(de(K({},t),{availableWidth:q,availableHeight:F}));let ne=yield s.getDimensions(a.floating);return m!==ne.width||y!==ne.height?{reset:{rects:!0}}:{}})}}};function In(r){return lw(r)?(r.nodeName||"").toLowerCase():"#document"}function $t(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Fn(r){var e;return(e=(lw(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function lw(r){return r instanceof Node||r instanceof $t(r).Node}function sn(r){return r instanceof Element||r instanceof $t(r).Element}function Ur(r){return r instanceof HTMLElement||r instanceof $t(r).HTMLElement}function uw(r){return typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof $t(r).ShadowRoot}function Ps(r){let{overflow:e,overflowX:t,overflowY:n,display:i}=Zt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function cw(r){return["table","td","th"].includes(In(r))}function _l(r){let e=vl(),t=Zt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function dw(r){let e=$i(r);for(;Ur(e)&&!No(e);){if(_l(e))return e;e=$i(e)}return null}function vl(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function No(r){return["html","body","#document"].includes(In(r))}function Zt(r){return $t(r).getComputedStyle(r)}function Io(r){return sn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function $i(r){if(In(r)==="html")return r;let e=r.assignedSlot||r.parentNode||uw(r)&&r.host||Fn(r);return uw(e)?e.host:e}function fw(r){let e=$i(r);return No(e)?r.ownerDocument?r.ownerDocument.body:r.body:Ur(e)&&Ps(e)?e:fw(e)}function bl(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let i=fw(r),s=i===((n=r.ownerDocument)==null?void 0:n.body),a=$t(i);return s?e.concat(a,a.visualViewport||[],Ps(i)?i:[],a.frameElement&&t?bl(a.frameElement):[]):e.concat(i,bl(i,[],t))}function hw(r){let e=Zt(r),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Ur(r),s=i?r.offsetWidth:t,a=i?r.offsetHeight:n,o=Po(t)!==s||Po(n)!==a;return o&&(t=s,n=a),{width:t,height:n,$:o}}function gw(r){return sn(r)?r:r.contextElement}function Ns(r){let e=gw(r);if(!Ur(e))return Pn(1);let t=e.getBoundingClientRect(),{width:n,height:i,$:s}=hw(e),a=(s?Po(t.width):t.width)/n,o=(s?Po(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var bI=Pn(0);function yw(r){let e=$t(r);return!vl()||!e.visualViewport?bI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _I(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==$t(r)?!1:e}function Fo(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=r.getBoundingClientRect(),s=gw(r),a=Pn(1);e&&(n?sn(n)&&(a=Ns(n)):a=Ns(r));let o=_I(s,t,n)?yw(s):Pn(0),u=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let f=$t(s),m=n&&sn(n)?$t(n):n,y=f.frameElement;for(;y&&n&&m!==f;){let b=Ns(y),k=y.getBoundingClientRect(),_=Zt(y),R=k.left+(y.clientLeft+parseFloat(_.paddingLeft))*b.x,S=k.top+(y.clientTop+parseFloat(_.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,d*=b.y,u+=R,l+=S,y=$t(y).frameElement}}return qi({width:c,height:d,x:u,y:l})}function vI(r){let{rect:e,offsetParent:t,strategy:n}=r,i=Ur(t),s=Fn(t);if(t===s)return e;let a={scrollLeft:0,scrollTop:0},o=Pn(1),u=Pn(0);if((i||!i&&n!=="fixed")&&((In(t)!=="body"||Ps(s))&&(a=Io(t)),Ur(t))){let l=Fo(t);o=Ns(t),u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}return{width:e.width*o.x,height:e.height*o.y,x:e.x*o.x-a.scrollLeft*o.x+u.x,y:e.y*o.y-a.scrollTop*o.y+u.y}}function wI(r){return Array.from(r.getClientRects())}function Tw(r){return Fo(Fn(r)).left+Io(r).scrollLeft}function kI(r){let e=Fn(r),t=Io(r),n=r.ownerDocument.body,i=qt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=qt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Tw(r),o=-t.scrollTop;return Zt(n).direction==="rtl"&&(a+=qt(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}function EI(r,e){let t=$t(r),n=Fn(r),i=t.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,u=0;if(i){s=i.width,a=i.height;let l=vl();(!l||l&&e==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:o,y:u}}function SI(r,e){let t=Fo(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,s=Ur(r)?Ns(r):Pn(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,u=i*s.x,l=n*s.y;return{width:a,height:o,x:u,y:l}}function pw(r,e,t){let n;if(e==="viewport")n=EI(r,t);else if(e==="document")n=kI(Fn(r));else if(sn(e))n=SI(e,t);else{let i=yw(r);n=de(K({},e),{x:e.x-i.x,y:e.y-i.y})}return qi(n)}function bw(r,e){let t=$i(r);return t===e||!sn(t)||No(t)?!1:Zt(t).position==="fixed"||bw(t,e)}function OI(r,e){let t=e.get(r);if(t)return t;let n=bl(r,[],!1).filter(o=>sn(o)&&In(o)!=="body"),i=null,s=Zt(r).position==="fixed",a=s?$i(r):r;for(;sn(a)&&!No(a);){let o=Zt(a),u=_l(a);!u&&o.position==="fixed"&&(i=null),(s?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ps(a)&&!u&&bw(r,a))?n=n.filter(c=>c!==a):i=o,a=$i(a)}return e.set(r,n),n}function DI(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r,a=[...t==="clippingAncestors"?OI(e,this._c):[].concat(t),n],o=a[0],u=a.reduce((l,c)=>{let d=pw(e,c,i);return l.top=qt(d.top,l.top),l.right=Wi(d.right,l.right),l.bottom=Wi(d.bottom,l.bottom),l.left=qt(d.left,l.left),l},pw(e,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xI(r){return hw(r)}function RI(r,e,t){let n=Ur(e),i=Fn(e),s=t==="fixed",a=Fo(r,!0,s,e),o={scrollLeft:0,scrollTop:0},u=Pn(0);if(n||!n&&!s)if((In(e)!=="body"||Ps(i))&&(o=Io(e)),n){let l=Fo(e,!0,s,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else i&&(u.x=Tw(i));return{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function mw(r,e){return!Ur(r)||Zt(r).position==="fixed"?null:e?e(r):r.offsetParent}function _w(r,e){let t=$t(r);if(!Ur(r))return t;let n=mw(r,e);for(;n&&cw(n)&&Zt(n).position==="static";)n=mw(n,e);return n&&(In(n)==="html"||In(n)==="body"&&Zt(n).position==="static"&&!_l(n))?t:n||dw(r)||t}var MI=function(r){return A(this,null,function*(){let{reference:e,floating:t,strategy:n}=r,i=this.getOffsetParent||_w,s=this.getDimensions;return{reference:RI(e,yield i(t),n),floating:K({x:0,y:0},yield s(t))}})};function CI(r){return Zt(r).direction==="rtl"}var AI={convertOffsetParentRelativeRectToViewportRelativeRect:vI,getDocumentElement:Fn,getClippingRect:DI,getOffsetParent:_w,getElementRects:MI,getClientRects:wI,getDimensions:xI,getScale:Ns,isElement:sn,isRTL:CI};var oh=(r,e,t)=>{let n=new Map,i=K({platform:AI},t),s=de(K({},i.platform),{_c:n});return ow(r,e,de(K({},i),{platform:s}))};function vw(r,e,t){let n=r.slice();return n[5]=e[t],n}function ww(r,e,t){let n=r.slice();n[40]=e[t],n[43]=t;let i=n[17](n[40].taskLocation.path);return n[41]=i,n}function kw(r){let e,t,n,i=r[10],s=[];for(let a=0;a',d=ue(),W(t,"class","task-dependency-name"),W(c,"type","button"),W(c,"class","task-dependency-delete"),W(e,"class","task-dependency")},m(k,_){pe(k,e,_),U(e,t),U(t,n),U(t,s),U(t,a),U(t,u),U(e,l),U(e,c),U(e,d),f||(m=[xe(c,"click",y),xe(e,"mouseenter",b)],f=!0)},p(k,_){r=k,_[0]&3&&i!==(i=r[5].status.symbol+"")&&Fr(s,i),_[0]&3&&o!==(o=Ai(r[5])+"")&&Fr(u,o)},d(k){k&&oe(e),f=!1,Ut(m)}}}function PI(r){let e,t=gt(r[2],r[3])+"",n,i,s,a,o,u,l,c,d,f=r[10]&&r[10].length!==0&&kw(r),m=r[0][r[1]].length!==0&&Ow(r);return{c(){e=X("label"),n=ue(),i=X("span"),s=X("input"),o=ue(),f&&f.c(),u=ue(),m&&m.c(),l=Vv(),W(e,"for",r[1]),W(s,"accesskey",r[3]),W(s,"id",r[1]),W(s,"class","tasks-modal-dependency-input"),W(s,"type","text"),W(s,"placeholder",r[4]),Fi(()=>r[26].call(i))},m(y,b){pe(y,e,b),e.innerHTML=t,pe(y,n,b),pe(y,i,b),U(i,s),r[22](s),yr(s,r[6]),a=Xv(i,r[26].bind(i)),pe(y,o,b),f&&f.m(y,b),pe(y,u,b),m&&m.m(y,b),pe(y,l,b),c||(d=[xe(s,"input",r[23]),xe(s,"keydown",r[24]),xe(s,"focus",r[16]),xe(s,"blur",r[25])],c=!0)},p(y,b){b[0]&12&&t!==(t=gt(y[2],y[3])+"")&&(e.innerHTML=t),b[0]&2&&W(e,"for",y[1]),b[0]&8&&W(s,"accesskey",y[3]),b[0]&2&&W(s,"id",y[1]),b[0]&16&&W(s,"placeholder",y[4]),b[0]&64&&s.value!==y[6]&&yr(s,y[6]),y[10]&&y[10].length!==0?f?f.p(y,b):(f=kw(y),f.c(),f.m(u.parentNode,u)):f&&(f.d(1),f=null),y[0][y[1]].length!==0?m?m.p(y,b):(m=Ow(y),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null)},i:Ue,o:Ue,d(y){y&&oe(e),y&&oe(n),y&&oe(i),r[22](null),a(),y&&oe(o),f&&f.d(y),y&&oe(u),m&&m.d(y),y&&oe(l),c=!1,Ut(d)}}}function NI(r,e,t){let{task:n}=e,{editableTask:i}=e,{allTasks:s}=e,{_onDescriptionKeyDown:a}=e,{type:o}=e,{labelText:u}=e,{accesskey:l}=e,{placeholder:c="Type to search..."}=e,d="",f=null,m=0,y,b=!1,k=!1,_,R;function S(v){t(0,i[o]=[...i[o],v],i),t(6,d=""),t(7,b=!1)}function F(v){t(0,i[o]=i[o].filter(x=>x!==v),i)}function q(v){var x;if(f!==null){switch(v.key){case"ArrowUp":v.preventDefault(),!!m&&m>0?t(11,m-=1):t(11,m=f.length-1);break;case"ArrowDown":v.preventDefault(),!!m&&m{x.style.left=`${N}px`,x.style.top=`${ie}px`})}function ge(v){return v===n.taskLocation.path?"":v}function Pe(v){return Ai(v)}function j(v,x){let N=v.createDiv();N.addClasses(["tooltip","pop-up"]),N.innerText=x,oh(v,N,{placement:"top",middleware:[yl(-18),Tl()]}).then(({x:ie,y:ce})=>{N.style.left=`${ie}px`,N.style.top=`${ce}px`}),v.addEventListener("mouseleave",()=>N.remove())}function $(v){je[v?"unshift":"push"](()=>{_=v,t(8,_)})}function D(){d=this.value,t(6,d)}let Y=v=>q(v),I=()=>t(7,b=!1);function J(){y=this.clientWidth,t(12,y)}let p=(v,x)=>j(x.currentTarget,Pe(v)),h=(v,x)=>j(x.currentTarget,v),g=v=>S(v),T=v=>t(11,m=v);function w(v){je[v?"unshift":"push"](()=>{R=v,t(9,R)})}let O=()=>t(11,m=null),M=v=>F(v),P=(v,x)=>j(x.currentTarget,Pe(v));return r.$$set=v=>{"task"in v&&t(5,n=v.task),"editableTask"in v&&t(0,i=v.editableTask),"allTasks"in v&&t(20,s=v.allTasks),"_onDescriptionKeyDown"in v&&t(21,a=v._onDescriptionKeyDown),"type"in v&&t(1,o=v.type),"labelText"in v&&t(2,u=v.labelText),"accesskey"in v&&t(3,l=v.accesskey),"placeholder"in v&&t(4,c=v.placeholder)},r.$$.update=()=>{if(r.$$.dirty[0]&768){e:B(_,R)}if(r.$$.dirty[0]&192){e:t(10,f=b?ne(d):null)}},[i,o,u,l,c,n,d,b,_,R,f,m,y,S,F,q,G,ge,Pe,j,s,a,$,D,Y,I,J,p,h,g,T,w,O,M,P]}var uh=class extends gr{constructor(e){super(),nn(this,e,NI,PI,rn,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},lh=uh;var Uo=require("obsidian");var Lo,ch,dh,II=["md"];function El(){return Rt.getLogger("tasks.File")}var xw=({metadataCache:r,vault:e,workspace:t})=>{Lo=r,ch=e,dh=t},br=t=>A(void 0,[t],function*({originalTask:r,newTasks:e}){if(ch===void 0||Lo===void 0||dh===void 0){wl("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=El(),i="replaceTaskWithTasks()";cl(n,i,r),dl(n,i,e),yield Mw({originalTask:r,newTasks:e,vault:ch,metadataCache:Lo,workspace:dh,previousTries:0})});function wl(r){console.error(r),new Uo.Notice(r,15e3)}function Rw(r){console.warn(r),new Uo.Notice(r,1e4)}function FI(r){El().debug(r)}var ei=class extends Error{},kl=class extends Error{},Mw=a=>A(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=El();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>A(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. +`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new ca.Notice(s,1e4)}static getSection(t,e){if(e===void 0)return null;for(let n of e)if(n.position.start.line<=t&&n.position.end.line>=t)return n;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let n=null;for(let i of e){if(i.position.start.line>t)return n;n=i.heading}return n}};var dg=require("obsidian");var Mk=require("obsidian");function Ze(){}function Bh(r){return r()}function Aw(){return Object.create(null)}function Wt(r){r.forEach(Bh)}function cc(r){return typeof r=="function"}function Rn(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Pw(r){return Object.keys(r).length===0}var Nw=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,wu=class{constructor(t){this.options=t,this._listeners="WeakMap"in Nw?new WeakMap:void 0}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return(t=this._observer)!==null&&t!==void 0?t:this._observer=new ResizeObserver(e=>{var n;for(let i of e)wu.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};wu.entries="WeakMap"in Nw?new WeakMap:void 0;var Iw=!1;function NI(){Iw=!0}function II(){Iw=!1}function $(r,t){r.appendChild(t)}function Te(r,t,e){r.insertBefore(t,e||null)}function ge(r){r.parentNode&&r.parentNode.removeChild(r)}function bs(r,t){for(let e=0;er.removeEventListener(t,e,n)}function Fw(r){return function(t){return t.preventDefault(),r.call(this,t)}}function j(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function Lw(r){let t;return{p(...e){t=e,t.forEach(n=>r.push(n))},r(){t.forEach(e=>r.splice(r.indexOf(e),1))}}}function LI(r){return Array.from(r.childNodes)}function Gr(r,t){t=""+t,r.data!==t&&(r.data=t)}function nr(r,t){r.value=t==null?"":t}function Vh(r,t,e){for(let n=0;n{a.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Le(n.contentWindow,"resize",t),t()}),$(r,n),()=>{(i||s&&n.contentWindow)&&s(),ge(n)}}function ii(r,t,e){r.classList[e?"add":"remove"](t)}var ha=class{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=FI(e.nodeName):this.e=se(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;er.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),ma=t}var lc=new Set,gs;function jw(){gs={r:0,c:[],p:gs}}function Yw(){gs.r||Wt(gs.c),gs=gs.p}function ir(r,t){r&&r.i&&(lc.delete(r),r.i(t))}function _r(r,t,e,n){if(r&&r.o){if(lc.has(r))return;lc.add(r),gs.c.push(()=>{lc.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}var GI=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],a$=new Set([...GI]);function Xt(r,t,e){let n=r.$$.props[t];n!==void 0&&(r.$$.bound[n]=e,e(r.$$.ctx[n]))}function fn(r){r&&r.c()}function Hr(r,t,e,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(t,e),n||ys(()=>{let a=r.$$.on_mount.map(Bh).filter(cc);r.$$.on_destroy?r.$$.on_destroy.push(...a):Wt(a),r.$$.on_mount=[]}),s.forEach(ys)}function vr(r,t){let e=r.$$;e.fragment!==null&&($I(e.after_update),Wt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function HI(r,t){r.$$.dirty[0]===-1&&(pa.push(r),jI(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<{let b=m.length?m[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=b)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](b),c&&HI(r,d)),f}):[],l.update(),c=!0,Wt(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){NI();let d=LI(t.target);l.fragment&&l.fragment.l(d),d.forEach(ge)}else l.fragment&&l.fragment.c();t.intro&&ir(r.$$.fragment),Hr(r,t.target,t.anchor,t.customElement),II(),qw()}vu(u)}var BI;typeof HTMLElement=="function"&&(BI=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Bh).filter(cc);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(r,t,e){this[r]=e}disconnectedCallback(){Wt(this.$$.on_disconnect)}$destroy(){vr(this,1),this.$destroy=Ze}$on(r,t){if(!cc(t))return Ze;let e=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return e.push(t),()=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}}$set(r){this.$$set&&!Pw(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var $r=class{$destroy(){vr(this,1),this.$destroy=Ze}$on(t,e){if(!cc(e))return Ze;let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Pw(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function $w(r,t,e,n){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,t||[])).next())})}function ga(r){return r.charAt(0).toUpperCase()+r.slice(1)}function At(r,t){if(t===null)return ga(r);let e=r.toLowerCase().indexOf(t.toLowerCase());if(e===-1)return`${ga(r)} (${t.toLowerCase()})`;let n=r.substring(0,e);return n+='',e===0?n+=r.substring(e,e+1).toUpperCase():n+=r.substring(e,e+1),n+="",n+=r.substring(e+1),n=ga(n),n}function VI(r){let t,e,n,i;return{c(){t=se("code"),e=Ge(r[4]),n=_e(),i=new ha(!1),i.a=null,j(t,"class","tasks-modal-parsed-date")},m(s,a){Te(s,t,a),$(t,e),$(t,n),i.m(r[2],t)},p(s,a){a&16&&Gr(e,s[4]),a&4&&i.p(s[2])},d(s){s&&ge(t)}}}function zI(r){let t,e,n,i,s;return{c(){t=se("div"),e=Ge(r[4]),n=se("input"),j(n,"class","tasks-modal-date-editor-picker"),j(n,"type","date"),j(n,"id","date-editor-picker"),j(n,"tabindex","-1"),j(t,"class","tasks-modal-parsed-date")},m(a,o){Te(a,t,o),$(t,e),$(t,n),nr(n,r[6]),i||(s=[Le(n,"input",r[10]),Le(n,"input",r[7])],i=!0)},p(a,o){o&16&&Gr(e,a[4]),o&64&&nr(n,a[6])},d(a){a&&ge(t),i=!1,Wt(s)}}}function KI(r){let t,e=At(r[3],r[5])+"",n,i,s,a,o,u;function l(f,m){return f[1]?zI:VI}let c=l(r,-1),d=c(r);return{c(){t=se("label"),n=_e(),i=se("input"),s=_e(),d.c(),a=dc(),j(t,"for",r[3]),j(i,"id",r[3]),j(i,"type","text"),j(i,"class","tasks-modal-date-input"),j(i,"placeholder",QI),j(i,"accesskey",r[5]),ii(i,"tasks-modal-error",!r[1])},m(f,m){Te(f,t,m),t.innerHTML=e,Te(f,n,m),Te(f,i,m),nr(i,r[0]),Te(f,s,m),d.m(f,m),Te(f,a,m),o||(u=Le(i,"input",r[9]),o=!0)},p(f,[m]){m&40&&e!==(e=At(f[3],f[5])+"")&&(t.innerHTML=e),m&8&&j(t,"for",f[3]),m&8&&j(i,"id",f[3]),m&32&&j(i,"accesskey",f[5]),m&1&&i.value!==f[0]&&nr(i,f[0]),m&2&&ii(i,"tasks-modal-error",!f[1]),c===(c=l(f,m))&&d?d.p(f,m):(d.d(1),d=c(f),d&&(d.c(),d.m(a.parentNode,a)))},i:Ze,o:Ze,d(f){f&&ge(t),f&&ge(n),f&&ge(i),f&&ge(s),d.d(f),f&&ge(a),o=!1,u()}}}var QI="Try 'Mon' or 'tm' then space";function XI(r,t,e){let{id:n}=t,{dateSymbol:i}=t,{date:s}=t,{isDateValid:a}=t,{forwardOnly:o}=t,{accesskey:u}=t,{parsedDate:l=""}=t,c="";function d(b){b.target!==null&&e(0,s=c)}function f(){s=this.value,e(0,s),e(3,n),e(8,o),e(2,l),e(1,a)}function m(){c=this.value,e(6,c),e(0,s),e(3,n),e(8,o),e(2,l),e(1,a)}return r.$$set=b=>{"id"in b&&e(3,n=b.id),"dateSymbol"in b&&e(4,i=b.dateSymbol),"date"in b&&e(0,s=b.date),"isDateValid"in b&&e(1,a=b.isDateValid),"forwardOnly"in b&&e(8,o=b.forwardOnly),"accesskey"in b&&e(5,u=b.accesskey),"parsedDate"in b&&e(2,l=b.parsedDate)},r.$$.update=()=>{if(r.$$.dirty&271){e:e(0,s=Yl(s)),e(2,l=Ov(n,s,o)),e(1,a=!l.includes("invalid")),a&&e(6,c=l)}},[s,a,l,n,i,u,c,d,o,f,m]}var Kh=class extends $r{constructor(t){super(),An(this,t,XI,KI,Rn,{id:3,dateSymbol:4,date:0,isDateValid:1,forwardOnly:8,accesskey:5,parsedDate:2})}},Ts=Kh;var _s=Math.min,sr=Math.max,Du=Math.round;var si=r=>({x:r,y:r}),ZI={left:"right",right:"left",bottom:"top",top:"bottom"},JI={start:"end",end:"start"};function Qh(r,t,e){return sr(r,_s(t,e))}function ya(r,t){return typeof r=="function"?r(t):r}function ai(r){return r.split("-")[0]}function ba(r){return r.split("-")[1]}function Xh(r){return r==="x"?"y":"x"}function Zh(r){return r==="y"?"height":"width"}function Ta(r){return["top","bottom"].includes(ai(r))?"y":"x"}function Jh(r){return Xh(Ta(r))}function Gw(r,t,e){e===void 0&&(e=!1);let n=ba(r),i=Jh(r),s=Zh(i),a=i==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Eu(a)),[a,Eu(a)]}function Hw(r){let t=Eu(r);return[fc(r),t,fc(t)]}function fc(r){return r.replace(/start|end/g,t=>JI[t])}function eF(r,t,e){let n=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return e?t?i:n:t?n:i;case"left":case"right":return t?s:a;default:return[]}}function Bw(r,t,e,n){let i=ba(r),s=eF(ai(r),e==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(fc)))),s}function Eu(r){return r.replace(/left|right|bottom|top/g,t=>ZI[t])}function tF(r){return ne({top:0,right:0,bottom:0,left:0},r)}function Vw(r){return typeof r!="number"?tF(r):{top:r,right:r,bottom:r,left:r}}function vs(r){return Ee(ne({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function zw(r,t,e){let{reference:n,floating:i}=r,s=Ta(t),a=Jh(t),o=Zh(a),u=ai(t),l=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[o]/2-i[o]/2,m;switch(u){case"top":m={x:c,y:n.y-i.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-i.width,y:d};break;default:m={x:n.x,y:n.y}}switch(ba(t)){case"start":m[a]-=f*(e&&l?-1:1);break;case"end":m[a]+=f*(e&&l?-1:1);break}return m}var Kw=(r,t,e)=>F(void 0,null,function*(){let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=e,o=s.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(t),l=yield a.getElementRects({reference:r,floating:t,strategy:i}),{x:c,y:d}=zw(l,n,u),f=n,m={},b=0;for(let T=0;TZ<=0)){var Pe,Q;let Z=(((Pe=a.flip)==null?void 0:Pe.index)||0)+1,W=oe[Z];if(W)return{data:{index:Z,overflows:Se},reset:{placement:W}};let ae=(Q=Se.filter(p=>p.overflows[0]<=0).sort((p,y)=>p.overflows[1]-y.overflows[1])[0])==null?void 0:Q.placement;if(!ae)switch(b){case"bestFit":{var B;let p=(B=Se.map(y=>[y.placement,y.overflows.filter(v=>v>0).reduce((v,w)=>v+w,0)]).sort((y,v)=>y[1]-v[1])[0])==null?void 0:B[0];p&&(ae=p);break}case"initialPlacement":ae=u;break}if(s!==ae)return{reset:{placement:ae}}}return{}})}}};function rF(r,t){return F(this,null,function*(){let{placement:e,platform:n,elements:i}=r,s=yield n.isRTL==null?void 0:n.isRTL(i.floating),a=ai(e),o=ba(e),u=Ta(e)==="y",l=["left","top"].includes(a)?-1:1,c=s&&u?-1:1,d=ya(t,r),{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:ne({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return o&&typeof b=="number"&&(m=o==="end"?b*-1:b),u?{x:m*c,y:f*l}:{x:f*l,y:m*c}})}var mc=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(e){return F(this,null,function*(){var n,i;let{x:s,y:a,placement:o,middlewareData:u}=e,l=yield rF(e,r);return o===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:Ee(ne({},l),{placement:o})}})}}},hc=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(e){return F(this,null,function*(){let{x:n,y:i,placement:s}=e,x=ya(r,e),{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:O=>{let{x:M,y:Y}=O;return{x:M,y:Y}}}}=x,l=Vu(x,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},d=yield pc(e,l),f=Ta(ai(s)),m=Xh(f),b=c[m],T=c[f];if(a){let O=m==="y"?"top":"left",M=m==="y"?"bottom":"right",Y=b+d[O],G=b-d[M];b=Qh(Y,b,G)}if(o){let O=f==="y"?"top":"left",M=f==="y"?"bottom":"right",Y=T+d[O],G=T-d[M];T=Qh(Y,T,G)}let _=u.fn(Ee(ne({},e),{[m]:b,[f]:T}));return Ee(ne({},_),{data:{x:_.x-n,y:_.y-i}})})}}};var tg=function(r){return r===void 0&&(r={}),{name:"size",options:r,fn(e){return F(this,null,function*(){let{placement:n,rects:i,platform:s,elements:a}=e,V=ya(r,e),{apply:o=()=>{}}=V,u=Vu(V,["apply"]),l=yield pc(e,u),c=ai(n),d=ba(n),f=Ta(n)==="y",{width:m,height:b}=i.floating,T,_;c==="top"||c==="bottom"?(T=c,_=d===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=c,T=d==="end"?"top":"bottom");let x=b-l[T],O=m-l[_],M=!e.middlewareData.shift,Y=x,G=O;if(f){let K=m-l.left-l.right;G=d||M?_s(O,K):K}else{let K=b-l.top-l.bottom;Y=d||M?_s(x,K):K}if(M&&!d){let K=sr(l.left,0),Se=sr(l.right,0),Pe=sr(l.top,0),Q=sr(l.bottom,0);f?G=m-2*(K!==0||Se!==0?K+Se:sr(l.left,l.right)):Y=b-2*(Pe!==0||Q!==0?Pe+Q:sr(l.top,l.bottom))}yield o(Ee(ne({},e),{availableWidth:G,availableHeight:Y}));let oe=yield s.getDimensions(a.floating);return m!==oe.width||b!==oe.height?{reset:{rects:!0}}:{}})}}};function oi(r){return Xw(r)?(r.nodeName||"").toLowerCase():"#document"}function ar(r){var t;return(r==null||(t=r.ownerDocument)==null?void 0:t.defaultView)||window}function ui(r){var t;return(t=(Xw(r)?r.ownerDocument:r.document)||window.document)==null?void 0:t.documentElement}function Xw(r){return r instanceof Node||r instanceof ar(r).Node}function Pn(r){return r instanceof Element||r instanceof ar(r).Element}function pn(r){return r instanceof HTMLElement||r instanceof ar(r).HTMLElement}function Qw(r){return typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof ar(r).ShadowRoot}function _a(r){let{overflow:t,overflowX:e,overflowY:n,display:i}=wr(r);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&!["inline","contents"].includes(i)}function Zw(r){return["table","td","th"].includes(oi(r))}function yc(r){let t=bc(),e=wr(r);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(e.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(e.contain||"").includes(n))}function Jw(r){let t=ws(r);for(;pn(t)&&!Su(t);){if(yc(t))return t;t=ws(t)}return null}function bc(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Su(r){return["html","body","#document"].includes(oi(r))}function wr(r){return ar(r).getComputedStyle(r)}function Ou(r){return Pn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function ws(r){if(oi(r)==="html")return r;let t=r.assignedSlot||r.parentNode||Qw(r)&&r.host||ui(r);return Qw(t)?t.host:t}function ek(r){let t=ws(r);return Su(t)?r.ownerDocument?r.ownerDocument.body:r.body:pn(t)&&_a(t)?t:ek(t)}function gc(r,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=ek(r),s=i===((n=r.ownerDocument)==null?void 0:n.body),a=ar(i);return s?t.concat(a,a.visualViewport||[],_a(i)?i:[],a.frameElement&&e?gc(a.frameElement):[]):t.concat(i,gc(i,[],e))}function nk(r){let t=wr(r),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=pn(r),s=i?r.offsetWidth:e,a=i?r.offsetHeight:n,o=Du(e)!==s||Du(n)!==a;return o&&(e=s,n=a),{width:e,height:n,$:o}}function ik(r){return Pn(r)?r:r.contextElement}function va(r){let t=ik(r);if(!pn(t))return si(1);let e=t.getBoundingClientRect(),{width:n,height:i,$:s}=nk(t),a=(s?Du(e.width):e.width)/n,o=(s?Du(e.height):e.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var nF=si(0);function sk(r){let t=ar(r);return!bc()||!t.visualViewport?nF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iF(r,t,e){return t===void 0&&(t=!1),!e||t&&e!==ar(r)?!1:t}function xu(r,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=r.getBoundingClientRect(),s=ik(r),a=si(1);t&&(n?Pn(n)&&(a=va(n)):a=va(r));let o=iF(s,e,n)?sk(s):si(0),u=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let f=ar(s),m=n&&Pn(n)?ar(n):n,b=f.frameElement;for(;b&&n&&m!==f;){let T=va(b),_=b.getBoundingClientRect(),x=wr(b),O=_.left+(b.clientLeft+parseFloat(x.paddingLeft))*T.x,M=_.top+(b.clientTop+parseFloat(x.paddingTop))*T.y;u*=T.x,l*=T.y,c*=T.x,d*=T.y,u+=O,l+=M,b=ar(b).frameElement}}return vs({width:c,height:d,x:u,y:l})}function sF(r){let{rect:t,offsetParent:e,strategy:n}=r,i=pn(e),s=ui(e);if(e===s)return t;let a={scrollLeft:0,scrollTop:0},o=si(1),u=si(0);if((i||!i&&n!=="fixed")&&((oi(e)!=="body"||_a(s))&&(a=Ou(e)),pn(e))){let l=xu(e);o=va(e),u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}return{width:t.width*o.x,height:t.height*o.y,x:t.x*o.x-a.scrollLeft*o.x+u.x,y:t.y*o.y-a.scrollTop*o.y+u.y}}function aF(r){return Array.from(r.getClientRects())}function ak(r){return xu(ui(r)).left+Ou(r).scrollLeft}function oF(r){let t=ui(r),e=Ou(r),n=r.ownerDocument.body,i=sr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=sr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-e.scrollLeft+ak(r),o=-e.scrollTop;return wr(n).direction==="rtl"&&(a+=sr(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}function uF(r,t){let e=ar(r),n=ui(r),i=e.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,u=0;if(i){s=i.width,a=i.height;let l=bc();(!l||l&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:o,y:u}}function lF(r,t){let e=xu(r,!0,t==="fixed"),n=e.top+r.clientTop,i=e.left+r.clientLeft,s=pn(r)?va(r):si(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,u=i*s.x,l=n*s.y;return{width:a,height:o,x:u,y:l}}function tk(r,t,e){let n;if(t==="viewport")n=uF(r,e);else if(t==="document")n=oF(ui(r));else if(Pn(t))n=lF(t,e);else{let i=sk(r);n=Ee(ne({},t),{x:t.x-i.x,y:t.y-i.y})}return vs(n)}function ok(r,t){let e=ws(r);return e===t||!Pn(e)||Su(e)?!1:wr(e).position==="fixed"||ok(e,t)}function cF(r,t){let e=t.get(r);if(e)return e;let n=gc(r,[],!1).filter(o=>Pn(o)&&oi(o)!=="body"),i=null,s=wr(r).position==="fixed",a=s?ws(r):r;for(;Pn(a)&&!Su(a);){let o=wr(a),u=yc(a);!u&&o.position==="fixed"&&(i=null),(s?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||_a(a)&&!u&&ok(r,a))?n=n.filter(c=>c!==a):i=o,a=ws(a)}return t.set(r,n),n}function dF(r){let{element:t,boundary:e,rootBoundary:n,strategy:i}=r,a=[...e==="clippingAncestors"?cF(t,this._c):[].concat(e),n],o=a[0],u=a.reduce((l,c)=>{let d=tk(t,c,i);return l.top=sr(d.top,l.top),l.right=_s(d.right,l.right),l.bottom=_s(d.bottom,l.bottom),l.left=sr(d.left,l.left),l},tk(t,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function fF(r){return nk(r)}function pF(r,t,e){let n=pn(t),i=ui(t),s=e==="fixed",a=xu(r,!0,s,t),o={scrollLeft:0,scrollTop:0},u=si(0);if(n||!n&&!s)if((oi(t)!=="body"||_a(i))&&(o=Ou(t)),n){let l=xu(t,!0,s,t);u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}else i&&(u.x=ak(i));return{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function rk(r,t){return!pn(r)||wr(r).position==="fixed"?null:t?t(r):r.offsetParent}function uk(r,t){let e=ar(r);if(!pn(r))return e;let n=rk(r,t);for(;n&&Zw(n)&&wr(n).position==="static";)n=rk(n,t);return n&&(oi(n)==="html"||oi(n)==="body"&&wr(n).position==="static"&&!yc(n))?e:n||Jw(r)||e}var mF=function(r){return F(this,null,function*(){let{reference:t,floating:e,strategy:n}=r,i=this.getOffsetParent||uk,s=this.getDimensions;return{reference:pF(t,yield i(e),n),floating:ne({x:0,y:0},yield s(e))}})};function hF(r){return wr(r).direction==="rtl"}var gF={convertOffsetParentRelativeRectToViewportRelativeRect:sF,getDocumentElement:ui,getClippingRect:dF,getOffsetParent:uk,getElementRects:mF,getClientRects:aF,getDimensions:fF,getScale:va,isElement:Pn,isRTL:hF};var rg=(r,t,e)=>{let n=new Map,i=ne({platform:gF},e),s=Ee(ne({},i.platform),{_c:n});return Kw(r,t,Ee(ne({},i),{platform:s}))};function lk(r,t,e){let n=r.slice();return n[5]=t[e],n}function ck(r,t,e){let n=r.slice();n[40]=t[e],n[43]=e;let i=n[17](n[40].taskLocation.path);return n[41]=i,n}function dk(r){let t,e,n,i=r[10],s=[];for(let a=0;a',d=_e(),j(e,"class","task-dependency-name"),j(c,"type","button"),j(c,"class","task-dependency-delete"),j(t,"class","task-dependency")},m(_,x){Te(_,t,x),$(t,e),$(e,n),$(e,s),$(e,a),$(e,u),$(t,l),$(t,c),$(t,d),f||(m=[Le(c,"click",b),Le(t,"mouseenter",T)],f=!0)},p(_,x){r=_,x[0]&3&&i!==(i=r[5].status.symbol+"")&&Gr(s,i),x[0]&3&&o!==(o=ps(r[5])+"")&&Gr(u,o)},d(_){_&&ge(t),f=!1,Wt(m)}}}function yF(r){let t,e=At(r[2],r[3])+"",n,i,s,a,o,u,l,c,d,f=r[10]&&r[10].length!==0&&dk(r),m=r[0][r[1]].length!==0&&mk(r);return{c(){t=se("label"),n=_e(),i=se("span"),s=se("input"),o=_e(),f&&f.c(),u=_e(),m&&m.c(),l=dc(),j(t,"for",r[1]),j(s,"accesskey",r[3]),j(s,"id",r[1]),j(s,"class","tasks-modal-dependency-input"),j(s,"type","text"),j(s,"placeholder",r[4]),ys(()=>r[26].call(i))},m(b,T){Te(b,t,T),t.innerHTML=e,Te(b,n,T),Te(b,i,T),$(i,s),r[22](s),nr(s,r[6]),a=Ww(i,r[26].bind(i)),Te(b,o,T),f&&f.m(b,T),Te(b,u,T),m&&m.m(b,T),Te(b,l,T),c||(d=[Le(s,"input",r[23]),Le(s,"keydown",r[24]),Le(s,"focus",r[16]),Le(s,"blur",r[25])],c=!0)},p(b,T){T[0]&12&&e!==(e=At(b[2],b[3])+"")&&(t.innerHTML=e),T[0]&2&&j(t,"for",b[1]),T[0]&8&&j(s,"accesskey",b[3]),T[0]&2&&j(s,"id",b[1]),T[0]&16&&j(s,"placeholder",b[4]),T[0]&64&&s.value!==b[6]&&nr(s,b[6]),b[10]&&b[10].length!==0?f?f.p(b,T):(f=dk(b),f.c(),f.m(u.parentNode,u)):f&&(f.d(1),f=null),b[0][b[1]].length!==0?m?m.p(b,T):(m=mk(b),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null)},i:Ze,o:Ze,d(b){b&&ge(t),b&&ge(n),b&&ge(i),r[22](null),a(),b&&ge(o),f&&f.d(b),b&&ge(u),m&&m.d(b),b&&ge(l),c=!1,Wt(d)}}}function bF(r,t,e){let{task:n}=t,{editableTask:i}=t,{allTasks:s}=t,{_onDescriptionKeyDown:a}=t,{type:o}=t,{labelText:u}=t,{accesskey:l}=t,{placeholder:c="Type to search..."}=t,d="",f=null,m=0,b,T=!1,_=!1,x,O;function M(E){e(0,i[o]=[...i[o],E],i),e(6,d=""),e(7,T=!1)}function Y(E){e(0,i[o]=i[o].filter(P=>P!==E),i)}function G(E){var P;if(f!==null){switch(E.key){case"ArrowUp":E.preventDefault(),!!m&&m>0?e(11,m-=1):e(11,m=f.length-1);break;case"ArrowDown":E.preventDefault(),!!m&&m{P.style.left=`${U}px`,P.style.top=`${ue}px`})}function Se(E){return E===n.taskLocation.path?"":E}function Pe(E){return ps(E)}function Q(E,P){let U=E.createDiv();U.addClasses(["tooltip","pop-up"]),U.innerText=P,rg(E,U,{placement:"top",middleware:[mc(-18),hc()]}).then(({x:ue,y:me})=>{U.style.left=`${ue}px`,U.style.top=`${me}px`}),E.addEventListener("mouseleave",()=>U.remove())}function B(E){nt[E?"unshift":"push"](()=>{x=E,e(8,x)})}function C(){d=this.value,e(6,d)}let Z=E=>G(E),W=()=>e(7,T=!1);function ae(){b=this.clientWidth,e(12,b)}let p=(E,P)=>Q(P.currentTarget,Pe(E)),y=(E,P)=>Q(P.currentTarget,E),v=E=>M(E),w=E=>e(11,m=E);function D(E){nt[E?"unshift":"push"](()=>{O=E,e(9,O)})}let R=()=>e(11,m=null),N=E=>Y(E),L=(E,P)=>Q(P.currentTarget,Pe(E));return r.$$set=E=>{"task"in E&&e(5,n=E.task),"editableTask"in E&&e(0,i=E.editableTask),"allTasks"in E&&e(20,s=E.allTasks),"_onDescriptionKeyDown"in E&&e(21,a=E._onDescriptionKeyDown),"type"in E&&e(1,o=E.type),"labelText"in E&&e(2,u=E.labelText),"accesskey"in E&&e(3,l=E.accesskey),"placeholder"in E&&e(4,c=E.placeholder)},r.$$.update=()=>{if(r.$$.dirty[0]&768){e:K(x,O)}if(r.$$.dirty[0]&192){e:e(10,f=T?oe(d):null)}},[i,o,u,l,c,n,d,T,x,O,f,m,b,M,Y,G,V,Se,Pe,Q,s,a,B,C,Z,W,ae,p,y,v,w,D,R,N,L]}var ng=class extends $r{constructor(t){super(),An(this,t,bF,yF,Rn,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},ig=ng;var Cu=require("obsidian");var Mu,sg,ag,TF=["md"];function vc(){return Kt.getLogger("tasks.File")}var gk=({metadataCache:r,vault:t,workspace:e})=>{Mu=r,sg=t,ag=e},Br=e=>F(void 0,[e],function*({originalTask:r,newTasks:t}){if(sg===void 0||Mu===void 0||ag===void 0){Tc("Tasks: cannot use File before initializing it.");return}Array.isArray(t)||(t=[t]);let n=vc(),i="replaceTaskWithTasks()";ac(n,i,r),oc(n,i,t),yield bk({originalTask:r,newTasks:t,vault:sg,metadataCache:Mu,workspace:ag,previousTries:0})});function Tc(r){console.error(r),new Cu.Notice(r,15e3)}function yk(r){console.warn(r),new Cu.Notice(r,1e4)}function _F(r){vc().debug(r)}var xi=class extends Error{},_c=class extends Error{},bk=a=>F(void 0,[a],function*({originalTask:r,newTasks:t,vault:e,metadataCache:n,workspace:i,previousTries:s}){let o=vc();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>F(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. The task line not updated is: ${r.originalMarkdown} @@ -205,43 +205,43 @@ Recommendations: 1. Close all panes that have the above file open, and then re-open the file. 2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. -`;wl(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>A(void 0,null,function*(){yield Mw({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})}),l)});try{let[l,c,d]=yield Cw(r,t),f=[...d.slice(0,l),...e.map(m=>m.toFileLineString()),...d.slice(l+1)];yield t.modify(c,f.join(` -`))}catch(l){if(l instanceof ei){l.message&&Rw(l.message),yield u();return}else if(l instanceof kl){yield u();return}else l instanceof Error&&wl(l.message)}});function Cw(r,e){return A(this,null,function*(){if(Lo===void 0)throw new ei;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Uo.TFile))throw new ei(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!II.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Lo.getFileCache(t);if(n==null||n===null)throw new ei(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new ei(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=LI(r,a,i,FI);if(o===void 0)throw new kl;return[o,t,a]})}function fh(r,e){return A(this,null,function*(){try{let[t,n,i]=yield Cw(r,e);return[t,n]}catch(t){t instanceof ei?t.message&&Rw(t.message):t instanceof Error&&wl(t.message)}})}function Aw(r,e){return rF(void 0,null,function*(){yield bk({originalTask:r,newTasks:t,vault:e,metadataCache:n,workspace:i,previousTries:s+1})}),l)});try{let[l,c,d]=yield Tk(r,e),f=[...d.slice(0,l),...t.map(m=>m.toFileLineString()),...d.slice(l+1)];yield e.modify(c,f.join(` +`))}catch(l){if(l instanceof xi){l.message&&yk(l.message),yield u();return}else if(l instanceof _c){yield u();return}else l instanceof Error&&Tc(l.message)}});function Tk(r,t){return F(this,null,function*(){if(Mu===void 0)throw new xi;let e=t.getAbstractFileByPath(r.path);if(!(e instanceof Cu.TFile))throw new xi(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!TF.includes(e.extension))throw new Error(`Tasks: Does not support files with the ${e.extension} file extension.`);let n=Mu.getFileCache(e);if(n==null||n===null)throw new xi(`Tasks: No file cache found for file ${e.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new xi(`Tasks: No list items found in file cache of ${e.path}. Retrying ...`);let a=(yield t.read(e)).split(` +`),o=vF(r,a,i,_F);if(o===void 0)throw new _c;return[o,e,a]})}function og(r,t){return F(this,null,function*(){try{let[e,n,i]=yield Tk(r,t);return[e,n]}catch(e){e instanceof xi?e.message&&yk(e.message):e instanceof Error&&Tc(e.message)}})}function _k(r,t){return rc.id===u);!l||a.push(l)}let o=t.filter(u=>u.dependsOn.includes(e.id));return new Is({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:e.status,priority:s,recurrenceRule:e.recurrence?e.recurrence.toText():"",onCompletion:e.onCompletion,createdDate:e.created.formatAsDate(),startDate:e.start.formatAsDate(),scheduledDate:e.scheduled.formatAsDate(),dueDate:e.due.formatAsDate(),doneDate:e.done.formatAsDate(),cancelledDate:e.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(e,t){return A(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=ve.getInstance().prependTo(n));let i=Si(this.startDate,this.forwardOnly),s=Si(this.scheduledDate,this.forwardOnly),a=Si(this.dueDate,this.forwardOnly),o=Si(this.cancelledDate,this.forwardOnly),u=Si(this.createdDate,this.forwardOnly),l=Si(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=st.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:i,scheduledDate:s,dueDate:a})}));let d;switch(this.priority){case"lowest":d="5";break;case"low":d="4";break;case"medium":d="2";break;case"high":d="1";break;case"highest":d="0";break;default:d="3"}let f=this.onCompletion,m=[];for(let S of this.blockedBy){let F=yield $I(S,t);m.push(F)}let y=e.id,b=[],k=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(e.id===""&&(y=Oo(t.filter(S=>S.id!=="").map(S=>S.id))),b=this.originalBlocking.filter(S=>!this.blocking.includes(S)),k=this.blocking.filter(S=>!this.originalBlocking.includes(S)));let _=new ee(de(K({},e),{description:n,status:e.status,priority:d,onCompletion:f,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:m.map(S=>S.id),id:y}));for(let S of b){let F=xv(S,_);yield br({originalTask:S,newTasks:F})}for(let S of k){let F=Dv(S,_);yield br({originalTask:S,newTasks:F})}let R=this.inferTodaysDate(this.status.type,l,o);return _.handleNewStatusWithRecurrenceInUsersOrder(this.status,R)})}inferTodaysDate(e,t,n){return e==="DONE"&&t!==null?t:e==="CANCELLED"&&n!==null?n:window.moment()}parseAndValidateRecurrence(){var t;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let e=(t=st.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:t.toText();return e?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:e,isRecurrenceValid:!0}:{parsedRecurrence:"due, scheduled or start date required",isRecurrenceValid:!1}:{parsedRecurrence:"invalid recurrence rule",isRecurrenceValid:!1}}};function $I(r,e){return A(this,null,function*(){if(r.id!=="")return r;let t=e.filter(i=>i.id!==""),n=il(r,t.map(i=>i.id));return yield br({originalTask:r,newTasks:n}),n})}function jI(r){let e,t=gt("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){e=X("label"),n=ue(),i=X("input"),s=ue(),a=X("code"),o=Me(r[4]),u=ue(),l=new xs(!1),W(e,"for","recurrence"),W(i,"id","recurrence"),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder","Try 'every day when done'"),W(i,"accesskey",r[2]),An(i,"tasks-modal-error",!r[1]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(f,m){pe(f,e,m),e.innerHTML=t,pe(f,n,m),pe(f,i,m),yr(i,r[0].recurrenceRule),pe(f,s,m),pe(f,a,m),U(a,o),U(a,u),l.m(r[3],a),c||(d=xe(i,"input",r[5]),c=!0)},p(f,[m]){m&4&&t!==(t=gt("Recurs",f[2])+"")&&(e.innerHTML=t),m&4&&W(i,"accesskey",f[2]),m&1&&i.value!==f[0].recurrenceRule&&yr(i,f[0].recurrenceRule),m&2&&An(i,"tasks-modal-error",!f[1]),m&8&&l.p(f[3])},i:Ue,o:Ue,d(f){f&&oe(e),f&&oe(n),f&&oe(i),f&&oe(s),f&&oe(a),c=!1,d()}}}function GI(r,e,t){let{editableTask:n}=e,{isRecurrenceValid:i}=e,{accesskey:s}=e,a,{recurrenceSymbol:o}=Nr.tasksPluginEmoji.taskSerializer.symbols;function u(){n.recurrenceRule=this.value,t(0,n)}return r.$$set=l=>{"editableTask"in l&&t(0,n=l.editableTask),"isRecurrenceValid"in l&&t(1,i=l.isRecurrenceValid),"accesskey"in l&&t(2,s=l.accesskey)},r.$$.update=()=>{if(r.$$.dirty&1){e:t(3,{parsedRecurrence:a,isRecurrenceValid:i}=n.parseAndValidateRecurrence(),a,(t(1,i),t(0,n)))}},[n,i,s,a,o,u]}var ph=class extends gr{constructor(e){super(),nn(this,e,GI,jI,rn,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},Pw=ph;function Nw(r,e,t){let n=r.slice();return n[7]=e[t],n}function Iw(r){let e,t=r[7].name+"",n,i,s=r[7].symbol+"",a,o,u;return{c(){e=X("option"),n=Me(t),i=Me(" ["),a=Me(s),o=Me("]"),e.__value=u=r[7].symbol,e.value=e.__value},m(l,c){pe(l,e,c),U(e,n),U(e,i),U(e,a),U(e,o)},p(l,c){c&1&&t!==(t=l[7].name+"")&&Fr(n,t),c&1&&s!==(s=l[7].symbol+"")&&Fr(a,s),c&1&&u!==(u=l[7].symbol)&&(e.__value=u,e.value=e.__value)},d(l){l&&oe(e)}}}function YI(r){let e,t=gt("Status",r[1])+"",n,i,s,a,o=r[0],u=[];for(let l=0;lr[6].call(i))},m(l,c){pe(l,e,c),e.innerHTML=t,pe(l,n,c),pe(l,i,c);for(let d=0;d{let c=s.find(f=>f.symbol===o);if(c)t(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=n.handleNewStatus(c).pop();d&&(t(4,i.doneDate=Fw(i.doneDate,c.isCompleted(),d.done),i),t(4,i.cancelledDate=Fw(i.cancelledDate,c.isCancelled(),d.cancelled),i))};function l(){o=Qv(this),t(2,o),t(0,s)}return r.$$set=c=>{"task"in c&&t(5,n=c.task),"editableTask"in c&&t(4,i=c.editableTask),"statusOptions"in c&&t(0,s=c.statusOptions),"accesskey"in c&&t(1,a=c.accesskey)},[s,a,o,u,i,n,l]}var mh=class extends gr{constructor(e){super(),nn(this,e,BI,YI,rn,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},Lw=mh;function Uw(r,e,t){let n=r.slice();return n[52]=e[t].value,n[53]=e[t].label,n[54]=e[t].symbol,n[55]=e[t].accessKey,n[56]=e[t].accessKeyIndex,n}function HI(r){let e,t=r[53]+"",n;return{c(){e=X("span"),n=Me(t)},m(i,s){pe(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function VI(r){let e,t=r[53].substring(0,r[56])+"",n,i,s=r[53].substring(r[56],r[56]+1)+"",a,o,u=r[53].substring(r[56]+1)+"",l;return{c(){e=X("span"),n=Me(t),i=X("span"),a=Me(s),o=X("span"),l=Me(u),W(i,"class","accesskey")},m(c,d){pe(c,e,d),U(e,n),pe(c,i,d),U(i,a),pe(c,o,d),U(o,l)},p:Ue,d(c){c&&oe(e),c&&oe(i),c&&oe(o)}}}function zI(r){let e,t=r[54]+"",n;return{c(){e=X("span"),n=Me(t)},m(i,s){pe(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function Ww(r){let e,t,n,i,s,a,o,u,l=r[54]&&r[54].charCodeAt(0)>=256,c,d,f,m,y;function b(S,F){return S[11]?VI:HI}let k=b(r,[-1,-1]),_=k(r),R=l&&zI(r);return f=Kv(r[35][0]),{c(){e=X("div"),t=X("input"),a=ue(),o=X("label"),_.c(),u=ue(),R&&R.c(),d=ue(),W(t,"type","radio"),W(t,"id",n="priority-"+r[52]),t.__value=i=r[52],t.value=t.__value,W(t,"accesskey",s=r[15](r[55])),W(o,"for",c="priority-"+r[52]),W(e,"class","task-modal-priority-option-container"),f.p(t)},m(S,F){pe(S,e,F),U(e,t),t.checked=t.__value===r[3].priority,U(e,a),U(e,o),_.m(o,null),U(o,u),R&&R.m(o,null),U(e,d),m||(y=xe(t,"change",r[34]),m=!0)},p(S,F){F[0]&32768&&s!==(s=S[15](S[55]))&&W(t,"accesskey",s),F[0]&8&&(t.checked=t.__value===S[3].priority),k===(k=b(S,F))&&_?_.p(S,F):(_.d(1),_=k(S),_&&(_.c(),_.m(o,u))),l&&R.p(S,F)},d(S){S&&oe(e),_.d(),R&&R.d(),f.r(),m=!1,y()}}}function KI(r){let e;return{c(){e=X("div"),e.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(t,n){pe(t,e,n)},p:Ue,i:Ue,o:Ue,d(t){t&&oe(e)}}}function QI(r){let e,t,n,i;return e=new lh({props:{type:"blockedBy",labelText:"Before this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),n=new lh({props:{type:"blocking",labelText:"After this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){Lr(e.$$.fragment),t=ue(),Lr(n.$$.fragment)},m(s,a){Tr(e,s,a),pe(s,t,a),Tr(n,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),e.$set(o);let u={};a[0]&1&&(u.task=s[0]),a[0]&8&&(u.editableTask=s[3]),a[0]&4&&(u.allTasks=s[2]),a[0]&32768&&(u.accesskey=s[15]("e")),n.$set(u)},i(s){i||(Wt(e.$$.fragment,s),Wt(n.$$.fragment,s),i=!0)},o(s){Qt(e.$$.fragment,s),Qt(n.$$.fragment,s),i=!1},d(s){Xt(e,s),s&&oe(t),Xt(n,s)}}}function XI(r){let e,t,n,i=gt("Description",r[15]("t"))+"",s,a,o,u,l,c,d,f,m,y,b,k,_,R,S,F,q,ne,G,B,ge,Pe,j,$,D,Y,I,J,p,h,g=gt("Only future dates:",r[15]("f"))+"",T,w,O,M,P,v,x,N,ie,ce,me,Ne,Ce,Nt,fn,Br,ot,Et,Ge,z,Er,wc,kc,Qh,Sr,Ec,Sc,Xh,Xi,pi,Zh,Qo,Jh,sa,Hr,Oc,eg,Zi=r[22],St=[];for(let C=0;CCt(R,"isRecurrenceValid",aE));function oE(C){r[37](C)}function uE(C){r[38](C)}let Dc={id:"due",dateSymbol:r[18],forwardOnly:r[3].forwardOnly,accesskey:r[15]("d")};r[3].dueDate!==void 0&&(Dc.date=r[3].dueDate),r[7]!==void 0&&(Dc.isDateValid=r[7]),q=new Ui({props:Dc}),je.push(()=>Ct(q,"date",oE)),je.push(()=>Ct(q,"isDateValid",uE)),q.$on("open",r[27]),q.$on("close",r[28]);function lE(C){r[39](C)}function cE(C){r[40](C)}let xc={id:"scheduled",dateSymbol:r[17],forwardOnly:r[3].forwardOnly,accesskey:r[15]("s")};r[3].scheduledDate!==void 0&&(xc.date=r[3].scheduledDate),r[8]!==void 0&&(xc.isDateValid=r[8]),ge=new Ui({props:xc}),je.push(()=>Ct(ge,"date",lE)),je.push(()=>Ct(ge,"isDateValid",cE)),ge.$on("open",r[27]),ge.$on("close",r[28]);function dE(C){r[41](C)}function fE(C){r[42](C)}let Rc={id:"start",dateSymbol:r[16],forwardOnly:r[3].forwardOnly,accesskey:r[15]("a")};r[3].startDate!==void 0&&(Rc.date=r[3].startDate),r[9]!==void 0&&(Rc.isDateValid=r[9]),D=new Ui({props:Rc}),je.push(()=>Ct(D,"date",dE)),je.push(()=>Ct(D,"isDateValid",fE)),D.$on("open",r[27]),D.$on("close",r[28]);let rg=[QI,KI],jn=[];function ng(C,te){return C[2].length>0&&C[14]?0:1}N=ng(r,[-1,-1]),ie=jn[N]=rg[N](r);function pE(C){r[44](C)}let ig={task:r[0],statusOptions:r[1],accesskey:r[15]("u")};r[3]!==void 0&&(ig.editableTask=r[3]),Nt=new Lw({props:ig}),je.push(()=>Ct(Nt,"editableTask",pE));function mE(C){r[45](C)}function hE(C){r[46](C)}let Mc={id:"created",dateSymbol:r[20],forwardOnly:r[3].forwardOnly,accesskey:r[15]("c")};r[3].createdDate!==void 0&&(Mc.date=r[3].createdDate),r[5]!==void 0&&(Mc.isDateValid=r[5]),ot=new Ui({props:Mc}),je.push(()=>Ct(ot,"date",mE)),je.push(()=>Ct(ot,"isDateValid",hE)),ot.$on("open",r[27]),ot.$on("close",r[28]);function gE(C){r[47](C)}function yE(C){r[48](C)}let Cc={id:"done",dateSymbol:r[21],forwardOnly:r[3].forwardOnly,accesskey:r[15]("x")};r[3].doneDate!==void 0&&(Cc.date=r[3].doneDate),r[6]!==void 0&&(Cc.isDateValid=r[6]),Er=new Ui({props:Cc}),je.push(()=>Ct(Er,"date",gE)),je.push(()=>Ct(Er,"isDateValid",yE)),Er.$on("open",r[27]),Er.$on("close",r[28]);function TE(C){r[49](C)}function bE(C){r[50](C)}let Ac={id:"cancelled",dateSymbol:r[19],forwardOnly:r[3].forwardOnly,accesskey:r[15]("-")};return r[3].cancelledDate!==void 0&&(Ac.date=r[3].cancelledDate),r[4]!==void 0&&(Ac.isDateValid=r[4]),Sr=new Ui({props:Ac}),je.push(()=>Ct(Sr,"date",TE)),je.push(()=>Ct(Sr,"isDateValid",bE)),Sr.$on("open",r[27]),Sr.$on("close",r[28]),{c(){e=X("form"),t=X("section"),n=X("label"),s=ue(),a=X("textarea"),u=ue(),l=X("section"),c=X("label"),d=Me("Priority"),m=ue();for(let C=0;CS=!1)),R.$set(pn);let aa={};te[0]&8&&(aa.forwardOnly=C[3].forwardOnly),te[0]&32768&&(aa.accesskey=C[15]("d")),!ne&&te[0]&8&&(ne=!0,aa.date=C[3].dueDate,Mt(()=>ne=!1)),!G&&te[0]&128&&(G=!0,aa.isDateValid=C[7],Mt(()=>G=!1)),q.$set(aa);let oa={};te[0]&8&&(oa.forwardOnly=C[3].forwardOnly),te[0]&32768&&(oa.accesskey=C[15]("s")),!Pe&&te[0]&8&&(Pe=!0,oa.date=C[3].scheduledDate,Mt(()=>Pe=!1)),!j&&te[0]&256&&(j=!0,oa.isDateValid=C[8],Mt(()=>j=!1)),ge.$set(oa);let ua={};te[0]&8&&(ua.forwardOnly=C[3].forwardOnly),te[0]&32768&&(ua.accesskey=C[15]("a")),!Y&&te[0]&8&&(Y=!0,ua.date=C[3].startDate,Mt(()=>Y=!1)),!I&&te[0]&512&&(I=!0,ua.isDateValid=C[9],Mt(()=>I=!1)),D.$set(ua),(!Hr||te[0]&32768)&&g!==(g=gt("Only future dates:",C[15]("f"))+"")&&(h.innerHTML=g),(!Hr||te[0]&32768&&O!==(O=C[15]("f")))&&W(w,"accesskey",O),te[0]&8&&(w.checked=C[3].forwardOnly);let Pc=N;N=ng(C,te),N===Pc?jn[N].p(C,te):(Jv(),Qt(jn[Pc],1,1,()=>{jn[Pc]=null}),ew(),ie=jn[N],ie?ie.p(C,te):(ie=jn[N]=rg[N](C),ie.c()),Wt(ie,1),ie.m(x,null));let la={};te[0]&1&&(la.task=C[0]),te[0]&2&&(la.statusOptions=C[1]),te[0]&32768&&(la.accesskey=C[15]("u")),!fn&&te[0]&8&&(fn=!0,la.editableTask=C[3],Mt(()=>fn=!1)),Nt.$set(la);let ca={};te[0]&8&&(ca.forwardOnly=C[3].forwardOnly),te[0]&32768&&(ca.accesskey=C[15]("c")),!Et&&te[0]&8&&(Et=!0,ca.date=C[3].createdDate,Mt(()=>Et=!1)),!Ge&&te[0]&32&&(Ge=!0,ca.isDateValid=C[5],Mt(()=>Ge=!1)),ot.$set(ca);let da={};te[0]&8&&(da.forwardOnly=C[3].forwardOnly),te[0]&32768&&(da.accesskey=C[15]("x")),!wc&&te[0]&8&&(wc=!0,da.date=C[3].doneDate,Mt(()=>wc=!1)),!kc&&te[0]&64&&(kc=!0,da.isDateValid=C[6],Mt(()=>kc=!1)),Er.$set(da);let fa={};te[0]&8&&(fa.forwardOnly=C[3].forwardOnly),te[0]&32768&&(fa.accesskey=C[15]("-")),!Ec&&te[0]&8&&(Ec=!0,fa.date=C[3].cancelledDate,Mt(()=>Ec=!1)),!Sc&&te[0]&16&&(Sc=!0,fa.isDateValid=C[4],Mt(()=>Sc=!1)),Sr.$set(fa),(!Hr||te[0]&8192&&Qo!==(Qo=!C[13]))&&(pi.disabled=Qo)},i(C){Hr||(Wt(R.$$.fragment,C),Wt(q.$$.fragment,C),Wt(ge.$$.fragment,C),Wt(D.$$.fragment,C),Wt(ie),Wt(Nt.$$.fragment,C),Wt(ot.$$.fragment,C),Wt(Er.$$.fragment,C),Wt(Sr.$$.fragment,C),Hr=!0)},o(C){Qt(R.$$.fragment,C),Qt(q.$$.fragment,C),Qt(ge.$$.fragment,C),Qt(D.$$.fragment,C),Qt(ie),Qt(Nt.$$.fragment,C),Qt(ot.$$.fragment,C),Qt(Er.$$.fragment,C),Qt(Sr.$$.fragment,C),Hr=!1},d(C){C&&oe(e),r[33](null),Li(St,C),Xt(R),Xt(q),Xt(ge),Xt(D),jn[N].d(),Xt(Nt),Xt(ot),Xt(Er),Xt(Sr),Oc=!1,Ut(eg)}}}function ZI(r,e,t){let n,{task:i}=e,{onSubmit:s}=e,{statusOptions:a}=e,{allTasks:o}=e,{modal:u=null}=e,{prioritySymbols:l,startDateSymbol:c,scheduledDateSymbol:d,dueDateSymbol:f,cancelledDateSymbol:m,createdDateSymbol:y,doneDateSymbol:b}=Nr.tasksPluginEmoji.taskSerializer.symbols,k,_=Is.fromTask(i,o),R=!0,S=!0,F=!0,q=!0,ne=!0,G=!0,B=!0,ge=!0,Pe=!0,j=!0,$=!1,D=[{value:"lowest",label:"Lowest",symbol:l.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:l.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:l.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:l.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:l.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:l.Highest,accessKey:"i",accessKeyIndex:1}];Jm(()=>{let{provideAccessKeys:z}=Q();t(11,Pe=z),t(14,$=!0),setTimeout(()=>{k.focus()},10)});let Y=()=>{s([])},I=z=>{z.key==="Enter"&&(z.preventDefault(),j&&p())},J=()=>{setTimeout(()=>{t(3,_.description=_.description.replace(/[\r\n]+/g," "),_)},0)},p=()=>tw(void 0,void 0,void 0,function*(){let z=yield _.applyEdits(i,o);s(z)});function h(z){u&&u.setActiveFlatpickrInstance(z.detail.instance)}function g(){u&&u.clearActiveFlatpickrInstance()}let T=[[]];function w(){_.description=this.value,t(3,_)}function O(z){je[z?"unshift":"push"](()=>{k=z,t(12,k)})}function M(){_.priority=this.__value,t(3,_)}function P(z){ge=z,t(10,ge)}function v(z){r.$$.not_equal(_.dueDate,z)&&(_.dueDate=z,t(3,_))}function x(z){ne=z,t(7,ne)}function N(z){r.$$.not_equal(_.scheduledDate,z)&&(_.scheduledDate=z,t(3,_))}function ie(z){G=z,t(8,G)}function ce(z){r.$$.not_equal(_.startDate,z)&&(_.startDate=z,t(3,_))}function me(z){B=z,t(9,B)}function Ne(){_.forwardOnly=this.checked,t(3,_)}function Ce(z){_=z,t(3,_)}function Nt(z){r.$$.not_equal(_.createdDate,z)&&(_.createdDate=z,t(3,_))}function fn(z){F=z,t(5,F)}function Br(z){r.$$.not_equal(_.doneDate,z)&&(_.doneDate=z,t(3,_))}function ot(z){q=z,t(6,q)}function Et(z){r.$$.not_equal(_.cancelledDate,z)&&(_.cancelledDate=z,t(3,_))}function Ge(z){S=z,t(4,S)}return r.$$set=z=>{"task"in z&&t(0,i=z.task),"onSubmit"in z&&t(29,s=z.onSubmit),"statusOptions"in z&&t(1,a=z.statusOptions),"allTasks"in z&&t(2,o=z.allTasks),"modal"in z&&t(30,u=z.modal)},r.$$.update=()=>{if(r.$$.dirty[0]&2048){e:t(15,n=z=>Pe?z:null)}if(r.$$.dirty[0]&8){e:t(31,R=_.description.trim()!=="")}if(r.$$.dirty[0]&2032|r.$$.dirty[1]&1){e:t(13,j=ne&&ge&&G&&B&&R&&S&&F&&q)}},[i,a,o,_,S,F,q,ne,G,B,ge,Pe,k,j,$,n,c,d,f,m,y,b,D,Y,I,J,p,h,g,s,u,R,w,O,M,T,P,v,x,N,ie,ce,me,Ne,Ce,Nt,fn,Br,ot,Et,Ge]}var hh=class extends gr{constructor(e){super(),nn(this,e,ZI,XI,rn,{task:0,onSubmit:29,statusOptions:1,allTasks:2,modal:30},null,[-1,-1])}},qw=hh;var ti=class extends $w.Modal{constructor({app:t,task:n,onSubmit:i,allTasks:s}){super(t);this.activeFlatpickrInstance=null;this.task=n,this.allTasks=s,this.onSubmit=a=>{this.activeFlatpickrInstance||(a.length&&i(a),this.close())}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new qw({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit,allTasks:this.allTasks,modal:this}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===re.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}onEscapeKey(){var t;(t=this.activeFlatpickrInstance)!=null&&t.isOpen?(this.activeFlatpickrInstance.close(),this.activeFlatpickrInstance=null):this.close()}setActiveFlatpickrInstance(t){this.activeFlatpickrInstance=t}clearActiveFlatpickrInstance(){this.activeFlatpickrInstance=null}};function JI(){let{setCreatedDate:r}=Q();return r?window.moment():null}function eF(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ve.getInstance().isEmpty(),i=!ve.getInstance().includedIn(r.description);return t||n&&i}var Sl=({line:r,path:e})=>{var f,m;let t=ee.parseTaskSignifiers(r,ht.fromUnknownPosition(new ut(e)),_t.fromPath(e)),n=JI();if(t!==null)return eF(t)?new ee(de(K({},t),{createdDate:n})):t;let i=r.match(Z.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ee({status:re.TODO,description:"",taskLocation:ht.fromUnknownPosition(new ut(e)),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(m=i[4])!=null?m:" ",u=De.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(Z.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(Z.blockLinkRegex,"")),new ee({status:u,description:l,taskLocation:ht.fromUnknownPosition(new ut(e)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var jw=(r,e,t,n,i)=>{var f;if(r)return t instanceof gh.MarkdownView;if(!(t instanceof gh.MarkdownView))return;let s=(f=t.file)==null?void 0:f.path;if(s===void 0)return;let o=e.getCursor().line,u=e.getLine(o),l=Sl({line:u,path:s}),c=m=>{let y=_t.removeInferredStatusIfNeeded(l,m).map(b=>b.toFileLineString()).join(` -`);e.setLine(o,y)};new ti({app:n,task:l,onSubmit:c,allTasks:i}).open()};var yh=require("obsidian");var Gw=(r,e,t)=>{var u;if(r)return t instanceof yh.MarkdownView;if(!(t instanceof yh.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=Th(a,n);e.setLine(s,o.text),e.setCursor(tF(i,o))},Th=(r,e)=>{let t=ee.fromLine({line:r,taskLocation:ht.fromUnknownPosition(new ut(e)),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(Z.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(Z.taskRegex,`$1- [${a}] $4`)}}else if(Z.listItemRegex.test(r)){let i=r.replace(Z.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(Z.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},tF=(r,e)=>{var s;let t={line:0,ch:r.ch},n=K(K({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` -`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Ol=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>jw(t,n,i,this.app,this.plugin.getTasks())}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Gw})}};var ri=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function ji(r,e){let t=`Error: ${r}. +${u}`);return}break}s++}}return i}var wa=class{constructor(t){this.addGlobalFilterOnSave=t.addGlobalFilterOnSave,this.originalBlocking=t.originalBlocking,this.description=t.description,this.status=t.status,this.priority=t.priority,this.onCompletion=t.onCompletion,this.recurrenceRule=t.recurrenceRule,this.createdDate=t.createdDate,this.startDate=t.startDate,this.scheduledDate=t.scheduledDate,this.dueDate=t.dueDate,this.doneDate=t.doneDate,this.cancelledDate=t.cancelledDate,this.forwardOnly=t.forwardOnly,this.blockedBy=t.blockedBy,this.blocking=t.blocking}static fromTask(t,e){let n=Ae.getInstance().removeAsWordFrom(t.description),i=n!=t.description||!Ae.getInstance().includedIn(t.description),s="none";t.priority==="5"?s="lowest":t.priority==="4"?s="low":t.priority==="2"?s="medium":t.priority==="1"?s="high":t.priority==="0"&&(s="highest");let a=[];for(let u of t.dependsOn){let l=e.find(c=>c.id===u);!l||a.push(l)}let o=e.filter(u=>u.dependsOn.includes(t.id));return new wa({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return F(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=Ae.getInstance().prependTo(n));let i=as(this.startDate,this.forwardOnly),s=as(this.scheduledDate,this.forwardOnly),a=as(this.dueDate,this.forwardOnly),o=as(this.cancelledDate,this.forwardOnly),u=as(this.createdDate,this.forwardOnly),l=as(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=_t.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Wr({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let O of this.blockedBy){let M=yield DF(O,e);f.push(M)}let m=t.id,b=[],T=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(m=bu(e.filter(O=>O.id!=="").map(O=>O.id))),b=this.originalBlocking.filter(O=>!this.blocking.includes(O)),T=this.blocking.filter(O=>!this.originalBlocking.includes(O)));let _=new de(Ee(ne({},t),{description:n,status:t.status,priority:Tr.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:f.map(O=>O.id),id:m}));for(let O of b){let M=yw(O,_);yield Br({originalTask:O,newTasks:M})}for(let O of T){let M=gw(O,_);yield Br({originalTask:O,newTasks:M})}let x=this.inferTodaysDate(this.status.type,l,o);return _.handleNewStatusWithRecurrenceInUsersOrder(this.status,x)})}inferTodaysDate(t,e,n){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&n!==null?n:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let t=(e=_t.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Wr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"due, scheduled or start date required",isRecurrenceValid:!1}:{parsedRecurrence:"invalid recurrence rule",isRecurrenceValid:!1}}};function DF(r,t){return F(this,null,function*(){if(r.id!=="")return r;let e=t.filter(i=>i.id!==""),n=ec(r,e.map(i=>i.id));return yield Br({originalTask:r,newTasks:n}),n})}function SF(r){let t,e=At("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){t=se("label"),n=_e(),i=se("input"),s=_e(),a=se("code"),o=Ge(r[4]),u=_e(),l=new ha(!1),j(t,"for","recurrence"),j(i,"id","recurrence"),j(i,"type","text"),j(i,"class","tasks-modal-date-input"),j(i,"placeholder","Try 'every day when done'"),j(i,"accesskey",r[2]),ii(i,"tasks-modal-error",!r[1]),l.a=null,j(a,"class","tasks-modal-parsed-date")},m(f,m){Te(f,t,m),t.innerHTML=e,Te(f,n,m),Te(f,i,m),nr(i,r[0].recurrenceRule),Te(f,s,m),Te(f,a,m),$(a,o),$(a,u),l.m(r[3],a),c||(d=Le(i,"input",r[5]),c=!0)},p(f,[m]){m&4&&e!==(e=At("Recurs",f[2])+"")&&(t.innerHTML=e),m&4&&j(i,"accesskey",f[2]),m&1&&i.value!==f[0].recurrenceRule&&nr(i,f[0].recurrenceRule),m&2&&ii(i,"tasks-modal-error",!f[1]),m&8&&l.p(f[3])},i:Ze,o:Ze,d(f){f&&ge(t),f&&ge(n),f&&ge(i),f&&ge(s),f&&ge(a),c=!1,d()}}}function OF(r,t,e){let{editableTask:n}=t,{isRecurrenceValid:i}=t,{accesskey:s}=t,a,{recurrenceSymbol:o}=cn.tasksPluginEmoji.taskSerializer.symbols;function u(){n.recurrenceRule=this.value,e(0,n)}return r.$$set=l=>{"editableTask"in l&&e(0,n=l.editableTask),"isRecurrenceValid"in l&&e(1,i=l.isRecurrenceValid),"accesskey"in l&&e(2,s=l.accesskey)},r.$$.update=()=>{if(r.$$.dirty&1){e:e(3,{parsedRecurrence:a,isRecurrenceValid:i}=n.parseAndValidateRecurrence(),a,(e(1,i),e(0,n)))}},[n,i,s,a,o,u]}var ug=class extends $r{constructor(t){super(),An(this,t,OF,SF,Rn,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},vk=ug;function wk(r,t,e){let n=r.slice();return n[7]=t[e],n}function kk(r){let t,e=r[7].name+"",n,i,s=r[7].symbol+"",a,o,u;return{c(){t=se("option"),n=Ge(e),i=Ge(" ["),a=Ge(s),o=Ge("]"),t.__value=u=r[7].symbol,t.value=t.__value},m(l,c){Te(l,t,c),$(t,n),$(t,i),$(t,a),$(t,o)},p(l,c){c&1&&e!==(e=l[7].name+"")&&Gr(n,e),c&1&&s!==(s=l[7].symbol+"")&&Gr(a,s),c&1&&u!==(u=l[7].symbol)&&(t.__value=u,t.value=t.__value)},d(l){l&&ge(t)}}}function xF(r){let t,e=At("Status",r[1])+"",n,i,s,a,o=r[0],u=[];for(let l=0;lr[6].call(i))},m(l,c){Te(l,t,c),t.innerHTML=e,Te(l,n,c),Te(l,i,c);for(let d=0;d{let c=s.find(f=>f.symbol===o);if(c)e(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=n.handleNewStatus(c).pop();d&&(e(4,i.doneDate=Ek(i.doneDate,c.isCompleted(),d.done),i),e(4,i.cancelledDate=Ek(i.cancelledDate,c.isCancelled(),d.cancelled),i))};function l(){o=Uw(this),e(2,o),e(0,s)}return r.$$set=c=>{"task"in c&&e(5,n=c.task),"editableTask"in c&&e(4,i=c.editableTask),"statusOptions"in c&&e(0,s=c.statusOptions),"accesskey"in c&&e(1,a=c.accesskey)},[s,a,o,u,i,n,l]}var lg=class extends $r{constructor(t){super(),An(this,t,MF,xF,Rn,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},Dk=lg;function Sk(r,t,e){let n=r.slice();return n[49]=t[e].value,n[50]=t[e].label,n[51]=t[e].symbol,n[52]=t[e].accessKey,n[53]=t[e].accessKeyIndex,n}function CF(r){let t,e=r[50]+"",n;return{c(){t=se("span"),n=Ge(e)},m(i,s){Te(i,t,s),$(t,n)},p:Ze,d(i){i&&ge(t)}}}function RF(r){let t,e=r[50].substring(0,r[53])+"",n,i,s=r[50].substring(r[53],r[53]+1)+"",a,o,u=r[50].substring(r[53]+1)+"",l;return{c(){t=se("span"),n=Ge(e),i=se("span"),a=Ge(s),o=se("span"),l=Ge(u),j(i,"class","accesskey")},m(c,d){Te(c,t,d),$(t,n),Te(c,i,d),$(i,a),Te(c,o,d),$(o,l)},p:Ze,d(c){c&&ge(t),c&&ge(i),c&&ge(o)}}}function AF(r){let t,e=r[51]+"",n;return{c(){t=se("span"),n=Ge(e)},m(i,s){Te(i,t,s),$(t,n)},p:Ze,d(i){i&&ge(t)}}}function Ok(r){let t,e,n,i,s,a,o,u,l=r[51]&&r[51].charCodeAt(0)>=256,c,d,f,m,b;function T(M,Y){return M[11]?RF:CF}let _=T(r,[-1,-1]),x=_(r),O=l&&AF(r);return f=Lw(r[32][0]),{c(){t=se("div"),e=se("input"),a=_e(),o=se("label"),x.c(),u=_e(),O&&O.c(),d=_e(),j(e,"type","radio"),j(e,"id",n="priority-"+r[49]),e.__value=i=r[49],e.value=e.__value,j(e,"accesskey",s=r[15](r[52])),j(o,"for",c="priority-"+r[49]),j(t,"class","task-modal-priority-option-container"),f.p(e)},m(M,Y){Te(M,t,Y),$(t,e),e.checked=e.__value===r[3].priority,$(t,a),$(t,o),x.m(o,null),$(o,u),O&&O.m(o,null),$(t,d),m||(b=Le(e,"change",r[31]),m=!0)},p(M,Y){Y[0]&32768&&s!==(s=M[15](M[52]))&&j(e,"accesskey",s),Y[0]&8&&(e.checked=e.__value===M[3].priority),_===(_=T(M,Y))&&x?x.p(M,Y):(x.d(1),x=_(M),x&&(x.c(),x.m(o,u))),l&&O.p(M,Y)},d(M){M&&ge(t),x.d(),O&&O.d(),f.r(),m=!1,b()}}}function PF(r){let t;return{c(){t=se("div"),t.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(e,n){Te(e,t,n)},p:Ze,i:Ze,o:Ze,d(e){e&&ge(t)}}}function NF(r){let t,e,n,i;return t=new ig({props:{type:"blockedBy",labelText:"Before this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),n=new ig({props:{type:"blocking",labelText:"After this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){fn(t.$$.fragment),e=_e(),fn(n.$$.fragment)},m(s,a){Hr(t,s,a),Te(s,e,a),Hr(n,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),t.$set(o);let u={};a[0]&1&&(u.task=s[0]),a[0]&8&&(u.editableTask=s[3]),a[0]&4&&(u.allTasks=s[2]),a[0]&32768&&(u.accesskey=s[15]("e")),n.$set(u)},i(s){i||(ir(t.$$.fragment,s),ir(n.$$.fragment,s),i=!0)},o(s){_r(t.$$.fragment,s),_r(n.$$.fragment,s),i=!1},d(s){vr(t,s),s&&ge(e),vr(n,s)}}}function IF(r){let t,e,n,i=At("Description",r[15]("t"))+"",s,a,o,u,l,c,d,f,m,b,T,_,x,O,M,Y,G,oe,V,K,Se,Pe,Q,B,C,Z,W,ae,p,y,v=At("Only future dates:",r[15]("f"))+"",w,D,R,N,L,E,P,U,ue,me,ve,je,Ne,Pt,Xr,dr,X,Nt,tt,$i,Zr,za,As,Ps,Or,mi,Ka,Qa,hi,_n,Hu,Ns,Xa,Gi,xr,ze,Is,vn=r[22],wt=[];for(let I=0;IXt(O,"isRecurrenceValid",Fs));function Jr(I){r[34](I)}function Sd(I){r[35](I)}let Za={id:"due",dateSymbol:r[18],forwardOnly:r[3].forwardOnly,accesskey:r[15]("d")};r[3].dueDate!==void 0&&(Za.date=r[3].dueDate),r[7]!==void 0&&(Za.isDateValid=r[7]),G=new Ts({props:Za}),nt.push(()=>Xt(G,"date",Jr)),nt.push(()=>Xt(G,"isDateValid",Sd));function h(I){r[36](I)}function g(I){r[37](I)}let k={id:"scheduled",dateSymbol:r[17],forwardOnly:r[3].forwardOnly,accesskey:r[15]("s")};r[3].scheduledDate!==void 0&&(k.date=r[3].scheduledDate),r[8]!==void 0&&(k.isDateValid=r[8]),Se=new Ts({props:k}),nt.push(()=>Xt(Se,"date",h)),nt.push(()=>Xt(Se,"isDateValid",g));function A(I){r[38](I)}function q(I){r[39](I)}let z={id:"start",dateSymbol:r[16],forwardOnly:r[3].forwardOnly,accesskey:r[15]("a")};r[3].startDate!==void 0&&(z.date=r[3].startDate),r[9]!==void 0&&(z.isDateValid=r[9]),C=new Ts({props:z}),nt.push(()=>Xt(C,"date",A)),nt.push(()=>Xt(C,"isDateValid",q));let he=[NF,PF],J=[];function we(I,fe){return I[2].length>0&&I[14]?0:1}U=we(r,[-1,-1]),ue=J[U]=he[U](r);function te(I){r[41](I)}let ce={task:r[0],statusOptions:r[1],accesskey:r[15]("u")};r[3]!==void 0&&(ce.editableTask=r[3]),Pt=new Dk({props:ce}),nt.push(()=>Xt(Pt,"editableTask",te));function He(I){r[42](I)}function Mr(I){r[43](I)}let kt={id:"created",dateSymbol:r[20],forwardOnly:r[3].forwardOnly,accesskey:r[15]("c")};r[3].createdDate!==void 0&&(kt.date=r[3].createdDate),r[5]!==void 0&&(kt.isDateValid=r[5]),X=new Ts({props:kt}),nt.push(()=>Xt(X,"date",He)),nt.push(()=>Xt(X,"isDateValid",Mr));function Hi(I){r[44](I)}function gi(I){r[45](I)}let Ja={id:"done",dateSymbol:r[21],forwardOnly:r[3].forwardOnly,accesskey:r[15]("x")};r[3].doneDate!==void 0&&(Ja.date=r[3].doneDate),r[6]!==void 0&&(Ja.isDateValid=r[6]),Zr=new Ts({props:Ja}),nt.push(()=>Xt(Zr,"date",Hi)),nt.push(()=>Xt(Zr,"isDateValid",gi));function eo(I){r[46](I)}function Od(I){r[47](I)}let to={id:"cancelled",dateSymbol:r[19],forwardOnly:r[3].forwardOnly,accesskey:r[15]("-")};return r[3].cancelledDate!==void 0&&(to.date=r[3].cancelledDate),r[4]!==void 0&&(to.isDateValid=r[4]),Or=new Ts({props:to}),nt.push(()=>Xt(Or,"date",eo)),nt.push(()=>Xt(Or,"isDateValid",Od)),{c(){t=se("form"),e=se("section"),n=se("label"),s=_e(),a=se("textarea"),u=_e(),l=se("section"),c=se("label"),d=Ge("Priority"),m=_e();for(let I=0;IM=!1)),O.$set(en);let Bi={};fe[0]&8&&(Bi.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(Bi.accesskey=I[15]("d")),!oe&&fe[0]&8&&(oe=!0,Bi.date=I[3].dueDate,Qt(()=>oe=!1)),!V&&fe[0]&128&&(V=!0,Bi.isDateValid=I[7],Qt(()=>V=!1)),G.$set(Bi);let Vi={};fe[0]&8&&(Vi.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(Vi.accesskey=I[15]("s")),!Pe&&fe[0]&8&&(Pe=!0,Vi.date=I[3].scheduledDate,Qt(()=>Pe=!1)),!Q&&fe[0]&256&&(Q=!0,Vi.isDateValid=I[8],Qt(()=>Q=!1)),Se.$set(Vi);let zi={};fe[0]&8&&(zi.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(zi.accesskey=I[15]("a")),!Z&&fe[0]&8&&(Z=!0,zi.date=I[3].startDate,Qt(()=>Z=!1)),!W&&fe[0]&512&&(W=!0,zi.isDateValid=I[9],Qt(()=>W=!1)),C.$set(zi),(!xr||fe[0]&32768)&&v!==(v=At("Only future dates:",I[15]("f"))+"")&&(y.innerHTML=v),(!xr||fe[0]&32768&&R!==(R=I[15]("f")))&&j(D,"accesskey",R),fe[0]&8&&(D.checked=I[3].forwardOnly);let xd=U;U=we(I,fe),U===xd?J[U].p(I,fe):(jw(),_r(J[xd],1,1,()=>{J[xd]=null}),Yw(),ue=J[U],ue?ue.p(I,fe):(ue=J[U]=he[U](I),ue.c()),ir(ue,1),ue.m(P,null));let ro={};fe[0]&1&&(ro.task=I[0]),fe[0]&2&&(ro.statusOptions=I[1]),fe[0]&32768&&(ro.accesskey=I[15]("u")),!Xr&&fe[0]&8&&(Xr=!0,ro.editableTask=I[3],Qt(()=>Xr=!1)),Pt.$set(ro);let no={};fe[0]&8&&(no.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(no.accesskey=I[15]("c")),!Nt&&fe[0]&8&&(Nt=!0,no.date=I[3].createdDate,Qt(()=>Nt=!1)),!tt&&fe[0]&32&&(tt=!0,no.isDateValid=I[5],Qt(()=>tt=!1)),X.$set(no);let io={};fe[0]&8&&(io.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(io.accesskey=I[15]("x")),!za&&fe[0]&8&&(za=!0,io.date=I[3].doneDate,Qt(()=>za=!1)),!As&&fe[0]&64&&(As=!0,io.isDateValid=I[6],Qt(()=>As=!1)),Zr.$set(io);let so={};fe[0]&8&&(so.forwardOnly=I[3].forwardOnly),fe[0]&32768&&(so.accesskey=I[15]("-")),!mi&&fe[0]&8&&(mi=!0,so.date=I[3].cancelledDate,Qt(()=>mi=!1)),!Ka&&fe[0]&16&&(Ka=!0,so.isDateValid=I[4],Qt(()=>Ka=!1)),Or.$set(so),(!xr||fe[0]&8192&&Ns!==(Ns=!I[13]))&&(_n.disabled=Ns)},i(I){xr||(ir(O.$$.fragment,I),ir(G.$$.fragment,I),ir(Se.$$.fragment,I),ir(C.$$.fragment,I),ir(ue),ir(Pt.$$.fragment,I),ir(X.$$.fragment,I),ir(Zr.$$.fragment,I),ir(Or.$$.fragment,I),xr=!0)},o(I){_r(O.$$.fragment,I),_r(G.$$.fragment,I),_r(Se.$$.fragment,I),_r(C.$$.fragment,I),_r(ue),_r(Pt.$$.fragment,I),_r(X.$$.fragment,I),_r(Zr.$$.fragment,I),_r(Or.$$.fragment,I),xr=!1},d(I){I&&ge(t),r[30](null),bs(wt,I),vr(O),vr(G),vr(Se),vr(C),J[U].d(),vr(Pt),vr(X),vr(Zr),vr(Or),ze=!1,Wt(Is)}}}function FF(r,t,e){let n,{task:i}=t,{onSubmit:s}=t,{statusOptions:a}=t,{allTasks:o}=t,{prioritySymbols:u,startDateSymbol:l,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:f,createdDateSymbol:m,doneDateSymbol:b}=cn.tasksPluginEmoji.taskSerializer.symbols,T,_=wa.fromTask(i,o),x=!0,O=!0,M=!0,Y=!0,G=!0,oe=!0,V=!0,K=!0,Se=!0,Pe=!0,Q=!1,B=[{value:"lowest",label:"Lowest",symbol:u.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:u.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:u.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:u.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:u.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:u.Highest,accessKey:"i",accessKeyIndex:1}];zh(()=>{let{provideAccessKeys:X}=ie();e(11,Se=X),e(14,Q=!0),setTimeout(()=>{T.focus()},10)});let C=()=>{s([])},Z=X=>{X.key==="Enter"&&(X.preventDefault(),Pe&&ae())},W=()=>{setTimeout(()=>{e(3,_.description=_.description.replace(/[\r\n]+/g," "),_)},0)},ae=()=>$w(void 0,void 0,void 0,function*(){let X=yield _.applyEdits(i,o);s(X)}),p=[[]];function y(){_.description=this.value,e(3,_)}function v(X){nt[X?"unshift":"push"](()=>{T=X,e(12,T)})}function w(){_.priority=this.__value,e(3,_)}function D(X){K=X,e(10,K)}function R(X){r.$$.not_equal(_.dueDate,X)&&(_.dueDate=X,e(3,_))}function N(X){G=X,e(7,G)}function L(X){r.$$.not_equal(_.scheduledDate,X)&&(_.scheduledDate=X,e(3,_))}function E(X){oe=X,e(8,oe)}function P(X){r.$$.not_equal(_.startDate,X)&&(_.startDate=X,e(3,_))}function U(X){V=X,e(9,V)}function ue(){_.forwardOnly=this.checked,e(3,_)}function me(X){_=X,e(3,_)}function ve(X){r.$$.not_equal(_.createdDate,X)&&(_.createdDate=X,e(3,_))}function je(X){M=X,e(5,M)}function Ne(X){r.$$.not_equal(_.doneDate,X)&&(_.doneDate=X,e(3,_))}function Pt(X){Y=X,e(6,Y)}function Xr(X){r.$$.not_equal(_.cancelledDate,X)&&(_.cancelledDate=X,e(3,_))}function dr(X){O=X,e(4,O)}return r.$$set=X=>{"task"in X&&e(0,i=X.task),"onSubmit"in X&&e(27,s=X.onSubmit),"statusOptions"in X&&e(1,a=X.statusOptions),"allTasks"in X&&e(2,o=X.allTasks)},r.$$.update=()=>{if(r.$$.dirty[0]&2048){e:e(15,n=X=>Se?X:null)}if(r.$$.dirty[0]&8){e:e(28,x=_.description.trim()!=="")}if(r.$$.dirty[0]&268437488){e:e(13,Pe=G&&K&&oe&&V&&x&&O&&M&&Y)}},[i,a,o,_,O,M,Y,G,oe,V,K,Se,T,Pe,Q,n,l,c,d,f,m,b,B,C,Z,W,ae,s,x,y,v,w,p,D,R,N,L,E,P,U,ue,me,ve,je,Ne,Pt,Xr,dr]}var cg=class extends $r{constructor(t){super(),An(this,t,FF,IF,Rn,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},xk=cg;var Mi=class extends Mk.Modal{constructor({app:e,task:n,onSubmit:i,allTasks:s}){super(e);this.task=n,this.allTasks=s,this.onSubmit=a=>{a.length&&i(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:e}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new xk({target:e,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let e=$e.getInstance().registeredStatuses;return $e.getInstance().bySymbol(this.task.status.symbol)===pe.EMPTY&&e.push(this.task.status),e}onClose(){let{contentEl:e}=this;e.empty()}};function LF(){let{setCreatedDate:r}=ie();return r?window.moment():null}function UF(r){let{setCreatedDate:t}=ie();if(!t||r.createdDate!==null)return!1;let e=r.description==="",n=!Ae.getInstance().isEmpty(),i=!Ae.getInstance().includedIn(r.description);return e||n&&i}var wc=({line:r,path:t})=>{var f,m;let e=de.parseTaskSignifiers(r,Rt.fromUnknownPosition(new Et(t)),Ut.fromPath(t)),n=LF();if(e!==null)return UF(e)?new de(Ee(ne({},e),{createdDate:n})):e;let i=r.match(le.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new de({status:pe.TODO,description:"",taskLocation:Rt.fromUnknownPosition(new Et(t)),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(m=i[4])!=null?m:" ",u=$e.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(le.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(le.blockLinkRegex,"")),new de({status:u,description:l,taskLocation:Rt.fromUnknownPosition(new Et(t)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var Ck=(r,t,e,n,i)=>{var f;if(r)return e instanceof dg.MarkdownView;if(!(e instanceof dg.MarkdownView))return;let s=(f=e.file)==null?void 0:f.path;if(s===void 0)return;let o=t.getCursor().line,u=t.getLine(o),l=wc({line:u,path:s}),c=m=>{let b=Ut.removeInferredStatusIfNeeded(l,m).map(T=>T.toFileLineString()).join(` +`);t.setLine(o,b)};new Mi({app:n,task:l,onSubmit:c,allTasks:i}).open()};var fg=require("obsidian");var Rk=(r,t,e)=>{var u;if(r)return e instanceof fg.MarkdownView;if(!(e instanceof fg.MarkdownView))return;let n=(u=e.file)==null?void 0:u.path;if(n===void 0)return;let i=t.getCursor(),s=i.line,a=t.getLine(s),o=pg(a,n);t.setLine(s,o.text),t.setCursor(WF(i,o))},pg=(r,t)=>{let e=de.fromLine({line:r,taskLocation:Rt.fromUnknownPosition(new Et(t)),fallbackDate:null});if(e!==null){let n=e.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(le.taskRegex);if(n!==null){let i=n[3],a=$e.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(le.taskRegex,`$1- [${a}] $4`)}}else if(le.listItemRegex.test(r)){let i=r.replace(le.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(le.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},WF=(r,t)=>{var s;let e={line:0,ch:r.ch},n=ne(ne({},e),(s=t.moveTo)!=null?s:{}),i=t.text.split(` +`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var kc=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(e,n,i)=>Ck(e,n,i,this.app,this.plugin.getTasks())}),t.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Rk})}};var Ci=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function ks(r,t){let e=`Error: ${r}. The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var rF=Object.prototype.toString,Ls=Array.isArray||function(e){return rF.call(e)==="[object Array]"};function _h(r){return typeof r=="function"}function nF(r){return Ls(r)?"array":typeof r}function bh(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Yw(r,e){return r!=null&&typeof r=="object"&&e in r}function iF(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var sF=RegExp.prototype.test;function aF(r,e){return sF.call(r,e)}var oF=/\S/;function uF(r){return!aF(oF,r)}var lF={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function cF(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return lF[t]})}var dF=/\s*/,fF=/\s+/,Bw=/\s*=/,pF=/\s*\}/,mF=/#|\^|\/|>|\{|&|=|!/;function hF(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,m;function y(B){if(typeof B=="string"&&(B=B.split(fF,2)),!Ls(B)||B.length!==2)throw new Error("Invalid tags: "+B);d=new RegExp(bh(B[0])+"\\s*"),f=new RegExp("\\s*"+bh(B[1])),m=new RegExp("\\s*"+bh("}"+B[1]))}y(e||_r.tags);for(var b=new qo(r),k,_,R,S,F,q;!b.eos();){if(k=b.pos,R=b.scanUntil(d),R)for(var ne=0,G=R.length;ne"?F=[_,R,k,b.pos,u,l,t]:F=[_,R,k,b.pos],l++,i.push(F),_==="#"||_==="^")n.push(F);else if(_==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+R+'" at '+k);if(q[1]!==R)throw new Error('Unclosed section "'+q[1]+'" at '+k)}else _==="name"||_==="{"||_==="&"?o=!0:_==="="&&y(R)}if(c(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+b.pos);return yF(gF(i))}function gF(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function qo(r){this.string=r,this.tail=r,this.pos=0}qo.prototype.eos=function(){return this.tail===""};qo.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};qo.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Fs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Fs.prototype.push=function(e){return new Fs(e,this)};Fs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};At.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(f){return a.render(f,t,n,s)}if(!!u){if(Ls(u))for(var c=0,d=u.length;c":">",'"':""","'":"'","/":"/","`":"`","=":"="};function zF(r){return String(r).replace(/[&<>"'`=\/]/g,function(e){return VF[e]})}var KF=/\s*/,QF=/\s+/,Pk=/\s*=/,XF=/\s*\}/,ZF=/#|\^|\/|>|\{|&|=|!/;function JF(r,t){if(!r)return[];var e=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,m;function b(K){if(typeof K=="string"&&(K=K.split(QF,2)),!Ea(K)||K.length!==2)throw new Error("Invalid tags: "+K);d=new RegExp(mg(K[0])+"\\s*"),f=new RegExp("\\s*"+mg(K[1])),m=new RegExp("\\s*"+mg("}"+K[1]))}b(t||Vr.tags);for(var T=new Au(r),_,x,O,M,Y,G;!T.eos();){if(_=T.pos,O=T.scanUntil(d),O)for(var oe=0,V=O.length;oe"?Y=[x,O,_,T.pos,u,l,e]:Y=[x,O,_,T.pos],l++,i.push(Y),x==="#"||x==="^")n.push(Y);else if(x==="/"){if(G=n.pop(),!G)throw new Error('Unopened section "'+O+'" at '+_);if(G[1]!==O)throw new Error('Unclosed section "'+G[1]+'" at '+_)}else x==="name"||x==="{"||x==="&"?o=!0:x==="="&&b(O)}if(c(),G=n.pop(),G)throw new Error('Unclosed section "'+G[1]+'" at '+T.pos);return tL(eL(i))}function eL(r){for(var t=[],e,n,i=0,s=r.length;i0?n[n.length-1][4]:t;break;default:e.push(i)}return t}function Au(r){this.string=r,this.tail=r,this.pos=0}Au.prototype.eos=function(){return this.tail===""};Au.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Au.prototype.scanUntil=function(t){var e=this.tail.search(t),n;switch(e){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=n.length,n};function ka(r,t){this.view=r,this.cache={".":this.view},this.parent=t}ka.prototype.push=function(t){return new ka(t,this)};ka.prototype.lookup=function(t){var e=this.cache,n;if(e.hasOwnProperty(t))n=e[t];else{for(var i=this,s,a,o,u=!1;i;){if(t.indexOf(".")>0)for(s=i.view,a=t.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,e,n,s):u==="&"?l=this.unescapedValue(o,e):u==="name"?l=this.escapedValue(o,e,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Zt.prototype.renderSection=function(t,e,n,i,s){var a=this,o="",u=e.lookup(t[1]);function l(f){return a.render(f,e,n,s)}if(!!u){if(Ea(u))for(var c=0,d=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` -`)};At.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=_h(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,t,n,c,i)}}};At.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};At.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||_r.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===_r.escape?String(s):i(s)};At.prototype.rawValue=function(e){return e[1]};At.prototype.getConfigTags=function(e){return Ls(e)?e:e&&typeof e=="object"?e.tags:void 0};At.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ls(e))return e.escape};var _r={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Wo.templateCache=r},get templateCache(){return Wo.templateCache}},Wo=new At;_r.clearCache=function(){return Wo.clearCache()};_r.parse=function(e,t){return Wo.parse(e,t)};_r.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+nF(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Wo.render(e,t,n,i)};_r.escape=cF;_r.Scanner=qo;_r.Context=Fs;_r.Writer=At;var vh=_r;var Qw=ma(Kw());function Xw(r,e){vh.escape=function(t){return t};try{return vh.render(r,(0,Qw.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. +`)};Zt.prototype.renderPartial=function(t,e,n,i){if(!!n){var s=this.getConfigTags(i),a=hg(n)?n(t[1]):n[t[1]];if(a!=null){var o=t[6],u=t[5],l=t[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,e,n,c,i)}}};Zt.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Zt.prototype.escapedValue=function(t,e,n){var i=this.getConfigEscape(n)||Vr.escape,s=e.lookup(t[1]);if(s!=null)return typeof s=="number"&&i===Vr.escape?String(s):i(s)};Zt.prototype.rawValue=function(t){return t[1]};Zt.prototype.getConfigTags=function(t){return Ea(t)?t:t&&typeof t=="object"?t.tags:void 0};Zt.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Ea(t))return t.escape};var Vr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ru.templateCache=r},get templateCache(){return Ru.templateCache}},Ru=new Zt;Vr.clearCache=function(){return Ru.clearCache()};Vr.parse=function(t,e){return Ru.parse(t,e)};Vr.render=function(t,e,n,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+jF(t)+'" was given as the first argument for mustache#render(template, view, partials)');return Ru.render(t,e,n,i)};Vr.escape=zF;Vr.Scanner=Au;Vr.Context=ka;Vr.Writer=Zt;var gg=Vr;var Uk=oo(Lk());function Wk(r,t){gg.escape=function(e){return e};try{return gg.render(r,(0,Uk.default)(t))}catch(e){let n="";throw e instanceof Error?n=`There was an error expanding one or more placeholders. The error message was: - ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` + ${e.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` The problem is in: - ${r}`,Error(n)}}function Zw(r){return kh(r,[])}function kh(r,e){return{query:{file:r,allTasks:e}}}var Us=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(` -`)}explainError(e){let t="";return t+=`Query has an error: -`,t+=e.error+` -`,t}explainFilters(e){return e.filters.length===0?this.indent(`No filters supplied. All tasks will match the query. -`):e.filters.map(t=>t.explainFilterIndented(this.indentation)).join(` -`)}explainGroups(e){return e.grouping.length===0?this.indent(`No grouping instructions supplied. -`):e.grouping.map(t=>this.indentation+t.instruction).join(` + ${r}`,Error(n)}}function qk(r){return bg(r,[])}function bg(r,t){return{query:{file:r,allTasks:t}}}var Da=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(n=>n!=="").join(` +`)}explainError(t){let e="";return e+=`Query has an error: +`,e+=t.error+` +`,e}explainFilters(t){return t.filters.length===0?this.indent(`No filters supplied. All tasks will match the query. +`):t.filters.map(e=>e.explainFilterIndented(this.indentation)).join(` +`)}explainGroups(t){return t.grouping.length===0?this.indent(`No grouping instructions supplied. +`):t.grouping.map(e=>this.indentation+e.instruction).join(` `)+` -`}explainSorters(e){return e.sorting.length===0?this.indent(`No sorting instructions supplied. -`):e.sorting.map(t=>this.indentation+t.instruction).join(` +`}explainSorters(t){return t.sorting.length===0?this.indent(`No sorting instructions supplied. +`):t.sorting.map(e=>this.indentation+e.instruction).join(` `)+` -`}explainQueryLimits(e){function t(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let n=[];if(e.limit!==void 0){let i=t(e.limit)+`. -`;n.push(this.indent(i))}if(e.taskGroupLimit!==void 0){let i=t(e.taskGroupLimit)+` per group (if any "group by" options are supplied). +`}explainQueryLimits(t){function e(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let n=[];if(t.limit!==void 0){let i=e(t.limit)+`. +`;n.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied). `;n.push(this.indent(i))}return n.join(` -`)}explainDebugSettings(){let e="",{debugSettings:t}=Q();return t.ignoreSortInstructions&&(e+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. -`)),e}indent(e){return this.indentation+e}};var Se=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Se("None of",e,"NOT")}static booleanXor(e){return new Se("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;ithis.matches(t))}};var qs=class extends Ws{constructor(t){super();this.stringToFind=t}matches(t){return qs.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Se(t)}};var ni=class extends Ws{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new ni(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions +`)}explainDebugSettings(){let t="",{debugSettings:e}=ie();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. +`)),t}indent(t){return this.indentation+t}};var qe=class{constructor(t,e=[],n=""){this.description=t,this.symbol=n,this.children=e}static booleanAnd(t){return this.combineOrCreateExplanation("All of",t,"AND")}static booleanOr(t){return this.combineOrCreateExplanation("At least one of",t,"OR")}static booleanNot(t){return new qe("None of",t,"NOT")}static booleanXor(t){return new qe("Exactly one of",t,"XOR")}asString(t=""){if(this.children.length==0)return t+this.description;let e=t;this.symbol===""?e+=this.description:(e+=this.symbol,this.children.length>1&&(e+=` (${this.description})`),e+=":");let n=t+" ";for(let i=0;ithis.matches(e))}};var Oa=class extends Sa{constructor(e){super();this.stringToFind=e}matches(e){return Oa.stringIncludesCaseInsensitive(e,this.stringToFind)}static stringIncludesCaseInsensitive(e,n){return e.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(e){return new qe(e)}};var Ri=class extends Sa{constructor(e){super();this.regex=e}static validateAndConstruct(e){let n=/^\/(.+)\/([^/]*)$/,i=e.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new Ri(s)}else return null}matches(e){return e.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions Regular expressions must look like this: /pattern/ @@ -267,19 +267,19 @@ to find them literally, you must add a \ before them: CAUTION! Regular expression (or 'regex') searching is a powerful but advanced feature that requires thorough knowledge in order to use successfully, and not miss intended search results. -`}explanation(t){let i=TF(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function TF(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Wr=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Wr.maybeReverse(i,n)}static maybeReverse(e,t){return e?Wr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n,i)=>e(t,n,i)*-1}};var ii=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.grouper=n,this.reverse=i}};var Ee=class{canCreateFilterForLine(e){return Ee.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Zn(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Wr(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new ii(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Ln=class{constructor(e,t){this._rawInstruction=e,this._anyContinuationLinesRemoved=t.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(e){this._anyPlaceholdersExpanded=e}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(e){function t(a,o){o!==a&&(s+=` => -${e}${o}`)}let n=this._rawInstruction.trim(),i=n.split(` +`}explanation(e){let i=rL(e,"using regex: ",this.regexAsString());return new qe(i)}regexAsString(){let e=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:e+="no flags";break;case 1:e+=`flag '${this.regex.flags}'`;break;default:e+=`flags '${this.regex.flags}'`;break}return e}};function rL(r,t,e){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${t.padEnd(s)}${e}`}var mn=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.comparator=mn.maybeReverse(i,n)}static maybeReverse(t,e){return t?mn.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,n,i)=>t(e,n,i)*-1}};var Ai=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.grouper=n,this.reverse=i}};var Ue=class{canCreateFilterForLine(t){return Ue.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Si(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=Ue.getMatch(this.sorterRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new mn(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=Ue.getMatch(this.grouperRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Ai(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var li=class{constructor(t,e){this._rawInstruction=t,this._anyContinuationLinesRemoved=e.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(t){this._anyPlaceholdersExpanded=t}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(t){function e(a,o){o!==a&&(s+=` => +${t}${o}`)}let n=this._rawInstruction.trim(),i=n.split(` `).join(` -`+e),s=`${e}${i}`;return this._rawInstruction.includes(` +`+t),s=`${t}${i}`;return this._rawInstruction.includes(` `)&&(s+=` -`+e),t(n,this._anyContinuationLinesRemoved),t(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var vt=class{constructor(e,t,n){this._statement=new Ln(e,e),this.explanation=n,this.filterFunction=t}get statement(){return this._statement}setStatement(e){this._statement=e}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(e){let t=this._statement.explainStatement(e);return this.onlyNeedsOneLineExplanation()?`${t} -`:`${t} => -${this.explanation.asString(e+" ")} -`}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new Se(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var an=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}isValid(){return this._queryComponent!==void 0}static fromObject(e,t){let n=new an(e);return n._queryComponent=t,n}static fromError(e,t){let n=new an(e);return n._error=t,n}};var se=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new se(an.fromObject(e.instruction,e))}static fromError(e,t){return new se(an.fromError(e,t))}};var Ie=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return se.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),i=t[2],s=null;if(n.includes("include"))s=new qs(i);else if(n.includes("regex")){try{s=ni.validateAndConstruct(i)}catch(u){let l=ji("Parsing regular expression",u)+` +`+t),e(n,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var qt=class{constructor(t,e,n){this._statement=new li(t,t),this.explanation=n,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e} +`:`${e} => +${this.explanation.asString(t+" ")} +`}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new qe(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var Nn=class{constructor(t){this.instruction=t}get queryComponent(){return this._queryComponent}set queryComponent(t){this._queryComponent=t}get error(){return this._error}set error(t){this._error=t}isValid(){return this._queryComponent!==void 0}static fromObject(t,e){let n=new Nn(t);return n._queryComponent=e,n}static fromError(t,e){let n=new Nn(t);return n._error=e,n}};var ye=class{constructor(t){this.object=t}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(t){return new ye(Nn.fromObject(t.instruction,t))}static fromError(t,e){return new ye(Nn.fromError(t,e))}};var Ke=class extends Ue{createFilterOrErrorMessage(t){let e=Ue.getMatch(this.filterRegExp(),t);if(e===null)return ye.fromError(t,`do not understand query filter (${this.fieldName()})`);let n=e[1].toLowerCase(),i=e[2],s=null;if(n.includes("include"))s=new Oa(i);else if(n.includes("regex")){try{s=Ri.validateAndConstruct(i)}catch(u){let l=ks("Parsing regular expression",u)+` -${ni.helpMessage()}`;return se.fromError(e,l)}if(s===null)return se.fromError(e,`Invalid instruction: '${e}' +${Ri.helpMessage()}`;return ye.fromError(t,l)}if(s===null)return ye.fromError(t,`Invalid instruction: '${t}' -${ni.helpMessage()}`)}if(s===null)return se.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new vt(e,this.getFilter(s,a),s.explanation(e));return se.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Gi=class extends Ie{fieldName(){return"description"}value(e){return ve.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Gi.cleanDescription(e.description),i=Gi.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ve.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Dl=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted. +${Ri.helpMessage()}`)}if(s===null)return ye.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new qt(t,this.getFilter(s,a),s.explanation(t));return ye.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return n=>{let i=t.matches(this.value(n));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Es=class extends Ke{fieldName(){return"description"}value(t){return Ae.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let n=Es.cleanDescription(t.description),i=Es.cleanDescription(e.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Ae.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,n=t.match(e);if(n!==null){let i=n[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let n=t.match(e);return n!==null&&(t=n[1]+t.replace(e,"")),t}};var Ec=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let n of e)if(t.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted. Possible causes: - The query is an a template file, and is not intended to be searched. @@ -290,7 +290,7 @@ Possible causes: instead of in to a template file. See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text -`}};var xl=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?se.fromFilter(new vt(e,this._filter,new Se(e))):se.fromError(e,`do not understand filter: ${e}`)}};var jt=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new xl(e,t))}canCreateFilterForLine(e){return this._filters.some(t=>t.canCreateFilterForLine(e))}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.isValid())return n}return se.fromError(e,`do not understand filter: ${e}`)}};var at=class extends Ee{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new jt,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var f;let n=this.checkForUnexpandedTemplateText(t);if(n)return se.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.isValid())return i;let s=Ee.getMatch(this.filterRegExp(),t);if(s===null)return se.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(f=s[2])==null?void 0:f.toLowerCase(),u=s[3],l=Vt.parseDateRange(u);if(!l.isValid()){let m=Vt.parseDate(a);m.isValid()&&(l=new Dt(m,m))}if(!l.isValid())return se.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=at.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return se.fromFilter(new vt(t,c,d))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,d=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&d.push(new Se(`OR no ${t} date`)),new Se(c,d)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>dr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new Dl().findUnexpandedDateText(t)}};var Rl=class extends at{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Ml=class extends at{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var $s=class extends at{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var vr=class extends Ee{constructor(){super(...arguments);this._filters=new jt}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Cl=class extends vr{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var $o=class extends an{};function Eh(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?$o.fromObject(e,i):$o.fromError(e,"Error parsing group function")}catch(n){return $o.fromError(e,ji(`Failed parsing expression "${e}"`,n))}}function Sh(r,e){let t=e.map(([n,i])=>i);return r(...t)}function Oh(r,e,t){try{return Sh(r,e)}catch(n){return ji(`Failed calculating expression "${t}"`,n)}}function Al(r,e){return[["task",r],["query",e?e.query:null]]}function Jw(r,e,t){let n=Al(r,t||null),i=Eh(n,e);return i.error?i.error:Oh(i.queryComponent,n,e)}var jo=class{constructor(e){this.line=e,this.functionOrError=Eh(Al(null,null),e)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Sh(this.functionOrError.queryComponent,Al(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?Oh(this.functionOrError.queryComponent,Al(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function Dh(r){if(r===null)return"null";let e=typeof r;return e==="object"?r.constructor.name:e}var Pl=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return se.fromError(e,"Unable to parse line");let n=t[1],i=new jo(n);return i.isValid()?se.fromFilter(new vt(e,bF(i),new Se(e))):se.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(e){let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2],s=new jo(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,u,l)=>{try{let c=l.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(u,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${e}'`),c}};return new Wr(e,this.fieldNameSingular(),a,n)}validateTaskSortKey(e){function t(n){throw new Error(`"${n}" is not a valid sort key`)}return e===void 0&&t("undefined"),Number.isNaN(e)&&t("NaN (Not a Number)"),Array.isArray(e)&&t("array"),e}compareTaskSortKeys(e,t){let n=Dh(e),i=Dh(t),s=this.compareTaskSortKeysIfOptionalMoment(e,t,n,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(e,t);if(a!==void 0)return a;if(n!==i)throw new Error(`Unable to compare two different sort key types '${n}' and '${i}' order`);if(n==="string")return e.localeCompare(t,void 0,{numeric:!0});if(n==="TasksDate")return dr(e.moment,t.moment);if(n==="boolean")return Number(t)-Number(e);let o=Number(e)-Number(t);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${n}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(e,t,n,i){let s=n==="Moment",a=i==="Moment";if(s&&a||s&&t===null||a&&e===null)return dr(e,t)}compareTaskSortKeysIfEitherIsNull(e,t){if(e===null&&t===null)return 0;if(e===null&&t!==null)return-1;if(e!==null&&t===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(e){let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new ii(e,"function",vF(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function bF(r){return(e,t)=>{let n=t.queryContext();return _F(r,e,n)}}function _F(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function vF(r){return(e,t)=>{let n=t.queryContext();return wF(e,r,n)}}function wF(r,e,t){try{let n=Jw(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var Nl=class extends Ie{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var js=class extends Ie{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var xh=class extends Ee{createFilterOrErrorMessage(e){var n;let t=Ee.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return se.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return se.fromFilter(new vt(e,o,new Se(a)))}else return se.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return xh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Yi=xh;Yi.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Il=class extends at{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Fl=class extends at{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Ll=class extends at{constructor(){let e=new jt;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Ul=class extends vr{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var si=class extends vr{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=si.oldStatusName(e),i=si.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.isDone?"Done":"Todo"}supportsGrouping(){return!0}grouper(){return e=>[si.oldStatusName(e)]}};var Wl=class extends Ie{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new ii(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var Bi=class extends Wl{constructor(){super();this.filterInstructions=new jt,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.isValid()?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Bi.makeCompareByTagComparator(s);return new Wr(t,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Bi.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var pk=ma(fk());function ai(r){return new RegExp("["+Zn(r)+"]").source}var Uh=[["(",")"],["[","]"],["{","}"],['"','"']],Un=class{constructor(e,t,n){this.openFilterChars=e,this.closeFilterChars=t,this.openAndCloseFilterChars=n,this.openFilter=ai(this.openFilterChars),this.closeFilter=ai(this.closeFilterChars)}static allSupportedDelimiters(){let e="",t="",n="";for(let[i,s]of Uh)e+=i,t+=s,n+=Un.openAndClosing(i,s);return new Un(e,t,n)}static fromInstructionLine(e){let t=e.trim(),i=/^[A-Z ]*\s*(.*)/.exec(t);if(i){let a=i[1],o=a[0],u=a.slice(-1);for(let[l,c]of Uh)if(o===l&&u===c){let d=this.openAndClosing(l,c);return new Un(l,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+Uh.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(e,t){let n=e;return t!=e&&(n+=t),n}};var oi=class{static preprocessExpression(e,t){let n=oi.splitLine(e,t);return oi.getFiltersAndSimplifiedLine(n,t)}static splitLine(e,t){let n=new RegExp("("+t.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+t.openFilter+")"),i=e.split(n),s=new RegExp("(NOT\\s*"+t.openFilter+")"),a=i.flatMap(l=>l.split(s)).filter(l=>l!==""),o=new RegExp("(^"+ai(t.openFilterChars+" ")+"*)"),u=new RegExp("("+ai(t.closeFilterChars+" ")+"*$)");return a.flatMap(l=>l.split(o)).flatMap(l=>l.split(u)).filter(l=>l!=="")}static getFiltersAndSimplifiedLine(e,t){let n="",i=1,s={};e.forEach(l=>{if(!oi.isAFilter(l,t))n+=`${l}`;else{let c=`f${i}`;s[c]=l,n+=c,i++}});let a=new RegExp(`(${t.closeFilter})([A-Z])`,"g");n=n.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${t.openFilter})`,"g");n=n.replace(o,"$1 $2");let u=t.openFilterChars;if(u!='"'&&u!="("){let l=new RegExp(ai(u),"g");n=n.replace(l,"(");let c=t.closeFilterChars,d=new RegExp(ai(c),"g");n=n.replace(d,")")}return{simplifiedLine:n,filters:s}}static isAFilter(e,t){let n=new RegExp("^"+ai(" "+t.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+t.closeFilter+" *(AND|OR|XOR) *"+t.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+t.openFilter+"$"),a=new RegExp("^"+t.closeFilter+" *(AND|OR|XOR)$");return![n,i,s,a,/^(AND|OR|XOR|NOT)$/].some(u=>RegExp(u).exec(e))}};var Yl=class extends Ee{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let t=Un.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+t.openFilter+".*|"+t.openFilter+".+"+t.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return se.fromError(t,"empty line");let n;try{n=Un.fromInstructionLine(t)}catch(o){let u=o instanceof Error?o.message:"unknown error type";return se.fromError(t,this.helpMessageFromSimpleError(t,u))}let i=oi.preprocessExpression(t,n),s=i.simplifiedLine,a=i.filters;try{let o=(0,pk.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),f=a[d];if(c.value=f,!(f in this.subFields)){let m=Yo(f);if(m===null)return this.helpMessage(t,`couldn't parse sub-expression '${f}'`,i);if(m.error)return this.helpMessage(t,`couldn't parse sub-expression '${f}': ${m.error}`,i);m.filter&&(this.subFields[f]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(t,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(t,`unknown boolean operator '${c.value}'`,i)}let u=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),l=this.constructExplanation(o);return se.fromFilter(new vt(t,u,l))}catch(o){let u=o instanceof Error?o.message:"unknown error type";return this.helpMessage(t,`malformed boolean query -- ${u} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER")this.explainExpression(i,n);else if(i.name==="OPERATOR")this.explainOperator(i,n);else throw Error("Unsupported token type: "+i.name);return n[0]}explainExpression(t,n){if(t.value==null)throw Error("null token value");let i=this.subFields[t.value.trim()],s=this.simulateExplainFilter(i);n.push(s)}simulateExplainFilter(t){return t.simulateExplainFilter()}explainOperator(t,n){if(t.value==="NOT"){let i=n.pop();n.push(Se.booleanNot([i]))}else if(t.value==="OR"){let i=n.pop(),s=n.pop();n.push(Se.booleanOr([s,i]))}else if(t.value==="AND"){let i=n.pop(),s=n.pop();n.push(Se.booleanAnd([s,i]))}else if(t.value==="XOR"){let i=n.pop(),s=n.pop();n.push(Se.booleanXor([s,i]))}else throw Error("Unsupported operator: "+t.value)}helpMessage(t,n,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),u=`${this.helpMessageFromSimpleError(t,n)} +`}};var Dc=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?ye.fromFilter(new qt(t,this._filter,new qe(t))):ye.fromError(t,`do not understand filter: ${t}`)}};var or=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new Dc(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let n=e.createFilterOrErrorMessage(t);if(n.isValid())return n}return ye.fromError(t,`do not understand filter: ${t}`)}};var vt=class extends Ue{constructor(e=null){super();e!==null?this.filterInstructions=e:(this.filterInstructions=new or,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){var f;let n=this.checkForUnexpandedTemplateText(e);if(n)return ye.fromError(e,n);let i=this.filterInstructions.createFilterOrErrorMessage(e);if(i.isValid())return i;let s=Ue.getMatch(this.filterRegExp(),e);if(s===null)return ye.fromError(e,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(f=s[2])==null?void 0:f.toLowerCase(),u=s[3],l=gr.parseDateRange(u);if(!l.isValid()){let m=gr.parseDate(a);m.isValid()&&(l=new Vt(m,m))}if(!l.isValid())return ye.fromError(e,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=vt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ye.fromFilter(new qt(e,c,d))}buildFilterFunction(e,n){let i;switch(e){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(e){return n=>e(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(e,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${e} date is between:`,d=[new qe(`${s.start.format(o)} and`),new qe(`${s.end.format(o)} inclusive`)];return i&&d.push(new qe(`OR no ${e} date`)),new qe(c,d)}a="on",u=s.start.format(o);break}let l=`${e} date is ${a} ${u}`;return i&&(l+=` OR no ${e} date`),new qe(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(e,n)=>Ur(this.date(e),this.date(n))}supportsGrouping(){return!0}grouper(){return e=>{let n=this.date(e);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(e){return new Ec().findUnexpandedDateText(e)}};var Sc=class extends vt{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var Oc=class extends vt{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var xa=class extends vt{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var zr=class extends Ue{constructor(){super(...arguments);this._filters=new or}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var xc=class extends zr{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};var Pu=class extends Nn{};function Tg(r,t){let e=r.map(([n])=>n);try{let n=t.includes("return")?t:`return ${t}`,i=t&&new Function(...e,n);return i instanceof Function?Pu.fromObject(t,i):Pu.fromError(t,"Error parsing group function")}catch(n){return Pu.fromError(t,ks(`Failed parsing expression "${t}"`,n))}}function _g(r,t){let e=t.map(([n,i])=>i);return r(...e)}function vg(r,t,e){try{return _g(r,t)}catch(n){return ks(`Failed calculating expression "${e}"`,n)}}function Mc(r,t){return[["task",r],["query",t?t.query:null]]}function jk(r,t,e){let n=Mc(r,e||null),i=Tg(n,t);return i.error?i.error:vg(i.queryComponent,n,t)}var Nu=class{constructor(t){this.line=t,this.functionOrError=Tg(Mc(null,null),t)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(t,e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return _g(this.functionOrError.queryComponent,Mc(t,e||null))}evaluateOrCatch(t,e){return this.isValid()?vg(this.functionOrError.queryComponent,Mc(t,e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function wg(r){if(r===null)return"null";let t=typeof r;return t==="object"?r.constructor.name:t}var Cc=class extends Ue{createFilterOrErrorMessage(t){let e=Ue.getMatch(this.filterRegExp(),t);if(e===null)return ye.fromError(t,"Unable to parse line");let n=e[1],i=new Nu(n);return i.isValid()?ye.fromFilter(new qt(t,nL(i),new qe(t))):ye.fromError(t,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(t){let e=Ue.getMatch(this.sorterRegExp(),t);if(e===null)return null;let n=!!e[1],i=e[2],s=new Nu(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,u,l)=>{try{let c=l.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(u,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${t}'`),c}};return new mn(t,this.fieldNameSingular(),a,n)}validateTaskSortKey(t){function e(n){throw new Error(`"${n}" is not a valid sort key`)}return t===void 0&&e("undefined"),Number.isNaN(t)&&e("NaN (Not a Number)"),Array.isArray(t)&&e("array"),t}compareTaskSortKeys(t,e){let n=wg(t),i=wg(e),s=this.compareTaskSortKeysIfOptionalMoment(t,e,n,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(t,e);if(a!==void 0)return a;if(n!==i)throw new Error(`Unable to compare two different sort key types '${n}' and '${i}' order`);if(n==="string")return t.localeCompare(e,void 0,{numeric:!0});if(n==="TasksDate")return Ur(t.moment,e.moment);if(n==="boolean")return Number(e)-Number(t);let o=Number(t)-Number(e);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${n}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(t,e,n,i){let s=n==="Moment",a=i==="Moment";if(s&&a||s&&e===null||a&&t===null)return Ur(t,e)}compareTaskSortKeysIfEitherIsNull(t,e){if(t===null&&e===null)return 0;if(t===null&&e!==null)return-1;if(t!==null&&e===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(t){let e=Ue.getMatch(this.grouperRegExp(),t);if(e===null)return null;let n=!!e[1],i=e[2];return new Ai(t,"function",sL(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function nL(r){return(t,e)=>{let n=e.queryContext();return iL(r,t,n)}}function iL(r,t,e){let n=r.evaluate(t,e);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function sL(r){return(t,e)=>{let n=e.queryContext();return aL(t,r,n)}}function aL(r,t,e){try{let n=jk(r,t,e);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${t}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var Rc=class extends Ke{fieldName(){return"heading"}value(t){return t.precedingHeader?t.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>t.precedingHeader===null||t.precedingHeader.length===0?["(No heading)"]:[t.precedingHeader]}};var Ma=class extends Ke{fieldName(){return"path"}value(t){return t.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>[Ke.escapeMarkdownCharacters(t.path.replace(".md",""))]}};var kg=class extends Ue{createFilterOrErrorMessage(t){var n;let e=Ue.getMatch(this.filterRegExp(),t);if(e!==null){let i=e[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return ye.fromError(t,"do not understand priority");let a=t,o;switch((n=e[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return ye.fromFilter(new qt(t,o,new qe(a)))}else return ye.fromError(t,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return kg.priorityRegexp}supportsSorting(){return!0}comparator(){return(t,e)=>t.priority.localeCompare(e.priority)}supportsGrouping(){return!0}grouper(){return t=>[t.priorityNameGroupText]}},Ds=kg;Ds.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Ac=class extends vt{fieldName(){return"scheduled"}date(t){return t.scheduledDate}filterResultIfFieldMissing(){return!1}};var Pc=class extends vt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(t){return t.startDate}filterResultIfFieldMissing(){return!0}};var Nc=class extends vt{constructor(){let t=new or;t.add("has happens date",e=>this.dates(e).some(n=>n!==null)),t.add("no happens date",e=>!this.dates(e).some(n=>n!==null)),super(t)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(t){return this.earliestDate(t)}dates(t){return t.happensDates}earliestDate(t){return t.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(t){return e=>this.dates(e).some(n=>t(n))}};var Ic=class extends zr{constructor(){super(),this._filters.add("is recurring",t=>t.recurrence!==null),this._filters.add("is not recurring",t=>t.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(t,e)=>t.recurrence!==null&&e.recurrence===null?-1:t.recurrence===null&&e.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Pi=class extends zr{constructor(){super(),this._filters.add("done",t=>t.isDone),this._filters.add("not done",t=>!t.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(t,e)=>{let n=Pi.oldStatusName(t),i=Pi.oldStatusName(e);return ni?-1:0}}static oldStatusName(t){return t.isDone?"Done":"Todo"}supportsGrouping(){return!0}grouper(){return t=>[Pi.oldStatusName(t)]}};var Fc=class extends Ke{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(t){return this.values(t).join(", ")}getFilter(t,e){return n=>{let i=t.matchesAnyOf(this.values(n));return e?!i:i}}createGrouper(t){return new Ai(this.grouperInstruction(t),this.fieldNamePlural(),this.grouper(),t)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNamePlural()}`;return t&&(e+=" reverse"),e}};var Ss=class extends Fc{constructor(){super();this.filterInstructions=new or,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,e=>this.values(e).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,e=>this.values(e).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,e=>this.values(e).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,e=>this.values(e).length===0)}createFilterOrErrorMessage(e){let n=this.filterInstructions.createFilterOrErrorMessage(e);return n.isValid()?n:super.createFilterOrErrorMessage(e)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}fieldNameSingular(){return"tag"}values(e){return e.tags}supportsSorting(){return!0}createSorterFromLine(e){let n=e.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Ss.makeCompareByTagComparator(s);return new mn(e,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Ss.makeCompareByTagComparator(1)}static makeCompareByTagComparator(e){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=e-1;if(n.tags.length=e)return 1;if(i.tags.length=e)return-1;if(n.tags.lengthe.tags.length==0?["(No tags)"]:e.tags}};var tE=oo(eE());function Ni(r){return new RegExp("["+Si(r)+"]").source}var Pg=[["(",")"],["[","]"],["{","}"],['"','"']],ci=class{constructor(t,e,n){this.openFilterChars=t,this.closeFilterChars=e,this.openAndCloseFilterChars=n,this.openFilter=Ni(this.openFilterChars),this.closeFilter=Ni(this.closeFilterChars)}static allSupportedDelimiters(){let t="",e="",n="";for(let[i,s]of Pg)t+=i,e+=s,n+=ci.openAndClosing(i,s);return new ci(t,e,n)}static fromInstructionLine(t){let e=t.trim(),i=/^[A-Z ]*\s*(.*)/.exec(e);if(i){let a=i[1],o=a[0],u=a.slice(-1);for(let[l,c]of Pg)if(o===l&&u===c){let d=this.openAndClosing(l,c);return new ci(l,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+Pg.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(t,e){let n=t;return e!=t&&(n+=e),n}};var Ii=class{static preprocessExpression(t,e){let n=Ii.splitLine(t,e);return Ii.getFiltersAndSimplifiedLine(n,e)}static splitLine(t,e){let n=new RegExp("("+e.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+e.openFilter+")"),i=t.split(n),s=new RegExp("(NOT\\s*"+e.openFilter+")"),a=i.flatMap(l=>l.split(s)).filter(l=>l!==""),o=new RegExp("(^"+Ni(e.openFilterChars+" ")+"*)"),u=new RegExp("("+Ni(e.closeFilterChars+" ")+"*$)");return a.flatMap(l=>l.split(o)).flatMap(l=>l.split(u)).filter(l=>l!=="")}static getFiltersAndSimplifiedLine(t,e){let n="",i=1,s={};t.forEach(l=>{if(!Ii.isAFilter(l,e))n+=`${l}`;else{let c=`f${i}`;s[c]=l,n+=c,i++}});let a=new RegExp(`(${e.closeFilter})([A-Z])`,"g");n=n.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${e.openFilter})`,"g");n=n.replace(o,"$1 $2");let u=e.openFilterChars;if(u!='"'&&u!="("){let l=new RegExp(Ni(u),"g");n=n.replace(l,"(");let c=e.closeFilterChars,d=new RegExp(Ni(c),"g");n=n.replace(d,")")}return{simplifiedLine:n,filters:s}}static isAFilter(t,e){let n=new RegExp("^"+Ni(" "+e.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+e.closeFilter+" *(AND|OR|XOR) *"+e.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+e.openFilter+"$"),a=new RegExp("^"+e.closeFilter+" *(AND|OR|XOR)$");return![n,i,s,a,/^(AND|OR|XOR|NOT)$/].some(u=>RegExp(u).exec(t))}};var jc=class extends Ue{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let e=ci.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+e.openFilter+".*|"+e.openFilter+".+"+e.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(e){return this.parseLine(e)}fieldName(){return"boolean query"}parseLine(e){if(e.length===0)return ye.fromError(e,"empty line");let n;try{n=ci.fromInstructionLine(e)}catch(o){let u=o instanceof Error?o.message:"unknown error type";return ye.fromError(e,this.helpMessageFromSimpleError(e,u))}let i=Ii.preprocessExpression(e,n),s=i.simplifiedLine,a=i.filters;try{let o=(0,tE.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),f=a[d];if(c.value=f,!(f in this.subFields)){let m=Fu(f);if(m===null)return this.helpMessage(e,`couldn't parse sub-expression '${f}'`,i);if(m.error)return this.helpMessage(e,`couldn't parse sub-expression '${f}': ${m.error}`,i);m.filter&&(this.subFields[f]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(e,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(e,`unknown boolean operator '${c.value}'`,i)}let u=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),l=this.constructExplanation(o);return ye.fromFilter(new qt(e,u,l))}catch(o){let u=o instanceof Error?o.message:"unknown error type";return this.helpMessage(e,`malformed boolean query -- ${u} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(e,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(e,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(e){let n=[];for(let i of e)if(i.name==="IDENTIFIER")this.explainExpression(i,n);else if(i.name==="OPERATOR")this.explainOperator(i,n);else throw Error("Unsupported token type: "+i.name);return n[0]}explainExpression(e,n){if(e.value==null)throw Error("null token value");let i=this.subFields[e.value.trim()],s=this.simulateExplainFilter(i);n.push(s)}simulateExplainFilter(e){return e.simulateExplainFilter()}explainOperator(e,n){if(e.value==="NOT"){let i=n.pop();n.push(qe.booleanNot([i]))}else if(e.value==="OR"){let i=n.pop(),s=n.pop();n.push(qe.booleanOr([s,i]))}else if(e.value==="AND"){let i=n.pop(),s=n.pop();n.push(qe.booleanAnd([s,i]))}else if(e.value==="XOR"){let i=n.pop(),s=n.pop();n.push(qe.booleanXor([s,i]))}else throw Error("Unsupported operator: "+e.value)}helpMessage(e,n,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),u=`${this.helpMessageFromSimpleError(e,n)} The instruction was converted to the following simplified line: ${i.simplifiedLine} @@ -300,58 +300,62 @@ ${a} For help, see: https://publish.obsidian.md/tasks/Queries/Combining+Filters -`;return se.fromError(t,u)}stringifySubExpressionsForErrorMessage(t){return Object.entries(t).map(([n,i])=>` '${n}': '${i}' +`;return ye.fromError(e,u)}stringifySubExpressionsForErrorMessage(e){return Object.entries(e).map(([n,i])=>` '${n}': '${i}' => ${this.stringifySubExpressionStatus(i)}`).join(` -`)}stringifySubExpressionStatus(t){let n=Yo(t);return n?n.error?`ERROR: +`)}stringifySubExpressionStatus(e){let n=Fu(e);return n?n.error?`ERROR: ${n.error.split(` `).map(s=>s.trim()).join(` `)}`:"OK":`ERROR: - do not understand query`}helpMessageFromSimpleError(t,n){return`Could not interpret the following instruction as a Boolean combination: - ${t} + do not understand query`}helpMessageFromSimpleError(e,n){return`Could not interpret the following instruction as a Boolean combination: + ${e} The error message is: - ${n}`}};var Bl=class extends Ie{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var Qs=class extends Ee{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return se.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var Hl=class extends Ie{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var cn=class extends Ee{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Ee.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),i=t[2],s=xt[i.toUpperCase()];if(!s)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(e)}return se.fromFilter(new vt(e,a,new Se(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(xt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. + ${n}`}};var Yc=class extends Ke{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var La=class extends Ue{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return ye.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var $c=class extends Ke{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Un=class extends Ue{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Ue.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=Ue.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let n=e[1].toLowerCase(),i=e[2],s=zt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(n){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return ye.fromFilter(new qt(t,a,new qe(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(zt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${t}'. Allowed options: 'is' and 'is not' (without quotes). - Allowed values: ${t} + Allowed values: ${e} Note: values are case-insensitive, so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return se.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=cn.groupName(e),i=cn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[cn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Vl=class extends Ie{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var zl=class extends Ie{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(this.value(e))]}};var Kl=class extends Ie{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(this.value(e))]}};var Ql=class extends Ie{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return se.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Xl=class extends at{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var Zl=class extends vr{constructor(){super(),this._filters.add("is blocking",(e,t)=>e.isBlocking(t.allTasks)),this._filters.add("is not blocking",(e,t)=>!e.isBlocking(t.allTasks)),this._filters.add("is blocked",(e,t)=>e.isBlocked(t.allTasks)),this._filters.add("is not blocked",(e,t)=>!e.isBlocked(t.allTasks))}fieldName(){return"blocking"}};var Jl=class extends Ie{constructor(){super();this.filterInstructions=new jt;this.filterInstructions.add("has id",t=>t.id.length>0),this.filterInstructions.add("no id",t=>t.id.length===0)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.isValid()?n:super.createFilterOrErrorMessage(t)}fieldName(){return"id"}value(t){return t.id}supportsSorting(){return!0}supportsGrouping(){return!0}};var ec=class extends Ee{constructor(){super();this.filterInstructions=new jt;this.filterInstructions.add("has depends on",t=>t.dependsOn.length>0),this.filterInstructions.add("no depends on",t=>t.dependsOn.length===0)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.isValid()?n:se.fromError(t,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var tc=class extends vr{fieldName(){return"random"}supportsSorting(){return!0}comparator(){return(e,t)=>this.sortKey(e)-this.sortKey(t)}sortKey(e){let t=i=>{let s=0,a=9;for(;s>>9},n=window.moment().format("Y-MM-DD");return t(n+" "+e.description)}};var Wh=[()=>new Hl,()=>new cn,()=>new si,()=>new Ul,()=>new Yi,()=>new Ll,()=>new Xl,()=>new Rl,()=>new Fl,()=>new Il,()=>new $s,()=>new Ml,()=>new js,()=>new zl,()=>new Kl,()=>new Ql,()=>new Gi,()=>new Bi,()=>new Nl,()=>new Cl,()=>new Bl,()=>new Qs,()=>new Vl,()=>new Pl,()=>new Jl,()=>new ec,()=>new Zl,()=>new tc,()=>new Yl];function Yo(r){for(let e of Wh){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function mk(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Wh){let i=t().createSorterFromLine(r);if(i)return i}return null}function hk(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Wh){let i=t().createGrouperFromLine(r);if(i)return i}return null}var rc=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var nc=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;st.set(o,a)),e.pop();return t}};var sc=class extends ic{},ac=class{constructor(e,t,n){this.root=new sc(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let i of e){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new sc([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var oc=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` -`;return e}toString(){let e=` -`;e+=`Group names: [${this.groups}] -`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName} -`;return e+=this.tasksAsStringOfLines(),e}};var Xs=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new ac(e,t,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): -`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i} -`}for(let n of this.groups)e+=n.toString(),e+=` + Example: ${this.fieldNameSingular()} is not NON_TASK`;return ye.fromError(t,n)}fieldName(){return"status.type"}value(t){return t.status.type}supportsSorting(){return!0}comparator(){return(t,e)=>{let n=Un.groupName(t),i=Un.groupName(e);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>[Un.groupName(t)]}static groupName(t){return t.status.typeGroupText}};var Gc=class extends Ke{fieldName(){return"recurrence"}value(t){return t.recurrence!==null?t.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?[t.recurrence.toText()]:["None"]}};var Hc=class extends Ke{fieldName(){return"folder"}value(t){return t.file.folder}supportsGrouping(){return!0}grouper(){return t=>[Ke.escapeMarkdownCharacters(this.value(t))]}};var Bc=class extends Ke{fieldName(){return"root"}value(t){return t.file.root}supportsGrouping(){return!0}grouper(){return t=>[Ke.escapeMarkdownCharacters(this.value(t))]}};var Vc=class extends Ke{fieldName(){return"backlink"}value(t){let e=t.getLinkText({isFilenameUnique:!0});return e===null?"Unknown Location":e}createFilterOrErrorMessage(t){return ye.fromError(t,"backlink field does not support filtering")}canCreateFilterForLine(t){return!1}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;if(e===null)return["Unknown Location"];let n=t.precedingHeader;return n===null?["[["+e+"]]"]:[`[[${e}#${n}|${e} > ${n}]]`]}}};var zc=class extends vt{fieldName(){return"cancelled"}date(t){return t.cancelledDate}filterResultIfFieldMissing(){return!1}};var Kc=class extends zr{constructor(){super(),this._filters.add("is blocking",(t,e)=>t.isBlocking(e.allTasks)),this._filters.add("is not blocking",(t,e)=>!t.isBlocking(e.allTasks)),this._filters.add("is blocked",(t,e)=>t.isBlocked(e.allTasks)),this._filters.add("is not blocked",(t,e)=>!t.isBlocked(e.allTasks))}fieldName(){return"blocking"}};var Qc=class extends Ke{constructor(){super();this.filterInstructions=new or;this.filterInstructions.add("has id",e=>e.id.length>0),this.filterInstructions.add("no id",e=>e.id.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let n=this.filterInstructions.createFilterOrErrorMessage(e);return n.isValid()?n:super.createFilterOrErrorMessage(e)}fieldName(){return"id"}value(e){return e.id}supportsSorting(){return!0}supportsGrouping(){return!0}};var Xc=class extends Ue{constructor(){super();this.filterInstructions=new or;this.filterInstructions.add("has depends on",e=>e.dependsOn.length>0),this.filterInstructions.add("no depends on",e=>e.dependsOn.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let n=this.filterInstructions.createFilterOrErrorMessage(e);return n.isValid()?n:ye.fromError(e,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var Zc=class extends zr{fieldName(){return"random"}supportsSorting(){return!0}comparator(){return(t,e)=>this.sortKey(t)-this.sortKey(e)}sortKey(t){let e=i=>{let s=0,a=9;for(;s>>9},n=window.moment().format("Y-MM-DD");return e(n+" "+t.description)}};var Ng=[()=>new $c,()=>new Un,()=>new Pi,()=>new Ic,()=>new Ds,()=>new Nc,()=>new zc,()=>new Sc,()=>new Pc,()=>new Ac,()=>new xa,()=>new Oc,()=>new Ma,()=>new Hc,()=>new Bc,()=>new Vc,()=>new Es,()=>new Ss,()=>new Rc,()=>new xc,()=>new Yc,()=>new La,()=>new Gc,()=>new Cc,()=>new Qc,()=>new Xc,()=>new Kc,()=>new Zc,()=>new jc];function Fu(r){for(let t of Ng){let e=t();if(e.canCreateFilterForLine(r))return e.createFilterOrErrorMessage(r)}return null}function rE(r){let t=/^sort by /i;if(r.match(t)===null)return null;for(let e of Ng){let i=e().createSorterFromLine(r);if(i)return i}return null}function nE(r){let t=/^group by /i;if(r.match(t)===null)return null;for(let e of Ng){let i=e().createGrouperFromLine(r);if(i)return i}return null}var Jc=class{constructor(t,e,n){this.nestingLevel=t,this.displayName=e,this.property=n}};var ed=class{constructor(t,e){this.lastHeadingAtLevel=new Array;this.groupers=e;let i=t.keys().next().value.length;for(let s=0;se.set(o,a)),t.pop();return e}};var rd=class extends td{},nd=class{constructor(t,e,n){this.root=new rd(e),this.buildGroupingTree(t,n)}buildGroupingTree(t,e){let n=[this.root];for(let i of t){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,e);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new rd([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var id=class{constructor(t,e){this.groups=t,this.groupHeadings=[],this.tasks=e}setGroupHeadings(t){for(let e of t)this.groupHeadings.push(e)}applyTaskLimit(t){this.tasks=this.tasks.slice(0,t)}tasksAsStringOfLines(){let t="";for(let e of this.tasks)t+=e.toFileLineString()+` +`;return t}toString(){let t=` +`;t+=`Group names: [${this.groups}] +`;for(let e of this.groupHeadings)t+=`${"#".repeat(4+e.nestingLevel)} [${e.property}] ${e.displayName} +`;return t+=this.tasksAsStringOfLines(),t}};var Ua=class{constructor(t,e,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=e.length,this._groupers=t;let s=new nd(t,e,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let t="";t+=`Groupers (if any): +`;for(let n of this._groupers){let i=n.reverse?" reverse":"";t+=`- ${n.property}${i} +`}for(let n of this.groups)t+=n.toString(),t+=` --- -`;return e+=` +`;return t+=` ${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let i=new oc(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var ui=class{constructor(e,t){this.tasksFile=e,this.allTasks=[...t]}static fromAllTasks(e){return new ui(void 0,e)}get queryPath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}queryContext(){return this.tasksFile?kh(this.tasksFile,this.allTasks):void 0}};function gk(r){return`task${r!==1?"s":""}`}var zi=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${gk(e)}`:`${e} of ${t} ${gk(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new zi(new Xs([],[],ui.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function yk(r){return r.endsWith("\\")}function Tk(r){return r.endsWith("\\\\")}function QF(r){return r.replace(/^[ \t]*/,"")}function XF(r){return r.replace(/[ \t]*\\$/,"")}function ZF(r,e){let t=r;return e&&(t=QF(r)),Tk(t)?t=t.slice(0,-1):yk(r)&&(t=XF(t)),t}function bk(r){let e=[],t=!1,n="",i="",s=r+` +`,t}addTaskGroups(t){for(let[e,n]of t){let i=new id(e,n);this.addTaskGroup(i)}}addTaskGroup(t){this._groups.push(t)}sortTaskGroups(){let t=(e,n)=>{let i=e.groups,s=n.groups;for(let a=0;a{e.applyTaskLimit(t)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let t=[];this._groups.forEach(n=>{t=[...t,...n.tasks]});let e=[...new Set(t)];this._totalTaskCount=e.length}};var Fi=class{constructor(t,e){this.tasksFile=t,this.allTasks=[...e]}static fromAllTasks(t){return new Fi(void 0,t)}get queryPath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}queryContext(){return this.tasksFile?bg(this.tasksFile,this.allTasks):void 0}};function iE(r){return`task${r!==1?"s":""}`}var Ms=class{constructor(t,e){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=t,this.totalTasksCountBeforeLimit=e}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(t){this._searchErrorMessage=t}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let t=this.totalTasksCount,e=this.totalTasksCountBeforeLimit;return t===e?`${t} ${iE(t)}`:`${t} of ${e} ${iE(e)}`}get groups(){return this.taskGroups.groups}static fromError(t){let e=new Ms(new Ua([],[],Fi.fromAllTasks([])),0);return e._searchErrorMessage=t,e}};function sE(r){return r.endsWith("\\")}function aE(r){return r.endsWith("\\\\")}function NL(r){return r.replace(/^[ \t]*/,"")}function IL(r){return r.replace(/[ \t]*\\$/,"")}function FL(r,t){let e=r;return t&&(e=NL(r)),aE(e)?e=e.slice(0,-1):sE(r)&&(e=IL(e)),e}function oE(r){let t=[],e=!1,n="",i="",s=r+` `;for(let a of s.split(` -`)){let o=ZF(a,t);t?(n+=` -`+a,i+=" "+o):(n=a,i=o),Tk(a)?t=!1:t=yk(a),t||(i.trim()!==""&&e.push(new Ln(n,i)),n="",i="")}return e}var Zs=class{static by(e,t,n){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of e)s.push(a.comparator);return t.sort(Zs.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new cn().createNormalSorter(),new Qs().createNormalSorter(),new $s().createNormalSorter(),new Yi().createNormalSorter(),new js().createNormalSorter()]}static makeCompositeComparator(e,t){return(n,i)=>{for(let s of e){let a=s(n,i,t);if(a!==0)return a}return 0}}};var $r=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new en;this._queryLayoutOptions=new ri;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags|depends on|id|on completion|tree)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=Rt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.tasksFile=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),bk(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)try{this.parseLine(i,n)}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,n);return}})}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}get queryId(){return this._queryId}parseLine(e,t){switch(!0){case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(e):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(e):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(e):this.parseLimit(e);break;case this.parseSortBy(e):break;case this.parseGroupBy(e):break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(e);break;case this.commentRegexp.test(e):break;case this.parseFilter(e,t):break;default:this.setError("do not understand query",t)}}formatQueryForLogging(){return`[${this.source.split(` -`).join(" ; ")}]`}expandPlaceholders(e,t){let n=e.anyContinuationLinesRemoved;if(n.includes("{{")&&n.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" +`)){let o=FL(a,e);e?(n+=` +`+a,i+=" "+o):(n=a,i=o),aE(a)?e=!1:e=sE(a),e||(i.trim()!==""&&t.push(new li(n,i)),n="",i="")}return t}var Wa=class{static by(t,e,n){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of t)s.push(a.comparator);return e.sort(Wa.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new Un().createNormalSorter(),new La().createNormalSorter(),new xa().createNormalSorter(),new Ds().createNormalSorter(),new Ma().createNormalSorter()]}static makeCompositeComparator(t,e){return(n,i)=>{for(let s of t){let a=s(n,i,e);if(a!==0)return a}return 0}}};var gn=class{constructor(t,e=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Mn;this._queryLayoutOptions=new Ci;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags|depends on|id|on completion|tree)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=Kt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=t,this.tasksFile=e,this.debug(`Creating query: ${this.formatQueryForLogging()}`),oE(t).forEach(n=>{let i=this.expandPlaceholders(n,e);if(this.error===void 0)try{this.parseLine(i,n)}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,n);return}})}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}get queryId(){return this._queryId}parseLine(t,e){switch(!0){case this.shortModeRegexp.test(t):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(t):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(t):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(t):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit(t);break;case this.parseSortBy(t):break;case this.parseGroupBy(t):break;case this.hideOptionsRegexp.test(t):this.parseHideOptions(t);break;case this.commentRegexp.test(t):break;case this.parseFilter(t,e):break;default:this.setError("do not understand query",e)}}formatQueryForLogging(){return`[${this.source.split(` +`).join(" ; ")}]`}expandPlaceholders(t,e){let n=t.anyContinuationLinesRemoved;if(n.includes("{{")&&n.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" but no file path has been supplied, so cannot expand placeholder values. The query is: -${n}`,n;let i=n;if(t){let s=Zw(t);try{i=Xw(n,s)}catch(a){return a instanceof Error?this._error=a.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",n}}return e.recordExpandedPlaceholders(i),i}append(e){return this.source===""?e:e.source===""?this:new $r(`${this.source} -${e.source}`,this.tasksFile)}explainQuery(){return new Us().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=$r.generateErrorMessage(t,e)}static generateErrorMessage(e,t){return e.allLinesIdentical()?`${t} -Problem line: "${e.rawInstruction}"`:`${t} +${n}`,n;let i=n;if(e){let s=qk(e);try{i=Wk(n,s)}catch(a){return a instanceof Error?this._error=a.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",n}}return t.recordExpandedPlaceholders(i),i}append(t){return this.source===""?t:t.source===""?this:new gn(`${this.source} +${t.source}`,this.tasksFile)}explainQuery(){return new Da().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(t){this._filters.push(t)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(t,e){this._error=gn.generateErrorMessage(e,t)}static generateErrorMessage(t,e){return t.allLinesIdentical()?`${e} +Problem line: "${t.rawInstruction}"`:`${e} Problem statement: -${e.explainStatement(" ")} -`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new ui(this.tasksFile,e),n;try{this.filters.forEach(u=>{n=u.statement,e=e.filter(l=>u.filterFunction(l,t))}),n=void 0;let{debugSettings:i}=Q(),s=i.ignoreSortInstructions?e:Zs.by(this.sorting,e,t),a=s.slice(0,this.limit),o=new Xs(this.grouping,a,t);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new zi(o,s.length)}catch(i){let a=ji("Search failed",i);return n&&(a=$r.generateErrorMessage(n,a)),zi.fromError(a)}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"tree":this._queryLayoutOptions.hideTree=n;break;case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;case"id":this._taskLayoutOptions.setVisibility("id",!n);break;case"depends on":this._taskLayoutOptions.setVisibility("dependsOn",!n);break;case"on completion":this._taskLayoutOptions.setVisibility("onCompletion",!n);break;default:this.setError("do not understand hide/show option",new Ln(e,e))}}}parseFilter(e,t){var i;let n=Yo(e);return n!=null?(n.filter?(n.filter.setStatement(t),this._filters.push(n.filter)):this.setError((i=n.error)!=null?i:"Unknown error",t),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",new Ln(e,e));return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=mk(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=hk(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var li=class{constructor(e=li.empty){this._source=e}static getInstance(){return li.instance||(li.instance=new li),li.instance}set(e){this._source=e}query(e=void 0){return new $r(this._source,e)}hasInstructions(){return this._source.trim()!==li.empty}},tr=li;tr.empty="";var uc=class{constructor({obsidianEvents:e}){this.logger=Rt.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Fk=require("obsidian");var Ik=require("obsidian");var qh=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function _k(r){let e=[],t=new Le().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let i of r.registeredStatuses)t.includes(i.symbol)===n&&e.push(new qh(i));return e}var vk=require("obsidian");var $h="---",Js=class{apply(e){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return $h}isCheckedForTask(e){return!1}};function Wn(r,e){return A(this,null,function*(){yield br({originalTask:r,newTasks:e})})}var ci=class extends vk.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let i of t)this.addItemForInstruction(n,i)}addItemForInstruction(t,n){n.instructionDisplayName()===$h?this.addSeparator():this.addItem(i=>this.getMenuItemCallback(t,i,n))}getMenuItemCallback(t,n,i){n.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(t)).onClick(()=>A(this,null,function*(){let s=i.apply(t);(s.length!==1||!Object.is(s[0],t))&&(yield this.taskSaver(t,s))}))}};var lc=class extends ci{constructor(e,t,n=Wn){super(n);let i=_k(e);this.addItemsForInstructions(i,t)}};function wk(r){for(let t of ee.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function ea(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function jh(r,e,t,n){let i=r[e];return Sk(i,r,e,t,n)}function kk(r,e,t,n){let i=window.moment();return Sk(i,r,e,t,n)}function Ek(r,e,t,n){return Ok(r,e,null)}function Sk(r,e,t,n,i){let s=new mt(r).postpone(n,i);return Ok(e,t,s)}function Ok(r,e,t){let n=_t.removeInferredStatusIfNeeded(r,[new ee(de(K({},r),{[e]:t}))])[0];return{postponedDate:t,postponedTask:n}}function Dk(r,e){if(r){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}else return`Task's ${e} removed`}function xk(r,e,t){return`\u2139\uFE0F ${Gh(r,e,t)} (right-click for more options)`}function Gh(r,e,t){let n=ea(r),i=r[n];return ta(n,i,e,t)}function Rk(r,e,t){let n=ea(r),i=window.moment().startOf("day");return ta(n,i,e,t)}function Mk(r,e,t){let n=ea(r);return Yh(n,r)}function Yh(r,e){return r==="scheduledDate"&&e.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${cc(r)}`}function JF(r){return Rs(r.replace("Date",""))}function cc(r){return r.replace("Date"," date")}function ta(r,e,t,n){let s=new mt(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";if(e.isSameOrBefore(window.moment(),"day")){let u=JF(r);return(t>=0?`${u} in ${a} ${n}, on ${s}`:`${u} ${-a} ${n} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=cc(r);return t>=0?`Postpone ${o} by ${a} ${n}, to ${s}`:`Backdate ${o} by ${-a} ${n}, to ${s}`}function Ck(r){return["startDate","scheduledDate","dueDate"].includes(r)}var Bo=class{constructor(e,t,n){this.newDate=t,this.dateFieldToEdit=e,this.displayName=n!=null?n:`Set Date: ${this.newDate.toDateString()}`}apply(e){return this.isCheckedForTask(e)?[e]:[new ee(de(K({},e),{[this.dateFieldToEdit]:window.moment(this.newDate)}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(e){var t;return((t=e[this.dateFieldToEdit])==null?void 0:t.isSame(window.moment(this.newDate)))||!1}},jr=class extends Bo{constructor(e,t,n,i){var u;let s=(u=t[e])!=null?u:window.moment(),a=ta(e,s,n,i),o=new mt(window.moment(s)).postpone(i,n).toDate();super(e,o,a)}},Bh=class{constructor(e,t){this.dateFieldToEdit=e,this.displayName=Yh(e,t)}apply(e){let t=this.dateFieldToEdit==="scheduledDate"&&e.scheduledDateIsInferred;return e[this.dateFieldToEdit]===null||t?[e]:[new ee(de(K({},e),{[this.dateFieldToEdit]:null}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(e){return!1}};function Ak(r,e){return Nk(e,r,1)}function Pk(r,e){return Nk(e,r,-1)}function Nk(r,e,t){let n=window.moment().startOf("day"),i=n.toDate(),s=new mt(n.clone());return[new Bo(e,i,ta(e,n,0,"days")),new Bo(e,s.postpone("day",t).toDate(),ta(e,n,t,"day")),new Js,new jr(e,r,t*2,"days"),new jr(e,r,t*3,"days"),new jr(e,r,t*4,"days"),new jr(e,r,t*5,"days"),new jr(e,r,t*6,"days"),new Js,new jr(e,r,t,"week"),new jr(e,r,t*2,"weeks"),new jr(e,r,t*3,"weeks"),new jr(e,r,t,"month"),new Js,new Bh(e,r)]}var dc=class extends ci{constructor(e,t,n=Wn){super(n);let i=Ck(e)?Ak(e,t):Pk(e,t);this.addItemsForInstructions(i,t)}};var fc=class{constructor(){this.data=eL}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},Hh=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){if(this.attributeName===Hh.noAttributeName)return;let i=this.attributeValueCalculator(n,t);i!==""&&(e.dataset[this.attributeName]=i)}},Gr=Hh;Gr.noAttributeName="",Gr.noAttributeValueCalculator=()=>"",Gr.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let l=window.moment().startOf("day").diff(o,"days");if(isNaN(l))return null;if(l===0)return"today";let c="";return l>0?c+="past-":l<0&&(c+="future-"),Math.abs(l)<=7?c+=Math.abs(l).toString()+"d":c+=i,c}let a=t[e];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function ra(r){return new Gr(r,Gr.noAttributeName,Gr.noAttributeValueCalculator)}function na(r,e){return new Gr(r,e,Gr.dateAttributeCalculator)}var eL={createdDate:na("task-created","taskCreated"),dueDate:na("task-due","taskDue"),startDate:na("task-start","taskStart"),scheduledDate:na("task-scheduled","taskScheduled"),doneDate:na("task-done","taskDone"),cancelledDate:na("task-cancelled","taskCancelled"),priority:new Gr("task-priority","taskPriority",(r,e)=>Mn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),description:ra("task-description"),recurrenceRule:ra("task-recurring"),onCompletion:ra("task-onCompletion"),dependsOn:ra("task-dependsOn"),id:ra("task-id"),blockLink:ra("task-block-link")};function Xe(r,e){let t=document.createElement(r);return e.appendChild(t),t}var qn=class{static obsidianMarkdownRenderer(e,t,n,i){return A(this,null,function*(){!i||(yield Ik.MarkdownRenderer.renderMarkdown(e,t,n,i))})}constructor({textRenderer:e=qn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(e,t,n){return A(this,null,function*(){let i=Xe("li",this.parentUlElement);i.classList.add("task-list-item","plugin-tasks-list-item");let s=Xe("span",i);s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=Xe("input",i);return a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),e.taskLocation.hasKnownPath&&(a.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=e.toggleWithRecurrenceInUsersOrder();br({originalTask:e,newTasks:l})}),a.addEventListener("contextmenu",u=>{new lc(De.getInstance(),e).showAtPosition({x:u.clientX,y:u.clientY})}),a.setAttribute("title","Right-click for options")),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return A(this,null,function*(){let i=new fc,s=Nr.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=s.componentToString(e,this.queryLayoutOptions.shortMode,a);if(o){let u=Xe("span",t),l=Xe("span",u);if(yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l),i.addClassName(u,a),i.addDataAttribute(u,e,a),i.addDataAttribute(n,e,a),ee.allDateFields().includes(a)){let c=a;u.addEventListener("contextmenu",d=>{d.preventDefault(),d.stopPropagation(),new dc(c,e,Wn).showAtPosition({x:d.clientX,y:d.clientY})}),u.setAttribute("title",`Right-click to edit ${cc(c)}`)}}}for(let a of this.taskLayoutOptions.hiddenComponents)i.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&i.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return A(this,null,function*(){if(n==="description"){t=ve.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=Q();s.showTaskHiddenData&&(t+=`
\u{1F41B} ${i.lineNumber} . ${i.sectionStart} . ${i.sectionIndex} . '${i.originalMarkdown}'
'${i.path}' > '${i.precedingHeader}'
`),yield this.textRenderer(t,e,i.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let i=t.getElementsByClassName("tag");for(let s=0;s{function d(b,k,_){k&&b.createDiv().setText(f({signifier:_,date:k}))}function f({signifier:b,date:k}){return`${b} ${k.format(Z.dateFormat)} (${k.from(window.moment().startOf("day"))})`}let m=t.createDiv();m.addClasses(["tooltip","pop-up"]),e.recurrence&&m.createDiv().setText(`${i} ${e.recurrence.toText()}`),d(m,e.createdDate,a),d(m,e.startDate,s),d(m,e.scheduledDate,o),d(m,e.dueDate,u),d(m,e.cancelledDate,l),d(m,e.doneDate,c);let y=e.getLinkText({isFilenameUnique:n});y&&m.createDiv().setText(`\u{1F517} ${y}`),t.addEventListener("mouseleave",()=>{m.remove()})})}};var pc=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return A(this,null,function*(){var d;let n=new Fk.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(f=>{var b;let m=(b=f.textContent)==null?void 0:b.split(` -`);if(m===void 0)return!1;let y=null;for(let k=0;kLk.ViewPlugin.fromClass(Vh),Vh=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new Uk.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ee.fromLine({line:a.text,taskLocation:ht.fromUnknownPosition(new ut("")),fallbackDate:null});if(o===null)return!1;e.preventDefault();let u=o.toggleWithRecurrenceInUsersOrder(),l=u.map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});if(this.view.dispatch(c),u.length===1){let f=u[0].status.symbol!==" ";setTimeout(()=>{t.checked=f},1)}return!0}};var Tc=require("obsidian"),jk=require("obsidian");function qk(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. - -`);let s=new Us(" "),a=new $r(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);i+=`Explanation of the global query: +${t.explainStatement(" ")} +`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let e=new Fi(this.tasksFile,t),n;try{this.filters.forEach(u=>{n=u.statement,t=t.filter(l=>u.filterFunction(l,e))}),n=void 0;let{debugSettings:i}=ie(),s=i.ignoreSortInstructions?t:Wa.by(this.sorting,t,e),a=s.slice(0,this.limit),o=new Ua(this.grouping,a,e);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new Ms(o,s.length)}catch(i){let a=ks("Search failed",i);return n&&(a=gn.generateErrorMessage(n,a)),Ms.fromError(a)}}parseHideOptions(t){let e=t.match(this.hideOptionsRegexp);if(e!==null){let n=e[1].toLowerCase()==="hide";switch(e[2].toLowerCase()){case"tree":this._queryLayoutOptions.hideTree=n;break;case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;case"id":this._taskLayoutOptions.setVisibility("id",!n);break;case"depends on":this._taskLayoutOptions.setVisibility("dependsOn",!n);break;case"on completion":this._taskLayoutOptions.setVisibility("onCompletion",!n);break;default:this.setError("do not understand hide/show option",new li(t,t))}}}parseFilter(t,e){var i;let n=Fu(t);return n!=null?(n.filter?(n.filter.setStatement(e),this._filters.push(n.filter)):this.setError((i=n.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new li(t,t));return}let n=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(t){let e=rE(t);return e?(this._sorting.push(e),!0):!1}parseGroupBy(t){let e=nE(t);return e?(this._grouping.push(e),!0):!1}generateQueryId(t){let e="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:t},()=>e[Math.floor(Math.random()*e.length)]).join("")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var Li=class{constructor(t=Li.empty){this._source=t}static getInstance(){return Li.instance||(Li.instance=new Li),Li.instance}set(t){this._source=t}query(t=void 0){return new gn(this._source,t)}hasInstructions(){return this._source.trim()!==Li.empty}},Dr=Li;Dr.empty="";var sd=class{constructor({obsidianEvents:t}){this.logger=Kt.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var AE=require("obsidian");var RE=require("obsidian");var Ig=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function uE(r){let t=[],e=new Xe().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let i of r.registeredStatuses)e.includes(i.symbol)===n&&t.push(new Ig(i));return t}var lE=require("obsidian");var Fg="---",qa=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return Fg}isCheckedForTask(t){return!1}};function Wn(r,t){return F(this,null,function*(){yield Br({originalTask:r,newTasks:t})})}var Ui=class extends lE.Menu{constructor(e){super();this.taskSaver=e}addItemsForInstructions(e,n){for(let i of e)this.addItemForInstruction(n,i)}addItemForInstruction(e,n){n.instructionDisplayName()===Fg?this.addSeparator():this.addItem(i=>this.getMenuItemCallback(e,i,n))}getMenuItemCallback(e,n,i){n.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(e)).onClick(()=>F(this,null,function*(){let s=i.apply(e);(s.length!==1||!Object.is(s[0],e))&&(yield this.taskSaver(e,s))}))}};var ad=class extends Ui{constructor(t,e,n=Wn){super(n);let i=uE(t);this.addItemsForInstructions(i,e)}};var od=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Wi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(r){return typeof console!="undefined"&&console.warn(r)},getWeek:function(r){var t=new Date(r.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var ud={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(r){var t=r%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ld=ud;var $t=function(r,t){return t===void 0&&(t=2),("000"+r).slice(t*-1)},ur=function(r){return r===!0?1:0};function Lg(r,t){var e;return function(){var n=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return r.apply(n,i)},t)}}var cd=function(r){return r instanceof Array?r:[r]};function Gt(r,t,e){if(e===!0)return r.classList.add(t);r.classList.remove(t)}function We(r,t,e){var n=window.document.createElement(r);return t=t||"",e=e||"",n.className=t,e!==void 0&&(n.textContent=e),n}function Lu(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Ug(r,t){if(t(r))return r;if(r.parentNode)return Ug(r.parentNode,t)}function Uu(r,t){var e=We("div","numInputWrapper"),n=We("input","numInput "+r),i=We("span","arrowUp"),s=We("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?n.type="number":(n.type="text",n.pattern="\\d*"),t!==void 0)for(var a in t)n.setAttribute(a,t[a]);return e.appendChild(n),e.appendChild(i),e.appendChild(s),e}function lr(r){try{if(typeof r.composedPath=="function"){var t=r.composedPath();return t[0]}return r.target}catch(e){return r.target}}var Wg=function(){},Wu=function(r,t,e){return e.months[t?"shorthand":"longhand"][r]},cE={D:Wg,F:function(r,t,e){r.setMonth(e.months.longhand.indexOf(t))},G:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},H:function(r,t){r.setHours(parseFloat(t))},J:function(r,t){r.setDate(parseFloat(t))},K:function(r,t,e){r.setHours(r.getHours()%12+12*ur(new RegExp(e.amPM[1],"i").test(t)))},M:function(r,t,e){r.setMonth(e.months.shorthand.indexOf(t))},S:function(r,t){r.setSeconds(parseFloat(t))},U:function(r,t){return new Date(parseFloat(t)*1e3)},W:function(r,t,e){var n=parseInt(t),i=new Date(r.getFullYear(),0,2+(n-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(r,t){r.setFullYear(parseFloat(t))},Z:function(r,t){return new Date(t)},d:function(r,t){r.setDate(parseFloat(t))},h:function(r,t){r.setHours((r.getHours()>=12?12:0)+parseFloat(t))},i:function(r,t){r.setMinutes(parseFloat(t))},j:function(r,t){r.setDate(parseFloat(t))},l:Wg,m:function(r,t){r.setMonth(parseFloat(t)-1)},n:function(r,t){r.setMonth(parseFloat(t)-1)},s:function(r,t){r.setSeconds(parseFloat(t))},u:function(r,t){return new Date(parseFloat(t))},w:Wg,y:function(r,t){r.setFullYear(2e3+parseFloat(t))}},di={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ja={Z:function(r){return r.toISOString()},D:function(r,t,e){return t.weekdays.shorthand[ja.w(r,t,e)]},F:function(r,t,e){return Wu(ja.n(r,t,e)-1,!1,t)},G:function(r,t,e){return $t(ja.h(r,t,e))},H:function(r){return $t(r.getHours())},J:function(r,t){return t.ordinal!==void 0?r.getDate()+t.ordinal(r.getDate()):r.getDate()},K:function(r,t){return t.amPM[ur(r.getHours()>11)]},M:function(r,t){return Wu(r.getMonth(),!0,t)},S:function(r){return $t(r.getSeconds())},U:function(r){return r.getTime()/1e3},W:function(r,t,e){return e.getWeek(r)},Y:function(r){return $t(r.getFullYear(),4)},d:function(r){return $t(r.getDate())},h:function(r){return r.getHours()%12?r.getHours()%12:12},i:function(r){return $t(r.getMinutes())},j:function(r){return r.getDate()},l:function(r,t){return t.weekdays.longhand[r.getDay()]},m:function(r){return $t(r.getMonth()+1)},n:function(r){return r.getMonth()+1},s:function(r){return r.getSeconds()},u:function(r){return r.getTime()},w:function(r){return r.getDay()},y:function(r){return String(r.getFullYear()).substring(2)}};var qg=function(r){var t=r.config,e=t===void 0?Wi:t,n=r.l10n,i=n===void 0?ud:n,s=r.isMobile,a=s===void 0?!1:s;return function(o,u,l){var c=l||i;return e.formatDate!==void 0&&!a?e.formatDate(o,u,c):u.split("").map(function(d,f,m){return ja[d]&&m[f-1]!=="\\"?ja[d](o,c,e):d!=="\\"?d:""}).join("")}},dd=function(r){var t=r.config,e=t===void 0?Wi:t,n=r.l10n,i=n===void 0?ud:n;return function(s,a,o,u){if(!(s!==0&&!s)){var l=u||i,c,d=s;if(s instanceof Date)c=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)c=new Date(s);else if(typeof s=="string"){var f=a||(e||Wi).dateFormat,m=String(s).trim();if(m==="today")c=new Date,o=!0;else if(e&&e.parseDate)c=e.parseDate(s,f);else if(/Z$/.test(m)||/GMT$/.test(m))c=new Date(s);else{for(var b=void 0,T=[],_=0,x=0,O="";_Math.min(t,e)&&r=0?new Date:new Date(e.config.minDate.getTime()),k=pd(e.config);g.setHours(k.hours,k.minutes,k.seconds,g.getMilliseconds()),e.selectedDates=[g],e.latestSelectedDateObj=g}h!==void 0&&h.type!=="blur"&&Za(h);var A=e._input.value;d(),Jr(),e._input.value!==A&&e._debouncedChange()}function l(h,g){return h%12+12*ur(g===e.l10n.amPM[1])}function c(h){switch(h%24){case 0:case 12:return 12;default:return h%12}}function d(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var h=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,g=(parseInt(e.minuteElement.value,10)||0)%60,k=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(h=l(h,e.amPM.textContent));var A=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&cr(e.latestSelectedDateObj,e.config.minDate,!0)===0,q=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&cr(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var z=fd(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=fd(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),J=fd(h,g,k);if(J>he&&J=12)]),e.secondElement!==void 0&&(e.secondElement.value=$t(k)))}function b(h){var g=lr(h),k=parseInt(g.value)+(h.delta||0);(k/1e3>1||h.key==="Enter"&&!/[^\d]/.test(k.toString()))&&U(k)}function T(h,g,k,A){if(g instanceof Array)return g.forEach(function(q){return T(h,q,k,A)});if(h instanceof Array)return h.forEach(function(q){return T(q,g,k,A)});h.addEventListener(g,k,A),e._handlers.push({remove:function(){return h.removeEventListener(g,k,A)}})}function _(){ze("onChange")}function x(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(k){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+k+"]"),function(A){return T(A,"click",e[k])})}),e.isMobile){Gi();return}var h=Lg(Pt,50);if(e._debouncedChange=Lg(_,LL),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&T(e.daysContainer,"mouseover",function(k){e.config.mode==="range"&&Ne(lr(k))}),T(e._input,"keydown",je),e.calendarContainer!==void 0&&T(e.calendarContainer,"keydown",je),!e.config.inline&&!e.config.static&&T(window,"resize",h),window.ontouchstart!==void 0?T(window.document,"touchstart",P):T(window.document,"mousedown",P),T(window.document,"focus",P,{capture:!0}),e.config.clickOpens===!0&&(T(e._input,"focus",e.open),T(e._input,"click",e.open)),e.daysContainer!==void 0&&(T(e.monthNav,"click",Sd),T(e.monthNav,["keyup","increment"],b),T(e.daysContainer,"click",Or)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var g=function(k){return lr(k).select()};T(e.timeContainer,["increment"],u),T(e.timeContainer,"blur",u,{capture:!0}),T(e.timeContainer,"click",M),T([e.hourElement,e.minuteElement],["focus","click"],g),e.secondElement!==void 0&&T(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&T(e.amPM,"click",function(k){u(k)})}e.config.allowInput&&T(e._input,"blur",ve)}function O(h,g){var k=h!==void 0?e.parseDate(h):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate1),e.calendarContainer.appendChild(h);var q=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!q&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var z=We("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(z,e.element),z.appendChild(e.element),e.altInput&&z.appendChild(e.altInput),z.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function oe(h,g,k,A){var q=ue(g,!0),z=We("span",h,g.getDate().toString());return z.dateObj=g,z.$i=A,z.setAttribute("aria-label",e.formatDate(g,e.config.ariaDateFormat)),h.indexOf("hidden")===-1&&cr(g,e.now)===0&&(e.todayDateElem=z,z.classList.add("today"),z.setAttribute("aria-current","date")),q?(z.tabIndex=-1,vn(g)&&(z.classList.add("selected"),e.selectedDateElem=z,e.config.mode==="range"&&(Gt(z,"startRange",e.selectedDates[0]&&cr(g,e.selectedDates[0],!0)===0),Gt(z,"endRange",e.selectedDates[1]&&cr(g,e.selectedDates[1],!0)===0),h==="nextMonthDay"&&z.classList.add("inRange")))):z.classList.add("flatpickr-disabled"),e.config.mode==="range"&&wt(g)&&!vn(g)&&z.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&h!=="prevMonthDay"&&A%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend",""+e.config.getWeek(g)+""),ze("onDayCreate",z),z}function V(h){h.focus(),e.config.mode==="range"&&Ne(h)}function K(h){for(var g=h>0?0:e.config.showMonths-1,k=h>0?e.config.showMonths:-1,A=g;A!=k;A+=h)for(var q=e.daysContainer.children[A],z=h>0?0:q.children.length-1,he=h>0?q.children.length:-1,J=z;J!=he;J+=h){var we=q.children[J];if(we.className.indexOf("hidden")===-1&&ue(we.dateObj))return we}}function Se(h,g){for(var k=h.className.indexOf("Month")===-1?h.dateObj.getMonth():e.currentMonth,A=g>0?e.config.showMonths:-1,q=g>0?1:-1,z=k-e.currentMonth;z!=A;z+=q)for(var he=e.daysContainer.children[z],J=k-e.currentMonth===z?h.$i+g:g<0?he.children.length-1:0,we=he.children.length,te=J;te>=0&&te0?we:-1);te+=q){var ce=he.children[te];if(ce.className.indexOf("hidden")===-1&&ue(ce.dateObj)&&Math.abs(h.$i-te)>=Math.abs(g))return V(ce)}e.changeMonth(q),Pe(K(q),0)}function Pe(h,g){var k=s(),A=me(k||document.body),q=h!==void 0?h:A?k:e.selectedDateElem!==void 0&&me(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&me(e.todayDateElem)?e.todayDateElem:K(g>0?1:-1);q===void 0?e._input.focus():A?Se(q,g):V(q)}function Q(h,g){for(var k=(new Date(h,g,1).getDay()-e.l10n.firstDayOfWeek+7)%7,A=e.utils.getDaysInMonth((g-1+12)%12,h),q=e.utils.getDaysInMonth(g,h),z=window.document.createDocumentFragment(),he=e.config.showMonths>1,J=he?"prevMonthDay hidden":"prevMonthDay",we=he?"nextMonthDay hidden":"nextMonthDay",te=A+1-k,ce=0;te<=A;te++,ce++)z.appendChild(oe("flatpickr-day "+J,new Date(h,g-1,te),te,ce));for(te=1;te<=q;te++,ce++)z.appendChild(oe("flatpickr-day",new Date(h,g,te),te,ce));for(var He=q+1;He<=42-k&&(e.config.showMonths===1||ce%7!==0);He++,ce++)z.appendChild(oe("flatpickr-day "+we,new Date(h,g+1,He%q),He,ce));var Mr=We("div","dayContainer");return Mr.appendChild(z),Mr}function B(){if(e.daysContainer!==void 0){Lu(e.daysContainer),e.weekNumbers&&Lu(e.weekNumbers);for(var h=document.createDocumentFragment(),g=0;g1||e.config.monthSelectorType!=="dropdown")){var h=function(A){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&Ae.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var g=0;g<12;g++)if(!!h(g)){var k=We("option","flatpickr-monthDropdown-month");k.value=new Date(e.currentYear,g).getMonth().toString(),k.textContent=Wu(g,e.config.shorthandCurrentMonth,e.l10n),k.tabIndex=-1,e.currentMonth===g&&(k.selected=!0),e.monthsDropdownContainer.appendChild(k)}}}function Z(){var h=We("div","flatpickr-month"),g=window.document.createDocumentFragment(),k;e.config.showMonths>1||e.config.monthSelectorType==="static"?k=We("span","cur-month"):(e.monthsDropdownContainer=We("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),T(e.monthsDropdownContainer,"change",function(he){var J=lr(he),we=parseInt(J.value,10);e.changeMonth(we-e.currentMonth),ze("onMonthChange")}),C(),k=e.monthsDropdownContainer);var A=Uu("cur-year",{tabindex:"-1"}),q=A.getElementsByTagName("input")[0];q.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&q.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(q.setAttribute("max",e.config.maxDate.getFullYear().toString()),q.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var z=We("div","flatpickr-current-month");return z.appendChild(k),z.appendChild(A),g.appendChild(z),h.appendChild(g),{container:h,yearElement:q,monthElement:k}}function W(){Lu(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var h=e.config.showMonths;h--;){var g=Z();e.yearElements.push(g.yearElement),e.monthElements.push(g.monthElement),e.monthNav.appendChild(g.container)}e.monthNav.appendChild(e.nextMonthNav)}function ae(){return e.monthNav=We("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=We("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=We("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,W(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(h){e.__hidePrevMonthArrow!==h&&(Gt(e.prevMonthNav,"flatpickr-disabled",h),e.__hidePrevMonthArrow=h)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(h){e.__hideNextMonthArrow!==h&&(Gt(e.nextMonthNav,"flatpickr-disabled",h),e.__hideNextMonthArrow=h)}}),e.currentYearElement=e.yearElements[0],Fs(),e.monthNav}function p(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var h=pd(e.config);e.timeContainer=We("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var g=We("span","flatpickr-time-separator",":"),k=Uu("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=k.getElementsByTagName("input")[0];var A=Uu("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=A.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=$t(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?h.hours:c(h.hours)),e.minuteElement.value=$t(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():h.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(k),e.timeContainer.appendChild(g),e.timeContainer.appendChild(A),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var q=Uu("flatpickr-second");e.secondElement=q.getElementsByTagName("input")[0],e.secondElement.value=$t(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():h.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(We("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(q)}return e.config.time_24hr||(e.amPM=We("span","flatpickr-am-pm",e.l10n.amPM[ur((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function y(){e.weekdayContainer?Lu(e.weekdayContainer):e.weekdayContainer=We("div","flatpickr-weekdays");for(var h=e.config.showMonths;h--;){var g=We("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(g)}return v(),e.weekdayContainer}function v(){if(!!e.weekdayContainer){var h=e.l10n.firstDayOfWeek,g=mE(e.l10n.weekdays.shorthand);h>0&&h + `+g.join("")+` + + `}}function w(){e.calendarContainer.classList.add("hasWeeks");var h=We("div","flatpickr-weekwrapper");h.appendChild(We("span","flatpickr-weekday",e.l10n.weekAbbreviation));var g=We("div","flatpickr-weeks");return h.appendChild(g),{weekWrapper:h,weekNumbers:g}}function D(h,g){g===void 0&&(g=!0);var k=g?h:h-e.currentMonth;k<0&&e._hidePrevMonthArrow===!0||k>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=k,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,ze("onYearChange"),C()),B(),ze("onMonthChange"),Fs())}function R(h,g){if(h===void 0&&(h=!0),g===void 0&&(g=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,g===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var k=pd(e.config),A=k.hours,q=k.minutes,z=k.seconds;m(A,q,z)}e.redraw(),h&&ze("onChange")}function N(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),ze("onClose")}function L(){e.config!==void 0&&ze("onDestroy");for(var h=e._handlers.length;h--;)e._handlers[h].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var g=e.calendarContainer.parentNode;if(g.lastChild&&g.removeChild(g.lastChild),g.parentNode){for(;g.firstChild;)g.parentNode.insertBefore(g.firstChild,g);g.parentNode.removeChild(g)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(k){try{delete e[k]}catch(A){}})}function E(h){return e.calendarContainer.contains(h)}function P(h){if(e.isOpen&&!e.config.inline){var g=lr(h),k=E(g),A=g===e.input||g===e.altInput||e.element.contains(g)||h.path&&h.path.indexOf&&(~h.path.indexOf(e.input)||~h.path.indexOf(e.altInput)),q=!A&&!k&&!E(h.relatedTarget),z=!e.config.ignoredFocusElements.some(function(he){return he.contains(g)});q&&z&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&u(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function U(h){if(!(!h||e.config.minDate&&he.config.maxDate.getFullYear())){var g=h,k=e.currentYear!==g;e.currentYear=g||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),k&&(e.redraw(),ze("onYearChange"),C())}}function ue(h,g){var k;g===void 0&&(g=!0);var A=e.parseDate(h,void 0,g);if(e.config.minDate&&A&&cr(A,e.config.minDate,g!==void 0?g:!e.minDateHasTime)<0||e.config.maxDate&&A&&cr(A,e.config.maxDate,g!==void 0?g:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(A===void 0)return!1;for(var q=!!e.config.enable,z=(k=e.config.enable)!==null&&k!==void 0?k:e.config.disable,he=0,J=void 0;he=J.from.getTime()&&A.getTime()<=J.to.getTime())return q}return!q}function me(h){return e.daysContainer!==void 0?h.className.indexOf("hidden")===-1&&h.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(h):!1}function ve(h){var g=h.target===e._input,k=e._input.value.trimEnd()!==Ls();g&&k&&!(h.relatedTarget&&E(h.relatedTarget))&&e.setDate(e._input.value,!0,h.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function je(h){var g=lr(h),k=e.config.wrap?r.contains(g):g===e._input,A=e.config.allowInput,q=e.isOpen&&(!A||!k),z=e.config.inline&&k&&!A;if(h.keyCode===13&&k){if(A)return e.setDate(e._input.value,!0,g===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),g.blur();e.open()}else if(E(g)||q||z){var he=!!e.timeContainer&&e.timeContainer.contains(g);switch(h.keyCode){case 13:he?(h.preventDefault(),u(),Ps()):Or(h);break;case 27:h.preventDefault(),Ps();break;case 8:case 46:k&&!e.config.allowInput&&(h.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!k){h.preventDefault();var J=s();if(e.daysContainer!==void 0&&(A===!1||J&&me(J))){var we=h.keyCode===39?1:-1;h.ctrlKey?(h.stopPropagation(),D(we),Pe(K(1),0)):Pe(void 0,we)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:h.preventDefault();var te=h.keyCode===40?1:-1;e.daysContainer&&g.$i!==void 0||g===e.input||g===e.altInput?h.ctrlKey?(h.stopPropagation(),U(e.currentYear-te),Pe(K(1),0)):he||Pe(void 0,te*7):g===e.currentYearElement?U(e.currentYear-te):e.config.enableTime&&(!he&&e.hourElement&&e.hourElement.focus(),u(h),e._debouncedChange());break;case 9:if(he){var ce=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(kt){return kt}),He=ce.indexOf(g);if(He!==-1){var Mr=ce[He+(h.shiftKey?-1:1)];h.preventDefault(),(Mr||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(g)&&h.shiftKey&&(h.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&g===e.amPM)switch(h.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),Jr();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),Jr();break}(k||E(g))&&ze("onKeyDown",h)}function Ne(h,g){if(g===void 0&&(g="flatpickr-day"),!(e.selectedDates.length!==1||h&&(!h.classList.contains(g)||h.classList.contains("flatpickr-disabled")))){for(var k=h?h.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),A=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),q=Math.min(k,e.selectedDates[0].getTime()),z=Math.max(k,e.selectedDates[0].getTime()),he=!1,J=0,we=0,te=q;teq&&teJ)?J=te:te>A&&(!we||te ."+g));ce.forEach(function(He){var Mr=He.dateObj,kt=Mr.getTime(),Hi=J>0&&kt0&&kt>we;if(Hi){He.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(gi){He.classList.remove(gi)});return}else if(he&&!Hi)return;["startRange","inRange","endRange","notAllowed"].forEach(function(gi){He.classList.remove(gi)}),h!==void 0&&(h.classList.add(k<=e.selectedDates[0].getTime()?"startRange":"endRange"),Ak&&kt===A&&He.classList.add("endRange"),kt>=J&&(we===0||kt<=we)&&dE(kt,A,k)&&He.classList.add("inRange"))})}}function Pt(){e.isOpen&&!e.config.static&&!e.config.inline&&$i()}function Xr(h,g){if(g===void 0&&(g=e._positionElement),e.isMobile===!0){if(h){h.preventDefault();var k=lr(h);k&&k.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),ze("onOpen");return}else if(e._input.disabled||e.config.inline)return;var A=e.isOpen;e.isOpen=!0,A||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),ze("onOpen"),$i(g)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(h===void 0||!e.timeContainer.contains(h.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function dr(h){return function(g){var k=e.config["_"+h+"Date"]=e.parseDate(g,e.config.dateFormat),A=e.config["_"+(h==="min"?"max":"min")+"Date"];k!==void 0&&(e[h==="min"?"minDateHasTime":"maxDateHasTime"]=k.getHours()>0||k.getMinutes()>0||k.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(q){return ue(q)}),!e.selectedDates.length&&h==="min"&&f(k),Jr()),e.daysContainer&&(As(),k!==void 0?e.currentYearElement[h]=k.getFullYear().toString():e.currentYearElement.removeAttribute(h),e.currentYearElement.disabled=!!A&&k!==void 0&&A.getFullYear()===k.getFullYear())}}function X(){var h=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],g=Ht(Ht({},JSON.parse(JSON.stringify(r.dataset||{}))),t),k={};e.config.parseDate=g.parseDate,e.config.formatDate=g.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(ce){e.config._enable=_n(ce)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(ce){e.config._disable=_n(ce)}});var A=g.mode==="time";if(!g.dateFormat&&(g.enableTime||A)){var q=lt.defaultConfig.dateFormat||Wi.dateFormat;k.dateFormat=g.noCalendar||A?"H:i"+(g.enableSeconds?":S":""):q+" H:i"+(g.enableSeconds?":S":"")}if(g.altInput&&(g.enableTime||A)&&!g.altFormat){var z=lt.defaultConfig.altFormat||Wi.altFormat;k.altFormat=g.noCalendar||A?"h:i"+(g.enableSeconds?":S K":" K"):z+(" h:i"+(g.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:dr("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:dr("max")});var he=function(ce){return function(He){e.config[ce==="min"?"_minTime":"_maxTime"]=e.parseDate(He,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:he("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:he("max")}),g.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,k,g);for(var J=0;J-1?e.config[te]=cd(we[te]).map(a).concat(e.config[te]):typeof g[te]=="undefined"&&(e.config[te]=we[te])}g.altInputClass||(e.config.altInputClass=Nt().className+" "+e.config.altInputClass),ze("onParseConfig")}function Nt(){return e.config.wrap?r.querySelector("[data-input]"):r}function tt(){typeof e.config.locale!="object"&&typeof lt.l10ns[e.config.locale]=="undefined"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Ht(Ht({},lt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?lt.l10ns[e.config.locale]:void 0),di.D="("+e.l10n.weekdays.shorthand.join("|")+")",di.l="("+e.l10n.weekdays.longhand.join("|")+")",di.M="("+e.l10n.months.shorthand.join("|")+")",di.F="("+e.l10n.months.longhand.join("|")+")",di.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var h=Ht(Ht({},t),JSON.parse(JSON.stringify(r.dataset||{})));h.time_24hr===void 0&<.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=qg(e),e.parseDate=dd({config:e.config,l10n:e.l10n})}function $i(h){if(typeof e.config.position=="function")return void e.config.position(e,h);if(e.calendarContainer!==void 0){ze("onPreCalendarPosition");var g=h||e._positionElement,k=Array.prototype.reduce.call(e.calendarContainer.children,function(Vi,zi){return Vi+zi.offsetHeight},0),A=e.calendarContainer.offsetWidth,q=e.config.position.split(" "),z=q[0],he=q.length>1?q[1]:null,J=g.getBoundingClientRect(),we=window.innerHeight-J.bottom,te=z==="above"||z!=="below"&&wek,ce=window.pageYOffset+J.top+(te?-k-2:g.offsetHeight+2);if(Gt(e.calendarContainer,"arrowTop",!te),Gt(e.calendarContainer,"arrowBottom",te),!e.config.inline){var He=window.pageXOffset+J.left,Mr=!1,kt=!1;he==="center"?(He-=(A-J.width)/2,Mr=!0):he==="right"&&(He-=A-J.width,kt=!0),Gt(e.calendarContainer,"arrowLeft",!Mr&&!kt),Gt(e.calendarContainer,"arrowCenter",Mr),Gt(e.calendarContainer,"arrowRight",kt);var Hi=window.document.body.offsetWidth-(window.pageXOffset+J.right),gi=He+A>window.document.body.offsetWidth,Ja=Hi+A>window.document.body.offsetWidth;if(Gt(e.calendarContainer,"rightMost",gi),!e.config.static)if(e.calendarContainer.style.top=ce+"px",!gi)e.calendarContainer.style.left=He+"px",e.calendarContainer.style.right="auto";else if(!Ja)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Hi+"px";else{var eo=Zr();if(eo===void 0)return;var Od=window.document.body.offsetWidth,to=Math.max(0,Od/2-A/2),I=".flatpickr-calendar.centerMost:before",fe=".flatpickr-calendar.centerMost:after",en=eo.cssRules.length,Bi="{left:"+J.left+"px;right:auto;}";Gt(e.calendarContainer,"rightMost",!1),Gt(e.calendarContainer,"centerMost",!0),eo.insertRule(I+","+fe+Bi,en),e.calendarContainer.style.left=to+"px",e.calendarContainer.style.right="auto"}}}}function Zr(){for(var h=null,g=0;ge.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=A,e.config.mode==="single")e.selectedDates=[q];else if(e.config.mode==="multiple"){var he=vn(q);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push(q)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=q,e.selectedDates.push(q),cr(q,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(ce,He){return ce.getTime()-He.getTime()}));if(d(),z){var J=e.currentYear!==q.getFullYear();e.currentYear=q.getFullYear(),e.currentMonth=q.getMonth(),J&&(ze("onYearChange"),C()),ze("onMonthChange")}if(Fs(),B(),Jr(),!z&&e.config.mode!=="range"&&e.config.showMonths===1?V(A):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var we=e.config.mode==="single"&&!e.config.enableTime,te=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(we||te)&&Ps()}_()}}var mi={locale:[tt,v],showMonths:[W,o,y],minDate:[O],maxDate:[O],positionElement:[Xa],clickOpens:[function(){e.config.clickOpens===!0?(T(e._input,"focus",e.open),T(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ka(h,g){if(h!==null&&typeof h=="object"){Object.assign(e.config,h);for(var k in h)mi[k]!==void 0&&mi[k].forEach(function(A){return A()})}else e.config[h]=g,mi[h]!==void 0?mi[h].forEach(function(A){return A()}):od.indexOf(h)>-1&&(e.config[h]=cd(g));e.redraw(),Jr(!0)}function Qa(h,g){var k=[];if(h instanceof Array)k=h.map(function(A){return e.parseDate(A,g)});else if(h instanceof Date||typeof h=="number")k=[e.parseDate(h,g)];else if(typeof h=="string")switch(e.config.mode){case"single":case"time":k=[e.parseDate(h,g)];break;case"multiple":k=h.split(e.config.conjunction).map(function(A){return e.parseDate(A,g)});break;case"range":k=h.split(e.l10n.rangeSeparator).map(function(A){return e.parseDate(A,g)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(h)));e.selectedDates=e.config.allowInvalidPreload?k:k.filter(function(A){return A instanceof Date&&ue(A,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(A,q){return A.getTime()-q.getTime()})}function hi(h,g,k){if(g===void 0&&(g=!1),k===void 0&&(k=e.config.dateFormat),h!==0&&!h||h instanceof Array&&h.length===0)return e.clear(g);Qa(h,k),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),O(void 0,g),f(),e.selectedDates.length===0&&e.clear(!1),Jr(g),g&&ze("onChange")}function _n(h){return h.slice().map(function(g){return typeof g=="string"||typeof g=="number"||g instanceof Date?e.parseDate(g,void 0,!0):g&&typeof g=="object"&&g.from&&g.to?{from:e.parseDate(g.from,void 0),to:e.parseDate(g.to,void 0)}:g}).filter(function(g){return g})}function Hu(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var h=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);h&&Qa(h,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Ns(){if(e.input=Nt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=We(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Xa()}function Xa(){e._positionElement=e.config.positionElement||e._input}function Gi(){var h=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=We("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=h,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=h==="datetime-local"?"Y-m-d\\TH:i:S":h==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch(g){}T(e.mobileInput,"change",function(g){e.setDate(lr(g).value,!1,e.mobileFormatStr),ze("onChange"),ze("onClose")})}function xr(h){if(e.isOpen===!0)return e.close();e.open(h)}function ze(h,g){if(e.config!==void 0){var k=e.config[h];if(k!==void 0&&k.length>0)for(var A=0;k[A]&&A=0&&cr(h,e.selectedDates[1])<=0}function Fs(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(h,g){var k=new Date(e.currentYear,e.currentMonth,1);k.setMonth(e.currentMonth+g),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[g].textContent=Wu(k.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=k.getMonth().toString(),h.value=k.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYeare.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Ls(h){var g=h||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(k){return e.formatDate(k,g)}).filter(function(k,A,q){return e.config.mode!=="range"||e.config.enableTime||q.indexOf(k)===A}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function Jr(h){h===void 0&&(h=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ls(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ls(e.config.altFormat)),h!==!1&&ze("onValueUpdate")}function Sd(h){var g=lr(h),k=e.prevMonthNav.contains(g),A=e.nextMonthNav.contains(g);k||A?D(k?-1:1):e.yearElements.indexOf(g)>=0?g.select():g.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):g.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Za(h){h.preventDefault();var g=h.type==="keydown",k=lr(h),A=k;e.amPM!==void 0&&k===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ur(e.amPM.textContent===e.l10n.amPM[0])]);var q=parseFloat(A.getAttribute("min")),z=parseFloat(A.getAttribute("max")),he=parseFloat(A.getAttribute("step")),J=parseInt(A.value,10),we=h.delta||(g?h.which===38?1:-1:0),te=J+he*we;if(typeof A.value!="undefined"&&A.value.length===2){var ce=A===e.hourElement,He=A===e.minuteElement;tez&&(te=A===e.hourElement?te-z-ur(!e.amPM):q,He&&Y(void 0,1,e.hourElement)),e.amPM&&ce&&(he===1?te+J===23:Math.abs(te-J)>he)&&(e.amPM.textContent=e.l10n.amPM[ur(e.amPM.textContent===e.l10n.amPM[0])]),A.value=$t(te)}}return i(),e}function Ya(r,t){for(var e=Array.prototype.slice.call(r).filter(function(a){return a instanceof HTMLElement}),n=[],i=0;i!!(e!=null&&e.isValid()));return!r.isDone&&t}function $a(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function jg(r,t,e,n){let i=r[t];return TE(i,r,t,e,n)}function yE(r,t,e,n){let i=window.moment();return TE(i,r,t,e,n)}function bE(r,t,e,n){return _E(r,t,null)}function TE(r,t,e,n,i){let s=new Ct(r).postpone(n,i);return _E(t,e,s)}function _E(r,t,e){let n=Ut.removeInferredStatusIfNeeded(r,[new de(Ee(ne({},r),{[t]:e}))])[0];return{postponedDate:e,postponedTask:n}}function vE(r,t){if(r){let e=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${t} changed to ${e}`}else return`Task's ${t} removed`}function wE(r,t,e){return`\u2139\uFE0F ${Yg(r,t,e)} (right-click for more options)`}function Yg(r,t,e){let n=$a(r),i=r[n];return Ga(n,i,t,e)}function kE(r,t,e){let n=$a(r),i=window.moment().startOf("day");return Ga(n,i,t,e)}function EE(r,t,e){let n=$a(r);return $g(n,r)}function $g(r,t){return r==="scheduledDate"&&t.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${md(r)}`}function WL(r){return ga(r.replace("Date",""))}function md(r){return r.replace("Date"," date")}function Ga(r,t,e,n){let s=new Ct(t).postpone(n,e).format("ddd Do MMM"),a=e!=1?e:"a";if(t.isSameOrBefore(window.moment(),"day")){let u=WL(r);return(e>=0?`${u} in ${a} ${n}, on ${s}`:`${u} ${-a} ${n} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=md(r);return e>=0?`Postpone ${o} by ${a} ${n}, to ${s}`:`Backdate ${o} by ${-a} ${n}, to ${s}`}var qi=class{constructor(t,e,n){this.newDate=e,this.dateFieldToEdit=t,this.displayName=n!=null?n:`Set Date: ${this.newDate.toDateString()}`}apply(t){return this.isCheckedForTask(t)?[t]:[new de(Ee(ne({},t),{[this.dateFieldToEdit]:window.moment(this.newDate)}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){var e;return((e=t[this.dateFieldToEdit])==null?void 0:e.isSame(window.moment(this.newDate)))||!1}},yn=class extends qi{constructor(t,e,n,i){var u;let s=(u=e[t])!=null?u:window.moment(),a=Ga(t,s,n,i),o=new Ct(window.moment(s)).postpone(i,n).toDate();super(t,o,a)}},qu=class{constructor(t,e){this.dateFieldToEdit=t,this.displayName=$g(t,e)}apply(t){let e=this.dateFieldToEdit==="scheduledDate"&&t.scheduledDateIsInferred;return t[this.dateFieldToEdit]===null||e?[t]:[new de(Ee(ne({},t),{[this.dateFieldToEdit]:null}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){return!1}};function DE(r,t){return OE(t,r,1)}function SE(r,t){return OE(t,r,-1)}function OE(r,t,e){let n=window.moment().startOf("day"),i=n.toDate(),s=new Ct(n.clone());return[new qi(t,i,Ga(t,n,0,"days")),new qi(t,s.postpone("day",e).toDate(),Ga(t,n,e,"day")),new qa,new yn(t,r,e*2,"days"),new yn(t,r,e*3,"days"),new yn(t,r,e*4,"days"),new yn(t,r,e*5,"days"),new yn(t,r,e*6,"days"),new qa,new yn(t,r,e,"week"),new yn(t,r,e*2,"weeks"),new yn(t,r,e*3,"weeks"),new yn(t,r,e,"month"),new qa,new qu(t,r)]}function ME(r,t,e,n){let i=t[e];hE(r,{defaultDate:i?i.format("YYYY-MM-DD"):new Date,disableMobile:!0,enableTime:!1,dateFormat:"Y-m-d",locale:{firstDayOfWeek:1},onClose:(a,o,u)=>F(this,null,function*(){if(a.length>0){let l=a[0],c=new qi(e,l).apply(t);yield n(t,c)}u.destroy()}),onReady:(a,o,u)=>{let l=document.createElement("div");l.style.display="flex",l.style.justifyContent="space-between",l.style.marginTop="10px",xE(l,u,t,n,"Clear",()=>new qu(e,t).apply(t)),xE(l,u,t,n,"Today",()=>{let d=new Date;return new qi(e,d).apply(t)}),u.calendarContainer.appendChild(l)}}).open()}function xE(r,t,e,n,i,s){let a=document.createElement("button");a.type="button",a.textContent=i,a.classList.add("flatpickr-button"),a.addEventListener("click",()=>F(this,null,function*(){let o=s();yield n(e,o),t.destroy()})),r.appendChild(a)}function CE(r){return["startDate","scheduledDate","dueDate"].includes(r)}var hd=class extends Ui{constructor(t,e,n=Wn){super(n);let i=CE(t)?DE(t,e):SE(t,e);this.addItemsForInstructions(i,e)}};var gd=class{constructor(){this.data=qL}addDataAttribute(t,e,n){this.data[n].addDataAttribute(t,e,n)}addClassName(t,e){let n=this.data[e].className;t.classList.add(n)}},Gg=class{constructor(t,e,n){if(t==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=t,this.attributeName=e,this.attributeValueCalculator=n}addDataAttribute(t,e,n){if(this.attributeName===Gg.noAttributeName)return;let i=this.attributeValueCalculator(n,e);i!==""&&(t.dataset[this.attributeName]=i)}},bn=Gg;bn.noAttributeName="",bn.noAttributeValueCalculator=()=>"",bn.dateAttributeCalculator=(t,e)=>{let i="far";function s(o){let l=window.moment().startOf("day").diff(o,"days");if(isNaN(l))return null;if(l===0)return"today";let c="";return l>0?c+="past-":l<0&&(c+="future-"),Math.abs(l)<=7?c+=Math.abs(l).toString()+"d":c+=i,c}let a=e[t];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function Ha(r){return new bn(r,bn.noAttributeName,bn.noAttributeValueCalculator)}function Ba(r,t){return new bn(r,t,bn.dateAttributeCalculator)}var qL={createdDate:Ba("task-created","taskCreated"),dueDate:Ba("task-due","taskDue"),startDate:Ba("task-start","taskStart"),scheduledDate:Ba("task-scheduled","taskScheduled"),doneDate:Ba("task-done","taskDone"),cancelledDate:Ba("task-cancelled","taskCancelled"),priority:new bn("task-priority","taskPriority",(r,t)=>Tr.priorityNameUsingNormal(t.priority).toLocaleLowerCase()),description:Ha("task-description"),recurrenceRule:Ha("task-recurring"),onCompletion:Ha("task-onCompletion"),dependsOn:Ha("task-dependsOn"),id:Ha("task-id"),blockLink:Ha("task-block-link")};function ct(r,t){let e=document.createElement(r);return t.appendChild(e),e}var fi=class{static obsidianMarkdownRenderer(t,e,n,i){return F(this,null,function*(){!i||(yield RE.MarkdownRenderer.renderMarkdown(t,e,n,i))})}constructor({textRenderer:t=fi.obsidianMarkdownRenderer,obsidianComponent:e,parentUlElement:n,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=t,this.obsidianComponent=e,this.parentUlElement=n,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(t,e,n){return F(this,null,function*(){let i=ct("li",this.parentUlElement);i.classList.add("task-list-item","plugin-tasks-list-item");let s=ct("span",i);s.classList.add("tasks-list-text"),yield this.taskToHtml(t,s,i);let a=ct("input",i);return a.classList.add("task-list-item-checkbox"),a.type="checkbox",t.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),t.taskLocation.hasKnownPath&&(a.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=t.toggleWithRecurrenceInUsersOrder();Br({originalTask:t,newTasks:l})}),a.addEventListener("contextmenu",u=>{new ad($e.getInstance(),t).showAtPosition({x:u.clientX,y:u.clientY})}),a.setAttribute("title","Right-click for options")),i.prepend(a),i.setAttribute("data-task",t.status.symbol.trim()),i.setAttribute("data-line",e.toString()),i.setAttribute("data-task-status-name",t.status.name),i.setAttribute("data-task-status-type",t.status.type),a.setAttribute("data-line",e.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(t,s,n),i})}taskToHtml(t,e,n){return F(this,null,function*(){let i=new gd,s=cn.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=s.componentToString(t,this.queryLayoutOptions.shortMode,a);if(o){let u=ct("span",e),l=ct("span",u);if(yield this.renderComponentText(l,o,a,t),this.addInternalClasses(a,l),i.addClassName(u,a),i.addDataAttribute(u,t,a),i.addDataAttribute(n,t,a),de.allDateFields().includes(a)){let c=a;u.addEventListener("click",d=>{d.preventDefault(),d.stopPropagation(),ME(u,t,c,Wn)}),u.addEventListener("contextmenu",d=>{d.preventDefault(),d.stopPropagation(),new hd(c,t,Wn).showAtPosition({x:d.clientX,y:d.clientY})}),u.setAttribute("title",`Click to edit ${md(c)}, Right-click for more options`)}}}for(let a of this.taskLayoutOptions.hiddenComponents)i.addDataAttribute(n,t,a);n.dataset.taskPriority===void 0&&i.addDataAttribute(n,t,"priority")})}renderComponentText(t,e,n,i){return F(this,null,function*(){if(n==="description"){e=Ae.getInstance().removeAsWordFromDependingOnSettings(e);let{debugSettings:s}=ie();s.showTaskHiddenData&&(e+=`
\u{1F41B} ${i.lineNumber} . ${i.sectionStart} . ${i.sectionIndex} . '${i.originalMarkdown}'
'${i.path}' > '${i.precedingHeader}'
`),yield this.textRenderer(e,t,i.path,this.obsidianComponent);let a=t.querySelector("blockquote"),o=a!=null?a:t,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}t.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),t.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else t.innerHTML=e})}addInternalClasses(t,e){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(t==="description"){let i=e.getElementsByClassName("tag");for(let s=0;s{function d(T,_,x){_&&T.createDiv().setText(f({signifier:x,date:_}))}function f({signifier:T,date:_}){return`${T} ${_.format(le.dateFormat)} (${_.from(window.moment().startOf("day"))})`}let m=e.createDiv();m.addClasses(["tooltip","pop-up"]),t.recurrence&&m.createDiv().setText(`${i} ${t.recurrence.toText()}`),d(m,t.createdDate,a),d(m,t.startDate,s),d(m,t.scheduledDate,o),d(m,t.dueDate,u),d(m,t.cancelledDate,l),d(m,t.doneDate,c);let b=t.getLinkText({isFilenameUnique:n});b&&m.createDiv().setText(`\u{1F517} ${b}`),e.addEventListener("mouseleave",()=>{m.remove()})})}};var yd=class{constructor({plugin:t}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);t.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(t,e){return F(this,null,function*(){var d;let n=new AE.MarkdownRenderChild(t);e.addChild(n);let i=t.findAll(".task-list-item").filter(f=>{var T;let m=(T=f.textContent)==null?void 0:T.split(` +`);if(m===void 0)return!1;let b=null;for(let _=0;_PE.ViewPlugin.fromClass(Hg),Hg=class{constructor(t){this.view=t,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(t){let{target:e}=t;if(!e||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return!1;let n=e.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new NE.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(e),a=i.doc.lineAt(s),o=de.fromLine({line:a.text,taskLocation:Rt.fromUnknownPosition(new Et("")),fallbackDate:null});if(o===null)return!1;t.preventDefault();let u=o.toggleWithRecurrenceInUsersOrder(),l=u.map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});if(this.view.dispatch(c),u.length===1){let f=u[0].status.symbol!==" ";setTimeout(()=>{e.checked=f},1)}return!0}};var wd=require("obsidian"),UE=require("obsidian");function FE(r,t,e,n=void 0){let i="";t.isEmpty()||(i+=`Only tasks containing the global filter '${t.get()}'. + +`);let s=new Da(" "),a=new gn(r,n);if(!a.ignoreGlobalQuery&&e.hasInstructions()){let o=e.query(n);i+=`Explanation of the global query: ${s.explainQuery(o)} `}return i+=`Explanation of this Tasks code block query: -${s.explainQuery(a)}`,i}function Ho(r,e,t){let n=new $r(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function Vo(r,e,t){e&&r.push(tL(t))}function tL(r){return`tasks-layout-hide-${r}`}var mc=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new ri}getHiddenClasses(){let e=[],t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of t)Vo(e,n,i);return this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode"),e}};var hc=class{constructor(e){e?this.taskLayoutOptions=e:this.taskLayoutOptions=new en}generateHiddenClasses(){let e=[];return this.taskLayoutOptions.toggleableComponents.forEach(t=>{Vo(e,!this.taskLayoutOptions.isShown(t),t)}),Vo(e,!this.taskLayoutOptions.areTagsShown(),"tags"),e}};var zo=class{constructor(e){this.label=e,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let e=performance.getEntriesByName(this.label),t=e[e.length-1];t?console.log(this.label+":",t.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:e}=Q();return e.recordTimings}};var zh=require("obsidian");var di=class extends ci{constructor(e,t,n=Wn){super(n);let i=(l,c,d,f,m,y)=>{var R;let b=!1,k=ea(t);if(k){let{postponedDate:S}=y(t,k,d,f);(R=t[k])!=null&&R.isSame(S,"day")&&(b=!0)}let _=m(t,f,d);c.setChecked(b).setTitle(_).onClick(()=>di.postponeOnClickCallback(l,t,f,d,y,n))},s=Rk,a=kk;this.addItem(l=>i(e,l,"days",0,s,a)),this.addItem(l=>i(e,l,"day",1,s,a)),this.addSeparator();let o=Gh,u=jh;this.addItem(l=>i(e,l,"days",2,o,u)),this.addItem(l=>i(e,l,"days",3,o,u)),this.addItem(l=>i(e,l,"days",4,o,u)),this.addItem(l=>i(e,l,"days",5,o,u)),this.addItem(l=>i(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"week",1,o,u)),this.addItem(l=>i(e,l,"weeks",2,o,u)),this.addItem(l=>i(e,l,"weeks",3,o,u)),this.addItem(l=>i(e,l,"month",1,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"days",2,Mk,Ek))}static postponeOnClickCallback(o,u,l,c){return A(this,arguments,function*(e,t,n,i,s=jh,a=Wn){var y;let d=ea(t);if(d===null){let b="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new zh.Notice(b,1e4)}let{postponedDate:f,postponedTask:m}=s(t,d,i,n);(y=t[d])!=null&&y.isSame(f,"day")||(yield a(t,m),di.postponeSuccessCallback(e,d,f))})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let i=Dk(n,t);new zh.Notice(i,2e3)}};function $k(r){let e=r.parent;for(;e!==null&&!(e instanceof ee);)e=e.parent;return e}var gc=class{constructor(e,t,n,i,s,a=qn.obsidianMarkdownRenderer){switch(this.source=t,this.tasksFile=n,this.renderMarkdown=i,this.obsidianComponent=s,this.textRenderer=a,e){case"block-language-tasks":this.query=Ho(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break;default:this.query=Ho(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break}}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}render(e,t,n,i){return A(this,null,function*(){e==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,e,n,i):this.query.error!==void 0?this.renderErrorMessage(n,this.query.error):this.renderLoadingMessage(n)})}renderQuerySearchResults(e,t,n,i){return A(this,null,function*(){let s=this.explainAndPerformSearch(t,e,n);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(n,s.searchErrorMessage);return}yield this.renderSearchResults(s,n,i)})}explainAndPerformSearch(e,t,n){let i=new zo(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${e}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(n);let s=this.query.applyQueryToTasks(t);return i.finish(),s}renderSearchResults(e,t,n){return A(this,null,function*(){let i=new zo(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(e.taskGroups,t,n);let s=e.totalTasksCount;this.addTaskCount(t,e),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(e,t){e.createDiv().innerHTML=`
Tasks query: ${t.replace(/\n/g,"
")}
`}renderLoadingMessage(e){e.setText("Loading Tasks ...")}createExplanation(e){let t=qk(this.source,ve.getInstance(),tr.getInstance(),this.tasksFile),n=Xe("pre",e);n.classList.add("plugin-tasks-query-explanation"),n.setText(t),e.appendChild(n)}addAllTaskGroups(e,t,n){return A(this,null,function*(){for(let i of e.groups){yield this.addGroupHeadings(t,i.groupHeadings);let s=new Set;yield this.createTaskList(i.tasks,t,n,s)}})}createTaskList(e,t,n,i){return A(this,null,function*(){let s=Xe("ul",t);s.classList.add("contains-task-list","plugin-tasks-query-result");let a=new hc(this.query.taskLayoutOptions);s.classList.add(...a.generateHiddenClasses());let o=new mc(this.query.queryLayoutOptions);s.classList.add(...o.getHiddenClasses());let u=this.getGroupingAttribute();u&&u.length>0&&(s.dataset.taskGroupBy=u);let l=new qn({textRenderer:this.textRenderer,obsidianComponent:this.obsidianComponent,parentUlElement:s,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[c,d]of e.entries())this.query.queryLayoutOptions.hideTree?d instanceof ee&&(yield this.addTask(s,l,d,c,n)):yield this.addTaskOrListItemAndChildren(s,l,d,c,n,e,i);t.appendChild(s)})}willBeRenderedLater(e,t,n){let i=$k(e);return i?!!(!t.has(i)&&n.includes(i)):!1}alreadyRendered(e,t){return t.has(e)}addTaskOrListItemAndChildren(e,t,n,i,s,a,o){return A(this,null,function*(){if(this.alreadyRendered(n,o)||this.willBeRenderedLater(n,o,a))return;let u=yield this.addTaskOrListItem(e,t,n,i,s);o.add(n),n.children.length>0&&(yield this.createTaskList(n.children,u,s,o),n.children.forEach(l=>{o.add(l)}))})}addTaskOrListItem(e,t,n,i,s){return A(this,null,function*(){return n instanceof ee?yield this.addTask(e,t,n,i,s):yield this.addListItem(e,n)})}addListItem(e,t){return A(this,null,function*(){var s,a;let n=Xe("li",e),i=Xe("span",n);return yield this.textRenderer(t.description,i,(a=(s=$k(t))==null?void 0:s.path)!=null?a:"",this.obsidianComponent),n})}addTask(e,t,n,i,s){return A(this,null,function*(){let a=this.isFilenameUnique({task:n},s.allMarkdownFiles),o=yield t.renderTaskLine(n,i,a);o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let l=Xe("span",o);l.classList.add("task-extras"),this.query.queryLayoutOptions.hideUrgency||this.addUrgency(l,n);let c=this.query.queryLayoutOptions.shortMode;return this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(l,n,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(l,n,s),!this.query.queryLayoutOptions.hidePostponeButton&&wk(n)&&this.addPostponeButton(l,n,c),e.appendChild(o),o})}addEditButton(e,t,n){let i=Xe("a",e);i.classList.add("tasks-edit"),i.title="Edit task",i.href="#",i.addEventListener("click",s=>n.editTaskPencilClickHandler(s,t,n.allTasks))}addUrgency(e,t){let n=new Intl.NumberFormat().format(t.urgency);e.createSpan({text:n,cls:"tasks-urgency"})}addGroupHeadings(e,t){return A(this,null,function*(){for(let n of t)yield this.addGroupHeading(e,n)})}addGroupHeading(e,t){return A(this,null,function*(){let n="h6";t.nestingLevel===0?n="h4":t.nestingLevel===1&&(n="h5");let i=Xe(n,e);i.classList.add("tasks-group-heading"),this.obsidianComponent!==null&&(yield this.renderMarkdown(t.displayName,i,this.tasksFile.path,this.obsidianComponent))})}addBacklinks(e,t,n,i,s){var l;let a=Xe("span",e);a.classList.add("tasks-backlink"),n||a.append(" (");let o=Xe("a",a);o.rel="noopener",o.target="_blank",o.classList.add("internal-link"),n&&o.classList.add("internal-link-short-mode");let u;n?u=" \u{1F517}":u=(l=t.getLinkText({isFilenameUnique:i}))!=null?l:"",o.text=u,o.addEventListener("click",c=>A(this,null,function*(){yield s.backlinksClickHandler(c,t)})),o.addEventListener("mousedown",c=>A(this,null,function*(){yield s.backlinksMousedownHandler(c,t)})),n||a.append(")")}addPostponeButton(e,t,n){let s="day",a=xk(t,1,s),o=Xe("a",e);o.classList.add("tasks-postpone"),n&&o.classList.add("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),di.postponeOnClickCallback(o,t,1,s)}),o.addEventListener("contextmenu",u=>A(this,null,function*(){u.preventDefault(),u.stopPropagation(),new di(o,t).showAtPosition({x:u.clientX,y:u.clientY})}))}addTaskCount(e,t){if(!this.query.queryLayoutOptions.hideTaskCount){let n=Xe("div",e);n.classList.add("task-count"),n.textContent=t.totalTasksCountDisplayText()}}isFilenameUnique({task:e},t){let n=e.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return t.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let e=[];for(let t of this.query.grouping)e.push(t.property);return e.join(",")}};var yc=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.plugin=e,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return A(this,null,function*(){let i=new Kh({app:this.app,plugin:this.plugin,events:this.events,container:t,source:e,tasksFile:new ut(n.sourcePath)});n.addChild(i),i.load()})}},Kh=class extends Tc.MarkdownRenderChild{constructor({app:t,plugin:n,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new gc(this.containerEl.className,a,o,Tc.MarkdownRenderer.renderMarkdown,this),this.app=t,this.plugin=n,this.events=i}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=Ho(this.queryResultsRenderer.source,tr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return A(this,arguments,function*({tasks:t,state:n}){var a;let s=Xe("div",this.containerEl);yield this.queryResultsRenderer.render(n,t,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:nL,backlinksMousedownHandler:iL,editTaskPencilClickHandler:rL}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function rL(r,e,t){r.preventDefault();let n=s=>A(this,null,function*(){yield br({originalTask:e,newTasks:_t.removeInferredStatusIfNeeded(e,s)})});new ti({app,task:e,onSubmit:n,allTasks:t}).open()}function nL(r,e){return A(this,null,function*(){let t=yield fh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf(jk.Keymap.isModEvent(r));r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}})}function iL(r,e){return A(this,null,function*(){if(r.button===1){let t=yield fh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf("tab");r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}}})}var le=require("obsidian");var bc=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} -`,this._markdown+=`${t} -`}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t} -`}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t} -`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function Gk(r,e){return r.findIndex(t=>t.symbol===e)}function $n(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function sL(r,e){let t=re.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${$n(r.symbol)} is ${$n(t)}: you may wish to review this type.`))}function aL(r,e,t){let n=Gk(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${$n(e.nextStatusSymbol)} is unknown: create a status with symbol ${$n(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${$n(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function oL(r,e,t){let n=[];return e.symbol===re.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):Gk(r,e.symbol)!=t?(n.push(`Duplicate symbol '${$n(e.symbol)}': this status will be ignored.`),n):(sL(e,n),aL(r,e,n),n)}function Yk(r){let e=new bc(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Le.allStatuses(r);return t.forEach((n,i)=>{e.addRow([$n(n.symbol),$n(n.nextStatusSymbol),n.name,$n(n.type),oL(t,n,i).join("
")])}),e.markdown}function Bk(r,e,t,n){let s=Yk(r),a=e.mermaidDiagram(!0);return`# ${t} +${s.explainQuery(a)}`,i}function ju(r,t,e){let n=new gn(r,e);return n.ignoreGlobalQuery?n:t.query(e).append(n)}function Yu(r,t,e){t&&r.push(jL(e))}function jL(r){return`tasks-layout-hide-${r}`}var bd=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Ci}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of e)Yu(t,n,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};var Td=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Mn}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{Yu(t,!this.taskLayoutOptions.isShown(e),e)}),Yu(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};var $u=class{constructor(t){this.label=t,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let t=performance.getEntriesByName(this.label),e=t[t.length-1];e?console.log(this.label+":",e.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:t}=ie();return t.recordTimings}};var Bg=require("obsidian");var ji=class extends Ui{constructor(t,e,n=Wn){super(n);let i=(l,c,d,f,m,b)=>{var O;let T=!1,_=$a(e);if(_){let{postponedDate:M}=b(e,_,d,f);(O=e[_])!=null&&O.isSame(M,"day")&&(T=!0)}let x=m(e,f,d);c.setChecked(T).setTitle(x).onClick(()=>ji.postponeOnClickCallback(l,e,f,d,b,n))},s=kE,a=yE;this.addItem(l=>i(t,l,"days",0,s,a)),this.addItem(l=>i(t,l,"day",1,s,a)),this.addSeparator();let o=Yg,u=jg;this.addItem(l=>i(t,l,"days",2,o,u)),this.addItem(l=>i(t,l,"days",3,o,u)),this.addItem(l=>i(t,l,"days",4,o,u)),this.addItem(l=>i(t,l,"days",5,o,u)),this.addItem(l=>i(t,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>i(t,l,"week",1,o,u)),this.addItem(l=>i(t,l,"weeks",2,o,u)),this.addItem(l=>i(t,l,"weeks",3,o,u)),this.addItem(l=>i(t,l,"month",1,o,u)),this.addSeparator(),this.addItem(l=>i(t,l,"days",2,EE,bE))}static postponeOnClickCallback(o,u,l,c){return F(this,arguments,function*(t,e,n,i,s=jg,a=Wn){var b;let d=$a(e);if(d===null){let T="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new Bg.Notice(T,1e4)}let{postponedDate:f,postponedTask:m}=s(e,d,i,n);(b=e[d])!=null&&b.isSame(f,"day")||(yield a(e,m),ji.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,n){t.style.pointerEvents="none";let i=vE(n,e);new Bg.Notice(i,2e3)}};function LE(r){let t=r.parent;for(;t!==null&&!(t instanceof de);)t=t.parent;return t}var _d=class{constructor(t,e,n,i,s,a=fi.obsidianMarkdownRenderer){switch(this.source=e,this.tasksFile=n,this.renderMarkdown=i,this.obsidianComponent=s,this.textRenderer=a,t){case"block-language-tasks":this.query=ju(this.source,Dr.getInstance(),this.tasksFile),this.queryType="tasks";break;default:this.query=ju(this.source,Dr.getInstance(),this.tasksFile),this.queryType="tasks";break}}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}render(t,e,n,i){return F(this,null,function*(){t==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(e,t,n,i):this.query.error!==void 0?this.renderErrorMessage(n,this.query.error):this.renderLoadingMessage(n)})}renderQuerySearchResults(t,e,n,i){return F(this,null,function*(){let s=this.explainAndPerformSearch(e,t,n);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(n,s.searchErrorMessage);return}yield this.renderSearchResults(s,n,i)})}explainAndPerformSearch(t,e,n){let i=new $u(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${t}; searching ${e.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(n);let s=this.query.applyQueryToTasks(e);return i.finish(),s}renderSearchResults(t,e,n){return F(this,null,function*(){let i=new $u(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(t.taskGroups,e,n);let s=t.totalTasksCount;this.addTaskCount(e,t),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(t,e){t.createDiv().innerHTML=`
Tasks query: ${e.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let e=FE(this.source,Ae.getInstance(),Dr.getInstance(),this.tasksFile),n=ct("pre",t);n.classList.add("plugin-tasks-query-explanation"),n.setText(e),t.appendChild(n)}addAllTaskGroups(t,e,n){return F(this,null,function*(){for(let i of t.groups){yield this.addGroupHeadings(e,i.groupHeadings);let s=new Set;yield this.createTaskList(i.tasks,e,n,s)}})}createTaskList(t,e,n,i){return F(this,null,function*(){let s=ct("ul",e);s.classList.add("contains-task-list","plugin-tasks-query-result");let a=new Td(this.query.taskLayoutOptions);s.classList.add(...a.generateHiddenClasses());let o=new bd(this.query.queryLayoutOptions);s.classList.add(...o.getHiddenClasses());let u=this.getGroupingAttribute();u&&u.length>0&&(s.dataset.taskGroupBy=u);let l=new fi({textRenderer:this.textRenderer,obsidianComponent:this.obsidianComponent,parentUlElement:s,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[c,d]of t.entries())this.query.queryLayoutOptions.hideTree?d instanceof de&&(yield this.addTask(s,l,d,c,n)):yield this.addTaskOrListItemAndChildren(s,l,d,c,n,t,i);e.appendChild(s)})}willBeRenderedLater(t,e,n){let i=LE(t);return i?!!(!e.has(i)&&n.includes(i)):!1}alreadyRendered(t,e){return e.has(t)}addTaskOrListItemAndChildren(t,e,n,i,s,a,o){return F(this,null,function*(){if(this.alreadyRendered(n,o)||this.willBeRenderedLater(n,o,a))return;let u=yield this.addTaskOrListItem(t,e,n,i,s);o.add(n),n.children.length>0&&(yield this.createTaskList(n.children,u,s,o),n.children.forEach(l=>{o.add(l)}))})}addTaskOrListItem(t,e,n,i,s){return F(this,null,function*(){return n instanceof de?yield this.addTask(t,e,n,i,s):yield this.addListItem(t,n)})}addListItem(t,e){return F(this,null,function*(){var s,a;let n=ct("li",t),i=ct("span",n);return yield this.textRenderer(e.description,i,(a=(s=LE(e))==null?void 0:s.path)!=null?a:"",this.obsidianComponent),n})}addTask(t,e,n,i,s){return F(this,null,function*(){let a=this.isFilenameUnique({task:n},s.allMarkdownFiles),o=yield e.renderTaskLine(n,i,a);o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let l=ct("span",o);l.classList.add("task-extras"),this.query.queryLayoutOptions.hideUrgency||this.addUrgency(l,n);let c=this.query.queryLayoutOptions.shortMode;return this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(l,n,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(l,n,s),!this.query.queryLayoutOptions.hidePostponeButton&&gE(n)&&this.addPostponeButton(l,n,c),t.appendChild(o),o})}addEditButton(t,e,n){let i=ct("a",t);i.classList.add("tasks-edit"),i.title="Edit task",i.href="#",i.addEventListener("click",s=>n.editTaskPencilClickHandler(s,e,n.allTasks))}addUrgency(t,e){let n=new Intl.NumberFormat().format(e.urgency),i=ct("span",t);i.textContent=n,i.classList.add("tasks-urgency")}addGroupHeadings(t,e){return F(this,null,function*(){for(let n of e)yield this.addGroupHeading(t,n)})}addGroupHeading(t,e){return F(this,null,function*(){let n="h6";e.nestingLevel===0?n="h4":e.nestingLevel===1&&(n="h5");let i=ct(n,t);i.classList.add("tasks-group-heading"),this.obsidianComponent!==null&&(yield this.renderMarkdown(e.displayName,i,this.tasksFile.path,this.obsidianComponent))})}addBacklinks(t,e,n,i,s){var l;let a=ct("span",t);a.classList.add("tasks-backlink"),n||a.append(" (");let o=ct("a",a);o.rel="noopener",o.target="_blank",o.classList.add("internal-link"),n&&o.classList.add("internal-link-short-mode");let u;n?u=" \u{1F517}":u=(l=e.getLinkText({isFilenameUnique:i}))!=null?l:"",o.text=u,o.addEventListener("click",c=>F(this,null,function*(){yield s.backlinksClickHandler(c,e)})),o.addEventListener("mousedown",c=>F(this,null,function*(){yield s.backlinksMousedownHandler(c,e)})),n||a.append(")")}addPostponeButton(t,e,n){let s="day",a=wE(e,1,s),o=ct("a",t);o.classList.add("tasks-postpone"),n&&o.classList.add("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),ji.postponeOnClickCallback(o,e,1,s)}),o.addEventListener("contextmenu",u=>F(this,null,function*(){u.preventDefault(),u.stopPropagation(),new ji(o,e).showAtPosition({x:u.clientX,y:u.clientY})}))}addTaskCount(t,e){if(!this.query.queryLayoutOptions.hideTaskCount){let n=ct("div",t);n.classList.add("task-count"),n.textContent=e.totalTasksCountDisplayText()}}isFilenameUnique({task:t},e){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return e.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let e of this.query.grouping)t.push(e.property);return t.join(",")}};var vd=class{constructor({plugin:t,events:e}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=t.app,this.plugin=t,this.events=e,t.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(t,e,n){return F(this,null,function*(){let i=new Vg({app:this.app,plugin:this.plugin,events:this.events,container:e,source:t,tasksFile:new Et(n.sourcePath)});n.addChild(i),i.load()})}},Vg=class extends wd.MarkdownRenderChild{constructor({app:e,plugin:n,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new _d(this.containerEl.className,a,o,wd.MarkdownRenderer.renderMarkdown,this),this.app=e,this.plugin=n,this.events=i}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let e=new Date;e.setHours(24,0,0,0);let n=new Date,i=e.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=ju(this.queryResultsRenderer.source,Dr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:e,state:n}){var a;let s=ct("div",this.containerEl);yield this.queryResultsRenderer.render(n,e,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:$L,backlinksMousedownHandler:GL,editTaskPencilClickHandler:YL}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function YL(r,t,e){r.preventDefault();let n=s=>F(this,null,function*(){yield Br({originalTask:t,newTasks:Ut.removeInferredStatusIfNeeded(t,s)})});new Mi({app,task:t,onSubmit:n,allTasks:e}).open()}function $L(r,t){return F(this,null,function*(){let e=yield og(t,app.vault);if(e){let[n,i]=e,s=app.workspace.getLeaf(UE.Keymap.isModEvent(r));r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}})}function GL(r,t){return F(this,null,function*(){if(r.button===1){let e=yield og(t,app.vault);if(e){let[n,i]=e,s=app.workspace.getLeaf("tab");r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}}})}var ke=require("obsidian");var kd=class{constructor(t){this._markdown="";this.columnNames=t,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let t="|",e="|";this.columnNames.forEach(n=>{t+=` ${n} |`,e+=" ----- |"}),this._markdown+=`${t} +`,this._markdown+=`${e} +`}addRow(t){let e=this.makeRowText(t);this._markdown+=`${e} +`}addRowIfNew(t){let e=this.makeRowText(t);this._markdown.includes(e)||(this._markdown+=`${e} +`)}makeRowText(t){let e="|";return t.forEach(n=>{e+=` ${n} |`}),e}};function WE(r,t){return r.findIndex(e=>e.symbol===t)}function pi(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function HL(r,t){let e=pe.getTypeForUnknownSymbol(r.symbol);r.type!==e&&(e==="TODO"&&r.symbol!==" "||t.push(`For information, the conventional type for status symbol ${pi(r.symbol)} is ${pi(e)}: you may wish to review this type.`))}function BL(r,t,e){let n=WE(r,t.nextStatusSymbol);if(n===-1){e.push(`Next symbol ${pi(t.nextStatusSymbol)} is unknown: create a status with symbol ${pi(t.nextStatusSymbol)}.`);return}if(t.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${pi(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("
");e.push(a)}}else e.push("Unexpected failure to find the next status.")}function VL(r,t,e){let n=[];return t.symbol===pe.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):WE(r,t.symbol)!=e?(n.push(`Duplicate symbol '${pi(t.symbol)}': this status will be ignored.`),n):(HL(t,n),BL(r,t,n),n)}function qE(r){let t=new kd(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),e=Xe.allStatuses(r);return e.forEach((n,i)=>{t.addRow([pi(n.symbol),pi(n.nextStatusSymbol),n.name,pi(n.type),VL(e,n,i).join("
")])}),t.markdown}function jE(r,t,e,n){let s=qE(r),a=t.mermaidDiagram(!0);return`# ${e} ## About this file @@ -380,23 +384,23 @@ ${s} These are the settings actually used by Tasks. -${a}`}function Hk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Vk(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function zk(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Kk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Qk(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Xk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Zk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Jk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var eE=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Yr=require("obsidian");var Ki=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=re.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Ki.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Ki.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=xt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new De,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var Qi=new Ki,rr=class extends Yr.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new Qe(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return A(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new Yr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,rr.setValid(l,Qi.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{rr.setValid(i,Qi.validateSymbol(this.statusConfiguration()))});let s;new Yr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,rr.setValid(l,Qi.validateName(this.statusConfiguration()))})}).then(l=>{rr.setValid(s,Qi.validateName(this.statusConfiguration()))});let a;new Yr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,rr.setValid(l,Qi.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{rr.setValid(a,Qi.validateNextSymbol(this.statusConfiguration()))}),new Yr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{l.addOption(d,d)}),l.setValue(this.type).onChange(d=>{this.type=re.getTypeFromStatusTypeString(d)})}),re.tasksPluginCanCreateCommandsForStatuses()&&new Yr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>A(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new Yr.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>A(this,null,function*(){let c=Qi.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +${a}`}function YE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function $E(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function GE(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function HE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function BE(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function VE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function zE(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function KE(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var QE=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Tn=require("obsidian");var Cs=class{validate(t){let e=[];return e.push(...this.validateSymbol(t)),e.push(...this.validateName(t)),e.push(...this.validateNextSymbol(t)),e}validateStatusCollectionEntry(t){let[e,n,i,s]=t,a=[];if(a.push(...this.validateType(s)),e===i&&s!=="NON_TASK"&&a.push(`Status symbol '${e}' toggles to itself`),a.length>0)return a;let o=pe.createFromImportedValue(t).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(t){return Cs.validateOneSymbol(t.symbol,"Task Status Symbol")}validateNextSymbol(t){return Cs.validateOneSymbol(t.nextStatusSymbol,"Task Next Status Symbol")}validateName(t){let e=[];return t.name.length===0&&e.push("Task Status Name cannot be empty."),e}validateType(t){let e=zt[t],n=[];return e||n.push(`Status Type "${t}" is not a valid type`),e=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(t){let e=[],n=t.symbol,i=new $e,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(t.nextStatusSymbol!==a.nextStatusSymbol&&e.push(`Next Status Symbol for symbol '${n}': '${t.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),t.type!==a.type&&e.push(`Status Type for symbol '${n}': '${t.type}' is inconsistent with convention '${a.type}'`)),e}static validateOneSymbol(t,e){let n=[];return t.length===0&&n.push(`${e} cannot be empty.`),t.length>1&&n.push(`${e} ("${t}") must be a single character.`),n}};var Rs=new Cs,Sr=class extends Tn.Modal{constructor(e,n,i){super(e.app);this.plugin=e;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new ft(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return F(this,null,function*(){let{contentEl:e}=this;e.empty();let n=e.createDiv(),i;new Tn.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,Sr.setValid(l,Rs.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{Sr.setValid(i,Rs.validateSymbol(this.statusConfiguration()))});let s;new Tn.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,Sr.setValid(l,Rs.validateName(this.statusConfiguration()))})}).then(l=>{Sr.setValid(s,Rs.validateName(this.statusConfiguration()))});let a;new Tn.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,Sr.setValid(l,Rs.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{Sr.setValid(a,Rs.validateNextSymbol(this.statusConfiguration()))}),new Tn.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{l.addOption(d,d)}),l.setValue(this.type).onChange(d=>{this.type=pe.getTypeFromStatusTypeString(d)})}),pe.tasksPluginCanCreateCommandsForStatuses()&&new Tn.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>F(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=e.createDiv(),u=new Tn.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>F(this,null,function*(){let c=Rs.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` `)+` -Fix errors before saving.`;new Yr.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?rr.removeValidationError(t):rr.setValidationError(t)}};var Pt=class extends le.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return A(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new le.Setting(t).setName("Task Format").setDesc(Pt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(l=>{for(let c of Object.keys(Nr))l.addOption(c,Nr[c].displayName);l.setValue(Q().taskFormat).onChange(c=>A(this,null,function*(){ze({taskFormat:c}),yield this.plugin.saveSettings()}))}),new le.Setting(t).setName("Global task filter").setHeading();let n=null;new le.Setting(t).setName("Global filter").setDesc(Pt.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(l=>{l.setPlaceholder("e.g. #task or TODO").setValue(ve.getInstance().get()).onChange(c=>A(this,null,function*(){ze({globalFilter:c}),ve.getInstance().set(c),yield this.plugin.saveSettings(),dn(n,c.length>0)}))}),n=new le.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(l=>{let c=Q();l.setValue(c.removeGlobalFilter).onChange(d=>A(this,null,function*(){ze({removeGlobalFilter:d}),ve.getInstance().setRemoveGlobalFilter(d),yield this.plugin.saveSettings()}))}),dn(n,Q().globalFilter.length>0),new le.Setting(t).setName("Global Query").setHeading(),dL(new le.Setting(t).setDesc(Pt.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(l=>{let c=Q();l.inputEl.rows=4,l.setPlaceholder(`# For example... +Fix errors before saving.`;new Tn.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,n){n.length===0?Sr.removeValidationError(e):Sr.setValidationError(e)}};var Jt=class extends ke.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e}saveSettings(e){return F(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new ke.Setting(e).setName("Task Format").setDesc(Jt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(l=>{for(let c of Object.keys(cn))l.addOption(c,cn[c].displayName);l.setValue(ie().taskFormat).onChange(c=>F(this,null,function*(){ut({taskFormat:c}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Global task filter").setHeading();let n=null;new ke.Setting(e).setName("Global filter").setDesc(Jt.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(l=>{l.setPlaceholder("e.g. #task or TODO").setValue(Ae.getInstance().get()).onChange(c=>F(this,null,function*(){ut({globalFilter:c}),Ae.getInstance().set(c),yield this.plugin.saveSettings(),qn(n,c.length>0)}))}),n=new ke.Setting(e).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(l=>{let c=ie();l.setValue(c.removeGlobalFilter).onChange(d=>F(this,null,function*(){ut({removeGlobalFilter:d}),Ae.getInstance().setRemoveGlobalFilter(d),yield this.plugin.saveSettings()}))}),qn(n,ie().globalFilter.length>0),new ke.Setting(e).setName("Global Query").setHeading(),XL(new ke.Setting(e).setDesc(Jt.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(l=>{let c=ie();l.inputEl.rows=4,l.setPlaceholder(`# For example... path does not include _templates/ limit 300 -show urgency`).setValue(c.globalQuery).onChange(d=>A(this,null,function*(){ze({globalQuery:d}),tr.getInstance().set(d),yield this.plugin.saveSettings()}))})),new le.Setting(t).setName("Task Statuses").setHeading();let{headingOpened:i}=Q();eE.forEach(l=>{var f;let c=(f=i[l.text])!=null?f:!0,d=this.addOneSettingsBlock(t,l,i);d.open=c}),new le.Setting(t).setName("Dates").setHeading(),new le.Setting(t).setName("Set created date on every added task").setDesc(Pt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(l=>{let c=Q();l.setValue(c.setCreatedDate).onChange(d=>A(this,null,function*(){ze({setCreatedDate:d}),yield this.plugin.saveSettings()}))}),new le.Setting(t).setName("Set done date on every completed task").setDesc(Pt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(l=>{let c=Q();l.setValue(c.setDoneDate).onChange(d=>A(this,null,function*(){ze({setDoneDate:d}),yield this.plugin.saveSettings()}))}),new le.Setting(t).setName("Set cancelled date on every cancelled task").setDesc(Pt.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.

See the documentation.

')).addToggle(l=>{let c=Q();l.setValue(c.setCancelledDate).onChange(d=>A(this,null,function*(){ze({setCancelledDate:d}),yield this.plugin.saveSettings()}))}),new le.Setting(t).setName("Dates from file names").setHeading();let s=null,a=null;new le.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Pt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
By default, Tasks plugin will match both YYYY-MM-DD and YYYYMMDD date formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(l=>{let c=Q();l.setValue(c.useFilenameAsScheduledDate).onChange(d=>A(this,null,function*(){ze({useFilenameAsScheduledDate:d}),dn(s,d),dn(a,d),yield this.plugin.saveSettings()}))}),s=new le.Setting(t).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Pt.createFragmentWithHTML('An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.

Syntax Reference

')).addText(l=>{let c=Q();l.setPlaceholder("example: MMM DD YYYY").setValue(c.filenameAsScheduledDateFormat).onChange(d=>A(this,null,function*(){ze({filenameAsScheduledDateFormat:d}),yield this.plugin.saveSettings()}))}),a=new le.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(l=>A(this,null,function*(){let c=Q();yield this.plugin.saveSettings(),l.setValue(Pt.renderFolderArray(c.filenameAsDateFolders)).onChange(d=>A(this,null,function*(){let f=Pt.parseCommaSeparatedFolders(d);ze({filenameAsDateFolders:f}),yield this.plugin.saveSettings()}))})),dn(s,Q().useFilenameAsScheduledDate),dn(a,Q().useFilenameAsScheduledDate),new le.Setting(t).setName("Recurring tasks").setHeading(),new le.Setting(t).setName("Next recurrence appears on the line below").setDesc(Pt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(l=>{let{recurrenceOnNextLine:c}=Q();l.setValue(c).onChange(d=>A(this,null,function*(){ze({recurrenceOnNextLine:d}),yield this.plugin.saveSettings()}))}),new le.Setting(t).setName("Auto-suggest").setHeading();let o=null,u=null;new le.Setting(t).setName("Auto-suggest task content").setDesc(Pt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(l=>{let c=Q();l.setValue(c.autoSuggestInEditor).onChange(d=>A(this,null,function*(){ze({autoSuggestInEditor:d}),yield this.plugin.saveSettings(),dn(o,d),dn(u,d)}))}),o=new le.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(l=>{let c=Q();l.setLimits(0,3,1).setValue(c.autoSuggestMinMatch).setDynamicTooltip().onChange(d=>A(this,null,function*(){ze({autoSuggestMinMatch:d}),yield this.plugin.saveSettings()}))}),u=new le.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(l=>{let c=Q();l.setLimits(3,20,1).setValue(c.autoSuggestMaxItems).setDynamicTooltip().onChange(d=>A(this,null,function*(){ze({autoSuggestMaxItems:d}),yield this.plugin.saveSettings()}))}),dn(o,Q().autoSuggestInEditor),dn(u,Q().autoSuggestInEditor),new le.Setting(t).setName("Dialogs").setHeading(),new le.Setting(t).setName("Provide access keys in dialogs").setDesc(Pt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(l=>{let c=Q();l.setValue(c.provideAccessKeys).onChange(d=>A(this,null,function*(){ze({provideAccessKeys:d}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:K({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,ze({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new le.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}return n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Fv(o.featureFlag))&&(o.type==="checkbox"?new le.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||Ni(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>A(this,null,function*(){Ni(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new le.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||Ni(o.settingName,o.initialValue);let c=d=>A(this,null,function*(){Ni(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,le.debounce)(c,500,!0))}):o.type==="textarea"?new le.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=Q();l.generalSettings[o.settingName]||Ni(o.settingName,o.initialValue);let c=d=>A(this,null,function*(){Ni(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,le.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}}),s}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=Q();i.coreStatuses.forEach(a=>{tE(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new le.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>A(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,d=this.plugin.manifest.version,f=De.getInstance(),m=Bk(i,f,o,d),y=yield this.app.vault.create(c,m);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{tE(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new le.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>A(this,null,function*(){Le.addStatus(i.customStatuses,new Qe("","","",!1,"TODO")),yield ia(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",Hk()],["Aura Theme",Vk()],["Border Theme",zk()],["Ebullientworks Theme",Kk()],["ITS Theme & SlRvb Checkboxes",Qk()],["Minimal Theme",Zk()],["Things Theme",Jk()],["LYT Mode Theme (Dark mode only)",Xk()]];for(let[l,c]of a)new le.Setting(t).addButton(f=>{let m=`${l}: Add ${c.length} supported Statuses`;f.setButtonText(m).onClick(()=>A(this,null,function*(){yield cL(c,i,n)}))}).infoEl.remove();new le.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>A(this,null,function*(){let d=this.plugin.getTasks().map(m=>m.status),f=De.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(m=>{Le.addStatus(i.customStatuses,m)}),yield ia(i,n))}))}).infoEl.remove(),new le.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>A(this,null,function*(){Le.resetAllCustomStatuses(i),yield ia(i,n)}))}).infoEl.remove()}},Ko=Pt;Ko.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function tE(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new re(e).previewText();let u=new le.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>A(this,null,function*(){Le.deleteStatus(t,e)&&(yield ia(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>A(this,null,function*(){let c=new rr(s,e,a);c.onClose=()=>A(this,null,function*(){c.saved&&Le.replaceStatus(t,e,c.statusConfiguration())&&(yield ia(n,i))}),c.open()}))}),u.infoEl.remove()}function cL(r,e,t){return A(this,null,function*(){Le.bulkAddStatusCollection(e,r).forEach(i=>{new le.Notice(i)}),yield ia(e,t)})}function ia(r,e){return A(this,null,function*(){ze({statusSettings:r}),Le.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function dL(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}function dn(r,e){r?r.setVisibility(e):console.warn("Setting has not be initialised. Can update visibility of setting UI - in setSettingVisibility")}var fi=require("obsidian");function fL(r){console.error(r),new fi.Notice(r+` +show urgency`).setValue(c.globalQuery).onChange(d=>F(this,null,function*(){ut({globalQuery:d}),Dr.getInstance().set(d),yield this.plugin.saveSettings()}))})),new ke.Setting(e).setName("Task Statuses").setHeading();let{headingOpened:i}=ie();QE.forEach(l=>{var f;let c=(f=i[l.text])!=null?f:!0,d=this.addOneSettingsBlock(e,l,i);d.open=c}),new ke.Setting(e).setName("Dates").setHeading(),new ke.Setting(e).setName("Set created date on every added task").setDesc(Jt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(l=>{let c=ie();l.setValue(c.setCreatedDate).onChange(d=>F(this,null,function*(){ut({setCreatedDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Set done date on every completed task").setDesc(Jt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(l=>{let c=ie();l.setValue(c.setDoneDate).onChange(d=>F(this,null,function*(){ut({setDoneDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Set cancelled date on every cancelled task").setDesc(Jt.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.

See the documentation.

')).addToggle(l=>{let c=ie();l.setValue(c.setCancelledDate).onChange(d=>F(this,null,function*(){ut({setCancelledDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Dates from file names").setHeading();let s=null,a=null;new ke.Setting(e).setName("Use filename as Scheduled date for undated tasks").setDesc(Jt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
By default, Tasks plugin will match both YYYY-MM-DD and YYYYMMDD date formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(l=>{let c=ie();l.setValue(c.useFilenameAsScheduledDate).onChange(d=>F(this,null,function*(){ut({useFilenameAsScheduledDate:d}),qn(s,d),qn(a,d),yield this.plugin.saveSettings()}))}),s=new ke.Setting(e).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Jt.createFragmentWithHTML('An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.

Syntax Reference

')).addText(l=>{let c=ie();l.setPlaceholder("example: MMM DD YYYY").setValue(c.filenameAsScheduledDateFormat).onChange(d=>F(this,null,function*(){ut({filenameAsScheduledDateFormat:d}),yield this.plugin.saveSettings()}))}),a=new ke.Setting(e).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(l=>F(this,null,function*(){let c=ie();yield this.plugin.saveSettings(),l.setValue(Jt.renderFolderArray(c.filenameAsDateFolders)).onChange(d=>F(this,null,function*(){let f=Jt.parseCommaSeparatedFolders(d);ut({filenameAsDateFolders:f}),yield this.plugin.saveSettings()}))})),qn(s,ie().useFilenameAsScheduledDate),qn(a,ie().useFilenameAsScheduledDate),new ke.Setting(e).setName("Recurring tasks").setHeading(),new ke.Setting(e).setName("Next recurrence appears on the line below").setDesc(Jt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(l=>{let{recurrenceOnNextLine:c}=ie();l.setValue(c).onChange(d=>F(this,null,function*(){ut({recurrenceOnNextLine:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Auto-suggest").setHeading();let o=null,u=null;new ke.Setting(e).setName("Auto-suggest task content").setDesc(Jt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(l=>{let c=ie();l.setValue(c.autoSuggestInEditor).onChange(d=>F(this,null,function*(){ut({autoSuggestInEditor:d}),yield this.plugin.saveSettings(),qn(o,d),qn(u,d)}))}),o=new ke.Setting(e).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(l=>{let c=ie();l.setLimits(0,3,1).setValue(c.autoSuggestMinMatch).setDynamicTooltip().onChange(d=>F(this,null,function*(){ut({autoSuggestMinMatch:d}),yield this.plugin.saveSettings()}))}),u=new ke.Setting(e).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(l=>{let c=ie();l.setLimits(3,20,1).setValue(c.autoSuggestMaxItems).setDynamicTooltip().onChange(d=>F(this,null,function*(){ut({autoSuggestMaxItems:d}),yield this.plugin.saveSettings()}))}),qn(o,ie().autoSuggestInEditor),qn(u,ie().autoSuggestInEditor),new ke.Setting(e).setName("Dialogs").setHeading(),new ke.Setting(e).setName("Provide access keys in dialogs").setDesc(Jt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(l=>{let c=ie();l.setValue(c.provideAccessKeys).onChange(d=>F(this,null,function*(){ut({provideAccessKeys:d}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(e,n,i){let s=e.createEl("details",{cls:"tasks-nested-settings",attr:ne({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,ut({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ke.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}return n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Dw(o.featureFlag))&&(o.type==="checkbox"?new ke.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=ie();l.generalSettings[o.settingName]||hs(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>F(this,null,function*(){hs(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ke.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=ie();l.generalSettings[o.settingName]||hs(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){hs(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ke.debounce)(c,500,!0))}):o.type==="textarea"?new ke.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=ie();l.generalSettings[o.settingName]||hs(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){hs(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ke.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}}),s}static parseCommaSeparatedFolders(e){return e.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(e){return e.join(",")}insertTaskCoreStatusSettings(e,n){let{statusSettings:i}=ie();i.coreStatuses.forEach(a=>{XE(e,a,i.coreStatuses,i,n,n.plugin,!0)}),new ke.Setting(e).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>F(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,d=this.plugin.manifest.version,f=$e.getInstance(),m=jE(i,f,o,d),b=yield this.app.vault.create(c,m);yield this.app.workspace.getLeaf(!0).openFile(b)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(e,n){let{statusSettings:i}=ie();i.customStatuses.forEach(l=>{XE(e,l,i.customStatuses,i,n,n.plugin,!1)}),e.createEl("div"),new ke.Setting(e).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>F(this,null,function*(){Xe.addStatus(i.customStatuses,new ft("","","",!1,"TODO")),yield Va(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",YE()],["Aura Theme",$E()],["Border Theme",GE()],["Ebullientworks Theme",HE()],["ITS Theme & SlRvb Checkboxes",BE()],["Minimal Theme",zE()],["Things Theme",KE()],["LYT Mode Theme (Dark mode only)",VE()]];for(let[l,c]of a)new ke.Setting(e).addButton(f=>{let m=`${l}: Add ${c.length} supported Statuses`;f.setButtonText(m).onClick(()=>F(this,null,function*(){yield QL(c,i,n)}))}).infoEl.remove();new ke.Setting(e).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>F(this,null,function*(){let d=this.plugin.getTasks().map(m=>m.status),f=$e.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(m=>{Xe.addStatus(i.customStatuses,m)}),yield Va(i,n))}))}).infoEl.remove(),new ke.Setting(e).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>F(this,null,function*(){Xe.resetAllCustomStatuses(i),yield Va(i,n)}))}).infoEl.remove()}},Gu=Jt;Gu.createFragmentWithHTML=e=>createFragment(n=>n.createDiv().innerHTML=e);function XE(r,t,e,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new pe(t).previewText();let u=new ke.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>F(this,null,function*(){Xe.deleteStatus(e,t)&&(yield Va(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>F(this,null,function*(){let c=new Sr(s,t,a);c.onClose=()=>F(this,null,function*(){c.saved&&Xe.replaceStatus(e,t,c.statusConfiguration())&&(yield Va(n,i))}),c.open()}))}),u.infoEl.remove()}function QL(r,t,e){return F(this,null,function*(){Xe.bulkAddStatusCollection(t,r).forEach(i=>{new ke.Notice(i)}),yield Va(t,e)})}function Va(r,t){return F(this,null,function*(){ut({statusSettings:r}),Xe.applyToStatusRegistry(r,$e.getInstance()),yield t.saveSettings(!0)})}function XL(r){let{settingEl:t,infoEl:e,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(t.style.display="block",e.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}function qn(r,t){r?r.setVisibility(t):console.warn("Setting has not be initialised. Can update visibility of setting UI - in setSettingVisibility")}var Yi=require("obsidian");function ZL(r){console.error(r),new Yi.Notice(r+` This message has been written to the console. -`,1e4)}var _c=class extends fi.EditorSuggest{constructor(t,n,i){super(t);this.settings=n,this.plugin=i,t.scope.register([],"Tab",()=>{var a;let s=(a=this.context)==null?void 0:a.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return Nv(s,t,n)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var c,d,f;let n=t.query,i=t.editor.getCursor(),s=this.plugin.getTasks(),a=s.find(m=>m.taskLocation.path==t.file.path&&m.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(t),u=this.canSaveEdits(o);return((f=(d=(c=Do()).buildSuggestions)==null?void 0:d.call(c,n,i.ch,this.settings,s,u,a))!=null?f:[]).map(m=>de(K({},m),{context:t}))}getMarkdownFileInfo(t){return t.editor.cm.state.field(fi.editorInfoField)}canSaveEdits(t){return t instanceof fi.MarkdownView}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){return A(this,null,function*(){var l,c,d;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(c=(l=i==null?void 0:i.cm)==null?void 0:l.contentDOM)==null||c.dispatchEvent(f);return}if(t.taskItDependsOn!=null){let f=il(t.taskItDependsOn,this.plugin.getTasks().map(m=>m.id));if(t.appendText+=` ${f.id}`,t.taskItDependsOn!==f)if(t.context.file.path==f.path){let m=t.taskItDependsOn.originalMarkdown,y={line:t.taskItDependsOn.lineNumber,ch:0},b={line:t.taskItDependsOn.lineNumber,ch:m.length},k=t.context.editor.getRange(y,b);if(k!==m){let _=`Error adding new ID, due to mismatched data in Tasks memory and the editor: -task line in memory: '${t.taskItDependsOn.originalMarkdown}' +`,1e4)}var Ed=class extends Yi.EditorSuggest{constructor(e,n,i){super(e);this.settings=n,this.plugin=i,e.scope.register([],"Tab",()=>{var a;let s=(a=this.context)==null?void 0:a.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(e,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(e.line);return kw(s,e,n)?{start:{line:e.line,ch:0},end:{line:e.line,ch:s.length},query:s}:null}getSuggestions(e){var c,d,f;let n=e.query,i=e.editor.getCursor(),s=this.plugin.getTasks(),a=s.find(m=>m.taskLocation.path==e.file.path&&m.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(e),u=this.canSaveEdits(o);return((f=(d=(c=Tu()).buildSuggestions)==null?void 0:d.call(c,n,i.ch,this.settings,s,u,a))!=null?f:[]).map(m=>Ee(ne({},m),{context:e}))}getMarkdownFileInfo(e){return e.editor.cm.state.field(Yi.editorInfoField)}canSaveEdits(e){return e instanceof Yi.MarkdownView}renderSuggestion(e,n){n.setText(e.displayText)}selectSuggestion(e,n){return F(this,null,function*(){var l,c,d;let i=e.context.editor;if(e.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(c=(l=i==null?void 0:i.cm)==null?void 0:l.contentDOM)==null||c.dispatchEvent(f);return}if(e.taskItDependsOn!=null){let f=ec(e.taskItDependsOn,this.plugin.getTasks().map(m=>m.id));if(e.appendText+=` ${f.id}`,e.taskItDependsOn!==f)if(e.context.file.path==f.path){let m=e.taskItDependsOn.originalMarkdown,b={line:e.taskItDependsOn.lineNumber,ch:0},T={line:e.taskItDependsOn.lineNumber,ch:m.length},_=e.context.editor.getRange(b,T);if(_!==m){let x=`Error adding new ID, due to mismatched data in Tasks memory and the editor: +task line in memory: '${e.taskItDependsOn.originalMarkdown}' -task line in editor: '${k}' +task line in editor: '${_}' file: '${f.path}' -`;fL(_);return}t.context.editor.replaceRange(f.toFileLineString(),y,b)}else br({originalTask:t.taskItDependsOn,newTasks:f})}let s=t.context.editor.getCursor(),a={line:s.line,ch:(d=t.insertAt)!=null?d:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length});let u=this.getMarkdownFileInfo(t.context);this.canSaveEdits(u)&&(yield u.save())})}};var rE=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var nE=(r,e)=>{let t=Sl({line:"",path:""});return new ti({app:r,task:t,onSubmit:e,allTasks:[]})};var iE=r=>({createTaskLineModal:()=>rE(r,nE),executeToggleTaskDoneCommand:(e,t)=>Th(e,t).text});var vc=class extends sE.Plugin{get apiV1(){return iE(this.app)}onload(){return A(this,null,function*(){Rt.registerConsoleLogger(),Vm("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=Q();Rt.configure(t),this.addSettingTab(new Ko({plugin:this})),xw({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new uc({obsidianEvents:this.app.workspace});this.cache=new Es({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:n}),this.inlineRenderer=new pc({plugin:this}),this.queryRenderer=new yc({plugin:this,events:n}),this.registerEditorExtension(Wk()),this.registerEditorSuggest(new _c(this.app,Q(),this)),new Ol({plugin:this})})}loadTaskStatuses(){return A(this,null,function*(){let{statusSettings:t}=Q();Le.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;Vm("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return A(this,null,function*(){let t=yield this.loadData();ze(t),t=Q(),ve.getInstance().set(t.globalFilter),ve.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return A(this,null,function*(){yield this.saveData(Q())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}}; +`;ZL(x);return}e.context.editor.replaceRange(f.toFileLineString(),b,T)}else Br({originalTask:e.taskItDependsOn,newTasks:f})}let s=e.context.editor.getCursor(),a={line:s.line,ch:(d=e.insertAt)!=null?d:s.ch},o=e.insertSkip?{line:s.line,ch:a.ch+e.insertSkip}:void 0;e.context.editor.replaceRange(e.appendText,a,o),e.context.editor.setCursor({line:s.line,ch:a.ch+e.appendText.length});let u=this.getMarkdownFileInfo(e.context);this.canSaveEdits(u)&&(yield u.save())})}};var ZE=(r,t)=>{let e,n=new Promise((a,o)=>{e=a});return t(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` +`);e(o)}).open(),n};var JE=(r,t)=>{let e=wc({line:"",path:""});return new Mi({app:r,task:e,onSubmit:t,allTasks:[]})};var eD=r=>({createTaskLineModal:()=>ZE(r,JE),executeToggleTaskDoneCommand:(t,e)=>pg(t,e).text});var Dd=class extends tD.Plugin{get apiV1(){return eD(this.app)}onload(){return F(this,null,function*(){Kt.registerConsoleLogger(),Yh("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:e}=ie();Kt.configure(e),this.addSettingTab(new Gu({plugin:this})),gk({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new sd({obsidianEvents:this.app.workspace});this.cache=new da({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:n}),this.inlineRenderer=new yd({plugin:this}),this.queryRenderer=new vd({plugin:this,events:n}),this.registerEditorExtension(IE()),this.registerEditorSuggest(new Ed(this.app,ie(),this)),new kc({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:e}=ie();Xe.applyToStatusRegistry(e,$e.getInstance())})}onunload(){var e;Yh("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(e=this.cache)==null||e.unload()}loadSettings(){return F(this,null,function*(){let e=yield this.loadData();ut(e),e=ie(),Ae.getInstance().set(e.globalFilter),Ae.getInstance().setRemoveGlobalFilter(e.removeGlobalFilter),Dr.getInstance().set(e.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(ie())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 14568d3..686fe84 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "7.12.3", + "version": "7.14.0", "minAppVersion": "1.1.1", "description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.", "helpUrl": "https://publish.obsidian.md/tasks/", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css index 4b23002..5fb42f1 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/styles.css +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -1 +1 @@ -@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 #e6e6e6,-1px 0 #e6e6e6,0 1px #e6e6e6,0 -1px #e6e6e6,0 3px 13px #00000014}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:#000000e6;fill:#000000e6;height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:#000000e6;fill:#000000e6}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\fffd;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#000000e6}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#000000e6}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:#00000080;background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:#0000008a;line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:#3939394d;background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:#3939391a}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 #569ff7,5px 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:#3939394d;background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}:root{--tasks-details-icon: url("data:image/svg+xml;charset=utf-8,")}ul.contains-task-list .task-list-item-checkbox{margin-inline-start:calc(var(--checkbox-size) * -1.5)!important}.plugin-tasks-query-explanation{--code-white-space: pre}.tasks-count{color:var(--text-faint);padding-left:20px}.tooltip.pop-up{animation:pop-up-animation .2s forwards ease-in-out}@keyframes pop-up-animation{0%{opacity:0;transform:translateY(-100%) scale(1)}20%{opacity:.7;transform:translateY(-100%) scale(1.02)}40%{opacity:1;transform:translateY(-100%) scale(1.05)}to{opacity:1;transform:translateY(-100%) scale(1)}}.task-cancelled,.task-created,.task-done,.task-due,.task-scheduled,.task-start{cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.tasks-edit,.tasks-postpone{width:1em;height:1em;vertical-align:middle;margin-left:.33em;cursor:pointer;font-family:var(--font-interface);color:var(--text-accent);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}a.tasks-edit,a.tasks-postpone{text-decoration:none}.tasks-edit:after{content:"\1f4dd"}.tasks-postpone:after{content:"\23e9"}.tasks-urgency{font-size:var(--font-ui-smaller);font-family:var(--font-interface);padding:2px 6px;border-radius:var(--radius-s);color:var(--text-normal);background-color:var(--background-secondary);margin-left:.5em;line-height:1}.internal-link.internal-link-short-mode{text-decoration:none}.tasks-list-text{position:relative}.tasks-list-text .tooltip{position:absolute;top:0;left:0;white-space:nowrap}.task-list-item-checkbox{cursor:pointer}.tasks-layout-hide-tags .task-description a.tag,.task-list-item .task-block-link{display:none}.tasks-modal section+section{margin-top:6px}.tasks-modal hr{margin:6px 0}.tasks-modal .tasks-modal-error{border:1px solid red!important}.tasks-modal .accesskey{text-decoration:underline;text-underline-offset:1pt}.tasks-modal-description-section textarea{width:100%;min-height:calc(var(--input-height) * 2);resize:vertical;margin-top:8px}.tasks-modal-priority-section{display:grid;grid-template-columns:6em auto auto auto;grid-row-gap:.15em}.tasks-modal-priority-section>label{grid-row-start:1;grid-row-end:3}.tasks-modal-priority-section .task-modal-priority-option-container{white-space:nowrap}.tasks-modal-priority-section .task-modal-priority-option-container input+label{font-size:var(--font-ui-small);border-radius:var(--input-radius);padding:2px 3px}.tasks-modal-priority-section .task-modal-priority-option-container input{accent-color:var(--interactive-accent)}.tasks-modal-priority-section .task-modal-priority-option-container input:focus+label{box-shadow:0 0 0 2px var(--background-modifier-border-focus);border-color:var(--background-modifier-border-focus)}.tasks-modal-priority-section .task-modal-priority-option-container input:checked+label{font-weight:700}.tasks-modal-priority-section .task-modal-priority-option-container input:not(:checked)+label>span:nth-child(4){filter:grayscale(100%) opacity(60%)}.tasks-modal-dates-section{display:grid;grid-template-columns:6em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dates-section label{grid-column:1}.tasks-modal-dates-section .tasks-modal-date-input{min-width:15em}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:3;font-size:var(--font-ui-small)}.tasks-modal-dates-section .future-dates-only{grid-column-start:1;grid-column-end:3}.tasks-modal-dates-section .future-dates-only input{margin-left:.67em;top:2px}.tasks-modal-dates-section .status-editor-status-selector{grid-column:2}.tasks-modal-dependencies-section{display:grid;grid-template-columns:6em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dependencies-section .tasks-modal-dependency-input{grid-column:2;width:100%}.tasks-modal-dependencies-section .results-dependency{grid-column:2}.tasks-modal-button-section{position:sticky;bottom:0;background-color:var(--modal-background);padding-bottom:16px;padding-top:16px;display:grid;grid-template-columns:3fr 1fr;column-gap:.5em}.tasks-modal-button-section button:disabled{pointer-events:none!important;opacity:.3!important}@media (max-width: 649px){.tasks-modal-priority-section{grid-template-columns:6em auto auto}.tasks-modal-priority-section>label{grid-row:1/span 3}}@media (max-width: 499px){.tasks-modal-priority-section{grid-template-columns:4em auto auto}.tasks-modal-dates-section{grid-template-columns:1fr;grid-auto-columns:auto}.tasks-modal-dates-section .tasks-modal-date-input{grid-column:1}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:2}.tasks-modal-dates-section .status-editor-status-selector,.tasks-modal-dependencies-section label,.tasks-modal-dependencies-section .results-dependency{grid-column:1}}@media (max-width: 399px){.tasks-modal-dates-section .status-editor-status-selector{grid-column:1}.tasks-modal-dates-section>.tasks-modal-parsed-date{grid-column:1}.tasks-modal-priority-section{grid-template-columns:4em auto}.tasks-modal-priority-section>label{grid-row:1/span 6}.tasks-modal-dependencies-section{grid-template-columns:1fr;grid-auto-columns:auto}}@media (max-width: 259px){.tasks-modal-priority-section{grid-template-columns:1fr}.tasks-modal-priority-section>label{grid-row:1}}.task-dependencies-container{grid-column:2;display:flex;flex-wrap:wrap;gap:8px}.task-dependency{display:inline-flex;background-color:var(--interactive-normal);box-shadow:var(--input-shadow);border-radius:28px;padding:4px 4px 4px 8px}.task-dependency-name{font-size:var(--font-ui-small);max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-delete{padding:3px;cursor:pointer;height:inherit;box-shadow:none!important;border-radius:50%}.task-dependency-dropdown{list-style:none;position:absolute;top:0;left:0;padding:4px;margin:0;background-color:var(--background-primary);border:1px;border-radius:6px;border-color:var(--background-modifier-border);border-style:solid;z-index:99;max-height:170px;overflow-y:auto}.task-dependency-dropdown li{padding:5px;margin:2px;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between}.task-dependency-dropdown li .dependency-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-name-shared{width:60%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-path{width:40%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-style:italic;text-align:right;color:var(--italic-color)}.task-dependency-dropdown li.selected{background-color:var(--text-selection)}.tasks-setting-important{color:red;font-weight:700}.tasks-settings-is-invalid{color:var(--text-error)!important;background-color:rgba(var(--background-modifier-error-rgb),.2)!important}.tasks-settings .additional{margin:6px 12px}.tasks-settings .additional>.setting-item{border-top:0;padding-top:9px}.tasks-settings details>summary{outline:none;display:block!important;list-style:none!important;list-style-type:none!important;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative}.tasks-settings details>summary::-webkit-details-marker,.tasks-settings details>summary::marker{display:none!important}.tasks-settings details>summary>.collapser{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.tasks-settings details>summary>.collapser>.handle{transform:rotate(0);transition:transform .25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--tasks-details-icon);mask-image:var(--tasks-details-icon);width:20px;height:20px}.tasks-settings details[open]>summary>.collapser>.handle{transform:rotate(90deg)}.tasks-nested-settings .setting-item{border:0px;padding-bottom:0}.tasks-nested-settings{padding-bottom:18px}.tasks-nested-settings[open] .setting-item-heading,.tasks-nested-settings:not(details) .setting-item-heading{border-top:0px;border-bottom:1px solid var(--background-modifier-border)}.tasks-settings .row-for-status{margin-top:0;margin-bottom:0} +@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 #e6e6e6,-1px 0 #e6e6e6,0 1px #e6e6e6,0 -1px #e6e6e6,0 3px 13px #00000014}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:#000000e6;fill:#000000e6;height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:#000000e6;fill:#000000e6}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\fffd;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#000000e6}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#000000e6}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:#00000080;background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:#0000008a;line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:#3939394d;background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:#3939391a}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 #569ff7,5px 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:#3939394d;background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}:root{--tasks-details-icon: url("data:image/svg+xml;charset=utf-8,")}ul.contains-task-list .task-list-item-checkbox{margin-inline-start:calc(var(--checkbox-size) * -1.5)!important}.plugin-tasks-query-explanation{--code-white-space: pre}.tasks-count{color:var(--text-faint);padding-left:20px}.tooltip.pop-up{animation:pop-up-animation .2s forwards ease-in-out}@keyframes pop-up-animation{0%{opacity:0;transform:translateY(-100%) scale(1)}20%{opacity:.7;transform:translateY(-100%) scale(1.02)}40%{opacity:1;transform:translateY(-100%) scale(1.05)}to{opacity:1;transform:translateY(-100%) scale(1)}}.task-cancelled,.task-created,.task-done,.task-due,.task-scheduled,.task-start{cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.tasks-edit,.tasks-postpone{width:1em;height:1em;vertical-align:middle;margin-left:.33em;cursor:pointer;font-family:var(--font-interface);color:var(--text-accent);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}a.tasks-edit,a.tasks-postpone{text-decoration:none}.tasks-edit:after{content:"\1f4dd"}.tasks-postpone:after{content:"\23e9"}.tasks-urgency{font-size:var(--font-ui-smaller);font-family:var(--font-interface);padding:2px 6px;border-radius:var(--radius-s);color:var(--text-normal);background-color:var(--background-secondary);margin-left:.5em;line-height:1}.internal-link.internal-link-short-mode{text-decoration:none}.tasks-list-text{position:relative}.tasks-list-text .tooltip{position:absolute;top:0;left:0;white-space:nowrap}.task-list-item-checkbox{cursor:pointer}.tasks-layout-hide-tags .task-description a.tag,.task-list-item .task-block-link{display:none}.tasks-modal section+section{margin-top:6px}.tasks-modal hr{margin:6px 0}.tasks-modal .tasks-modal-error{border:1px solid red!important}.tasks-modal .accesskey{text-decoration:underline;text-underline-offset:1pt}.tasks-modal-description-section textarea{width:100%;min-height:calc(var(--input-height) * 2);resize:vertical;margin-top:8px}.tasks-modal-priority-section{display:grid;grid-template-columns:6em auto auto auto;grid-row-gap:.15em}.tasks-modal-priority-section>label{grid-row-start:1;grid-row-end:3}.tasks-modal-priority-section .task-modal-priority-option-container{white-space:nowrap}.tasks-modal-priority-section .task-modal-priority-option-container input+label{font-size:var(--font-ui-small);border-radius:var(--input-radius);padding:2px 3px}.tasks-modal-priority-section .task-modal-priority-option-container input{accent-color:var(--interactive-accent)}.tasks-modal-priority-section .task-modal-priority-option-container input:focus+label{box-shadow:0 0 0 2px var(--background-modifier-border-focus);border-color:var(--background-modifier-border-focus)}.tasks-modal-priority-section .task-modal-priority-option-container input:checked+label{font-weight:700}.tasks-modal-priority-section .task-modal-priority-option-container input:not(:checked)+label>span:nth-child(4){filter:grayscale(100%) opacity(60%)}.tasks-modal-dates-section{display:grid;grid-template-columns:6em 13em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dates-section label{grid-column:1}.tasks-modal-dates-section .tasks-modal-date-input{min-width:15em}.tasks-modal-dates-section .tasks-modal-date-editor-picker{margin-left:.5em}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:3;font-size:var(--font-ui-small)}.tasks-modal-dates-section .future-dates-only{grid-column-start:1;grid-column-end:3}.tasks-modal-dates-section .future-dates-only input{margin-left:.67em;top:2px}.tasks-modal-dates-section .status-editor-status-selector{grid-column:2}.tasks-modal-dependencies-section{display:grid;grid-template-columns:6em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dependencies-section .tasks-modal-dependency-input{grid-column:2;width:100%}.tasks-modal-dependencies-section .results-dependency{grid-column:2}.tasks-modal-button-section{position:sticky;bottom:0;background-color:var(--modal-background);padding-bottom:16px;padding-top:16px;display:grid;grid-template-columns:3fr 1fr;column-gap:.5em}.tasks-modal-button-section button:disabled{pointer-events:none!important;opacity:.3!important}@media (max-width: 649px){.tasks-modal-priority-section{grid-template-columns:6em auto auto}.tasks-modal-priority-section>label{grid-row:1/span 3}}@media (max-width: 499px){.tasks-modal-priority-section{grid-template-columns:4em auto auto}.tasks-modal-dates-section{grid-template-columns:1fr;grid-auto-columns:auto}.tasks-modal-dates-section .tasks-modal-date-input{grid-column:1}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:2}.tasks-modal-dates-section .status-editor-status-selector,.tasks-modal-dependencies-section label,.tasks-modal-dependencies-section .results-dependency{grid-column:1}}@media (max-width: 399px){.tasks-modal-dates-section .status-editor-status-selector{grid-column:1}.tasks-modal-dates-section>.tasks-modal-parsed-date{grid-column:1}.tasks-modal-priority-section{grid-template-columns:4em auto}.tasks-modal-priority-section>label{grid-row:1/span 6}.tasks-modal-dependencies-section{grid-template-columns:1fr;grid-auto-columns:auto}}@media (max-width: 259px){.tasks-modal-priority-section{grid-template-columns:1fr}.tasks-modal-priority-section>label{grid-row:1}}.task-dependencies-container{grid-column:2;display:flex;flex-wrap:wrap;gap:8px}.task-dependency{display:inline-flex;background-color:var(--interactive-normal);box-shadow:var(--input-shadow);border-radius:28px;padding:4px 4px 4px 8px}.task-dependency-name{font-size:var(--font-ui-small);max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-delete{padding:3px;cursor:pointer;height:inherit;box-shadow:none!important;border-radius:50%}.task-dependency-dropdown{list-style:none;position:absolute;top:0;left:0;padding:4px;margin:0;background-color:var(--background-primary);border:1px;border-radius:6px;border-color:var(--background-modifier-border);border-style:solid;z-index:99;max-height:170px;overflow-y:auto}.task-dependency-dropdown li{padding:5px;margin:2px;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between}.task-dependency-dropdown li .dependency-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-name-shared{width:60%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-path{width:40%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-style:italic;text-align:right;color:var(--italic-color)}.task-dependency-dropdown li.selected{background-color:var(--text-selection)}.tasks-setting-important{color:red;font-weight:700}.tasks-settings-is-invalid{color:var(--text-error)!important;background-color:rgba(var(--background-modifier-error-rgb),.2)!important}.tasks-settings .additional{margin:6px 12px}.tasks-settings .additional>.setting-item{border-top:0;padding-top:9px}.tasks-settings details>summary{outline:none;display:block!important;list-style:none!important;list-style-type:none!important;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative}.tasks-settings details>summary::-webkit-details-marker,.tasks-settings details>summary::marker{display:none!important}.tasks-settings details>summary>.collapser{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.tasks-settings details>summary>.collapser>.handle{transform:rotate(0);transition:transform .25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--tasks-details-icon);mask-image:var(--tasks-details-icon);width:20px;height:20px}.tasks-settings details[open]>summary>.collapser>.handle{transform:rotate(90deg)}.tasks-nested-settings .setting-item{border:0px;padding-bottom:0}.tasks-nested-settings{padding-bottom:18px}.tasks-nested-settings[open] .setting-item-heading,.tasks-nested-settings:not(details) .setting-item-heading{border-top:0px;border-bottom:1px solid var(--background-modifier-border)}.tasks-settings .row-for-status{margin-top:0;margin-bottom:0} diff --git a/.obsidian/plugins/periodic-para/main.js b/.obsidian/plugins/periodic-para/main.js index dd47192..e35d686 100644 --- a/.obsidian/plugins/periodic-para/main.js +++ b/.obsidian/plugins/periodic-para/main.js @@ -13,9 +13,9 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; -var __export = (target, all3) => { - for (var name in all3) - __defProp(target, name, { get: all3[name], enumerable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from2, except, desc) => { if (from2 && typeof from2 === "object" || typeof from2 === "function") { @@ -387,7 +387,7 @@ var require_lib = __commonJS({ const pos = typeToPos[type5]; if (type5 === "era") { filled[pos] = value; - } else if (!isUndefined2(pos)) { + } else if (!isUndefined(pos)) { filled[pos] = parseInt(value, 10); } } @@ -982,11 +982,11 @@ var require_lib = __commonJS({ } }; function normalizeZone(input, defaultZone2) { - if (isUndefined2(input) || input === null) { + if (isUndefined(input) || input === null) { return defaultZone2; } else if (input instanceof Zone2) { return input; - } else if (isString3(input)) { + } else if (isString2(input)) { const lowered = input.toLowerCase(); if (lowered === "default") return defaultZone2; @@ -996,7 +996,7 @@ var require_lib = __commonJS({ return FixedOffsetZone.utcInstance; else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); - } else if (isNumber2(input)) { + } else if (isNumber(input)) { return FixedOffsetZone.instance(input); } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") { return input; @@ -1128,19 +1128,19 @@ var require_lib = __commonJS({ IANAZone.resetCache(); } }; - function isUndefined2(o3) { + function isUndefined(o3) { return typeof o3 === "undefined"; } - function isNumber2(o3) { + function isNumber(o3) { return typeof o3 === "number"; } function isInteger(o3) { return typeof o3 === "number" && o3 % 1 === 0; } - function isString3(o3) { + function isString2(o3) { return typeof o3 === "string"; } - function isDate2(o3) { + function isDate(o3) { return Object.prototype.toString.call(o3) === "[object Date]"; } function hasRelative() { @@ -1174,7 +1174,7 @@ var require_lib = __commonJS({ return a; }, {}); } - function hasOwnProperty2(obj, prop) { + function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } function integerBetween(thing, bottom, top) { @@ -1194,21 +1194,21 @@ var require_lib = __commonJS({ return padded; } function parseInteger(string3) { - if (isUndefined2(string3) || string3 === null || string3 === "") { + if (isUndefined(string3) || string3 === null || string3 === "") { return void 0; } else { return parseInt(string3, 10); } } function parseFloating(string3) { - if (isUndefined2(string3) || string3 === null || string3 === "") { + if (isUndefined(string3) || string3 === null || string3 === "") { return void 0; } else { return parseFloat(string3); } } function parseMillis(fraction) { - if (isUndefined2(fraction) || fraction === null || fraction === "") { + if (isUndefined(fraction) || fraction === null || fraction === "") { return void 0; } else { const f = parseFloat("0." + fraction) * 1e3; @@ -1292,7 +1292,7 @@ var require_lib = __commonJS({ function normalizeObject(obj, normalizer) { const normalized = {}; for (const u in obj) { - if (hasOwnProperty2(obj, u)) { + if (hasOwnProperty(obj, u)) { const v = obj[u]; if (v === void 0 || v === null) continue; @@ -1787,7 +1787,7 @@ var require_lib = __commonJS({ var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); function int(match3, pos, fallback) { const m = match3[pos]; - return isUndefined2(m) ? fallback : parseInteger(m); + return isUndefined(m) ? fallback : parseInteger(m); } function extractISOYmd(match3, cursor) { const item = { @@ -2083,7 +2083,7 @@ var require_lib = __commonJS({ function normalizeValues(matrix, vals) { const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1; orderedUnits$1.reduceRight((previous, current) => { - if (!isUndefined2(vals[current])) { + if (!isUndefined(vals[current])) { if (previous) { const previousVal = vals[previous] * factor; const conv = matrix[current][previous]; @@ -2097,7 +2097,7 @@ var require_lib = __commonJS({ } }, null); orderedUnits$1.reduce((previous, current) => { - if (!isUndefined2(vals[current])) { + if (!isUndefined(vals[current])) { if (previous) { const fraction = vals[previous] % 1; vals[previous] -= fraction; @@ -2191,7 +2191,7 @@ var require_lib = __commonJS({ * @return {Duration} */ static fromDurationLike(durationLike) { - if (isNumber2(durationLike)) { + if (isNumber(durationLike)) { return Duration.fromMillis(durationLike); } else if (Duration.isDuration(durationLike)) { return durationLike; @@ -2364,7 +2364,7 @@ var require_lib = __commonJS({ return INVALID$2; const l3 = orderedUnits$1.map((unit3) => { const val = this.values[unit3]; - if (isUndefined2(val)) { + if (isUndefined(val)) { return null; } return this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...opts, unit: unit3.slice(0, -1) }).format(val); @@ -2488,7 +2488,7 @@ var require_lib = __commonJS({ return this; const dur = Duration.fromDurationLike(duration), result = {}; for (const k of orderedUnits$1) { - if (hasOwnProperty2(dur.values, k) || hasOwnProperty2(this.values, k)) { + if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { result[k] = dur.get(k) + this.get(k); } } @@ -2621,13 +2621,13 @@ var require_lib = __commonJS({ own += this.matrix[ak][k] * accumulated[ak]; accumulated[ak] = 0; } - if (isNumber2(vals[k])) { + if (isNumber(vals[k])) { own += vals[k]; } const i = Math.trunc(own); built[k] = i; accumulated[k] = (own * 1e3 - i * 1e3) / 1e3; - } else if (isNumber2(vals[k])) { + } else if (isNumber(vals[k])) { accumulated[k] = vals[k]; } } @@ -3587,8 +3587,8 @@ var require_lib = __commonJS({ return value; } } - function digitRegex({ numberingSystem }, append3 = "") { - return new RegExp(`${numberingSystems[numberingSystem || "latn"]}${append3}`); + function digitRegex({ numberingSystem }, append2 = "") { + return new RegExp(`${numberingSystems[numberingSystem || "latn"]}${append2}`); } var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; function intUnit(regex, post = (i) => i) { @@ -3821,18 +3821,18 @@ var require_lib = __commonJS({ function match2(input, regex, handlers) { const matches = input.match(regex); if (matches) { - const all3 = {}; + const all = {}; let matchIndex = 1; for (const i in handlers) { - if (hasOwnProperty2(handlers, i)) { + if (hasOwnProperty(handlers, i)) { const h = handlers[i], groups = h.groups ? h.groups + 1 : 1; if (!h.literal && h.token) { - all3[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); + all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); } matchIndex += groups; } } - return [matches, all3]; + return [matches, all]; } else { return [matches, {}]; } @@ -3873,19 +3873,19 @@ var require_lib = __commonJS({ }; let zone = null; let specificOffset; - if (!isUndefined2(matches.z)) { + if (!isUndefined(matches.z)) { zone = IANAZone.create(matches.z); } - if (!isUndefined2(matches.Z)) { + if (!isUndefined(matches.Z)) { if (!zone) { zone = new FixedOffsetZone(matches.Z); } specificOffset = matches.Z; } - if (!isUndefined2(matches.q)) { + if (!isUndefined(matches.q)) { matches.M = (matches.q - 1) * 3 + 1; } - if (!isUndefined2(matches.h)) { + if (!isUndefined(matches.h)) { if (matches.h < 12 && matches.a === 1) { matches.h += 12; } else if (matches.h === 12 && matches.a === 0) { @@ -3895,7 +3895,7 @@ var require_lib = __commonJS({ if (matches.G === 0 && matches.y) { matches.y = -matches.y; } - if (!isUndefined2(matches.u)) { + if (!isUndefined(matches.u)) { matches.S = parseMillis(matches.u); } const vals = Object.keys(matches).reduce((r2, k) => { @@ -3934,7 +3934,7 @@ var require_lib = __commonJS({ return { input, tokens, invalidReason: disqualifyingUnit.invalidReason }; } else { const [regexString, handlers] = buildRegex(units), regex = RegExp(regexString, "i"), [rawMatches, matches] = match2(input, regex, handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0]; - if (hasOwnProperty2(matches, "a") && hasOwnProperty2(matches, "H")) { + if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { throw new ConflictingSpecificationError( "Can't include meridiem when specifying 24-hour format" ); @@ -4282,9 +4282,9 @@ var require_lib = __commonJS({ function quickDT(obj, opts) { const zone = normalizeZone(opts.zone, Settings.defaultZone), loc = Locale.fromObject(opts), tsNow = Settings.now(); let ts, o3; - if (!isUndefined2(obj.year)) { + if (!isUndefined(obj.year)) { for (const u of orderedUnits) { - if (isUndefined2(obj[u])) { + if (isUndefined(obj[u])) { obj[u] = defaultUnitValues[u]; } } @@ -4300,8 +4300,8 @@ var require_lib = __commonJS({ return new DateTime({ ts, zone, loc, o: o3 }); } function diffRelative(start, end, opts) { - const round = isUndefined2(opts.round) ? true : opts.round, format3 = (c, unit3) => { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); + const round2 = isUndefined(opts.round) ? true : opts.round, format3 = (c, unit3) => { + c = roundTo(c, round2 || opts.calendary ? 0 : 2, true); const formatter = end.loc.clone(opts).relFormatter(opts); return formatter.format(c, unit3); }, differ = (unit3) => { @@ -4342,7 +4342,7 @@ var require_lib = __commonJS({ constructor(config) { const zone = config.zone || Settings.defaultZone; let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - this.ts = isUndefined2(config.ts) ? Settings.now() : config.ts; + this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; let c = null, o3 = null; if (!invalid) { const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); @@ -4437,7 +4437,7 @@ var require_lib = __commonJS({ * @return {DateTime} */ static fromJSDate(date4, options = {}) { - const ts = isDate2(date4) ? date4.valueOf() : NaN; + const ts = isDate(date4) ? date4.valueOf() : NaN; if (Number.isNaN(ts)) { return DateTime.invalid("invalid input"); } @@ -4462,7 +4462,7 @@ var require_lib = __commonJS({ * @return {DateTime} */ static fromMillis(milliseconds, options = {}) { - if (!isNumber2(milliseconds)) { + if (!isNumber(milliseconds)) { throw new InvalidArgumentError( `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}` ); @@ -4487,7 +4487,7 @@ var require_lib = __commonJS({ * @return {DateTime} */ static fromSeconds(seconds, options = {}) { - if (!isNumber2(seconds)) { + if (!isNumber(seconds)) { throw new InvalidArgumentError("fromSeconds requires a numerical input"); } else { return new DateTime({ @@ -4531,7 +4531,7 @@ var require_lib = __commonJS({ if (!zoneToUse.isValid) { return DateTime.invalid(unsupportedZone(zoneToUse)); } - const tsNow = Settings.now(), offsetProvis = !isUndefined2(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts); + const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts); if ((containsGregor || containsOrdinal) && definiteWeekDef) { throw new ConflictingSpecificationError( "Can't mix weekYear/weekNumber units with year/month/day or ordinals" @@ -4557,7 +4557,7 @@ var require_lib = __commonJS({ let foundFirst = false; for (const u of units) { const v = normalized[u]; - if (!isUndefined2(v)) { + if (!isUndefined(v)) { foundFirst = true; } else if (foundFirst) { normalized[u] = defaultValues[u]; @@ -4654,7 +4654,7 @@ var require_lib = __commonJS({ * @return {DateTime} */ static fromFormat(text, fmt, opts = {}) { - if (isUndefined2(text) || isUndefined2(fmt)) { + if (isUndefined(text) || isUndefined(fmt)) { throw new InvalidArgumentError("fromFormat requires an input string and a format"); } const { locale: locale6 = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({ @@ -5167,7 +5167,7 @@ var require_lib = __commonJS({ set(values) { if (!this.isValid) return this; - const normalized = normalizeObject(values, normalizeUnit), settingWeekStuff = !isUndefined2(normalized.weekYear) || !isUndefined2(normalized.weekNumber) || !isUndefined2(normalized.weekday), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + const normalized = normalizeObject(values, normalizeUnit), settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; if ((containsGregor || containsOrdinal) && definiteWeekDef) { throw new ConflictingSpecificationError( "Can't mix weekYear/weekNumber units with year/month/day or ordinals" @@ -5179,11 +5179,11 @@ var require_lib = __commonJS({ let mixed; if (settingWeekStuff) { mixed = weekToGregorian({ ...gregorianToWeek(this.c), ...normalized }); - } else if (!isUndefined2(normalized.ordinal)) { + } else if (!isUndefined(normalized.ordinal)) { mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized }); } else { mixed = { ...this.toObject(), ...normalized }; - if (isUndefined2(normalized.day)) { + if (isUndefined(normalized.day)) { mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); } } @@ -5895,7 +5895,7 @@ var require_lib = __commonJS({ function friendlyDateTime(dateTimeish) { if (DateTime.isDateTime(dateTimeish)) { return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber2(dateTimeish.valueOf())) { + } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { return DateTime.fromJSDate(dateTimeish); } else if (dateTimeish && typeof dateTimeish === "object") { return DateTime.fromObject(dateTimeish); @@ -6683,7 +6683,7 @@ var require_lib = __commonJS({ } var Values; (function(Values2) { - function toString3(field, setting = DEFAULT_QUERY_SETTINGS, recursive = false) { + function toString(field, setting = DEFAULT_QUERY_SETTINGS, recursive = false) { let wrapped = wrapValue(field); if (!wrapped) return setting.renderNullAs; @@ -6707,12 +6707,12 @@ var require_lib = __commonJS({ let result = ""; if (recursive) result += "["; - result += wrapped.value.map((f) => toString3(f, setting, true)).join(", "); + result += wrapped.value.map((f) => toString(f, setting, true)).join(", "); if (recursive) result += "]"; return result; case "object": - return "{ " + Object.entries(wrapped.value).map((e3) => e3[0] + ": " + toString3(e3[1], setting, true)).join(", ") + " }"; + return "{ " + Object.entries(wrapped.value).map((e3) => e3[0] + ": " + toString(e3[1], setting, true)).join(", ") + " }"; case "date": if (wrapped.value.second == 0 && wrapped.value.hour == 0 && wrapped.value.minute == 0) { return wrapped.value.toFormat(setting.defaultDateFormat); @@ -6722,43 +6722,43 @@ var require_lib = __commonJS({ return renderMinimalDuration(wrapped.value); } } - Values2.toString = toString3; + Values2.toString = toString; function wrapValue(val) { if (isNull(val)) return { type: "null", value: val }; - else if (isNumber3(val)) + else if (isNumber2(val)) return { type: "number", value: val }; - else if (isString4(val)) + else if (isString3(val)) return { type: "string", value: val }; - else if (isBoolean2(val)) + else if (isBoolean(val)) return { type: "boolean", value: val }; else if (isDuration(val)) return { type: "duration", value: val }; - else if (isDate3(val)) + else if (isDate2(val)) return { type: "date", value: val }; else if (isWidget(val)) return { type: "widget", value: val }; - else if (isArray2(val)) + else if (isArray(val)) return { type: "array", value: val }; else if (isLink(val)) return { type: "link", value: val }; - else if (isFunction2(val)) + else if (isFunction(val)) return { type: "function", value: val }; else if (isHtml(val)) return { type: "html", value: val }; - else if (isObject3(val)) + else if (isObject2(val)) return { type: "object", value: val }; else return void 0; } Values2.wrapValue = wrapValue; function mapLeaves(val, func) { - if (isObject3(val)) { + if (isObject2(val)) { let result = {}; for (let [key, value] of Object.entries(val)) result[key] = mapLeaves(value, func); return result; - } else if (isArray2(val)) { + } else if (isArray(val)) { let result = []; for (let value of val) result.push(mapLeaves(value, func)); @@ -6911,18 +6911,18 @@ var require_lib = __commonJS({ } } Values2.deepCopy = deepCopy; - function isString4(val) { + function isString3(val) { return typeof val == "string"; } - Values2.isString = isString4; - function isNumber3(val) { + Values2.isString = isString3; + function isNumber2(val) { return typeof val == "number"; } - Values2.isNumber = isNumber3; - function isDate3(val) { + Values2.isNumber = isNumber2; + function isDate2(val) { return val instanceof DateTime; } - Values2.isDate = isDate3; + Values2.isDate = isDate2; function isDuration(val) { return val instanceof Duration; } @@ -6931,14 +6931,14 @@ var require_lib = __commonJS({ return val === null || val === void 0; } Values2.isNull = isNull; - function isArray2(val) { + function isArray(val) { return Array.isArray(val); } - Values2.isArray = isArray2; - function isBoolean2(val) { + Values2.isArray = isArray; + function isBoolean(val) { return typeof val === "boolean"; } - Values2.isBoolean = isBoolean2; + Values2.isBoolean = isBoolean; function isLink(val) { return val instanceof Link2; } @@ -6955,14 +6955,14 @@ var require_lib = __commonJS({ } } Values2.isHtml = isHtml; - function isObject3(val) { - return typeof val == "object" && !isHtml(val) && !isWidget(val) && !isArray2(val) && !isDuration(val) && !isDate3(val) && !isLink(val) && val !== void 0 && !isNull(val); + function isObject2(val) { + return typeof val == "object" && !isHtml(val) && !isWidget(val) && !isArray(val) && !isDuration(val) && !isDate2(val) && !isLink(val) && val !== void 0 && !isNull(val); } - Values2.isObject = isObject3; - function isFunction2(val) { + Values2.isObject = isObject2; + function isFunction(val) { return typeof val == "function"; } - Values2.isFunction = isFunction2; + Values2.isFunction = isFunction; })(Values || (Values = {})); var Groupings; (function(Groupings2) { @@ -7653,9 +7653,9 @@ var require_lib = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/interopRequireDefault.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/interopRequireDefault.js var require_interopRequireDefault = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) { function _interopRequireDefault(e3) { return e3 && e3.__esModule ? e3 : { "default": e3 @@ -7665,9 +7665,9 @@ var require_interopRequireDefault = __commonJS({ } }); -// node_modules/.pnpm/rc-pagination@4.2.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/en_US.js +// node_modules/.pnpm/rc-pagination@4.3.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/en_US.js var require_en_US = __commonJS({ - "node_modules/.pnpm/rc-pagination@4.2.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/en_US.js"(exports) { + "node_modules/.pnpm/rc-pagination@4.3.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/en_US.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -7692,9 +7692,9 @@ var require_en_US = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/typeof.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/typeof.js var require_typeof = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/typeof.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/typeof.js"(exports, module2) { function _typeof2(o3) { "@babel/helpers - typeof"; return module2.exports = _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o4) { @@ -7707,9 +7707,9 @@ var require_typeof = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/toPrimitive.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/toPrimitive.js var require_toPrimitive = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module2) { var _typeof2 = require_typeof()["default"]; function toPrimitive2(t2, r2) { if ("object" != _typeof2(t2) || !t2) @@ -7727,9 +7727,9 @@ var require_toPrimitive = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/toPropertyKey.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/toPropertyKey.js var require_toPropertyKey = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module2) { var _typeof2 = require_typeof()["default"]; var toPrimitive2 = require_toPrimitive(); function toPropertyKey2(t2) { @@ -7740,9 +7740,9 @@ var require_toPropertyKey = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/defineProperty.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/defineProperty.js var require_defineProperty = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module2) { var toPropertyKey2 = require_toPropertyKey(); function _defineProperty2(e3, r2, t2) { return (r2 = toPropertyKey2(r2)) in e3 ? Object.defineProperty(e3, r2, { @@ -7756,9 +7756,9 @@ var require_defineProperty = __commonJS({ } }); -// node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/objectSpread2.js +// node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/objectSpread2.js var require_objectSpread2 = __commonJS({ - "node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/objectSpread2.js"(exports, module2) { + "node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/objectSpread2.js"(exports, module2) { var defineProperty = require_defineProperty(); function ownKeys2(e3, r2) { var t2 = Object.keys(e3); @@ -7785,9 +7785,9 @@ var require_objectSpread2 = __commonJS({ } }); -// node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/common.js +// node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/common.js var require_common = __commonJS({ - "node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/common.js"(exports) { + "node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/common.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -7802,9 +7802,9 @@ var require_common = __commonJS({ } }); -// node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/en_US.js +// node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/en_US.js var require_en_US2 = __commonJS({ - "node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/en_US.js"(exports) { + "node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/en_US.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -7843,9 +7843,9 @@ var require_en_US2 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/en_US.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/en_US.js var require_en_US3 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/en_US.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/en_US.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -7859,9 +7859,9 @@ var require_en_US3 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/en_US.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/en_US.js var require_en_US4 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/en_US.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/en_US.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -7889,9 +7889,9 @@ var require_en_US4 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/en_US.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/en_US.js var require_en_US5 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/en_US.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/en_US.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -7903,9 +7903,9 @@ var require_en_US5 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/en_US.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/en_US.js var require_en_US6 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/en_US.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/en_US.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -8061,16 +8061,16 @@ var require_en_US6 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/en_US.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/en_US.js var require_en_US7 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/en_US.js"(exports, module2) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/en_US.js"(exports, module2) { module2.exports = require_en_US6(); } }); -// node_modules/.pnpm/rc-pagination@4.2.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/zh_CN.js +// node_modules/.pnpm/rc-pagination@4.3.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/zh_CN.js var require_zh_CN = __commonJS({ - "node_modules/.pnpm/rc-pagination@4.2.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/rc-pagination@4.3.0_react-dom@18.3.1_react@18.3.1/node_modules/rc-pagination/lib/locale/zh_CN.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -8095,9 +8095,9 @@ var require_zh_CN = __commonJS({ } }); -// node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/zh_CN.js +// node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/zh_CN.js var require_zh_CN2 = __commonJS({ - "node_modules/.pnpm/rc-picker@4.6.13_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/rc-picker@4.6.15_dayjs@1.11.12_react-dom@18.3.1_react@18.3.1/node_modules/rc-picker/lib/locale/zh_CN.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -8137,9 +8137,9 @@ var require_zh_CN2 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/zh_CN.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/zh_CN.js var require_zh_CN3 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/time-picker/locale/zh_CN.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -8153,9 +8153,9 @@ var require_zh_CN3 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/zh_CN.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/zh_CN.js var require_zh_CN4 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/date-picker/locale/zh_CN.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -8184,9 +8184,9 @@ var require_zh_CN4 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/zh_CN.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/zh_CN.js var require_zh_CN5 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/calendar/locale/zh_CN.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -8198,9 +8198,9 @@ var require_zh_CN5 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/zh_CN.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/zh_CN.js var require_zh_CN6 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/zh_CN.js"(exports) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/lib/locale/zh_CN.js"(exports) { "use strict"; var _interopRequireDefault = require_interopRequireDefault().default; Object.defineProperty(exports, "__esModule", { @@ -8357,9 +8357,9 @@ var require_zh_CN6 = __commonJS({ } }); -// node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/zh_CN.js +// node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/zh_CN.js var require_zh_CN7 = __commonJS({ - "node_modules/.pnpm/antd@5.20.1_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/zh_CN.js"(exports, module2) { + "node_modules/.pnpm/antd@5.21.6_react-dom@18.3.1_react@18.3.1/node_modules/antd/locale/zh_CN.js"(exports, module2) { module2.exports = require_zh_CN6(); } }); @@ -10772,7 +10772,7 @@ var require_react_development = __commonJS({ return refObject; } var isArrayImpl = Array.isArray; - function isArray2(a) { + function isArray(a) { return isArrayImpl(a); } function typeName(value) { @@ -10873,7 +10873,7 @@ var require_react_development = __commonJS({ } return null; } - var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { key: true, ref: true, @@ -10886,7 +10886,7 @@ var require_react_development = __commonJS({ } function hasValidRef(config) { { - if (hasOwnProperty2.call(config, "ref")) { + if (hasOwnProperty.call(config, "ref")) { var getter = Object.getOwnPropertyDescriptor(config, "ref").get; if (getter && getter.isReactWarning) { return false; @@ -10897,7 +10897,7 @@ var require_react_development = __commonJS({ } function hasValidKey(config) { { - if (hasOwnProperty2.call(config, "key")) { + if (hasOwnProperty.call(config, "key")) { var getter = Object.getOwnPropertyDescriptor(config, "key").get; if (getter && getter.isReactWarning) { return false; @@ -10986,7 +10986,7 @@ var require_react_development = __commonJS({ } return element; }; - function createElement167(type5, config, children) { + function createElement166(type5, config, children) { var propName; var props = {}; var key = null; @@ -11009,7 +11009,7 @@ var require_react_development = __commonJS({ self2 = config.__self === void 0 ? null : config.__self; source = config.__source === void 0 ? null : config.__source; for (propName in config) { - if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -11081,7 +11081,7 @@ var require_react_development = __commonJS({ defaultProps = element.type.defaultProps; } for (propName in config) { - if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === void 0 && defaultProps !== void 0) { props[propName] = defaultProps[propName]; } else { @@ -11158,7 +11158,7 @@ var require_react_development = __commonJS({ var _child = children; var mappedChild = callback(_child); var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; - if (isArray2(mappedChild)) { + if (isArray(mappedChild)) { var escapedChildKey = ""; if (childKey != null) { escapedChildKey = escapeUserProvidedKey(childKey) + "/"; @@ -11193,7 +11193,7 @@ var require_react_development = __commonJS({ var nextName; var subtreeCount = 0; var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; - if (isArray2(children)) { + if (isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = nextNamePrefix + getElementKey(child, i); @@ -11249,7 +11249,7 @@ var require_react_development = __commonJS({ forEachFunc.apply(this, arguments); }, forEachContext); } - function toArray8(children) { + function toArray7(children) { return mapChildren(children, function(child) { return child; }) || []; @@ -11447,7 +11447,7 @@ var require_react_development = __commonJS({ } return lazyType; } - function forwardRef98(render2) { + function forwardRef99(render2) { { if (render2 != null && render2.$$typeof === REACT_MEMO_TYPE) { error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); @@ -11560,7 +11560,7 @@ var require_react_development = __commonJS({ } return dispatcher.useContext(Context3); } - function useState65(initialState) { + function useState66(initialState) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState); } @@ -11568,7 +11568,7 @@ var require_react_development = __commonJS({ var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer, initialArg, init); } - function useRef105(initialValue) { + function useRef107(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } @@ -11584,11 +11584,11 @@ var require_react_development = __commonJS({ var dispatcher = resolveDispatcher(); return dispatcher.useLayoutEffect(create, deps); } - function useCallback21(callback, deps) { + function useCallback22(callback, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useCallback(callback, deps); } - function useMemo80(create, deps) { + function useMemo87(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useMemo(create, deps); } @@ -11826,8 +11826,8 @@ var require_react_development = __commonJS({ } } function shouldConstruct(Component8) { - var prototype3 = Component8.prototype; - return !!(prototype3 && prototype3.isReactComponent); + var prototype = Component8.prototype; + return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type5, source, ownerFn) { if (type5 == null) { @@ -11881,7 +11881,7 @@ var require_react_development = __commonJS({ } function checkPropTypes(typeSpecs, values, location, componentName, element) { { - var has = Function.call.bind(hasOwnProperty2); + var has = Function.call.bind(hasOwnProperty); for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error$1 = void 0; @@ -11983,7 +11983,7 @@ var require_react_development = __commonJS({ if (typeof node2 !== "object") { return; } - if (isArray2(node2)) { + if (isArray(node2)) { for (var i = 0; i < node2.length; i++) { var child = node2[i]; if (isValidElement19(child)) { @@ -12073,7 +12073,7 @@ var require_react_development = __commonJS({ var typeString; if (type5 === null) { typeString = "null"; - } else if (isArray2(type5)) { + } else if (isArray(type5)) { typeString = "array"; } else if (type5 !== void 0 && type5.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentNameFromType(type5.type) || "Unknown") + " />"; @@ -12085,7 +12085,7 @@ var require_react_development = __commonJS({ error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); } } - var element = createElement167.apply(this, arguments); + var element = createElement166.apply(this, arguments); if (element == null) { return element; } @@ -12328,7 +12328,7 @@ var require_react_development = __commonJS({ map: mapChildren, forEach: forEachChildren, count: countChildren, - toArray: toArray8, + toArray: toArray7, only: onlyChild }; exports.Children = Children3; @@ -12345,13 +12345,13 @@ var require_react_development = __commonJS({ exports.createElement = createElement$1; exports.createFactory = createFactory; exports.createRef = createRef2; - exports.forwardRef = forwardRef98; + exports.forwardRef = forwardRef99; exports.isValidElement = isValidElement19; exports.lazy = lazy; exports.memo = memo7; exports.startTransition = startTransition; exports.unstable_act = act; - exports.useCallback = useCallback21; + exports.useCallback = useCallback22; exports.useContext = useContext104; exports.useDebugValue = useDebugValue; exports.useDeferredValue = useDeferredValue; @@ -12360,10 +12360,10 @@ var require_react_development = __commonJS({ exports.useImperativeHandle = useImperativeHandle29; exports.useInsertionEffect = useInsertionEffect3; exports.useLayoutEffect = useLayoutEffect7; - exports.useMemo = useMemo80; + exports.useMemo = useMemo87; exports.useReducer = useReducer2; - exports.useRef = useRef105; - exports.useState = useState65; + exports.useRef = useRef107; + exports.useState = useState66; exports.useSyncExternalStore = useSyncExternalStore; exports.useTransition = useTransition; exports.version = ReactVersion; @@ -12859,9 +12859,9 @@ var require_react_dom_development = __commonJS({ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React305 = require_react(); + var React313 = require_react(); var Scheduler = require_scheduler(); - var ReactSharedInternals = React305.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + var ReactSharedInternals = React313.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var suppressWarning = false; function setSuppressWarning(newSuppressWarning) { { @@ -12965,7 +12965,7 @@ var require_react_dom_development = __commonJS({ } } var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); - var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var hasOwnProperty = Object.prototype.hasOwnProperty; function typeName(value) { { var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; @@ -13047,10 +13047,10 @@ var require_react_dom_development = __commonJS({ var illegalAttributeNameCache = {}; var validatedAttributeNameCache = {}; function isAttributeNameSafe(attributeName) { - if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName)) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { return true; } - if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName)) { + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { return false; } if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { @@ -13897,8 +13897,8 @@ var require_react_dom_development = __commonJS({ } } function shouldConstruct(Component7) { - var prototype3 = Component7.prototype; - return !!(prototype3 && prototype3.isReactComponent); + var prototype = Component7.prototype; + return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type5, source, ownerFn) { if (type5 == null) { @@ -14158,7 +14158,7 @@ var require_react_dom_development = __commonJS({ isRendering = rendering; } } - function toString3(value) { + function toString(value) { return "" + value; } function getToStringValue(value) { @@ -14363,10 +14363,10 @@ var require_react_dom_development = __commonJS({ if (value === 0 && node2.value === "" || // We explicitly want to coerce to number here if possible. // eslint-disable-next-line node2.value != value) { - node2.value = toString3(value); + node2.value = toString(value); } - } else if (node2.value !== toString3(value)) { - node2.value = toString3(value); + } else if (node2.value !== toString(value)) { + node2.value = toString(value); } } else if (type5 === "submit" || type5 === "reset") { node2.removeAttribute("value"); @@ -14393,7 +14393,7 @@ var require_react_dom_development = __commonJS({ if (isButton && (props.value === void 0 || props.value === null)) { return; } - var initialValue = toString3(node2._wrapperState.initialValue); + var initialValue = toString(node2._wrapperState.initialValue); if (!isHydrating2) { { if (initialValue !== node2.value) { @@ -14453,9 +14453,9 @@ var require_react_dom_development = __commonJS({ type5 !== "number" || getActiveElement(node2.ownerDocument) !== node2 ) { if (value == null) { - node2.defaultValue = toString3(node2._wrapperState.initialValue); - } else if (node2.defaultValue !== toString3(value)) { - node2.defaultValue = toString3(value); + node2.defaultValue = toString(node2._wrapperState.initialValue); + } else if (node2.defaultValue !== toString(value)) { + node2.defaultValue = toString(value); } } } @@ -14466,7 +14466,7 @@ var require_react_dom_development = __commonJS({ { if (props.value == null) { if (typeof props.children === "object" && props.children !== null) { - React305.Children.forEach(props.children, function(child) { + React313.Children.forEach(props.children, function(child) { if (child == null) { return; } @@ -14493,11 +14493,11 @@ var require_react_dom_development = __commonJS({ } function postMountWrapper$1(element, props) { if (props.value != null) { - element.setAttribute("value", toString3(getToStringValue(props.value))); + element.setAttribute("value", toString(getToStringValue(props.value))); } } var isArrayImpl = Array.isArray; - function isArray2(a) { + function isArray(a) { return isArrayImpl(a); } var didWarnValueDefaultValue$1; @@ -14520,7 +14520,7 @@ var require_react_dom_development = __commonJS({ if (props[propName] == null) { continue; } - var propNameIsArray = isArray2(props[propName]); + var propNameIsArray = isArray(props[propName]); if (props.multiple && !propNameIsArray) { error("The `%s` prop supplied to