/ *
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 < jakub @ roztocil . name > 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 < gustavo @ niemeyer . net >
Copyright ( c ) 2012 - Tomi Pieviläinen < tomi . pievilainen @ iki . fi >
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 Nk = Object . create ; var oa = Object . defineProperty , Ik = Object . defineProperties , Fk = Object . getOwnPropertyDescriptor , Lk = Object . getOwnPropertyDescriptors , Uk = Object . getOwnPropertyNames , Jo = Object . getOwnPropertySymbols , Wk = Object . getPrototypeOf , vc = Object . prototype . hasOwnProperty , Qh = Object . prototype . propertyIsEnumerable ; var Kh = ( r , e , t ) => e in r ? oa ( r , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : t } ) : r [ e ] = t , X = ( r , e ) => { for ( var t in e || ( e = { } ) ) vc . call ( e , t ) && Kh ( r , t , e [ t ] ) ; if ( Jo ) for ( var t of Jo ( e ) ) Qh . call ( e , t ) && Kh ( r , t , e [ t ] ) ; return r } , be = ( r , e ) => Ik ( r , Lk ( e ) ) ; var eu = ( r , e ) => { var t = { } ; for ( var n in r ) vc . call ( r , n ) && e . indexOf ( n ) < 0 && ( t [ n ] = r [ n ] ) ; if ( r != null && Jo ) for ( var n of Jo ( r ) ) e . indexOf ( n ) < 0 && Qh . call ( r , n ) && ( t [ n ] = r [ n ] ) ; return t } ; var k = ( r , e ) => ( ) => ( e || r ( ( e = { exports : { } } ) . exports , e ) , e . exports ) , qk = ( r , e ) => { for ( var t in e ) oa ( r , t , { get : e [ t ] , enumerable : ! 0 } ) } , Xh = ( r , e , t , n ) => { if ( e && typeof e == "object" || typeof e == "function" ) for ( let s of Uk ( e ) ) ! vc . call ( r , s ) && s !== t && oa ( r , s , { get : ( ) => e [ s ] , enumerable : ! ( n = Fk ( e , s ) ) || n . enumerable } ) ; return r } ; var ua = ( r , e , t ) => ( t = r != null ? Nk ( Wk ( r ) ) : { } , Xh ( e || ! r || ! r . _ _esModule ? oa ( t , "default" , { value : r , enumerable : ! 0 } ) : t , r ) ) , jk = r => Xh ( oa ( { } , "__esModule" , { value : ! 0 } ) , r ) ; var L = ( r , e , t ) => new Promise ( ( n , s ) => { var i = u => { try { o ( t . next ( u ) ) } catch ( l ) { s ( l ) } } , a = u => { try { o ( t . throw ( u ) ) } catch ( l ) { s ( l ) } } , o = u => u . done ? n ( u . value ) : Promise . resolve ( u . value ) . then ( i , a ) ; o ( ( t = t . apply ( r , e ) ) . next ( ) ) } ) ; var xe = k ( Wn => { "use strict" ; Object . defineProperty ( Wn , "__esModule" , { value : ! 0 } ) ; Wn . matchAnyPattern = Wn . extractTerms = Wn . repeatedTimeunitPattern = void 0 ; function $k ( r , e ) { let t = e . replace ( /\((?!\?)/g , "(?:" ) ; return ` ${ r } ${ t } \\ s{0,5}(?:,? \\ s{0,5} ${ t } ){0,10} ` } Wn . repeatedTimeunitPattern = $k ; function Zh ( r ) { let e ; return r instanceof Array ? e = [ ... r ] : r instanceof Map ? e = Array . from ( r . keys ( ) ) : e = Object . keys ( r ) , e } Wn . extractTerms = Zh ; function Hk ( r ) { return ` (?: ${ Zh ( r ) . sort ( ( t , n ) => n . length - t . length ) . join ( "|" ) . replace ( /\./g , "\\." ) } ) ` } Wn . matchAnyPattern = Hk } ) ; var ve = k ( ( kc , Ec ) => { ( function ( r , e ) { typeof kc == "object" && typeof Ec != "undefined" ? Ec . exports = e ( ) : typeof define == "function" && define . amd ? define ( e ) : ( r = typeof globalThis != "undefined" ? globalThis : r || self ) . dayjs = e ( ) } ) ( kc , function ( ) { "use strict" ; var r = 1e3 , e = 6e4 , t = 36e5 , n = "millisecond" , s = "second" , i = "minute" , a = "hour" , o = "day" , u = "week" , l = "month" , c = "quarter" , f = "year" , p = "date" , m = "Invalid Date" , _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/ , g = /\[([^\]]+)]|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 , E = { 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 ( "_" ) } , C = function ( W , I , O ) { var $ = String ( W ) ; return ! $ || $ . length >= I ? W : "" + Array ( I + 1 - $ . length ) . join ( O ) + W } , R = { s : C , z : function ( W ) { var I = - W . utcOffset ( ) , O = Math . abs ( I ) , $ = Math . floor ( O / 60 ) , P = O % 60 ; return ( I <= 0 ? "+" : "-" ) + C ( $ , 2 , "0" ) + ":" + C ( P , 2 , "0" ) } , m : function W ( I , O ) { if ( I . date ( ) < O . date ( ) ) return - W ( O , I ) ; var $ = 12 * ( O . year ( ) - I . year ( ) ) + ( O . month ( ) - I . month ( ) ) , P = I . clone ( ) . add ( $ , l ) , Q = O - P < 0 , d = I . clone ( ) . add ( $ + ( Q ? - 1 : 1 ) , l ) ; return + ( - ( $ + ( O - P ) / ( Q ? P - d : d - P ) ) || 0 ) } , a : function ( W ) { return W < 0 ? Math . ceil ( W ) || 0 : Math . floor ( W ) } , p : function ( W ) { return { M : l , y : f , w : u , d : o , D : p , h : a , m : i , s , ms : n , Q : c } [ W ] || String ( W || "" ) . toLowerCase ( ) . replace ( /s$/ , "" ) } , u : function ( W ) { return W === void 0 } } , b = "en" , z = { } ; z [ b ] = E ; var U = function ( W ) { return W instanceof te } , ne = function ( W , I , O ) { var $ ; if ( ! W ) return b ; if ( typeof W == "string" ) z [ W ] && ( $ = W ) , I && ( z [ W ] = I , $ = W ) ; else { var P = W . name ; z [ P ] = W , $ = P } return ! O && $ && ( b = $ ) , $ || ! O && b } , G = function ( W , I ) { if ( U ( W ) ) return W . clone ( ) ; var O = typeof I == "object" ? I : { } ; return O . date = W , O . args = arguments , new te ( O ) } , Y = R ; Y . l = ne , Y . i = U , Y . w = function ( W , I ) { return G ( W , { locale : I . $L , utc : I . $u , x : I . $x , $offset : I . $offset } ) } ; var te = function ( ) { function W ( O ) { this . $L = ne ( O . locale , null , ! 0 ) , this . parse ( O ) } var I = W . prototype ; return I . parse = function ( O ) { this . $d = function ( $ ) { var P = $ . date , Q = $ . utc ; if ( P === null ) return new Date ( NaN ) ; if ( Y . u ( P ) ) return new Date ; if ( P instanceof Date ) return new Date ( P ) ; if ( typeof P == "string" && ! /Z$/i . test ( P ) ) { var d = P . match ( _ ) ; if ( d ) { var h = d [ 2 ] - 1 || 0 , y = ( d [ 7 ] || "0" ) . substring ( 0 , 3 ) ; return Q ? new D
` ).map(_P).filter(function(t){return t!==null});return _t(_t({},e[0]),e[1])}function ho(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^; \s ]+)/i.exec(r);if(!t)return e;var n=t[1],s=t[2];return n&&(e.tzid=n),e.dtstart=co(s),e}function _P(r){if(r=r.replace(/^ \s +| \s + $ /,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return G_(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return G_(r);case"DTSTART":return ho(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function G_(r){var e=r.replace(/^RRULE:/i,""),t=ho(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(s){var i=s.split("="),a=i[0],o=i[1];switch(a.toUpperCase()){case"FREQ":t.freq=pe[o.toUpperCase()];break;case"WKST":t.wkst=Tr[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=vP(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=wP(o);break;case"DTSTART":case"TZID":var c=ho(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=co(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function vP(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(Y_)}return Y_(r)}function Y_(r){return/^[+-]? \d + $ /.test(r)?Number(r):r}function wP(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Tr[t];var n=t.match(/^([+-]? \d {1,2})([A-Z]{2}) $ /);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var s=Number(n[1]),i=n[2],a=Tr[i].weekday;return new Je(a,s)})}var ks=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=gi(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:P_(this.date,this.tzid)},r}();function yo(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(mo),i=0;i<n.length;i++)if(n[i]!=="tzid"&&!!ge(s,n[i])){var a=n[i].toUpperCase(),o=r[n[i]],u="";if(!(!Ne(o)||Tt(o)&&!o.length)){switch(a){case"FREQ":u=V.FREQUENCIES[r.freq];break;case"WKST":Xt(o)?u=new Je(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=D_(o).map(function(m){return m instanceof Je?m:Tt(m)?new Je(m[0],m[1]):new Je(m)}).toString();break;case"DTSTART":t=kP(o,r.tzid);break;case"UNTIL":u=gi(o,!r.tzid);break;default:if(Tt(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var f=e.map(function(m){var _=m[0],g=m[1];return"".concat(_,"=").concat(g.toString())}).join(";"),p="";return f!==""&&(p="RRULE:".concat(f)),[t,p].filter(function(m){return!!m}).join( `
` )}function kP(r,e){return r?"DTSTART"+new ks(new Date(r),e).toString():""}function EP(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var B_=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Ju(t):gm(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,s=t?Object.keys(t):[],i=function(c){for(var f=0;f<s.length;f++){var p=s[f];if(!EP(t[p],c[p]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(Tt(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(s.length&&i(u))){n=u._value;break}}if(!n&&this.all){for(var l=new vn(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return Tt(n)?gm(n):n instanceof Date?Ju(n):n},r}();var $ _=q(q(q(q(q(q(q(q(q(q(q(q(q([],he(1,31),!0),he(2,28),!0),he(3,31),!0),he(4,30),!0),he(5,31),!0),he(6,30),!0),he(7,31),!0),he(8,31),!0),he(9,30),!0),he(10,31),!0),he(11,30),!0),he(12,31),!0),he(1,7),!0),H_=q(q(q(q(q(q(q(q(q(q(q(q(q([],he(1,31),!0),he(2,29),!0),he(3,31),!0),he(4,30),!0),he(5,31),!0),he(6,30),!0),he(7,31),!0),he(8,31),!0),he(9,30),!0),he(10,31),!0),he(11,30),!0),he(12,31),!0),he(1,7),!0),SP=br(1,29),OP=br(1,30),Hn=br(1,31),St=br(1,32),z_=q(q(q(q(q(q(q(q(q(q(q(q(q([],St,!0),OP,!0),St,!0),Hn,!0),St,!0),Hn,!0),St,!0),St,!0),Hn,!0),St,!0),Hn,!0),St,!0),St.slice(0,7),!0),V_=q(q(q(q(q(q(q(q(q(q(q(q(q([],St,!0),SP,!0),St,!0),Hn,!0),St,!0),Hn,!0),St,!0),St,!0),Hn,!0),St,!0),Hn,!0),St,!0),St.slice(0,7),!0),DP=br(-28,0),xP=br(-29,0),zn=br(-30,0),Ot=br(-31,0),K_=q(q(q(q(q(q(q(q(q(q(q(q(q([],Ot,!0),xP,!0),Ot,!0),zn,!0),Ot,!0),zn,!0),Ot,!0),Ot,!0),zn,!0),Ot,!0),zn,!0),Ot,!0),Ot.slice(0,7),!0),Q_=q(q(q(q(q(q(q(q(q(q(q(q(q([],Ot,!0),DP,!0),Ot,!0),zn,!0),Ot,!0),zn,!0),Ot,!0),Ot,!0),zn,!0),Ot,!0),zn,!0),Ot,!0),Ot.slice(0,7),!0),X_=[0,31,60,91,121,152,182,213,244,274,305,335,366],Z_=[0,31,59,90,120,151,181,212,243,273,304,334,365],_m=function(){for(var r=[],e=0;e<55;e++)r=r.concat(br(7));return r}();function J_(r,e){var t=Hr(r,1,1),n=hi(r)?366:365,s=hi(r+1)?366:365,i=lo(t),a=Tn(t),o=_t(_t({yearlen:n,nextyearlen:s,yearordinal:i,yearweekday:a},RP(r)),{wnomask:null});if(Zt(e.byweekno))return o;o.wnomask=he(0,n+7);var u,l,c=u=Et(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+Et(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),p=Et(l,7),m=Math.floor(f+p/4),_=0;_<e.byweekno.length;_++){var g=e.byweekno[_];if(g<0&&(g+=m+1),g>0&&g<=m){var E=void 0;g>1?(E=c+(g-1)*7,c!==u&&(E-=7-u)):E=c;for(var C=0;C<7&&(o.wnomask[E]=1,E++,o.wdaymask[E]!==e.wkst);C++);}}if(ge(e.byweekno,1)){var E=c+m*7;if(c!==u&&(E-=7-u),E<n)for(var _=0;_<7&&(o.wnomask[E]=1,E+=1,o.wdaymask[E]!==e.wkst);_++);}if(c){var R=void 0;if(ge(e.byweekno,-1))R=-1;else{var b=Tn(Hr(r-1,1,1)),z=Et(7-b.valueOf()+e.wkst,7),U=hi(r-1)?366:365,ne=void 0;z>=4?(z=0,ne=U+Et(b-e.wkst,7)):ne=n-c,R=Math.floor(52+Et(ne,7)/4)}if(ge(e.byweekno,R))for(var E=0;E<c;E++)o.wnomask[E]=1}return o}function RP(r){var e=hi(r)?366:365,t=Hr(r,1,1),n=Tn(t);return e===365?{mmask: $ _,mdaymask:V_,nmdaymask:Q_,wdaymask:_m.slice(n),mrange:Z_}:{mmask:H_,mdaymask:z_,nmdaymask:K_,wdaymask:_m.slice(n),mrange:X_}}function ev(r,e,t,n,s,i){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(i.freq===V.YEARLY)if(Zt(i.bymonth))o=[[0,t]];else for(var u=0;u<i.bymonth.length;u++)e=i.bymonth[u],o.push(n.slice(e-1,e+1));else i.freq===V.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(Zt(o))return a;a.nwdaymask=he(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],f=l[1]-1,p=0;p<i.bynweekday.length;p++){var m=void 0,_=i.bynweekday[p],g=_[0],E=_[1];E<0?(m=f+(E+1)*7,m-=Et(s[m]-g,7)):(m=c+(E-1)*7,m+=Et(7-s[m]+g,7)),c<=m&&m<=f&&(a.nwdaymask[m]=1)}return a}function tv(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),s=r%100,i=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*t+n-i-u+15)%30,c=Math.floor(s/4),f=s%4,p=Math.floor(32+2*a+2*c-l-f)%7,m=Math.floor((t+11*l
` ),n=0;n<t.length;){var s=t[n]=t[n].replace(/ \s + $ /g,"");s?n>0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function qP(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function ov(r,e){return qP(e),r.split(",").map(function(t){return co(t)})}function uv(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var s=e._rrule[n].origOptions[r];if(s)return s}}}var wm=function(r){yi(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=uv.apply(n,["dtstart"]),n.tzid=uv.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return iv(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){lv(t,this._rrule)},e.prototype.exrule=function(t){lv(t,this._exrule)},e.prototype.rdate=function(t){cv(t,this._rdate)},e.prototype.exdate=function(t){cv(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return tl(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return tl(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(yo({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split( `
` ))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split( `
` ).map(function(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(dv("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(dv("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join( `
` )},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(V);function lv(r,e){if(!(r instanceof V))throw new TypeError(String(r)+" is not RRule instance");ge(e.map(String),String(r))||e.push(r)}function cv(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");ge(e.map(Number),Number(r))||(e.push(r),_n(e))}function dv(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),i=e.map(function(a){return gi(a.valueOf(),n)}).join(",");return"".concat(s).concat(i)}function _r(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?1:!r.isValid()&&e.isValid()?-1:r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var mt=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:i,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=i,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let i=e.match(/^([a-zA-Z0-9, !]+?)( when done)? $ /i);if(i==null)return null;let a=i[1].trim(),o=i[2]!==void 0,u=V.parseText(a);if(u!==null){let l=null;s?l=window.moment(s):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 V(u);return new mt({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:s})}}catch(i){i instanceof Error&&console.log(i.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,s=null,i=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));s=window.moment(t),s.add(Math.round(a.asDays()),"days")}if(this.dueDate){let a=window.moment.duration(this.dueDate.diff(this.referenceDate));i=window.moment(t),i.add(Math.round(a.asDays()),"days")}}return{startDate:n,scheduledDate:s,dueDate:i}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||_r(this.startDate,e.startDate)!==0||_r(this.scheduledDate,e.scheduledDate)!==0||_r(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(e){return this.baseOnToday?this.nextReferenceDateFromToday(e).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new V(be(X({},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())),s=this.toText(),i=s.match(/every( \d +)? month(s)?(.*)?/);i!==null&&(s.includes(" on ")||(n=mt.nextAfterMonths(e,n,t,i[1])));let a=s.match(/every( \d +)? year(s)?(.*)?/);return a!==null&&(n=mt.nextAfterYears(e,n,t,a[1])),mt.addTimezone(n)}static nextAfterMonths(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));mt.isSkippingTooManyMonths(e,t,i);)t=mt.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let i=1;for(s!==void 0&&(i=Number.parseInt(s.trim(),10));mt.isSkippingTooManyYears(e,t,i);)t=mt.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new V(n),wind
` })),o=o.slice(0,a.autoSuggestMaxItems),o}}function Sm(r,e,t){let n= $ P(e.substring(0,t),[["(",")"],["[","]"]])=="("?")":"]",s=r?n+" ":" ",i=r&&e.length>t&&e.charAt(t)===n?1:0;return{postfix:s,insertSkip:i}}function jP(r,e,t,n,s){let i=f=>Object.values(n.prioritySymbols).some(p=>p.length>0&&f.includes(p)),a=[],{postfix:o,insertSkip:u}=Sm(s,r,e);if(r.includes(n.dueDateSymbol)||a.push({displayText: ` $ { n . dueDateSymbol } due date ` ,appendText: ` $ { n . dueDateSymbol } ` }),r.includes(n.startDateSymbol)||a.push({displayText: ` $ { n . startDateSymbol } start date ` ,appendText: ` $ { n . startDateSymbol } ` }),r.includes(n.scheduledDateSymbol)||a.push({displayText: ` $ { n . scheduledDateSymbol } scheduled date ` ,appendText: ` $ { n . scheduledDateSymbol } ` }),!i(r)){let f=n.prioritySymbols,p=["High","Medium","Low","Highest","Lowest"];for(let m=0;m<p.length;m++){let _=p[m],g=f[_];a.push({displayText:s? ` $ { g } priority ` : ` $ { g } $ { _ . toLowerCase ( ) } priority ` ,appendText: ` $ { g } $ { o } ` ,insertSkip:s?u:void 0})}}if(r.includes(n.recurrenceSymbol)||a.push({displayText: ` $ { n . recurrenceSymbol } recurring ( repeat ) ` ,appendText: ` $ { n . recurrenceSymbol } ` }),!r.includes(n.createdDateSymbol)){let p=Qt.parseDate("today",!0).format(Z.dateFormat);a.push({textToMatch: ` $ { n . createdDateSymbol } created ` ,displayText: ` $ { n . createdDateSymbol } created today ( $ { p } ) ` ,appendText: ` $ { n . createdDateSymbol } $ { p } ` +o,insertSkip:s?u:void 0})}let l=Om(r,/([a-zA-Z'_-]*)/g,e),c=[];if(l&&l.length>0){let f=l[0];if(f.length>=Math.max(1,t.autoSuggestMinMatch)){let p=a.filter(m=>(m.textToMatch||m.displayText).toLowerCase().includes(f.toLowerCase()));for(let m of p){let _=s&&(m.displayText.includes("priority")||m.displayText.includes("created"))?f.length+u:f.length;c.push({suggestionType:"match",displayText:m.displayText,appendText:m.appendText,insertAt:l.index,insertSkip:_})}}}return c.length===0&&t.autoSuggestMinMatch===0?a:c}function GP(r,e,t,n,s,i){let a=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],{postfix:o,insertSkip:u}=Sm(i,r,e),l=[],c=new RegExp( ` ( $ { n } ) \ \ s * ( [ 0 - 9 a - zA - Z ] * ) ` ,"ug"),f=Om(r,c,e);if(f&&f.length>=2){let p=f[1],m=f[2];if(m.length<t.autoSuggestMinMatch)return[];let _=m&&m.length>1?Qt.parseDate(bn(m),!0):null;_&&_.isValid()&&l.push({displayText: ` $ { _ . format ( Z . dateFormat ) } ` ,appendText: ` $ { p } $ { _ . format ( Z . dateFormat ) } ` ,insertAt:f.index,insertSkip:f[0].length});let g=1,E=a.filter(C=>m&&m.length>=g&&C.toLowerCase().includes(m.toLowerCase())).slice(0,s);E.length===0&&(E=a.slice(0,s));for(let C of E){let b= ` $ { Qt . parseDate ( C , ! 0 ) . format ( Z . dateFormat ) } ` ,z=i?f[0].length+u:f[0].length;l.push({suggestionType:"match",displayText: ` $ { C } ( $ { b } ) ` ,appendText: ` $ { p } $ { b } ` +o,insertAt:f.index,insertSkip:z})}}return l}function YP(r,e,t,n,s){var f;let i=["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}=Sm(s,r,e),u=[],l=new RegExp( ` ( $ { n } ) \ \ s * ( [ 0 - 9 a - zA - Z ] * ) ` ,"ug"),c=Om(r,l,e);if(c&&c.length>=2){let p=c[1],m=c[2];if(m.length<t.autoSuggestMinMatch)return[];if(m.length>0){let C=(f=mt.fromText({recurrenceRuleText:m,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:f.toText();if(C){let R= ` $ { p } $ { C } ` +a,b=s?c[0].length+o:c[0].length;if(u.push({suggestionType:"match",displayText: ` \u2705 $ { C } ` ,appendText:R,insertAt:c.index,insertSkip:b}),c[0]==R)return[]}}let _=1,g=t.autoSuggestMaxItems/2,E=i.filter(C=>m&&m.length>=_&&C.toLowerCase().includes(m.toLowerCase())).slice(0,g);E.length===0&&m.trim().length===0&&(E=i.slice(0,g));for(let C of E)u.push({suggestionType:"match",displayText: ` $ { C } ` ,appendText: ` $ { p } $ { C } ` ,insertAt:c.index,insertSkip:c[0].length})}return u}function Om(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s}function BP(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([s,i])=>[s,0])),n=Object.fromEntries(e.map(([s,i])=>[i,s]));for(let s of
\ ` \` \` ${ n }
flowchart LR
classDef TODO stroke : # f33 , stroke - width : 3 px ;
classDef DONE stroke : # 0 c0 , stroke - width : 3 px ;
classDef IN _PROGRESS stroke : # fa0 , stroke - width : 3 px ;
classDef CANCELLED stroke : # ddd , stroke - width : 3 px ;
classDef NON _TASK stroke : # 99 e , stroke - width : 3 px ;
$ { s . join ( `
` )}
$ { i . join ( `
` )}
linkStyle default stroke : gray
\ ` \` \`
` }addEdgeIfNotToInternal(e,t,n,s,i){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;i?l='-. " \u {1F501}" .-> ':l=" --> ";let c= ` $ { s + 1 } $ { l } $ { a + 1 } ` ;n.push(c)}}getMermaidNodeLabel(e,t){let n=Tv(e.name),s=e.type;if(t){let i=al(e.symbol),a=al(e.nextStatusSymbol),o= ` [ $ { i } ] - > [ $ { a } ] ` ,u= ` '${n}' ` ,l= ` ( $ { s } ) ` ;return ` [ "${u}<br>${o}<br>${l}" ] : : : $ { s } ` }else return ` [ "${n}" ] : : : $ { s } ` }};var _v=require("obsidian");var Qr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""? ` % % $ { this . sortOrder } % % $ { this . name } ` :""}};var ze=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(Z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(Z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Qr("Overdue",1):t.isSame(e,"day")?new Qr("Today",2):t.isValid()?new Qr("Future",3):new Qr("Invalid date",0):new Qr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Qr("",0);let t=this.fromNowOrder(e);return new Qr(e.fromNow(),t)}fromNowOrder(e){if(!e.isValid())return 0;let t=window.moment(),n=e.isSameOrBefore(t,"day"),s=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+s.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let s=e.fromNow(!0).split(" "),i,a=Number(s[0]);isNaN(a)?i=1:i=a;let o=s[1];return t?n.subtract(i,o):n.add(i,o)}postpone(e="days",t=1){if(!this._date)throw new _v.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 wi=class{constructor(e){this._path=e}get path(){return this._path}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 Sn=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 Sn.priorityNameUsingNone(e).replace("None","Normal")}};var VP=require("obsidian"),Ev=ua(kv());var Mm=class extends Ev.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let i in this.options.minLevels)t.startsWith(i)&&i.length>=s.length&&(n=this.options.minLevels[i],s=i);return new Cm(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)}},Ft=new Mm,Cm=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)<this.minLevel)return;let i={level:e,module:this.module,message:t,objects:
` ),o=a.length,u=new _o(()=>Dt.fromPath(s.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let p=f.position.start.line;if(p>=o)return this.logger.debug( ` $ { s . path } Obsidian gave us a line number $ { p } past the end of the file . $ { o } . ` ),i;if((l===null||l.position.end.line<p)&&(l=Ds.getSection(p,n.sections),c=0),l===null)continue;let m=a[p];if(m===void 0){this.logger.debug( ` $ { s . path } : line $ { p } - ignoring 'undefined' line . ` );continue}let _;try{_=oe.fromLine({line:m,taskLocation:new vt(s.path,p,l.position.start.line,c,Ds.getPrecedingHeader(p,n.headings)),fallbackDate:u.value})}catch(g){this.reportTaskParsingErrorToUser(g,s,f,m);continue}_!==null&&(c++,i.push(_))}return i}reportTaskParsingErrorToUser(e,t,n,s){let i= ` 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 . path }
Line number : $ { n . position . start . line }
Task line : $ { s }
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(i),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new ki.Notice(i,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 s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var th=require("obsidian");var kw=require("obsidian");function tr(){}function Im(r){return r()}function Sv(){return Object.create(null)}function vr(r){r.forEach(Im)}function dl(r){return typeof r=="function"}function fl(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Dv(r){return Object.keys(r).length===0}var xv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,wo=class{constructor(e){this.options=e,this._listeners="WeakMap"in xv?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 s of t)wo.entries.set(s.target,s),(n=this._listeners.get(s.target))===null||n===void 0||n(s)})}};wo.entries="WeakMap"in xv?new WeakMap:void 0;var Rv=!1;function KP(){Rv=!0}function QP(){Rv=!1}function D(r,e){r.appendChild(e)}function Ve(r,e,t){r.insertBefore(e,t||null)}function qe(r){r.parentNode&&r.parentNode.removeChild(r)}function xi(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function B(r){return document.createElement(r)}function XP(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Re(r){return document.createTextNode(r)}function K(){return Re(" ")}function Te(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Mv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function A(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Cv(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 ZP(r){return Array.from(r.childNodes)}function Dn(r,e){e=""+e,r.data!==e&&(r.data=e)}function et(r,e){r.value=e==null?"":e}function Fm(r,e,t){for(let n=0;n<r.options.length;n+=1){let s=r.options[n];if(s.__value===e){s.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function Av(r){let e=r.querySelector(":checked");return e&&e.__value}var ll;function JP(){if(ll===void 0){ll=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(r){ll=!0}}return ll}function Pv(r,e){getComputedStyle(r).position==="static"&&(r.style.position="relative");let n=B("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;let s=JP(),i;return s?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}< \/ script>",i=Te(window,"message",a=>{a.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{i=Te(n.contentWindow,"resize",e),e()}),D(r,n),()=>{(s||i&&n.contentWindow)&&i(),qe(n)}}function tt(r,e,t){r.classList[t?"add":"remove"](e)}var Xr=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=XP(t.nodeName):this.e=B(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;t<this.n.length;t+=1)Ve(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(qe)}};var ko;function vo(r){ko=r}function eN(){if(!ko)throw new Error("Function called outside component initialization");return ko}function Lm(r){eN(). $ $ .on_mount.push(r)}var Si=[];var Rs=[],Oi=[],Ov=[],tN=Promise.resolve(),Nm=!1;function rN()
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 .
` ;hl(c);return}let l=Math.min(Math.pow(10,i),100);o.debug( ` timeout = $ { l } ` ),setTimeout(()=>L(void 0,null,function*(){yield Gv({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:i+1})}),l)});try{let[l,c,f]=yield Yv(r,t),p=[...f.slice(0,l),...e.map(m=>m.toFileLineString()),...f.slice(l+1)];yield t.modify(c,p.join( `
` ))}catch(l){if(l instanceof Qn){l.message&&jv(l.message),yield u();return}else if(l instanceof gl){yield u();return}else l instanceof Error&&hl(l.message)}});function Yv(r,e){return L(this,null,function*(){if(Oo===void 0)throw new Qn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Do.TFile))throw new Qn( ` Tasks : No file found for task $ { r . description } . Retrying ... ` );if(!uN.includes(t.extension))throw new Error( ` Tasks : Does not support files with the $ { t . extension } file extension . ` );let n=Oo.getFileCache(t);if(n==null||n===null)throw new Qn( ` Tasks : No file cache found for file $ { t . path } . Retrying ... ` );let s=n.listItems;if(s===void 0||s.length===0)throw new Qn( ` Tasks : No list items found in file cache of $ { t . path } . Retrying ... ` );let a=(yield e.read(t)).split( `
` ),o=cN(r,a,s,lN);if(o===void 0)throw new gl;return[o,t,a]})}function Ym(r,e){return L(this,null,function*(){try{let[t,n,s]=yield Yv(r,e);return[t,n]}catch(t){t instanceof Qn?t.message&&jv(t.message):t instanceof Error&&hl(t.message)}})}function Bv(r,e){return r<e.length}function cN(r,e,t,n){let s=dN(r,e);return s!==void 0||(s=fN(r,e),s!==void 0)?s:pN(r,e,t,n)}function dN(r,e){let t=r.taskLocation.lineNumber;if(Bv(t,e)&&e[t]===r.originalMarkdown)return yl().debug( ` Found original markdown at original line number $ { t } ` ),t}function fN(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function pN(r,e,t,n){let s,i=0;for(let a of t){let o=a.position.start.line;if(!Bv(o,e))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=e[o];if(ye.getInstance().includedIn(u)){if(i===r.taskLocation.sectionIndex){if(u===r.originalMarkdown)s=o;else{n( ` Tasks : Unable to find task in file $ { r . taskLocation . path } .
Expected task :
$ { r . originalMarkdown }
Found task :
$ { u } ` );return}break}i++}}return s}var Cs=Math.min,Gt=Math.max,Ro=Math.round;var xn=r=>({x:r,y:r}),mN={left:"right",right:"left",bottom:"top",top:"bottom"},hN={start:"end",end:"start"};function Bm(r,e,t){return Gt(r,Cs(e,t))}function Mi(r,e){return typeof r=="function"?r(e):r}function Rn(r){return r.split("-")[0]}function Ci(r){return r.split("-")[1]}function $ m(r){return r==="x"?"y":"x"}function Hm(r){return r==="y"?"height":"width"}function Ai(r){return["top","bottom"].includes(Rn(r))?"y":"x"}function zm(r){return $ m(Ai(r))}function $ v(r,e,t){t===void 0&&(t=!1);let n=Ci(r),s=zm(r),i=Hm(s),a=s==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=xo(a)),[a,xo(a)]}function Hv(r){let e=xo(r);return[bl(r),e,bl(e)]}function bl(r){return r.replace(/start|end/g,e=>hN[e])}function gN(r,e,t){let n=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?s:n:e?n:s;case"left":case"right":return e?i:a;default:return[]}}function zv(r,e,t,n){let s=Ci(r),i=gN(Rn(r),t==="start",n);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(bl)))),i}function xo(r){return r.replace(/left|right|bottom|top/g,e=>mN[e])}function yN(r){return X({top:0,right:0,bottom:0,left:0},r)}function Vv(r){return typeof r!="number"?yN(r):{top:r,right:r,bottom:r,left:r}}function As(r){return be(X({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function Kv(r,e,t){let{reference:n,floating:s}=r,i=Ai(e),a=zm(e),o=Hm(a),u=Rn(e),l=i==="y",c=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,p=n[o]/2-s[o]/2,m;switch(u){case"top":m={x:c,y:n.y-s.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-s.width,y:f};break;default:m={x:n.x,y:n.y}}switch(Ci(e)){case"start":m[a]-=p*(t&&l?-1:1);break;case"end":m[a]+=p*(t&&l?-1:1);break}return m}var Qv=(r,e,t)=>L(void 0,null,function*(){let{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:a}=t,o=i.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(e),l=yield a.getElementRects({reference:r,floating:e,strategy:s}),{x:c,y:f}=Kv(l,n,u),p=n,m={},_=0;for(let g=0;g<o.length;g++){let{name:E,fn:C}=o[g],{x:R,y:b,data:z,reset:U}=yield C({x:c,y:f,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:l,platform:a,elements:{reference:r,floating:e}});if(c=R!=null?R:c,f=b!=null?b:f,m=be(X({},m),{[E]:X(X({},m[E]),z)}),U&&_<=50){_++,typeof U=="object"&&(U.placement&&(p=U.placement),U.rects&&(l=U.rects===!0?yield a.getElementRects({reference:r,floating:e,strategy:s}):U.rects),{x:c,y:f}=Kv(l,p,u)),g=-1;continue}}return{x:c,y:f,placement:p,strategy:s,middlewareData:m}});function Tl(r,e){return L(this,null,function*(){var t;e===void 0&&(e={});let{x:n,y:s,platform:i,rects:a,elements:o,strategy:u}=r,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Mi(e,r),_=Vv(m),E=o[p?f==="floating"?"reference":"floating":f],C=As(yield i.getClippingRect({element:(t=yield i.isElement==null?void 0:i.isElement(E))==null||t?E:E.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:l,rootBoundary:c,strategy:u})),R=f==="floating"?be(X({},a.floating),{x:n,y:s}):a.reference,b=yield i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating),z=(yield i.isElement==null?void 0:i.isElement(b))?(yield i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},U=As(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:R,offsetParent:b,strategy:u}):R);return{top:(C.top-U.top+_.top)/z.y,bottom:(U.bottom-C.bottom+_.bottom)/z.y,left:(C.left-U.left+_.left)/z.x,right:(U.right-C.right+_.right)/z.x}})}var Vm=function(r){return r===void 0&&(r={}),{name:"flip",options:r,fn(t){return L(this,null,function*(){var n,s;let{placement:i,middlewareData:a,rects:o,initialPlacement:u,platform:l,elements:c}=t,O=Mi(r,t),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:_="bestFit",fal
< span class = "accesskey-first" > future < / s p a n > d a t e s : ` , $ o = K ( ) , o r = B ( " i n p u t " ) , J = K ( ) , I e = B ( " h r " ) , F e = K ( ) , i t = B ( " d i v " ) , w t . c ( ) , I n = K ( ) , n a = B ( " h r " ) , q r = K ( ) , u n = B ( " d i v " ) , o s = B ( " l a b e l " ) , o s . i n n e r H T M L = ' S t a t < s p a n c l a s s = " a c c e s s k e y " > u < / s p a n > s ' , s a = K ( ) , k t = B ( " s e l e c t " ) ; f o r ( l e t j = 0 ; j < A t . l e n g t h ; j + = 1 ) A t [ j ] . c ( ) ; H o = K ( ) , G e = B ( " d i v " ) , Y e = B ( " l a b e l " ) , Y e . t e x t C o n t e n t = " C r e a t e d " , L n = K ( ) , u r = B ( " i n p u t " ) , M h = K ( ) , z s = B ( " c o d e " ) , C h = R e ( r [ 2 9 ] ) , A h = K ( ) , z o = n e w X r ( ! 1 ) , P h = K ( ) , V o = B ( " l a b e l " ) , V o . t e x t C o n t e n t = " D o n e " , N h = K ( ) , l r = B ( " i n p u t " ) , I h = K ( ) , V s = B ( " c o d e " ) , F h = R e ( r [ 3 0 ] ) , L h = K ( ) , K o = n e w X r ( ! 1 ) , U h = K ( ) , Q o = B ( " l a b e l " ) , Q o . t e x t C o n t e n t = " C a n c e l l e d " , W h = K ( ) , c r = B ( " i n p u t " ) , q h = K ( ) , K s = B ( " c o d e " ) , j h = R e ( r [ 2 8 ] ) , G h = K ( ) , X o = n e w X r ( ! 1 ) , Y h = K ( ) , Q s = B ( " d i v " ) , u s = B ( " b u t t o n " ) , B h = R e ( " A p p l y " ) , $ h = K ( ) , i a = B ( " b u t t o n " ) , i a . t e x t C o n t e n t = " C a n c e l " , A ( s , " f o r " , " d e s c r i p t i o n " ) , A ( a , " i d " , " d e s c r i p t i o n " ) , A ( a , " c l a s s " , " t a s k s - m o d a l - d e s c r i p t i o n " ) , A ( a , " p l a c e h o l d e r " , " T a k e o u t t h e t r a s h " ) , A ( a , " a c c e s s k e y " , o = r [ 2 3 ] ( " t " ) ) , A ( n , " c l a s s " , " t a s k s - m o d a l - s e c t i o n " ) , A ( c , " f o r " , p = " p r i o r i t y - " + r [ 3 ] . p r i o r i t y ) , A ( l , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - p r i o r i t i e s " ) , A ( E , " f o r " , " r e c u r r e n c e " ) , A ( E , " c l a s s " , " a c c e s s k e y - f i r s t " ) , A ( R , " i d " , " r e c u r r e n c e " ) , A ( R , " t y p e " , " t e x t " ) , A ( R , " c l a s s " , " i n p u t " ) , A ( R , " p l a c e h o l d e r " , " T r y ' e v e r y 2 w e e k s o n T h u r s d a y ' . " ) , A ( R , " a c c e s s k e y " , b = r [ 2 3 ] ( " r " ) ) , t t ( R , " t a s k s - m o d a l - e r r o r " , ! r [ 1 2 ] ) , Y . a = n u l l , A ( U , " c l a s s " , " r e s u l t s " ) , A ( g , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - d a t e s " ) , A ( O , " f o r " , " d u e " ) , A ( O , " c l a s s " , " a c c e s s k e y - f i r s t " ) , A ( P , " i d " , " d u e " ) , A ( P , " t y p e " , " t e x t " ) , A ( P , " c l a s s " , " i n p u t " ) , A ( P , " p l a c e h o l d e r " , I i ) , A ( P , " a c c e s s k e y " , Q = r [ 2 3 ] ( " d " ) ) , t t ( P , " t a s k s - m o d a l - e r r o r " , ! r [ 1 1 ] ) , w . a = n u l l , A ( h , " c l a s s " , " r e s u l t s " ) , A ( M , " f o r " , " s c h e d u l e d " ) , A ( M , " c l a s s " , " a c c e s s k e y - f i r s t " ) , A ( v , " i d " , " s c h e d u l e d " ) , A ( v , " t y p e " , " t e x t " ) , A ( v , " c l a s s " , " i n p u t " ) , A ( v , " p l a c e h o l d e r " , I i ) , A ( v , " a c c e s s k e y " , x = r [ 2 3 ] ( " s " ) ) , t t ( v , " t a s k s - m o d a l - e r r o r " , ! r [ 9 ] ) , D e . a = n u l l , A ( c e , " c l a s s " , " r e s u l t s " ) , A ( U r , " f o r " , " s t a r t " ) , A ( j e , " i d " , " s t a r t " ) , A ( j e , " t y p e " , " t e x t " ) , A ( j e , " c l a s s " , " i n p u t " ) , A ( j e , " p l a c e h o l d e r " , I i ) , A ( j e , " a c c e s s k e y " , W r = r [ 2 3 ] ( " a " ) ) , t t ( j e , " t a s k s - m o d a l - e r r o r " , ! r [ 7 ] ) , B s . a = n u l l , A ( W e , " c l a s s " , " r e s u l t s " ) , A ( $ s , " f o r " , " f o r w a r d O n l y " ) , A ( o r , " i d " , " f o r w a r d O n l y " ) , A ( o r , " t y p e " , " c h e c k b o x " ) , A ( o r , " c l a s s " , " i n p u t t a s k - l i s t - i t e m - c h e c k b o x t a s k s - m o d a l - c h e c k b o x " ) , A ( o r , " a c c e s s k e y " , H s = r [ 2 3 ] ( " f " ) ) , A ( I , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - d a t e s " ) , A ( i t , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - d a t e s " ) , A ( o s , " f o r " , " s t a t u s " ) , A ( k t , " i d " , " s t a t u s - t y p e " ) , A ( k t , " c l a s s " , " d r o p d o w n " ) , A ( k t , " a c c e s s k e y " , F n = r [ 2 3 ] ( " u " ) ) , r [ 1 8 ] = = = v o i d 0 & & M s ( ( ) = > r [ 5 0 ] . c a l l ( k t ) ) , A ( u n , " c l a s s " , " t a s k s - m o d a l - s e c t i o n " ) , A ( Y e , " f o r " , " c r e a t e d " ) , A ( u r , " i d " , " c r e a t e d " ) , A ( u r , " t y p e " , " t e x t " ) , A ( u r , " c l a s s " , " i n p u t " ) , A ( u r , " p l a c e h o l d e r " , I i ) , t t ( u r , " t a s k s - m o d a l - e r r o r " , ! r [ 5 ] ) , z o . a = n u l l , A ( z s , " c l a s s " , " r e s u l t s " ) , A ( V o , " f o r " , " d o n e " ) , A ( l r , " i d " , " d o n e " ) , A ( l r , " t y p e " , " t e x t " ) , A ( l r , " c l a s s " , " i n p u t " ) , A ( l r , " p l a c e h o l d e r " , I i ) , t t ( l r , " t a s k s - m o d a l - e r r o r " , ! r [ 1 4 ] ) , K o . a = n u l l , A ( V s , " c l a s s " , " r e s u l t s " ) , A ( Q o , " f o r " , " c a n c e l l e d " ) , A ( c r , " i d " , " c a n c e l l e d " ) , A ( c r , " t y p e " , " t e x t " ) , A ( c r , " c l a s s " , " i n p u t " ) , A ( c r , " p l a c e h o l d e r " , I i ) , t t ( c r , " t a s k s - m o d a l - e r r o r " , ! r [ 1 6 ] ) , X o . a = n u l l , A ( K s , " c l a s s " , " r e s u l t s " ) , A ( G e , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - d a t e s " ) , u s . d i s a b l e d = Z o = ! r [ 2 1 ] , A ( u s , " t y p e " , " s u b m i t " ) , A ( u s , " c l a s s " , " m o d - c t a " ) , A ( i a , " t y p e " , " b u t t o n " ) , A ( Q s , " c l a s s " , " t a s k s - m o d a l - s e c t i o n t a s k s - m o d a l - b u t t o n s " ) , t t ( t , " w i t h - a c c e s s k e y s " , r [ 1 7 ] ) , A ( e , " c l a s s " , " t a s k s - m o d a l " ) } , m ( j , s e ) { V e ( j , e , s e ) , D ( e , t ) , D ( t , n ) , D ( n , s ) , D ( n , i ) , D ( n , a ) , e t ( a , r [ 3 ] . d e s c r i p t i o n ) , r [ 4 2 ] ( a ) , D ( t , u ) , D ( t , l ) , D ( l , c ) , D ( c , f ) , D ( l , m ) ; f o r ( l e t H t = 0 ; H t < C t . l e n g t h ; H t + = 1 ) C t [ H t ] & & C t [ H t ] . m ( l , n u l l ) ; D ( t , _ ) , D ( t , g ) , D ( g , E ) , D ( g , C ) , D ( g , R ) , e t ( R , r [ 3 ] . r e c u r r e n c e R u l e ) , D ( g , z ) , D ( g , U ) , D ( U , n e ) , D ( U , G ) , Y . m ( r [ 2 0 ] , U ) , D ( t , t e ) , D ( t , _ e ) , D ( t , W ) , D ( t , I ) , D ( I , O ) , D ( I , $ ) , D ( I , P ) , e t ( P , r [ 3 ] . d u e D a t e ) , D ( I , d ) , D ( I , h ) , D ( h , y ) , D ( h , T ) , w . m ( r [ 1 0 ] , h ) , D ( I , S ) , D ( I , M ) , D ( I , N ) , D ( I , v ) , e t ( v , r [ 3 ] . s c h e d u l e d D a t e ) , D ( I , F ) , D ( I , c e ) , D ( c e , u e ) , D ( c e , d e ) , D e . m ( r [ 8 ] , c e ) , D ( I , K e ) , D ( I , U r ) , D ( I , o n ) , D ( I , j e ) , e t ( j e , r [ 3 ] . s t a r t D a t e ) , D ( I , U t ) , D ( I , W e ) , D ( W e , G o ) , D ( W e , Y o ) , B s . m ( r [ 6 ] , W e ) , D ( I , B o ) , D ( I , a s ) , D ( a s , $ s ) , D ( a s , $ o ) , D ( a s , o r ) , o r . c h e c k e d = r [ 3 ] . f o r w a r d O n l y , D ( t , J ) , D ( t , I e ) , D ( t , F e ) , D ( t , i t ) , U n [ a t ] . m ( i t , n u l l ) , D ( t , I n ) , D ( t , n a ) , D ( t , q r ) , D ( t , u n ) , D ( u n , o s ) , D ( u n , s a ) , D ( u n , k t ) ; f o r ( l e t H t = 0 ; H t < A t . l e n g t h ; H t + = 1 ) A t [ H t ] & & A t
` );e.setLine(o,_)};new Xn({app:n,task:l,onSubmit:c,allTasks:s}).open()};var rh=require("obsidian");var Sw=(r,e,t)=>{var u;if(r)return t instanceof rh.MarkdownView;if(!(t instanceof rh.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let s=e.getCursor(),i=s.line,a=e.getLine(i),o=BN(a,n);e.setLine(i,o.text),e.setCursor( $ N(s,o))},BN=(r,e)=>{let t=oe.fromLine({line:r,taskLocation:vt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString());return{text:n.join( `
` ),moveTo:{line:n.length-1}}}else{let n=r.match(Z.taskRegex);if(n!==null){let s=n[3],a=Oe.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(Z.taskRegex, ` $1 - [ $ { a } ] $4 ` )}}else if(Z.listItemRegex.test(r)){let s=r.replace(Z.listItemRegex," $ 1 $ 2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(Z.indentationRegex," $ 1- ");return{text:s,moveTo:{ch:s.length}}}}}, $ N=(r,e)=>{var i;let t={line:0,ch:r.ch},n=X(X({},t),(i=e.moveTo)!=null?i:{}),s=e.text.split( `
` )[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var Ol=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>Ew(t,n,s,this.app,this.plugin.getTasks())}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Sw})}};var Zn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};function Is(r,e){let t= ` Error : $ { r } .
The error message was :
` ,n="";return e instanceof Error?n+=e:n+="Unknown error", ` $ { t } "${n}" ` }var HN=Object.prototype.toString,Li=Array.isArray||function(e){return HN.call(e)==="[object Array]"};function sh(r){return typeof r=="function"}function zN(r){return Li(r)?"array":typeof r}function nh(r){return r.replace(/[ \- \[ \] {}()*+?., \\ \^ $ |# \s ]/g," \\ $ &")}function Ow(r,e){return r!=null&&typeof r=="object"&&e in r}function VN(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var KN=RegExp.prototype.test;function QN(r,e){return KN.call(r,e)}var XN=/ \S /;function ZN(r){return!QN(XN,r)}var JN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"," ` ":" & # x60 ; "," = ":" & # x3D ; "};function eI(r){return String(r).replace(/[&<>" ' ` = \/ ]/g,function(t){return JN[t]})}var tI=/ \s */,rI=/ \s +/,Dw=/ \s *=/,nI=/ \s * \} /,sI=/#| \^ | \/ |>| \{ |&|=|!/;function iI(r,e){if(!r)return[];var t=!1,n=[],s=[],i=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;i.length;)delete s[i.pop()];else i=[];a=!1,o=!1}var f,p,m;function _(Y){if(typeof Y=="string"&&(Y=Y.split(rI,2)),!Li(Y)||Y.length!==2)throw new Error("Invalid tags: "+Y);f=new RegExp(nh(Y[0])+" \\ s*"),p=new RegExp(" \\ s*"+nh(Y[1])),m=new RegExp(" \\ s*"+nh("}"+Y[1]))}_(e||wr.tags);for(var g=new No(r),E,C,R,b,z,U;!g.eos();){if(E=g.pos,R=g.scanUntil(f),R)for(var ne=0,G=R.length;ne<G;++ne)b=R.charAt(ne),ZN(b)?(i.push(s.length),u+=b):(o=!0,t=!0,u+=" "),s.push(["text",b,E,E+1]),E+=1,b=== `
` &&(c(),u="",l=0,t=!1);if(!g.scan(f))break;if(a=!0,C=g.scan(sI)||"name",g.scan(tI),C==="="?(R=g.scanUntil(Dw),g.scan(Dw),g.scanUntil(p)):C==="{"?(R=g.scanUntil(m),g.scan(nI),g.scanUntil(p),C="&"):R=g.scanUntil(p),!g.scan(p))throw new Error("Unclosed tag at "+g.pos);if(C==">"?z=[C,R,E,g.pos,u,l,t]:z=[C,R,E,g.pos],l++,s.push(z),C==="#"||C==="^")n.push(z);else if(C==="/"){if(U=n.pop(),!U)throw new Error('Unopened section "'+R+'" at '+E);if(U[1]!==R)throw new Error('Unclosed section "'+U[1]+'" at '+E)}else C==="name"||C==="{"||C==="&"?o=!0:C==="="&&_(R)}if(c(),U=n.pop(),U)throw new Error('Unclosed section "'+U[1]+'" at '+g.pos);return oI(aI(s))}function aI(r){for(var e=[],t,n,s=0,i=r.length;s<i;++s)t=r[s],t&&(t[0]==="text"&&n&&n[0]==="text"?(n[1]+=t[1],n[3]=t[3]):(e.push(t),n=t));return e}function oI(r){for(var e=[],t=e,n=[],s,i,a=0,o=r.length;a<o;++a)switch(s=r[a],s[0]){case"#":case"^":t.push(s),n.push(s),t=s[4]=[];break;case"/":i=n.pop(),i[5]=s[2],t=n.length>0?n[n.length-1][4]:e;break;default:t.push(s)}return e}function No(r){this.string=r,this.tail=r,this.pos=0}No.prototype.eos=function(){return this.tail===""};No.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};No.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 Fi(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Fi.prototype.push=function(e){return new Fi(e,this)};Fi.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var s=this,i,a,o,u=!1;s;){if(e.indexOf(".")>0)for(i=s.view,a=e.split("."),o=0;i!=null&&o<a.length;)o===a.length-1&&(u=Ow(i,a[o])||VN(i,a[o])),i=i[a[o++]];else i=s.view[e],u=Ow(s.view,e);if(u){n=i;break}s=s.parent}t[e]=n}return sh(n)&&(n=n.call(this.view)),n};function Lt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Lt.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};Lt.prototype.parse=function(e,t){var n=this.templateCache,s=e+":"+(t||wr.tags).join(":"),i=typeof n!="undefined",a=i?n.get(s):void 0;return a==null&&(a=iI(e,t),i&&n.set(s,a)),a};Lt.prototype.render=function(e,t,n,s){var i=this.getConfigTags(s),a=this.parse(e,i),o=t instanceof Fi?t:new Fi(t,void 0);return this.renderTokens(a,o,n,e,s)};Lt.prototype.renderTokens=function(e,t,n,s,i){for(var a="",o,u,l,c=0,f=e.length;c<f;++c)l=void 0,o=e[c],u=o[0],u==="#"?l=this.renderSection(o,t,n,s,i):u==="^"?l=this.renderInverted(o,t,n,s,i):u===">"?l=this.renderPartial(o,t,n,i):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,i):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Lt.prototype.renderSection=function(e,t,n,s,i){var a=this,o="",u=t.lookup(e[1]);function l(p){return a.render(p,t,n,i)}if(!!u){if(Li(u))for(var c=0,f=u.length;c<f;++c)o+=this.renderTokens(e[4],t.push(u[c]),n,s,i);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(e[4],t.push(u),n,s,i);else if(sh(u)){if(typeof s!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(t.view,s.slice(e[3],e[5]),l),u!=null&&(o+=u)}else o+=this.renderTokens(e[4],t,n,s,i);return o}};Lt.prototype.renderInverted=function(e,t,n,s,i){var a=t.lookup(e[1]);if(!a||Li(a)&&a.length===0)return this.renderTokens(e[4],t,n,s,i)};Lt.prototype.indentPartial=function(e,t,n){for(var s=t.replace(/[^ \t ]/g,""),i=e.split( `
` ),a=0;a<i.length;a++)i[a].length&&(a>0||!n)&&(i[a]=s+i[a]);return i.join( `
` )};Lt.prototype.renderPartial=function(e,t,n,s){if(!!n){var i=this.getConfigTags(s),a=sh(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 f=this.parse(c,i);return this.renderTokens(f,t,n,c,s)}}};Lt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Lt.prototype.escapedValue=function(e,t,n){var s=this.getConfigEscape(n)||wr.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&s===wr.escape?String(i):s(i)};Lt.prototype.rawValue=function(e){return e[1]};Lt.prototype.getConfigTags=function(e){return Li(e)?e:e&&typeof e=="object"?e.tags:void 0};Lt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Li(e))return e.escape};var wr={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){Po.templateCache=r},get templateCache(){return Po.templateCache}},Po=new Lt;wr.clearCache=function(){return Po.clearCache()};wr.parse=function(e,t){return Po.parse(e,t)};wr.render=function(e,t,n,s){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+zN(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Po.render(e,t,n,s)};wr.escape=eI;wr.Scanner=No;wr.Context=Fi;wr.Writer=Lt;var ih=wr;var Aw=ua(Cw());function Pw(r,e){ih.escape=function(t){return t};try{return ih.render(r,(0,Aw.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 Nw(r){return oh(r,[])}function oh(r,e){return{query:{file:new wi(r),allTasks:e}}}var Ui=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 s=0;s<t;s++)n+=this.indentation+e.grouping[s].instruction+ `
` ;return n}explainSorters(e){let t=e.sorting.length;if(t===0)return this.indent( ` No sorting instructions supplied .
` );let n="";for(let s=0;s<t;s++)n+=this.indentation+e.sorting[s].instruction+ `
` ;return n}explainQueryLimits(e){function t(s){let i= ` At most $ { s } task ` ;return s!==1&&(i+="s"),i}let n=[];if(e.limit!==void 0){let s=t(e.limit)+ ` .
` ;n.push(this.indent(s))}if(e.taskGroupLimit!==void 0){let s=t(e.taskGroupLimit)+ ` per group ( if any "group by" options are supplied ) .
` ;n.push(this.indent(s))}return n.join( `
` )}explainDebugSettings(){let e="",{debugSettings:t}=ee();return t.ignoreSortInstructions&&(e+=this.indent( ` NOTE : All sort instructions , including default sort order , are disabled , due to 'ignoreSortInstructions' setting .
` )),e}indent(e){return this.indentation+e}};var Me=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Me("None of",e,"NOT")}static booleanXor(e){return new Me("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+= ` ( $ { this . description } ) ` ),t+=":");let n=e+" ";for(let s=0;s<this.children.length;s++)t+= `
$ { this . children [ s ] . asString ( n ) } ` ;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let s=t[0],i=t[1];if(s.symbol===n&&i.symbol==="")return s.children.push(i),s}return new Me(e,t,n)}};var Wi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var qi=class extends Wi{constructor(t){super();this.stringToFind=t}matches(t){return qi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Me(t)}};var Jn=class extends Wi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^ \/ (.+) \/ ([^/]*) $ /,s=t.match(n);if(s!==null){let i=new RegExp(s[1],s[2]);return new Jn(i)}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 :
/ p a t t e r n / f l a g s
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 s=uI(t,"using regex: ",this.regexAsString());return new Me(s)}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 s=2,i=((o=n.index)!=null?o:s)-s;return ` $ { e . padEnd ( i ) } $ { t } ` }var Nr=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.comparator=Nr.maybeReverse(s,n)}static maybeReverse(e,t){return e?Nr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n,s)=>e(t,n,s)*-1}};var es=class{constructor(e,t,n,s){this.instruction=e,this.property=t,this.grouper=n,this.reverse=s}};var ke=class{canCreateFilterForLine(e){return ke.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 rl(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.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 Nr(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=ke.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 es(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var xt=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction? ` $ { e } $ { this . instruction }
` : ` $ { e } $ { this . instruction } =>
$ { t . asString ( e + " " ) }
` }};var en=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 en(e);return n._queryComponent=t,n}static fromError(e,t){let n=new en(e);return n._error=t,n}};var re=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 re(en.fromObject(e.instruction,e))}static fromError(e,t){return new re(en.fromError(e,t))}};var Pe=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return re.fromError(e, ` do not understand query filter ( $ { this . fieldName ( ) } ) ` );let n=t[1].toLowerCase(),s=t[2],i=null;if(n.includes("include"))i=new qi(s);else if(n.includes("regex")){try{i=Jn.validateAndConstruct(s)}catch(u){let l=Is("Parsing regular expression",u)+ `
$ { Jn . helpMessage ( ) } ` ;return re.fromError(e,l)}if(i===null)return re.fromError(e, ` Invalid instruction : '${e}'
$ { Jn . helpMessage ( ) } ` )}if(i===null)return re.fromError(e, ` do not understand query filter ( $ { this . fieldName ( ) } ) ` );let a=n.match(/not/)!==null,o=new xt(e,this.getFilter(i,a),i.explanation(e));return re.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 s=e.matches(this.value(n));return t?!s:s}}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 Fs=class extends Pe{fieldName(){return"description"}value(e){return ye.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Fs.cleanDescription(e.description),s=Fs.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=ye.getInstance().removeAsSubstringFrom(e);let t=/^ \[ \[ ?([^ \] ]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^ \* \* ([^*]+) \* \* /),e=this.replaceFormatting(e,/^ \* ([^*]+) \* /),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Dl=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return ` Instruction contains unexpanded template text : "${e}" - and cannot be interpreted .
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 xl=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?re.fromFilter(new xt(e,this._filter,new Me(e))):re.fromError(e, ` do not understand filter : $ { e } ` )}};var Bt=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new xl(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 re.fromError(e, ` do not understand filter : $ { e } ` )}};var ht=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Bt,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 s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var p;let n=this.checkForUnexpandedTemplateText(t);if(n)return re.fromError(t,n);let s=this.filterInstructions.createFilterOrErrorMessage(t);if(s.isValid())return s;let i=ke.getMatch(this.filterRegExp(),t);if(i===null)return re.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=i[1],o=(p=i[2])==null?void 0:p.toLowerCase(),u=i[3],l=Qt.parseDateRange(u);if(!l.isValid()){let m=Qt.parseDate(a);m.isValid()&&(l=new Nt(m,m))}if(!l.isValid())return re.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=ht.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return re.fromFilter(new xt(t,c,f))}buildFilterFunction(t,n){let s;switch(t){case"before":s=i=>i?i.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":s=i=>i?i.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":s=i=>i?i.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":s=i=>i?i.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:s=i=>i?i.isSameOrAfter(n.start)&&i.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(s)}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,s,i){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=i.start.format(o);break;case"after":case"on or before":u=i.end.format(o);break;case"in or before":a="on or before",u=i.end.format(o);break;case"in or after":a="on or after",u=i.start.format(o);break;default:if(!i.start.isSame(i.end)){let c= ` $ { t } date is between : ` ,f=[new Me( ` $ { i . start . format ( o ) } and ` ),new Me( ` $ { i . end . format ( o ) } inclusive ` )];return s&&f.push(new Me( ` OR no $ { t } date ` )),new Me(c,f)}a="on",u=i.start.format(o);break}let l= ` $ { t } date is $ { a } $ { u } ` ;return s&&(l+= ` OR no $ { t } date ` ),new Me(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>_r(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new Dl().findUnexpandedDateText(t)}};var Rl=class extends ht{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Ml=class extends ht{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var ji=class extends ht{fieldName(){return"due"}date(e){return e.dueDate}filter
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 re.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=an.groupName(e),s=an.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[an.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Vl=class extends Pe{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 Kl=class extends Pe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Ql=class extends Pe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Pe.escapeMarkdownCharacters(this.value(e))]}};var Xl=class extends Pe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return re.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 Zl=class extends ht{fieldName(){return"cancelled"}date(e){return e.cancelledDate}filterResultIfFieldMissing(){return!1}};var Jl=class extends tn{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 ec=class extends Pe{constructor(){super();this.filterInstructions=new Bt;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 tc=class extends ke{constructor(){super();this.filterInstructions=new Bt;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:re.fromError(t,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var wh=[()=>new zl,()=>new an,()=>new ts,()=>new Ul,()=>new Ls,()=>new Ll,()=>new Zl,()=>new Rl,()=>new Fl,()=>new Il,()=>new ji,()=>new Ml,()=>new Gi,()=>new Kl,()=>new Ql,()=>new Xl,()=>new Fs,()=>new Us,()=>new Nl,()=>new Cl,()=>new Hl,()=>new Qi,()=>new Vl,()=>new Pl,()=>new ec,()=>new tc,()=>new Jl,()=>new Bl];function $ l(r){for(let e of wh){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Qw(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of wh){let s=t().createSorterFromLine(r);if(s)return s}return null}function Xw(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of wh){let s=t().createGrouperFromLine(r);if(s)return s}return null}var rc=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var nc=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let s=e.keys().next().value.length;for(let i=0;i<s;i++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let s=e[n];if(s!=this.la
` ;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 Xi=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new ac(e,t,n).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}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 s=n.reverse?" reverse":"";e+= ` - $ { n . property } $ { s }
` }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 s=new oc(t,n);this.addTaskGroup(s)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let s=t.groups,i=n.groups;for(let a=0;a<s.length;a++){let o=this._groupers[a],u=s[a].localeCompare(i[a],void 0,{numeric:!0});if(u!==0)return o.reverse?-u:u}return 0};this._groups.sort(e)}setGroupsHeadings(e){let t=new nc(e,this._groupers);for(let n of this._groups)n.setGroupHeadings(t.getHeadingsForTaskGroup(n.groups))}applyTaskLimit(e){this._groupers.length!==0&&(this._groups.forEach(t=>{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 rs=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new rs(void 0,e)}queryContext(){return this.queryPath?oh(this.queryPath,this.allTasks):void 0}};function Zw(r){return ` task$ { r !== 1 ? "s" : "" } ` }var js=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 } $ { Zw ( e ) } ` : ` $ { e } of $ { t } $ { Zw ( t ) } ` }get groups(){return this.taskGroups.groups}static fromError(e){let t=new js(new Xi([],[],rs.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function Jw(r){return r.endsWith(" \\ ")}function ek(r){return r.endsWith(" \\ \\ ")}function WI(r){return r.replace(/^[ \t ]*/,"")}function qI(r){return r.replace(/[ \t ]* \\ $ /,"")}function jI(r,e){let t=r;return e&&(t=WI(r)),ek(t)?t=t.slice(0,-1):Jw(r)&&(t=qI(t)),t}function GI(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function YI(r){let e=[],t=!1;for(let n of r.split( `
` )){let s=jI(n,t);GI(e,t,s),ek(n)?t=!1:t=Jw(n)}return e.join( `
` )}function tk(r){return YI(r).split( `
` ).map(e=>e.trim()).filter(e=>e!=="")}var Zi=class{static by(e,t,n){let s=this.defaultSorters().map(a=>a.comparator),i=[];for(let a of e)i.push(a.comparator);return t.sort(Zi.makeCompositeComparator([...i,...s],n))}static defaultSorters(){return[new an().createNormalSorter(),new Qi().createNormalSorter(),new ji().createNormalSorter(),new Ls().createNormalSorter(),new Gi().createNormalSorter()]}static makeCompositeComparator(e,t){return(n,s)=>{for(let i of e){let a=i(n,s,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 Vr;this._queryLayoutOptions=new Zn;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=Ft.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 ( ) } ` ),tk(e).forEach(n=>{let s=this.expandPlaceholders(n,t);if(this.error===void 0)try{this.parseLine(s)}catch(i){let a;i instanceof Error?a=i.message:a="Unknown error",this.setError(a,s);return}})}parseLine(e){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):break;default:this.setError("do not understand query",e)}}formatQueryForLogging(){return ` [ $ { this . source . split ( `
` ).join(" ; ")}] ` } expandPlaceholders ( e , t ) { if ( e . includes ( "{{" ) && e . 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 :
$ { e } ` ,e;let n=e;if(t){let s=Nw(t);try{n=Pw(e,s)}catch(i){return i instanceof Error?this._error=i.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Pn( ` $ { this . source }
$ { e . source } ` ,this.filePath)}explainQuery(){return new Ui().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error= ` $ { e }
Problem line : "${t}" ` }get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug( ` Executing query : $ { this . formatQueryForLogging ( ) } ` );let t=new rs(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=ee(),s=n.ignoreSortInstructions?e:Zi.by(this.sorting,e,t),i=s.slice(0,this.limit),a=new Xi(this.grouping,i,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new js(a,s.length)}catch(n){let s="Search failed";return js.fromError(Is(s,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",e)}}}parseFilter(e){var n;let t= $ l(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=Qw(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Xw(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 ns=class{constructor(e=ns.empty){this._source=e}static getInstance(){return ns.instance||(ns.instance=new ns),ns.instance}set(e){this._source=e}query(e=void 0){return new Pn(this._source,e)}hasInstructions(){return this._source.trim()!==ns.empty}},Er=ns;Er.empty="";var uc=class{constructor({obsidianEvents:e}){this.logger=Ft.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 ik=require("obsidian");var sk=require("obsidian");var kh=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 rk(r){let e=[],
` );if(m===void 0)return!1;let _=null;for(let E=0;E<m.length;E=E+1)if(m[E]!==""){_=m[E];break}return _===null?!1:ye.getInstance().includedIn(_)});if(s.length===0)return;let i=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split( `
` ),u=0,l=[];for(let p=a.lineStart;p<=a.lineEnd;p++){let m=o[p];if(m===void 0)continue;let _=null,g=oe.fromLine({line:m,taskLocation:new vt(i,p,a.lineStart,u,_),fallbackDate:null});g!==null&&(l.push(g),u++)}let c=new ss({obsidianComponent:n,parentUlElement:e,taskLayoutOptions:new Vr,queryLayoutOptions:new Zn});for(let p=0;p<s.length;p++){let m=l[p],_=s[p];if(m===void 0||_===void 0)continue;let g=(f=_.getAttr("data-line"))!=null?f:"0",E=Number.parseInt(g,10),C=yield c.renderTaskLine(m,E),R=_.childNodes;for(let U=0;U<R.length;U=U+1){let ne=R[U];ne.nodeName.toLowerCase()==="div"?C.prepend(ne):ne.nodeName.toLowerCase()==="ul"&&C.append(ne)}let b=_.querySelectorAll("[data-footnote-id]"),z=C.querySelectorAll("[data-footnote-id]");if(b.length===z.length)for(let U=0;U<b.length;U++)z[U].replaceWith(b[U]);_.replaceWith(C)}})}};var ak=require("@codemirror/view"),ok=require("obsidian");var uk=()=>ak.ViewPlugin.fromClass(Sh),Sh=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 p= ` 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(p),new ok.Notice(p,45e3)}return!1}let{state:s}=this.view,i=this.view.posAtDOM(t),a=s.doc.lineAt(i),o=oe.fromLine({line:a.text,taskLocation:vt.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(p=>p.toFileLineString()).join(s.lineBreak),c=s.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var ta=require("obsidian");function qo(r,e,t){e&&r.push( $ I(t))}function $ I(r){return ` tasks - layout - hide - $ { r } ` }var fc=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new Zn}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,s]of t)qo(e,n,s);return this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode"),e}};function lk(r,e,t,n=void 0){let s="";e.isEmpty()||(s+= ` Only tasks containing the global filter '${e.get()}' .
` );let i=new Ui(" "),a=new Pn(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);s+= ` Explanation of the global query :
$ { i . explainQuery ( o ) }
` }return s+= ` Explanation of this Tasks code block query :
$ { i . explainQuery ( a ) } ` ,s}function pc(r,e,t){let n=new Pn(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function ck(r){for(let t of oe.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 mc(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Oh(r,e,t,n){let s=r[e];return fk(s,r,e,t,n)}function dk(r,e,t,n){let s=window.moment();return fk(s,r,e,t,n)}function fk(r,e,t,n,s){let i=new ze(r).postpone(n,s),a=Dt.removeInferredStatusIfNeeded(e,[new oe(be(X({},e),{[t]:i}))])[0];return{postponedDate:i,postponedTask:a}}function pk(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return ` Task ' s $ { e } changed to $ { t } ` }function mk(r,e,t){return ` \u2139\uFE0F $ { Dh ( r , e , t ) } ( right - click for more options ) ` }function HI(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Dh(r,e,t){let n=mc(r),s=r[n];return gk(n,s,e,t)}function hk(r,e,t){let n=mc(r),s=window.moment().startOf("day");return gk(n,s,e,t)}function gk(r,e,t,n){let i=new ze(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")? ` $ { HI ( r . replace ( "Date" , "" ) ) } in $ { a } $ { n } , on $ { i } ` .replace(" in 0 days"," today").replace("in a day","tomorrow"): ` Postpone $ { r . replace ( "Date" , " date" ) } by $ { a } $ { n } , to $ { i } ` }var hc=class{constructor(e){e?this.taskLayoutOptions=e:this.taskLayoutOptions=new Vr}generateHiddenClasses(){let e=[];return this.taskLayoutOptions.toggleableComponents.forEach(t=>{qo(e,!this.taskLayoutOptions.isShown(t),t)}),qo(e,!this.taskLayoutOptions.areTagsShown(),"tags"),e}};var xh=require("obsidian");var is=class extends Ji{constructor(e,t,n=Uo){super(n);let s=(l,c,f,p,m,_)=>{let g=m(t,p,f);c.setTitle(g).onClick(()=>is.postponeOnClickCallback(l,t,p,f,_,n))},i=hk,a=dk;this.addItem(l=>s(e,l,"days",0,i,a)),this.addItem(l=>s(e,l,"day",1,i,a)),this.addSeparator();let o=Dh,u=Oh;this.addItem(l=>s(e,l,"days",2,o,u)),this.addItem(l=>s(e,l,"days",3,o,u)),this.addItem(l=>s(e,l,"days",4,o,u)),this.addItem(l=>s(e,l,"days",5,o,u)),this.addItem(l=>s(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>s(e,l,"week",1,o,u)),this.addItem(l=>s(e,l,"weeks",2,o,u)),this.addItem(l=>s(e,l,"weeks",3,o,u)),this.addItem(l=>s(e,l,"month",1,o,u))}static postponeOnClickCallback(o,u,l,c){return L(this,arguments,function*(e,t,n,s,i=Oh,a=Uo){let f=mc(t);if(f===null){let _=" \u 26A0 \u FE0F Postponement requires a date: due, scheduled or start.";return new xh.Notice(_,1e4)}let{postponedDate:p,postponedTask:m}=i(t,f,s,n);yield a(t,m),is.postponeSuccessCallback(e,f,p)})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let s=pk(n,t);new xh.Notice(s,2e3)}};var gc=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 L(this,null,function*(){n.addChild(new Rh({app:this.app,plugin:this.plugin,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Rh=class extends ta.MarkdownRenderChild{constructor({app:t,plugin:n,events:s,container:i,source:a,filePath:o}){super(i);switch(this.app=t,this.plugin=n,this.events=s,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=pc(this.source,Er.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=pc(this.source,Er.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,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=pc(this.source,Er.getInstance(),this.filePath),this.events.triggerR
` ,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 yk(r,e){return r.findIndex(t=>t.symbol===e)}function Nn(r){return r===""?r:" ` "+(r!==" "?r:" space ")+" ` "}function zI(r,e){let t=ie.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 VI(r,e,t){let n=yk(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 s=r[n];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let i="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[ ` This \ ` DONE \` status is followed by ${ Nn ( s . 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]( ${ i } ). ` ] . join ( "<br>" ) ; t . push ( a ) } } else t . push ( "Unexpected failure to find the next status." ) } function KI ( r , e , t ) { let n = [ ] ; return e . symbol === ie . EMPTY . symbol ? ( n . push ( "Empty symbol: this status will be ignored." ) , n ) : yk ( r , e . symbol ) != t ? ( n . push ( ` Duplicate symbol ' ${ Nn ( e . symbol ) } ': this status will be ignored. ` ) , n ) : ( zI ( e , n ) , VI ( r , e , n ) , n ) } function bk ( r ) { let e = new yc ( [ "Status Symbol" , "Next Status Symbol" , "Status Name" , "Status Type" , "Problems (if any)" ] ) , t = Ue . allStatuses ( r ) ; return t . forEach ( ( n , s ) => { e . addRow ( [ Nn ( n . symbol ) , Nn ( n . nextStatusSymbol ) , n . name , Nn ( n . type ) , KI ( t , n , s ) . join ( "<br>" ) ] ) } ) , e . markdown } function Tk ( r , e , t , n ) { let i = bk ( 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
<!--
Switch to Live Preview or Reading Mode to see the table .
If there are any Markdown formatting characters in status names , such as '*' or '_' ,
Obsidian may only render the table correctly in Reading Mode .
-- >
These are the status values in the Core and Custom statuses sections .
$ { i }
# # Loaded Settings
<!-- Switch to Live Preview or Reading Mode to see the diagram . -- >
These are the settings actually used by Tasks .
$ { a } ` }function _k(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function vk(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function wk(){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 kk(){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 Ek(){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 Sk(){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"]]}f
` )+ `
Fix errors before saving . ` ;new Lr.Notice(f);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?ar.removeValidationError(t):ar.setValidationError(t)}};var $ t=class extends Ee.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 L(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 Ee.Setting(t).setName("Task Format").setDesc( $ t.createFragmentWithHTML('<p>The format that Tasks uses to read and write tasks.</p><p><b>Important:</b> Tasks currently only supports one format at a time. Selecting Dataview will currently <b>stop Tasks reading its own emoji signifiers</b>.</p><p>See the <a href="https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats">documentation</a>.</p>')).addDropdown(s=>{for(let i of Object.keys(En))s.addOption(i,En[i].displayName);s.setValue(ee().taskFormat).onChange(i=>L(this,null,function*(){st({taskFormat:i}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new Ee.Setting(t).setName("Global task filter").setDesc( $ t.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Global+Filter">documentation</a>.</p>')).addText(s=>{s.setPlaceholder("e.g. #task or TODO").setValue(ye.getInstance().get()).onChange(i=>L(this,null,function*(){st({globalFilter:i}),ye.getInstance().set(i),yield this.plugin.saveSettings()}))}),new Ee.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(s=>{let i=ee();s.setValue(i.removeGlobalFilter).onChange(a=>L(this,null,function*(){st({removeGlobalFilter:a}),ye.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),JI(new Ee.Setting(t).setDesc( $ t.createFragmentWithHTML('<p>A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.</p><p>See the <a href="https://publish.obsidian.md/tasks/Queries/Global+Query">documentation</a>.</p>')).addTextArea(s=>{let i=ee();s.inputEl.rows=4,s.setPlaceholder( ` # For example ...
path does not include _templates /
limit 300
show urgency ` ).setValue(i.globalQuery).onChange(a=>L(this,null,function*(){st({globalQuery:a}),Er.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=ee();Dk.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Ee.Setting(t).setName("Set created date on every added task").setDesc( $ t.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 . < /br><p>See the <a href="https:/ / publish . obsidian . md / tasks / Getting + Started / Dates # Created + date ">documentation</a>.</p>`)).addToggle(s=>{let i=ee();s.setValue(i.setCreatedDate).onChange(a=>L(this,null,function*(){st({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new Ee.Setting(t).setName(" Set done date on every completed task ").setDesc($t.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.</br><p>See the <a href=" https : //publish.obsidian.md/tasks/Getting+Started/Dates#Done+date">documentation</a>.</p>')).addToggle(s=>{let i=ee();s.setValue(i.setDoneDate).onChange(a=>L(this,null,function*(){st({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new Ee.Setting(t).setName("Set cancelled date on every cancelled task").setDesc($t.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Cancelled+date">documentation</a>.</p>')).addToggle(s=>{let i=ee();s.setValue(i.setCancelledDate).onChange(a=>L(this,null,function*(){st({setCancelledDate:a}),yield this.plugin.saveSettings()}))}),new Ee.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc($t.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date">documentation</a>.</p>')).addToggle(s=>{let i=ee();s.setValue(i.useFilenameAsScheduledDate).onChange(a=>L(this,null,function*(){st({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new Ee.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(s=>L(this,null,function*(){let i=ee();yield this.plugin.saveSettings(),s.setValue($t.renderFolderArray(i.filenameAsDateFolders)).onChange(a=>L(this,null,function*(){let o=$t.parseCommaSeparatedFolders(a);st({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new Ee.Setting(t).setName("Next recurrence appears on the line below").setDesc($t.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.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks">documentation</a>.</p>')).addToggle(s=>{let{recurrenceOnNextLine:i}=ee();s.setValue(i).onChange(a=>L(this,null,function*(){st({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new Ee.Setting(t).setName("Auto-suggest task content").setDesc($t.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest">documentation</a>.</p>')).addToggle(s=>{let i=ee();s.setValue(i.autoSuggestInEditor).onChange(a=>L(this,null,function*(
` );t(o)}).open(),n};var Ck=(r,e)=>{let t=Sl({line:"",path:""});return new Xn({app:r,task:t,onSubmit:e,allTasks:[]})};var Ak=r=>({createTaskLineModal:()=>Mk(r,Ck)});var Tc=class extends Pk.Plugin{get apiV1(){return Ak(app)}onload(){return L(this,null,function*(){Ft.registerConsoleLogger(),Am("info", ` loading plugin "${this.manifest.name}" v$ { this . manifest . version } ` ),yield this.loadSettings();let{loggingOptions:t}=ee();Ft.configure(t),this.addSettingTab(new jo({plugin:this})),qv({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new uc({obsidianEvents:this.app.workspace});this.cache=new Ds({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new dc({plugin:this}),this.queryRenderer=new gc({plugin:this,events:n}),this.registerEditorExtension(uk()),this.registerEditorSuggest(new bc(this.app,ee())),new Ol({plugin:this})})}loadTaskStatuses(){return L(this,null,function*(){let{statusSettings:t}=ee();Ue.applyToStatusRegistry(t,Oe.getInstance())})}onunload(){var t;Am("info", ` unloading plugin "${this.manifest.name}" v$ { this . manifest . version } ` ),(t=this.cache)==null||t.unload()}loadSettings(){return L(this,null,function*(){let t=yield this.loadData();st(t),t=ee(),ye.getInstance().set(t.globalFilter),ye.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),Er.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return L(this,null,function*(){yield this.saveData(ee())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.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
* /