diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 6c5be0b2..0725aa4e 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -25,5 +25,6 @@ "obsidian-plantuml", "obsidian-hover-editor", "find-unlinked-files", - "obsidian-git" + "obsidian-git", + "obsidian-tasks-plugin" ] \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tasks-plugin/data.json b/.obsidian/plugins/obsidian-tasks-plugin/data.json new file mode 100644 index 00000000..15850ebe --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/data.json @@ -0,0 +1,257 @@ +{ + "globalQuery": "", + "globalFilter": "", + "removeGlobalFilter": false, + "taskFormat": "tasksPluginEmoji", + "setCreatedDate": false, + "setDoneDate": true, + "setCancelledDate": true, + "autoSuggestInEditor": true, + "autoSuggestMinMatch": 0, + "autoSuggestMaxItems": 20, + "provideAccessKeys": true, + "useFilenameAsScheduledDate": false, + "filenameAsScheduledDateFormat": "", + "filenameAsDateFolders": [], + "recurrenceOnNextLine": false, + "statusSettings": { + "coreStatuses": [ + { + "symbol": " ", + "name": "Todo", + "nextStatusSymbol": "x", + "availableAsCommand": true, + "type": "TODO" + }, + { + "symbol": "x", + "name": "Done", + "nextStatusSymbol": " ", + "availableAsCommand": true, + "type": "DONE" + } + ], + "customStatuses": [ + { + "symbol": "/", + "name": "In Progress", + "nextStatusSymbol": "x", + "availableAsCommand": true, + "type": "IN_PROGRESS" + }, + { + "symbol": "-", + "name": "Cancelled", + "nextStatusSymbol": " ", + "availableAsCommand": true, + "type": "CANCELLED" + }, + { + "symbol": " ", + "name": "Unchecked", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "x", + "name": "Checked", + "nextStatusSymbol": " ", + "availableAsCommand": false, + "type": "DONE" + }, + { + "symbol": ">", + "name": "Rescheduled", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "<", + "name": "Scheduled", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "!", + "name": "Important", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "?", + "name": "Question", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "*", + "name": "Star", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "n", + "name": "Note", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "l", + "name": "Location", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "i", + "name": "Information", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "I", + "name": "Idea", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "S", + "name": "Amount", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "p", + "name": "Pro", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "c", + "name": "Con", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "b", + "name": "Bookmark", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "\"", + "name": "Quote", + "nextStatusSymbol": "x", + "availableAsCommand": false, + "type": "TODO" + }, + { + "symbol": "0", + "name": "Speech bubble 0", + "nextStatusSymbol": "0", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "1", + "name": "Speech bubble 1", + "nextStatusSymbol": "1", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "2", + "name": "Speech bubble 2", + "nextStatusSymbol": "2", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "3", + "name": "Speech bubble 3", + "nextStatusSymbol": "3", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "4", + "name": "Speech bubble 4", + "nextStatusSymbol": "4", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "5", + "name": "Speech bubble 5", + "nextStatusSymbol": "5", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "6", + "name": "Speech bubble 6", + "nextStatusSymbol": "6", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "7", + "name": "Speech bubble 7", + "nextStatusSymbol": "7", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "8", + "name": "Speech bubble 8", + "nextStatusSymbol": "8", + "availableAsCommand": false, + "type": "NON_TASK" + }, + { + "symbol": "9", + "name": "Speech bubble 9", + "nextStatusSymbol": "9", + "availableAsCommand": false, + "type": "NON_TASK" + } + ] + }, + "features": { + "INTERNAL_TESTING_ENABLED_BY_DEFAULT": true + }, + "generalSettings": {}, + "headingOpened": { + "Core Statuses": true, + "Custom Statuses": true + }, + "debugSettings": { + "ignoreSortInstructions": false, + "showTaskHiddenData": false, + "recordTimings": false + }, + "loggingOptions": { + "minLevels": { + "": "info", + "tasks": "info", + "tasks.Cache": "info", + "tasks.Events": "info", + "tasks.File": "info", + "tasks.Query": "info", + "tasks.Task": "info" + } + } +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js new file mode 100644 index 00000000..db431e72 --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -0,0 +1,382 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository +*/ + +/* +License obsidian-tasks: +MIT License + +Copyright (c) 2021 Martin Schenck and Clare Macrae + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +/* +License rrule (included library): +rrule.js: Library for working with recurrence rules for calendar dates. +======================================================================= + +Copyright 2010, Jakub Roztocil and Lars Schöning + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of The author nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE: + +python-dateutil - Extensions to the standard Python datetime module. +==================================================================== + +Copyright (c) 2003-2011 - Gustavo Niemeyer +Copyright (c) 2012 - Tomi Pieviläinen + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +License chrono-node (included library): +The MIT License + +Copyright (c) 2014, Wanasit Tanakitrungruang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +"use strict";var Kk=Object.create;var na=Object.defineProperty,Qk=Object.defineProperties,Xk=Object.getOwnPropertyDescriptor,Zk=Object.getOwnPropertyDescriptors,Jk=Object.getOwnPropertyNames,Go=Object.getOwnPropertySymbols,eE=Object.getPrototypeOf,_c=Object.prototype.hasOwnProperty,Bh=Object.prototype.propertyIsEnumerable;var Yh=(r,e,t)=>e in r?na(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,K=(r,e)=>{for(var t in e||(e={}))_c.call(e,t)&&Yh(r,t,e[t]);if(Go)for(var t of Go(e))Bh.call(e,t)&&Yh(r,t,e[t]);return r},he=(r,e)=>Qk(r,Zk(e));var Yo=(r,e)=>{var t={};for(var n in r)_c.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Go)for(var n of Go(r))e.indexOf(n)<0&&Bh.call(r,n)&&(t[n]=r[n]);return t};var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),tE=(r,e)=>{for(var t in e)na(r,t,{get:e[t],enumerable:!0})},Hh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jk(e))!_c.call(r,i)&&i!==t&&na(r,i,{get:()=>e[i],enumerable:!(n=Xk(e,i))||n.enumerable});return r};var ia=(r,e,t)=>(t=r!=null?Kk(eE(r)):{},Hh(e||!r||!r.__esModule?na(t,"default",{value:r,enumerable:!0}):t,r)),rE=r=>Hh(na({},"__esModule",{value:!0}),r);var P=(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(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.matchAnyPattern=Fn.extractTerms=Fn.repeatedTimeunitPattern=void 0;function aE(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Fn.repeatedTimeunitPattern=aE;function Vh(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Fn.extractTerms=Vh;function oE(r){return`(?:${Vh(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Fn.matchAnyPattern=oE});var we=E((wc,kc)=>{(function(r,e){typeof wc=="object"&&typeof kc!="undefined"?kc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(wc,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",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,T={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("_")},k=function(j,$,D){var V=String(j);return!V||V.length>=$?j:""+Array($+1-V.length).join(D)+j},S={s:k,z:function(j){var $=-j.utcOffset(),D=Math.abs($),V=Math.floor(D/60),W=D%60;return($<=0?"+":"-")+k(V,2,"0")+":"+k(W,2,"0")},m:function j($,D){if($.date(){"use strict";var uE=Ln&&Ln.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.findYearClosestToRef=Ln.findMostLikelyADYear=void 0;var lE=uE(we());function cE(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Ln.findMostLikelyADYear=cE;function dE(r,e,t){let n=lE.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(ce,"__esModule",{value:!0});ce.parseTimeUnits=ce.TIME_UNITS_PATTERN=ce.parseYear=ce.YEAR_PATTERN=ce.parseOrdinalNumberPattern=ce.ORDINAL_NUMBER_PATTERN=ce.parseNumberPattern=ce.NUMBER_PATTERN=ce.TIME_UNIT_DICTIONARY=ce.ORDINAL_WORD_DICTIONARY=ce.INTEGER_WORD_DICTIONARY=ce.MONTH_DICTIONARY=ce.FULL_MONTH_NAME_DICTIONARY=ce.WEEKDAY_DICTIONARY=void 0;var Vo=Re(),fE=ot();ce.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};ce.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};ce.MONTH_DICTIONARY=Object.assign(Object.assign({},ce.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});ce.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};ce.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};ce.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"};ce.NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ce.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 Kh(r){let e=r.toLowerCase();return ce.INTEGER_WORD_DICTIONARY[e]!==void 0?ce.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)}ce.parseNumberPattern=Kh;ce.ORDINAL_NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(ce.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function pE(r){let e=r.toLowerCase();return ce.ORDINAL_WORD_DICTIONARY[e]!==void 0?ce.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ce.parseOrdinalNumberPattern=pE;ce.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 mE(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 fE.findMostLikelyADYear(e)}ce.parseYear=mE;var Qh=`(${ce.NUMBER_PATTERN})\\s{0,3}(${Vo.matchAnyPattern(ce.TIME_UNIT_DICTIONARY)})`,zh=new RegExp(Qh,"i");ce.TIME_UNITS_PATTERN=Vo.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Qh);function hE(r){let e={},t=r,n=zh.exec(t);for(;n;)gE(e,n),t=t.substring(n[0].length).trim(),n=zh.exec(t);return e}ce.parseTimeUnits=hE;function gE(r,e){let t=Kh(e[1]),n=ce.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Xh=E((Ec,Sc)=>{(function(r,e){typeof Ec=="object"&&typeof Sc!="undefined"?Sc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Ec,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 nr=E(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.implySimilarTime=Wr.assignSimilarTime=Wr.assignSimilarDate=Wr.assignTheNextDay=void 0;var Zh=Ke();function yE(r,e){e=e.add(1,"day"),Jh(r,e),eg(r,e)}Wr.assignTheNextDay=yE;function Jh(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Wr.assignSimilarDate=Jh;function bE(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",Zh.Meridiem.AM):r.assign("meridiem",Zh.Meridiem.PM)}Wr.assignSimilarTime=bE;function eg(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Wr.implySimilarTime=eg});var tg=E(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.toTimezoneOffset=oi.TIMEZONE_ABBR_MAP=void 0;oi.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 TE(r){var e;return r==null?null:typeof r=="number"?r:(e=oi.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}oi.toTimezoneOffset=TE});var We=E(qr=>{"use strict";var rg=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ParsingResult=qr.ParsingComponents=qr.ReferenceWithTimezone=void 0;var _E=rg(Xh()),zo=rg(we()),Oc=nr(),vE=tg();zo.default.extend(_E.default);var Dc=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=vE.toTimezoneOffset(e.timezone))}};qr.ReferenceWithTimezone=Dc;var ui=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=zo.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 ui(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 zo.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=zo.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new ui(e);return t.hour||t.minute||t.second?(Oc.assignSimilarTime(i,n),Oc.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Oc.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}};qr.ParsingComponents=ui;var sa=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new ui(e),this.end=s}clone(){let e=new sa(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}', ...}]`}};qr.ParsingResult=sa});var B=E(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.AbstractParserWithWordBoundaryChecking=void 0;var xc=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(Cc,"__esModule",{value:!0});var Mc=ut(),wE=We(),kE=B(),EE=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Mc.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),SE=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Mc.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Rc=class extends kE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?SE:EE}innerExtract(e,t){let n=Mc.parseTimeUnits(t[1]);return wE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Cc.default=Rc});var lg=E(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var OE=ot(),og=ut(),ug=ut(),Qo=ut(),DE=Re(),xE=B(),RE=new RegExp(`(?:on\\s{0,3})?(${Qo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Qo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${DE.matchAnyPattern(og.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${ug.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ig=1,sg=2,ME=3,ag=4,Ac=class extends xE.AbstractParserWithWordBoundaryChecking{innerPattern(){return RE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=og.MONTH_DICTIONARY[t[ME].toLowerCase()],s=Qo.parseOrdinalNumberPattern(t[ig]);if(s>31)return t.index=t.index+t[ig].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[ag]){let a=ug.parseYear(t[ag]);n.start.assign("year",a)}else{let a=OE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[sg]){let a=Qo.parseOrdinalNumberPattern(t[sg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Pc.default=Ac});var mg=E(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var CE=ot(),fg=ut(),Xo=ut(),pg=ut(),AE=Re(),PE=B(),NE=new RegExp(`(${AE.matchAnyPattern(fg.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Xo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Xo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${pg.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),IE=1,FE=2,cg=3,dg=4,Nc=class extends PE.AbstractParserWithWordBoundaryChecking{innerPattern(){return NE}innerExtract(e,t){let n=fg.MONTH_DICTIONARY[t[IE].toLowerCase()],i=Xo.parseOrdinalNumberPattern(t[FE]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[dg]){let u=pg.parseYear(t[dg]);s.assign("year",u)}else{let u=CE.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[cg])return s;let a=Xo.parseOrdinalNumberPattern(t[cg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Ic.default=Nc});var yg=E(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Fc=ut(),LE=ot(),UE=Re(),gg=ut(),WE=B(),qE=new RegExp(`((?:in)\\s*)?(${UE.matchAnyPattern(Fc.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${gg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),$E=1,jE=2,hg=3,Lc=class extends WE.AbstractParserWithWordBoundaryChecking{innerPattern(){return qE}innerExtract(e,t){let n=t[jE].toLowerCase();if(t[0].length<=3&&!Fc.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[$E]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Fc.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[hg]){let a=gg.parseYear(t[hg]);i.start.assign("year",a)}else{let a=LE.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Uc.default=Lc});var _g=E(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var Tg=ut(),GE=Re(),YE=B(),BE=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${GE.matchAnyPattern(Tg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),HE=1,VE=2,bg=3,zE=4,Wc=class extends YE.AbstractParserWithWordBoundaryChecking{innerPattern(){return BE}innerExtract(e,t){let n=t[bg]?parseInt(t[bg]):Tg.MONTH_DICTIONARY[t[VE].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[HE]);return{day:parseInt(t[zE]),month:n,year:i}}};qc.default=Wc});var vg=E(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var KE=B(),QE=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),XE=1,ZE=2,$c=class extends KE.AbstractParserWithWordBoundaryChecking{innerPattern(){return QE}innerExtract(e,t){let n=parseInt(t[ZE]),i=parseInt(t[XE]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};jc.default=$c});var li=E(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.AbstractTimeExpressionParser=void 0;var wt=Ke();function JE(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 eS(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 wg=2,Hi=3,Zo=4,Jo=5,aa=6,Gc=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[wg]);if(o>100){if(this.strictMode||t[Hi]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Hi]!=null){if(t[Hi].length==1&&!t[aa])return null;s=parseInt(t[Hi])}if(s>=60)return null;if(o>12&&(a=wt.Meridiem.PM),t[aa]!=null){if(o>12)return null;let u=t[aa][0].toLowerCase();u=="a"&&(a=wt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=wt.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",wt.Meridiem.AM):i.imply("meridiem",wt.Meridiem.PM),t[Jo]!=null){let u=parseInt(t[Jo].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Zo]!=null){let u=parseInt(t[Zo]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Jo]!=null){let u=parseInt(t[Jo].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Zo]!=null){let u=parseInt(t[Zo]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[wg]),a=0,o=-1;if(t[Hi]!=null?a=parseInt(t[Hi]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=wt.Meridiem.PM),t[aa]!=null){if(s>12)return null;let u=t[aa][0].toLowerCase();u=="a"&&(o=wt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=wt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==wt.Meridiem.AM?(n.start.imply("meridiem",wt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",wt.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",wt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",wt.Meridiem.PM)):s>12?i.imply("meridiem",wt.Meridiem.PM):s<=12&&i.imply("meridiem",wt.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=JE(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=eS(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};eu.AbstractTimeExpressionParser=Gc});var kg=E(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var tu=Ke(),tS=li(),Yc=class extends tS.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",tu.Meridiem.PM)):i<6&&n.assign("meridiem",tu.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",tu.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",tu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Bc.default=Yc});var ir=E(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.addImpliedTimeUnits=Vi.reverseTimeUnits=void 0;function rS(r){let e={};for(let t in r)e[t]=-r[t];return e}Vi.reverseTimeUnits=rS;function nS(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}Vi.addImpliedTimeUnits=nS});var Eg=E(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Vc=ut(),iS=We(),sS=B(),aS=ir(),oS=new RegExp(`(${Vc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),uS=new RegExp(`(${Vc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Hc=class extends sS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?uS:oS}innerExtract(e,t){let n=Vc.parseTimeUnits(t[1]),i=aS.reverseTimeUnits(n);return iS.ParsingComponents.createRelativeFromReference(e.reference,i)}};zc.default=Hc});var Sg=E(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Qc=ut(),lS=We(),cS=B(),dS=new RegExp(`(${Qc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),fS=new RegExp("("+Qc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),pS=1,Kc=class extends cS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?fS:dS}innerExtract(e,t){let n=Qc.parseTimeUnits(t[pS]);return lS.ParsingComponents.createRelativeFromReference(e.reference,n)}};Xc.default=Kc});var Ki=E(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.MergingRefiner=zi.Filter=void 0;var Zc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};zi.Filter=Zc;var Jc=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}};zi.MergingRefiner=Jc});var $r=E(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var mS=Ki(),ed=class extends mS.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 hS=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var gS=hS($r()),rd=class extends gS.default{patternBetween(){return/^\s*(to|-)\s*$/i}};oa.default=rd});var Dg=E(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.mergeDateTimeComponent=Qi.mergeDateTimeResult=void 0;var yS=Ke();function bS(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=nd(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=nd(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var TS=Ki(),xg=Dg(),id=class extends TS.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()?xg.mergeDateTimeResult(t,n):xg.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};sd.default=id});var Rg=E(ua=>{"use strict";var _S=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var vS=_S(ln()),ad=class extends vS.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};ua.default=ad});var Mg=E(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var wS=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),kS={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},od=class{constructor(e){this.timezone=Object.assign(Object.assign({},kS),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=wS.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}};ud.default=od});var ru=E(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var ES=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),SS=1,OS=2,DS=3,ld=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=ES.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[OS]),o=parseInt(s[DS]||"0"),u=a*60+o;u>14*60||(s[SS]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};cd.default=ld});var Cg=E(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var dd=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}};fd.default=dd});var Ag=E(la=>{"use strict";var xS=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var RS=xS(we()),pd=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=RS.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}};la.default=pd});var Pg=E(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var MS=Ki(),md=class extends MS.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}};hd.default=md});var bd=E(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var CS=B(),AS=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"),PS=1,NS=2,IS=3,Ng=4,FS=5,Ig=6,Fg=7,Lg=8,Ug=9,gd=class extends CS.AbstractParserWithWordBoundaryChecking{innerPattern(){return AS}innerExtract(e,t){let n={};if(n.year=parseInt(t[PS]),n.month=parseInt(t[NS]),n.day=parseInt(t[IS]),t[Ng]!=null)if(n.hour=parseInt(t[Ng]),n.minute=parseInt(t[FS]),t[Ig]!=null&&(n.second=parseInt(t[Ig])),t[Fg]!=null&&(n.millisecond=parseInt(t[Fg])),t[Lg]==null)n.timezoneOffset=0;else{let i=parseInt(t[Lg]),s=0;t[Ug]!=null&&(s=parseInt(t[Ug]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};yd.default=gd});var Wg=E(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var LS=Ki(),Td=class extends LS.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}};_d.default=Td});var cn=E(Xi=>{"use strict";var ci=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.includeCommonConfiguration=void 0;var US=ci(Mg()),WS=ci(ru()),qg=ci(Cg()),qS=ci(Ag()),$S=ci(Pg()),jS=ci(bd()),GS=ci(Wg());function YS(r,e=!1){return r.parsers.unshift(new jS.default),r.refiners.unshift(new GS.default),r.refiners.unshift(new US.default),r.refiners.unshift(new WS.default),r.refiners.unshift(new qg.default),r.refiners.push(new qg.default),r.refiners.push(new qS.default),r.refiners.push(new $S.default(e)),r}Xi.includeCommonConfiguration=YS});var fn=E(Oe=>{"use strict";var BS=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 jr=We(),Zi=BS(we()),dn=nr(),ca=Ke();function HS(r){let e=Zi.default(r.instant),t=new jr.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Oe.now=HS;function VS(r){let e=Zi.default(r.instant),t=new jr.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.implySimilarTime(t,e),t}Oe.today=VS;function zS(r){return $g(r,1)}Oe.yesterday=zS;function $g(r,e){return vd(r,-e)}Oe.theDayBefore=$g;function KS(r){return vd(r,1)}Oe.tomorrow=KS;function vd(r,e){let t=Zi.default(r.instant),n=new jr.ParsingComponents(r,{});return t=t.add(e,"day"),dn.assignSimilarDate(n,t),dn.implySimilarTime(n,t),n}Oe.theDayAfter=vd;function QS(r,e=22){let t=Zi.default(r.instant),n=new jr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ca.Meridiem.PM),dn.assignSimilarDate(n,t),n}Oe.tonight=QS;function XS(r,e=0){let t=Zi.default(r.instant),n=new jr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),dn.assignSimilarDate(n,t),n.imply("hour",e),n}Oe.lastNight=XS;function ZS(r,e=20){let t=new jr.ParsingComponents(r,{});return t.imply("meridiem",ca.Meridiem.PM),t.imply("hour",e),t}Oe.evening=ZS;function JS(r,e=20){let t=Zi.default(r.instant),n=new jr.ParsingComponents(r,{});return t=t.add(-1,"day"),dn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ca.Meridiem.PM),n}Oe.yesterdayEvening=JS;function eO(r){let e=new jr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Oe.midnight=eO;function tO(r,e=6){let t=new jr.ParsingComponents(r,{});return t.imply("meridiem",ca.Meridiem.AM),t.imply("hour",e),t}Oe.morning=tO;function rO(r){let e=new jr.ParsingComponents(r,{});return e.imply("meridiem",ca.Meridiem.AM),e.imply("hour",12),e}Oe.noon=rO});var jg=E(vr=>{"use strict";var nO=vr&&vr.__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]}),iO=vr&&vr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),sO=vr&&vr.__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)&&nO(e,r,t);return iO(e,r),e},aO=vr&&vr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vr,"__esModule",{value:!0});var oO=aO(we()),uO=B(),lO=nr(),da=sO(fn()),cO=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,wd=class extends uO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return cO}innerExtract(e,t){let n=oO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return da.now(e.reference);case"today":return da.today(e.reference);case"yesterday":return da.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return da.tomorrow(e.reference);case"tonight":return da.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),lO.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};vr.default=wd});var Gg=E(fa=>{"use strict";var dO=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var nu=Ke(),fO=B(),pO=dO(we()),mO=nr(),hO=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,kd=class extends fO.AbstractParserWithWordBoundaryChecking{innerPattern(){return hO}innerExtract(e,t){let n=pO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",nu.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",nu.Meridiem.PM),i.imply("hour",20);break;case"midnight":mO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",nu.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",nu.Meridiem.AM),i.imply("hour",12);break}return i}};fa.default=kd});var di=E(Un=>{"use strict";var gO=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.toDayJSClosestWeekday=Un.toDayJSWeekday=void 0;var Yg=gO(we());function yO(r,e,t){if(!t)return Bg(r,e);let n=Yg.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}Un.toDayJSWeekday=yO;function Bg(r,e){let t=Yg.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});var Hg=ut(),bO=Re(),TO=B(),_O=di(),vO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${bO.matchAnyPattern(Hg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),wO=1,kO=2,EO=3,Ed=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(){return vO}innerExtract(e,t){let n=t[kO].toLowerCase(),i=Hg.WEEKDAY_DICTIONARY[n],s=t[wO],a=t[EO],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=_O.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Sd.default=Ed});var Qg=E(pa=>{"use strict";var SO=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var Kg=ut(),zg=We(),OO=SO(we()),DO=B(),xO=Re(),RO=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${xO.matchAnyPattern(Kg.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),MO=1,CO=2,Od=class extends DO.AbstractParserWithWordBoundaryChecking{innerPattern(){return RO}innerExtract(e,t){let n=t[MO].toLowerCase(),i=t[CO].toLowerCase(),s=Kg.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,zg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,zg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=OO.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}};pa.default=Od});var wr=E(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.ParsingContext=ts.Chrono=void 0;var Ji=We(),AO=Dd(),es=class{constructor(e){e=e||AO.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new es({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 iu(e,t,n),s=[];return this.parsers.forEach(a=>{let o=es.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 Ji.ParsingResult?c=l:l instanceof Ji.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}};ts.Chrono=es;var iu=class{constructor(e,t,n){this.text=e,this.reference=new Ji.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Ji.ParsingComponents?e:new Ji.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 Ji.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))}};ts.ParsingContext=iu});var fi=E(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var Xg=ot(),PO=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"),su=1,Zg=5,Jg=2,ey=3,xd=4,Rd=class{constructor(e){this.groupNumberMonth=e?ey:Jg,this.groupNumberDay=e?Jg:ey}pattern(){return PO}extract(e,t){if(t[su]=="/"||t[Zg]=="/"){t.index+=t[0].length;return}let n=t.index+t[su].length,i=t[0].substr(t[su].length,t[0].length-t[su].length-t[Zg].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[xd]&&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[xd]){let u=parseInt(t[xd]),l=Xg.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Xg.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Md.default=Rd});var ry=E(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});var ty=ut(),NO=We(),IO=B(),FO=ir(),LO=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ty.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Cd=class extends IO.AbstractParserWithWordBoundaryChecking{innerPattern(){return LO}innerExtract(e,t){let n=t[1].toLowerCase(),i=ty.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=FO.reverseTimeUnits(i);break}return NO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ad.default=Cd});var iy=E(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var UO=Ki(),Pd=We(),WO=ut(),qO=ir();function ny(r){return r.text.match(/\s+(before|from)$/i)!=null}function $O(r){return r.text.match(/\s+(after|since)$/i)!=null}var Nd=class extends UO.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!ny(t)&&!$O(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=WO.parseTimeUnits(t.text);ny(t)&&(i=qO.reverseTimeUnits(i));let s=Pd.ParsingComponents.createRelativeFromReference(new Pd.ReferenceWithTimezone(n.start.date()),i);return new Pd.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Id.default=Nd});var Dd=E(Ge=>{"use strict";var Ze=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.GB=Ge.strict=Ge.casual=void 0;var jO=Ze(ng()),GO=Ze(lg()),YO=Ze(mg()),BO=Ze(yg()),HO=Ze(_g()),VO=Ze(vg()),zO=Ze(kg()),KO=Ze(Eg()),QO=Ze(Sg()),XO=Ze(Og()),ZO=Ze(Rg()),JO=cn(),e0=Ze(jg()),t0=Ze(Gg()),r0=Ze(Vg()),n0=Ze(Qg()),Fd=wr(),i0=Ze(fi()),s0=Ze(ry()),a0=Ze(iy());Ge.casual=new Fd.Chrono(sy(!1));Ge.strict=new Fd.Chrono(au(!0,!1));Ge.GB=new Fd.Chrono(au(!1,!0));function o0(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=o0;function u0(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=u0;function sy(r=!1){let e=au(!1,r);return e.parsers.unshift(new e0.default),e.parsers.unshift(new t0.default),e.parsers.unshift(new BO.default),e.parsers.unshift(new n0.default),e.parsers.unshift(new s0.default),e}Ge.createCasualConfiguration=sy;function au(r=!0,e=!1){return JO.includeCommonConfiguration({parsers:[new i0.default(e),new jO.default,new GO.default,new YO.default,new r0.default,new HO.default,new VO.default,new zO.default(r),new KO.default(r),new QO.default(r)],refiners:[new a0.default,new ZO.default,new XO.default]},r)}Ge.createConfiguration=au});var ay=E(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var l0=li(),Ld=class extends l0.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)}};Ud.default=Ld});var ma=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 Wd=Re(),c0=ot();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=`(?:${Wd.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 uy(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=uy;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 d0(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 c0.findMostLikelyADYear(e)}Ae.parseYear=d0;var ly=`(${Ae.NUMBER_PATTERN})\\s{0,5}(${Wd.matchAnyPattern(Ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,oy=new RegExp(ly,"i");Ae.TIME_UNITS_PATTERN=Wd.repeatedTimeunitPattern("",ly);function f0(r){let e={},t=r,n=oy.exec(t);for(;n;)p0(e,n),t=t.substring(n[0].length),n=oy.exec(t);return e}Ae.parseTimeUnits=f0;function p0(r,e){let t=uy(e[1]),n=Ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var dy=E($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});var cy=ma(),m0=Re(),h0=B(),g0=di(),y0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${m0.matchAnyPattern(cy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),b0=1,T0=3,_0=2,qd=class extends h0.AbstractParserWithWordBoundaryChecking{innerPattern(){return y0}innerExtract(e,t){let n=t[_0].toLowerCase(),i=cy.WEEKDAY_DICTIONARY[n],s=t[b0],a=t[T0],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=g0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};$d.default=qd});var hy=E(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var Wn=Ke(),v0=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"),w0=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"),k0=2,fy=3,py=4,my=5,rs=class{pattern(e){return v0}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=rs.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=w0.exec(i);return s&&(n.end=rs.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[k0]),t[fy]!=null&&(i=parseInt(t[fy])),i>=60||n>24)return null;if(n>=12&&(s=Wn.Meridiem.PM),t[my]!=null){if(n>12)return null;let a=t[my].toLowerCase();a.match(/morgen|vormittag/)&&(s=Wn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Wn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Wn.Meridiem.AM,n=0):n<6?s=Wn.Meridiem.AM:(s=Wn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Wn.Meridiem.AM):e.imply("meridiem",Wn.Meridiem.PM),t[py]!=null){let a=parseInt(t[py]);if(a>=60)return null;e.assign("second",a)}return e}};jd.default=rs});var gy=E(ha=>{"use strict";var E0=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var S0=E0($r()),Gd=class extends S0.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ha.default=Gd});var yy=E(ga=>{"use strict";var O0=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var D0=O0(ln()),Yd=class extends D0.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};ga.default=Yd});var Bd=E(ba=>{"use strict";var x0=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var R0=x0(we()),pi=Ke(),M0=B(),C0=nr(),A0=ir(),ya=class extends M0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=R0.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return C0.implySimilarTime(s,n),ya.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",pi.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=A0.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",pi.Meridiem.AM);break}return e}};ba.default=ya});var _y=E(kr=>{"use strict";var P0=kr&&kr.__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]}),N0=kr&&kr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),I0=kr&&kr.__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)&&P0(e,r,t);return N0(e,r),e},Ty=kr&&kr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kr,"__esModule",{value:!0});var F0=Ty(we()),L0=B(),mi=nr(),U0=Ty(Bd()),by=I0(fn()),W0=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),q0=1,$0=2,Hd=class extends L0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return W0}innerExtract(e,t){let n=F0.default(e.refDate),i=(t[q0]||"").toLowerCase(),s=(t[$0]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=by.now(e.reference);break;case"heute":a=by.today(e.reference);break;case"morgen":mi.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),mi.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),mi.assignSimilarDate(a,n),mi.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),mi.assignSimilarDate(a,n),mi.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),mi.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=U0.default.extractTimeComponents(a,s)),a}};kr.default=Hd});var Oy=E(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});var j0=ot(),Ey=ma(),Sy=ma(),G0=Re(),Y0=B(),B0=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${G0.matchAnyPattern(Ey.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Sy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),vy=1,wy=2,H0=3,ky=4,Vd=class extends Y0.AbstractParserWithWordBoundaryChecking{innerPattern(){return B0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ey.MONTH_DICTIONARY[t[H0].toLowerCase()],s=parseInt(t[vy]);if(s>31)return t.index=t.index+t[vy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[ky]){let a=Sy.parseYear(t[ky]);n.start.assign("year",a)}else{let a=j0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[wy]){let a=parseInt(t[wy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};zd.default=Vd});var Dy=E(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var ou=ma(),V0=We(),z0=B(),K0=ir(),Q0=Re(),Kd=class extends z0.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*)?(${ou.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${Q0.matchAnyPattern(ou.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?ou.parseNumberPattern(t[2]):1,i=ou.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=K0.reverseTimeUnits(s)),V0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Qd.default=Kd});var My=E(Je=>{"use strict";var Er=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 X0=cn(),xy=wr(),Z0=Er(fi()),J0=Er(bd()),e1=Er(ay()),t1=Er(dy()),r1=Er(hy()),n1=Er(gy()),i1=Er(yy()),s1=Er(_y()),a1=Er(Bd()),o1=Er(Oy()),u1=Er(Dy());Je.casual=new xy.Chrono(Ry());Je.strict=new xy.Chrono(Xd(!0));function l1(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=l1;function c1(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=c1;function Ry(r=!0){let e=Xd(!1,r);return e.parsers.unshift(new a1.default),e.parsers.unshift(new s1.default),e.parsers.unshift(new u1.default),e}Je.createCasualConfiguration=Ry;function Xd(r=!0,e=!0){return X0.includeCommonConfiguration({parsers:[new J0.default,new Z0.default(e),new e1.default,new r1.default,new o1.default,new t1.default],refiners:[new n1.default,new i1.default]},r)}Je.createConfiguration=Xd});var Ay=E(Sr=>{"use strict";var d1=Sr&&Sr.__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]}),f1=Sr&&Sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),p1=Sr&&Sr.__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)&&d1(e,r,t);return f1(e,r),e},m1=Sr&&Sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sr,"__esModule",{value:!0});var h1=m1(we()),g1=Ke(),y1=B(),Cy=nr(),uu=p1(fn()),Zd=class extends y1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=h1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return uu.now(e.reference);case"aujourd'hui":return uu.today(e.reference);case"hier":return uu.yesterday(e.reference);case"demain":return uu.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Cy.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",g1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Cy.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Sr.default=Zd});var Py=E(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Ta=Ke(),b1=B(),Jd=class extends b1.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",Ta.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Ta.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Ta.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Ta.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Ta.Meridiem.AM);break}return i}};ef.default=Jd});var Ny=E(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var T1=li(),tf=class extends T1.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)}};rf.default=tf});var Iy=E(_a=>{"use strict";var _1=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var v1=_1(ln()),nf=class extends v1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};_a.default=nf});var Fy=E(va=>{"use strict";var w1=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var k1=w1($r()),sf=class extends k1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};va.default=sf});var qn=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 af=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=`(?:${af.matchAnyPattern(ke.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Uy(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=Uy;ke.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function E1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}ke.parseOrdinalNumberPattern=E1;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 S1(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=S1;var Wy=`(${ke.NUMBER_PATTERN})\\s{0,5}(${af.matchAnyPattern(ke.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ly=new RegExp(Wy,"i");ke.TIME_UNITS_PATTERN=af.repeatedTimeunitPattern("",Wy);function O1(r){let e={},t=r,n=Ly.exec(t);for(;n;)D1(e,n),t=t.substring(n[0].length),n=Ly.exec(t);return e}ke.parseTimeUnits=O1;function D1(r,e){let t=Uy(e[1]),n=ke.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var $y=E(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var qy=qn(),x1=Re(),R1=B(),M1=di(),C1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${x1.matchAnyPattern(qy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),A1=1,P1=2,of=class extends R1.AbstractParserWithWordBoundaryChecking{innerPattern(){return C1}innerExtract(e,t){let n=t[A1].toLowerCase(),i=qy.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[P1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=M1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};uf.default=of});var By=E(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var wa=Ke(),N1=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"),I1=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"),F1=2,jy=3,Gy=4,Yy=5,ns=class{pattern(e){return N1}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=ns.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=I1.exec(i);return s&&(n.end=ns.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[F1]),t[jy]!=null&&(i=parseInt(t[jy])),i>=60||n>24)return null;if(n>=12&&(s=wa.Meridiem.PM),t[Yy]!=null){if(n>12)return null;let a=t[Yy][0].toLowerCase();a=="a"&&(s=wa.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=wa.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",wa.Meridiem.AM):e.imply("meridiem",wa.Meridiem.PM),t[Gy]!=null){let a=parseInt(t[Gy]);if(a>=60)return null;e.assign("second",a)}return e}};lf.default=ns});var Xy=E(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var L1=ot(),Ky=qn(),Qy=qn(),lu=qn(),U1=Re(),W1=B(),q1=new RegExp(`(?:on\\s*?)?(${lu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${lu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${U1.matchAnyPattern(Ky.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Qy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Hy=1,Vy=2,$1=3,zy=4,cf=class extends W1.AbstractParserWithWordBoundaryChecking{innerPattern(){return q1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ky.MONTH_DICTIONARY[t[$1].toLowerCase()],s=lu.parseOrdinalNumberPattern(t[Hy]);if(s>31)return t.index=t.index+t[Hy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[zy]){let a=Qy.parseYear(t[zy]);n.start.assign("year",a)}else{let a=L1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Vy]){let a=lu.parseOrdinalNumberPattern(t[Vy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};df.default=cf});var Jy=E(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var Zy=qn(),j1=We(),G1=B(),Y1=ir(),ff=class extends G1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Zy.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Zy.parseTimeUnits(t[1]),i=Y1.reverseTimeUnits(n);return j1.ParsingComponents.createRelativeFromReference(e.reference,i)}};pf.default=ff});var tb=E(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var eb=qn(),B1=We(),H1=B(),mf=class extends H1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${eb.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=eb.parseTimeUnits(t[1]);return B1.ParsingComponents.createRelativeFromReference(e.reference,n)}};hf.default=mf});var rb=E(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var cu=qn(),V1=We(),z1=B(),K1=ir(),Q1=Re(),gf=class extends z1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${cu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${Q1.matchAnyPattern(cu.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]?cu.parseNumberPattern(t[1]):1,i=cu.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=K1.reverseTimeUnits(s)),V1.ParsingComponents.createRelativeFromReference(e.reference,s)}};yf.default=gf});var sb=E(et=>{"use strict";var sr=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 X1=cn(),nb=wr(),Z1=sr(Ay()),J1=sr(Py()),eD=sr(fi()),tD=sr(Ny()),rD=sr(Iy()),nD=sr(Fy()),iD=sr($y()),sD=sr(By()),aD=sr(Xy()),oD=sr(Jy()),uD=sr(tb()),lD=sr(rb());et.casual=new nb.Chrono(ib());et.strict=new nb.Chrono(bf(!0));function cD(r,e,t){return et.casual.parse(r,e,t)}et.parse=cD;function dD(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=dD;function ib(r=!0){let e=bf(!1,r);return e.parsers.unshift(new Z1.default),e.parsers.unshift(new J1.default),e.parsers.unshift(new lD.default),e}et.createCasualConfiguration=ib;function bf(r=!0,e=!0){return X1.includeCommonConfiguration({parsers:[new eD.default(e),new aD.default,new tD.default,new sD.default,new oD.default,new uD.default,new iD.default],refiners:[new rD.default,new nD.default]},r)}et.createConfiguration=bf});var ab=E(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.toHankaku=void 0;function fD(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,pD)}du.toHankaku=fD;function pD(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var ub=E(ka=>{"use strict";var mD=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var Tf=ab(),hD=ot(),gD=mD(we()),yD=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,ob=1,bD=2,_f=3,TD=4,_D=5,vD=6,vf=class{pattern(){return yD}extract(e,t){let n=parseInt(Tf.toHankaku(t[_D])),i=parseInt(Tf.toHankaku(t[vD])),s=e.createParsingComponents({day:i,month:n});if(t[ob]&&t[ob].match("\u540C|\u4ECA|\u672C")){let a=gD.default(e.refDate);s.assign("year",a.year())}if(t[bD]){let a=t[TD],o=a=="\u5143"?1:parseInt(Tf.toHankaku(a));t[_f]=="\u4EE4\u548C"?o+=2018:t[_f]=="\u5E73\u6210"?o+=1988:t[_f]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=hD.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};ka.default=vf});var lb=E(Ea=>{"use strict";var wD=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var kD=wD($r()),wf=class extends kD.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ea.default=wf});var db=E(Or=>{"use strict";var ED=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]}),SD=Or&&Or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),OD=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)&&ED(e,r,t);return SD(e,r),e},DD=Or&&Or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Or,"__esModule",{value:!0});var xD=DD(we()),cb=Ke(),kf=OD(fn()),RD=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Ef=class{pattern(){return RD}extract(e,t){let n=t[0],i=xD.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return kf.yesterday(e.reference);case"\u660E\u65E5":return kf.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return kf.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",cb.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",cb.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Or.default=Ef});var mb=E(tt=>{"use strict";var Sf=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 MD=Sf(ub()),CD=Sf(lb()),AD=Sf(db()),fb=wr();tt.casual=new fb.Chrono(pb());tt.strict=new fb.Chrono(Of());function PD(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=PD;function ND(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=ND;function pb(){let r=Of();return r.parsers.unshift(new AD.default),r}tt.createCasualConfiguration=pb;function Of(){return{parsers:[new MD.default],refiners:[new CD.default]}}tt.createConfiguration=Of});var fu=E(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.parseYear=Gr.YEAR_PATTERN=Gr.MONTH_DICTIONARY=Gr.WEEKDAY_DICTIONARY=void 0;Gr.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};Gr.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};Gr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function ID(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)}Gr.parseYear=ID});var gb=E(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var hb=fu(),FD=Re(),LD=B(),UD=di(),WD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${FD.matchAnyPattern(hb.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),qD=1,$D=2,jD=3,Df=class extends LD.AbstractParserWithWordBoundaryChecking{innerPattern(){return WD}innerExtract(e,t){let n=t[$D].toLowerCase(),i=hb.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[qD],a=t[jD],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=UD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};xf.default=Df});var yb=E(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var GD=li(),Rf=class extends GD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Mf.default=Rf});var bb=E(Sa=>{"use strict";var YD=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var BD=YD(ln()),Cf=class extends BD.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Sa.default=Cf});var Tb=E(Oa=>{"use strict";var HD=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var VD=HD($r()),Af=class extends VD.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Oa.default=Af});var Sb=E(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var zD=ot(),kb=fu(),Eb=fu(),KD=Re(),QD=B(),XD=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*)(${KD.matchAnyPattern(kb.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Eb.YEAR_PATTERN}))?(?=\\W|$)`,"i"),_b=1,vb=2,ZD=3,wb=4,Pf=class extends QD.AbstractParserWithWordBoundaryChecking{innerPattern(){return XD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=kb.MONTH_DICTIONARY[t[ZD].toLowerCase()],s=parseInt(t[_b]);if(s>31)return t.index=t.index+t[_b].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[wb]){let a=Eb.parseYear(t[wb]);n.start.assign("year",a)}else{let a=zD.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[vb]){let a=parseInt(t[vb]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Nf.default=Pf});var Ob=E(pn=>{"use strict";var JD=pn&&pn.__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]}),ex=pn&&pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),tx=pn&&pn.__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)&&JD(e,r,t);return ex(e,r),e};Object.defineProperty(pn,"__esModule",{value:!0});var rx=B(),pu=tx(fn()),If=class extends rx.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 pu.now(e.reference);case"hoje":return pu.today(e.reference);case"amanha":case"amanh\xE3":return pu.tomorrow(e.reference);case"ontem":return pu.yesterday(e.reference)}return i}};pn.default=If});var Db=E(Da=>{"use strict";var nx=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var mu=Ke(),ix=B(),sx=nr(),ax=nx(we()),Ff=class extends ix.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=ax.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",mu.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",mu.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",mu.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":sx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",mu.Meridiem.AM),i.imply("hour",12);break}return i}};Da.default=Ff});var Mb=E(rt=>{"use strict";var $n=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 ox=cn(),xb=wr(),ux=$n(fi()),lx=$n(gb()),cx=$n(yb()),dx=$n(bb()),fx=$n(Tb()),px=$n(Sb()),mx=$n(Ob()),hx=$n(Db());rt.casual=new xb.Chrono(Rb());rt.strict=new xb.Chrono(Lf(!0));function gx(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=gx;function yx(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=yx;function Rb(r=!0){let e=Lf(!1,r);return e.parsers.push(new mx.default),e.parsers.push(new hx.default),e}rt.createCasualConfiguration=Rb;function Lf(r=!0,e=!0){return ox.includeCommonConfiguration({parsers:[new ux.default(e),new lx.default,new cx.default,new px.default],refiners:[new dx.default,new fx.default]},r)}rt.createConfiguration=Lf});var Cb=E(xa=>{"use strict";var bx=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var Tx=bx($r()),Uf=class extends Tx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};xa.default=Uf});var Ab=E(Ra=>{"use strict";var _x=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var vx=_x(ln()),Wf=class extends vx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Ra.default=Wf});var Pb=E(mn=>{"use strict";var wx=mn&&mn.__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]}),kx=mn&&mn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ex=mn&&mn.__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)&&wx(e,r,t);return kx(e,r),e};Object.defineProperty(mn,"__esModule",{value:!0});var Sx=B(),hu=Ex(fn()),qf=class extends Sx.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 hu.now(e.reference);case"vandaag":return hu.today(e.reference);case"morgen":case"morgend":return hu.tomorrow(e.reference);case"gisteren":return hu.yesterday(e.reference)}return i}};mn.default=qf});var Nb=E(Ma=>{"use strict";var Ox=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var gu=Ke(),Dx=B(),xx=Ox(we()),Rx=nr(),Mx=1,Cx=2,$f=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=xx.default(e.refDate),i=e.createParsingComponents();switch(t[Mx]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[Cx].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Rx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",12);break}return i}};Ma.default=$f});var $t=E(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.parseTimeUnits=ge.TIME_UNITS_PATTERN=ge.parseYear=ge.YEAR_PATTERN=ge.parseOrdinalNumberPattern=ge.ORDINAL_NUMBER_PATTERN=ge.parseNumberPattern=ge.NUMBER_PATTERN=ge.TIME_UNIT_DICTIONARY=ge.ORDINAL_WORD_DICTIONARY=ge.INTEGER_WORD_DICTIONARY=ge.MONTH_DICTIONARY=ge.WEEKDAY_DICTIONARY=void 0;var yu=Re(),Ax=ot();ge.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};ge.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};ge.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};ge.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};ge.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"};ge.NUMBER_PATTERN=`(?:${yu.matchAnyPattern(ge.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Fb(r){let e=r.toLowerCase();return ge.INTEGER_WORD_DICTIONARY[e]!==void 0?ge.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ge.parseNumberPattern=Fb;ge.ORDINAL_NUMBER_PATTERN=`(?:${yu.matchAnyPattern(ge.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function Px(r){let e=r.toLowerCase();return ge.ORDINAL_WORD_DICTIONARY[e]!==void 0?ge.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ge.parseOrdinalNumberPattern=Px;ge.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function Nx(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return Ax.findMostLikelyADYear(e)}ge.parseYear=Nx;var Lb=`(${ge.NUMBER_PATTERN})\\s{0,5}(${yu.matchAnyPattern(ge.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ib=new RegExp(Lb,"i");ge.TIME_UNITS_PATTERN=yu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Lb);function Ix(r){let e={},t=r,n=Ib.exec(t);for(;n;)Fx(e,n),t=t.substring(n[0].length),n=Ib.exec(t);return e}ge.parseTimeUnits=Ix;function Fx(r,e){let t=Fb(e[1]),n=ge.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Wb=E(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var Ub=$t(),Lx=We(),Ux=B(),jf=class extends Ux.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Ub.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Ub.parseTimeUnits(t[1]);return Lx.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gf.default=jf});var $b=E(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var qb=$t(),Wx=Re(),qx=B(),$x=di(),jx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${Wx.matchAnyPattern(qb.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),Gx=1,Yx=2,Bx=3,Yf=class extends qx.AbstractParserWithWordBoundaryChecking{innerPattern(){return jx}innerExtract(e,t){let n=t[Yx].toLowerCase(),i=qb.WEEKDAY_DICTIONARY[n],s=t[Gx],a=t[Bx],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=$x.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Bf.default=Yf});var Vb=E(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var Hx=ot(),Bb=$t(),bu=$t(),Hb=$t(),Vx=Re(),zx=B(),Kx=new RegExp(`(?:on\\s*?)?(${bu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${bu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+Vx.matchAnyPattern(Bb.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Hb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Qx=3,jb=1,Gb=2,Yb=4,Hf=class extends zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Kx}innerExtract(e,t){let n=Bb.MONTH_DICTIONARY[t[Qx].toLowerCase()],i=bu.parseOrdinalNumberPattern(t[jb]);if(i>31)return t.index=t.index+t[jb].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Yb]){let u=Hb.parseYear(t[Yb]);s.assign("year",u)}else{let u=Hx.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Gb])return s;let a=bu.parseOrdinalNumberPattern(t[Gb]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Vf.default=Hf});var Xb=E(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var Kb=$t(),Xx=ot(),Zx=Re(),Qb=$t(),Jx=B(),eR=new RegExp(`(${Zx.matchAnyPattern(Kb.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Qb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),tR=1,zb=2,zf=class extends Jx.AbstractParserWithWordBoundaryChecking{innerPattern(){return eR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[tR],s=Kb.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[zb]){let a=Qb.parseYear(t[zb]);n.assign("year",a)}else{let a=Xx.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Kf.default=zf});var Zb=E(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var rR=B(),nR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),iR=1,sR=2,Qf=class extends rR.AbstractParserWithWordBoundaryChecking{innerPattern(){return nR}innerExtract(e,t){let n=parseInt(t[sR]),i=parseInt(t[iR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Xf.default=Qf});var Jb=E(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var aR=li(),Zf=class extends aR.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)}};Jf.default=Zf});var rT=E(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var tT=$t(),oR=Re(),uR=B(),lR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${oR.matchAnyPattern(tT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),cR=1,dR=2,eT=3,fR=4,ep=class extends uR.AbstractParserWithWordBoundaryChecking{innerPattern(){return lR}innerExtract(e,t){let n=t[eT]?parseInt(t[eT]):tT.MONTH_DICTIONARY[t[dR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[cR]);return{day:parseInt(t[fR]),month:n,year:i}}};tp.default=ep});var nT=E(Ca=>{"use strict";var pR=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var mR=B(),Tu=Ke(),rp=nr(),hR=pR(we()),gR=1,yR=2,np=class extends mR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[gR].toLowerCase(),i=t[yR].toLowerCase(),s=e.createParsingComponents(),a=hR.default(e.refDate);switch(n){case"gisteren":rp.assignSimilarDate(s,a.add(-1,"day"));break;case"van":rp.assignSimilarDate(s,a);break;case"morgen":rp.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",Tu.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",Tu.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",Tu.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",Tu.Meridiem.PM),s.imply("hour",20);break}return s}};Ca.default=np});var sT=E(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var iT=$t(),bR=We(),TR=B(),_R=ir(),vR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${iT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ip=class extends TR.AbstractParserWithWordBoundaryChecking{innerPattern(){return vR}innerExtract(e,t){let n=t[1].toLowerCase(),i=iT.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=_R.reverseTimeUnits(i);break}return bR.ParsingComponents.createRelativeFromReference(e.reference,i)}};sp.default=ip});var uT=E(Aa=>{"use strict";var wR=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var oT=$t(),aT=We(),kR=wR(we()),ER=B(),SR=Re(),OR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${SR.matchAnyPattern(oT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),DR=1,xR=2,ap=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return OR}innerExtract(e,t){let n=t[DR].toLowerCase(),i=t[xR].toLowerCase(),s=oT.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,aT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,aT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=kR.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}};Aa.default=ap});var lT=E(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var up=$t(),RR=We(),MR=B(),CR=ir(),AR=new RegExp("("+up.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),PR=new RegExp("("+up.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),op=class extends MR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?PR:AR}innerExtract(e,t){let n=up.parseTimeUnits(t[1]),i=CR.reverseTimeUnits(n);return RR.ParsingComponents.createRelativeFromReference(e.reference,i)}};lp.default=op});var cT=E(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var dp=$t(),NR=We(),IR=B(),FR=new RegExp("("+dp.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),LR=new RegExp("("+dp.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),UR=1,cp=class extends IR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?LR:FR}innerExtract(e,t){let n=dp.parseTimeUnits(t[UR]);return NR.ParsingComponents.createRelativeFromReference(e.reference,n)}};fp.default=cp});var mT=E(nt=>{"use strict";var lt=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 WR=cn(),dT=wr(),qR=lt(Cb()),$R=lt(Ab()),jR=lt(Pb()),GR=lt(Nb()),YR=lt(fi()),BR=lt(Wb()),HR=lt($b()),VR=lt(Vb()),fT=lt(Xb()),zR=lt(Zb()),KR=lt(Jb()),QR=lt(rT()),XR=lt(nT()),ZR=lt(sT()),JR=lt(uT()),eM=lt(lT()),tM=lt(cT());nt.casual=new dT.Chrono(pT());nt.strict=new dT.Chrono(pp(!0));function rM(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=rM;function nM(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=nM;function pT(r=!0){let e=pp(!1,r);return e.parsers.unshift(new jR.default),e.parsers.unshift(new GR.default),e.parsers.unshift(new XR.default),e.parsers.unshift(new fT.default),e.parsers.unshift(new JR.default),e.parsers.unshift(new ZR.default),e}nt.createCasualConfiguration=pT;function pp(r=!0,e=!0){return WR.includeCommonConfiguration({parsers:[new YR.default(e),new BR.default,new VR.default,new fT.default,new HR.default,new QR.default,new zR.default,new KR.default(r),new eM.default(r),new tM.default(r)],refiners:[new $R.default,new qR.default]},r)}nt.createConfiguration=pp});var bT=E(Pa=>{"use strict";var iM=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var sM=iM(we()),aM=B(),oM=1,hT=2,uM=3,gT=4,yT=5,lM=6,mp=class extends aM.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=sM.default(e.refDate),a=s;if(t[oM])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[hT]){let o=t[hT],u=t[uM];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[gT]){let u=t[gT][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[yT]){let o=t[yT];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[lM];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}};Pa.default=mp});var is=E(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.zhStringToYear=Ct.zhStringToNumber=Ct.WEEKDAY_OFFSET=Ct.NUMBER=void 0;Ct.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};Ct.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function cM(r){let e=0;for(let t=0;t{"use strict";var fM=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var pM=fM(we()),mM=B(),hi=is(),hp=1,TT=2,gp=3,yp=class extends mM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(hi.NUMBER).join("")+"]{4}|["+Object.keys(hi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(hi.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(hi.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=pM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[TT]);if(isNaN(s)&&(s=hi.zhStringToNumber(t[TT])),i.start.assign("month",s),t[gp]){let a=parseInt(t[gp]);isNaN(a)&&(a=hi.zhStringToNumber(t[gp])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[hp]){let a=parseInt(t[hp]);isNaN(a)&&(a=hi.zhStringToYear(t[hp])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Na.default=yp});var wT=E(Ia=>{"use strict";var hM=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var gM=hM(we()),yM=B(),vT=is(),bM=new RegExp("(\\d+|["+Object.keys(vT.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"),bp=1,TM=2,Tp=class extends yM.AbstractParserWithWordBoundaryChecking{innerPattern(){return bM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[bp]);if(isNaN(i)&&(i=vT.zhStringToNumber(t[bp])),isNaN(i)){let u=t[bp];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=gM.default(e.refDate),o=t[TM][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)}};Ia.default=Tp});var ET=E(Fa=>{"use strict";var _M=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var vM=_M(we()),wM=B(),kT=is(),kM=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(kT.WEEKDAY_OFFSET).join("|")+")"),_p=class extends wM.AbstractParserWithWordBoundaryChecking{innerPattern(){return kM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=kT.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=vM.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 EM=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var SM=EM(we()),OM=B(),or=is(),DM=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(or.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(or.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(or.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),xM=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(or.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(or.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(or.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),_u=1,vu=2,wu=3,ku=4,Eu=5,Su=6,ar=7,ss=8,Ou=9,vp=class extends OM.AbstractParserWithWordBoundaryChecking{innerPattern(){return DM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=SM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[_u]){var a=t[_u];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[ku]){var o=t[ku];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[ss]){var d=parseInt(t[ss]);if(isNaN(d)&&(d=or.zhStringToNumber(t[ss])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[Su]),isNaN(u)&&(u=or.zhStringToNumber(t[Su])),t[ar]?t[ar]=="\u534A"?l=30:t[ar]=="\u6B63"||t[ar]=="\u6574"?l=0:(l=parseInt(t[ar]),isNaN(l)&&(l=or.zhStringToNumber(t[ar]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Ou]){if(u>12)return null;var f=t[Ou][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[vu]){var m=t[vu],g=m[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[wu]){var y=t[wu],T=y[0];T=="\u4E0A"||T=="\u671D"||T=="\u65E9"||T=="\u51CC"?(c=0,u==12&&(u=0)):(T=="\u4E0B"||T=="\u664F"||T=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var k=t[Eu],S=k[0];S=="\u4E0A"||S=="\u671D"||S=="\u65E9"||S=="\u51CC"?(c=0,u==12&&(u=0)):(S=="\u4E0B"||S=="\u664F"||S=="\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=xM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let x=s.clone();if(i.end=e.createParsingComponents(),t[_u]){var a=t[_u];a=="\u660E"||a=="\u807D"?n.hour()>1&&x.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?x.add(-1,"day"):a=="\u524D"?x.add(-2,"day"):a=="\u5927\u524D"?x.add(-3,"day"):a=="\u5F8C"?x.add(2,"day"):a=="\u5927\u5F8C"&&x.add(3,"day"),i.end.assign("day",x.date()),i.end.assign("month",x.month()+1),i.end.assign("year",x.year())}else if(t[ku]){var o=t[ku];o=="\u660E"||o=="\u807D"?x.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?x.add(-1,"day"):o=="\u524D"?x.add(-2,"day"):o=="\u5927\u524D"?x.add(-3,"day"):o=="\u5F8C"?x.add(2,"day"):o=="\u5927\u5F8C"&&x.add(3,"day"),i.end.assign("day",x.date()),i.end.assign("month",x.month()+1),i.end.assign("year",x.year())}else i.end.imply("day",x.date()),i.end.imply("month",x.month()+1),i.end.imply("year",x.year());if(u=0,l=0,c=-1,t[ss]){var d=parseInt(t[ss]);if(isNaN(d)&&(d=or.zhStringToNumber(t[ss])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[Su]),isNaN(u)&&(u=or.zhStringToNumber(t[Su])),t[ar]?t[ar]=="\u534A"?l=30:t[ar]=="\u6B63"||t[ar]=="\u6574"?l=0:(l=parseInt(t[ar]),isNaN(l)&&(l=or.zhStringToNumber(t[ar]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[Ou]){if(u>12)return null;var f=t[Ou][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[vu]){var m=t[vu],g=m[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[wu]){var y=t[wu],T=y[0];T=="\u4E0A"||T=="\u671D"||T=="\u65E9"||T=="\u51CC"?(c=0,u==12&&(u=0)):(T=="\u4E0B"||T=="\u664F"||T=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var k=t[Eu],S=k[0];S=="\u4E0A"||S=="\u671D"||S=="\u65E9"||S=="\u51CC"?(c=0,u==12&&(u=0)):(S=="\u4E0B"||S=="\u664F"||S=="\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 RM=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var MM=RM(we()),CM=B(),OT=is(),AM=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(OT.WEEKDAY_OFFSET).join("|")+")"),wp=class extends CM.AbstractParserWithWordBoundaryChecking{innerPattern(){return AM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=OT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=MM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var PM=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var NM=PM($r()),kp=class extends NM.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Wa.default=kp});var RT=E(qa=>{"use strict";var IM=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var FM=IM(ln()),Ep=class extends FM.default{patternBetween(){return/^\s*$/i}};qa.default=Ep});var MT=E(Ye=>{"use strict";var hn=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.strict=Ye.casual=Ye.hant=void 0;var Sp=wr(),LM=hn(ru()),UM=cn(),WM=hn(bT()),qM=hn(_T()),$M=hn(wT()),jM=hn(ET()),GM=hn(ST()),YM=hn(DT()),BM=hn(xT()),HM=hn(RT());Ye.hant=new Sp.Chrono(Op());Ye.casual=new Sp.Chrono(Op());Ye.strict=new Sp.Chrono(Dp());function VM(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=VM;function zM(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=zM;function Op(){let r=Dp();return r.parsers.unshift(new WM.default),r}Ye.createCasualConfiguration=Op;function Dp(){let r=UM.includeCommonConfiguration({parsers:[new qM.default,new jM.default,new YM.default,new GM.default,new $M.default],refiners:[new BM.default,new HM.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof LM.default)),r}Ye.createConfiguration=Dp});var NT=E($a=>{"use strict";var KM=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var QM=KM(we()),XM=B(),ZM=1,CT=2,JM=3,AT=4,PT=5,eC=6,xp=class extends XM.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=QM.default(e.refDate),a=s;if(t[ZM])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[CT]){let o=t[CT],u=t[JM];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[AT]){let u=t[AT][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[PT]){let o=t[PT];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[eC];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}};$a.default=xp});var as=E(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.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};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function tC(r){let e=0;for(let t=0;t{"use strict";var nC=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var iC=nC(we()),sC=B(),gi=as(),Rp=1,IT=2,Mp=3,Cp=class extends sC.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(gi.NUMBER).join("")+"]{4}|["+Object.keys(gi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=iC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[IT]);if(isNaN(s)&&(s=gi.zhStringToNumber(t[IT])),i.start.assign("month",s),t[Mp]){let a=parseInt(t[Mp]);isNaN(a)&&(a=gi.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=gi.zhStringToYear(t[Rp])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};ja.default=Cp});var UT=E(Ga=>{"use strict";var aC=Ga&&Ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ga,"__esModule",{value:!0});var oC=aC(we()),uC=B(),LT=as(),lC=new RegExp("(\\d+|["+Object.keys(LT.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"),Ap=1,cC=2,Pp=class extends uC.AbstractParserWithWordBoundaryChecking{innerPattern(){return lC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Ap]);if(isNaN(i)&&(i=LT.zhStringToNumber(t[Ap])),isNaN(i)){let u=t[Ap];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=oC.default(e.refDate),o=t[cC][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)}};Ga.default=Pp});var qT=E(Ya=>{"use strict";var dC=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var fC=dC(we()),pC=B(),WT=as(),mC=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(WT.WEEKDAY_OFFSET).join("|")+")"),Np=class extends pC.AbstractParserWithWordBoundaryChecking{innerPattern(){return mC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=WT.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=fC.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 hC=Ba&&Ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ba,"__esModule",{value:!0});var gC=hC(we()),yC=B(),lr=as(),bC=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"),TC=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"),Du=1,xu=2,Ru=3,Mu=4,Cu=5,Au=6,ur=7,os=8,Pu=9,Ip=class extends yC.AbstractParserWithWordBoundaryChecking{innerPattern(){return bC}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=gC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Du]){let c=t[Du];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[Mu]){let c=t[Mu];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[os]){let c=parseInt(t[os]);if(isNaN(c)&&(c=lr.zhStringToNumber(t[os])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Au]),isNaN(a)&&(a=lr.zhStringToNumber(t[Au])),t[ur]?t[ur]=="\u534A"?o=30:t[ur]=="\u6B63"||t[ur]=="\u6574"?o=0:(o=parseInt(t[ur]),isNaN(o)&&(o=lr.zhStringToNumber(t[ur]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Pu]){if(a>12)return null;let c=t[Pu][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[xu]){let d=t[xu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Ru]){let d=t[Ru][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[Cu]){let d=t[Cu][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=TC.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[Du]){let c=t[Du];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[Mu]){let c=t[Mu];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[os]){let c=parseInt(t[os]);if(isNaN(c)&&(c=lr.zhStringToNumber(t[os])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Au]),isNaN(a)&&(a=lr.zhStringToNumber(t[Au])),t[ur]?t[ur]=="\u534A"?o=30:t[ur]=="\u6B63"||t[ur]=="\u6574"?o=0:(o=parseInt(t[ur]),isNaN(o)&&(o=lr.zhStringToNumber(t[ur]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Pu]){if(a>12)return null;let c=t[Pu][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[xu]){let d=t[xu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Ru]){let d=t[Ru][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[Cu]){let d=t[Cu][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 _C=Ha&&Ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ha,"__esModule",{value:!0});var vC=_C(we()),wC=B(),jT=as(),kC=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(jT.WEEKDAY_OFFSET).join("|")+")"),Fp=class extends wC.AbstractParserWithWordBoundaryChecking{innerPattern(){return kC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=jT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=vC.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var EC=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var SC=EC($r()),Lp=class extends SC.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Va.default=Lp});var BT=E(za=>{"use strict";var OC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var DC=OC(ln()),Up=class extends DC.default{patternBetween(){return/^\s*$/i}};za.default=Up});var HT=E(Be=>{"use strict";var gn=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.hans=void 0;var Wp=wr(),xC=gn(ru()),RC=cn(),MC=gn(NT()),CC=gn(FT()),AC=gn(UT()),PC=gn(qT()),NC=gn($T()),IC=gn(GT()),FC=gn(YT()),LC=gn(BT());Be.hans=new Wp.Chrono(qp());Be.casual=new Wp.Chrono(qp());Be.strict=new Wp.Chrono($p());function UC(r,e,t){return Be.casual.parse(r,e,t)}Be.parse=UC;function WC(r,e,t){return Be.casual.parseDate(r,e,t)}Be.parseDate=WC;function qp(){let r=$p();return r.parsers.unshift(new MC.default),r}Be.createCasualConfiguration=qp;function $p(){let r=RC.includeCommonConfiguration({parsers:[new CC.default,new PC.default,new IC.default,new NC.default,new AC.default],refiners:[new FC.default,new LC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof xC.default)),r}Be.createConfiguration=$p});var zT=E(jt=>{"use strict";var VT=jt&&jt.__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]}),qC=jt&&jt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$C=jt&&jt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&VT(e,r,t)},jC=jt&&jt.__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)&&VT(e,r,t);return qC(e,r),e};Object.defineProperty(jt,"__esModule",{value:!0});jt.hans=void 0;$C(MT(),jt);jt.hans=jC(HT())});var Pt=E(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.parseTimeUnits=se.TIME_UNITS_PATTERN=se.parseYear=se.YEAR_PATTERN=se.parseOrdinalNumberPattern=se.ORDINAL_NUMBER_PATTERN=se.parseNumberPattern=se.NUMBER_PATTERN=se.TIME_UNIT_DICTIONARY=se.ORDINAL_WORD_DICTIONARY=se.INTEGER_WORD_DICTIONARY=se.MONTH_DICTIONARY=se.FULL_MONTH_NAME_DICTIONARY=se.WEEKDAY_DICTIONARY=se.REGEX_PARTS=void 0;var Nu=Re(),GC=ot();se.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};se.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};se.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};se.MONTH_DICTIONARY=Object.assign(Object.assign({},se.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});se.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};se.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};se.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"};se.NUMBER_PATTERN=`(?:${Nu.matchAnyPattern(se.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 QT(r){let e=r.toLowerCase();return se.INTEGER_WORD_DICTIONARY[e]!==void 0?se.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}se.parseNumberPattern=QT;se.ORDINAL_NUMBER_PATTERN=`(?:${Nu.matchAnyPattern(se.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function YC(r){let e=r.toLowerCase();return se.ORDINAL_WORD_DICTIONARY[e]!==void 0?se.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}se.parseOrdinalNumberPattern=YC;var jp="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";se.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${jp}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${jp}|[5-9][0-9]${jp})`;function BC(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 GC.findMostLikelyADYear(e)}se.parseYear=BC;var XT=`(${se.NUMBER_PATTERN})\\s{0,3}(${Nu.matchAnyPattern(se.TIME_UNIT_DICTIONARY)})`,KT=new RegExp(XT,"i");se.TIME_UNITS_PATTERN=Nu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",XT);function HC(r){let e={},t=r,n=KT.exec(t);for(;n;)VC(e,n),t=t.substring(n[0].length).trim(),n=KT.exec(t);return e}se.parseTimeUnits=HC;function VC(r,e){let t=QT(e[1]),n=se.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var JT=E(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});var Ka=Pt(),zC=We(),KC=B(),ZT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ka.TIME_UNITS_PATTERN})${Ka.REGEX_PARTS.rightBoundary}`,QC=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${ZT}`,Ka.REGEX_PARTS.flags),XC=new RegExp(ZT,"i"),Gp=class extends KC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ka.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?XC:QC}innerExtract(e,t){let n=Ka.parseTimeUnits(t[1]);return zC.ParsingComponents.createRelativeFromReference(e.reference,n)}};Yp.default=Gp});var i_=E(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var ZC=ot(),Qa=Pt(),n_=Pt(),Iu=Pt(),JC=Re(),eA=B(),tA=new RegExp(`(?:\u0441)?\\s*(${Iu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Iu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${JC.matchAnyPattern(Qa.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${n_.YEAR_PATTERN}(?![^\\s]\\d)))?${Qa.REGEX_PARTS.rightBoundary}`,Qa.REGEX_PARTS.flags),e_=1,t_=2,rA=3,r_=4,Bp=class extends eA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Qa.REGEX_PARTS.leftBoundary}innerPattern(){return tA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Qa.MONTH_DICTIONARY[t[rA].toLowerCase()],s=Iu.parseOrdinalNumberPattern(t[e_]);if(s>31)return t.index=t.index+t[e_].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[r_]){let a=n_.parseYear(t[r_]);n.start.assign("year",a)}else{let a=ZC.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[t_]){let a=Iu.parseOrdinalNumberPattern(t[t_]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hp.default=Bp});var o_=E(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var Xa=Pt(),nA=ot(),iA=Re(),a_=Pt(),sA=B(),aA=new RegExp(`((?:\u0432)\\s*)?(${iA.matchAnyPattern(Xa.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${a_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Xa.REGEX_PARTS.flags),oA=2,s_=3,Vp=class extends sA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xa.REGEX_PARTS.leftBoundary}innerPattern(){return aA}innerExtract(e,t){let n=t[oA].toLowerCase();if(t[0].length<=3&&!Xa.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=Xa.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[s_]){let a=a_.parseYear(t[s_]);i.start.assign("year",a)}else{let a=nA.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};zp.default=Vp});var l_=E(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var Fu=Ke(),uA=li(),u_=Pt(),Kp=class extends uA.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return u_.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))?(?!\\/)${u_.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",Fu.Meridiem.PM)):i<6&&n.assign("meridiem",Fu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Fu.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",Fu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qp.default=Kp});var c_=E(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var Lu=Pt(),lA=We(),cA=B(),dA=ir(),fA=new RegExp(`(${Lu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Lu.REGEX_PARTS.flags),Xp=class extends cA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Lu.REGEX_PARTS.leftBoundary}innerPattern(){return fA}innerExtract(e,t){let n=Lu.parseTimeUnits(t[1]),i=dA.reverseTimeUnits(n);return lA.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zp.default=Xp});var d_=E(Za=>{"use strict";var pA=Za&&Za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Za,"__esModule",{value:!0});var mA=pA($r()),Jp=class extends mA.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Za.default=Jp});var f_=E(Ja=>{"use strict";var hA=Ja&&Ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ja,"__esModule",{value:!0});var gA=hA(ln()),em=class extends gA.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Ja.default=em});var p_=E(yn=>{"use strict";var yA=yn&&yn.__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]}),bA=yn&&yn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),TA=yn&&yn.__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)&&yA(e,r,t);return bA(e,r),e};Object.defineProperty(yn,"__esModule",{value:!0});var _A=B(),eo=TA(fn()),tm=Pt(),vA=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)${tm.REGEX_PARTS.rightBoundary}`,tm.REGEX_PARTS.flags),rm=class extends _A.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return tm.REGEX_PARTS.leftBoundary}innerPattern(e){return vA}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return eo.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return eo.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return eo.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return eo.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return eo.theDayBefore(e.reference,2)}return i}};yn.default=rm});var m_=E(Dr=>{"use strict";var wA=Dr&&Dr.__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]}),kA=Dr&&Dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),EA=Dr&&Dr.__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)&&wA(e,r,t);return kA(e,r),e},SA=Dr&&Dr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dr,"__esModule",{value:!0});var OA=B(),yi=EA(fn()),DA=nr(),xA=SA(we()),nm=Pt(),RA=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)${nm.REGEX_PARTS.rightBoundary}`,nm.REGEX_PARTS.flags),im=class extends OA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return nm.REGEX_PARTS.leftBoundary}innerPattern(){return RA}innerExtract(e,t){let n=xA.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return yi.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return yi.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return yi.morning(e.reference);if(i.match(/в\s*полдень/))return yi.noon(e.reference);if(i.match(/прошлой\s*ночью/))return yi.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return yi.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),DA.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?yi.midnight(e.reference):s}};Dr.default=im});var h_=E(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var to=Pt(),MA=Re(),CA=B(),AA=di(),PA=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*)?(${MA.matchAnyPattern(to.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)?${to.REGEX_PARTS.rightBoundary}`,to.REGEX_PARTS.flags),NA=1,IA=2,FA=3,sm=class extends CA.AbstractParserWithWordBoundaryChecking{innerPattern(){return PA}patternLeftBoundary(){return to.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[IA].toLowerCase(),i=to.WEEKDAY_DICTIONARY[n],s=t[NA],a=t[FA],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=AA.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};am.default=sm});var y_=E(no=>{"use strict";var LA=no&&no.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(no,"__esModule",{value:!0});var ro=Pt(),g_=We(),UA=LA(we()),WA=B(),qA=Re(),$A=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*(${qA.matchAnyPattern(ro.TIME_UNIT_DICTIONARY)})(?=\\s*)${ro.REGEX_PARTS.rightBoundary}`,ro.REGEX_PARTS.flags),jA=1,GA=2,om=class extends WA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ro.REGEX_PARTS.leftBoundary}innerPattern(){return $A}innerExtract(e,t){let n=t[jA].toLowerCase(),i=t[GA].toLowerCase(),s=ro.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,g_.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,g_.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=UA.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}};no.default=om});var b_=E(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var io=Pt(),YA=We(),BA=B(),HA=ir(),VA=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*(${io.TIME_UNITS_PATTERN})${io.REGEX_PARTS.rightBoundary}`,io.REGEX_PARTS.flags),um=class extends BA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return io.REGEX_PARTS.leftBoundary}innerPattern(){return VA}innerExtract(e,t){let n=t[1].toLowerCase(),i=io.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=HA.reverseTimeUnits(i);break}return YA.ParsingComponents.createRelativeFromReference(e.reference,i)}};lm.default=um});var v_=E(it=>{"use strict";var Gt=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 zA=Gt(JT()),KA=Gt(i_()),QA=Gt(o_()),XA=Gt(l_()),ZA=Gt(c_()),JA=Gt(d_()),eP=Gt(f_()),tP=cn(),rP=Gt(p_()),nP=Gt(m_()),iP=Gt(h_()),sP=Gt(y_()),T_=wr(),aP=Gt(fi()),oP=Gt(b_());it.casual=new T_.Chrono(__());it.strict=new T_.Chrono(cm(!0));function uP(r,e,t){return it.casual.parse(r,e,t)}it.parse=uP;function lP(r,e,t){return it.casual.parseDate(r,e,t)}it.parseDate=lP;function __(){let r=cm(!1);return r.parsers.unshift(new rP.default),r.parsers.unshift(new nP.default),r.parsers.unshift(new QA.default),r.parsers.unshift(new sP.default),r.parsers.unshift(new oP.default),r}it.createCasualConfiguration=__;function cm(r=!0){return tP.includeCommonConfiguration({parsers:[new aP.default(!0),new zA.default,new KA.default,new iP.default,new XA.default(r),new ZA.default],refiners:[new eP.default,new JA.default]},r)}it.createConfiguration=cm});var Ke=E(pe=>{"use strict";var cP=pe&&pe.__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]}),dP=pe&&pe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jn=pe&&pe.__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)&&cP(e,r,t);return dP(e,r),e};Object.defineProperty(pe,"__esModule",{value:!0});pe.parseDate=pe.parse=pe.casual=pe.strict=pe.ru=pe.zh=pe.nl=pe.pt=pe.ja=pe.fr=pe.de=pe.Meridiem=pe.Chrono=pe.en=void 0;var dm=jn(Dd());pe.en=dm;var fP=wr();Object.defineProperty(pe,"Chrono",{enumerable:!0,get:function(){return fP.Chrono}});var pP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(pP=pe.Meridiem||(pe.Meridiem={}));var mP=jn(My());pe.de=mP;var hP=jn(sb());pe.fr=hP;var gP=jn(mb());pe.ja=gP;var yP=jn(Mb());pe.pt=yP;var bP=jn(mT());pe.nl=bP;var TP=jn(zT());pe.zh=TP;var _P=jn(v_());pe.ru=_P;pe.strict=dm.strict;pe.casual=dm.casual;function vP(r,e,t){return pe.casual.parse(r,e,t)}pe.parse=vP;function wP(r,e,t){return pe.casual.parseDate(r,e,t)}pe.parseDate=wP});var wv=E((_v,vv)=>{(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 b="(node) warning: possible EventEmitter memory leak detected. "+p+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(b+=" Event name: "+h+"."),typeof process!="undefined"&&process.emitWarning){var _=new Error(b);_.name="MaxListenersExceededWarning",_.emitter=this,_.count=p,process.emitWarning(_)}else console.error(b),console.trace&&console.trace()}var m=function(p,h,b){var _=arguments.length;switch(_){case 0:return[];case 1:return[p];case 2:return[p,h];case 3:return[p,h,b];default:for(var w=new Array(_);_--;)w[_]=arguments[_];return w}};function g(p,h){for(var b={},_,w=p.length,O=h?h.length:0,M=0;M0;)p=O[v],M.call(A,p,b[p]);this._listeners={},this._listenersCount=0,R()}}});function T(p,h,b,_){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,A,v,R;function N(le){throw Error('Invalid "'+A+'" option value'+(le?". Reason: "+le:""))}for(var te=0;te0;)if(A===p[v])return O;M(h)}}var x=S(["function"]),U=S(["object","function"]);function q(p,h,b){var _,w,O=0,M,A=new p(function(v,R,N){b=T(b,{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}}),_=!b.overload&&typeof p.prototype.cancel=="function"&&typeof N=="function";function te(){w&&(w=null),O&&(clearTimeout(O),O=0)}var le=function(Ne){te(),v(Ne)},fe=function(Ne){te(),R(Ne)};_?h(le,fe,N):(w=[function(Ne){fe(Ne||Error("canceled"))}],h(le,fe,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),b.timeout>0&&(O=setTimeout(function(){var Ne=Error("timeout");Ne.code="ETIMEDOUT",O=0,A.cancel(Ne),R(Ne)},b.timeout))});return _||(A.cancel=function(v){if(!!w){for(var R=w.length,N=1;N0;)fe=qt[A],fe!=="_listeners"&&(Xe=H(p,h,b[fe],_+1,w),Xe&&(le?le.push.apply(le,Xe):le=Xe));return le}else if(Lr==="**"){for(sn=_+1===w||_+2===w&&G==="*",sn&&b._listeners&&(le=H(p,h,b,w,w)),qt=l(b),A=qt.length;A-- >0;)fe=qt[A],fe!=="_listeners"&&(fe==="*"||fe==="**"?(b[fe]._listeners&&!sn&&(Xe=H(p,h,b[fe],w,w),Xe&&(le?le.push.apply(le,Xe):le=Xe)),Xe=H(p,h,b[fe],_,w)):fe===G?Xe=H(p,h,b[fe],_+2,w):Xe=H(p,h,b[fe],_,w),Xe&&(le?le.push.apply(le,Xe):le=Xe));return le}else b[Lr]&&(le=H(p,h,b[Lr],_+1,w));if(Ne=b["*"],Ne&&H(p,h,Ne,_+1,w),Ce=b["**"],Ce)if(_0;)fe=qt[A],fe!=="_listeners"&&(fe===G?H(p,h,Ce[fe],_+2,w):fe===Lr?H(p,h,Ce[fe],_+1,w):(Mt={},Mt[fe]=Ce[fe],H(p,h,{"**":Mt},_+1,w)));else Ce._listeners?H(p,h,Ce,w,w):Ce["*"]&&Ce["*"]._listeners&&H(p,h,Ce["*"],w,w);return le}function Y(p,h,b){var _=0,w=0,O,M=this.delimiter,A=M.length,v;if(typeof p=="string")if((O=p.indexOf(M))!==-1){v=new Array(5);do v[_++]=p.slice(w,O),w=O+A;while((O=p.indexOf(M,w))!==-1);v[_++]=p.slice(w)}else v=[p],_=1;else v=p,_=p.length;if(_>1){for(O=0;O+1<_;O++)if(v[O]==="**"&&v[O+1]==="**")return}var R=this.listenerTree,N;for(O=0;O<_;O++)if(N=v[O],R=R[N]||(R[N]={}),O===_-1)return R._listeners?(typeof R._listeners=="function"&&(R._listeners=[R._listeners]),b?R._listeners.unshift(h):R._listeners.push(h),!R._listeners.warned&&this._maxListeners>0&&R._listeners.length>this._maxListeners&&(R._listeners.warned=!0,f.call(this,R._listeners.length,N))):R._listeners=h,!0;return!0}function be(p,h,b,_){for(var w=l(p),O=w.length,M,A,v,R=p._listeners,N;O-- >0;)A=w[O],M=p[A],A==="_listeners"?v=b:v=b?b.concat(A):[A],N=_||typeof A=="symbol",R&&h.push(N?v:v.join(this.delimiter)),typeof M=="object"&&be.call(this,M,h,v,N);return h}function Pe(p){for(var h=l(p),b=h.length,_,w,O;b-- >0;)w=h[b],_=p[w],_&&(O=!0,w!=="_listeners"&&!Pe(_)&&delete p[w]);return O}function j(p,h,b){this.emitter=p,this.event=h,this.listener=b}j.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function $(p,h,b){if(b===!0)w=!0;else if(b===!1)_=!0;else{if(!b||typeof b!="object")throw TypeError("options should be an object or true");var _=b.async,w=b.promisify,O=b.nextTick,M=b.objectify}if(_||O||w){var A=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 R=arguments,N=this,te=this.event;return w?O?Promise.resolve():new Promise(function(le){u(le)}).then(function(){return N.event=te,A.apply(N,R)}):(O?process.nextTick:u)(function(){N.event=te,A.apply(N,R)})},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,b){if(typeof p!="object")throw TypeError("target musts be an object");var _=this;b=T(b,{on:r,off:r,reducers:r},{on:x,off:x,reducers:U});function w(O){if(typeof O!="object")throw TypeError("events must be an object");var M=b.reducers,A=re.call(_,p),v;A===-1?v=new y(_,p,b):v=_._observers[A];for(var R=l(O),N=R.length,te,le=typeof M=="function",fe=0;fe0;)w=b[_],(!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,b){return this._once(p,h,!1,b)},D.prototype.prependOnceListener=function(p,h,b){return this._once(p,h,!0,b)},D.prototype._once=function(p,h,b,_){return this._many(p,1,h,b,_)},D.prototype.many=function(p,h,b,_){return this._many(p,h,b,!1,_)},D.prototype.prependMany=function(p,h,b,_){return this._many(p,h,b,!0,_)},D.prototype._many=function(p,h,b,_,w){var O=this;if(typeof b!="function")throw new Error("many only accepts instances of Function");function M(){return--h===0&&O.off(p,M),b.apply(this,arguments)}return M._origin=b,this._on(p,M,_,w)},D.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var p=arguments[0],h,b=this.wildcard,_,w,O,M,A;if(p==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(b&&(h=p,p!=="newListener"&&p!=="removeListener"&&typeof p=="object")){if(w=p.length,s){for(O=0;O3)for(_=new Array(v-1),M=1;M3)for(w=new Array(R-1),A=1;A0&&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 b,_=[];if(this.wildcard){var w=typeof p=="string"?p.split(this.delimiter):p.slice();if(_=H.call(this,null,w,this.listenerTree,0),!_)return this}else{if(!this._events[p])return this;b=this._events[p],_.push({_listeners:b})}for(var O=0;O<_.length;O++){var M=_[O];if(b=M._listeners,t(b)){for(var A=-1,v=0,R=b.length;v0){for(_=this._all,h=0,b=_.length;h0;)_=h[b[O]],typeof _=="function"?w.push(_):w.push.apply(w,_);return w}else{if(this.wildcard){if(M=this.listenerTree,!M)return[];var A=[],v=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,A,v,M,0),A}return h?(_=h[p],_?typeof _=="function"?[_]:_:[]):[]}},D.prototype.eventNames=function(p){var h=this._events;return this.wildcard?be.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=[],b=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,h,b,this.listenerTree,0),h.length>0}var _=this._events,w=this._all;return!!(w&&w.length||_&&(p===r?l(_).length:_[p]))},D.prototype.listenersAny=function(){return this._all?this._all:[]},D.prototype.waitFor=function(p,h){var b=this,_=typeof h;return _==="number"?h={timeout:h}:_==="function"&&(h={filter:h}),h=T(h,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:x,Promise:k}),q(h.Promise,function(w,O,M){function A(){var v=h.filter;if(!(v&&!v.apply(b,arguments)))if(b.off(p,A),h.handleError){var R=arguments[0];R?O(R):w(m.apply(null,arguments).slice(1))}else w(m.apply(null,arguments))}M(function(){b.off(p,A)}),b._on(p,A,!1)},{timeout:h.timeout,overload:h.overload})};function V(p,h,b){b=T(b,{Promise,timeout:0,overload:!1},{Promise:k});var _=b.Promise;return q(_,function(w,O,M){var A;if(typeof p.addEventListener=="function"){A=function(){w(m.apply(null,arguments))},M(function(){p.removeEventListener(h,A)}),p.addEventListener(h,A,{once:!0});return}var v=function(){R&&p.removeListener("error",R),w(m.apply(null,arguments))},R;h!=="error"&&(R=function(N){p.removeListener(h,v),O(N)},p.once("error",R)),M(function(){R&&p.removeListener("error",R),p.removeListener(h,v)}),p.once(h,v)},{timeout:b.timeout,overload:b.overload})}var W=D.prototype;if(Object.defineProperties(D,{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:V,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 D});else if(typeof _v=="object")vv.exports=D;else{var Z=new Function("","return this")();Z.EventEmitter2=D}})()});var Rw=E(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var Dw=Symbol("MustacheDataPath");function Ow({target:r,propertyName:e}){return[...r[Dw]||[],e]}function xw(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=Ow({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[Dw]=Ow({target:t,propertyName:n}),xw(i,e)):i}})}uh.default=xw});var en=E(Nr=>{"use strict";Nr.__esModule=!0;Nr.Tokens=Nr.StructuralCharacters=Nr.Operators=void 0;var GI;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(GI=Nr.Operators||(Nr.Operators={}));var YI;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(YI=Nr.StructuralCharacters||(Nr.StructuralCharacters={}));var BI;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(BI=Nr.Tokens||(Nr.Tokens={}))});var hh=E(Is=>{"use strict";Is.__esModule=!0;Is.VALID_TOKENS=Is.OPERATOR_PRECEDENCE=void 0;var qe=en();Is.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Is.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 gh=E(Tt=>{"use strict";Tt.__esModule=!0;Tt.ESCAPE_CHARACTER=Tt.EOL=Tt.COMMENT_DELIMITER=Tt.QUOTED_IDENTIFIER_DELIMITER=Tt.SEPARATORS=Tt.OPERATORS=Tt.STRUCTURAL_CHARACTERS=void 0;var Fs=en();Tt.STRUCTURAL_CHARACTERS={"(":Fs.StructuralCharacters.OPEN_PARENTHESIS,")":Fs.StructuralCharacters.CLOSE_PARENTHESIS};Tt.OPERATORS={AND:Fs.Operators.AND,OR:Fs.Operators.OR,XOR:Fs.Operators.XOR,NOT:Fs.Operators.NOT};Tt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tt.COMMENT_DELIMITER=String.fromCodePoint(35);Tt.EOL=String.fromCodePoint(10);Tt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Iw=E(br=>{"use strict";var yh=br&&br.__assign||function(){return yh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Ml.__esModule=!0;Ml.lex=void 0;var Ls=en(),Zt=gh(),Us=Iw(),KI=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var Lw=Jt&&Jt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var tn=qs&&qs.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";_t.__esModule=!0;_t.throwInvalidExpression=_t.isOperator=_t.isIdentifier=_t.notUtil=_t.xorUtil=_t.orUtil=_t.andUtil=void 0;var $w=en(),rF=function(r,e){return r&&e};_t.andUtil=rF;var nF=function(r,e){return r||e};_t.orUtil=nF;var iF=function(r,e){return r!==e};_t.xorUtil=iF;var sF=function(r){return!r};_t.notUtil=sF;var aF=function(r){var e=r.name,t=r.value;return e===$w.Tokens.IDENTIFIER&&typeof t=="string"};_t.isIdentifier=aF;var oF=function(r){var e=r.name,t=r.value;return e===$w.Tokens.OPERATOR&&typeof t=="string"};_t.isOperator=oF;var uF=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};_t.throwInvalidExpression=uF});var jw=E(Pl=>{"use strict";var No;Pl.__esModule=!0;Pl.OPERATOR_MAP=void 0;var vh=en(),wh=_h();Pl.OPERATOR_MAP=(No={},No[vh.Operators.AND]=wh.andUtil,No[vh.Operators.OR]=wh.orUtil,No[vh.Operators.XOR]=wh.xorUtil,No)});var Yw=E(Tr=>{"use strict";var $s=Tr&&Tr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var kh=rn&&rn.__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]});rn.__esModule=!0;rn.parse=rn.evaluate=rn.getEvaluator=void 0;var Bw=Yw();kh(rn,Bw,"getEvaluator");kh(rn,Bw,"evaluate");var mF=Th();kh(rn,mF,"parse")});var MF={};tE(MF,{default:()=>oc});module.exports=rE(MF);var Nk=require("obsidian");var hs=require("obsidian");var AF=new Error("timeout while waiting for mutex to become available"),PF=new Error("mutex already locked"),nE=new Error("request for lock canceled"),iE=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())})},vc=class{constructor(e,t=nE){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 iE(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]=[])}},sE=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())})},Bo=class{constructor(e){this._semaphore=new vc(1,e)}acquire(){return sE(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 Ho=require("obsidian"),ze=class{constructor(e,t={}){this._frontmatter={};var i;this._path=e,this._cachedMetadata=t;let n=t.frontmatter;n!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(n)),this._frontmatter.tags=(i=(0,Ho.parseFrontMatterTags)(n))!=null?i:[])}get path(){return this._path}get tags(){var t;let e=(t=(0,Ho.getAllTags)(this.cachedMetadata))!=null?t:[];return[...new Set(e)]}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}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)}};var Bi=class{constructor(e,t){this.parent=null;this.children=[];this.originalMarkdown=e,this.parent=t,t!==null&&t.children.push(this)}};var Uu=ia(Ke());var kt=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 kt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new kt(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 Yt=class{static parseDate(e,t=!1){return window.moment(Uu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Yt.parseRelativeDateRange,Yt.parseNumberedDateRange,Yt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return kt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Uu.parse(e,void 0,{forwardDate:t});if(n.length===0)return kt.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 kt(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=kt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return kt.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 kt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return kt.buildInvalid()}};var kP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Wu(r){for(let[e,t]of Object.entries(kP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var qu=["MO","TU","WE","TH","FR","SA","SU"],He=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(qu.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=qu[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},Bt=function(r){return typeof r=="number"},fm=function(r){return typeof r=="string"&&qu.includes(r)},ct=Array.isArray,cr=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+=ye(t,e/t.length)),t.slice(0,e)+String(n))}var k_=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},mt=function(r,e){var t=r%e;return t*e<0?t+e:t},$u=function(r,e){return{div:Math.floor(r/e),mod:mt(r,e)}},Ht=function(r){return!Fe(r)||r.length===0},$e=function(r){return!Ht(r)},Te=function(r,e){return $e(r)&&r.indexOf(e)!==-1};var Yr=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))},EP=[31,28,31,30,31,30,31,31,30,31,30,31],O_=1e3*60*60*24,ju=9999,D_=Yr(1970,1,1),SP=[6,0,1,2,3,4,5];var us=function(r){return r%4===0&&r%100!==0||r%400===0},pm=function(r){return r instanceof Date},Ti=function(r){return pm(r)&&!isNaN(r.getTime())},E_=function(r){return r.getTimezoneOffset()*60*1e3},OP=function(r,e){var t=r.getTime()-E_(r),n=e.getTime()-E_(e),i=t-n;return Math.round(i/O_)},so=function(r){return OP(r,D_)},Gu=function(r){return new Date(D_.getTime()+r*O_)},DP=function(r){var e=r.getUTCMonth();return e===1&&us(r.getUTCFullYear())?29:EP[e]},bn=function(r){return SP[r.getUTCDay()]},mm=function(r,e){var t=Yr(r,e+1,1);return[bn(t),DP(t)]},Yu=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()))},Bu=function(r){var e=new Date(r.getTime());return e},hm=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}(),_n=xP;var gm=function(r,e){return gm=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])},gm(r,e)};function cs(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");gm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var dt=function(){return dt=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 oo(r,e){e===void 0&&(e=_i);var t={},n=new NP(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=z.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=z.WEEKLY,t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=z.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=z.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=z.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=z.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=z.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=z.WEEKLY;var m=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[z[m]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var g=u();if(!g)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(z[g]),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=z.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=o();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(y),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 g=l(),y=u(),T=o();if(g)y?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[y].nth(g))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(g),n.accept("day(s)"));else if(y)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[y]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var k=n.acceptNumber();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(k[0],10)];n.accept("comma");){if(k=n.acceptNumber(),!k)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(k[0],10))}}else if(T)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(T);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 me;(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"})(me||(me={}));function uo(r){return r12){var n=Math.floor(this.month/12),i=mt(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=$u(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Ht(i)||Te(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=$u(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Ht(i)||Te(i,this.hour))&&(Ht(s)||Te(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=$u(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Ht(i)||Te(i,this.hour))&&(Ht(s)||Te(s,this.minute))&&(Ht(a)||Te(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=mm(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>ju))return;t=mm(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 me.YEARLY:return this.addYears(s);case me.MONTHLY:return this.addMonths(s);case me.WEEKLY:return this.addWeekly(s,a);case me.DAILY:return this.addDaily(s);case me.HOURLY:return this.addHours(s,n,o);case me.MINUTELY:return this.addMinutes(s,n,o,u);case me.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(fs);function bm(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 z.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case z.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case z.WEEKLY:e.byweekday=[bn(e.dtstart)];break}if(Fe(e.bymonth)&&!ct(e.bymonth)&&(e.bymonth=[e.bymonth]),Fe(e.byyearday)&&!ct(e.byyearday)&&Bt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Fe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ct(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)&&!ct(e.byweekno)&&(e.byweekno=[e.byweekno]),!Fe(e.byweekday))e.bynweekday=null;else if(Bt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(fm(e.byweekday))e.byweekday=[He.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof He)!e.byweekday.n||e.freq>z.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;tz.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)?Bt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+mt(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=mt(l,7),m=Math.floor(d+f/4),g=0;g0&&y<=m){var T=void 0;y>1?(T=c+(y-1)*7,c!==u&&(T-=7-u)):T=c;for(var k=0;k<7&&(o.wnomask[T]=1,T++,o.wdaymask[T]!==e.wkst);k++);}}if(Te(e.byweekno,1)){var T=c+m*7;if(c!==u&&(T-=7-u),T=4?(U=0,re=q+mt(x-e.wkst,7)):re=n-c,S=Math.floor(52+mt(re,7)/4)}if(Te(e.byweekno,S))for(var T=0;Ts)return vn(r);if(S>=t){var x=J_(S,e);if(!r.accept(x)||o&&(--o,!o))return vn(r)}}else for(var k=m;ks)return vn(r);if(S>=t){var x=J_(S,e);if(!r.accept(x)||o&&(--o,!o))return vn(r)}}}if(e.interval===0||(u.add(e,y),u.year>ju))return vn(r);uo(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function HP(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)&&!Te(n,r.mmask[e])||$e(i)&&!r.wnomask[e]||$e(s)&&!Te(s,r.wdaymask[e])||$e(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!Te(r.eastermask,e)||($e(o)||$e(u))&&!Te(o,r.mdaymask[e])&&!Te(u,r.nmdaymask[e])||$e(l)&&(e=r.yearlen&&!Te(l,e+1-r.yearlen)&&!Te(l,-r.nextyearlen+e-r.yearlen))}function J_(r,e){return new vi(r,e.tzid).rezonedDate()}function vn(r){return r.getValue()}function VP(r,e,t,n,i){for(var s=!1,a=e;a=z.HOURLY&&$e(i)&&!Te(i,e.hour)||n>=z.MINUTELY&&$e(s)&&!Te(s,e.minute)||n>=z.SECONDLY&&$e(a)&&!Te(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var dr={MO:new He(0),TU:new He(1),WE:new He(2),TH:new He(3),FR:new He(4),SA:new He(5),SU:new He(6)},lo={freq:me.YEARLY,dtstart:null,interval:1,wkst:dr.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},F_=Object.keys(lo),z=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new W_,this.origOptions=bm(e);var n=N_(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return oo(e,t)},r.fromText=function(e,t){return M_(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Hu(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 ym("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new _n("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!Ti(e)||!Ti(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 ym("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new _n("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Ti(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 _n("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Ti(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 _n("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return po(this.origOptions)},r.prototype.toText=function(e,t,n){return C_(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return A_(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=me.YEARLY,r.MONTHLY=me.MONTHLY,r.WEEKLY=me.WEEKLY,r.DAILY=me.DAILY,r.HOURLY=me.HOURLY,r.MINUTELY=me.MINUTELY,r.SECONDLY=me.SECONDLY,r.MO=dr.MO,r.TU=dr.TU,r.WE=dr.WE,r.TH=dr.TH,r.FR=dr.FR,r.SA=dr.SA,r.SU=dr.SU,r.parseString=fo,r.optionsToString=po,r}();function ev(r,e,t,n,i,s){var a={},o=r.accept;function u(f,m){t.forEach(function(g){g.between(f,m,!0).forEach(function(y){a[Number(y)]=!0})})}i.forEach(function(f){var m=new vi(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 vm(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new z(_m(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new z(_m(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 z(_m(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function Vu(r,e){return e===void 0&&(e={}),QP(r,XP(e))}function _m(r,e,t){return dt(dt({},r),{dtstart:e,tzid:t})}function XP(r){var e=[],t=Object.keys(r),n=Object.keys(tv);if(t.forEach(function(i){Te(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return dt(dt({},tv),r)}function ZP(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=k_(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function JP(r){var e=ZP(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 eN(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 tN(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function rv(r,e){return tN(e),r.split(",").map(function(t){return ao(t)})}function nv(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;nno ${r} date`;let n=wm.parseDate(e,t,{forwardDate:t!=null});return n!==null?window.moment(n).format("YYYY-MM-DD"):`invalid ${r} date`}function ov(r,e,t){return rN(r,e,t?new Date:void 0)}function wi(r,e){let t=null,n=wm.parseDate(r,new Date,{forwardDate:e});return n!==null&&(t=window.moment(n)),t}var st=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=z.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new z(u);return new st({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){s instanceof Error&&console.log(s.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(e=window.moment()){let t=this.nextReferenceDate(e);if(t!==null){let n=null,i=null,s=null;if(this.referenceDate){if(this.startDate){let a=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(t),n.add(Math.round(a.asDays()),"days")}if(this.scheduledDate){let a=window.moment.duration(this.scheduledDate.diff(this.referenceDate));i=window.moment(t),i.add(Math.round(a.asDays()),"days")}if(this.dueDate){let a=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(t),s.add(Math.round(a.asDays()),"days")}}return{startDate:n,scheduledDate:i,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||fr(this.startDate,e.startDate)!==0||fr(this.scheduledDate,e.scheduledDate)!==0||fr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(e){return this.baseOnToday?this.nextReferenceDateFromToday(e.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new z(he(K({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=st.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=st.nextAfterYears(e,n,t,a[1])),st.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));st.isSkippingTooManyMonths(e,t,s);)t=st.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}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 z(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var ps=(f=>(f.Description="description",f.Id="id",f.DependsOn="dependsOn",f.Priority="priority",f.RecurrenceRule="recurrenceRule",f.CreatedDate="createdDate",f.StartDate="startDate",f.ScheduledDate="scheduledDate",f.DueDate="dueDate",f.CancelledDate="cancelledDate",f.DoneDate="doneDate",f.BlockLink="blockLink",f))(ps||{}),zu=Object.values(ps),Hr=class{constructor(){this.visible={};this.tagsVisible=!0;zu.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 zu.filter(e=>this.visible[e])}get hiddenComponents(){return zu.filter(e=>!this.visible[e])}get toggleableComponents(){return zu.filter(e=>e!=="description"&&e!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(e=>{this.visible[e]=!this.visible[e]}),this.setTagsVisibility(!this.areTagsShown())}};var Vt=class{},J=Vt;J.dateFormat="YYYY-MM-DD",J.dateTimeFormat="YYYY-MM-DD HH:mm",J.indentationRegex=/^([\s\t>]*)/,J.listMarkerRegex=/([-*+]|[0-9]+\.)/,J.checkboxRegex=/\[(.)\]/u,J.afterCheckboxRegex=/ *(.*)/u,J.taskRegex=new RegExp(Vt.indentationRegex.source+Vt.listMarkerRegex.source+" +"+Vt.checkboxRegex.source+Vt.afterCheckboxRegex.source,"u"),J.nonTaskRegex=new RegExp(Vt.indentationRegex.source+Vt.listMarkerRegex.source+"? *("+Vt.checkboxRegex.source+")?"+Vt.afterCheckboxRegex.source,"u"),J.listItemRegex=new RegExp(Vt.indentationRegex.source+Vt.listMarkerRegex.source),J.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,J.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,J.hashTagsFromEnd=new RegExp(Vt.hashTags.source+"$");var ki=/[a-zA-Z0-9-_]+/,Em=new RegExp(ki.source+"( *, *"+ki.source+" *)*"),mo={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}",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,dependsOnRegex:new RegExp("\u26D4\uFE0F? *("+Em.source+")$","iu"),idRegex:new RegExp("\u{1F194} *("+ki.source+")$","iu")}};function km(r,e,t){return t?r?" "+e:` ${e} ${t}`:""}function ms(r,e,t){return t?r?" "+e:` ${e} ${t.format(J.dateFormat)}`:""}function uv(){let r=[];return Object.values(mo.prioritySymbols).forEach(e=>{e.length>0&&r.push(e)}),Object.values(mo).forEach(e=>{typeof e=="string"&&r.push(e)}),r}var Ei=class{constructor(e){this.symbols=e}serialize(e){let t=new Hr,n="",i=!1;for(let s of t.shownComponents)n+=this.componentToString(e,i,s);return n}componentToString(e,t,n){var g;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,dueDateSymbol:d,dependsOnSymbol:f,idSymbol:m}=this.symbols;switch(n){case"description":return e.description;case"priority":{let y="";return e.priority==="0"?y=" "+i.Highest:e.priority==="1"?y=" "+i.High:e.priority==="2"?y=" "+i.Medium:e.priority==="4"?y=" "+i.Low:e.priority==="5"&&(y=" "+i.Lowest),y}case"startDate":return ms(t,s,e.startDate);case"createdDate":return ms(t,a,e.createdDate);case"scheduledDate":return e.scheduledDateIsInferred?"":ms(t,o,e.scheduledDate);case"doneDate":return ms(t,u,e.doneDate);case"cancelledDate":return ms(t,l,e.cancelledDate);case"dueDate":return ms(t,d,e.dueDate);case"recurrenceRule":return e.recurrence?km(t,c,e.recurrence.toText()):"";case"dependsOn":return e.dependsOn.length===0?"":km(t,f,e.dependsOn.join(","));case"id":return km(t,m,e.id);case"blockLink":return(g=e.blockLink)!=null?g:"";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="",g=[],y="",T=20,k=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 x=e.match(t.doneDateRegex);x!==null&&(u=window.moment(x[1],J.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let U=e.match(t.cancelledDateRegex);U!==null&&(l=window.moment(U[1],J.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let q=e.match(t.dueDateRegex);q!==null&&(o=window.moment(q[1],J.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let re=e.match(t.scheduledDateRegex);re!==null&&(a=window.moment(re[1],J.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let H=e.match(t.startDateRegex);H!==null&&(s=window.moment(H[1],J.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let Y=e.match(t.createdDateRegex);Y!==null&&(c=window.moment(Y[1],J.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let be=e.match(t.recurrenceRegex);be!==null&&(d=be[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let Pe=e.match(J.hashTagsFromEnd);if(Pe!=null){e=e.replace(J.hashTagsFromEnd,"").trim(),n=!0;let D=Pe[0].trim();y=y.length>0?[D,y].join(" "):D}let j=e.match(t.idRegex);j!=null&&(e=e.replace(t.idRegex,"").trim(),m=j[1].trim(),n=!0);let $=e.match(t.dependsOnRegex);$!=null&&(e=e.replace(t.dependsOnRegex,"").trim(),g=$[1].replace(/ /g,"").split(",").filter(D=>D!==""),n=!0),k++}while(n&&k<=T);return d.length>0&&(f=st.fromText({recurrenceRuleText:d,startDate:s,scheduledDate:a,dueDate:o})),y.length>0&&(e+=" "+y),{description:e,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:f,id:m,dependsOn:g,tags:ae.extractHashtags(e)}}};function go(r){let e="",t=!0;for(;t;)e=Math.random().toString(36).substring(2,6+2),r.includes(e)||(t=!1);return e}function Ku(r,e){return r.id!==""?r:new ae(he(K({},r),{id:go(e)}))}function lv(r,e){let t=r;if(!r.dependsOn.includes(e.id)){let n=[...r.dependsOn,e.id];t=new ae(he(K({},r),{dependsOn:n}))}return t}function cv(r,e){let t=r;if(r.dependsOn.includes(e.id)){let n=r.dependsOn.filter(i=>i!==e.id);t=new ae(he(K({},r),{dependsOn:n}))}return t}function Bn(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Hn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Hn.instance||(Hn.instance=new Hn),Hn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(Hn.empty)}isEmpty(){return this.get()===Hn.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)"+Bn(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()}},_e=Hn;_e.empty="";var fv=require("obsidian");var nN=20;function Si(r){return _e.getInstance().removeAsWordFrom(r.description)}function iN(r,e){if(r==="")return e;let t=(0,fv.prepareSimpleSearch)(r),n=-4;return e.map(a=>{let o=t(Si(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 Qu(r,e,t,n,i){let s=iN(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,nN)}var Sm=5,sN=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=sN;function pv(r){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&r}function Om(r,e,t){let n=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(i,s,a,o,u,l)=>{let c=[];return c=c.concat(oN(i,s,a,n,e,t)),c=c.concat(uN(i,s,a,r.recurrenceSymbol,t)),pv(u)&&(c=c.concat(lN(i,s,r.idSymbol,o)),c=c.concat(cN(i,s,a,r.dependsOnSymbol,o,t,l))),c=c.concat(aN(i,s,a,r,t,u)),c.length>0&&!c.some(d=>d.suggestionType==="match")&&(t||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function Dm(r,e,t){let n=fN(e.substring(0,t),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&e.length>t&&e.charAt(t)===n?1:0;return{postfix:i,insertSkip:s}}function aN(r,e,t,n,i,s){let a=f=>Object.values(n.prioritySymbols).some(m=>m.length>0&&f.includes(m)),o=[],{postfix:u,insertSkip:l}=Dm(i,r,e);if(r.includes(n.dueDateSymbol)||o.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||o.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||o.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),!a(r)){let f=n.prioritySymbols,m=["High","Medium","Low","Highest","Lowest"];for(let g=0;g0){let f=c[0];if(f.length>=Math.max(1,t.autoSuggestMinMatch)){let m=o.filter(g=>(g.textToMatch||g.displayText).toLowerCase().includes(f.toLowerCase()));for(let g of m){let y=i&&(g.displayText.includes("priority")||g.displayText.includes("created"))?f.length+l:f.length;d.push({suggestionType:"match",displayText:g.displayText,appendText:g.appendText,insertAt:c.index,insertSkip:y})}}}return d.length===0&&t.autoSuggestMinMatch===0?o:d}function oN(r,e,t,n,i,s){let a=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],{postfix:o,insertSkip:u}=Dm(s,r,e),l=[],c=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),d=yo(r,c,e);if(d&&d.length>=2){let f=d[1],m=d[2];if(m.length1?Yt.parseDate(Wu(m),!0):null;g&&g.isValid()&&l.push({displayText:`${g.format(J.dateFormat)}`,appendText:`${f} ${g.format(J.dateFormat)} `,insertAt:d.index,insertSkip:d[0].length});let y=1,T=a.filter(k=>m&&m.length>=y&&k.toLowerCase().includes(m.toLowerCase())).slice(0,i);T.length===0&&(T=a.slice(0,i));for(let k of T){let x=`${Yt.parseDate(k,!0).format(J.dateFormat)}`,U=s?d[0].length+u:d[0].length;l.push({suggestionType:"match",displayText:`${k} (${x})`,appendText:`${f} ${x}`+o,insertAt:d.index,insertSkip:U})}}return l}function uN(r,e,t,n,i){var d;let s=["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"],{postfix:a,insertSkip:o}=Dm(i,r,e),u=[],l=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),c=yo(r,l,e);if(c&&c.length>=2){let f=c[1],m=c[2];if(m.length0){let k=(d=st.fromText({recurrenceRuleText:m,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:d.toText();if(k){let S=`${f} ${k}`+a,x=i?c[0].length+o:c[0].length;if(u.push({suggestionType:"match",displayText:`\u2705 ${k}`,appendText:S,insertAt:c.index,insertSkip:x}),c[0]==S)return[]}}let g=1,y=t.autoSuggestMaxItems/2,T=s.filter(k=>m&&m.length>=g&&k.toLowerCase().includes(m.toLowerCase())).slice(0,y);T.length===0&&m.trim().length===0&&(T=s.slice(0,y));for(let k of T)u.push({suggestionType:"match",displayText:`${k}`,appendText:`${f} ${k} `,insertAt:c.index,insertSkip:c[0].length})}return u}function lN(r,e,t,n){let i=[],s=new RegExp(`(${t})\\s*(${ki.source})?`,"ug"),a=yo(r,s,e);if(a&&a[0].trim().length<=t.length){let o=go(n.map(u=>u.id));i.push({suggestionType:"match",displayText:"generate unique id",appendText:`${t} ${o}`,insertAt:a.index,insertSkip:t.length})}return i}function cN(r,e,t,n,i,s,a){let o=[],u=s?Bn("()[]"):uv(),l=new RegExp(`(${n})([0-9a-zA-Z-_ ^,]*,)*([^,${u}]*)`,"ug"),c=yo(r,l,e);if(c&&c.length>=1){let d=c[2]||"",f=c[3],m=[];if(d){let g=d.split(",").map(y=>y.trim());m=i.filter(y=>y.id&&g.includes(y.id))}if(f.length>=t.autoSuggestMinMatch){let g=Qu(f.trim(),i,a,[],m);for(let y of g)o.push({suggestionType:"match",displayText:`${y.descriptionWithoutTags} - From: ${y.filename}.md`,appendText:`${n}${d}`,insertAt:c.index,insertSkip:n.length+d.length+f.length,taskItDependsOn:y})}}return o}function yo(r,e,t){let n=r.matchAll(e);for(let i of n)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 fN(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 mv(r,e){return(t,n,i,s,a)=>dN(t.slice(0,n),e)?r(t,n,i,s,a):[]}function hv(r,e,t){let n=_e.getInstance().includedIn(r),i=pN(t,e,n);return typeof i=="boolean"?i:n&&mN(r,e.ch)}function pN(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 mN(r,e){if(r.length===0)return!1;let t=ae.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}function Vr(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var xm={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::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Vr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Vr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Vr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Vr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Vr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Vr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Vr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Vr(/repeat:: *([a-zA-Z0-9, !]+)/),dependsOnRegex:Vr(new RegExp("dependsOn:: *("+Em.source+")")),idRegex:Vr(new RegExp("id:: *("+ki.source+")"))}},Xu=class extends Ei{constructor(){super(xm)}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 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||{}),Qe=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var Et=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 makeDone(){return new Et(new Qe("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Et(new Qe("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Et(new Qe(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Et(new Qe("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Et(new Qe("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new Et(new Qe("Q","Non-Task","A",!0,"NON_TASK"))}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 zt[e]||"TODO"}static createUnknownStatus(e){return new Et(new Qe(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Et.getTypeFromStatusTypeString(e[3]);return new Et(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 Et.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},ne=Et;ne.DONE=Et.makeDone(),ne.EMPTY=Et.makeEmpty(),ne.TODO=Et.makeTodo();var Zu=class{constructor(e=!1,t=!1,n=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t,this.recordTimings=n}};var Le=class{constructor(){this.coreStatuses=[ne.makeTodo().configuration,ne.makeDone().configuration],this.customStatuses=[ne.makeInProgress().configuration,ne.makeCancelled().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 ne(e);return t.findIndex(i=>new ne(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,ne.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 gv=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var wn=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 gv.forEach(t=>{e=[...e,new wn(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return wn.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of wn.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 xr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Ei(mo),buildSuggestions:Om(mo,Sm,!1)},dataview:{displayName:"Dataview",taskSerializer:new Xu,buildSuggestions:mv(Om(xm,Sm,!0),[["(",")"],["[","]"]])}},Mm={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:wn.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Zu,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},kn=K({},Mm);function Rm(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var X=()=>(Rm(wn.settingsFlags,kn.features),Rm(Mm.loggingOptions.minLevels,kn.loggingOptions.minLevels),Rm(Mm.debugSettings,kn.debugSettings),kn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=ne.getTypeFromStatusTypeString(r.type);t[e]=new Qe((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),K({},kn)),Ve=r=>(kn=K(K({},kn),r),X());var Oi=(r,e)=>(kn.generalSettings[r]=e,X()),yv=r=>{var e;return(e=kn.features[r])!=null?e:!1};function bo(){return xr[X().taskFormat]}function Ju(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function bv(r){let e=[...r],t="";return e.forEach(n=>{t+=Ju(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!==ne.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof ne?this._registeredStatuses.push(e):this._registeredStatuses.push(new ne(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):ne.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):ne.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:ne.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 ne.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:ne.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 ne(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(){[ne.makeTodo(),ne.makeInProgress(),ne.makeDone(),ne.makeCancelled()].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)}}),` +\`\`\`${n} +flowchart LR + +classDef TODO stroke:#f33,stroke-width:3px; +classDef DONE stroke:#0c0,stroke-width:3px; +classDef IN_PROGRESS stroke:#fa0,stroke-width:3px; +classDef CANCELLED stroke:#ddd,stroke-width:3px; +classDef NON_TASK stroke:#99e,stroke-width:3px; + +${i.join(` +`)} +${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=bv(e.name),i=e.type;if(t){let s=Ju(e.symbol),a=Ju(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Tv=require("obsidian");var zr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var Nt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(J.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(J.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 zr("Overdue",1):t.isSame(e,"day")?new zr("Today",2):t.isValid()?new zr("Future",3):new zr("Invalid date",0):new zr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new zr("",0);let t=this.fromNowOrder(e);return new zr(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 Tv.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 En=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 En.priorityNameUsingNone(e).replace("None","Normal")}};var gN=require("obsidian"),kv=ia(wv());var Cm=class extends kv.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 Am(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)}},St=new Cm,Am=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 yt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=X();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}=X();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 ae(he(K({},e),{taskLocation:e.taskLocation.fromRenamedFile(new ze(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 ae(he(K({},i),{scheduledDateIsInferred:!1}))),i))}};var Rr=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)/Rr.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,t+=u*Rr.dueCoefficient}switch((i=e.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*Rr.scheduledCoefficient),(s=e.startDate)!=null&&s.isValid()&&window.moment().isBefore(e.startDate)&&(t+=1*Rr.startedCoefficient),e.priority){case"0":t+=1.5*Rr.priorityCoefficient;break;case"1":t+=1*Rr.priorityCoefficient;break;case"2":t+=.65*Rr.priorityCoefficient;break;case"3":t+=.325*Rr.priorityCoefficient;break;case"5":t-=.3*Rr.priorityCoefficient;break}return t}},Sn=Rr;Sn.dueCoefficient=12,Sn.scheduledCoefficient=5,Sn.startedCoefficient=-3,Sn.priorityCoefficient=6,Sn.milliSecondsPerDay=1e3*60*60*24;var ae=class extends Bi{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:g,dependsOn:y,id:T,blockLink:k,tags:S,originalMarkdown:x,scheduledDateIsInferred:U,parent:q=null}){super(x,q);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=g,this.dependsOn=y,this.id=T,this.blockLink=k,this.scheduledDateIsInferred=U}static fromLine({line:t,taskLocation:n,fallbackDate:i}){let s=ae.extractTaskComponents(t);return s===null||!_e.getInstance().includedIn(s.body)?null:ae.parseTaskSignifiers(t,n,i)}static parseTaskSignifiers(t,n,i){let s=ae.extractTaskComponents(t);if(s===null)return null;let{taskSerializer:a}=bo(),o=a.deserialize(s.body),u=!1;return yt.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,u=!0),o.tags=o.tags.map(l=>l.trim()),o.tags=o.tags.filter(l=>!_e.getInstance().equals(l)),new ae(he(K(K({},s),o),{taskLocation:n,originalMarkdown:t,scheduledDateIsInferred:u}))}static extractTaskComponents(t){let n=t.match(J.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(J.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(J.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:u,blockLink:c}}toString(){return bo().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let t=St.getLogger("tasks.Task"),n="toggle()";el(t,n,this);let i=De.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return tl(t,n,s),s}handleNewStatus(t,n=window.moment()){if(t.identicalTo(this.status))return[this];let{setDoneDate:i}=X(),s=this.newDate(t,"DONE",this.doneDate,i,n),{setCancelledDate:a}=X(),o=this.newDate(t,"CANCELLED",this.cancelledDate,a,n),u=null;t.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(u=this.recurrence.next(n));let l=new ae(he(K({},this),{status:t,doneDate:s,cancelledDate:o})),c=[];if(u!==null){let d=this.createNextOccurrence(t,u);c.push(d)}return c.push(l),c}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}=X(),s=null;i&&(s=window.moment());let a=null,o=null,l=De.getInstance().getNextRecurrenceStatusOrCreate(t);return new ae(he(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()){St.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{recurrenceOnNextLine:n}=X();return n?t.reverse():t}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=En.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${t} priority`}get descriptionWithoutTags(){return this.description.replace(J.hashTags,"").trim()}get priorityName(){return En.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Sn.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new Nt(this.cancelledDate)}get created(){return new Nt(this.createdDate)}get done(){return new Nt(this.doneDate)}get due(){return new Nt(this.dueDate)}get scheduled(){return new Nt(this.scheduledDate)}get start(){return new Nt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates,n=Array.from(t).sort(fr);for(let i of n)if(i!=null&&i.isValid())return new Nt(i);return new Nt(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)}static tasksListsIdentical(t,n){return t.length!==n.length?!1:t.every((i,s)=>i.identicalTo(n[s]))}identicalTo(t){var a,o;let n=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred","id","dependsOn"];for(let u of n)if(((a=this[u])==null?void 0:a.toString())!==((o=t[u])==null?void 0:o.toString()))return!1;if(!this.status.identicalTo(t.status)||this.tags.length!==t.tags.length||!this.tags.every(function(u,l){return u===t.tags[l]}))return!1;n=ae.allDateFields();for(let u of n){let l=this[u],c=t[u];if(fr(l,c)!==0)return!1}let i=this.recurrence,s=t.recurrence;return i===null&&s!==null||i!==null&&s===null?!1:!(i&&s&&!i.identicalTo(s))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(t){var n,i;return(i=(n=t.match(J.hashTags))==null?void 0:n.map(s=>s.trim()))!=null?i:[]}};var To=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ft=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 ft(e,0,0,0,null)}fromRenamedFile(e){return new ft(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 yN(r,e,t,n,i,s){var g,y;let a=new ze(r,i),o=[],u=e.split(` +`),l=u.length,c=new To(()=>yt.fromPath(r)),d=null,f=0,m=new Map;for(let T of t)if(T.task!==void 0){let k=T.position.start.line;if(k>=l)return n.debug(`${r} Obsidian gave us a line number ${k} past the end of the file. ${l}.`),o;if((d===null||d.position.end.lineP(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}=X(),t=this.vault.on("create",s=>{s instanceof hs.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 hs.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 hs.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new ze(s.path,o!=null?o:void 0),l=new To(()=>yt.fromPath(s.path));this.tasks=this.tasks.map(c=>c.path===a?e?yt.updateTaskPath(c,s.path,l.value):new ae(he(K({},c),{taskLocation:c.taskLocation.fromRenamedFile(u)})):c),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(()=>P(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 P(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)}ae.tasksListsIdentical(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 yN(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. +The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...' +Error: ${e} +File: ${t} +Line number: ${n.position.start.line} +Task line: ${i} + +Please create a bug report for this message at +https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose +to help us find and fix the underlying issue. + +Include: +- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine. +- the output from running the Obsidian command 'Show debug info' + +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 hs.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 rh=require("obsidian");var vw=require("obsidian");function Ue(){}function Lm(r){return r()}function Ev(){return Object.create(null)}function It(r){r.forEach(Lm)}function il(r){return typeof r=="function"}function Kr(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Sv(r){return Object.keys(r).length===0}var Ov=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,vo=class{constructor(e){this.options=e,this._listeners="WeakMap"in Ov?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)vo.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};vo.entries="WeakMap"in Ov?new WeakMap:void 0;var Dv=!1;function bN(){Dv=!0}function TN(){Dv=!1}function F(r,e){r.appendChild(e)}function de(r,e,t){r.insertBefore(e,t||null)}function oe(r){r.parentNode&&r.parentNode.removeChild(r)}function Ri(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function Rv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Mv(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 vN(r){return Array.from(r.childNodes)}function Mr(r,e){e=""+e,r.data!==e&&(r.data=e)}function mr(r,e){r.value=e==null?"":e}function Um(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()}),F(r,n),()=>{(i||s&&n.contentWindow)&&s(),oe(n)}}function On(r,e,t){r.classList[t?"add":"remove"](e)}var _s=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=_N(t.nodeName):this.e=Q(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()),Ts=e}var nl=new Set,Di;function Nv(){Di={r:0,c:[],p:Di}}function Iv(){Di.r||It(Di.c),Di=Di.p}function Ft(r,e){r&&r.i&&(nl.delete(r),r.i(e))}function Kt(r,e,t,n){if(r&&r.o){if(nl.has(r))return;nl.add(r),Di.c.push(()=>{nl.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}var xN=["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"],Rj=new Set([...xN]);function Dt(r,e,t){let n=r.$$.props[e];n!==void 0&&(r.$$.bound[n]=t,t(r.$$.ctx[n]))}function Cr(r){r&&r.c()}function hr(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||xi(()=>{let a=r.$$.on_mount.map(Lm).filter(il);r.$$.on_destroy?r.$$.on_destroy.push(...a):It(a),r.$$.on_mount=[]}),s.forEach(xi)}function Qt(r,e){let t=r.$$;t.fragment!==null&&(DN(t.after_update),It(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function RN(r,e){r.$$.dirty[0]===-1&&(bs.push(r),SN(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let g=m.length?m[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=g)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](g),c&&RN(r,d)),f}):[],l.update(),c=!0,It(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){bN();let d=vN(e.target);l.fragment&&l.fragment.l(d),d.forEach(oe)}else l.fragment&&l.fragment.c();e.intro&&Ft(r.$$.fragment),hr(r,e.target,e.anchor,e.customElement),TN(),Pv()}_o(u)}var MN;typeof HTMLElement=="function"&&(MN=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Lm).filter(il);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){It(this.$$.on_disconnect)}$destroy(){Qt(this,1),this.$destroy=Ue}$on(r,e){if(!il(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&&!Sv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var pr=class{$destroy(){Qt(this,1),this.$destroy=Ue}$on(e,t){if(!il(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&&!Sv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};function Fv(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 vs(r){return r.charAt(0).toUpperCase()+r.slice(1)}function pt(r,e){if(e===null)return vs(r);let t=r.toLowerCase().indexOf(e.toLowerCase());if(t===-1)return`${vs(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=vs(n),n}function CN(r){let e,t=pt(r[2],r[4])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[3]),u=ue(),l=new _s(!1),L(e,"for",r[2]),L(i,"id",r[2]),L(i,"type","text"),L(i,"class","tasks-modal-date-input"),L(i,"placeholder",AN),L(i,"accesskey",r[4]),On(i,"tasks-modal-error",!r[1]),l.a=null,L(a,"class","tasks-modal-parsed-date")},m(f,m){de(f,e,m),e.innerHTML=t,de(f,n,m),de(f,i,m),mr(i,r[0]),de(f,s,m),de(f,a,m),F(a,o),F(a,u),l.m(r[5],a),c||(d=xe(i,"input",r[7]),c=!0)},p(f,[m]){m&20&&t!==(t=pt(f[2],f[4])+"")&&(e.innerHTML=t),m&4&&L(e,"for",f[2]),m&4&&L(i,"id",f[2]),m&16&&L(i,"accesskey",f[4]),m&1&&i.value!==f[0]&&mr(i,f[0]),m&2&&On(i,"tasks-modal-error",!f[1]),m&8&&Mr(o,f[3]),m&32&&l.p(f[5])},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 AN="Try 'Mon' or 'tm' then space";function PN(r,e,t){let{id:n}=e,{dateSymbol:i}=e,{date:s}=e,{isDateValid:a}=e,{forwardOnly:o}=e,{accesskey:u}=e,l;function c(){s=this.value,t(0,s),t(2,n),t(6,o),t(5,l)}return r.$$set=d=>{"id"in d&&t(2,n=d.id),"dateSymbol"in d&&t(3,i=d.dateSymbol),"date"in d&&t(0,s=d.date),"isDateValid"in d&&t(1,a=d.isDateValid),"forwardOnly"in d&&t(6,o=d.forwardOnly),"accesskey"in d&&t(4,u=d.accesskey)},r.$$.update=()=>{if(r.$$.dirty&101){e:t(0,s=Wu(s)),t(5,l=ov(n,s,o)),t(1,a=!l.includes("invalid"))}},[s,a,n,i,u,l,o,c]}var qm=class extends pr{constructor(e){super(),Qr(this,e,PN,CN,Kr,{id:2,dateSymbol:3,date:0,isDateValid:1,forwardOnly:6,accesskey:4})}},Mi=qm;var Ci=Math.min,Lt=Math.max,Eo=Math.round;var Dn=r=>({x:r,y:r}),NN={left:"right",right:"left",bottom:"top",top:"bottom"},IN={start:"end",end:"start"};function $m(r,e,t){return Lt(r,Ci(e,t))}function ws(r,e){return typeof r=="function"?r(e):r}function xn(r){return r.split("-")[0]}function ks(r){return r.split("-")[1]}function jm(r){return r==="x"?"y":"x"}function Gm(r){return r==="y"?"height":"width"}function Es(r){return["top","bottom"].includes(xn(r))?"y":"x"}function Ym(r){return jm(Es(r))}function Lv(r,e,t){t===void 0&&(t=!1);let n=ks(r),i=Ym(r),s=Gm(i),a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=ko(a)),[a,ko(a)]}function Uv(r){let e=ko(r);return[sl(r),e,sl(e)]}function sl(r){return r.replace(/start|end/g,e=>IN[e])}function FN(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 Wv(r,e,t,n){let i=ks(r),s=FN(xn(r),t==="start",n);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(sl)))),s}function ko(r){return r.replace(/left|right|bottom|top/g,e=>NN[e])}function LN(r){return K({top:0,right:0,bottom:0,left:0},r)}function qv(r){return typeof r!="number"?LN(r):{top:r,right:r,bottom:r,left:r}}function Ai(r){return he(K({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function $v(r,e,t){let{reference:n,floating:i}=r,s=Es(e),a=Ym(e),o=Gm(a),u=xn(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(ks(e)){case"start":m[a]-=f*(t&&l?-1:1);break;case"end":m[a]+=f*(t&&l?-1:1);break}return m}var jv=(r,e,t)=>P(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}=$v(l,n,u),f=n,m={},g=0;for(let y=0;yV<=0)){var Pe,j;let V=(((Pe=a.flip)==null?void 0:Pe.index)||0)+1,W=re[V];if(W)return{data:{index:V,overflows:be},reset:{placement:W}};let Z=(j=be.filter(p=>p.overflows[0]<=0).sort((p,h)=>p.overflows[1]-h.overflows[1])[0])==null?void 0:j.placement;if(!Z)switch(g){case"bestFit":{var $;let p=($=be.map(h=>[h.placement,h.overflows.filter(b=>b>0).reduce((b,_)=>b+_,0)]).sort((h,b)=>h[1]-b[1])[0])==null?void 0:$[0];p&&(Z=p);break}case"initialPlacement":Z=u;break}if(s!==Z)return{reset:{placement:Z}}}return{}})}}};function UN(r,e){return P(this,null,function*(){let{placement:t,platform:n,elements:i}=r,s=yield n.isRTL==null?void 0:n.isRTL(i.floating),a=xn(t),o=ks(t),u=Es(t)==="y",l=["left","top"].includes(a)?-1:1,c=s&&u?-1:1,d=ws(e,r),{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:K({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return o&&typeof g=="number"&&(m=o==="end"?g*-1:g),u?{x:m*c,y:f*l}:{x:f*l,y:m*c}})}var ol=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(t){return P(this,null,function*(){var n,i;let{x:s,y:a,placement:o,middlewareData:u}=t,l=yield UN(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:he(K({},l),{placement:o})}})}}},ul=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(t){return P(this,null,function*(){let{x:n,y:i,placement:s}=t,k=ws(r,t),{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:S=>{let{x,y:U}=S;return{x,y:U}}}}=k,l=Yo(k,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},d=yield al(t,l),f=Es(xn(s)),m=jm(f),g=c[m],y=c[f];if(a){let S=m==="y"?"top":"left",x=m==="y"?"bottom":"right",U=g+d[S],q=g-d[x];g=$m(U,g,q)}if(o){let S=f==="y"?"top":"left",x=f==="y"?"bottom":"right",U=y+d[S],q=y-d[x];y=$m(U,y,q)}let T=u.fn(he(K({},t),{[m]:g,[f]:y}));return he(K({},T),{data:{x:T.x-n,y:T.y-i}})})}}};var Hm=function(r){return r===void 0&&(r={}),{name:"size",options:r,fn(t){return P(this,null,function*(){let{placement:n,rects:i,platform:s,elements:a}=t,H=ws(r,t),{apply:o=()=>{}}=H,u=Yo(H,["apply"]),l=yield al(t,u),c=xn(n),d=ks(n),f=Es(n)==="y",{width:m,height:g}=i.floating,y,T;c==="top"||c==="bottom"?(y=c,T=d===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(T=c,y=d==="end"?"top":"bottom");let k=g-l[y],S=m-l[T],x=!t.middlewareData.shift,U=k,q=S;if(f){let Y=m-l.left-l.right;q=d||x?Ci(S,Y):Y}else{let Y=g-l.top-l.bottom;U=d||x?Ci(k,Y):Y}if(x&&!d){let Y=Lt(l.left,0),be=Lt(l.right,0),Pe=Lt(l.top,0),j=Lt(l.bottom,0);f?q=m-2*(Y!==0||be!==0?Y+be:Lt(l.left,l.right)):U=g-2*(Pe!==0||j!==0?Pe+j:Lt(l.top,l.bottom))}yield o(he(K({},t),{availableWidth:q,availableHeight:U}));let re=yield s.getDimensions(a.floating);return m!==re.width||g!==re.height?{reset:{rects:!0}}:{}})}}};function Rn(r){return Yv(r)?(r.nodeName||"").toLowerCase():"#document"}function Ut(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Mn(r){var e;return(e=(Yv(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Yv(r){return r instanceof Node||r instanceof Ut(r).Node}function Xr(r){return r instanceof Element||r instanceof Ut(r).Element}function Ar(r){return r instanceof HTMLElement||r instanceof Ut(r).HTMLElement}function Gv(r){return typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof Ut(r).ShadowRoot}function Ss(r){let{overflow:e,overflowX:t,overflowY:n,display:i}=Xt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function Bv(r){return["table","td","th"].includes(Rn(r))}function cl(r){let e=dl(),t=Xt(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 Hv(r){let e=Pi(r);for(;Ar(e)&&!So(e);){if(cl(e))return e;e=Pi(e)}return null}function dl(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function So(r){return["html","body","#document"].includes(Rn(r))}function Xt(r){return Ut(r).getComputedStyle(r)}function Oo(r){return Xr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Pi(r){if(Rn(r)==="html")return r;let e=r.assignedSlot||r.parentNode||Gv(r)&&r.host||Mn(r);return Gv(e)?e.host:e}function Vv(r){let e=Pi(r);return So(e)?r.ownerDocument?r.ownerDocument.body:r.body:Ar(e)&&Ss(e)?e:Vv(e)}function ll(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let i=Vv(r),s=i===((n=r.ownerDocument)==null?void 0:n.body),a=Ut(i);return s?e.concat(a,a.visualViewport||[],Ss(i)?i:[],a.frameElement&&t?ll(a.frameElement):[]):e.concat(i,ll(i,[],t))}function Qv(r){let e=Xt(r),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Ar(r),s=i?r.offsetWidth:t,a=i?r.offsetHeight:n,o=Eo(t)!==s||Eo(n)!==a;return o&&(t=s,n=a),{width:t,height:n,$:o}}function Xv(r){return Xr(r)?r:r.contextElement}function Os(r){let e=Xv(r);if(!Ar(e))return Dn(1);let t=e.getBoundingClientRect(),{width:n,height:i,$:s}=Qv(e),a=(s?Eo(t.width):t.width)/n,o=(s?Eo(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var WN=Dn(0);function Zv(r){let e=Ut(r);return!dl()||!e.visualViewport?WN:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qN(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ut(r)?!1:e}function Do(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=r.getBoundingClientRect(),s=Xv(r),a=Dn(1);e&&(n?Xr(n)&&(a=Os(n)):a=Os(r));let o=qN(s,t,n)?Zv(s):Dn(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=Ut(s),m=n&&Xr(n)?Ut(n):n,g=f.frameElement;for(;g&&n&&m!==f;){let y=Os(g),T=g.getBoundingClientRect(),k=Xt(g),S=T.left+(g.clientLeft+parseFloat(k.paddingLeft))*y.x,x=T.top+(g.clientTop+parseFloat(k.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,d*=y.y,u+=S,l+=x,g=Ut(g).frameElement}}return Ai({width:c,height:d,x:u,y:l})}function $N(r){let{rect:e,offsetParent:t,strategy:n}=r,i=Ar(t),s=Mn(t);if(t===s)return e;let a={scrollLeft:0,scrollTop:0},o=Dn(1),u=Dn(0);if((i||!i&&n!=="fixed")&&((Rn(t)!=="body"||Ss(s))&&(a=Oo(t)),Ar(t))){let l=Do(t);o=Os(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 jN(r){return Array.from(r.getClientRects())}function Jv(r){return Do(Mn(r)).left+Oo(r).scrollLeft}function GN(r){let e=Mn(r),t=Oo(r),n=r.ownerDocument.body,i=Lt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Lt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Jv(r),o=-t.scrollTop;return Xt(n).direction==="rtl"&&(a+=Lt(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}function YN(r,e){let t=Ut(r),n=Mn(r),i=t.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,u=0;if(i){s=i.width,a=i.height;let l=dl();(!l||l&&e==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:o,y:u}}function BN(r,e){let t=Do(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,s=Ar(r)?Os(r):Dn(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 zv(r,e,t){let n;if(e==="viewport")n=YN(r,t);else if(e==="document")n=GN(Mn(r));else if(Xr(e))n=BN(e,t);else{let i=Zv(r);n=he(K({},e),{x:e.x-i.x,y:e.y-i.y})}return Ai(n)}function ew(r,e){let t=Pi(r);return t===e||!Xr(t)||So(t)?!1:Xt(t).position==="fixed"||ew(t,e)}function HN(r,e){let t=e.get(r);if(t)return t;let n=ll(r,[],!1).filter(o=>Xr(o)&&Rn(o)!=="body"),i=null,s=Xt(r).position==="fixed",a=s?Pi(r):r;for(;Xr(a)&&!So(a);){let o=Xt(a),u=cl(a);!u&&o.position==="fixed"&&(i=null),(s?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ss(a)&&!u&&ew(r,a))?n=n.filter(c=>c!==a):i=o,a=Pi(a)}return e.set(r,n),n}function VN(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r,a=[...t==="clippingAncestors"?HN(e,this._c):[].concat(t),n],o=a[0],u=a.reduce((l,c)=>{let d=zv(e,c,i);return l.top=Lt(d.top,l.top),l.right=Ci(d.right,l.right),l.bottom=Ci(d.bottom,l.bottom),l.left=Lt(d.left,l.left),l},zv(e,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function zN(r){return Qv(r)}function KN(r,e,t){let n=Ar(e),i=Mn(e),s=t==="fixed",a=Do(r,!0,s,e),o={scrollLeft:0,scrollTop:0},u=Dn(0);if(n||!n&&!s)if((Rn(e)!=="body"||Ss(i))&&(o=Oo(e)),n){let l=Do(e,!0,s,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else i&&(u.x=Jv(i));return{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function Kv(r,e){return!Ar(r)||Xt(r).position==="fixed"?null:e?e(r):r.offsetParent}function tw(r,e){let t=Ut(r);if(!Ar(r))return t;let n=Kv(r,e);for(;n&&Bv(n)&&Xt(n).position==="static";)n=Kv(n,e);return n&&(Rn(n)==="html"||Rn(n)==="body"&&Xt(n).position==="static"&&!cl(n))?t:n||Hv(r)||t}var QN=function(r){return P(this,null,function*(){let{reference:e,floating:t,strategy:n}=r,i=this.getOffsetParent||tw,s=this.getDimensions;return{reference:KN(e,yield i(t),n),floating:K({x:0,y:0},yield s(t))}})};function XN(r){return Xt(r).direction==="rtl"}var ZN={convertOffsetParentRelativeRectToViewportRelativeRect:$N,getDocumentElement:Mn,getClippingRect:VN,getOffsetParent:tw,getElementRects:QN,getClientRects:jN,getDimensions:zN,getScale:Os,isElement:Xr,isRTL:XN};var Vm=(r,e,t)=>{let n=new Map,i=K({platform:ZN},t),s=he(K({},i.platform),{_c:n});return jv(r,e,he(K({},i),{platform:s}))};function rw(r,e,t){let n=r.slice();return n[5]=e[t],n}function nw(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 iw(r){let e,t,n,i=r[10],s=[];for(let a=0;a',d=ue(),L(t,"class","task-dependency-name"),L(c,"type","button"),L(c,"class","task-dependency-delete"),L(e,"class","task-dependency")},m(T,k){de(T,e,k),F(e,t),F(t,n),F(t,s),F(t,a),F(t,u),F(e,l),F(e,c),F(e,d),f||(m=[xe(c,"click",g),xe(e,"mouseenter",y)],f=!0)},p(T,k){r=T,k[0]&3&&i!==(i=r[5].status.symbol+"")&&Mr(s,i),k[0]&3&&o!==(o=Si(r[5])+"")&&Mr(u,o)},d(T){T&&oe(e),f=!1,It(m)}}}function JN(r){let e,t=pt(r[2],r[3])+"",n,i,s,a,o,u,l,c,d,f=r[10]&&r[10].length!==0&&iw(r),m=r[0][r[1]].length!==0&&ow(r);return{c(){e=Q("label"),n=ue(),i=Q("span"),s=Q("input"),o=ue(),f&&f.c(),u=ue(),m&&m.c(),l=xv(),L(e,"for",r[1]),L(s,"accesskey",r[3]),L(s,"id",r[1]),L(s,"class","tasks-modal-dependency-input"),L(s,"type","text"),L(s,"placeholder",r[4]),xi(()=>r[26].call(i))},m(g,y){de(g,e,y),e.innerHTML=t,de(g,n,y),de(g,i,y),F(i,s),r[22](s),mr(s,r[6]),a=Av(i,r[26].bind(i)),de(g,o,y),f&&f.m(g,y),de(g,u,y),m&&m.m(g,y),de(g,l,y),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(g,y){y[0]&12&&t!==(t=pt(g[2],g[3])+"")&&(e.innerHTML=t),y[0]&2&&L(e,"for",g[1]),y[0]&8&&L(s,"accesskey",g[3]),y[0]&2&&L(s,"id",g[1]),y[0]&16&&L(s,"placeholder",g[4]),y[0]&64&&s.value!==g[6]&&mr(s,g[6]),g[10]&&g[10].length!==0?f?f.p(g,y):(f=iw(g),f.c(),f.m(u.parentNode,u)):f&&(f.d(1),f=null),g[0][g[1]].length!==0?m?m.p(g,y):(m=ow(g),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null)},i:Ue,o:Ue,d(g){g&&oe(e),g&&oe(n),g&&oe(i),r[22](null),a(),g&&oe(o),f&&f.d(g),g&&oe(u),m&&m.d(g),g&&oe(l),c=!1,It(d)}}}function eI(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,g,y=!1,T=!1,k,S;function x(v){t(0,i[o]=[...i[o],v],i),t(6,d=""),t(7,y=!1)}function U(v){t(0,i[o]=i[o].filter(R=>R!==v),i)}function q(v){var R;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{R.style.left=`${N}px`,R.style.top=`${te}px`})}function be(v){return v===n.taskLocation.path?"":v}function Pe(v){return Si(v)}function j(v,R){let N=v.createDiv();N.addClasses(["tooltip","pop-up"]),N.innerText=R,Vm(v,N,{placement:"top",middleware:[ol(-18),ul()]}).then(({x:te,y:le})=>{N.style.left=`${te}px`,N.style.top=`${le}px`}),v.addEventListener("mouseleave",()=>N.remove())}function $(v){je[v?"unshift":"push"](()=>{k=v,t(8,k)})}function D(){d=this.value,t(6,d)}let V=v=>q(v),W=()=>t(7,y=!1);function Z(){g=this.clientWidth,t(12,g)}let p=(v,R)=>j(R.currentTarget,Pe(v)),h=(v,R)=>j(R.currentTarget,v),b=v=>x(v),_=v=>t(11,m=v);function w(v){je[v?"unshift":"push"](()=>{S=v,t(9,S)})}let O=()=>t(11,m=null),M=v=>U(v),A=(v,R)=>j(R.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:Y(k,S)}if(r.$$.dirty[0]&192){e:t(10,f=y?re(d):null)}},[i,o,u,l,c,n,d,y,k,S,f,m,g,x,U,q,H,be,Pe,j,s,a,$,D,V,W,Z,p,h,b,_,w,O,M,A]}var zm=class extends pr{constructor(e){super(),Qr(this,e,eI,JN,Kr,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},Km=zm;var Ro=require("obsidian");var xo,Qm,Xm,tI=["md"];function ml(){return St.getLogger("tasks.File")}var lw=({metadataCache:r,vault:e,workspace:t})=>{xo=r,Qm=e,Xm=t},gr=t=>P(void 0,[t],function*({originalTask:r,newTasks:e}){if(Qm===void 0||xo===void 0||Xm===void 0){fl("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=ml(),i="replaceTaskWithTasks()";el(n,i,r),tl(n,i,e),yield dw({originalTask:r,newTasks:e,vault:Qm,metadataCache:xo,workspace:Xm,previousTries:0})});function fl(r){console.error(r),new Ro.Notice(r,15e3)}function cw(r){console.warn(r),new Ro.Notice(r,1e4)}function rI(r){ml().debug(r)}var Vn=class extends Error{},pl=class extends Error{},dw=a=>P(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=ml();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>P(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} + +In this markdown file: +"${r.taskLocation.path}" + +Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). + +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. +`;fl(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>P(void 0,null,function*(){yield dw({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})}),l)});try{let[l,c,d]=yield fw(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 Vn){l.message&&cw(l.message),yield u();return}else if(l instanceof pl){yield u();return}else l instanceof Error&&fl(l.message)}});function fw(r,e){return P(this,null,function*(){if(xo===void 0)throw new Vn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ro.TFile))throw new Vn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!tI.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=xo.getFileCache(t);if(n==null||n===null)throw new Vn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new Vn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` +`),o=nI(r,a,i,rI);if(o===void 0)throw new pl;return[o,t,a]})}function Zm(r,e){return P(this,null,function*(){try{let[t,n,i]=yield fw(r,e);return[t,n]}catch(t){t instanceof Vn?t.message&&cw(t.message):t instanceof Error&&fl(t.message)}})}function pw(r,e){return rc.id===u);!l||a.push(l)}let o=t.filter(u=>u.dependsOn.includes(e.id));return new Ds({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:e.status,priority:s,recurrenceRule:e.recurrence?e.recurrence.toText():"",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 P(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=_e.getInstance().prependTo(n));let i=wi(this.startDate,this.forwardOnly),s=wi(this.scheduledDate,this.forwardOnly),a=wi(this.dueDate,this.forwardOnly),o=wi(this.cancelledDate,this.forwardOnly),u=wi(this.createdDate,this.forwardOnly),l=wi(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=st.fromText({recurrenceRuleText:this.recurrenceRule,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=[];for(let S of this.blockedBy){let x=yield oI(S,t);f.push(x)}let m=e.id,g=[],y=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(e.id===""&&(m=go(t.filter(S=>S.id!=="").map(S=>S.id))),g=this.originalBlocking.filter(S=>!this.blocking.includes(S)),y=this.blocking.filter(S=>!this.originalBlocking.includes(S)));let T=new ae(he(K({},e),{description:n,status:e.status,priority:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:f.map(S=>S.id),id:m}));for(let S of g){let x=cv(S,T);yield gr({originalTask:S,newTasks:x})}for(let S of y){let x=lv(S,T);yield gr({originalTask:S,newTasks:x})}let k=l||window.moment();return T.handleNewStatusWithRecurrenceInUsersOrder(this.status,k)})}parseAndValidateRecurrence(){var t;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let e=(t=st.fromText({recurrenceRuleText:this.recurrenceRule,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 oI(r,e){return P(this,null,function*(){if(r.id!=="")return r;let t=e.filter(i=>i.id!==""),n=Ku(r,t.map(i=>i.id));return yield gr({originalTask:r,newTasks:n}),n})}function uI(r){let e,t=pt("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[4]),u=ue(),l=new _s(!1),L(e,"for","recurrence"),L(i,"id","recurrence"),L(i,"type","text"),L(i,"class","tasks-modal-date-input"),L(i,"placeholder","Try 'every day when done'"),L(i,"accesskey",r[2]),On(i,"tasks-modal-error",!r[1]),l.a=null,L(a,"class","tasks-modal-parsed-date")},m(f,m){de(f,e,m),e.innerHTML=t,de(f,n,m),de(f,i,m),mr(i,r[0].recurrenceRule),de(f,s,m),de(f,a,m),F(a,o),F(a,u),l.m(r[3],a),c||(d=xe(i,"input",r[5]),c=!0)},p(f,[m]){m&4&&t!==(t=pt("Recurs",f[2])+"")&&(e.innerHTML=t),m&4&&L(i,"accesskey",f[2]),m&1&&i.value!==f[0].recurrenceRule&&mr(i,f[0].recurrenceRule),m&2&&On(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 lI(r,e,t){let{editableTask:n}=e,{isRecurrenceValid:i}=e,{accesskey:s}=e,a,{recurrenceSymbol:o}=xr.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 Jm=class extends pr{constructor(e){super(),Qr(this,e,lI,uI,Kr,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},mw=Jm;function hw(r,e,t){let n=r.slice();return n[7]=e[t],n}function gw(r){let e,t=r[7].name+"",n,i,s=r[7].symbol+"",a,o,u;return{c(){e=Q("option"),n=Me(t),i=Me(" ["),a=Me(s),o=Me("]"),e.__value=u=r[7].symbol,e.value=e.__value},m(l,c){de(l,e,c),F(e,n),F(e,i),F(e,a),F(e,o)},p(l,c){c&1&&t!==(t=l[7].name+"")&&Mr(n,t),c&1&&s!==(s=l[7].symbol+"")&&Mr(a,s),c&1&&u!==(u=l[7].symbol)&&(e.__value=u,e.value=e.__value)},d(l){l&&oe(e)}}}function cI(r){let e,t=pt("Status",r[1])+"",n,i,s,a,o=r[0],u=[];for(let l=0;lr[6].call(i))},m(l,c){de(l,e,c),e.innerHTML=t,de(l,n,c),de(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=d.done.formatAsDate(),i),t(4,i.cancelledDate=d.cancelled.formatAsDate(),i))};function l(){o=Cv(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 eh=class extends pr{constructor(e){super(),Qr(this,e,dI,cI,Kr,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},yw=eh;function bw(r,e,t){let n=r.slice();return n[49]=e[t].value,n[50]=e[t].label,n[51]=e[t].symbol,n[52]=e[t].accessKey,n[53]=e[t].accessKeyIndex,n}function fI(r){let e,t=r[50]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),F(e,n)},p:Ue,d(i){i&&oe(e)}}}function pI(r){let e,t=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(){e=Q("span"),n=Me(t),i=Q("span"),a=Me(s),o=Q("span"),l=Me(u),L(i,"class","accesskey")},m(c,d){de(c,e,d),F(e,n),de(c,i,d),F(i,a),de(c,o,d),F(o,l)},p:Ue,d(c){c&&oe(e),c&&oe(i),c&&oe(o)}}}function mI(r){let e,t=r[51]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),F(e,n)},p:Ue,d(i){i&&oe(e)}}}function Tw(r){let e,t,n,i,s,a,o,u,l=r[51]&&r[51].charCodeAt(0)>=256,c,d,f,m,g;function y(x,U){return x[11]?pI:fI}let T=y(r,[-1,-1]),k=T(r),S=l&&mI(r);return f=Mv(r[32][0]),{c(){e=Q("div"),t=Q("input"),a=ue(),o=Q("label"),k.c(),u=ue(),S&&S.c(),d=ue(),L(t,"type","radio"),L(t,"id",n="priority-"+r[49]),t.__value=i=r[49],t.value=t.__value,L(t,"accesskey",s=r[15](r[52])),L(o,"for",c="priority-"+r[49]),L(e,"class","task-modal-priority-option-container"),f.p(t)},m(x,U){de(x,e,U),F(e,t),t.checked=t.__value===r[3].priority,F(e,a),F(e,o),k.m(o,null),F(o,u),S&&S.m(o,null),F(e,d),m||(g=xe(t,"change",r[31]),m=!0)},p(x,U){U[0]&32768&&s!==(s=x[15](x[52]))&&L(t,"accesskey",s),U[0]&8&&(t.checked=t.__value===x[3].priority),T===(T=y(x,U))&&k?k.p(x,U):(k.d(1),k=T(x),k&&(k.c(),k.m(o,u))),l&&S.p(x,U)},d(x){x&&oe(e),k.d(),S&&S.d(),f.r(),m=!1,g()}}}function hI(r){let e;return{c(){e=Q("div"),e.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(t,n){de(t,e,n)},p:Ue,i:Ue,o:Ue,d(t){t&&oe(e)}}}function gI(r){let e,t,n,i;return e=new Km({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 Km({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(){Cr(e.$$.fragment),t=ue(),Cr(n.$$.fragment)},m(s,a){hr(e,s,a),de(s,t,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")),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||(Ft(e.$$.fragment,s),Ft(n.$$.fragment,s),i=!0)},o(s){Kt(e.$$.fragment,s),Kt(n.$$.fragment,s),i=!1},d(s){Qt(e,s),s&&oe(t),Qt(n,s)}}}function yI(r){let e,t,n,i=pt("Description",r[15]("t"))+"",s,a,o,u,l,c,d,f,m,g,y,T,k,S,x,U,q,re,H,Y,be,Pe,j,$,D,V,W,Z,p,h,b=pt("Only future dates:",r[15]("f"))+"",_,w,O,M,A,v,R,N,te,le,fe,Ne,Ce,Mt,sn,Lr,G,qt,Xe,Ph,an,uc,lc,Nh,on,cc,dc,Ih,Gi,ai,Fh,jo,Lh,Ks,Ur,fc,Uh,Yi=r[22],vt=[];for(let C=0;CDt(S,"isRecurrenceValid",Ik));function Fk(C){r[34](C)}function Lk(C){r[35](C)}let pc={id:"due",dateSymbol:r[18],forwardOnly:r[3].forwardOnly,accesskey:r[15]("d")};r[3].dueDate!==void 0&&(pc.date=r[3].dueDate),r[7]!==void 0&&(pc.isDateValid=r[7]),q=new Mi({props:pc}),je.push(()=>Dt(q,"date",Fk)),je.push(()=>Dt(q,"isDateValid",Lk));function Uk(C){r[36](C)}function Wk(C){r[37](C)}let mc={id:"scheduled",dateSymbol:r[17],forwardOnly:r[3].forwardOnly,accesskey:r[15]("s")};r[3].scheduledDate!==void 0&&(mc.date=r[3].scheduledDate),r[8]!==void 0&&(mc.isDateValid=r[8]),be=new Mi({props:mc}),je.push(()=>Dt(be,"date",Uk)),je.push(()=>Dt(be,"isDateValid",Wk));function qk(C){r[38](C)}function $k(C){r[39](C)}let hc={id:"start",dateSymbol:r[16],forwardOnly:r[3].forwardOnly,accesskey:r[15]("a")};r[3].startDate!==void 0&&(hc.date=r[3].startDate),r[9]!==void 0&&(hc.isDateValid=r[9]),D=new Mi({props:hc}),je.push(()=>Dt(D,"date",qk)),je.push(()=>Dt(D,"isDateValid",$k));let qh=[gI,hI],In=[];function $h(C,ee){return C[2].length>0&&C[14]?0:1}N=$h(r,[-1,-1]),te=In[N]=qh[N](r);function jk(C){r[41](C)}let jh={task:r[0],statusOptions:r[1],accesskey:r[15]("u")};r[3]!==void 0&&(jh.editableTask=r[3]),Mt=new yw({props:jh}),je.push(()=>Dt(Mt,"editableTask",jk));function Gk(C){r[42](C)}function Yk(C){r[43](C)}let gc={id:"created",dateSymbol:r[20],forwardOnly:r[3].forwardOnly,accesskey:r[15]("c")};r[3].createdDate!==void 0&&(gc.date=r[3].createdDate),r[5]!==void 0&&(gc.isDateValid=r[5]),G=new Mi({props:gc}),je.push(()=>Dt(G,"date",Gk)),je.push(()=>Dt(G,"isDateValid",Yk));function Bk(C){r[44](C)}function Hk(C){r[45](C)}let yc={id:"done",dateSymbol:r[21],forwardOnly:r[3].forwardOnly,accesskey:r[15]("x")};r[3].doneDate!==void 0&&(yc.date=r[3].doneDate),r[6]!==void 0&&(yc.isDateValid=r[6]),an=new Mi({props:yc}),je.push(()=>Dt(an,"date",Bk)),je.push(()=>Dt(an,"isDateValid",Hk));function Vk(C){r[46](C)}function zk(C){r[47](C)}let bc={id:"cancelled",dateSymbol:r[19],forwardOnly:r[3].forwardOnly,accesskey:r[15]("-")};return r[3].cancelledDate!==void 0&&(bc.date=r[3].cancelledDate),r[4]!==void 0&&(bc.isDateValid=r[4]),on=new Mi({props:bc}),je.push(()=>Dt(on,"date",Vk)),je.push(()=>Dt(on,"isDateValid",zk)),{c(){e=Q("form"),t=Q("section"),n=Q("label"),s=ue(),a=Q("textarea"),u=ue(),l=Q("section"),c=Q("label"),d=Me("Priority"),m=ue();for(let C=0;Cx=!1)),S.$set(un);let Qs={};ee[0]&8&&(Qs.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(Qs.accesskey=C[15]("d")),!re&&ee[0]&8&&(re=!0,Qs.date=C[3].dueDate,Ot(()=>re=!1)),!H&&ee[0]&128&&(H=!0,Qs.isDateValid=C[7],Ot(()=>H=!1)),q.$set(Qs);let Xs={};ee[0]&8&&(Xs.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(Xs.accesskey=C[15]("s")),!Pe&&ee[0]&8&&(Pe=!0,Xs.date=C[3].scheduledDate,Ot(()=>Pe=!1)),!j&&ee[0]&256&&(j=!0,Xs.isDateValid=C[8],Ot(()=>j=!1)),be.$set(Xs);let Zs={};ee[0]&8&&(Zs.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(Zs.accesskey=C[15]("a")),!V&&ee[0]&8&&(V=!0,Zs.date=C[3].startDate,Ot(()=>V=!1)),!W&&ee[0]&512&&(W=!0,Zs.isDateValid=C[9],Ot(()=>W=!1)),D.$set(Zs),(!Ur||ee[0]&32768)&&b!==(b=pt("Only future dates:",C[15]("f"))+"")&&(h.innerHTML=b),(!Ur||ee[0]&32768&&O!==(O=C[15]("f")))&&L(w,"accesskey",O),ee[0]&8&&(w.checked=C[3].forwardOnly);let Tc=N;N=$h(C,ee),N===Tc?In[N].p(C,ee):(Nv(),Kt(In[Tc],1,1,()=>{In[Tc]=null}),Iv(),te=In[N],te?te.p(C,ee):(te=In[N]=qh[N](C),te.c()),Ft(te,1),te.m(R,null));let Js={};ee[0]&1&&(Js.task=C[0]),ee[0]&2&&(Js.statusOptions=C[1]),ee[0]&32768&&(Js.accesskey=C[15]("u")),!sn&&ee[0]&8&&(sn=!0,Js.editableTask=C[3],Ot(()=>sn=!1)),Mt.$set(Js);let ea={};ee[0]&8&&(ea.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ea.accesskey=C[15]("c")),!qt&&ee[0]&8&&(qt=!0,ea.date=C[3].createdDate,Ot(()=>qt=!1)),!Xe&&ee[0]&32&&(Xe=!0,ea.isDateValid=C[5],Ot(()=>Xe=!1)),G.$set(ea);let ta={};ee[0]&8&&(ta.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ta.accesskey=C[15]("x")),!uc&&ee[0]&8&&(uc=!0,ta.date=C[3].doneDate,Ot(()=>uc=!1)),!lc&&ee[0]&64&&(lc=!0,ta.isDateValid=C[6],Ot(()=>lc=!1)),an.$set(ta);let ra={};ee[0]&8&&(ra.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ra.accesskey=C[15]("-")),!cc&&ee[0]&8&&(cc=!0,ra.date=C[3].cancelledDate,Ot(()=>cc=!1)),!dc&&ee[0]&16&&(dc=!0,ra.isDateValid=C[4],Ot(()=>dc=!1)),on.$set(ra),(!Ur||ee[0]&8192&&jo!==(jo=!C[13]))&&(ai.disabled=jo)},i(C){Ur||(Ft(S.$$.fragment,C),Ft(q.$$.fragment,C),Ft(be.$$.fragment,C),Ft(D.$$.fragment,C),Ft(te),Ft(Mt.$$.fragment,C),Ft(G.$$.fragment,C),Ft(an.$$.fragment,C),Ft(on.$$.fragment,C),Ur=!0)},o(C){Kt(S.$$.fragment,C),Kt(q.$$.fragment,C),Kt(be.$$.fragment,C),Kt(D.$$.fragment,C),Kt(te),Kt(Mt.$$.fragment,C),Kt(G.$$.fragment,C),Kt(an.$$.fragment,C),Kt(on.$$.fragment,C),Ur=!1},d(C){C&&oe(e),r[30](null),Ri(vt,C),Qt(S),Qt(q),Qt(be),Qt(D),In[N].d(),Qt(Mt),Qt(G),Qt(an),Qt(on),fc=!1,It(Uh)}}}function bI(r,e,t){let n,{task:i}=e,{onSubmit:s}=e,{statusOptions:a}=e,{allTasks:o}=e,{prioritySymbols:u,startDateSymbol:l,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:f,createdDateSymbol:m,doneDateSymbol:g}=xr.tasksPluginEmoji.taskSerializer.symbols,y,T=Ds.fromTask(i,o),k=!0,S=!0,x=!0,U=!0,q=!0,re=!0,H=!0,Y=!0,be=!0,Pe=!0,j=!1,$=[{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}];Wm(()=>{let{provideAccessKeys:G}=X();t(11,be=G),t(14,j=!0),setTimeout(()=>{y.focus()},10)});let D=()=>{s([])},V=G=>{G.key==="Enter"&&(G.preventDefault(),Pe&&Z())},W=()=>{setTimeout(()=>{t(3,T.description=T.description.replace(/[\r\n]+/g," "),T)},0)},Z=()=>Fv(void 0,void 0,void 0,function*(){let G=yield T.applyEdits(i,o);s(G)}),p=[[]];function h(){T.description=this.value,t(3,T)}function b(G){je[G?"unshift":"push"](()=>{y=G,t(12,y)})}function _(){T.priority=this.__value,t(3,T)}function w(G){Y=G,t(10,Y)}function O(G){r.$$.not_equal(T.dueDate,G)&&(T.dueDate=G,t(3,T))}function M(G){q=G,t(7,q)}function A(G){r.$$.not_equal(T.scheduledDate,G)&&(T.scheduledDate=G,t(3,T))}function v(G){re=G,t(8,re)}function R(G){r.$$.not_equal(T.startDate,G)&&(T.startDate=G,t(3,T))}function N(G){H=G,t(9,H)}function te(){T.forwardOnly=this.checked,t(3,T)}function le(G){T=G,t(3,T)}function fe(G){r.$$.not_equal(T.createdDate,G)&&(T.createdDate=G,t(3,T))}function Ne(G){x=G,t(5,x)}function Ce(G){r.$$.not_equal(T.doneDate,G)&&(T.doneDate=G,t(3,T))}function Mt(G){U=G,t(6,U)}function sn(G){r.$$.not_equal(T.cancelledDate,G)&&(T.cancelledDate=G,t(3,T))}function Lr(G){S=G,t(4,S)}return r.$$set=G=>{"task"in G&&t(0,i=G.task),"onSubmit"in G&&t(27,s=G.onSubmit),"statusOptions"in G&&t(1,a=G.statusOptions),"allTasks"in G&&t(2,o=G.allTasks)},r.$$.update=()=>{if(r.$$.dirty[0]&2048){e:t(15,n=G=>be?G:null)}if(r.$$.dirty[0]&8){e:t(28,k=T.description.trim()!=="")}if(r.$$.dirty[0]&268437488){e:t(13,Pe=q&&Y&&re&&H&&k&&S&&x&&U)}},[i,a,o,T,S,x,U,q,re,H,Y,be,y,Pe,j,n,l,c,d,f,m,g,$,D,V,W,Z,s,k,h,b,_,p,w,O,M,A,v,R,N,te,le,fe,Ne,Ce,Mt,sn,Lr]}var th=class extends pr{constructor(e){super(),Qr(this,e,bI,yI,Kr,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},_w=th;var zn=class extends vw.Modal{constructor({app:t,task:n,onSubmit:i,allTasks:s}){super(t);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:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new _w({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===ne.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function TI(){let{setCreatedDate:r}=X();return r?window.moment():null}function _I(r){let{setCreatedDate:e}=X();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!_e.getInstance().isEmpty(),i=!_e.getInstance().includedIn(r.description);return t||n&&i}var hl=({line:r,path:e})=>{var f,m;let t=ae.parseTaskSignifiers(r,ft.fromUnknownPosition(new ze(e)),yt.fromPath(e)),n=TI();if(t!==null)return _I(t)?new ae(he(K({},t),{createdDate:n})):t;let i=r.match(J.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ae({status:ne.TODO,description:"",taskLocation:ft.fromUnknownPosition(new ze(e)),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,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(J.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(J.blockLinkRegex,"")),new ae({status:u,description:l,taskLocation:ft.fromUnknownPosition(new ze(e)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var ww=(r,e,t,n,i)=>{var f;if(r)return t instanceof rh.MarkdownView;if(!(t instanceof rh.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=hl({line:u,path:s}),c=m=>{let g=yt.removeInferredStatusIfNeeded(l,m).map(y=>y.toFileLineString()).join(` +`);e.setLine(o,g)};new zn({app:n,task:l,onSubmit:c,allTasks:i}).open()};var nh=require("obsidian");var kw=(r,e,t)=>{var u;if(r)return t instanceof nh.MarkdownView;if(!(t instanceof nh.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=ih(a,n);e.setLine(s,o.text),e.setCursor(vI(i,o))},ih=(r,e)=>{let t=ae.fromLine({line:r,taskLocation:ft.fromUnknownPosition(new ze(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(J.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(J.taskRegex,`$1- [${a}] $4`)}}else if(J.listItemRegex.test(r)){let i=r.replace(J.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(J.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},vI=(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 gl=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)=>ww(t,n,i,this.app,this.plugin.getTasks())}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:kw})}};var Kn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};function Ni(r,e){let t=`Error: ${r}. +The error message was: + `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var wI=Object.prototype.toString,Rs=Array.isArray||function(e){return wI.call(e)==="[object Array]"};function ah(r){return typeof r=="function"}function kI(r){return Rs(r)?"array":typeof r}function sh(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ew(r,e){return r!=null&&typeof r=="object"&&e in r}function EI(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var SI=RegExp.prototype.test;function OI(r,e){return SI.call(r,e)}var DI=/\S/;function xI(r){return!OI(DI,r)}var RI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function MI(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return RI[t]})}var CI=/\s*/,AI=/\s+/,Sw=/\s*=/,PI=/\s*\}/,NI=/#|\^|\/|>|\{|&|=|!/;function II(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 g(Y){if(typeof Y=="string"&&(Y=Y.split(AI,2)),!Rs(Y)||Y.length!==2)throw new Error("Invalid tags: "+Y);d=new RegExp(sh(Y[0])+"\\s*"),f=new RegExp("\\s*"+sh(Y[1])),m=new RegExp("\\s*"+sh("}"+Y[1]))}g(e||yr.tags);for(var y=new Co(r),T,k,S,x,U,q;!y.eos();){if(T=y.pos,S=y.scanUntil(d),S)for(var re=0,H=S.length;re"?U=[k,S,T,y.pos,u,l,t]:U=[k,S,T,y.pos],l++,i.push(U),k==="#"||k==="^")n.push(U);else if(k==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+S+'" at '+T);if(q[1]!==S)throw new Error('Unclosed section "'+q[1]+'" at '+T)}else k==="name"||k==="{"||k==="&"?o=!0:k==="="&&g(S)}if(c(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+y.pos);return LI(FI(i))}function FI(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 Co(r){this.string=r,this.tail=r,this.pos=0}Co.prototype.eos=function(){return this.tail===""};Co.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};Co.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 xs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}xs.prototype.push=function(e){return new xs(e,this)};xs.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};xt.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(Rs(u))for(var c=0,d=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` +`)};xt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=ah(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)}}};xt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};xt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||yr.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===yr.escape?String(s):i(s)};xt.prototype.rawValue=function(e){return e[1]};xt.prototype.getConfigTags=function(e){return Rs(e)?e:e&&typeof e=="object"?e.tags:void 0};xt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Rs(e))return e.escape};var yr={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){Mo.templateCache=r},get templateCache(){return Mo.templateCache}},Mo=new xt;yr.clearCache=function(){return Mo.clearCache()};yr.parse=function(e,t){return Mo.parse(e,t)};yr.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+kI(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Mo.render(e,t,n,i)};yr.escape=MI;yr.Scanner=Co;yr.Context=xs;yr.Writer=xt;var oh=yr;var Mw=ia(Rw());function Cw(r,e){oh.escape=function(t){return t};try{return oh.render(r,(0,Mw.default)(e))}catch(t){let n="";throw t 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+=` + +The problem is in: + ${r}`,Error(n)}}function Aw(r){return lh(r,[])}function lh(r,e){return{query:{file:new ze(r),allTasks:e}}}var Ms=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(n=>n.explainFilterIndented(this.indentation)).join(` +`)}explainGroups(e){let t=e.grouping.length;if(t===0)return this.indent(`No grouping instructions supplied. +`);let n="";for(let i=0;i1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;ithis.matches(t))}};var As=class extends Cs{constructor(t){super();this.stringToFind=t}matches(t){return As.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Se(t)}};var Qn=class extends Cs{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 Qn(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 + +Regular expressions must look like this: + /pattern/ +or this: + /pattern/flags + +Where: +- pattern: The 'regular expression' pattern to search for. +- flags: Optional characters that modify the search. + i => make the search case-insensitive + u => add Unicode support + +Examples: /^Log/ + /^Log/i + /File Name\.md/ + /waiting|waits|waited/i + /\d\d:\d\d/ + +The following characters have special meaning in the pattern: +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=UI(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 UI(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 Pr=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Pr.maybeReverse(i,n)}static maybeReverse(e,t){return e?Pr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n,i)=>e(t,n,i)*-1}};var Xn=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 Bn(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 Pr(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 Xn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Cn=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(` +`).join(` +`+e),s=`${e}${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 bt=class{constructor(e,t,n){this._statement=new Cn(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 Zr=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 Zr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Zr(e);return n._error=t,n}};var ie=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 ie(Zr.fromObject(e.instruction,e))}static fromError(e,t){return new ie(Zr.fromError(e,t))}};var Ie=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return ie.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 As(i);else if(n.includes("regex")){try{s=Qn.validateAndConstruct(i)}catch(u){let l=Ni("Parsing regular expression",u)+` + +${Qn.helpMessage()}`;return ie.fromError(e,l)}if(s===null)return ie.fromError(e,`Invalid instruction: '${e}' + +${Qn.helpMessage()}`)}if(s===null)return ie.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new bt(e,this.getFilter(s,a),s.explanation(e));return ie.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 Ii=class extends Ie{fieldName(){return"description"}value(e){return _e.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ii.cleanDescription(e.description),i=Ii.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=_e.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 yl=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. + +Possible causes: +- The query is an a template file, and is not intended to be searched. +- A command such as "Replace templates in the active file" needs to be run. +- The core "Daily notes" plugin is in use, and the template contained + date calculations that it does not support. +- Some sample template text was accidentally pasted in to a tasks query, + instead of in to a template file. + +See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text +`}};var bl=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?ie.fromFilter(new bt(e,this._filter,new Se(e))):ie.fromError(e,`do not understand filter: ${e}`)}};var Wt=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new bl(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return ie.fromError(e,`do not understand filter: ${e}`)}};var at=class extends Ee{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Wt,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 ie.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 ie.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=Yt.parseDateRange(u);if(!l.isValid()){let m=Yt.parseDate(a);m.isValid()&&(l=new kt(m,m))}if(!l.isValid())return ie.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=at.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ie.fromFilter(new bt(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)=>fr(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 yl().findUnexpandedDateText(t)}};var Tl=class extends at{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var _l=class extends at{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Ps=class extends at{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Jr=class extends Ee{constructor(){super(...arguments);this._filters=new Wt}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var vl=class extends Jr{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 Ao=class extends Zr{};function ch(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?Ao.fromObject(e,i):Ao.fromError(e,"Error parsing group function")}catch(n){return Ao.fromError(e,Ni(`Failed parsing expression "${e}"`,n))}}function dh(r,e){let t=e.map(([n,i])=>i);return r(...t)}function fh(r,e,t){try{return dh(r,e)}catch(n){return Ni(`Failed calculating expression "${t}"`,n)}}function wl(r,e){return[["task",r],["query",e?e.query:null]]}function Pw(r,e,t){let n=wl(r,t||null),i=ch(n,e);return i.error?i.error:fh(i.queryComponent,n,e)}var Po=class{constructor(e){this.line=e,this.functionOrError=ch(wl(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 dh(this.functionOrError.queryComponent,wl(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?fh(this.functionOrError.queryComponent,wl(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function ph(r){if(r===null)return"null";let e=typeof r;return e==="object"?r.constructor.name:e}var kl=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return ie.fromError(e,"Unable to parse line");let n=t[1],i=new Po(n);return i.isValid()?ie.fromFilter(new bt(e,WI(i),new Se(e))):ie.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 Po(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 Pr(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=ph(e),i=ph(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 fr(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 fr(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 Xn(e,"function",$I(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 WI(r){return(e,t)=>{let n=t.queryContext();return qI(r,e,n)}}function qI(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 $I(r){return(e,t)=>{let n=t.queryContext();return jI(e,r,n)}}function jI(r,e,t){try{let n=Pw(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 El=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 Ns=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 mh=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 ie.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 ie.fromFilter(new bt(e,o,new Se(a)))}else return ie.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return mh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Fi=mh;Fi.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Sl=class extends at{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Ol=class extends at{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Dl=class extends at{constructor(){let e=new Wt;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 xl=class extends Jr{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 Zn=class extends Jr{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=Zn.oldStatusName(e),i=Zn.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Zn.oldStatusName(e)]}};var Rl=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 Xn(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 Li=class extends Rl{constructor(){super();this.filterInstructions=new Wt,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=Li.makeCompareByTagComparator(s);return new Pr(t,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Li.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 Vw=ia(Hw());function Jn(r){return new RegExp("["+Bn(r)+"]").source}var Eh=[["(",")"],["[","]"],["{","}"],['"','"']],An=class{constructor(e,t,n){this.openFilterChars=e,this.closeFilterChars=t,this.openAndCloseFilterChars=n,this.openFilter=Jn(this.openFilterChars),this.closeFilter=Jn(this.closeFilterChars)}static allSupportedDelimiters(){let e="",t="",n="";for(let[i,s]of Eh)e+=i,t+=s,n+=An.openAndClosing(i,s);return new An(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 Eh)if(o===l&&u===c){let d=this.openAndClosing(l,c);return new An(l,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+Eh.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 ei=class{static preprocessExpression(e,t){let n=ei.splitLine(e,t);return ei.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("(^"+Jn(t.openFilterChars+" ")+"*)"),u=new RegExp("("+Jn(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(!ei.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(Jn(u),"g");n=n.replace(l,"(");let c=t.closeFilterChars,d=new RegExp(Jn(c),"g");n=n.replace(d,")")}return{simplifiedLine:n,filters:s}}static isAFilter(e,t){let n=new RegExp("^"+Jn(" "+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 Nl=class extends Ee{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let t=An.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 ie.fromError(t,"empty line");let n;try{n=An.fromInstructionLine(t)}catch(o){let u=o instanceof Error?o.message:"unknown error type";return ie.fromError(t,this.helpMessageFromSimpleError(t,u))}let i=ei.preprocessExpression(t,n),s=i.simplifiedLine,a=i.filters;try{let o=(0,Vw.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=Io(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 ie.fromFilter(new bt(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)} + +The instruction was converted to the following simplified line: + ${i.simplifiedLine} + +Where the sub-expressions in the simplified line are: +${a} + +For help, see: + https://publish.obsidian.md/tasks/Queries/Combining+Filters +`;return ie.fromError(t,u)}stringifySubExpressionsForErrorMessage(t){return Object.entries(t).map(([n,i])=>` '${n}': '${i}' + => ${this.stringifySubExpressionStatus(i)}`).join(` +`)}stringifySubExpressionStatus(t){let n=Io(t);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} + +The error message is: + ${n}`}};var Il=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 js=class extends Ee{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return ie.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 Fl=class extends Ie{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var nn=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=zt[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 ie.fromFilter(new bt(e,a,new Se(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(zt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. + Allowed options: 'is' and 'is not' (without quotes). + Allowed values: ${t} + Note: values are case-insensitive, + so 'in_progress' works too, for example. + Example: ${this.fieldNameSingular()} is not NON_TASK`;return ie.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=nn.groupName(e),i=nn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[nn.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Ll=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 Ul=class extends Ie{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(this.value(e))]}};var Wl=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 ie.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 $l=class extends at{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var jl=class extends Jr{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 Gl=class extends Ie{constructor(){super();this.filterInstructions=new Wt;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 Yl=class extends Ee{constructor(){super();this.filterInstructions=new Wt;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:ie.fromError(t,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var Sh=[()=>new Fl,()=>new nn,()=>new Zn,()=>new xl,()=>new Fi,()=>new Dl,()=>new $l,()=>new Tl,()=>new Ol,()=>new Sl,()=>new Ps,()=>new _l,()=>new Ns,()=>new Ul,()=>new Wl,()=>new ql,()=>new Ii,()=>new Li,()=>new El,()=>new vl,()=>new Il,()=>new js,()=>new Ll,()=>new kl,()=>new Gl,()=>new Yl,()=>new jl,()=>new Nl];function Io(r){for(let e of Sh){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function zw(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Sh){let i=t().createSorterFromLine(r);if(i)return i}return null}function Kw(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Sh){let i=t().createGrouperFromLine(r);if(i)return i}return null}var Bl=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var Hl=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 zl=class extends Vl{},Kl=class{constructor(e,t,n){this.root=new zl(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 zl([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ql=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 Gs=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new Kl(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+=` +--- +`;return e+=` +${this.totalTasksCount()} tasks +`,e}addTaskGroups(e){for(let[t,n]of e){let i=new Ql(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 ti=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new ti(void 0,e)}queryContext(){return this.queryPath?lh(this.queryPath,this.allTasks):void 0}};function Qw(r){return`task${r!==1?"s":""}`}var qi=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} ${Qw(e)}`:`${e} of ${t} ${Qw(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new qi(new Gs([],[],ti.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function Xw(r){return r.endsWith("\\")}function Zw(r){return r.endsWith("\\\\")}function gF(r){return r.replace(/^[ \t]*/,"")}function yF(r){return r.replace(/[ \t]*\\$/,"")}function bF(r,e){let t=r;return e&&(t=gF(r)),Zw(t)?t=t.slice(0,-1):Xw(r)&&(t=yF(t)),t}function Jw(r){let e=[],t=!1,n="",i="";for(let s of r.split(` +`)){let a=bF(s,t);t?(n+=` +`+s,i+=" "+a):(n=s,i=a),Zw(s)?t=!1:t=Xw(s),t||(i.trim()!==""&&e.push(new Cn(n,i)),n="",i="")}return e}var Ys=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(Ys.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new nn().createNormalSorter(),new js().createNormalSorter(),new Ps().createNormalSorter(),new Fi().createNormalSorter(),new Ns().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 Pn=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Hr;this._queryLayoutOptions=new Kn;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)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),Jw(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 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.filePath===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=Aw(t);try{i=Cw(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 Pn(`${this.source} +${e.source}`,this.filePath)}explainQuery(){return new Ms().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){t.allLinesIdentical()?this._error=`${e} +Problem line: "${t.rawInstruction}"`:this._error=`${e} +Problem statement: +${t.explainStatement(" ")} +`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new ti(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=X(),i=n.ignoreSortInstructions?e:Ys.by(this.sorting,e,t),s=i.slice(0,this.limit),a=new Gs(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new qi(a,i.length)}catch(n){let i="Search failed";return qi.fromError(Ni(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){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;default:this.setError("do not understand hide/show option",new Cn(e,e))}}}parseFilter(e,t){var i;let n=Io(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 Cn(e,e));return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=zw(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Kw(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 ri=class{constructor(e=ri.empty){this._source=e}static getInstance(){return ri.instance||(ri.instance=new ri),ri.instance}set(e){this._source=e}query(e=void 0){return new Pn(this._source,e)}hasInstructions(){return this._source.trim()!==ri.empty}},_r=ri;_r.empty="";var Xl=class{constructor({obsidianEvents:e}){this.logger=St.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 nk=require("obsidian");var rk=require("obsidian");var Oh=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 ek(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 Oh(i));return e}var tk=require("obsidian");function Fo(r,e){return P(this,null,function*(){yield gr({originalTask:r,newTasks:e})})}var Bs=class extends tk.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let i of t)this.addItemForInstruction(n,i)}addItemForInstruction(t,n){this.addItem(i=>this.getMenuItemCallback(t,i,n))}getMenuItemCallback(t,n,i){n.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(t)).onClick(()=>P(this,null,function*(){let s=i.apply(t);(s.length!==1||!Object.is(s[0],t))&&(yield this.taskSaver(t,s))}))}};var Zl=class extends Bs{constructor(e,t,n=Fo){super(n);let i=ek(e);this.addItemsForInstructions(i,t)}};var Jl=class{constructor(){this.data=TF}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},Dh=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===Dh.noAttributeName)return;let i=this.attributeValueCalculator(n,t);i!==""&&(e.dataset[this.attributeName]=i)}},Ir=Dh;Ir.noAttributeName="",Ir.noAttributeValueCalculator=()=>"",Ir.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 Lo(r){return new Ir(r,Ir.noAttributeName,Ir.noAttributeValueCalculator)}function Hs(r,e){return new Ir(r,e,Ir.dateAttributeCalculator)}var TF={createdDate:Hs("task-created","taskCreated"),dueDate:Hs("task-due","taskDue"),startDate:Hs("task-start","taskStart"),scheduledDate:Hs("task-scheduled","taskScheduled"),doneDate:Hs("task-done","taskDone"),cancelledDate:Hs("task-cancelled","taskCancelled"),priority:new Ir("task-priority","taskPriority",(r,e)=>En.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),description:Lo("task-description"),recurrenceRule:Lo("task-recurring"),dependsOn:Lo("task-dependsOn"),id:Lo("task-id"),blockLink:Lo("task-block-link")};function er(r,e){let t=document.createElement(r);return e.appendChild(t),t}var ni=class{static obsidianMarkdownRenderer(e,t,n,i){return P(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield rk.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=ni.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 P(this,null,function*(){let i=er("li",this.parentUlElement);i.classList.add("task-list-item","plugin-tasks-list-item");let s=er("span",i);s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=er("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();gr({originalTask:e,newTasks:l})}),a.addEventListener("contextmenu",u=>{new Zl(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 P(this,null,function*(){let i=new Jl,s=xr.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=s.componentToString(e,this.queryLayoutOptions.shortMode,a);if(o){let u=er("span",t),l=er("span",u);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)}}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 P(this,null,function*(){if(n==="description"){t=_e.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=X();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(y,T,k){T&&y.createDiv().setText(f({signifier:k,date:T}))}function f({signifier:y,date:T}){return`${y} ${T.format(J.dateFormat)} (${T.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 g=e.getLinkText({isFilenameUnique:n});g&&m.createDiv().setText(`\u{1F517} ${g}`),t.addEventListener("mouseleave",()=>{m.remove()})})}};var ec=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return P(this,null,function*(){var d;let n=new nk.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(f=>{var y;let m=(y=f.textContent)==null?void 0:y.split(` +`);if(m===void 0)return!1;let g=null;for(let T=0;Tik.ViewPlugin.fromClass(xh),xh=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 sk.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ae.fromLine({line:a.text,taskLocation:ft.fromUnknownPosition(new ze("")),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var Vs=require("obsidian");function Uo(r,e,t){e&&r.push(_F(t))}function _F(r){return`tasks-layout-hide-${r}`}var tc=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new Kn}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)Uo(e,n,i);return this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode"),e}};function ok(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. + +`);let s=new Ms(" "),a=new Pn(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.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 rc(r,e,t){let n=new Pn(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function uk(r){for(let t of ae.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 Wo(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Rh(r,e,t,n){let i=r[e];return dk(i,r,e,t,n)}function lk(r,e,t,n){let i=window.moment();return dk(i,r,e,t,n)}function ck(r,e,t,n){return fk(r,e,null)}function dk(r,e,t,n,i){let s=new Nt(r).postpone(n,i);return fk(e,t,s)}function fk(r,e,t){let n=yt.removeInferredStatusIfNeeded(r,[new ae(he(K({},r),{[e]:t}))])[0];return{postponedDate:t,postponedTask:n}}function pk(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 mk(r,e,t){return`\u2139\uFE0F ${Mh(r,e,t)} (right-click for more options)`}function Mh(r,e,t){let n=Wo(r),i=r[n];return bk(n,i,e,t)}function hk(r,e,t){let n=Wo(r),i=window.moment().startOf("day");return bk(n,i,e,t)}function gk(r,e,t){let n=Wo(r);return n==="scheduledDate"&&r.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${yk(n)}`}function vF(r){return vs(r.replace("Date",""))}function yk(r){return r.replace("Date"," date")}function bk(r,e,t,n){let s=new Nt(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${vF(r)} in ${a} ${n}, on ${s}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${yk(r)} by ${a} ${n}, to ${s}`}var nc=class{constructor(e){e?this.taskLayoutOptions=e:this.taskLayoutOptions=new Hr}generateHiddenClasses(){let e=[];return this.taskLayoutOptions.toggleableComponents.forEach(t=>{Uo(e,!this.taskLayoutOptions.isShown(t),t)}),Uo(e,!this.taskLayoutOptions.areTagsShown(),"tags"),e}};var Ch=require("obsidian");var ii=class extends Bs{constructor(e,t,n=Fo){super(n);let i=(l,c,d,f,m,g)=>{let y=m(t,f,d);c.setTitle(y).onClick(()=>ii.postponeOnClickCallback(l,t,f,d,g,n))},s=hk,a=lk;this.addItem(l=>i(e,l,"days",0,s,a)),this.addItem(l=>i(e,l,"day",1,s,a)),this.addSeparator();let o=Mh,u=Rh;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,gk,ck))}static postponeOnClickCallback(o,u,l,c){return P(this,arguments,function*(e,t,n,i,s=Rh,a=Fo){let d=Wo(t);if(d===null){let g="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new Ch.Notice(g,1e4)}let{postponedDate:f,postponedTask:m}=s(t,d,i,n);yield a(t,m),ii.postponeSuccessCallback(e,d,f)})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let i=pk(n,t);new Ch.Notice(i,2e3)}};var qo=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}=X();return e.recordTimings}};var ic=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 P(this,null,function*(){let i=new Ah({app:this.app,plugin:this.plugin,events:this.events,container:t,source:e,filePath:n.sourcePath});n.addChild(i),i.load()})}},Ah=class extends Vs.MarkdownRenderChild{constructor({app:t,plugin:n,events:i,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.plugin=n,this.events=i,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=rc(this.source,_r.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=rc(this.source,_r.getInstance(),this.filePath),this.queryType="tasks";break}}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.query=rc(this.source,_r.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return P(this,arguments,function*({tasks:t,state:n}){var a;let s=er("div",this.containerEl);n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return P(this,null,function*(){let s=this.explainAndPerformSearch(n,t,i);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(i,s.searchErrorMessage);return}yield this.renderSearchResults(s,i)})}explainAndPerformSearch(t,n,i){let s=new qo(`Search: ${this.query.queryId} - ${this.filePath}`);s.start(),this.query.debug(`[render] Render called: plugin state: ${t}; searching ${n.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(i);let a=this.query.applyQueryToTasks(n);return s.finish(),a}renderSearchResults(t,n){return P(this,null,function*(){let i=new qo(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(t.taskGroups,n);let s=t.totalTasksCount;this.addTaskCount(n,t),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=ok(this.source,_e.getInstance(),_r.getInstance(),this.filePath),i=er("pre",t);i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return P(this,null,function*(){let i=er("ul",n);i.addClasses(["contains-task-list","plugin-tasks-query-result"]);let s=new nc(this.query.taskLayoutOptions);i.addClasses(s.generateHiddenClasses());let a=new tc(this.query.queryLayoutOptions);i.addClasses(a.getHiddenClasses());let o=this.getGroupingAttribute();o&&o.length>0&&(i.dataset.taskGroupBy=o);let u=new ni({obsidianComponent:this,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[l,c]of t.entries())yield this.addTask(i,u,c,l);n.appendChild(i)})}addTask(t,n,i,s){return P(this,null,function*(){let a=this.isFilenameUnique({task:i}),o=yield n.renderTaskLine(i,s,a);o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let l=o.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(l,i);let c=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(l,i,c,a),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(l,i,this.plugin.getTasks()),!this.query.queryLayoutOptions.hidePostponeButton&&uk(i)&&this.addPostponeButton(l,i,c),t.appendChild(o)})}addEditButton(t,n,i){let s=er("a",t);s.addClass("tasks-edit"),s.title="Edit task",s.href="#",s.onClickEvent(a=>{a.preventDefault();let o=l=>P(this,null,function*(){yield gr({originalTask:n,newTasks:yt.removeInferredStatusIfNeeded(n,l)})});new zn({app:this.app,task:n,onSubmit:o,allTasks:i}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return P(this,null,function*(){for(let i of t.groups)yield this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){return P(this,null,function*(){for(let i of n)yield this.addGroupHeading(t,i)})}addGroupHeading(t,n){return P(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=er(i,t);s.addClass("tasks-group-heading"),yield Vs.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=er("a",a);o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",d=>P(this,null,function*(){let f=yield Zm(n,l);if(f){let[m,g]=f,y=this.app.workspace.getLeaf(Vs.Keymap.isModEvent(d));d.preventDefault(),yield y.openFile(g,{eState:{line:m}})}})),o.addEventListener("mousedown",d=>P(this,null,function*(){if(d.button===1){let f=yield Zm(n,l);if(f){let[m,g]=f,y=this.app.workspace.getLeaf("tab");d.preventDefault(),yield y.openFile(g,{eState:{line:m}})}}})),i||a.append(")")}addPostponeButton(t,n,i){let a="day",o=mk(n,1,a),u=er("a",t);u.addClass("tasks-postpone"),i&&u.addClass("tasks-postpone-short-mode"),u.title=o,u.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),ii.postponeOnClickCallback(u,n,1,a)}),u.addEventListener("contextmenu",l=>P(this,null,function*(){l.preventDefault(),l.stopPropagation(),new ii(u,n).showAtPosition({x:l.clientX,y:l.clientY})}))}addTaskCount(t,n){this.query.queryLayoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var ve=require("obsidian");var sc=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 Tk(r,e){return r.findIndex(t=>t.symbol===e)}function Nn(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function wF(r,e){let t=ne.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Nn(r.symbol)} is ${Nn(t)}: you may wish to review this type.`))}function kF(r,e,t){let n=Tk(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Nn(e.nextStatusSymbol)} is unknown: create a status with symbol ${Nn(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 ${Nn(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 EF(r,e,t){let n=[];return e.symbol===ne.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):Tk(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Nn(e.symbol)}': this status will be ignored.`),n):(wF(e,n),kF(r,e,n),n)}function _k(r){let e=new sc(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Le.allStatuses(r);return t.forEach((n,i)=>{e.addRow([Nn(n.symbol),Nn(n.nextStatusSymbol),n.name,Nn(n.type),EF(t,n,i).join("
")])}),e.markdown}function vk(r,e,t,n){let s=_k(r),a=e.mermaidDiagram(!0);return`# ${t} + +## About this file + +This file was created by the Obsidian Tasks plugin (version ${n}) to help visualise the task statuses in this vault. + +If you change the Tasks status settings, you can get an updated report by: + +- Going to \`Settings\` -> \`Tasks\`. +- Clicking on \`Review and check your Statuses\`. + +You can delete this file any time. + +## Status Settings + + + +These are the status values in the Core and Custom statuses sections. + +${s} +## Loaded Settings + + + +These are the settings actually used by Tasks. +${a}`}function wk(){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 kk(){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 Ek(){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 Sk(){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 Ok(){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 Dk(){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 xk(){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 Rk=[{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 Fr=require("obsidian");var $i=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=ne.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return $i.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return $i.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=zt[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 ji=new $i,tr=class extends Fr.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 P(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new Fr.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,tr.setValid(l,ji.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{tr.setValid(i,ji.validateSymbol(this.statusConfiguration()))});let s;new Fr.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,tr.setValid(l,ji.validateName(this.statusConfiguration()))})}).then(l=>{tr.setValid(s,ji.validateName(this.statusConfiguration()))});let a;new Fr.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,tr.setValid(l,ji.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{tr.setValid(a,ji.validateNextSymbol(this.statusConfiguration()))}),new Fr.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=ne.getTypeFromStatusTypeString(d)})}),ne.tasksPluginCanCreateCommandsForStatuses()&&new Fr.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=>P(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new Fr.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>P(this,null,function*(){let c=ji.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +`)+` + +Fix errors before saving.`;new Fr.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?tr.removeValidationError(t):tr.setValidationError(t)}};var Rt=class extends ve.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 P(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new ve.Setting(t).setName("Task Format").setDesc(Rt.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(i=>{for(let s of Object.keys(xr))i.addOption(s,xr[s].displayName);i.setValue(X().taskFormat).onChange(s=>P(this,null,function*(){Ve({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new ve.Setting(t).setName("Global task filter").setDesc(Rt.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(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(_e.getInstance().get()).onChange(s=>P(this,null,function*(){Ve({globalFilter:s}),_e.getInstance().set(s),yield this.plugin.saveSettings()}))}),new ve.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(i=>{let s=X();i.setValue(s.removeGlobalFilter).onChange(a=>P(this,null,function*(){Ve({removeGlobalFilter:a}),_e.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),xF(new ve.Setting(t).setDesc(Rt.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(i=>{let s=X();i.inputEl.rows=4,i.setPlaceholder(`# For example... +path does not include _templates/ +limit 300 +show urgency`).setValue(s.globalQuery).onChange(a=>P(this,null,function*(){Ve({globalQuery:a}),_r.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=X();Rk.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new ve.Setting(t).setName("Set created date on every added task").setDesc(Rt.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(i=>{let s=X();i.setValue(s.setCreatedDate).onChange(a=>P(this,null,function*(){Ve({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set done date on every completed task").setDesc(Rt.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(i=>{let s=X();i.setValue(s.setDoneDate).onChange(a=>P(this,null,function*(){Ve({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set cancelled date on every cancelled task").setDesc(Rt.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(i=>{let s=X();i.setValue(s.setCancelledDate).onChange(a=>P(this,null,function*(){Ve({setCancelledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Rt.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(i=>{let s=X();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>P(this,null,function*(){Ve({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Rt.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(i=>{let s=X();i.setPlaceholder("example: MMM DD YYYY").setValue(s.filenameAsScheduledDateFormat).onChange(a=>P(this,null,function*(){Ve({filenameAsScheduledDateFormat:a}),yield this.plugin.saveSettings()}))}),new ve.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(i=>P(this,null,function*(){let s=X();yield this.plugin.saveSettings(),i.setValue(Rt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>P(this,null,function*(){let o=Rt.parseCommaSeparatedFolders(a);Ve({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new ve.Setting(t).setName("Next recurrence appears on the line below").setDesc(Rt.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(i=>{let{recurrenceOnNextLine:s}=X();i.setValue(s).onChange(a=>P(this,null,function*(){Ve({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new ve.Setting(t).setName("Auto-suggest task content").setDesc(Rt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.autoSuggestInEditor).onChange(a=>P(this,null,function*(){Ve({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new ve.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(i=>{let s=X();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new ve.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(i=>{let s=X();i.setLimits(3,20,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new ve.Setting(t).setName("Provide access keys in dialogs").setDesc(Rt.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(i=>{let s=X();i.setValue(s.provideAccessKeys).onChange(a=>P(this,null,function*(){Ve({provideAccessKeys:a}),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,Ve({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.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)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!yv(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=X();l.generalSettings[o.settingName]||Oi(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>P(this,null,function*(){Oi(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=X();l.generalSettings[o.settingName]||Oi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){Oi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=X();l.generalSettings[o.settingName]||Oi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){Oi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.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)}})}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}=X();i.coreStatuses.forEach(a=>{Mk(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new ve.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>P(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=vk(i,f,o,d),g=yield app.vault.create(c,m);yield this.app.workspace.getLeaf(!0).openFile(g)})),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}=X();i.customStatuses.forEach(l=>{Mk(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>P(this,null,function*(){Le.addStatus(i.customStatuses,new Qe("","","",!1,"TODO")),yield zs(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",wk()],["Aura Theme",kk()],["Ebullientworks Theme",Ek()],["ITS Theme & SlRvb Checkboxes",Sk()],["Minimal Theme",Dk()],["Things Theme",xk()],["LYT Mode Theme (Dark mode only)",Ok()]];for(let[l,c]of a)new ve.Setting(t).addButton(f=>{let m=`${l}: Add ${c.length} supported Statuses`;f.setButtonText(m).onClick(()=>P(this,null,function*(){yield DF(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>P(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 zs(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>P(this,null,function*(){Le.resetAllCustomStatuses(i),yield zs(i,n)}))}).infoEl.remove()}},$o=Rt;$o.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Mk(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new ne(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>P(this,null,function*(){Le.deleteStatus(t,e)&&(yield zs(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>P(this,null,function*(){let c=new tr(s,e,a);c.onClose=()=>P(this,null,function*(){c.saved&&Le.replaceStatus(t,e,c.statusConfiguration())&&(yield zs(n,i))}),c.open()}))}),u.infoEl.remove()}function DF(r,e,t){return P(this,null,function*(){Le.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield zs(e,t)})}function zs(r,e){return P(this,null,function*(){Ve({statusSettings:r}),Le.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function xF(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")}var si=require("obsidian");function RF(r){console.error(r),new si.Notice(r+` + +This message has been written to the console. +`,1e4)}var ac=class extends si.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 hv(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=bo()).buildSuggestions)==null?void 0:d.call(c,n,i.ch,this.settings,s,u,a))!=null?f:[]).map(m=>he(K({},m),{context:t}))}getMarkdownFileInfo(t){return t.editor.cm.state.field(si.editorInfoField)}canSaveEdits(t){return t instanceof si.MarkdownView}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){return P(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=Ku(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,g={line:t.taskItDependsOn.lineNumber,ch:0},y={line:t.taskItDependsOn.lineNumber,ch:m.length},T=t.context.editor.getRange(g,y);if(T!==m){let k=`Error adding new ID, due to mismatched data in Tasks memory and the editor: +task line in memory: '${t.taskItDependsOn.originalMarkdown}' + +task line in editor: '${T}' + +file: '${f.path}' +`;RF(k);return}t.context.editor.replaceRange(f.toFileLineString(),g,y)}else gr({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 Ck=(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 Ak=(r,e)=>{let t=hl({line:"",path:""});return new zn({app:r,task:t,onSubmit:e,allTasks:[]})};var Pk=r=>({createTaskLineModal:()=>Ck(r,Ak),executeToggleTaskDoneCommand:(e,t)=>ih(e,t).text});var oc=class extends Nk.Plugin{get apiV1(){return Pk(app)}onload(){return P(this,null,function*(){St.registerConsoleLogger(),Pm("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=X();St.configure(t),this.addSettingTab(new $o({plugin:this})),lw({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Xl({obsidianEvents:this.app.workspace});this.cache=new gs({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new ec({plugin:this}),this.queryRenderer=new ic({plugin:this,events:n}),this.registerEditorExtension(ak()),this.registerEditorSuggest(new ac(this.app,X(),this)),new gl({plugin:this})})}loadTaskStatuses(){return P(this,null,function*(){let{statusSettings:t}=X();Le.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;Pm("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return P(this,null,function*(){let t=yield this.loadData();Ve(t),t=X(),_e.getInstance().set(t.globalFilter),_e.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),_r.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return P(this,null,function*(){yield this.saveData(X())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}}; +/*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + */ +/*! + * mustache.js - Logic-less {{mustache}} templates with JavaScript + * http://github.com/janl/mustache.js + */ diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json new file mode 100644 index 00000000..93eedfa5 --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "obsidian-tasks-plugin", + "name": "Tasks", + "version": "7.6.1", + "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/", + "author": "Martin Schenck and Clare Macrae", + "authorUrl": "https://github.com/obsidian-tasks-group", + "fundingUrl": "https://github.com/sponsors/claremacrae", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css new file mode 100644 index 00000000..f991837d --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -0,0 +1 @@ +@charset "UTF-8";: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)}}.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} diff --git a/projects/Ремонт квартиры/Проект. Ремонт квартиры.md b/projects/Ремонт квартиры/Проект. Ремонт квартиры.md index 7604f307..4d07d18a 100644 --- a/projects/Ремонт квартиры/Проект. Ремонт квартиры.md +++ b/projects/Ремонт квартиры/Проект. Ремонт квартиры.md @@ -40,8 +40,8 @@ link: https://todoist.com/app/project/Kvartira-6Fx8gwXCXPFrWqw4 - [ ] ## План - [x] Составить список желаний: [Идеи для ремонта](Идеи%20для%20ремонта.md) -- [ ] Изучить как принимать квартиру. Составить чеклист -- [ ] Пройти [Курс. Как сделать ремонт и не сойти с ума](Курс.%20Как%20сделать%20ремонт%20и%20не%20сойти%20с%20ума.md) +- [ ] Изучить как принимать квартиру. Составить чеклист - ⏳ +- [ ] Пройти [Курс. Как сделать ремонт и не сойти с ума](Курс.%20Как%20сделать%20ремонт%20и%20не%20сойти%20с%20ума.md) - - [ ] Переработать конспект в знания. [Курс. Как сделать ремонт и не сойти с ума](Курс.%20Как%20сделать%20ремонт%20и%20не%20сойти%20с%20ума.md) - [ ] Подготовить дизайн проект - [x] Обсудить [Идеи для ремонта](Идеи%20для%20ремонта.md)