vault backup: 2026-08-21 02:31:37
This commit is contained in:
1 parent
42c885757f
commit
19d5a510ae
22 files changed
+1958
-1197
No files matched your search
+303
-161
@@ -102,24 +102,6 @@ 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -127,35 +109,128 @@ License flatpickr (included library):
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Gregory Petrosyan
|
||||
|
||||
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 rD=Object.create;var ao=Object.defineProperty,nD=Object.defineProperties,iD=Object.getOwnPropertyDescriptor,sD=Object.getOwnPropertyDescriptors,aD=Object.getOwnPropertyNames,Bu=Object.getOwnPropertySymbols,oD=Object.getPrototypeOf,Md=Object.prototype.hasOwnProperty,Qg=Object.prototype.propertyIsEnumerable;var Kg=(r,t,e)=>t in r?ao(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ne=(r,t)=>{for(var e in t||(t={}))Md.call(t,e)&&Kg(r,e,t[e]);if(Bu)for(var e of Bu(t))Qg.call(t,e)&&Kg(r,e,t[e]);return r},Ee=(r,t)=>nD(r,sD(t));var Vu=(r,t)=>{var e={};for(var n in r)Md.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Bu)for(var n of Bu(r))t.indexOf(n)<0&&Qg.call(r,n)&&(e[n]=r[n]);return e};var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),uD=(r,t)=>{for(var e in t)ao(r,e,{get:t[e],enumerable:!0})},Xg=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aD(t))!Md.call(r,i)&&i!==e&&ao(r,i,{get:()=>t[i],enumerable:!(n=iD(t,i))||n.enumerable});return r};var oo=(r,t,e)=>(e=r!=null?rD(oD(r)):{},Xg(t||!r||!r.__esModule?ao(e,"default",{value:r,enumerable:!0}):e,r)),lD=r=>Xg(ao({},"__esModule",{value:!0}),r);var F=(r,t,e)=>new Promise((n,i)=>{var s=u=>{try{o(e.next(u))}catch(l){i(l)}},a=u=>{try{o(e.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((e=e.apply(r,t)).next())});var Be=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.matchAnyPattern=yi.extractTerms=yi.repeatedTimeunitPattern=void 0;function pD(r,t){let e=t.replace(/\((?!\?)/g,"(?:");return`${r}${e}\\s{0,5}(?:,?\\s{0,5}${e}){0,10}`}yi.repeatedTimeunitPattern=pD;function Zg(r){let t;return r instanceof Array?t=[...r]:r instanceof Map?t=Array.from(r.keys()):t=Object.keys(r),t}yi.extractTerms=Zg;function mD(r){return`(?:${Zg(r).sort((e,n)=>n.length-e.length).join("|").replace(/\./g,"\\.")})`}yi.matchAnyPattern=mD});var Ie=S((Rd,Ad)=>{(function(r,t){typeof Rd=="object"&&typeof Ad!="undefined"?Ad.exports=t():typeof define=="function"&&define.amd?define(t):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=t()})(Rd,function(){"use strict";var r=1e3,t=6e4,e=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},x=function(Q,B,C){var Z=String(Q);return!Z||Z.length>=B?Q:""+Array(B+1-Z.length).join(C)+Q},O={s:x,z:function(Q){var B=-Q.utcOffset(),C=Math.abs(B),Z=Math.floor(C/60),W=C%60;return(B<=0?"+":"-")+x(Z,2,"0")+":"+x(W,2,"0")},m:function Q(B,C){if(B.date()<C.date())return-Q(C,B);var Z=12*(C.year()-B.year())+(C.month()-B.month()),W=B.clone().add(Z,l),ae=C-W<0,p=B.clone().add(Z+(ae?-1:1),l);return+(-(Z+(C-W)/(ae?W-p:p-W))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M:l,y:d,w:u,d:o,D:f,h:a,m:s,s:i,ms:n,Q:c}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},M="en",Y={};Y[M]=_;var G=function(Q){return Q instanceof Se},oe=function(Q,B,C){var Z;if(!Q)return M;if(typeof Q=="string")Y[Q]&&(Z=Q),B&&(Y[Q]=B,Z=Q);else{var W=Q.name;Y[W]=Q,Z=W}return!C&&Z&&(M=Z),Z||!C&&M},V=function(Q,B){if(G(Q))return Q.clone();var C=typeof B=="object"?B:{};return C.date=Q,C.args=arguments,new Se(C)},K=O;K.l=oe,K.i=G,K.w=function(Q,B){return V(Q,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var Se=function(){function Q(C){this.$L=oe(C.locale,null,!0),this.parse(C)}var B=Q.prototype;return B.parse=function(C){this.$d=function(Z){var W=Z.date,ae=Z.utc;if(W===null)return new Date(NaN);if(K.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var p=W.match(b);if(p){var y=p[2]-1||0,v=(p[7]||"0").substring(0,3);return ae?new Date(Date.UTC(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,v)):new Date(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,v)}}return new Date(W)}(C),this.$x=C.x||{},this.init()},B.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},B.$utils=function(){return K},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(C,Z){var W=V(C);return this.startOf(Z)<=W&&W<=this.endOf(Z)},B.isAfter=function(C,Z){return V(C)<this.startOf(Z)},B.isBefore=function(C,Z){return this.endOf(Z)<V(C)},B.$g=function(C,Z,W){return K.u(C)?this[Z]:this.set(W,C)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(C,Z){var W=this,ae=!!K.u(Z)||Z,p=K.p(C),y=function(P,U){var ue=K.w(W.$u?DateLine truncated
|
||||
`).map($N).filter(function(e){return e!==null});return Mt(Mt({},t[0]),t[1])}function mu(r){var t={},e=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!e)return t;var n=e[1],i=e[2];return n&&(t.tzid=n),t.dtstart=cu(i),t}function $N(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var t=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!t)return $v(r);var e=t[1];switch(e.toUpperCase()){case"RRULE":case"EXRULE":return $v(r);case"DTSTART":return mu(r);default:throw new Error("Unsupported RFC prop ".concat(e," in ").concat(r))}}function $v(r){var t=r.replace(/^RRULE:/i,""),e=mu(t),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":e.freq=xe[o.toUpperCase()];break;case"WKST":e.wkst=jr[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=GN(o),l=a.toLowerCase();e[l]=u;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=HN(o);break;case"DTSTART":case"TZID":var c=mu(r);e.tzid=c.tzid,e.dtstart=c.dtstart;break;case"UNTIL":e.until=cu(o);break;case"BYEASTER":e.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),e}function GN(r){if(r.indexOf(",")!==-1){var t=r.split(",");return t.map(Gv)}return Gv(r)}function Gv(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function HN(r){var t=r.split(",");return t.map(function(e){if(e.length===2)return jr[e];var n=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var i=Number(n[1]),s=n[2],a=jr[s].weekday;return new ot(a,i)})}var cs=function(){function r(t,e){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var t=ta(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:Nv(this.date,this.tzid)},r}();function gu(r){for(var t=[],e="",n=Object.keys(r),i=Object.keys(pu),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!Re(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!Qe(o)||xt(o)&&!o.length)){switch(a){case"FREQ":u=re.FREQUENCIES[r.freq];break;case"WKST":yr(o)?u=new ot(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=xv(o).map(function(m){return m instanceof ot?m:xt(m)?new ot(m[0],m[1]):new ot(m)}).toString();break;case"DTSTART":e=BN(o,r.tzid);break;case"UNTIL":u=ta(o,!r.tzid);break;default:if(xt(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&t.push([a,u])}}var d=t.map(function(m){var b=m[0],T=m[1];return"".concat(b,"=").concat(T.toString())}).join(";"),f="";return d!==""&&(f="RRULE:".concat(d)),[e,f].filter(function(m){return!!m}).join(`
|
||||
`)}function BN(r,t){return r?"DTSTART"+new cs(new Date(r),t).toString():""}function VN(r,t){return Array.isArray(r)?!Array.isArray(t)||r.length!==t.length?!1:r.every(function(e,n){return e.getTime()===t[n].getTime()}):r instanceof Date?t instanceof Date&&r.getTime()===t.getTime():r===t}var Hv=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(t,e,n){e&&(e=e instanceof Date?zl(e):Dh(e)),t==="all"?this.all=e:(n._value=e,this[t].push(n))},r.prototype._cacheGet=function(t,e){var n=!1,i=e?Object.keys(e):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!VN(e[f],c[f]))return!0}return!1},a=this[t];if(t==="all")n=this.all;else if(xt(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Jn(t,e),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(t,n,e)}return xt(n)?Dh(n):n instanceof Date?zl(n):n},r}();var Bv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Ce(1,31),!0),Ce(2,28),!0),Ce(3,31),!0),Ce(4,30),!0),Ce(5,31),!0),Ce(6,30),!0),Ce(7,31),!0),Ce(8,31),!0),Ce(9,30),!0),Ce(10,31),!0),Ce(11,30),!0),Ce(12,31),!0),Ce(1,7),!0),Vv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Ce(1,31),!0),Ce(2,29),!0),Ce(3,31),!0),Ce(4,30),!0),Ce(5,31),!0),Ce(6,30),!0),Ce(7,31),!0),Ce(8,31),!0),Ce(9,30),!0),Ce(10,31),!0),Ce(11,30),!0),Ce(12,31),!0),Ce(1,7),!0),zN=qr(1,29),KN=qr(1,30),Ei=qr(1,31),Ft=qr(1,32),zv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Ft,!0),KN,!0),Ft,!0),Ei,!0),Ft,!0),Ei,!0),Ft,!0),Ft,!0),Ei,!0),Ft,!0),Ei,!0),Ft,!0),Ft.slice(0,7),!0),Kv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Ft,!0),zN,!0),Ft,!0),Ei,!0),Ft,!0),Ei,!0),Ft,!0),Ft,!0),Ei,!0),Ft,!0),Ei,!0),Ft,!0),Ft.slice(0,7),!0),QN=qr(-28,0),XN=qr(-29,0),Di=qr(-30,0),Lt=qr(-31,0),Qv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Lt,!0),XN,!0),Lt,!0),Di,!0),Lt,!0),Di,!0),Lt,!0),Lt,!0),Di,!0),Lt,!0),Di,!0),Lt,!0),Lt.slice(0,7),!0),Xv=H(H(H(H(H(H(H(H(H(H(H(H(H([],Lt,!0),QN,!0),Lt,!0),Di,!0),Lt,!0),Di,!0),Lt,!0),Lt,!0),Di,!0),Lt,!0),Di,!0),Lt,!0),Lt.slice(0,7),!0),Zv=[0,31,60,91,121,152,182,213,244,274,305,335,366],Jv=[0,31,59,90,120,151,181,212,243,273,304,334,365],Mh=function(){for(var r=[],t=0;t<55;t++)r=r.concat(qr(7));return r}();function ew(r,t){var e=On(r,1,1),n=ea(r)?366:365,i=ea(r+1)?366:365,s=lu(e),a=Xn(e),o=Mt(Mt({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},ZN(r)),{wnomask:null});if(br(t.byweekno))return o;o.wnomask=Ce(0,n+7);var u,l,c=u=It(7-a+t.wkst,7);c>=4?(c=0,l=o.yearlen+It(a-t.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=It(l,7),m=Math.floor(d+f/4),b=0;b<t.byweekno.length;b++){var T=t.byweekno[b];if(T<0&&(T+=m+1),T>0&&T<=m){var _=void 0;T>1?(_=c+(T-1)*7,c!==u&&(_-=7-u)):_=c;for(var x=0;x<7&&(o.wnomask[_]=1,_++,o.wdaymask[_]!==t.wkst);x++);}}if(Re(t.byweekno,1)){var _=c+m*7;if(c!==u&&(_-=7-u),_<n)for(var b=0;b<7&&(o.wnomask[_]=1,_+=1,o.wdaymask[_]!==t.wkst);b++);}if(c){var O=void 0;if(Re(t.byweekno,-1))O=-1;else{var M=Xn(On(r-1,1,1)),Y=It(7-M.valueOf()+t.wkst,7),G=ea(r-1)?366:365,oe=void 0;Y>=4?(Y=0,oe=G+It(M-t.wkst,7)):oe=n-c,O=Math.floor(52+It(oe,7)/4)}if(Re(t.byweekno,O))for(var _=0;_<c;_++)o.wnomask[_]=1}return o}function ZN(r){var t=ea(r)?366:365,e=On(r,1,1),n=Xn(e);return t===365?{mmask:Bv,mdaymask:Kv,nmdaymask:Xv,wdaymask:Mh.slice(n),mrange:Jv}:{mmask:Vv,mdaymask:zv,nmdaymask:Qv,wdaymask:Mh.slice(n),mrange:Zv}}function tw(r,t,e,n,i,s){var a={lastyear:r,lastmonth:t,nwdaymask:[]},o=[];if(s.freq===re.YEARLY)if(br(s.bymonth))o=[[0,e]];else for(var u=0;u<s.bymonth.length;u++)t=s.bymonth[u],o.push(n.slice(t-1,t+1));else s.freq===re.MONTHLY&&(o=[n.slice(t-1,t+1)]);if(br(o))return a;a.nwdaymask=Ce(0,e);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],d=l[1]-1,f=0;f<s.bynweekday.length;f++){var m=void 0,b=s.bynweekday[f],T=b[0],_=b[1];_<0?(m=d+(_+1)*7,m-=It(i[m]-T,7)):(m=c+(_-1)*7,m+=It(7-i[m]+T,7)),c<=m&&m<=d&&(a.nwdaymask[m]=1)}return a}function rw(r,t){t===void 0&&(t=0);var e=r%19,n=Math.floor(r/100),i=r%100,s=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*e+n-s-u+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-l-d)%7,m=Math.floor((e+11*l+22*f)/451),b=Math.floor((l+f-7*m+114)/31),T=(l+f-7*m+114)%31+1,_=Date.UTC(r,b-1,T+t),x=Date.UTC(r,0,1);return[Math.ceil((_-x)/(1e3*60*60*24))]}var JN=function(){function r(t){this.options=t}return r.prototype.rebuild=function(t,e){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=ew(t,n)),rt(n.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=tw(t,e,s,a,o,n)}Qe(n.byeaster)&&(this.eastermask=rw(t,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurabl
Line truncated
|
||||
`),n=0;n<e.length;){var i=e[n]=e[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(e[n-1]+=i.slice(1),e.splice(n,1)):n+=1:e.splice(n,1)}return e}function lI(r){r.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function uw(r,t){return lI(t),r.split(",").map(function(e){return cu(e)})}function lw(r){var t=this;return function(e){if(e!==void 0&&(t["_".concat(r)]=e),t["_".concat(r)]!==void 0)return t["_".concat(r)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[r];if(i)return i}}}var Rh=function(r){ra(t,r);function t(e){e===void 0&&(e=!1);var n=r.call(this,{},e)||this;return n.dtstart=lw.apply(n,["dtstart"]),n.tzid=lw.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(e){return aw(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){cw(e,this._rrule)},t.prototype.exrule=function(e){cw(e,this._exrule)},t.prototype.rdate=function(e){dw(e,this._rdate)},t.prototype.exdate=function(e){dw(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return Ql(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return Ql(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(gu({dtstart:this._dtstart}))),this._rrule.forEach(function(n){e=e.concat(n.toString().split(`
|
||||
`))}),this._exrule.forEach(function(n){e=e.concat(n.toString().split(`
|
||||
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&e.push(fw("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(fw("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(`
|
||||
`)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(n){return e.rrule(n.clone())}),this._exrule.forEach(function(n){return e.exrule(n.clone())}),this._rdate.forEach(function(n){return e.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return e.exdate(new Date(n.getTime()))}),e},t}(re);function cw(r,t){if(!(r instanceof re))throw new TypeError(String(r)+" is not RRule instance");Re(t.map(String),String(r))||t.push(r)}function dw(r,t){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");Re(t.map(Number),Number(r))||(t.push(r),Zn(t))}function fw(r,t,e){var n=!e||e.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(e,":"),s=t.map(function(a){return ta(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}var _t=class{constructor({rrule:t,baseOnToday:e,occurrence:n}){this.rrule=t,this.baseOnToday=e,this.occurrence=n}static fromText({recurrenceRuleText:t,occurrence:e}){try{let n=t.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(n==null)return null;let i=n[1].trim(),s=n[2]!==void 0,a=re.parseText(i);if(a!==null){let o=e.referenceDate;!s&&o!==null?a.dtstart=window.moment(o).startOf("day").utc(!0).toDate():a.dtstart=window.moment().startOf("day").utc(!0).toDate();let u=new re(a);return new _t({rrule:u,baseOnToday:s,occurrence:e})}}catch(n){n instanceof Error&&console.log(n.message)}return null}toText(){let t=this.rrule.toText();return this.baseOnToday&&(t+=" when done"),t}next(t=window.moment()){let e=this.nextReferenceDate(t);return e===null?null:this.occurrence.next(e)}identicalTo(t){return this.baseOnToday!==t.baseOnToday||!this.occurrence.isIdenticalTo(t.occurrence)?!1:this.toText()===t.toText()}nextReferenceDate(t){return this.baseOnToday?this.nextReferenceDateFromToday(t.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(t){let e=new re(Ee(ne({},this.rrule.origOptions),{dtstart:t.startOf("day").utc(!0).toDate()}));return this.nextAfter(t.endOf("day"),e)}nextReferenceDateFromOriginalReferenceDate(){var e;let t=window.moment((e=this.occurrence.referenceDate)!=null?e:void 0).endOf("day");return this.nextAfter(t,this.rrule)}nextAfter(t,e){t.utc(!0);let n=window.moment.utc(e.after(t.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=_t.nextAfterMonths(t,n,e,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=_t.nextAfterYears(t,n,e,a[1])),_t.addTimezone(n)}static nextAfterMonths(t,e,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));_t.isSkippingTooManyMonths(t,e,s);)e=_t.fromOneDayEarlier(t,n);return e}static isSkippingTooManyMonths(t,e,n){let i=e.month()-t.month();return i+=(e.year()-t.year())*12,i>n}static nextAfterYears(t,e,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));_t.isSkippingTooManyYears(t,e,s);)e=_t.fromOneDayEarlier(t,n);return e}static isSkippingTooManyYears(t,e,n){return e.year()-t.year()>n}static fromOneDayEarlier(t,e){t.subtract(1,"days").endOf("day");let n=e.origOptions;return n.dtstart=t.startOf("day").toDate(),e=new re(n),window.moment.utc(e.after(t.toDate()))}static addTimezone(t){return window.moment.utc(t).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}};var sa=(m=>(m.Description="description",m.Id="id",m.DependsOn="dependsOn",m.Priority="priority",m.RecurrenceRule="recurrenceRule",m.OnCompletion="onCompletion",m.CreatedDate="createdDate",m.StartDate="startDate",m.ScheduledDate="scheduledDate",m.DueDate="dueDate",m.CancelledDate="cancelledDate",m.DoneDate="doneDate",m.BlockLink="blockLink",m))(sa||{}),Xl=Object.values(sa),Mn=class{constructor(){this.visible={};this.tagsVisible=!0;Xl.forEach(t=>{this.visible[t]=!0})}isShown(t){return this.visible[t]}areTagsShown(){return this.tagsVisible}hide(t){this.visible[t]=!1}setVisibility(t,e){this.visible[t]=e}setTagsVisibility(t){this.tagsVisible=t}get shownComponents(){return Xl.filter(t=>this.visible[t])}get hiddenComponents(){return Xl.filter(t=>!this.visible[t])}get toggleableComponents(){return Xl.filter(t=>t!=="description"&&t!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(t=>{this.visible[t]=!this.visible[t]}),this.setTagsVisibility(!this.areTagsShown())}};var zt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(zt||{}),ft=class{constructor(t,e,n,i,s="TODO"){this.symbol=t,this.name=e,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};function pw(r){let t=r.trim().toLowerCase();return t==="delete"?"delete":t==="keep"?"keep":""}function cI(r,t){return r.filter(e=>e!==t)}function dI(r,t){let e=r.status,n=t.status,i=n.type===e.type;return n.type!=="DONE"||i}function mw(r,t){let e=t.length;if(r.onCompletion===""||r.onCompletion==="keep"||e===0)return t;let n=t[e-1];if(dI(r,n))return t;let s=r.onCompletion;return s==="delete"?cI(t,n):(
Line truncated
|
||||
`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function gI(r,t,e){let n=xI(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&t.length>e&&t.charAt(e)===n?1:0;return{postfix:i,insertSkip:s}}function yI(r,t,e){let n=[],i=e.line;ms(n,i,r.dueDateSymbol,"due date"),ms(n,i,r.startDateSymbol,"start date"),ms(n,i,r.scheduledDateSymbol,"scheduled date"),bI(n,r,e),ms(n,i,r.recurrenceSymbol,"recurring (repeat)"),TI(n,r,e),_w(t)&&(ms(n,i,r.idSymbol,"id"),ms(n,i,r.dependsOnSymbol,"depends on id")),ms(n,i,r.onCompletionSymbol,"on completion");let s=_I(n,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?n:s}function ms(r,t,e,n){t.includes(e)||r.push({displayText:`${e} ${n}`,appendText:`${e} `})}function bI(r,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];r.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function TI(r,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=gr.parseDate("today",!0).format(le.dateFormat);r.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function _I(r,t){let e=la(/([a-zA-Z'_-]*)/g,t),n=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=r.filter(a=>{var u;return((u=a.textToMatch)!=null?u:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;n.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return n}function vw(r,t){let e=`${t}`,n=`${r} ${t}`;return{displayText:e,appendText:n}}function vI(r,t){let n=`${gr.parseDate(t,!0).format(le.dateFormat)}`,i=`${t} (${n})`,s=`${r} ${n}`;return{displayText:i,appendText:s}}function wI(r,t,e){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=la(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let u=o&&o.length>1?gr.parseDate(Yl(o),!0):null;if(u!=null&&u.isValid()){let c=u.format(le.dateFormat);rc(e,a,[c],vw,i)}let l=Ih(n,o,t,!0);rc(e,a,l,vI,i)}return i}function kI(r,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],n=[],i=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),s=la(i,t);if(s&&s.length>=2){let o=s[1],u=s[2];if(u.length<t.settings.autoSuggestMinMatch)return[];if(u.length>0){let f=(a=_t.fromText({recurrenceRuleText:u,occurrence:new Wr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let m=`${o} ${f}`+t.postfix;if(n.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:m,insertAt:s.index,insertSkip:Fh(s[0],t)}),s[0]==m)return[]}}let l=t.settings.autoSuggestMaxItems/2,c=Ih(e,u,l,!1);c.length===0&&u.trim().length===0&&(c=e.slice(0,l)),rc(t,s,c,(f,m)=>{let b=`${m}`,T=`${f} ${m}`;return{displayText:b,appendText:T}},n)}return n}function EI(r,t,e){let n=["delete","keep"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=la(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let u=Ih(n,o,t,!0);rc(e,a,u,vw,i)}return i}function DI(r,t,e){let n=[],i=new RegExp(`(${r})\\s*(${ds.source})?`,"ug"),s=la(i,e);if(s&&s[0].trim().length<=r.length){let a=bu(t.map(o=>o.id));n.push({suggestionType:"match",displayText:"generate unique id",appendText:`${r} ${a}`+e.postfix,insertAt:s.index,insertSkip:Fh(s[0],e)})}return n}function SI(r,t,e,n){let i=[],s=e.dataviewMode?Si("()[]"):hw(),a=new RegExp(`(${r})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=la(a,e);if(o&&o.length>=1){let u=o[2]||"",l=o[3],c=[];if(u){let d=u.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(l.length>=e.settings.autoSuggestMinMatch){let d=tc(l.trim(),t,n,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${r}${u}`,insertAt:o.index,insertSkip:r.length+u.length+l.length,taskItDependsOn:f})}}return i}function Ih(r,t,e,n){let s=r.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return n&&s.length===0&&(s=r.slice(0,e)),s}function rc(r,t,e,n,i){let s=t[1];for(let a of e){let{displayText:o,appendText:u}=n(s,a);i.push({suggestionType:"match",displayText:o,appendText:u+r.postfix,insertAt:t.index,insertSkip:Fh(t[0],r)})}}function la(r,t){let e=t.
Line truncated
|
||||
\`\`\`${n}
|
||||
/*
|
||||
License @floating-ui/dom (included library):
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Floating UI contributors
|
||||
*/
|
||||
|
||||
/*
|
||||
License boon-js (included library):
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020-present Jake Chorley
|
||||
*/
|
||||
|
||||
/*
|
||||
License eventemitter2 (included library):
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Paolo Fragomeni <http://www.github.com/0x00a> and Contributors
|
||||
*/
|
||||
|
||||
/*
|
||||
License i18next (included library):
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2025 i18next
|
||||
*/
|
||||
|
||||
/*
|
||||
License mustache (included library):
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2009 Chris Wanstrath (Ruby)
|
||||
Copyright (c) 2010-2014 Jan Lehnardt (JavaScript)
|
||||
Copyright (c) 2010-2015 The mustache.js community
|
||||
*/
|
||||
|
||||
/*
|
||||
License mustache-validator (included library):
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Elias Mangoro
|
||||
*/
|
||||
|
||||
/*
|
||||
License safe-regex2 (included library):
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-present The Fastify team <https://github.com/fastify/fastify#team>
|
||||
*/
|
||||
|
||||
"use strict";var uR=Object.create;var wo=Object.defineProperty,cR=Object.defineProperties,dR=Object.getOwnPropertyDescriptor,fR=Object.getOwnPropertyDescriptors,pR=Object.getOwnPropertyNames,yu=Object.getOwnPropertySymbols,mR=Object.getPrototypeOf,Xf=Object.prototype.hasOwnProperty,pT=Object.prototype.propertyIsEnumerable;var fT=(n,t,e)=>t in n?wo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,q=(n,t)=>{for(var e in t||(t={}))Xf.call(t,e)&&fT(n,e,t[e]);if(yu)for(var e of yu(t))pT.call(t,e)&&fT(n,e,t[e]);return n},pe=(n,t)=>cR(n,fR(t));var ea=(n,t)=>{var e={};for(var r in n)Xf.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&yu)for(var r of yu(n))t.indexOf(r)<0&&pT.call(n,r)&&(e[r]=n[r]);return e};var Q=(n,t,e)=>()=>{if(e)throw e[0];try{return n&&(t=n(n=0)),t}catch(r){throw e=[r],r}};var R=(n,t)=>()=>{try{return t||n((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},mT=(n,t)=>{for(var e in t)wo(n,e,{get:t[e],enumerable:!0})},hT=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pR(t))!Xf.call(n,i)&&i!==e&&wo(n,i,{get:()=>t[i],enumerable:!(r=dR(t,i))||r.enumerable});return n};var os=(n,t,e)=>(e=n!=null?uR(mR(n)):{},hT(t||!n||!n.__esModule?wo(e,"default",{value:n,enumerable:!0}):e,n)),gT=n=>hT(wo({},"__esModule",{value:!0}),n);var A=(n,t,e)=>new Promise((r,i)=>{var s=l=>{try{o(e.next(l))}catch(u){i(u)}},a=l=>{try{o(e.throw(l))}catch(u){i(u)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(n,t)).next())});var ve,_o,yT,hR,gR,bT,TT,So,vT,yR,Tu,bR,OT,ta,TR,vR,ep,kR,wR,_R,tp,vu,SR,np,Nr,ra,ku,xT,kT,wu,_u,wT,_T,rp,ST,Jf,ip,ER,na,sp,DR,ap,ET,DT,bu,OR,Su,Et,_W,SW,EW,DW,OW,xW,RW,CW,MW,AW,PW,IW,NW,FW,RT=Q(()=>{ve=n=>typeof n=="string",_o=()=>{let n,t,e=new Promise((r,i)=>{n=r,t=i});return e.resolve=n,e.reject=t,e},yT=n=>n==null?"":""+n,hR=(n,t,e)=>{n.forEach(r=>{t[r]&&(e[r]=t[r])})},gR=/###/g,bT=n=>n&&n.indexOf("###")>-1?n.replace(gR,"."):n,TT=n=>!n||ve(n),So=(n,t,e)=>{let r=ve(t)?t.split("."):t,i=0;for(;i<r.length-1;){if(TT(n))return{};let s=bT(r[i]);!n[s]&&e&&(n[s]=new e),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={},++i}return TT(n)?{}:{obj:n,k:bT(r[i])}},vT=(n,t,e)=>{let{obj:r,k:i}=So(n,t,Object);if(r!==void 0||t.length===1){r[i]=e;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=So(n,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=So(n,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=e},yR=(n,t,e,r)=>{let{obj:i,k:s}=So(n,t,Object);i[s]=i[s]||[],i[s].push(e)},Tu=(n,t)=>{let{obj:e,k:r}=So(n,t);if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r]},bR=(n,t,e)=>{let r=Tu(n,e);return r!==void 0?r:Tu(t,e)},OT=(n,t,e)=>{for(let r in t)r!=="__proto__"&&r!=="constructor"&&(r in n?ve(n[r])||n[r]instanceof String||ve(t[r])||t[r]instanceof String?e&&(n[r]=t[r]):OT(n[r],t[r],e):n[r]=t[r]);return n},ta=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),TR={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},vR=n=>ve(n)?n.replace(/[&<>"'\/]/g,t=>TR[t]):n,ep=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let e=this.regExpMap.get(t);if(e!==void 0)return e;let r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}},kR=[" ",",","?","!",";"],wR=new ep(20),_R=(n,t,e)=>{t=t||"",e=e||"";let r=kR.filter(a=>t.indexOf(a)<0&&e.indexOf(a)<0);if(r.length===0)return!0;let i=wR.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`),s=!i.test(n);if(!s){let a=n.indexOf(e);a>0&&!i.test(n.substring(0,a))&&(s=!0)}return s},tp=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[t])return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;let r=t.split(e),i=n;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=s;l<r.length;++l)if(l!==s&&(o+=e),o+=r[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;s+=l-s+1;break}i=a}return i},vu=n=>n==null?void 0:n.replace("_","-"),SR={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,t){var e,r;(r=(e=console==null?void 0:console[n])==null?void 0:e.apply)==null||r.call(e,console,t)}},np=class n{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||SR,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u044B\u044F \u0437\u0430\u0434\u0430\u0447\u044B",nextLine:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0437\u0440\u043E\u0431\u0456\u0446\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437\u0430\u0434\u0430\u0447\u044B \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439 \u0437\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0443\u044E \u0437\u0430\u0434\u0430\u0447\u0443. \u0423 \u0430\u0434\u0432\u0430\u0440\u043E\u0442\u043D\u044B\u043C \u0432\u044B\u043F\u0430\u0434\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u0432\u0456\u0446\u0446\u0430 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u045E\u043B\u044F\u0435\u0446\u0446\u0430 \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 \u0434\u0430\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u044B\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u044D\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u044D\u043C\u0430 Aura",borderTheme:"\u0422\u044D\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u0430\u0434\u0430\u0446\u044C {{numberOfStatuses}} \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"}},ebullientworksTheme:"\u0422\u044D\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u044D\u043C\u0430 ITS \u0456 \u0441\u0446\u044F\u0436\u043A\u0456 SlRvb",lytModeTheme:"\u0422\u044D\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u0456 \u0446\u0451\u043C\u043D\u044B \u0440\u044D\u0436\u044B\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u044D\u043C\u0430",thingsTheme:"\u0422\u044D\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u043D\u043E\u0432\u044B \u0444\u0430\u0439\u043B \u0443 \u043A\u0430\u0440\u0430\u043D\u0451\u0432\u0430\u0439 \u0442\u044D\u0447\u0446\u044B \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u0430, \u044F\u043A\u0456 \u0437\u043C\u044F\u0448\u0447\u0430\u0435 \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443 Mermaid \u0437 \u0431\u044F\u0433\u0443\u0447\u044B\u043C\u0456 \u043D\u0430\u043B\u0430\u0434\u0430\u043C\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0413\u044D\u0442\u0430 \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u044F\u043A\u0456\u044F Tasks \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u0430, \u0431\u0435\u0437 \u043F\u0430\u0442\u0440\u044D\u0431\u044B \u045E \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u043C CSS-\u0441\u0442\u044B\u043B\u0456 \u0430\u0431\u043E \u0442\u044D\u043C\u0430\u0442\u044B\u0437\u0430\u0446\u044B\u0456.",line2:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0456 \u0434\u0430\u0434\u0430\u0432\u0430\u0446\u044C \u0441\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u044B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0435 \u043D\u0456\u0436\u044D\u0439."},heading:"\u0410\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u0443\u0441\u0435 \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B\u044F \u0442\u044B\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E"},addNewStatus:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u043D\u043E\u0432\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u044B"},resetCustomStatuses:{name:"\u0421\u043A\u0456\u043D\u0443\u0446
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"Wiederkehrende Aufgaben",nextLine:{description:"Aktivieren Sie dies, damit das n\xE4chste Auftreten einer Aufgabe in der Zeile unterhalb der abgeschlossenen Aufgabe erscheint. Ansonsten erscheint es vor der abgeschlossenen Aufgabe.",name:"N\xE4chste Wiederholung erscheint in Zeile darunter"},removeScheduledDate:{description:{line1:"Aktiviert, damit das n\xE4chste Auftreten einer Aufgabe keinen geplanten (\u23F3) Termin hat, wenn mindestens Start-(\u{1F6EB}) oder F\xE4lligkeitsdaten (\u{1F4C5}) vorhanden sind.",line2:"Dies gilt, wenn Sie m\xF6chten, dass Start- und F\xE4lligkeitsdaten beim n\xE4chsten Auftreten beibehalten werden, aber das geplante Datum sp\xE4ter festgelegt wird, sobald Sie planen, daran zu arbeiten."},name:"Geplantes Datum bei Wiederholung entfernen"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"Vgl. die Dokumentation",statuses:{collections:{anuppuccinTheme:"AnuPpuccin Theme",auraTheme:"Aura Theme",borderTheme:"Border Theme",buttons:{addCollection:{name:"{{themeName}}: F\xFCge {{numberOfStatuses}} unterst\xFCtzte Status hinzu"}},ebullientworksTheme:"Ebullientworks Theme",itsThemeAndSlrvbCheckboxes:"ITS Theme & SlRvb Kontrollk\xE4stchen",lytModeTheme:"LYT Mode Theme (nur Dunkelmodus)",minimalTheme:"Minimal Theme",thingsTheme:"Things Theme"},coreStatuses:{buttons:{checkStatuses:{name:"\xDCberpr\xFCfen und einsehen Sie Ihre Status-Eintr\xE4ge",tooltip:"Erstellen Sie eine neue Datei im Hauptverzeichnis des Tresors, die ein Mermaid-Diagramm der aktuellen Statuseinstellungen enth\xE4lt."}},description:{line1:"Diese Kern-Status unterst\xFCtzt Tasks nativ ohne benutzerdefiniertes CSS-Styling oder Themes.",line2:"Hinzuf\xFCgen und Bearbeiten Ihrer eigenen benutzerdefinierten Status k\xF6nnen Sie im unteren Abschnitt."},heading:"Kern-Status"},customStatuses:{buttons:{addAllUnknown:{name:"Alle unbekannten Statustypen hinzuf\xFCgen"},addNewStatus:{name:"Neuen Aufgabenstatus hinzuf\xFCgen"},resetCustomStatuses:{name:"Benutzerdefinierte Statustypen auf Standard zur\xFCcksetzen"}},description:{line1:"Zuerst w\xE4hlen und installieren Sie ein CSS-Snippet oder Theme, um benutzerdefinierte Kontrollk\xE4stchen zu formatieren.",line2:"Verwenden Sie dann die untenstehenden Schaltfl\xE4chen, um Ihre benutzerdefinierten Status zu erstellen, sodass sie mit Ihren ausgew\xE4hlten CSS-Kontrollk\xE4stchen \xFCbereinstimmen.",line3:"Hinweis: Status mit dem gleichen Symbol wie ein fr\xFCherer Status ignorieren wir. Best\xE4tigen Sie die tats\xE4chlich geladenen Status, indem Sie den 'Aufgabe erstellen oder bearbeiten'-Befehl ausf\xFChren und das Status-Dropdown anschauen.",line4:"Nutzen Sie die Dokumentation, um loszulegen!"},heading:"Benutzerdefinierte Status"},heading:"Aufgabenstatus"}}}});var NT,IT=Q(()=>{NT={main:{loadingPlugin:"Loading plugin: {{name}} v{{version}}",unloadingPlugin:"Unloading plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.",name:"Available as command"},editNextStatusSymbol:{description:"When clicked on this is the symbol that should be used next.",name:"Task Next Status Symbol"},editStatusName:{description:"This is the friendly name of the task status.",name:"Task Status Name"},editStatusSymbol:{description:"This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)",name:"Task Status Symbol"},editStatusType:{description:"Control how the status behaves for searching and toggling.",name:"Task Status Type"},fixErrorsBeforeSaving:"Fix errors before saving."}},notices:{"do-not-show-message-again":"Do not show me this message again","live-preview-callout-warning":{line1:"Obsidian does not currently give plugins the correct task line when you click a checkbox inside a callout in Live Preview.",line2:"Instead, Obsidian reports that the callout title is being edited.",line3:"So the Tasks plugin cannot safely add or remove completion dates, or create the next copy of a recurring task.",line4:"To complete the task correctly:",line5:"1. Undo your checkbox change.",line6:'2. Then either click the task line and run the "{{commandName}}" command, or switch to Reading View and click the checkbox there.'}},reports:{statusRegistry:{about:{createdBy:"This file was created by the Obsidian Tasks plugin (version {{version}}) to help visualise the task statuses in this vault.",deleteFileAnyTime:"You can delete this file any time.",title:"About this file",updateReport:{line1:"If you change the Tasks status settings, you can get an updated report by:",line2:"Going to `Settings` -> `Tasks`.",line3:"Clicking on `Review and check youLine truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:"Add new preset"},line1:"You can define named instructions here, that you can re-use in multiple queries. A preset called '{{name}}' can be used in Tasks queries with either '{{instruction1}}' or '{{instruction2}}'.",line2:"Any open Tasks queries are reloaded automatically when presets are edited.",name:"Presets"},recurringTasks:{heading:"Recurring tasks",nextLine:{description:"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.",name:"Next recurrence appears on the line below"},removeScheduledDate:{description:{line1:"Enabling this will make the next recurrence of a task have no Scheduled (\u23F3) date, when at least one of Start (\u{1F6EB}) or Due (\u{1F4C5}) dates is present.",line2:"This is for when you want the Start and Due dates to carry forward to the next recurrence, but you will set the Scheduled date in future, once you plan to work on it."},name:"Remove scheduled date on recurrence"}},searchResults:{heading:"Search results",taskCountLocation:{description:"Choose whether the task count is shown at the top or bottom of query results.",name:"Task count location",options:{bottom:"Bottom",top:"Top"}}},searches:{enableCustomSearches:{description:{line1:"Enables '{{filterByFunction}}', '{{sortByFunction}}', and '{{groupByFunction}}', which execute JavaScript in Tasks queries.",line2:"Malicious JavaScript in a Tasks query or Markdown file could run inside Obsidian and access or modify your vault contents, local files, or other system resources.",line3:"Only enable this if you trust the current and future contents of this vault, including files you may later download, copy, or sync from other people.",line4:"This setting is stored on this device only; enable it separately on each device where you use this vault."},name:"Enable custom searches"},heading:"Searches"},seeTheDocumentation:"See the documentation",statuses:{collections:{anuppuccinTheme:"AnuPpuccin Theme",auraTheme:"Aura Theme",borderTheme:"Border Theme",buttons:{addCollection:{name:"{{themeName}}: Add {{numberOfStatuses}} supported Statuses"}},ebullientworksTheme:"Ebullientworks Theme",itsThemeAndSlrvbCheckboxes:"ITS Theme & SlRvb Checkboxes",lytModeTheme:"LYT Mode Theme (Dark mode only)",minimalTheme:"Minimal Theme",thingsTheme:"Things Theme"},coreStatuses:{buttons:{checkStatuses:{name:"Review and check your Statuses",tooltip:"Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings."}},description:{line1:"These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.",line2:"You can add edit and add your own custom statuses in the section below."},heading:"Core Statuses"},customStatuses:{buttons:{addAllUnknown:{name:"Add All Unknown Status Types"},addNewStatus:{name:"Add New Task Status"},resetCustomStatuses:{name:"Reset Custom Status Types to Defaults"}},description:{line1:"You should first <b>select and install a CSS Snippet or Theme</b> to style custom checkboxes.",line2:"Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.",line3:"<b>Note</b> Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.",line4:"See the documentation to get started!"},heading:"Custom Statuses"},heading:"Task Statuses"}}}});var LT,FT=Q(()=>{LT={main:{loadingPlugin:"\uD50C\uB7EC\uADF8\uC778 \uB85C\uB4DC \uC911: {{name}} v{{version}}",unloadingPlugin:"\uD50C\uB7EC\uADF8\uC778 \uC5B8\uB85C\uB4DC \uC911: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC774 \uC0C1\uD0DC\uB97C \uBA85\uB839\uC5B4(command)\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC5B4 \uB2E8\uCD95\uD0A4\uB97C \uC9C0\uC815\uD558\uACE0 \uC0C1\uD0DC\uB97C \uC804\uD658\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",name:"\uBA85\uB839\uC5B4\uB85C \uC0AC\uC6A9"},editNextStatusSymbol:{description:"\uD074\uB9AD \uC2DC \uB2E4\uC74C\uC5D0 \uC0AC\uC6A9\uD560 \uAE30\uD638\uC785\uB2C8\uB2E4.",name:"\uB2E4\uC74C \uC0C1\uD0DC \uAE30\uD638"},editStatusName:{description:"\uC791\uC5C5 \uC0C1\uD0DC\uB97C \uC54C\uC544\uBCF4\uAE30 \uC27D\uAC8C \uD45C\uD604\uD558\uB294 \uC774\uB984\uC785\uB2C8\uB2E4.",name:"\uC0C1\uD0DC \uC774\uB984"},editStatusSymbol:{description:"\uB300\uAD04\uD638 '[]' \uC0AC\uC774\uC5D0 \uB4E4\uC5B4\uAC00\uB294 \uBB38\uC790\uC785\uB2C8\uB2E4. (\uCF54\uC5B4 \uC0C1\uD0DC\uAC00 \uC544\uB2CC \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB9CC \uD3B8\uC9D1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.)",name:"\uC0C1\uD0DC \uAE30\uD638"},editStatusType:{description:"\uAC80\uC0C9 \uBC0F \uC0C1\uD0DC \uC804\uD658 \uC2DC \uC5B4\uB5BB\uAC8C \uB3D9\uC791\uD560\uC9C0 \uC81C\uC5B4\uD569\uB2C8\uB2E4.",name:"\uC0C1\uD0DC \uC720\uLine truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:"\uC0C8 \uD504\uB9AC\uC14B \uCD94\uAC00"},line1:"\uC5EC\uAE30\uC11C \uC774\uB984 \uC788\uB294 \uC9C0\uCE68\uC744 \uC815\uC758\uD574 \uC5EC\uB7EC \uCFFC\uB9AC\uC5D0\uC11C \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. '{{name}}' \uD504\uB9AC\uC14B\uC740 Tasks \uCFFC\uB9AC\uC5D0\uC11C '{{instruction1}}' \uB610\uB294 '{{instruction2}}'\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",line2:"\uD504\uB9AC\uC14B\uC744 \uC218\uC815\uD558\uBA74 \uC5F4\uB824 \uC788\uB294 \uBAA8\uB4E0 Tasks \uCFFC\uB9AC\uAC00 \uC790\uB3D9\uC73C\uB85C \uC0C8\uB85C\uACE0\uCE68\uB429\uB2C8\uB2E4.",name:"\uD504\uB9AC\uC14B"},recurringTasks:{heading:"\uBC18\uBCF5 \uC791\uC5C5",nextLine:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC644\uB8CC\uB41C \uC791\uC5C5\uC758 \uBC14\uB85C \uC544\uB798 \uC904\uC5D0 \uB2E4\uC74C \uBC18\uBCF5\uC774 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. \uBE44\uD65C\uC131\uD654 \uC2DC \uB2E4\uC74C \uBC18\uBCF5\uC740 \uC644\uB8CC\uB41C \uC791\uC5C5 \uC55E\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",name:"\uB2E4\uC74C \uBC18\uBCF5\uC744 \uC544\uB798 \uC904\uC5D0 \uD45C\uC2DC"},removeScheduledDate:{description:{line1:"\uD65C\uC131\uD654\uD558\uBA74 \uC2DC\uC791\uC77C(\u{1F6EB})\uB610\uB294 \uB9C8\uAC10\uC77C(\u{1F4C5}) \uC911 \uD558\uB098\uB77C\uB3C4 \uC788\uC744 \uB54C, \uB2E4\uC74C \uBC18\uBCF5 \uC791\uC5C5\uC5D0\uB294 \uC608\uC815\uC77C(\u23F3)\uC744 \uC124\uC815\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",line2:"\uC2DC\uC791\uC77C\uACFC \uB9C8\uAC10\uC77C\uC740 \uB2E4\uC74C \uBC18\uBCF5\uC73C\uB85C \uB118\uAE30\uB418, \uC608\uC815\uC77C\uC740 \uCD94\uD6C4 \uC791\uC5C5 \uACC4\uD68D \uC2DC\uC810\uC5D0 \uC124\uC815\uD558\uB824\uB294 \uACBD\uC6B0\uC5D0 \uC720\uC6A9\uD569\uB2C8\uB2E4."},name:"\uBC18\uBCF5 \uC2DC \uC608\uC815\uC77C \uC81C\uAC70"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"\uBB38\uC11C \uBCF4\uAE30",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \uD14C\uB9C8",auraTheme:"Aura \uD14C\uB9C8",borderTheme:"Border \uD14C\uB9C8",buttons:{addCollection:{name:"{{themeName}}: \uC9C0\uC6D0\uB418\uB294 \uC0C1\uD0DC {{numberOfStatuses}}\uAC1C \uCD94\uAC00"}},ebullientworksTheme:"Ebullientworks \uD14C\uB9C8",itsThemeAndSlrvbCheckboxes:"ITS \uD14C\uB9C8 & SlRvb \uCCB4\uD06C\uBC15\uC2A4",lytModeTheme:"LYT Mode \uD14C\uB9C8 (\uB2E4\uD06C \uBAA8\uB4DC \uC804\uC6A9)",minimalTheme:"Minimal \uD14C\uB9C8",thingsTheme:"Things \uD14C\uB9C8"},coreStatuses:{buttons:{checkStatuses:{name:"\uC0C1\uD0DC \uAC80\uD1A0 \uBC0F \uD655\uC778",tooltip:"\uBCF4\uAD00\uC18C \uB8E8\uD2B8\uC5D0 \uD604\uC7AC \uC0C1\uD0DC \uC124\uC815\uC758 Mermaid \uB2E4\uC774\uC5B4\uADF8\uB7A8\uC744 \uD3EC\uD568\uD55C \uC0C8 \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4."}},description:{line1:"\uC774\uAC83\uB4E4\uC740 \uC0AC\uC6A9\uC790 \uC815\uC758 CSS\uB098 \uD14C\uB9C8 \uC5C6\uC774\uB3C4 Tasks\uAC00 \uC790\uCCB4\uC801\uC73C\uB85C \uC9C0\uC6D0\uD558\uB294 \uCF54\uC5B4 \uC0C1\uD0DC\uC785\uB2C8\uB2E4.",line2:"\uC544\uB798 \uC139\uC158\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uC9C1\uC811 \uD3B8\uC9D1\uD558\uACE0 \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},heading:"\uCF54\uC5B4 \uC0C1\uD0DC"},customStatuses:{buttons:{addAllUnknown:{name:"\uC54C \uC218 \uC5C6\uB294 \uBAA8\uB4E0 \uC0C1\uD0DC \uC720\uD615 \uCD94\uAC00"},addNewStatus:{name:"\uC0C8 \uC791\uC5C5 \uC0C1\uD0DC \uCD94\uAC00"},resetCustomStatuses:{name:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uAE30\uBCF8\uAC12\uC73C\uB85C \uC7AC\uC124\uC815"}},description:{line1:"\uBA3C\uC800 <b>CSS \uC2A4\uB2C8\uD3AB \uB610\uB294 \uD14C\uB9C8\uB97C \uC124\uCE58\uD558\uC5EC \uC0AC\uC6A9\uC790 \uC815\uC758 \uCCB4\uD06C\uBC15\uC2A4\uC5D0 \uC2A4\uD0C0\uC77C\uC744 \uC801\uC6A9</b>\uD558\uC138\uC694.",line2:"\uADF8 \uB2E4\uC74C, \uC544\uB798 \uBC84\uD2BC\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC120\uD0DD\uD55C \uCCB4\uD06C\uBC15\uC2A4 \uC2A4\uD0C0\uC77C\uC5D0 \uB9DE\uCDB0 \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uC124\uC815\uD558\uC138\uC694.",line3:"<b>\uCC38\uACE0:</b> \uC774\uC804\uC5D0 \uC815\uC758\uB41C \uC0C1\uD0DC\uC640 \uAE30\uD638\uAC00 \uB3D9\uC77C\uD55C \uC0C1\uD0DC\uB294 \uBB34\uC2DC\uB429\uB2C8\uB2E4. '\uC791\uC5C5 \uC0DD\uC131/\uD3B8\uC9D1' \uBA85\uB839\uC5B4\uC758 \uC0C1\uD0DC \uB4DC\uB86D\uB2E4\uC6B4 \uBA54\uB274\uC5D0\uC11C \uC2E4\uC81C\uB85C \uB85C\uB4DC\uB41C \uC0C1\uD0DC\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",line4:"\uC2DC\uC791\uD558\uB824\uBA74 \uBB38\uC11C\uB97C \uCC38\uACE0\uD558\uC138\uC694!"},heading:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC"},heading:"\uC791\uC5C5 \uC0C1\uD0DC"}}}});var YT,qT=Q(()=>{YT={main:{loadingPlugin:"Carregando plugin: {{name}} v{{version}}",unloadingPlugin:"Descarregando plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"Se ativa
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:"Adicionar nova predefini\xE7\xE3o"},line1:"Voc\xEA pode definir instru\xE7\xF5es nomeadas aqui, que podem ser reutilizadas em v\xE1rias consultas. Uma predefini\xE7\xE3o chamada '{{name}}' pode ser usada em consultas do Tasks com '{{instruction1}}' ou '{{instruction2}}'.",line2:"Quaisquer consultas do Tasks abertas s\xE3o recarregadas automaticamente quando as predefini\xE7\xF5es s\xE3o editadas.",name:"Predefini\xE7\xF5es (Presets)"},recurringTasks:{heading:"Tarefas recorrentes",nextLine:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o far\xE1 com que a pr\xF3xima recorr\xEAncia de uma tarefa apare\xE7a na linha logo abaixo da tarefa conclu\xEDda. Caso contr\xE1rio, a pr\xF3xima recorr\xEAncia aparecer\xE1 antes da conclu\xEDda.",name:"A pr\xF3xima recorr\xEAncia aparece na linha de baixo"},removeScheduledDate:{description:{line1:"A ativa\xE7\xE3o desta op\xE7\xE3o far\xE1 com que a pr\xF3xima recorr\xEAncia de uma tarefa n\xE3o tenha data Agendada (\u23F3), quando pelo menos uma das datas de In\xEDcio (\u{1F6EB}) ou Vencimento (\u{1F4C5}) estiver presente.",line2:"Isto \xE9 \xFAtil para quando voc\xEA deseja que as datas de In\xEDcio e Vencimento sejam mantidas na pr\xF3xima recorr\xEAncia, mas pretende definir a data Agendada no futuro, quando for planejar trabalhar nela."},name:"Remover data agendada na recorr\xEAncia"}},searchResults:{heading:"Resultados da pesquisa",taskCountLocation:{description:"Escolha se a contagem de tarefas deve ser mostrada na parte superior ou inferior dos resultados da consulta.",name:"Localiza\xE7\xE3o da contagem de tarefas",options:{bottom:"Inferior",top:"Superior"}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"Veja a documenta\xE7\xE3o",statuses:{collections:{anuppuccinTheme:"Tema AnuPpuccin",auraTheme:"Tema Aura",borderTheme:"Tema Border",buttons:{addCollection:{name:"{{themeName}}: Adicionar {{numberOfStatuses}} Status suportados"}},ebullientworksTheme:"Tema Ebullientworks",itsThemeAndSlrvbCheckboxes:"Tema ITS e Checkboxes SlRvb",lytModeTheme:"Tema LYT Mode (Somente modo escuro)",minimalTheme:"Tema Minimal",thingsTheme:"Tema Things"},coreStatuses:{buttons:{checkStatuses:{name:"Revisar e verificar seus Status",tooltip:"Criar um novo arquivo na raiz do cofre, contendo um diagrama Mermaid das configura\xE7\xF5es atuais de status."}},description:{line1:"Estes s\xE3o os status principais que o Tasks suporta nativamente, sem a necessidade de estilos CSS personalizados ou temas.",line2:"Voc\xEA pode adicionar e editar seus pr\xF3prios status personalizados na se\xE7\xE3o abaixo."},heading:"Status Principais"},customStatuses:{buttons:{addAllUnknown:{name:"Adicionar Todos os Tipos de Status Desconhecidos"},addNewStatus:{name:"Adicionar Novo Status de Tarefa"},resetCustomStatuses:{name:"Redefinir Tipos de Status Personalizados para os Padr\xF5es"}},description:{line1:"Primeiro, voc\xEA deve <b>selecionar e instalar um Snippet CSS ou Tema</b> para estilizar as caixas de sele\xE7\xE3o personalizadas.",line2:"Em seguida, use os bot\xF5es abaixo para configurar seus status personalizados, para que correspondam \xE0s caixas de sele\xE7\xE3o CSS escolhidas.",line3:"<b>Nota:</b> Qualquer status com o mesmo s\xEDmbolo de um status anterior ser\xE1 ignorado. Voc\xEA pode confirmar os status que foram realmente carregados executando o comando 'Criar ou editar tarefa' e olhando a lista suspensa de Status.",line4:"Veja a documenta\xE7\xE3o para come\xE7ar!"},heading:"Status Personalizados"},heading:"Status das Tarefas"}}}});var $T,UT=Q(()=>{$T={main:{loadingPlugin:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0438\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u044B\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0438\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u0415\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u044D\u0442\u043E\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u0433\u043E\u0440\u044F\u0447\u0443\u044E \u043A\u043B\u0430\u0432\u0438\u0448\u0443 \u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0441 \u0435\u0435 \u043F\u043E\u043C\u043E\u0449\u044C\u044E.",name:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430"},editNextStatusSymbol:{description:"\u041F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u044D\u0442\u043E \u0441\u0438\u043C\u0432\u043E\u043B, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0435\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0438",nextLine:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u043F\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043A \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412 \u043F\u0440\u043E\u0442\u0438\u0432\u043D\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439.",name:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C {{numberOfStatuses}} \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0438 \u0444\u043B\u0430\u0436\u043A\u0438 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u043E \u0442\u0435\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u0422\u0435\u043C\u0430 Minimal",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B \u0432 \u043A\u043E\u0440\u043D\u0435 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 Mermaid \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0443 \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432."}},description:{line1:"\u042D\u0442\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 Tasks \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E, \u0431\u0435\u0437 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 CSS \u0441\u0442\u0438\u043B\u0435\u0439 \u0438\u043B\u0438 \u0442\u0435\u043C.",line2:"\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \u043D\u0438\u0436\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u0442\u0438\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"},addNewStatus:{name:"\u0414\u043E\u0431\u0
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:"Yeni \xF6n ayar ekle"},line1:"Burada birden fazla sorguda yeniden kullanabilece\u011Finiz adland\u0131r\u0131lm\u0131\u015F talimatlar tan\u0131mlayabilirsiniz. '{{name}}' adl\u0131 bir \xF6n ayar, Tasks sorgular\u0131nda '{{instruction1}}' veya '{{instruction2}}' ile kullan\u0131labilir.",line2:"\xD6n ayarlar d\xFCzenlendi\u011Finde a\xE7\u0131k Tasks sorgular\u0131 otomatik olarak yeniden y\xFCklenir.",name:"\xD6n Ayarlar"},recurringTasks:{heading:"Tekrarlayan g\xF6revler",nextLine:{description:"Bu se\xE7ene\u011Fi etkinle\u015Ftirirseniz, bir g\xF6revin sonraki tekrar\u0131 tamamlanan g\xF6revin alt\u0131ndaki sat\u0131rda g\xF6r\xFCn\xFCr. Aksi takdirde sonraki tekrar tamamlanandan \xF6nce g\xF6r\xFCn\xFCr.",name:"Sonraki tekrar bir alt sat\u0131rda g\xF6r\xFCns\xFCn"},removeScheduledDate:{description:{line1:"Bu se\xE7ene\u011Fi etkinle\u015Ftirirseniz, Ba\u015Flang\u0131\xE7 (\u{1F6EB}) veya Son Tarih (\u{1F4C5}) tarihlerinden en az biri mevcutsa g\xF6revin sonraki tekrar\u0131nda Zamanlanm\u0131\u015F (\u23F3) tarih olmaz.",line2:"Bu se\xE7enek; Ba\u015Flang\u0131\xE7 ve Son Tarih tarihlerinin bir sonraki tekrara ta\u015F\u0131nmas\u0131n\u0131, ancak Zamanlanm\u0131\u015F tarihin \xFCzerinde \xE7al\u0131\u015Fmay\u0131 planlad\u0131\u011F\u0131n\u0131zda ileride belirlenmesini istedi\u011Finizde kullan\u0131\u015Fl\u0131d\u0131r."},name:"Tekrarda zamanlanm\u0131\u015F tarihi kald\u0131r"}},searchResults:{heading:"Arama sonu\xE7lar\u0131",taskCountLocation:{description:"G\xF6rev say\u0131s\u0131n\u0131n sorgu sonu\xE7lar\u0131n\u0131n \xFCst\xFCnde mi yoksa alt\u0131nda m\u0131 g\xF6sterilece\u011Fini se\xE7in.",name:"G\xF6rev say\u0131s\u0131 konumu",options:{bottom:"Alt",top:"\xDCst"}}},searches:{enableCustomSearches:{description:{line1:"Tasks sorgular\u0131nda JavaScript \xE7al\u0131\u015Ft\u0131ran '{{filterByFunction}}', '{{sortByFunction}}' ve '{{groupByFunction}}' \xF6zelliklerini etkinle\u015Ftirir.",line2:"Bir Tasks sorgusunda veya Markdown dosyas\u0131nda k\xF6t\xFC ama\xE7l\u0131 JavaScript, Obsidian i\xE7inde \xE7al\u0131\u015Farak kasa i\xE7eriklerinize, yerel dosyalar\u0131n\u0131za veya di\u011Fer sistem kaynaklar\u0131na eri\u015Febilir ya da bunlar\u0131 de\u011Fi\u015Ftirebilir.",line3:"Bunu yaln\u0131zca bu kasan\u0131n mevcut ve gelecekteki i\xE7eriklerine (ba\u015Fkalar\u0131ndan daha sonra indirebilece\u011Finiz, kopyalayabilece\u011Finiz veya e\u015Fitleyebilece\u011Finiz dosyalar dahil) g\xFCveniyorsan\u0131z etkinle\u015Ftirin.",line4:"Bu ayar yaln\u0131zca bu cihazda saklan\u0131r; bu kasay\u0131 kulland\u0131\u011F\u0131n\u0131z her cihazda ayr\u0131 ayr\u0131 etkinle\u015Ftirin."},name:"\xD6zel aramalar\u0131 etkinle\u015Ftir"},heading:"Aramalar"},seeTheDocumentation:"Belgelere bak\u0131n",statuses:{collections:{anuppuccinTheme:"AnuPpuccin Temas\u0131",auraTheme:"Aura Temas\u0131",borderTheme:"Border Temas\u0131",buttons:{addCollection:{name:"{{themeName}}: {{numberOfStatuses}} desteklenen Durumu ekle"}},ebullientworksTheme:"Ebullientworks Temas\u0131",itsThemeAndSlrvbCheckboxes:"ITS Temas\u0131 & SlRvb Onay Kutular\u0131",lytModeTheme:"LYT Mode Temas\u0131 (Yaln\u0131zca karanl\u0131k mod)",minimalTheme:"Minimal Tema",thingsTheme:"Things Temas\u0131"},coreStatuses:{buttons:{checkStatuses:{name:"Durumlar\u0131n\u0131z\u0131 inceleyin ve kontrol edin",tooltip:"Kasan\u0131n k\xF6k dizininde, mevcut durum ayarlar\u0131n\u0131n Mermaid diyagram\u0131n\u0131 i\xE7eren yeni bir dosya olu\u015Fturur."}},description:{line1:"Bunlar, Tasks'\u0131n \xF6zel CSS stillendirmesi veya tema gerektirmeksizin yerel olarak destekledi\u011Fi temel durumlard\u0131r.",line2:"A\u015Fa\u011F\u0131daki b\xF6l\xFCmde kendi \xF6zel durumlar\u0131n\u0131z\u0131 d\xFCzenleyebilir ve ekleyebilirsiniz."},heading:"Temel Durumlar"},customStatuses:{buttons:{addAllUnknown:{name:"T\xFCm Bilinmeyen Durum T\xFCrlerini Ekle"},addNewStatus:{name:"Yeni G\xF6rev Durumu Ekle"},resetCustomStatuses:{name:"\xD6zel Durum T\xFCrlerini Varsay\u0131lanlara S\u0131f\u0131rla"}},description:{line1:"\xD6nce \xF6zel onay kutular\u0131n\u0131 \u015Fekillendirmek i\xE7in <b>bir CSS Snippet veya Tema se\xE7ip y\xFCkleyin</b>.",line2:"Ard\u0131ndan, se\xE7ti\u011Finiz CSS onay kutular\u0131yla e\u015Fle\u015Fecek \u015Fekilde \xF6zel durumlar\u0131n\u0131z\u0131 ayarlamak i\xE7in a\u015Fa\u011F\u0131daki d\xFC\u011Fmeleri kullan\u0131n.",line3:"<b>Not:</b> Daha \xF6nce yer alan durumlarla ayn\u0131 simgeye sahip durumlar yok say\u0131l\u0131r. Ger\xE7ekte y\xFCklenen durumlar\u0131 'G\xF6rev olu\u015Ftur veya d\xFCzenle' komutunu \xE7al\u0131\u015Ft\u0131r\u0131p Durum a\xE7\u0131l\u0131r men\xFCs\xFCne bakarak do\u011Frulayabilirsiniz.",line4:"Ba\u015Flamak i\xE7in belgelere bak\u0131n!"},heading:"\xD6zel Durumlar"},heading:"G\xF6rev Durumlar\u0131"}}}});var BT,HT=Q(()=>{BT={main:{loadingPlugin:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043F\u043B\u0
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456",nextLine:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0437\u043C\u0443\u0441\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456. \u0406\u043D\u0430\u043A\u0448\u0435 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u044E.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0434\u0430\u0442\u0438 {{numberOfStatuses}} \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u043B\u0438\u0448\u0435 \u0442\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0442\u0435\u043C\u0430",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438",tooltip:"\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u043D\u043E\u0432\u0438\u0439 \u0444\u0430\u0439\u043B \u0443 \u043A\u043E\u0440\u0435\u043D\u0456 \u0441\u0445\u043E\u0432\u0438\u0449\u0430, \u0449\u043E \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443 Mermaid \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0445 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0426\u0435 \u043E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u044F\u043A\u0456 Tasks \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043D\u0430\u0442\u0438\u0432\u043D\u043E, \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0438 \u0432 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u043E\u043C\u0443 CSS-\u0441\u0442\u0438\u043B\u044E\u0432\u0430\u043D\u043D\u0456 \u0447\u0438 \u0442\u0435\u043C\u0430\u0445.",line2:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438, \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u043D\u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432 \u0440\u043E\u0437\u0434\u0456\u043B\u0456 \u043D\u0438\u0436\u0447\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u0432\u0441\u0456 \u043D\u0435\u0432\u0456\u0434\u043E\u043C\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"},addNewStatus:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0456"},resetCustomStatuses:{name:"\u0421\u043A\u0438\u043D\u0443\u0442\u0438 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u04
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:"Th\xEAm preset m\u1EDBi"},line1:"B\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a c\xE1c h\u01B0\u1EDBng d\u1EABn \u0111\u01B0\u1EE3c \u0111\u1EB7t t\xEAn \u1EDF \u0111\xE2y, m\xE0 b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng l\u1EA1i trong nhi\u1EC1u truy v\u1EA5n. M\u1ED9t preset c\xF3 t\xEAn '{{name}}' c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng trong truy v\u1EA5n Tasks v\u1EDBi '{{instruction1}}' ho\u1EB7c '{{instruction2}}'.",line2:"B\u1EA5t k\u1EF3 truy v\u1EA5n Tasks n\xE0o \u0111ang m\u1EDF s\u1EBD \u0111\u01B0\u1EE3c t\u1EA3i l\u1EA1i t\u1EF1 \u0111\u1ED9ng khi c\xE1c preset \u0111\u01B0\u1EE3c ch\u1EC9nh s\u1EEDa.",name:"Preset"},recurringTasks:{heading:"Nhi\u1EC7m v\u1EE5 \u0111\u1ECBnh k\u1EF3",nextLine:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD l\xE0m cho l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo c\u1EE7a nhi\u1EC7m v\u1EE5 xu\u1EA5t hi\u1EC7n tr\xEAn d\xF2ng b\xEAn d\u01B0\u1EDBi nhi\u1EC7m v\u1EE5 \u0111\xE3 ho\xE0n th\xE0nh. N\u1EBFu kh\xF4ng, l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo s\u1EBD xu\u1EA5t hi\u1EC7n tr\u01B0\u1EDBc l\u1EA7n \u0111\xE3 ho\xE0n th\xE0nh.",name:"L\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo xu\u1EA5t hi\u1EC7n tr\xEAn d\xF2ng b\xEAn d\u01B0\u1EDBi"},removeScheduledDate:{description:{line1:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD l\xE0m cho l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo c\u1EE7a nhi\u1EC7m v\u1EE5 kh\xF4ng c\xF3 ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch (\u23F3), khi \xEDt nh\u1EA5t m\u1ED9t trong c\xE1c ng\xE0y B\u1EAFt \u0111\u1EA7u (\u{1F6EB}) ho\u1EB7c \u0110\u1EBFn h\u1EA1n (\u{1F4C5}) c\xF3 m\u1EB7t.",line2:"\u0110i\u1EC1u n\xE0y d\xE0nh cho khi b\u1EA1n mu\u1ED1n ng\xE0y B\u1EAFt \u0111\u1EA7u v\xE0 \u0110\u1EBFn h\u1EA1n \u0111\u01B0\u1EE3c chuy\u1EC3n ti\u1EBFp sang l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo, nh\u01B0ng b\u1EA1n s\u1EBD \u0111\u1EB7t ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch trong t\u01B0\u01A1ng lai, m\u1ED9t khi b\u1EA1n d\u1EF1 \u0111\u1ECBnh l\xE0m vi\u1EC7c v\u1EDBi n\xF3."},name:"X\xF3a ng\xE0y \u0111\xE3 l\xEAn l\u1ECBch khi l\u1EB7p l\u1EA1i"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"Xem t\xE0i li\u1EC7u",statuses:{collections:{anuppuccinTheme:"Theme AnuPpuccin",auraTheme:"Theme Aura",borderTheme:"Theme Border",buttons:{addCollection:{name:"{{themeName}}: Th\xEAm {{numberOfStatuses}} Tr\u1EA1ng th\xE1i \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3"}},ebullientworksTheme:"Theme Ebullientworks",itsThemeAndSlrvbCheckboxes:"Theme ITS & SlRvb Checkboxes",lytModeTheme:"Theme LYT Mode (Ch\u1EC9 ch\u1EBF \u0111\u1ED9 t\u1ED1i)",minimalTheme:"Theme Minimal",thingsTheme:"Theme Things"},coreStatuses:{buttons:{checkStatuses:{name:"Xem x\xE9t v\xE0 ki\u1EC3m tra Tr\u1EA1ng th\xE1i c\u1EE7a b\u1EA1n",tooltip:"T\u1EA1o file m\u1EDBi trong th\u01B0 m\u1EE5c g\u1ED1c c\u1EE7a vault, ch\u1EE9a s\u01A1 \u0111\u1ED3 Mermaid c\u1EE7a c\xE1c c\xE0i \u0111\u1EB7t tr\u1EA1ng th\xE1i hi\u1EC7n t\u1EA1i."}},description:{line1:"\u0110\xE2y l\xE0 c\xE1c tr\u1EA1ng th\xE1i c\u1ED1t l\xF5i m\xE0 Tasks h\u1ED7 tr\u1EE3 nguy\xEAn b\u1EA3n, kh\xF4ng c\u1EA7n CSS t\xF9y ch\u1EC9nh ho\u1EB7c theme.",line2:"B\u1EA1n c\xF3 th\u1EC3 th\xEAm ch\u1EC9nh s\u1EEDa v\xE0 th\xEAm c\xE1c tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh c\u1EE7a ri\xEAng b\u1EA1n trong ph\u1EA7n b\xEAn d\u01B0\u1EDBi."},heading:"Tr\u1EA1ng th\xE1i c\u1ED1t l\xF5i"},customStatuses:{buttons:{addAllUnknown:{name:"Th\xEAm t\u1EA5t c\u1EA3 lo\u1EA1i tr\u1EA1ng th\xE1i kh\xF4ng x\xE1c \u0111\u1ECBnh"},addNewStatus:{name:"Th\xEAm tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5 m\u1EDBi"},resetCustomStatuses:{name:"\u0110\u1EB7t l\u1EA1i lo\u1EA1i tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh v\u1EC1 m\u1EB7c \u0111\u1ECBnh"}},description:{line1:"Tr\u01B0\u1EDBc ti\xEAn, b\u1EA1n n\xEAn <b>ch\u1ECDn v\xE0 c\xE0i \u0111\u1EB7t CSS Snippet ho\u1EB7c Theme</b> \u0111\u1EC3 t\u1EA1o ki\u1EC3u cho c\xE1c \xF4 \u0111\xE1nh d\u1EA5u t\xF9y ch\u1EC9nh.",line2:"Sau \u0111\xF3, s\u1EED d\u1EE5ng c\xE1c n\xFAt b\xEAn d\u01B0\u1EDBi \u0111\u1EC3 thi\u1EBFt l\u1EADp tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh c\u1EE7a b\u1EA1n, \u0111\u1EC3 kh\u1EDBp v\u1EDBi c\xE1c \xF4 \u0111\xE1nh d\u1EA5u CSS b\u1EA1n \u0111\xE3 ch\u1ECDn.",line3:"<b>L\u01B0u \xFD</b> B\u1EA5t k\u1EF3 tr\u1EA1ng th\xE1i n\xE0o c\xF3 c\xF9ng k\xFD hi\u1EC7u v\u1EDBi b\u1EA5t k\u1EF3 tr\u1EA1ng th\xE1i tr\u01B0\u1EDBc \u0111\xF3 n\xE0o s\u1EBD b\u1ECB b\u1ECF qua. B\u1EA1n c\xF3 th\u1EC3 x\xE1c nh\u1EADn c\xE1c tr\u1EA1ng th\xE1i th\u1EF1c s\u1EF1 \u0111\u01B0\u1EE3c t\u1EA3i b\u1EB1ng c\xE1ch ch\u1EA1y l\u1EC7nh 'T\u1EA1o ho\u1EB7c ch\u1EC9nh s\u1EEDa nhi\u1EC7m v\u1EE5' v\xE0 xem menu th\u1EA3 xu\u1ED1ng Tr\u1EA1ng th\xE1i.",line4:"Xem t\xE0i li\u1EC7u \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u!"},heading:"Tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh"},heading:"
Line truncated
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`}},presets:{buttons:{addNewPreset:""},line1:"\u60A8\u53EF\u4EE5\u5728\u8FD9\u91CC\u5B9A\u4E49\u547D\u540D\u6307\u4EE4\uFF0C\u53EF\u4EE5\u5728\u591A\u4E2A\u67E5\u8BE2\u4E2D\u91CD\u590D\u4F7F\u7528\u3002\u4E00\u4E2A\u540D\u4E3A '{{name}}' \u7684\u9884\u8BBE\u53EF\u4EE5\u5728\u4EFB\u52A1\u67E5\u8BE2\u4E2D\u4F7F\u7528 '{{instruction1}}' \u6216 '{{instruction2}}'\u3002",line2:"\u4EFB\u4F55\u6253\u5F00\u7684\u4EFB\u52A1\u67E5\u8BE2\u5728\u9884\u8BBE\u88AB\u7F16\u8F91\u65F6\u90FD\u4F1A\u81EA\u52A8\u91CD\u65B0\u52A0\u8F7D\u3002",name:"\u9884\u8BBE"},recurringTasks:{heading:"\u91CD\u590D\u6027\u4EFB\u52A1",nextLine:{description:"\u542F\u7528\u6B64\u529F\u80FD\u540E\uFF0C\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u663E\u793A\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0B\u4E00\u884C\u3002\u82E5\u5173\u95ED\u6B64\u529F\u80FD\uFF0C\u5219\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u51FA\u73B0\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0A\u4E00\u884C\u3002",name:"\u628A\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u653E\u5728\u4E0B\u4E00\u884C"},removeScheduledDate:{description:{line1:"\u5F00\u542F\u6B64\u9009\u9879\u540E\uFF0C\u5F53\u4EFB\u52A1\u81F3\u5C11\u8BBE\u7F6E\u4E86\u5F00\u59CB\u65E5\u671F(\u{1F6EB})\u6216\u8BA1\u5212\u65E5\u671F(\u{1F4C5})\u4E2D\u7684\u4E00\u4E2A\u65F6\uFF0C\u8BE5\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5468\u671F\u5C06\u4E0D\u518D\u5305\u542B\u8BA1\u5212\u65E5\u671F(\u23F3)\u3002",line2:"\u6B64\u529F\u80FD\u9002\u7528\u4E8E\u4F60\u5E0C\u671B\u5C06\u5F00\u59CB\u548C\u622A\u6B62\u65E5\u671F\u5EF6\u7EED\u5230\u4E0B\u4E00\u4E2A\u5468\u671F\uFF0C\u4F46\u8BA1\u5212\u65E5\u671F\u6682\u4E0D\u8BBE\u7F6E\uFF0C\u7B49\u5B9E\u9645\u5F00\u59CB\u5904\u7406\u65F6\u518D\u786E\u5B9A\u7684\u60C5\u51B5\u3002"},name:"\u5728\u91CD\u590D\u6027\u4EFB\u52A1\u4E2D\u79FB\u9664\u8BA1\u5212\u65E5\u671F"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},searches:{enableCustomSearches:{description:{line1:"",line2:"",line3:"",line4:""},name:""},heading:""},seeTheDocumentation:"\u53C2\u9605\u6587\u6863",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \u4E3B\u9898",auraTheme:"Aura \u4E3B\u9898",borderTheme:"Border \u4E3B\u9898",buttons:{addCollection:{name:"{{themeName}}: \u6DFB\u52A0 {{numberOfStatuses}} \u79CD\u652F\u6301\u72B6\u6001"}},ebullientworksTheme:"Ebullientworks \u4E3B\u9898",itsThemeAndSlrvbCheckboxes:"ITS \u4E3B\u9898\u548C SlRvb \u590D\u9009\u6846",lytModeTheme:"LYT Mode \u4E3B\u9898 (\u4EC5\u6DF1\u8272\u6A21\u5F0F)",minimalTheme:"Minimal \u4E3B\u9898",thingsTheme:"Things \u4E3B\u9898"},coreStatuses:{buttons:{checkStatuses:{name:"\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001",tooltip:"\u5728\u5E93\u7684\u6839\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6,\u5305\u542B\u5F53\u524D\u72B6\u6001\u8BBE\u7F6E\u7684 Mermaid \u56FE\u8868."}},description:{line1:"\u8FD9\u4E9B\u662F Tasks \u539F\u751F\u652F\u6301\u7684\u6838\u5FC3\u72B6\u6001\uFF0C\u4E0D\u9700\u8981\u81EA\u5B9A\u4E49CSS\u6837\u5F0F\u6216\u4E3B\u9898\u3002",line2:"\u60A8\u53EF\u4EE5\u5728\u4E0B\u9762\u7F16\u8F91\u548C\u6DFB\u52A0\u81EA\u5B9A\u4E49\u72B6\u6001\u3002"},heading:"\u6838\u5FC3\u72B6\u6001"},customStatuses:{buttons:{addAllUnknown:{name:"\u6DFB\u52A0\u6240\u6709\u672A\u77E5\u72B6\u6001\u7C7B\u578B"},addNewStatus:{name:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u72B6\u6001"},resetCustomStatuses:{name:"\u91CD\u7F6E\u81EA\u5B9A\u4E49\u72B6\u6001\u7C7B\u578B\u4E3A\u9ED8\u8BA4\u503C"}},description:{line1:"\u60A8\u5E94\u8BE5\u9996\u5148<b>\u9009\u62E9\u5E76\u5B89\u88C5 CSS\u4EE3\u7801\u6BB5\u6216\u4E3B\u9898<b>\u4EE5\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u590D\u9009\u6846\u7684\u6837\u5F0F",line2:"\u7136\u540E\uFF0C\u4F7F\u7528\u4E0B\u9762\u7684\u6309\u94AE\u8BBE\u7F6E\u60A8\u7684\u81EA\u5B9A\u4E49\u72B6\u6001,\u4EE5\u5339\u914D\u60A8\u9009\u62E9\u7684CSS\u590D\u9009\u6846.",line3:"<b>\u6CE8\u610F</b>\u4EFB\u4F55\u4E0E\u66F4\u65E9\u7684\u72B6\u6001\u5177\u6709\u76F8\u540C\u7B26\u53F7\u7684\u72B6\u6001\u90FD\u5C06\u88AB\u5FFD\u7565.\u60A8\u53EF\u4EE5\u901A\u8FC7\u8FD0\u884C\u201CCreate or edit task\u201D\u547D\u4EE4\u5E76\u67E5\u770B\u201CStatus\u201D\u4E0B\u62C9\u5217\u8868\u6765\u786E\u8BA4\u5B9E\u9645\u52A0\u8F7D\u7684\u72B6\u6001\u3002",line4:"\u53C2\u9605\u6587\u6863\uFF01"},heading:"\u81EA\u5B9A\u4E49\u72B6\u6001"},heading:"\u4EFB\u52A1\u72B6\u6001"}}}});var QT,op,qR,ZT,x,Fr=Q(()=>{"use strict";RT();QT=require("obsidian");CT();AT();IT();FT();qT();UT();jT();HT();GT();VT();op=!1,qR=()=>(0,QT.getLanguage)()||"en",ZT=()=>A(null,null,function*(){op||(yield Et.init({lng:qR(),fallbackLng:"en",returnEmptyString:!1,resources:{be:{translation:MT},de:{translation:PT},en:{translation:NT},ko:{translation:LT},"pt-BR":{translation:YT},ru:{translation:$T},tr:{translation:WT},uk:{translation:BT},vi:{translation:zT},zh:{translation:KT}},interpolation:{escapeValue:!1}}),op=!0)}),x=new Proxy(Et,{get(n,t){if(!op&&t==="t")throw new Error("i18n.t() called before initialization. Call
Line truncated
|
||||
`).map(TY).filter(function(e){return e!==null});return Yt(Yt({},t[0]),t[1])}function Rl(n){var t={},e=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!e)return t;var r=e[1],i=e[2];return r&&(t.tzid=r),t.dtstart=El(i),t}function TY(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var t=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!t)return KS(n);var e=t[1];switch(e.toUpperCase()){case"RRULE":case"EXRULE":return KS(n);case"DTSTART":return Rl(n);default:throw new Error("Unsupported RFC prop ".concat(e," in ").concat(n))}}function KS(n){var t=n.replace(/^RRULE:/i,""),e=Rl(t),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":e.freq=Me[o.toUpperCase()];break;case"WKST":e.wkst=rr[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=vY(o),u=a.toLowerCase();e[u]=l;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=kY(o);break;case"DTSTART":case"TZID":var c=Rl(n);e.tzid=c.tzid,e.dtstart=c.dtstart;break;case"UNTIL":e.until=El(o);break;case"BYEASTER":e.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),e}function vY(n){if(n.indexOf(",")!==-1){var t=n.split(",");return t.map(QS)}return QS(n)}function QS(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function kY(n){var t=n.split(",");return t.map(function(e){if(e.length===2)return rr[e];var r=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!r||r.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var i=Number(r[1]),s=r[2],a=rr[s].weekday;return new bt(a,i)})}var yy=Q(()=>{Wr();vi();vs();Gt();nr()});var Ss,Cc=Q(()=>{Gt();Ss=(function(){function n(t,e){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var t=va(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:NS(this.date,this.tzid)},n})()});function Ml(n){for(var t=[],e="",r=Object.keys(n),i=Object.keys(xl),s=0;s<r.length;s++)if(r[s]!=="tzid"&&Ye(i,r[s])){var a=r[s].toUpperCase(),o=n[r[s]],l="";if(!(!it(o)||qt(o)&&!o.length)){switch(a){case"FREQ":l=oe.FREQUENCIES[n.freq];break;case"WKST":Fn(o)?l=new bt(o).toString():l=o.toString();break;case"BYWEEKDAY":a="BYDAY",l=CS(o).map(function(p){return p instanceof bt?p:qt(p)?new bt(p[0],p[1]):new bt(p)}).toString();break;case"DTSTART":e=wY(o,n.tzid);break;case"UNTIL":l=va(o,!n.tzid);break;default:if(qt(o)){for(var u=[],c=0;c<o.length;c++)u[c]=String(o[c]);l=u.toString()}else l=String(o)}l&&t.push([a,l])}}var d=t.map(function(p){var h=p[0],b=p[1];return"".concat(h,"=").concat(b.toString())}).join(";"),f="";return d!==""&&(f="RRULE:".concat(d)),[e,f].filter(function(p){return!!p}).join(`
|
||||
`)}function wY(n,t){return n?"DTSTART"+new Ss(new Date(n),t).toString():""}var by=Q(()=>{nr();mn();vs();Gt();Cc()});function _Y(n,t){return Array.isArray(n)?!Array.isArray(t)||n.length!==t.length?!1:n.every(function(e,r){return e.getTime()===t[r].getTime()}):n instanceof Date?t instanceof Date&&n.getTime()===t.getTime():n===t}var ZS,XS=Q(()=>{Oc();Gt();mn();ZS=(function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(t,e,r){e&&(e=e instanceof Date?Dc(e):fy(e)),t==="all"?this.all=e:(r._value=e,this[t].push(r))},n.prototype._cacheGet=function(t,e){var r=!1,i=e?Object.keys(e):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!_Y(e[f],c[f]))return!0}return!1},a=this[t];if(t==="all")r=this.all;else if(qt(a))for(var o=0;o<a.length;o++){var l=a[o];if(!(i.length&&s(l))){r=l._value;break}}if(!r&&this.all){for(var u=new Ti(t,e),o=0;o<this.all.length&&u.accept(this.all[o]);o++);r=u.getValue(),this._cacheAdd(t,r,e)}return qt(r)?fy(r):r instanceof Date?Dc(r):r},n})()});var JS,eE,SY,EY,$i,zt,tE,nE,DY,OY,ji,Vt,rE,iE,sE,aE,Ty,oE=Q(()=>{Wr();mn();JS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Fe(1,31),!0),Fe(2,28),!0),Fe(3,31),!0),Fe(4,30),!0),Fe(5,31),!0),Fe(6,30),!0),Fe(7,31),!0),Fe(8,31),!0),Fe(9,30),!0),Fe(10,31),!0),Fe(11,30),!0),Fe(12,31),!0),Fe(1,7),!0),eE=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Fe(1,31),!0),Fe(2,29),!0),Fe(3,31),!0),Fe(4,30),!0),Fe(5,31),!0),Fe(6,30),!0),Fe(7,31),!0),Fe(8,31),!0),Fe(9,30),!0),Fe(10,31),!0),Fe(11,30),!0),Fe(12,31),!0),Fe(1,7),!0),SY=tr(1,29),EY=tr(1,30),$i=tr(1,31),zt=tr(1,32),tE=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],zt,!0),EY,!0),zt,!0),$i,!0),zt,!0),$i,!0),zt,!0),zt,!0),$i,!0),zt,!0),$i,!0),zt,!0),zt.slice(0,7),!0),nE=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],zt,!0),SY,!0),zt,!0),$i,!0),zt,!0),$i,!0),zt,!0),zt,!0),$i,!0),zt,!0),$i,!0),zt,!0),zt.slice(0,7),!0),DY=tr(-28,0),OY=tr(-29,0),ji=tr(-30,0),Vt=tr(-31,0),rE=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Vt,!0),OY,!0),Vt,!0),ji,!0),Vt,!0),ji,!0),Vt,!0),Vt,!0),ji,!0),Vt,!0),ji,!0),Vt,!0),Vt.slice(0,7),!0),iE=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Vt,!0),DY,!0),Vt,!0),ji,!0),Vt,!0),ji,!0),Vt,!0),Vt,!0),ji,!0),Vt,!0),ji,!0),Vt,!0),Vt.slice(0,7),!0),sE=[0,31,60,91,121,152,182,213,244,274,305,335,366],aE=[0,31,59,90,120,151,181,212,243,273,304,334,365],Ty=(function(){for(var n=[],t=0;t<55;t++)n=n.concat(tr(7));return n})()});function lE(n,t){var e=jr(n,1,1),r=Ta(n)?366:365,i=Ta(n+1)?366:365,s=Sl(e),a=yi(e),o=Yt(Yt({yearlen:r,nextyearlen:i,yearordinal:s,yearweekday:a},xY(n)),{wnomask:null});if(Ln(t.byweekno))return o;o.wnomask=Fe(0,r+7);var l,u,c=l=Bt(7-a+t.wkst,7);c>=4?(c=0,u=o.yearlen+Bt(a-t.wkst,7)):u=r-c;for(var d=Math.floor(u/7),f=Bt(u,7),p=Math.floor(d+f/4),h=0;h<t.byweekno.length;h++){var b=t.byweekno[h];if(b<0&&(b+=p+1),b>0&&b<=p){var v=void 0;b>1?(v=c+(b-1)*7,c!==l&&(v-=7-l)):v=c;for(var D=0;D<7&&(o.wnomask[v]=1,v++,o.wdaymask[v]!==t.wkst);D++);}}if(Ye(t.byweekno,1)){var v=c+p*7;if(c!==l&&(v-=7-l),v<r)for(var h=0;h<7&&(o.wnomask[v]=1,v+=1,o.wdaymask[v]!==t.wkst);h++);}if(c){var C=void 0;if(Ye(t.byweekno,-1))C=-1;else{var O=yi(jr(n-1,1,1)),U=Bt(7-O.valueOf()+t.wkst,7),ee=Ta(n-1)?366:365,V=void 0;U>=4?(U=0,V=ee+Bt(O-t.wkst,7)):V=r-c,C=Math.floor(52+Bt(V,7)/4)}if(Ye(t.byweekno,C))for(var v=0;v<c;v++)o.wnomask[v]=1}return o}function xY(n){var t=Ta(n)?366:365,e=jr(n,1,1),r=yi(e);return t===365?{mmask:JS,mdaymask:nE,nmdaymask:iE,wdaymask:Ty.slice(r),mrange:aE}:{mmask:eE,mdaymask:tE,nmdaymask:rE,wdaymask:Ty.slice(r),mrange:sE}}var uE=Q(()=>{Wr();Gt();mn();oE()});function cE(n,t,e,r,i,s){var a={lastyear:n,lastmonth:t,nwdaymask:[]},o=[];if(s.freq===oe.YEARLY)if(Ln(s.bymonth))o=[[0,e]];else for(var l=0;l<s.bymonth.length;l++)t=s.bymonth[l],o.push(r.slice(t-1,t+1));else s.freq===oe.MONTHLY&&(o=[r.slice(t-1,t+1)]);if(Ln(o))return a;a.nwdaymask=Fe(0,e);for(var l=0;l<o.length;l++)for(var u=o[l],c=u[0],d=u[1]-1,f=0;f<s.bynweekday.length;f++){var p=void 0,h=s.bynweekday[f],b=h[0],v=h[1];v<0?(p=d+(v+1)*7,p-=Bt(i[p]-b,7)):(p=c+(v-1)*7,p+=Bt(7-i[p]+b,7)),c<=p&&p<=d&&(a.nwdaymask[p]=1)}return a}var dE=Q(()=>{nr();mn()});function fE(n,t){t===void 0&&(t=0);var e=n%19,r=Math.floor(n/100),i=n%100,s=Math.floor(r/4),a=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),u=Math.floor(19*e+r-s-l+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-u-d)%7,p=Math.floor((e+11*u+22*f)/451),h=Math.floor((u+f-7*p+114)/31),b=(u+f-7*p+114)%31+1,v=Date.UTC(n,h-1,b+t),D=Date.UTC(n,0,1);return[Math.ceil((v-D)/(1e3*60*60*24))]}var pE=Q(()=>{});var RY,mE,hE=Q(()=>{mn();vi();uE();dE();pE();Rc();Gt();RY=(function(){function n(t){this.options=t}return n.prototype.rebuild=function(t,e){var r=this.options;if(t!==this.lastyear&&(this.yearinfo=lE(t,r)),pt(r.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=cE(t,e,s,a,o,r)}it(r.byeaster)&&(this.eastermask=fE(t,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,con
Line truncated
|
||||
`),r=0;r<e.length;){var i=e[r]=e[r].replace(/\s+$/g,"");i?r>0&&i[0]===" "?(e[r-1]+=i.slice(1),e.splice(r,1)):r+=1:e.splice(r,1)}return e}function YY(n){n.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function wE(n,t){return YY(t),n.split(",").map(function(e){return El(e)})}var kE,wy=Q(()=>{Wr();nr();Sy();Gt();mn();yy();kE={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function _E(n){var t=this;return function(e){if(e!==void 0&&(t["_".concat(n)]=e),t["_".concat(n)]!==void 0)return t["_".concat(n)];for(var r=0;r<t._rrule.length;r++){var i=t._rrule[r].origOptions[n];if(i)return i}}}function SE(n,t){if(!(n instanceof oe))throw new TypeError(String(n)+" is not RRule instance");Ye(t.map(String),String(n))||t.push(n)}function EE(n,t){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Ye(t.map(Number),Number(n))||(t.push(n),bi(t))}function DE(n,t,e){var r=!e||e.toUpperCase()==="UTC",i=r?"".concat(n,":"):"".concat(n,";TZID=").concat(e,":"),s=t.map(function(a){return va(a.valueOf(),r)}).join(",");return"".concat(i).concat(s)}var _y,Sy=Q(()=>{Wr();nr();Gt();mn();vE();wy();by();_y=(function(n){ka(t,n);function t(e){e===void 0&&(e=!1);var r=n.call(this,{},e)||this;return r.dtstart=_E.apply(r,["dtstart"]),r.tzid=_E.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return t.prototype._iter=function(e){return TE(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){SE(e,this._rrule)},t.prototype.exrule=function(e){SE(e,this._exrule)},t.prototype.rdate=function(e){EE(e,this._rdate)},t.prototype.exdate=function(e){EE(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return Ac(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return Ac(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(Ml({dtstart:this._dtstart}))),this._rrule.forEach(function(r){e=e.concat(r.toString().split(`
|
||||
`))}),this._exrule.forEach(function(r){e=e.concat(r.toString().split(`
|
||||
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&e.push(DE("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(DE("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(`
|
||||
`)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(r){return e.rrule(r.clone())}),this._exrule.forEach(function(r){return e.exrule(r.clone())}),this._rdate.forEach(function(r){return e.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return e.exdate(new Date(r.getTime()))}),e},t})(oe)});var OE=Q(()=>{nr();Sy();wy();vi();vs();Gt()});var wi,Pc=Q(()=>{"use strict";OE();wi=class n{constructor({rrule:t,baseOnToday:e,occurrence:r}){this.rrule=t,this.baseOnToday=e,this.occurrence=r}static fromText({recurrenceRuleText:t,occurrence:e}){try{let r=t.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(r==null)return null;let i=r[1].trim(),s=r[2]!==void 0,a=oe.parseText(i);if(a!==null){let o=e.referenceDate;!s&&o!==null?a.dtstart=window.moment(o).startOf("day").utc(!0).toDate():a.dtstart=window.moment().startOf("day").utc(!0).toDate();let l=new oe(a);return new n({rrule:l,baseOnToday:s,occurrence:e})}}catch(r){return null}return null}toText(){let t=this.rrule.toText();return this.baseOnToday&&(t+=" when done"),t}next(t=window.moment()){let e=this.nextReferenceDate(t);return e===null?null:this.occurrence.next(e)}identicalTo(t){return this.baseOnToday!==t.baseOnToday||!this.occurrence.isIdenticalTo(t.occurrence)?!1:this.toText()===t.toText()}nextReferenceDate(t){return this.baseOnToday?this.nextReferenceDateFromToday(t.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(t){let e=new oe(pe(q({},this.rrule.origOptions),{dtstart:t.startOf("day").utc(!0).toDate()}));return this.nextAfter(t.endOf("day"),e)}nextReferenceDateFromOriginalReferenceDate(){var e;let t=window.moment((e=this.occurrence.referenceDate)!=null?e:void 0).endOf("day");return this.nextAfter(t,this.rrule)}nextAfter(t,e){t.utc(!0);let r=window.moment.utc(e.after(t.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(r=n.nextAfterMonths(t,r,e,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(r=n.nextAfterYears(t,r,e,a[1])),n.addTimezone(r)}static nextAfterMonths(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));n.isSkippingTooManyMonths(t,e,s);)e=n.fromOneDayEarlier(t,r);return e}static isSkippingTooManyMonths(t,e,r){let i=e.month()-t.month(),s=e.year()-t.year();return i+=s*12,i>r}static nextAfterYears(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));n.isSkippingTooManyYears(t,e,s);)e=n.fromOneDayEarlier(t,r);return e}static isSkippingTooManyYears(t,e,r){return e.year()-t.year()>r}static fromOneDayEarlier(t,e){t.subtract(1,"days").endOf("day");let r=e.origOptions;return r.dtstart=t.startOf("day").toDate(),e=new oe(r),window.moment.utc(e.after(t.toDate()))}static addTimezone(t){return window.moment.utc(t).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}}});function xE(n,t,e){let r=new Map([["cancelled date","cancelledDate"],["created date","createdDate"],["depends on","dependsOn"],["done date","doneDate"],["due date","dueDate"],["id","id"],["on completion","onCompletion"],["priority","priority"],["recurrence rule","recurrenceRule"],["scheduled date","scheduledDate"],["start date","startDate"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n.setVisibility(s,e),!0;return t.startsWith("tags")?(n.setTagsVisibility(e),!0):!1}var Al,Ic,Br,Es=Q(()=>{"use strict";Al=(p=>(p.Description="description",p.Id="id",p.DependsOn="dependsOn",p.Priority="priority",p.RecurrenceRule="recurrenceRule",p.OnCompletion="onCompletion",p.CreatedDate="createdDate",p.StartDate="startDate",p.ScheduledDate="scheduledDate",p.DueDate="dueDate",p.CancelledDate="cancelledDate",p.DoneDate="doneDate",p.BlockLink="blockLink",p))(Al||{}),Ic=Object.values(Al),Br=class{constructor(){this.visible={};this.tagsVisible=!0;Ic.forEach(t=>{this.visible[t]=!0})}isShown(t){return this.visible[t]}areTagsShown(){return this.tagsVisible}hide(t){this.visible[t]=!1}setVisibility(t,e){this.visible[t]=e}setTagsVisibility(t){this.tagsVisible=t}get shownComponents(){return Ic.filter(t=>this.visible[t])}get hiddenComponents(){return Ic.filter(t=>!this.visible[t])}get toggleableComponents(){return Ic.filter(t=>t!=="description"&&t!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(t=>{this.visible[t]=!this.visible[t]}),this.setTagsVisibility(!this.areTagsShown())}}});var Kt,Tt,qn=Q(()=>{"use strict";Kt=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.ON_HOLD="ON_HOLD",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(Kt||{}),Tt=class{constructor(t,e,r,i,s="TODO"){this.symbol=t,this.name=e,this.nextStatusSymbol=r,this.availableAsCommand=i,this.type=s}}});function RE(n){let t=n.trim().toLowerCase();return t==="delete"?"delete":t==="keep"?"keep":""}function UY(n,t){return n.filter(e=>e!==t)}function $Y(n,t){let e=n.status,r=t.status,i=r.type===e.type;return r.type!=="DONE"||i}function CE(n,t){let e=t.length;if(n.onC
Line truncated
|
||||
`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function gU(n,t,e){let r=xU(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=n?r+" ":" ",s=n&&t.length>e&&t.charAt(e)===r?1:0;return{postfix:i,insertSkip:s}}function yU(n,t,e){let r=[],i=e.line;Ms(r,i,n.dueDateSymbol,"due date"),Ms(r,i,n.startDateSymbol,"start date"),Ms(r,i,n.scheduledDateSymbol,"scheduled date"),bU(r,n,e),Ms(r,i,n.recurrenceSymbol,"recurring (repeat)"),TU(r,n,e),oD(t)&&(Ms(r,i,n.idSymbol,"id"),Ms(r,i,n.dependsOnSymbol,"depends on id")),Ms(r,i,n.onCompletionSymbol,"on completion");let s=vU(r,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?r:s}function Ms(n,t,e,r){t.includes(e)||n.push({displayText:`${e} ${r}`,appendText:`${e} `})}function bU(n,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];n.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function TU(n,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=hi.parseDate("today",!0).format($e.dateFormat);n.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function vU(n,t){let e=Ca(/([a-zA-Z'_-]*)/g,t),r=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=n.filter(a=>{var l;return((l=a.textToMatch)!=null?l:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;r.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return r}function lD(n,t){let e=`${t}`,r=`${n} ${t}`;return{displayText:e,appendText:r}}function kU(n,t){let r=`${hi.parseDate(t,!0).format($e.dateFormat)}`,i=`${t} (${r})`,s=`${n} ${r}`;return{displayText:i,appendText:s}}function wU(n,t,e){let r=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ca(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=o&&o.length>1?hi.parseDate(vc(o),!0):null;if(l!=null&&l.isValid()){let c=l.format($e.dateFormat);Kc(e,a,[c],lD,i)}let u=Ly(r,o,t,!0);Kc(e,a,u,kU,i)}return i}function _U(n,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],r=[],i=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),s=Ca(i,t);if(s&&s.length>=2){let o=s[1],l=s[2];if(l.length<t.settings.autoSuggestMinMatch)return[];if(l.length>0){let f=(a=wi.fromText({recurrenceRuleText:l,occurrence:new gi({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let p=`${o} ${f}`+t.postfix;if(r.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:p,insertAt:s.index,insertSkip:qy(s[0],t)}),s[0]==p)return[]}}let u=t.settings.autoSuggestMaxItems/2,c=Ly(e,l,u,!1);c.length===0&&l.trim().length===0&&(c=e.slice(0,u)),Kc(t,s,c,(f,p)=>{let h=`${p}`,b=`${f} ${p}`;return{displayText:h,appendText:b}},r)}return r}function SU(n,t,e){let r=["delete","keep"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ca(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=Ly(r,o,t,!0);Kc(e,a,l,lD,i)}return i}function EU(n,t,e){let r=[],i=new RegExp(`(${n})\\s*(${Os.source})?`,"ug"),s=Ca(i,e);if(s&&s[0].trim().length<=n.length){let a=Fl(t.map(o=>o.id));r.push({suggestionType:"match",displayText:"generate unique id",appendText:`${n} ${a}`+e.postfix,insertAt:s.index,insertSkip:qy(s[0],e)})}return r}function DU(n,t,e,r){let i=[],s=e.dataviewMode?Hi("()[]"):ME(),a=new RegExp(`(${n})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=Ca(a,e);if(o&&o.length>=1){let l=o[2]||"",u=o[3],c=[];if(l){let d=l.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(u.length>=e.settings.autoSuggestMinMatch){let d=Vc(u.trim(),t,r,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${n}${l}`,insertAt:o.index,insertSkip:n.length+l.length+u.length,taskItDependsOn:f})}}return i}function Ly(n,t,e,r){let s=n.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return r&&s.length===0&&(s=n.slice(0,e)),s}function Kc(n,t,e,r,i){let s=t[1];for(let a of e){let{displayText:o,appendText:l}=r(s,a);i.push({suggestionType:"match",displayText:o,appendText:l+n.postfix,insertAt:t.index,insertSkip:qy(t[0],n)})}}function Ca(n,t){let e=t.
Line truncated
|
||||
`);r.length>1&&(t=r[0],e=!0);let i=50;return t.length>i&&(t=t.slice(0,i),e=!0),e&&(t+="..."),t}function pD(n,t){let e=`Cannot find preset "${n}" in the Tasks settings`;if(Object.keys(t).length===0)e+=`
|
||||
You can define the instruction(s) for "${n}" in the Tasks settings.`;else{let i=Math.max(...Object.keys(t).map(a=>a.length)),s=Object.entries(t).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>`${a.padEnd(i)}: ${MU(o)}`).join(`
|
||||
`);e+=`
|
||||
The following presets are defined in the Tasks settings:
|
||||
${s}`}return e}var fD,jy=Q(()=>{"use strict";fD={this_file:"path includes {{query.file.path}}",this_folder:"folder includes {{query.file.folder}}",this_folder_only:"filter by function task.file.folder === query.file.folder",this_root:"root includes {{query.file.root}}",hide_date_fields:`# Hide any values for all date fields
|
||||
hide due date
|
||||
hide scheduled date
|
||||
hide start date
|
||||
hide created date
|
||||
hide done date
|
||||
hide cancelled date`,hide_non_date_fields:`# Hide all the non-date fields, but not tags
|
||||
hide id
|
||||
hide depends on
|
||||
hide recurrence rule
|
||||
hide on completion
|
||||
hide priority`,hide_query_elements:`# Hide toolbar, postpone, edit and backlinks
|
||||
hide toolbar
|
||||
hide postpone button
|
||||
hide edit button
|
||||
hide backlinks`,hide_everything:`# Hide everything except description and any tags
|
||||
preset hide_date_fields
|
||||
preset hide_non_date_fields
|
||||
preset hide_query_elements`}});var Zc,mD=Q(()=>{"use strict";Zc=class{constructor(t=!1,e=!1,r=!1){this.ignoreSortInstructions=t,this.showTaskHiddenData=e,this.recordTimings=r}}});var Ma,Xc=Q(()=>{"use strict";Ma={priority:!0,recurrence:!0,due:!0,scheduled:!0,start:!0,before_this:!0,after_this:!0,status:!0,created:!0,done:!0,cancelled:!0}});var _t,Aa=Q(()=>{"use strict";Sr();_t=class n{constructor(){this.coreStatuses=[xe.TODO.configuration,xe.DONE.configuration],this.customStatuses=[xe.IN_PROGRESS.configuration,xe.CANCELLED.configuration]}static addStatus(t,e){t.push(e)}static replaceStatus(t,e,r){let i=this.findStatusIndex(e,t);return i<=-1?!1:(t.splice(i,1,r),!0)}static findStatusIndex(t,e){let r=new xe(t);return e.findIndex(i=>new xe(i).previewText()==r.previewText())}static deleteStatus(t,e){let r=this.findStatusIndex(e,t);return r<=-1?!1:(t.splice(r,1),!0)}static deleteAllCustomStatuses(t){t.customStatuses.splice(0)}static resetAllCustomStatuses(t){n.deleteAllCustomStatuses(t),new n().customStatuses.forEach(r=>{n.addStatus(t.customStatuses,r)})}static bulkAddStatusCollection(t,e){let r=[];return e.forEach(i=>{t.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?r.push(`The status ${i[1]} (${i[0]}) is already added.`):n.addStatus(t.customStatuses,xe.createFromImportedValue(i))}),r}static allStatuses(t){return t.coreStatuses.concat(t.customStatuses)}static applyToStatusRegistry(t,e){e.clearStatuses(),n.allStatuses(t).forEach(r=>{e.add(r)})}}});var gD,hD=Q(()=>{gD=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}]});var Yl,yD=Q(()=>{"use strict";hD();Yl=class n{constructor(t,e,r,i,s,a){this.internalName=t;this.index=e;this.description=r;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let t=[];return gD.forEach(e=>{t=[...t,new n(e.internalName,e.index,e.description,e.displayName,e.enabledByDefault,e.stable)]}),t}static get settingsFlags(){let t={};return n.values.forEach(e=>{t[e.internalName]=e.enabledByDefault}),t}static fromString(t){for(let e of n.values)if(t===e.internalName)return e;throw new RangeError(`Illegal argument passed to fromString(): ${t} does not correspond to any available Feature ${this.name}`)}}});function Wy(n,t){for(let e in n)t[e]===void 0&&(t[e]=n[e])}function Ul(){return Yn[X().taskFormat]}function PU(n){let t=q({},n);return"includes"in t&&!("presets"in t)&&(t.presets=t.includes,delete t.includes),t}var Yn,Hy,Di,X,st,As,bD,ft=Q(()=>{"use strict";Yy();Nl();$y();qn();Sr();dD();$y();Fr();jy();mD();Xc();Aa();yD();Yn={tasksPluginEmoji:{getDisplayName:()=>x.t("settings.format.displayName.tasksEmojiFormat"),taskSerializer:new xs(Pl),buildSuggestions:Fy(Pl,Ny,!1)},dataview:{getDisplayName:()=>x.t("settings.format.displayName.dataview"),taskSerializer:new Qc,buildSuggestions:uD(Fy(Uy,Ny,!0),[["(",")"],["[","]"]])}},Hy={presets:fD,globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,removeScheduledDateOnRecurrence:!1,searchResults:{taskCountLocation:"bottom"},statusSettings:new _t,isShownInEditModal:Ma,dismissedNotices:{"live-preview-callout-warning":!1},features:Yl.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Zc,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},Di=q({},Hy);X=()=>(Wy(Yl.settingsFlags,Di.features),Wy(Hy.loggingOptions.minLevels,Di.loggingOptions.minLevels),Wy(Hy.debugSettings,Di.debugSettings),Di.statusSettings.customStatuses.forEach((n,t,e)=>{var i,s;let r=xe.getTypeFromStatusTypeString(n.type);e[t]=new Tt((i=n.symbol)!=null?i:" ",n.name,(s=n.nextStatusSymbol)!=null?s:"x",n.availableAsCommand,r)}),q({},Di)),st=n=>{let t=PU(n);return Di=q(q({},Di),t),X()},As=(n,t)=>(Di.generalSettings[n]=t,X()),bD=n=>{var t;return(t=Di.features[n])!=null?t:!1}});function Jc(n){let e={"<":"<",">":">","&":"&",'"':"""}[n];return e!==void 0?e:n}function TD(n){let t=[...n],e="";return t.forEach(r=>{e+=Jc(r)}),e}var vD=Q(()=>{"use strict"});var Je,Er=Q(()=>{"use strict";vD();Sr();qn();Je=class n{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(t){this.clearStatuses(),t.forEach(e=>{this.add(e)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:t})=>t!==xe.EMPTY.symbol)}static getInstance(){return n.instance||(n.instance=new n),n.instance}add(t){this.hasSymbol(t.symbol)||(t instanceof xe?this._registeredStatuses.push(t):this._registeredStatuses.push(new xe(t)))}bySymbol(t){return this.hasSymbol(t)?this.getSymbol(t):xe.EMPTY}bySymbolOrCreate(
Line truncated
|
||||
\`\`\`${r}
|
||||
flowchart LR
|
||||
|
||||
classDef TODO stroke:#f33,stroke-width:3px;
|
||||
@@ -163,6 +238,7 @@ classDef DONE stroke:#0c0,stroke-width:3px;
|
||||
classDef IN_PROGRESS stroke:#fa0,stroke-width:3px;
|
||||
classDef CANCELLED stroke:#ddd,stroke-width:3px;
|
||||
classDef NON_TASK stroke:#99e,stroke-width:3px;
|
||||
classDef ON_HOLD stroke:#00f,stroke-width:3px;
|
||||
|
||||
${i.join(`
|
||||
`)}
|
||||
@@ -171,12 +247,12 @@ ${s.join(`
|
||||
|
||||
linkStyle default stroke:gray
|
||||
\`\`\`
|
||||
`}addEdgeIfNotToInternal(t,e,n,i,s){let a=t.findIndex(l=>l.symbol===e.symbol),o=a!==-1,u=e.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(t,e){let n=Sw(t.name),i=t.type;if(e){let s=sc(t.symbol),a=sc(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}<br>${o}<br>${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Ow=require("obsidian");var Cn=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var Ct=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date}formatAsDate(t=""){return this.format(le.dateFormat,t)}formatAsDateAndTime(t=""){return this.format(le.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new Cn("Overdue",1):e.isSame(t,"day")?new Cn("Today",2):e.isValid()?new Cn("Future",3):new Cn("Invalid date",0):new Cn("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new Cn("",0);let e=this.fromNowOrder(t);return new Cn(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),n=t.isSameOrBefore(e,"day"),i=this.fromNowStartDateOfGroup(t,n,e);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(t,e,n){let i=t.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?n.subtract(s,o):n.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new Ow.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(e,t):n.add(e,t)}};var AI=require("obsidian"),Rw=oo(Cw());var qh=class extends Rw.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=e=>e.reduce((n,i)=>n+i,0)/e.length}configure(e){return this.options=Object.assign({},this.options,e),this}getLogger(e){let n="none",i="";for(let s in this.options.minLevels)e.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new jh(this,e,n)}onLogEntry(e){return this.on("log",e),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(e=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${e.level}][${e.module}]`;switch(e.traceId&&(n+=`[${e.traceId}]`),n+=` ${e.message}`,e.objects===void 0&&(e.objects=""),e.level){case"trace":console.trace(n,e.objects);break;case"debug":console.debug(n,e.objects);break;case"info":console.info(n,e.objects);break;case"warn":console.warn(n,e.objects);break;case"error":console.error(n,e.objects);break;default:console.log(`{${e.level}} ${n}`,e.objects)}}),this.consoleLoggerRegistered=!0,this)}},Kt=new qh,jh=class{constructor(t,e,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=t,this.module=e,this.minLevel=this.levelToInt(n)}levelToInt(t){return t.toLowerCase()in this.levels?this.levels[t.toLowerCase()]:99}log(t,e,n){if(this.levelToInt(t)<this.minLevel)return;let s={level:t,module:this.module,message:e,objects:n,traceId:void 0};this.logManager.emit("log",s)}trace(t,e){this.log("trace",t,e)}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}logWithId(t,e,n,i){if(this.levelToInt(t)<this.minLevel)return;let a={level:t,module:this.module,message:n,objects:i,traceId:e};this.logManager.emit("log",a)}traceWithId(t,e,n){this.logWithId("trace",t,e,n)}debugWithId(t,e,n){this.logWithId("debug",t,e,n)}infoWithId(t,e,n){this.logWithId("info",t,e,n)}warnWithId(t,e,n){this.logWithId("warn",t,e,n)}errorWithId(t,e,n){this.logWithId("error",t,e,n)}};function Yh(r,t){let e=Kt.getLogger("tasks");switch(r){case"trace":e.trace(t);break;case"debug":e.debug(t);break;case"info":e.info(t);break;case"warn":e.warn(t);break;case"error":e.error(t);break;default:break}}function ac(r,t,e){r.debug(`${t}: task line number: ${e.taskLocation.lineNumber}. file path: "${e.path}"`),r.debug(`${t} original: ${e.originalMarkdown}`)}function oc(r,t,e){e.map((n,i)=>{r.debug(`${t} ==> ${i+1} : ${n.toFileLineString()}`)})}var Ut=class{static fromPath(t){let{useFilenameAsScheduledDate:e,filenameAsDateFolders:n}=ie();return!e||!this.matchesAnyFolder(n,t)?null:this.extractDateFromPath(t)}static matchesAnyFolder(t,e){return t.length===0?!0:t.some(n=>e.startsWith(n+"/"))}static extractDateFromPath(t){let e=Math.max(0,t.lastIndexOf("/")+1),n=t.lastIndexOf("."),i=t.substring(e,n),{filenameAsScheduledDateFormat:s}=ie();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:t,scheduledDate:e,dueDate:n}){return t===null
Line truncated
|
||||
`),l=u.length,c=new _u(()=>Ut.fromPath(r)),d=null,f=0,m=new Map;for(let _ of e){let x=_.position.start.line;if(x>=l)return n.debug(`${r} Obsidian gave us a line number ${x} past the end of the file. ${l}.`),a;if((d===null||d.position.end.line<x)&&(d=da.getSection(x,i.sections),f=0),d===null)continue;let O=u[x];if(O===void 0){n.debug(`${r}: line ${x} - ignoring 'undefined' line.`);continue}if(_.task!==void 0){let M;try{if(M=de.fromLine({line:O,taskLocation:new Rt(o,x,d.position.start.line,f,da.getPrecedingHeader(x,i.headings)),fallbackDate:c.value}),M!==null){let Y=(b=m.get(_.parent))!=null?b:null;Y!==null&&(M=new de(Ee(ne({},M),{parent:Y}))),m.set(x,M)}}catch(Y){s(Y,r,_,O);continue}M!==null&&(f++,a.push(M))}else{let M=_.position.start.line,Y=(T=m.get(_.parent))!=null?T:null;m.set(M,new jn(u[M],Y))}}return a}var da=class{constructor({metadataCache:t,vault:e,workspace:n,events:i}){this.logger=Kt.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=t,this.metadataCacheEventReferences=[],this.vault=e,this.workspace=n,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new zu,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=ie(),e=this.vault.on("create",s=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(e);let n=this.vault.on("delete",s=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof ca.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new Et(s.path,o!=null?o:void 0),l=new _u(()=>Ut.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(u);return t?Ut.updateTaskPath(c,d,l.value):new de(Ee(ne({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(e=>{e({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(t=>this.indexFile(t))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(t){return F(this,null,function*(){let e=this.metadataCache.getFileCache(t);if(e==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let n=this.tasks.filter(a=>a.path===t.path),i=e.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(t);s=this.getTasksFromFileContent(a,i,e,t.path,this.reportTaskParsingErrorToUser,this.logger)}jn.listsAreIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==t.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+t.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(t,e,n,i,s,a){return PI(i,t,e,a,n,s)}reportTaskParsingErrorToUser(t,e,n,i){let s=`There was an error reading one of the tasks in this vault.
|
||||
`}addEdgeIfNotToInternal(t,e,r,i,s){let a=t.findIndex(u=>u.symbol===e.symbol),o=a!==-1,l=e.type!=="EMPTY";if(o&&l){let u;s?u='-. "\u{1F501}" .-> ':u=" --> ";let c=`${i+1}${u}${a+1}`;r.push(c)}}getMermaidNodeLabel(t,e){let r=TD(t.name),i=t.type;if(e){let s=Jc(t.symbol),a=Jc(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,l=`'${r}'`,u=`(${i})`;return`["${l}<br>${o}<br>${u}"]:::${i}`}else return`["${r}"]:::${i}`}}});var zr,kD=Q(()=>{"use strict";zr=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}}});var wD,$t,ed=Q(()=>{"use strict";wD=require("obsidian");kD();si();$t=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date?this._date.clone():null}formatAsDate(t=""){return this.format($e.dateFormat,t)}formatAsDateAndTime(t=""){return this.format($e.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new zr("Overdue",1):e.isSame(t,"day")?new zr("Today",2):e.isValid()?new zr("Future",3):new zr("Invalid date",0):new zr("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new zr("",0);let e=this.fromNowOrder(t);return new zr(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),r=t.isSameOrBefore(e,"second"),i=this.fromNowStartDateOfGroup(t,r,e);return Number((r?1:3)+i.format("YYYYMMDDHHmm"))}fromNowStartDateOfGroup(t,e,r){let i=t.clone().locale("en").fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?r.subtract(s,o):r.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new wD.Notice("Cannot postpone a null date");let r=window.moment().startOf("day");return this._date.isSameOrAfter(r,"day")?this._date.clone().add(e,t):r.add(e,t)}}});var ED=R((_D,SD)=>{(function(n){var t=Object.hasOwnProperty,e=Array.isArray?Array.isArray:function(T){return Object.prototype.toString.call(T)==="[object Array]"},r=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",l=o?setImmediate:setTimeout,u=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var T=Object.getOwnPropertyNames(m);return T.push.apply(T,Object.getOwnPropertySymbols(m)),T}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==n&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(m,T){var w="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+T+"."),typeof process!="undefined"&&process.emitWarning){var k=new Error(w);k.name="MaxListenersExceededWarning",k.emitter=this,k.count=m,process.emitWarning(k)}else console.error(w),console.trace&&console.trace()}var p=function(m,T,w){var k=arguments.length;switch(k){case 0:return[];case 1:return[m];case 2:return[m,T];case 3:return[m,T,w];default:for(var _=new Array(k);k--;)_[k]=arguments[k];return _}};function h(m,T){for(var w={},k,_=m.length,M=T?T.length:0,I=0;I<_;I++)k=m[I],w[k]=I<M?T[I]:n;return w}function b(m,T,w){this._emitter=m,this._target=T,this._listeners={},this._listenersCount=0;var k,_;if((w.on||w.off)&&(k=w.on,_=w.off),T.addEventListener?(k=T.addEventListener,_=T.removeEventListener):T.addListener?(k=T.addListener,_=T.removeListener):T.on&&(k=T.on,_=T.off),!k&&!_)throw Error("target does not implement any known event API");if(typeof k!="function")throw TypeError("on method must be a function");if(typeof _!="function")throw TypeError("off method must be a function");this._on=k,this._off=_;var M=m._observers;M?M.push(this):m._observers=[this]}Object.assign(b.prototype,{subscribe:function(m,T,w){var k=this,_=this._target,M=this._emitter,I=this._listeners,Y=function(){var L=p.apply(null,arguments),S={data:L,name:T,original:m};if(w){var W=w.call(_,S);W!==!1&&M.emit.apply(M,[S.name].concat(L));return}M.emit.apply(M,[T].concat(L))};if(I[m])throw Error("Event '"+m+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!k._onNewListener?(this._onNewListener=function(L){L===T&&I[m]===null&&(I[m]=Y,k._on.call(_,m,Y))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(L){L===T&&!M.hasListeners(L)&&I[m]&&(I[m]=null,k._off.call(_,m,Y))},I[m]=null,M.on("removeListener",this._onRemoveListener)):(I[m]=Y,k._on.call(_,m,Y))},unsubscribe:function(m){var T=this,w=this._listeners,k=this._emitter,_,M,I=this._off,Y=this._target,L;i
Line truncated
|
||||
`),this.dateFromFileName=new Pa(()=>jt.fromPath(this.filePath))}get filePath(){return this.tasksFile.path}get fileCache(){return this.tasksFile.cachedMetadata}parseFileContent(){if(this.listItems===void 0)return this.tasks;let t=this.fileLines.length,e=null,r=0;for(let i of this.listItems){let s=i.position.start.line;if(s>=t)return this.logger.debug(`${this.filePath} Obsidian gave us a line number ${s} past the end of the file. ${t}.`),this.tasks;if((e===null||e.position.end.line<s)&&(e=Ns.getSection(s,this.fileCache.sections),r=0),e===null)continue;let a=this.fileLines[s];if(a===void 0){this.logger.debug(`${this.filePath}: line ${s} - ignoring 'undefined' line.`);continue}let o=new Jt(this.tasksFile,s,e.position.start.line,r,Ns.getPrecedingHeader(s,this.fileCache.headings));r=this.parseLine(i,a,o,s,r)}return this.tasks}parseLine(t,e,r,i,s){var o;if(t.task===void 0)return this.createListItem(t,e,i,r),s;let a;try{if(a=ke.fromLine({line:e,taskLocation:r,fallbackDate:this.dateFromFileName.value}),a!==null){let l=(o=this.line2ListItem.get(t.parent))!=null?o:null;l!==null&&(a=new ke(pe(q({},a),{parent:l}))),this.line2ListItem.set(i,a),a!==null&&(s++,this.tasks.push(a))}else this.createListItem(t,e,i,r)}catch(l){this.errorReporter(l,this.filePath,t,e)}return s}createListItem(t,e,r,i){var o;let s=(o=this.line2ListItem.get(t.parent))!=null?o:null,a=Gi.fromListItemLine(e,s,i);if(a===null){this.logger.warn("Unexpected failure to create a list item from line: "+e+" in file: "+this.filePath);return}this.line2ListItem.set(r,a)}};var NU=4;var Ns=class{constructor({metadataCache:t,vault:e,workspace:r,events:i}){this.logger=gn.getLogger("tasks.Cache");this.notifySubscribersDebounced=(0,RD.debounce)(()=>this.notifySubscribersNotDebounced(),100,!0);this.reportTaskParsingErrorToUser=(t,e,r,i)=>{let s=`There was an error reading one of the tasks in this vault.
|
||||
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
|
||||
Error: ${t}
|
||||
File: ${e}
|
||||
Line number: ${n.position.start.line}
|
||||
Line number: ${r.position.start.line}
|
||||
Task line: ${i}
|
||||
|
||||
Please create a bug report for this message at
|
||||
@@ -190,13 +266,13 @@ Include:
|
||||
The error popup will only be shown when Tasks is starting up, but if the error persists,
|
||||
it will be shown in the console every time this file is edited during the Obsidian
|
||||
session.
|
||||
`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new ca.Notice(s,1e4)}static getSection(t,e){if(e===void 0)return null;for(let n of e)if(n.position.start.line<=t&&n.position.end.line>=t)return n;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let n=null;for(let i of e){if(i.position.start.line>t)return n;n=i.heading}return n}};var dg=require("obsidian");var Mk=require("obsidian");function Ze(){}function Bh(r){return r()}function Aw(){return Object.create(null)}function Wt(r){r.forEach(Bh)}function cc(r){return typeof r=="function"}function Rn(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Pw(r){return Object.keys(r).length===0}var Nw=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,wu=class{constructor(t){this.options=t,this._listeners="WeakMap"in Nw?new WeakMap:void 0}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return(t=this._observer)!==null&&t!==void 0?t:this._observer=new ResizeObserver(e=>{var n;for(let i of e)wu.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};wu.entries="WeakMap"in Nw?new WeakMap:void 0;var Iw=!1;function NI(){Iw=!0}function II(){Iw=!1}function $(r,t){r.appendChild(t)}function Te(r,t,e){r.insertBefore(t,e||null)}function ge(r){r.parentNode&&r.parentNode.removeChild(r)}function bs(r,t){for(let e=0;e<r.length;e+=1)r[e]&&r[e].d(t)}function se(r){return document.createElement(r)}function FI(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Ge(r){return document.createTextNode(r)}function _e(){return Ge(" ")}function dc(){return Ge("")}function Le(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function Fw(r){return function(t){return t.preventDefault(),r.call(this,t)}}function j(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function Lw(r){let t;return{p(...e){t=e,t.forEach(n=>r.push(n))},r(){t.forEach(e=>r.splice(r.indexOf(e),1))}}}function LI(r){return Array.from(r.childNodes)}function Gr(r,t){t=""+t,r.data!==t&&(r.data=t)}function nr(r,t){r.value=t==null?"":t}function Vh(r,t,e){for(let n=0;n<r.options.length;n+=1){let i=r.options[n];if(i.__value===t){i.selected=!0;return}}(!e||t!==void 0)&&(r.selectedIndex=-1)}function Uw(r){let t=r.querySelector(":checked");return t&&t.__value}var uc;function UI(){if(uc===void 0){uc=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(r){uc=!0}}return uc}function Ww(r,t){getComputedStyle(r).position==="static"&&(r.style.position="relative");let n=se("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 i=UI(),s;return i?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Le(window,"message",a=>{a.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Le(n.contentWindow,"resize",t),t()}),$(r,n),()=>{(i||s&&n.contentWindow)&&s(),ge(n)}}function ii(r,t,e){r.classList[e?"add":"remove"](t)}var ha=class{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=FI(e.nodeName):this.e=se(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)Te(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(ge)}};var ku;function vu(r){ku=r}function WI(){if(!ku)throw new Error("Function called outside component initialization");return ku}function zh(r){WI().$$.on_mount.push(r)}var pa=[];var nt=[],ma=[],Gh=[],qI=Promise.resolve(),Hh=!1;function jI(){Hh||(Hh=!0,qI.then(qw))}function ys(r){ma.push(r)}function Qt(r){Gh.push(r)}var $h=new Set,fa=0;function qw(){if(fa!==0)return;let r=ku;do{try{for(;fa<pa.length;){let t=pa[fa];fa++,vu(t),YI(t.$$)}}catch(t){throw pa.length=0,fa=0,t}for(vu(null),pa.length=0,fa=0;nt.length;)nt.pop()();for(let t=0;t<ma.length;t+=1){let e=ma[t];$h.has(e)||($h.add(e),e())}ma.length=0}while(pa.length);for(;Gh.length;)Gh.pop()();Hh=!1,$h.clear(),vu(r)}function YI(r){if(r.fragment!==null){r.update(),Wt(r.before_update);let t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(ys)}}function $I(r){let t=[],e=[];ma.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),ma=t}var lc=new Set,gs;function jw(){gs={r:0,c:[],p:gs}}function Yw(){gs.r||Wt(gs.c),gs=gs.p}function ir(r,t){r&&r.i&&(lc.delete(r),r.i(t))}function _r(r,t,e,n){if(r&&r.o){if(lc.has(r
Line truncated
|
||||
`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new Ia.Notice(s,1e4)};this.logger.debug("Creating Cache object"),this.metadataCache=t,this.metadataCacheEventReferences=[],this.vault=e,this.workspace=r,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new Eu,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>A(this,null,function*(){this.subscribeToVault(),yield this.loadVault()})),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.notifySubscribersDebounced()}notifySubscribersNotDebounced(){this.logger.debug("Cache.notifySubscribersNotDebounced()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>A(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",r=>A(this,null,function*(){yield this.tasksMutex.runExclusive(()=>this.indexFile(r))}));this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=X(),e=this.vault.on("create",s=>A(this,null,function*(){s instanceof Ia.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),yield this.tasksMutex.runExclusive(()=>this.indexFile(s)))}));this.vaultEventReferences.push(e);let r=this.vault.on("delete",s=>A(this,null,function*(){s instanceof Ia.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),yield this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))}));this.vaultEventReferences.push(r);let i=this.vault.on("rename",(s,a)=>A(this,null,function*(){s instanceof Ia.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),yield this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),l=new mt(s.path,o!=null?o:void 0),u=new Pa(()=>jt.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(l);return t?jt.updateTaskPath(c,d,u.value):new ke(pe(q({},c),{taskLocation:d}))}),this.notifySubscribers()}))}));this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(r=>{r({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t);let e=this.events.onReloadVault(()=>A(this,null,function*(){return yield this.loadVault()}));this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>A(this,null,function*(){let t=new Is(`Loading vault with global filter '${Ae.getInstance().get()}'`);t.start(),this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield this.indexFiles(this.vault.getMarkdownFiles()),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),t.finish(),this.notifySubscribers()}))}indexFiles(t){return A(this,null,function*(){let e=0,r=()=>A(this,null,function*(){for(;e<t.length;){let s=t[e];e++,yield this.indexFile(s,!1)}}),i=Math.min(NU,t.length);yield Promise.all(Array.from({length:i},()=>r()))})}indexFile(t,e=!0){return A(this,null,function*(){var l;let r=this.metadataCache.getFileCache(t);if(r==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let i=this.tasks.filter(u=>u.path===t.path),s=r.listItems,a=[],o=(l=s==null?void 0:s.some(u=>u.task!==void 0))!=null?l:!1;if(s!==void 0&&o){let u;try{u=yield this.vault.cachedRead(t)}catch(c){this.logger.error(`Cache.indexFile: unable to read ${t.path}; keeping its previously cached tasks`,c);return}a=this.getTasksFromFileContent(new mt(t.path,r),u,s,this.reportTaskParsingErrorToUser,this.logger)}Gi.listsAreIdentical(i,a)||(this.tasks=this.tasks.filter(u=>u.path!==t.path),this.tasks.push(...a),this.logger.debug("Cache.indexFile: "+t.path+`: read ${a.length} task(s)`),e&&this.notifySubscribers())})}getTasksFromFileContent(t,e,r,i,s){return new sd(t,e,r,s,i).parseFileContent()}static getSection(t,e){if(e===void 0)return null;for(let r of e)if(r.position.start.line<=t&&r.position.end.line>=t)return r;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let r=null;for(le
Line truncated
|
||||
|
||||
The task line not updated is:
|
||||
${r.originalMarkdown}
|
||||
${n.originalMarkdown}
|
||||
|
||||
In this markdown file:
|
||||
"${r.taskLocation.path}"
|
||||
"${n.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).
|
||||
|
||||
@@ -205,43 +281,17 @@ 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.
|
||||
`;Tc(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>F(void 0,null,function*(){yield bk({originalTask:r,newTasks:t,vault:e,metadataCache:n,workspace:i,previousTries:s+1})}),l)});try{let[l,c,d]=yield Tk(r,e),f=[...d.slice(0,l),...t.map(m=>m.toFileLineString()),...d.slice(l+1)];yield e.modify(c,f.join(`
|
||||
`))}catch(l){if(l instanceof xi){l.message&&yk(l.message),yield u();return}else if(l instanceof _c){yield u();return}else l instanceof Error&&Tc(l.message)}});function Tk(r,t){return F(this,null,function*(){if(Mu===void 0)throw new xi;let e=t.getAbstractFileByPath(r.path);if(!(e instanceof Cu.TFile))throw new xi(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!TF.includes(e.extension))throw new Error(`Tasks: Does not support files with the ${e.extension} file extension.`);let n=Mu.getFileCache(e);if(n==null||n===null)throw new xi(`Tasks: No file cache found for file ${e.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new xi(`Tasks: No list items found in file cache of ${e.path}. Retrying ...`);let a=(yield t.read(e)).split(`
|
||||
`),o=vF(r,a,i,_F);if(o===void 0)throw new _c;return[o,e,a]})}function og(r,t){return F(this,null,function*(){try{let[e,n,i]=yield Tk(r,t);return[e,n]}catch(e){e instanceof xi?e.message&&yk(e.message):e instanceof Error&&Tc(e.message)}})}function _k(r,t){return r<t.length}function vF(r,t,e,n){let i=wF(r,t);return i!==void 0||(i=kF(r,t),i!==void 0)?i:EF(r,t,e,n)}function wF(r,t){let e=r.taskLocation.lineNumber;if(_k(e,t)&&t[e]===r.originalMarkdown)return vc().debug(`Found original markdown at original line number ${e}`),e}function kF(r,t){let e=[];for(let n=0;n<t.length;n++)t[n]===r.originalMarkdown&&e.push(n);if(e.length===1)return e[0]}function EF(r,t,e,n){let i,s=0;for(let a of e){let o=a.position.start.line;if(!_k(o,t))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=t[o];if(Ae.getInstance().includedIn(u)){if(s===r.taskLocation.sectionIndex){if(u===r.originalMarkdown)i=o;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
|
||||
`;gd(c);return}let u=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${u}`),setTimeout(()=>A(null,null,function*(){yield EO({originalTask:n,newTasks:t,vault:e,metadataCache:r,workspace:i,previousTries:s+1})}),u)});try{let[u,c,d]=yield DO(n,e),f=[...d.slice(0,u),...t.map(p=>p.toFileLineString()),...d.slice(u+1)];yield e.modify(c,f.join(`
|
||||
`))}catch(u){if(u instanceof Vi){u.message&&SO(u.message),yield l();return}else if(u instanceof yd){yield l();return}else u instanceof Error&&gd(u.message)}});function DO(n,t){return A(this,null,function*(){if(Vl===void 0)throw new Vi;let e=n.file.tFile||t.getFileByPath(n.path);if(!e)throw new Vi(`Tasks: No file found for task ${n.description}. Retrying ...`);if(!D$.includes(e.extension))throw new Error(`Tasks: Does not support files with the ${e.extension} file extension.`);let r=Vl.getFileCache(e);if(r==null||r===null)throw new Vi(`Tasks: No file cache found for file ${e.path}. Retrying ...`);let i=r.listItems;if(i===void 0||i.length===0)throw new Vi(`Tasks: No list items found in file cache of ${e.path}. Retrying ...`);let a=(yield t.read(e)).split(`
|
||||
`),o=x$(n,a,i,O$);if(o===void 0)throw new yd;return[o,e,a]})}function yb(n,t){return A(this,null,function*(){try{let[e,r,i]=yield DO(n,t);return[e,r]}catch(e){e instanceof Vi?e.message&&SO(e.message):e instanceof Error&&gd(e.message)}})}function OO(n,t){return n<t.length}function x$(n,t,e,r){let i=R$(n,t);return i!==void 0||(i=C$(n,t),i!==void 0)?i:M$(n,t,e,r)}function R$(n,t){let e=n.taskLocation.lineNumber;if(OO(e,t)&&t[e]===n.originalMarkdown)return bd().debug(`Found original markdown at original line number ${e}`),e}function C$(n,t){let e=[];for(let r=0;r<t.length;r++)t[r]===n.originalMarkdown&&e.push(r);if(e.length===1)return e[0]}function M$(n,t,e,r){let i,s=0;for(let a of e){let o=a.position.start.line;if(!OO(o,t))return;if(o<n.taskLocation.sectionStart||a.task===void 0)continue;let l=t[o];if(Ae.getInstance().includedIn(l)){if(s===n.taskLocation.sectionIndex){if(l===n.originalMarkdown)i=o;else{r(`Tasks: Unable to find task in file ${n.taskLocation.path}.
|
||||
Expected task:
|
||||
${r.originalMarkdown}
|
||||
${n.originalMarkdown}
|
||||
Found task:
|
||||
${u}`);return}break}s++}}return i}var wa=class{constructor(t){this.addGlobalFilterOnSave=t.addGlobalFilterOnSave,this.originalBlocking=t.originalBlocking,this.description=t.description,this.status=t.status,this.priority=t.priority,this.onCompletion=t.onCompletion,this.recurrenceRule=t.recurrenceRule,this.createdDate=t.createdDate,this.startDate=t.startDate,this.scheduledDate=t.scheduledDate,this.dueDate=t.dueDate,this.doneDate=t.doneDate,this.cancelledDate=t.cancelledDate,this.forwardOnly=t.forwardOnly,this.blockedBy=t.blockedBy,this.blocking=t.blocking}static fromTask(t,e){let n=Ae.getInstance().removeAsWordFrom(t.description),i=n!=t.description||!Ae.getInstance().includedIn(t.description),s="none";t.priority==="5"?s="lowest":t.priority==="4"?s="low":t.priority==="2"?s="medium":t.priority==="1"?s="high":t.priority==="0"&&(s="highest");let a=[];for(let u of t.dependsOn){let l=e.find(c=>c.id===u);!l||a.push(l)}let o=e.filter(u=>u.dependsOn.includes(t.id));return new wa({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return F(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=Ae.getInstance().prependTo(n));let i=as(this.startDate,this.forwardOnly),s=as(this.scheduledDate,this.forwardOnly),a=as(this.dueDate,this.forwardOnly),o=as(this.cancelledDate,this.forwardOnly),u=as(this.createdDate,this.forwardOnly),l=as(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=_t.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Wr({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let O of this.blockedBy){let M=yield DF(O,e);f.push(M)}let m=t.id,b=[],T=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(m=bu(e.filter(O=>O.id!=="").map(O=>O.id))),b=this.originalBlocking.filter(O=>!this.blocking.includes(O)),T=this.blocking.filter(O=>!this.originalBlocking.includes(O)));let _=new de(Ee(ne({},t),{description:n,status:t.status,priority:Tr.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:f.map(O=>O.id),id:m}));for(let O of b){let M=yw(O,_);yield Br({originalTask:O,newTasks:M})}for(let O of T){let M=gw(O,_);yield Br({originalTask:O,newTasks:M})}let x=this.inferTodaysDate(this.status.type,l,o);return _.handleNewStatusWithRecurrenceInUsersOrder(this.status,x)})}inferTodaysDate(t,e,n){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&n!==null?n:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"<i>not recurring</>",isRecurrenceValid:!0};let t=(e=_t.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Wr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"<i>due, scheduled or start date required</i>",isRecurrenceValid:!1}:{parsedRecurrence:"<i>invalid recurrence rule</i>",isRecurrenceValid:!1}}};function DF(r,t){return F(this,null,function*(){if(r.id!=="")return r;let e=t.filter(i=>i.id!==""),n=ec(r,e.map(i=>i.id));return yield Br({originalTask:r,newTasks:n}),n})}function SF(r){let t,e=At("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){t=se("label"),n=_e(),i=se("input"),s=_e(),a=se("code"),o=Ge(r[4]),u=_e(),l=new ha(!1),j(t,"for","recurrence"),j(i,"id","recurrence"),j(i,"type","text"),j(i,"class","tasks-modal-date-input"),j(i,"placeholder","Try 'every day when done'"),j(i,"accesskey",r[2]),ii(i,"tasks-modal-error",!r[1]),l.a=null,j(a,"class","tasks-modal-parsed-date")},m(f,m){Te(f,t,m),t.innerHTML=e,Te(f,n,m),Te(f,i,m),nr(i,r[0].recurrenceRule),Te(f,s,m),Te(f,a,m),$(a,o),$(a,u),l.m(r[3],a),c||(d=Le(i,"input",r[5]),c=!0)},p(f,[m]){m&4&&e!==(e=At("Recurs",f[2])+"")&&(t.innerHTML=e),m&4&&j(i,"accesskey",f[2]),m&1&&i.value!==f[0].recurrenceRule&&nr(i,f[0].recurrenceRule),m&2&&ii(i,"tasks-modal-error",!f[1]),m&8&&l.p(f[3])},i:Ze,o:Ze,d(f){f&&ge(t),f&&ge(n),f&&ge(i),f&&ge(s),f&&ge(a),c=!1,d()}}}function OF(r,t,e){let{editableTask:n}=t,{isRecurrenceValid:i}=t,{accesskey:s}=t,a,{recurrenceSymbol:o}=cn.tasksPluginEmoji.taskSerializer.symbols;function u(){n.recurrenceRule=this.value,e(0,n)}return r.$$set=l=>{"editableTask"in l&&e(0,n=l.editableTask),"isRecurrenceValid"in l&&e(1,i=l.isRecurrenceValid),"accesskey"in l&&e(2,s=l.accesskey)},r.$$.update=()=>{if(r.$$.dirty&1){e:e(3,{parsedRecurrence:a,isRecurrenceValid:i}=n.parseAndValidateRecurrence(),a,(e(1,i),e(0,n)))}},[n,i,s,a,o,u]}var ug=class extends $r{constructor(t){super(),An(this,t,OF,
Line truncated
|
||||
`);t.setLine(o,b)};new Mi({app:n,task:l,onSubmit:c,allTasks:i}).open()};var fg=require("obsidian");var Rk=(r,t,e)=>{var u;if(r)return e instanceof fg.MarkdownView;if(!(e instanceof fg.MarkdownView))return;let n=(u=e.file)==null?void 0:u.path;if(n===void 0)return;let i=t.getCursor(),s=i.line,a=t.getLine(s),o=pg(a,n);t.setLine(s,o.text),t.setCursor(WF(i,o))},pg=(r,t)=>{let e=de.fromLine({line:r,taskLocation:Rt.fromUnknownPosition(new Et(t)),fallbackDate:null});if(e!==null){let n=e.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(`
|
||||
`),moveTo:{line:n.length-1}}}else{let n=r.match(le.taskRegex);if(n!==null){let i=n[3],a=$e.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(le.taskRegex,`$1- [${a}] $4`)}}else if(le.listItemRegex.test(r)){let i=r.replace(le.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(le.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},WF=(r,t)=>{var s;let e={line:0,ch:r.ch},n=ne(ne({},e),(s=t.moveTo)!=null?s:{}),i=t.text.split(`
|
||||
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var kc=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(e,n,i)=>Ck(e,n,i,this.app,this.plugin.getTasks())}),t.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Rk})}};var Ci=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function ks(r,t){let e=`Error: ${r}.
|
||||
The error message was:
|
||||
`,n="";return t instanceof Error?n+=t:n+="Unknown error",`${e}"${n}"`}var qF=Object.prototype.toString,Ea=Array.isArray||function(t){return qF.call(t)==="[object Array]"};function hg(r){return typeof r=="function"}function jF(r){return Ea(r)?"array":typeof r}function mg(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ak(r,t){return r!=null&&typeof r=="object"&&t in r}function YF(r,t){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(t)}var $F=RegExp.prototype.test;function GF(r,t){return $F.call(r,t)}var HF=/\S/;function BF(r){return!GF(HF,r)}var VF={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function zF(r){return String(r).replace(/[&<>"'`=\/]/g,function(e){return VF[e]})}var KF=/\s*/,QF=/\s+/,Pk=/\s*=/,XF=/\s*\}/,ZF=/#|\^|\/|>|\{|&|=|!/;function JF(r,t){if(!r)return[];var e=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,m;function b(K){if(typeof K=="string"&&(K=K.split(QF,2)),!Ea(K)||K.length!==2)throw new Error("Invalid tags: "+K);d=new RegExp(mg(K[0])+"\\s*"),f=new RegExp("\\s*"+mg(K[1])),m=new RegExp("\\s*"+mg("}"+K[1]))}b(t||Vr.tags);for(var T=new Au(r),_,x,O,M,Y,G;!T.eos();){if(_=T.pos,O=T.scanUntil(d),O)for(var oe=0,V=O.length;oe<V;++oe)M=O.charAt(oe),BF(M)?(s.push(i.length),u+=M):(o=!0,e=!0,u+=" "),i.push(["text",M,_,_+1]),_+=1,M===`
|
||||
`&&(c(),u="",l=0,e=!1);if(!T.scan(d))break;if(a=!0,x=T.scan(ZF)||"name",T.scan(KF),x==="="?(O=T.scanUntil(Pk),T.scan(Pk),T.scanUntil(f)):x==="{"?(O=T.scanUntil(m),T.scan(XF),T.scanUntil(f),x="&"):O=T.scanUntil(f),!T.scan(f))throw new Error("Unclosed tag at "+T.pos);if(x==">"?Y=[x,O,_,T.pos,u,l,e]:Y=[x,O,_,T.pos],l++,i.push(Y),x==="#"||x==="^")n.push(Y);else if(x==="/"){if(G=n.pop(),!G)throw new Error('Unopened section "'+O+'" at '+_);if(G[1]!==O)throw new Error('Unclosed section "'+G[1]+'" at '+_)}else x==="name"||x==="{"||x==="&"?o=!0:x==="="&&b(O)}if(c(),G=n.pop(),G)throw new Error('Unclosed section "'+G[1]+'" at '+T.pos);return tL(eL(i))}function eL(r){for(var t=[],e,n,i=0,s=r.length;i<s;++i)e=r[i],e&&(e[0]==="text"&&n&&n[0]==="text"?(n[1]+=e[1],n[3]=e[3]):(t.push(e),n=e));return t}function tL(r){for(var t=[],e=t,n=[],i,s,a=0,o=r.length;a<o;++a)switch(i=r[a],i[0]){case"#":case"^":e.push(i),n.push(i),e=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],e=n.length>0?n[n.length-1][4]:t;break;default:e.push(i)}return t}function Au(r){this.string=r,this.tail=r,this.pos=0}Au.prototype.eos=function(){return this.tail===""};Au.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Au.prototype.scanUntil=function(t){var e=this.tail.search(t),n;switch(e){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=n.length,n};function ka(r,t){this.view=r,this.cache={".":this.view},this.parent=t}ka.prototype.push=function(t){return new ka(t,this)};ka.prototype.lookup=function(t){var e=this.cache,n;if(e.hasOwnProperty(t))n=e[t];else{for(var i=this,s,a,o,u=!1;i;){if(t.indexOf(".")>0)for(s=i.view,a=t.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(u=Ak(s,a[o])||YF(s,a[o])),s=s[a[o++]];else s=i.view[t],u=Ak(i.view,t);if(u){n=s;break}i=i.parent}e[t]=n}return hg(n)&&(n=n.call(this.view)),n};function Zt(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}Zt.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};Zt.prototype.parse=function(t,e){var n=this.templateCache,i=t+":"+(e||Vr.tags).join(":"),s=typeof n!="undefined",a=s?n.get(i):void 0;return a==null&&(a=JF(t,e),s&&n.set(i,a)),a};Zt.prototype.render=function(t,e,n,i){var s=this.getConfigTags(i),a=this.parse(t,s),o=e instanceof ka?e:new ka(e,void 0);return this.renderTokens(a,o,n,t,i)};Zt.prototype.renderTokens=function(t,e,n,i,s){for(var a="",o,u,l,c=0,d=t.length;c<d;++c)l=void 0,o=t[c],u=o[0],u==="#"?l=this.renderSection(o,e,n,i,s):u==="^"?l=this.renderInverted(o,e,n,i,s):u===">"?l=this.renderPartial(o,e,n,s):u==="&"?l=this.unescapedValue(o,e):u==="name"?l=this.escapedValue(o,e,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Zt.prototype.renderSection=function(t,e,n,i,s){var a=this,o="",u=e.lookup(t[1]);function l(f){return a.render(f,e,n,s)}if(!!u){if(Ea(u))for(var c=0,d=u.length;c<d;++c)o+=this.renderTokens(t[4],e.push(u[c]),n,i,s);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(t[4],e.push(u),n,i,s);else if(hg(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(e.view,i.slice(t[3],t[5]),l),u!=null&&(o+=u)}else o+=this.renderTokens(t[4],e,n,i,s);return o}};Zt.prototype.renderInverted=function(t,e,n,i,s){var a=e.lookup(t[1]);if(!a||Ea(a)&&a.length===0)return this.renderTokens(t[4],e,n,i,s)};Zt.prototype.indentPartial=function(t,e,n){for(var i=e.replace(/[^ \t]/g,""),s=t.split(`
|
||||
`),a=0;a<s.length;a++)s[a].length&&(a>0||!n)&&(s[a]=i+s[a]);return s.join(`
|
||||
`)};Zt.prototype.renderPartial=function(t,e,n,i){if(!!n){var s=this.getConfigTags(i),a=hg(n)?n(t[1]):n[t[1]];if(a!=null){var o=t[6],u=t[5],l=t[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,e,n,c,i)}}};Zt.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Zt.prototype.escapedValue=function(t,e,n){var i=this.getConfigEscape(n)||Vr.escape,s=e.lookup(t[1]);if(s!=null)return typeof s=="number"&&i===Vr.escape?String(s):i(s)};Zt.prototype.rawValue=function(t){return t[1]};Zt.prototype.getConfigTags=function(t){return Ea(t)?t:t&&typeof t=="object"?t.tags:void 0};Zt.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Ea(t))return t.escape};var Vr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ru.templateCache=r},get templateCache(){return Ru.templateCache}},Ru=new Zt;Vr.clearCache=function(){return Ru.clearCache()};Vr.parse=function(t,e){return Ru.parse(t,e)};Vr.render=function(t,e,n,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+jF(t)+'" was given as the first argument for mustache#render(template, view, partials)');return Ru.render(t,e,n,i)};Vr.escape=zF;Vr.Scanner=Au;Vr.Context=ka;Vr.Writer=Zt;var gg=Vr;var Uk=oo(Lk());function Wk(r,t){gg.escape=function(e){return e};try{return gg.render(r,(0,Uk.default)(t))}catch(e){let n="";throw e instanceof Error?n=`There was an error expanding one or more placeholders.
|
||||
|
||||
The error message was:
|
||||
${e.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=`
|
||||
|
||||
The problem is in:
|
||||
${r}`,Error(n)}}function qk(r){return bg(r,[])}function bg(r,t){return{query:{file:r,allTasks:t}}}var Da=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(n=>n!=="").join(`
|
||||
`)}explainError(t){let e="";return e+=`Query has an error:
|
||||
`,e+=t.error+`
|
||||
`,e}explainFilters(t){return t.filters.length===0?this.indent(`No filters supplied. All tasks will match the query.
|
||||
`):t.filters.map(e=>e.explainFilterIndented(this.indentation)).join(`
|
||||
`)}explainGroups(t){return t.grouping.length===0?this.indent(`No grouping instructions supplied.
|
||||
`):t.grouping.map(e=>this.indentation+e.instruction).join(`
|
||||
`)+`
|
||||
`}explainSorters(t){return t.sorting.length===0?this.indent(`No sorting instructions supplied.
|
||||
`):t.sorting.map(e=>this.indentation+e.instruction).join(`
|
||||
`)+`
|
||||
`}explainQueryLimits(t){function e(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let n=[];if(t.limit!==void 0){let i=e(t.limit)+`.
|
||||
`;n.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied).
|
||||
`;n.push(this.indent(i))}return n.join(`
|
||||
`)}explainDebugSettings(){let t="",{debugSettings:e}=ie();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.
|
||||
`)),t}indent(t){return this.indentation+t}};var qe=class{constructor(t,e=[],n=""){this.description=t,this.symbol=n,this.children=e}static booleanAnd(t){return this.combineOrCreateExplanation("All of",t,"AND")}static booleanOr(t){return this.combineOrCreateExplanation("At least one of",t,"OR")}static booleanNot(t){return new qe("None of",t,"NOT")}static booleanXor(t){return new qe("Exactly one of",t,"XOR")}asString(t=""){if(this.children.length==0)return t+this.description;let e=t;this.symbol===""?e+=this.description:(e+=this.symbol,this.children.length>1&&(e+=` (${this.description})`),e+=":");let n=t+" ";for(let i=0;i<this.children.length;i++)e+=`
|
||||
${this.children[i].asString(n)}`;return e}static combineOrCreateExplanation(t,e,n){if(e.length===2){let i=e[0],s=e[1];if(i.symbol===n&&s.symbol==="")return i.children.push(s),i}return new qe(t,e,n)}};var Sa=class{matchesAnyOf(t){return t.some(e=>this.matches(e))}};var Oa=class extends Sa{constructor(e){super();this.stringToFind=e}matches(e){return Oa.stringIncludesCaseInsensitive(e,this.stringToFind)}static stringIncludesCaseInsensitive(e,n){return e.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(e){return new qe(e)}};var Ri=class extends Sa{constructor(e){super();this.regex=e}static validateAndConstruct(e){let n=/^\/(.+)\/([^/]*)$/,i=e.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new Ri(s)}else return null}matches(e){return e.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions
|
||||
${l}`);return}break}s++}}return i}kc();Ds();Pc();Pt();qc();qn();var Td=class n{constructor(t){this.addGlobalFilterOnSave=t.addGlobalFilterOnSave,this.originalBlocking=t.originalBlocking,this.description=t.description,this.status=t.status,this.priority=t.priority,this.onCompletion=t.onCompletion,this.recurrenceRule=t.recurrenceRule,this.createdDate=t.createdDate,this.startDate=t.startDate,this.scheduledDate=t.scheduledDate,this.dueDate=t.dueDate,this.doneDate=t.doneDate,this.cancelledDate=t.cancelledDate,this.forwardOnly=t.forwardOnly,this.blockedBy=t.blockedBy,this.blocking=t.blocking}static fromTask(t,e){let r=Ae.getInstance().removeAsWordFrom(t.description),i=r!=t.description||!Ae.getInstance().includedIn(t.description),s="none";t.priority==="5"?s="lowest":t.priority==="4"?s="low":t.priority==="2"?s="medium":t.priority==="1"?s="high":t.priority==="0"&&(s="highest");let a=[];for(let l of t.dependsOn){let u=e.find(c=>c.id===l);u&&a.push(u)}let o=e.filter(l=>l.dependsOn.includes(t.id));return new n({addGlobalFilterOnSave:i,originalBlocking:o,description:r,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return A(this,null,function*(){let r=this.description.trim();this.addGlobalFilterOnSave&&(r=Ae.getInstance().prependTo(r));let i=bs(this.startDate,this.forwardOnly),s=bs(this.scheduledDate,this.forwardOnly),a=bs(this.dueDate,this.forwardOnly),o=bs(this.cancelledDate,this.forwardOnly),l=bs(this.createdDate,this.forwardOnly),u=bs(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=wi.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new gi({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let C of this.blockedBy){let O=yield A$(C,e);f.push(O)}let p=t.id,h=[],b=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(p=Fl(e.filter(C=>C.id!=="").map(C=>C.id))),h=this.originalBlocking.filter(C=>!this.blocking.includes(C)),b=this.blocking.filter(C=>!this.originalBlocking.includes(C)));let v=new ke(pe(q({},t),{description:r,status:t.status,priority:wr.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:u,createdDate:l,cancelledDate:o,dependsOn:f.map(C=>C.id),id:p}));for(let C of h){let O=PE(C,v);yield Wn({originalTask:C,newTasks:O})}for(let C of b){let O=AE(C,v);yield Wn({originalTask:C,newTasks:O})}let D=this.inferTodaysDate(this.status.type,u,o);return v.handleNewStatusWithRecurrenceInUsersOrder(this.status,D)})}inferTodaysDate(t,e,r){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&r!==null?r:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"<i>not recurring</>",isRecurrenceValid:!0};let t=(e=wi.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new gi({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"<i>due, scheduled or start date required</i>",isRecurrenceValid:!1}:{parsedRecurrence:"<i>invalid recurrence rule</i>",isRecurrenceValid:!1}}};function A$(n,t){return A(this,null,function*(){if(n.id!=="")return n;let e=t.filter(i=>i.id!==""),r=Lc(n,e.map(i=>i.id));return yield Wn({originalTask:n,newTasks:r}),r})}ft();function xO(n,t,e){let r=n.slice();return r[7]=t[e].value,r[8]=t[e].label,r[9]=t[e].symbol,r[10]=t[e].accessKey,r[11]=t[e].accessKeyIndex,r}function P$(n){let t,e=n[8]+"",r;return{c(){t=re("span"),r=je(e)},m(i,s){ce(i,t,s),G(t,r)},p:Ue,d(i){i&&le(t)}}}function I$(n){let t,e=n[8].substring(0,n[11])+"",r,i,s=n[8].substring(n[11],n[11]+1)+"",a,o,l=n[8].substring(n[11]+1)+"",u;return{c(){t=re("span"),r=je(e),i=re("span"),a=je(s),o=re("span"),u=je(l),$(i,"class","accesskey")},m(c,d){ce(c,t,d),G(t,r),ce(c,i,d),G(i,a),ce(c,o,d),G(o,u)},p:Ue,d(c){c&&le(t),c&&le(i),c&&le(o)}}}function N$(n){let t,e=n[9]+"",r;return{c(){t=re("span"),r=je(e)},m(i,s){ce(i,t,s),G(t,r)},p:Ue,d(i){i&&le(t)}}}function RO(n){let t,e,r,i,s,a,o,l,u=n[9]&&n[9].charCodeAt(0)>=256,c,d,f,p,h;function b(O,U){return O[1]?I$:P$}let v=b(n,-1),D=v(n),C=u&&N$(n);return f=FD(n[5][0]),{c(){t=re("div"),e=re("input"),a=he(),o=re("label"),D.c(),l=he(),C&&C.c(),d=he(),$(e,"type","radio"),$(e,"id",r="priority-"+n[7]),e.__value=i=n[7],e.value=e.__value,$(e,"accesskey",s=n[2](n[10])),$(o,"for",c="priority-"+n[7]),$(t,"class","task-modal-priority-option-container"),f.p(e)},m(O,U){ce(O,t,U),G(t,e),e.checked=e.__value===n[0],G(t,a),G(t,o),D.m(o,null),G(o,l),C&&C.m(o,null),G(t,d),p||(h=Ne(e,"change",n[4]),p=!0)},p(O,U){U&4&&s!==(s=O[2](O[10]))&&$(e,"accesskey",s),U&1&&(e.checked=e.__value===O[0]
Line truncated
|
||||
`);t.setLine(l,b)};new Ki({app:r,task:c,onSaveSettings:s,onSubmit:d,allTasks:i}).open()};Er();Pt();si();var Sb=require("obsidian");var s1=(n,t)=>{let e={line:0,ch:n.ch},r=q(q({},e),t.moveTo),i=t.text.split(`
|
||||
`)[r.line].length;return{line:n.line+r.line,ch:Math.min(r.ch,i)}},wd=n=>{function t(e,r,i){var f;if(e)return i instanceof Sb.MarkdownView;if(!(i instanceof Sb.MarkdownView))return;let s=(f=i.file)==null?void 0:f.path;if(s===void 0)return;let a=r.getCursor(),o=a.line,l=r.getLine(o),u=n(l,s);if(u===void 0)return;let c=u.text.length>0,d=o>=r.lineCount()-1;if(c||d)r.setLine(o,u.text);else{let p={line:o,ch:0},h={line:o+1,ch:0};r.replaceRange("",p,h)}r.setCursor(s1(a,u))}return t};var Eb=(n,t)=>{let e=ke.fromLine({line:n,taskLocation:Jt.fromUnknownPosition(new mt(t)),fallbackDate:null});if(e!==null){let r=e.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString()),i=r.length>0?r.length-1:0;return{text:r.join(`
|
||||
`),moveTo:{line:i}}}else{let r=n.match($e.taskRegex);if(r!==null){let i=r[3],a=Je.getInstance().bySymbol(i).nextStatusSymbol;return{text:n.replace($e.taskRegex,`$1$2 [${a}] $4`)}}else if($e.listItemRegex.test(n)){let i=n.replace($e.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=n.replace($e.indentationRegex,"$1- [ ] ");return{text:i,moveTo:{ch:i.length}}}}},a1=wd(Eb);var zb=require("obsidian");ft();var Qi=class{constructor(){this.hideToolbar=!1;this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideNestedBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function o1(n,t,e){let r=new Map([["backlink","hideBacklinks"],["edit button","hideEditButton"],["nested backlink","hideNestedBacklinks"],["postpone button","hidePostponeButton"],["task count","hideTaskCount"],["toolbar","hideToolbar"],["tree","hideTree"],["urgency","hideUrgency"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n[s]=e,!0;return!1}Es();hn();var et=class n{constructor(t,e=[],r=""){this.description=t,this.symbol=r,this.children=e}static booleanAnd(t){return this.combineOrCreateExplanation("All of",t,"AND")}static booleanOr(t){return this.combineOrCreateExplanation("At least one of",t,"OR")}static booleanNot(t){return new n("None of",t,"NOT")}static booleanXor(t){return new n("Exactly one of",t,"XOR")}asString(t=""){if(this.children.length==0)return t+this.description;let e=t;this.symbol===""?e+=this.description:(e+=this.symbol,this.children.length>1&&(e+=` (${this.description})`),e+=":");let r=t+" ";for(let i=0;i<this.children.length;i++)e+=`
|
||||
${this.children[i].asString(r)}`;return e}static combineOrCreateExplanation(t,e,r){if(e.length===2){let i=e[0],s=e[1];if(i.symbol===r&&s.symbol==="")return i.children.push(s),i}return new n(t,e,r)}};var Ba=class{matchesAnyOf(t){return t.some(e=>this.matches(e))}};var _d=class n extends Ba{constructor(t){super(),this.stringToFind=t}matches(t){return n.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,e){return t.toLocaleLowerCase().includes(e.toLocaleLowerCase())}explanation(t){return new et(t)}};Ra();var Ga=class n extends Ba{constructor(t){super(),this.regex=t}static validateAndConstruct(t){let e=/^\/(.+)\/([^/]*)$/,r=t.match(e);if(r!==null){let i=new RegExp(r[1],r[2]),s=iD(r[1]);if(s!==null)throw new SyntaxError(s);return new n(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/
|
||||
@@ -267,19 +317,24 @@ 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(e){let i=rL(e,"using regex: ",this.regexAsString());return new qe(i)}regexAsString(){let e=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:e+="no flags";break;case 1:e+=`flag '${this.regex.flags}'`;break;default:e+=`flags '${this.regex.flags}'`;break}return e}};function rL(r,t,e){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${t.padEnd(s)}${e}`}var mn=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.comparator=mn.maybeReverse(i,n)}static maybeReverse(t,e){return t?mn.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,n,i)=>t(e,n,i)*-1}};var Ai=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.grouper=n,this.reverse=i}};var Ue=class{canCreateFilterForLine(t){return Ue.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Si(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=Ue.getMatch(this.sorterRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new mn(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=Ue.getMatch(this.grouperRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Ai(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var li=class{constructor(t,e){this._rawInstruction=t,this._anyContinuationLinesRemoved=e.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(t){this._anyPlaceholdersExpanded=t}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(t){function e(a,o){o!==a&&(s+=` =>
|
||||
${t}${o}`)}let n=this._rawInstruction.trim(),i=n.split(`
|
||||
|
||||
Patterns with nested quantifiers (for example (a+)+) are rejected
|
||||
because they can cause extreme slowdowns (catastrophic backtracking).
|
||||
`}explanation(t){let r=Q$(t,"using regex: ",this.regexAsString());return new et(r)}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 Q$(n,t,e){var o;let r=n.match(/\//);if(!r)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=r.index)!=null?o:i)-i;return`${t.padEnd(s)}${e}`}function Bs(n,t){let e=`Error: ${n}.
|
||||
The error message was:
|
||||
`,r="";return t instanceof Error?r+=t:r+="Unknown error",`${e}"${r}"`}var yn=class{constructor(t,e){this._rawInstruction=t,this._anyContinuationLinesRemoved=e.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(t){this._anyPlaceholdersExpanded=t}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(t){function e(a,o){o!==a&&(s+=` =>
|
||||
${t}${o}`)}let r=this._rawInstruction.trim(),i=r.split(`
|
||||
`).join(`
|
||||
`+t),s=`${t}${i}`;return this._rawInstruction.includes(`
|
||||
`)&&(s+=`
|
||||
`+t),e(n,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var qt=class{constructor(t,e,n){this._statement=new li(t,t),this.explanation=n,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e}
|
||||
`+t),e(r,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var Zi=class n{constructor(t,e,r,i){this._statement=new yn(t,t),this.property=e,this.comparator=n.maybeReverse(i,r)}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}static maybeReverse(t,e){return t?n.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,r,i)=>t(e,r,i)*-1}};Ra();var Xi=class{constructor(t,e,r,i){this._statement=new yn(t,t),this.property=e,this.grouper=r,this.reverse=i}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}};var Ze=class n{canCreateFilterForLine(t){return n.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Hi(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=n.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createSorter(r)}sorterRegExp(){if(!this.supportsSorting())throw new Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw new Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new Zi(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=n.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createGrouper(r)}grouperRegExp(){if(!this.supportsGrouping())throw new Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw new Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Xi(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var sn=class{constructor(t,e,r){this._statement=new yn(t,t),this.explanation=r,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e}
|
||||
`:`${e} =>
|
||||
${this.explanation.asString(t+" ")}
|
||||
`}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new qe(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var Nn=class{constructor(t){this.instruction=t}get queryComponent(){return this._queryComponent}set queryComponent(t){this._queryComponent=t}get error(){return this._error}set error(t){this._error=t}isValid(){return this._queryComponent!==void 0}static fromObject(t,e){let n=new Nn(t);return n._queryComponent=e,n}static fromError(t,e){let n=new Nn(t);return n._error=e,n}};var ye=class{constructor(t){this.object=t}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(t){return new ye(Nn.fromObject(t.instruction,t))}static fromError(t,e){return new ye(Nn.fromError(t,e))}};var Ke=class extends Ue{createFilterOrErrorMessage(t){let e=Ue.getMatch(this.filterRegExp(),t);if(e===null)return ye.fromError(t,`do not understand query filter (${this.fieldName()})`);let n=e[1].toLowerCase(),i=e[2],s=null;if(n.includes("include"))s=new Oa(i);else if(n.includes("regex")){try{s=Ri.validateAndConstruct(i)}catch(u){let l=ks("Parsing regular expression",u)+`
|
||||
`}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new et(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var Gs=class n{constructor(t){this.instruction=t}get queryComponent(){return this._queryComponent}set queryComponent(t){this._queryComponent=t}get error(){return this._error}set error(t){this._error=t}isValid(){return this._queryComponent!==void 0}static fromObject(t,e){let r=new n(t);return r._queryComponent=e,r}static fromError(t,e){let r=new n(t);return r._error=e,r}};var De=class n{constructor(t){this.object=t}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(t){return new n(Gs.fromObject(t.instruction,t))}static fromError(t,e){return new n(Gs.fromError(t,e))}};var tt=class extends Ze{createFilterOrErrorMessage(t){let e=Ze.getMatch(this.filterRegExp(),t);if(e===null)return De.fromError(t,`do not understand query filter (${this.fieldName()})`);let r=e[1].toLowerCase(),i=e[2],s=null;if(r.includes("include"))s=new _d(i);else if(r.includes("regex")){try{s=Ga.validateAndConstruct(i)}catch(l){let u=Bs("Parsing regular expression",l)+`
|
||||
|
||||
${Ri.helpMessage()}`;return ye.fromError(t,l)}if(s===null)return ye.fromError(t,`Invalid instruction: '${t}'
|
||||
${Ga.helpMessage()}`;return De.fromError(t,u)}if(s===null)return De.fromError(t,`Invalid instruction: '${t}'
|
||||
|
||||
${Ri.helpMessage()}`)}if(s===null)return ye.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new qt(t,this.getFilter(s,a),s.explanation(t));return ye.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return n=>{let i=t.matches(this.value(n));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Es=class extends Ke{fieldName(){return"description"}value(t){return Ae.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let n=Es.cleanDescription(t.description),i=Es.cleanDescription(e.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Ae.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,n=t.match(e);if(n!==null){let i=n[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let n=t.match(e);return n!==null&&(t=n[1]+t.replace(e,"")),t}};var Ec=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let n of e)if(t.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted.
|
||||
${Ga.helpMessage()}`)}if(s===null)return De.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=r.match(/not/)!==null,o=new sn(t,this.getFilter(s,a),s.explanation(t));return De.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return r=>{let i=t.matches(this.value(r));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var za=class n extends tt{fieldName(){return"description"}value(t){return Ae.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=n.cleanDescription(t.description),i=n.cleanDescription(e.description);return r.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Ae.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,r=t.match(e);if(r!==null){let i=r[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let r=t.match(e);return r!==null&&(t=r[1]+t.replace(e,"")),t}};sy();ay();Ts();var Sd=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let r of e)if(t.includes(r))return this.unexpandedDateTextMessage(r);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted.
|
||||
|
||||
Possible causes:
|
||||
- The query is an a template file, and is not intended to be searched.
|
||||
@@ -289,8 +344,12 @@ Possible causes:
|
||||
- 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 Dc=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?ye.fromFilter(new qt(t,this._filter,new qe(t))):ye.fromError(t,`do not understand filter: ${t}`)}};var or=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new Dc(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let n=e.createFilterOrErrorMessage(t);if(n.isValid())return n}return ye.fromError(t,`do not understand filter: ${t}`)}};var vt=class extends Ue{constructor(e=null){super();e!==null?this.filterInstructions=e:(this.filterInstructions=new or,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){var f;let n=this.checkForUnexpandedTemplateText(e);if(n)return ye.fromError(e,n);let i=this.filterInstructions.createFilterOrErrorMessage(e);if(i.isValid())return i;let s=Ue.getMatch(this.filterRegExp(),e);if(s===null)return ye.fromError(e,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(f=s[2])==null?void 0:f.toLowerCase(),u=s[3],l=gr.parseDateRange(u);if(!l.isValid()){let m=gr.parseDate(a);m.isValid()&&(l=new Vt(m,m))}if(!l.isValid())return ye.fromError(e,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=vt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ye.fromFilter(new qt(e,c,d))}buildFilterFunction(e,n){let i;switch(e){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(e){return n=>e(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(e,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${e} date is between:`,d=[new qe(`${s.start.format(o)} and`),new qe(`${s.end.format(o)} inclusive`)];return i&&d.push(new qe(`OR no ${e} date`)),new qe(c,d)}a="on",u=s.start.format(o);break}let l=`${e} date is ${a} ${u}`;return i&&(l+=` OR no ${e} date`),new qe(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(e,n)=>Ur(this.date(e),this.date(n))}supportsGrouping(){return!0}grouper(){return e=>{let n=this.date(e);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(e){return new Ec().findUnexpandedDateText(e)}};var Sc=class extends vt{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var Oc=class extends vt{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var xa=class extends vt{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var zr=class extends Ue{constructor(){super(...arguments);this._filters=new or}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var xc=class extends zr{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};var Pu=class extends Nn{};function Tg(r,t){let e=r.map(([n])=>n);try{let n=t.includes("return")?t:`return ${t}`,i=t&&new Function(...e,n);return i instanceof Function?Pu.fromObject(t,i):Pu.fromError(t,"Error parsing group function")}catch(n){return Pu.fromError(t,ks(`Failed parsing expression "${t}"`,n))}}function _g(r,t){let e=t.map(([n,i])=>i);return r(...e)}function vg(r,t,e){try{re
Line truncated
|
||||
See: https://publish.obsidian.md/tasks/Advanced/Daily+Agenda#Instruction+contains+unexpanded+template+text
|
||||
`}};var Ed=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?De.fromFilter(new sn(t,this._filter,new et(t))):De.fromError(t,`do not understand filter: ${t}`)}};var xn=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new Ed(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let r=e.createFilterOrErrorMessage(t);if(r.isValid())return r}return De.fromError(t,`do not understand filter: ${t}`)}};var an=class n extends Ze{constructor(t=null){super(),t!==null?this.filterInstructions=t:(this.filterInstructions=new xn,this.filterInstructions.add(`has ${this.fieldName()} date`,e=>this.date(e)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,e=>this.date(e)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,e=>{let r=this.date(e);return r!==null&&!r.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var d;let e=this.checkForUnexpandedTemplateText(t);if(e)return De.fromError(t,e);let r=this.filterInstructions.createFilterOrErrorMessage(t);if(r.isValid())return r;let i=Ze.getMatch(this.filterRegExp(),t);if(i===null)return De.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let s=i[1],a=(d=i[2])==null?void 0:d.toLowerCase(),o=i[3],l=hi.parseDateRange(o);if(!l.isValid()){let f=hi.parseDate(s);f.isValid()&&(l=new Jn(f,f))}if(!l.isValid())return De.fromError(t,"do not understand "+this.fieldName()+" date");let u=this.buildFilterFunction(a,l),c=n.buildExplanation(this.fieldNameForExplanation(),a,this.filterResultIfFieldMissing(),l);return De.fromFilter(new sn(t,u,c))}buildFilterFunction(t,e){let r;switch(t){case"before":r=i=>i?i.isBefore(e.start):this.filterResultIfFieldMissing();break;case"after":r=i=>i?i.isAfter(e.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":r=i=>i?i.isSameOrBefore(e.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":r=i=>i?i.isSameOrAfter(e.start):this.filterResultIfFieldMissing();break;default:r=i=>i?i.isSameOrAfter(e.start)&&i.isSameOrBefore(e.end):this.filterResultIfFieldMissing()}return this.getFilter(r)}getFilter(t){return e=>t(this.date(e))}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,e,r,i){let s=e,a="YYYY-MM-DD (dddd Do MMMM YYYY)",o;switch(e){case"before":case"on or after":o=i.start.format(a);break;case"after":case"on or before":o=i.end.format(a);break;case"in or before":s="on or before",o=i.end.format(a);break;case"in or after":s="on or after",o=i.start.format(a);break;default:if(!i.start.isSame(i.end)){let u=`${t} date is between:`,c=[new et(`${i.start.format(a)} and`),new et(`${i.end.format(a)} inclusive`)];return r&&c.push(new et(`OR no ${t} date`)),new et(u,c)}s="on",o=i.start.format(a);break}let l=`${t} date is ${s} ${o}`;return r&&(l+=` OR no ${t} date`),new et(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,e)=>er(this.date(t),this.date(e))}supportsGrouping(){return!0}grouper(){return t=>{let e=this.date(t);return e===null?["No "+this.fieldName()+" date"]:e.isValid()?[e.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new Sd().findUnexpandedDateText(t)}};var Dd=class extends an{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var Od=class extends an{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var Va=class extends an{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var cr=class extends Ze{constructor(){super(...arguments);this._filters=new xn}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var xd=class extends cr{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};var l1="enableJsInTasksQueries";var on=class n{constructor(t){this.storage=t;this.value=this.loadValue()}static initialise(t){return n.instance=new n(t),n.instance}static getInstance(){if(!n.instance)throw new Error("EnableJsInTasksQueries has not been initialised.");return n.instance}get(){return this.value}set(t){this.value=t,this.storage.save(l1,t)}loadValue(){let t=this.storage.lo
Line truncated
|
||||
This query uses JavaScript, for example via "filter by function", "sort by function", or "group by function".
|
||||
JavaScript can run inside Obsidian and access or modify vault contents, local files, or other system resources.
|
||||
Read the Tasks documentation page "JavaScript in Tasks Queries" before deciding whether to enable it:
|
||||
https://publish.obsidian.md/tasks/Scripting/JavaScript+in+Tasks+Queries`;var Or=Kl;var Ql=class extends Gs{};function Zl(n,t){if(!on.getInstance().get())throw new Or;try{let e=n.map(([s])=>s),r=t.includes("return")?t:`return ${t}`,i=t&&new Function(...e,r);return i instanceof Function?Ql.fromObject(t,i):Ql.fromError(t,`Problem parsing expression "${t}"`)}catch(e){return Ql.fromError(t,Bs(`Failed parsing expression "${t}"`,e))}}function Xl(n,t){if(!on.getInstance().get())throw new Or;let e=t.map(([r,i])=>i);return n(...e)}function Db(n,t,e){try{return Xl(n,t)}catch(r){return Bs(`Failed calculating expression "${e}"`,r)}}function Rd(n,t){return[["task",n],["query",t?t.query:null]]}function u1(n,t,e){let r=Rd(n,e||null),i=Zl(r,t);return i.error?i.error:Db(i.queryComponent,r,t)}var Jl=class{constructor(t){this.line=t,this.functionOrError=Zl(Rd(null,null),t)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(t,e){if(!this.isValid())throw new Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Xl(this.functionOrError.queryComponent,Rd(t,e||null))}evaluateOrCatch(t,e){return this.isValid()?Db(this.functionOrError.queryComponent,Rd(t,e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};Ts();function Ob(n){if(n===null)return"null";let t=typeof n;return t==="object"?n.constructor.name:t}var Cd=class extends Ze{createFilterOrErrorMessage(t){if(!on.getInstance().get())return De.fromError(t,Or.helpMessage);let e=Ze.getMatch(this.filterRegExp(),t);if(e===null)return De.fromError(t,"Unable to parse line");let r=e[1],i=new Jl(r);return i.isValid()?De.fromFilter(new sn(t,Z$(i),new et(t))):De.fromError(t,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(t){let e=Ze.getMatch(this.sorterRegExp(),t);if(e===null)return null;if(!on.getInstance().get())throw new Or;let r=!!e[1],i=e[2],s=new Jl(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,l,u)=>{try{let c=u.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(l,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${t}'`),c}};return new Zi(t,this.fieldNameSingular(),a,r)}validateTaskSortKey(t){function e(r){throw new Error(`"${r}" is not a valid sort key`)}return t===void 0&&e("undefined"),Number.isNaN(t)&&e("NaN (Not a Number)"),Array.isArray(t)&&e("array"),t}compareTaskSortKeys(t,e){let r=Ob(t),i=Ob(e),s=this.compareTaskSortKeysIfOptionalMoment(t,e,r,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(t,e);if(a!==void 0)return a;if(r!==i)throw new Error(`Unable to compare two different sort key types '${r}' and '${i}' order`);if(r==="string")return t.localeCompare(e,void 0,{numeric:!0});if(r==="TasksDate")return er(t.moment,e.moment);if(r==="boolean")return Number(e)-Number(t);let o=Number(t)-Number(e);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${r}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(t,e,r,i){let s=r==="Moment",a=i==="Moment";if(s&&a||s&&e===null||a&&t===null)return er(t,e)}compareTaskSortKeysIfEitherIsNull(t,e){if(t===null&&e===null)return 0;if(t===null&&e!==null)return-1;if(t!==null&&e===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(t){let e=Ze.getMatch(this.grouperRegExp(),t);if(e===null)return null;if(!on.getInstance().get())throw new Or;let r=!!e[1],i=e[2];return new Xi(t,"function",J$(i),r)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw new Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function Z$(n){return(t,e)=>{let r=e.queryContext();return X$(n,t,r)}}function X$(n,t,e){let r=n.evaluate(t,e);if(typeof r=="boolean")return r;throw new Error(`filtering function must return true or false. This returned "${r}".`)}function J$(n){return(t,e)=>{let r=e.queryContext();return ej(t,n,r)}}function ej(n,t,e){try{let r=u1(n,t,e);return Array.isArray(r)?r.map(s=>s.toString()):r===null?[]:typeof r=="number"&&!Number.isInteger(r)?[r.toFixed(5)]:[r.toString()]}catch(r){let i=`Error: Failed calculating expression "${t}". The error message was: `;return r instanceof Error?[i+r.message]:[i+"Unknown error"]}}var Md=class extends tt{fieldName(){return"heading"}value(t){return t.precedingHeader?t.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>t.precedingHeader===null||t.precedingHeader.length===0?["(No heading)"]:[t.precedingHeader]}};var Ka=class extends tt{fieldName(){return"path"}valu
Line truncated
|
||||
|
||||
The instruction was converted to the following simplified line:
|
||||
${i.simplifiedLine}
|
||||
@@ -300,117 +359,200 @@ ${a}
|
||||
|
||||
For help, see:
|
||||
https://publish.obsidian.md/tasks/Queries/Combining+Filters
|
||||
`;return ye.fromError(e,u)}stringifySubExpressionsForErrorMessage(e){return Object.entries(e).map(([n,i])=>` '${n}': '${i}'
|
||||
`;return De.fromError(e,l)}stringifySubExpressionsForErrorMessage(e){return Object.entries(e).map(([r,i])=>` '${r}': '${i}'
|
||||
=> ${this.stringifySubExpressionStatus(i)}`).join(`
|
||||
`)}stringifySubExpressionStatus(e){let n=Fu(e);return n?n.error?`ERROR:
|
||||
${n.error.split(`
|
||||
`)}stringifySubExpressionStatus(e){let r=nu(e);return r?r.error?`ERROR:
|
||||
${r.error.split(`
|
||||
`).map(s=>s.trim()).join(`
|
||||
`)}`:"OK":`ERROR:
|
||||
do not understand query`}helpMessageFromSimpleError(e,n){return`Could not interpret the following instruction as a Boolean combination:
|
||||
do not understand query`}helpMessageFromSimpleError(e,r){return`Could not interpret the following instruction as a Boolean combination:
|
||||
${e}
|
||||
|
||||
The error message is:
|
||||
${n}`}};var Yc=class extends Ke{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var La=class extends Ue{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return ye.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var $c=class extends Ke{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Un=class extends Ue{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Ue.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=Ue.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let n=e[1].toLowerCase(),i=e[2],s=zt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(n){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return ye.fromFilter(new qt(t,a,new qe(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(zt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${t}'.
|
||||
${r}`}};var Gd=class extends tt{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var io=class extends Ze{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return De.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw new Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var zd=class extends tt{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};qn();var so=class n extends Ze{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Ze.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=Ze.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let r=e[1].toLowerCase(),i=e[2],s=Kt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(r){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return De.fromFilter(new sn(t,a,new et(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(Kt).filter(i=>i!=="EMPTY").join(" "),r=`Invalid ${this.fieldNameSingular()} instruction: '${t}'.
|
||||
Allowed options: 'is' and 'is not' (without quotes).
|
||||
Allowed values: ${e}
|
||||
Note: values are case-insensitive,
|
||||
so 'in_progress' works too, for example.
|
||||
Example: ${this.fieldNameSingular()} is not NON_TASK`;return ye.fromError(t,n)}fieldName(){return"status.type"}value(t){return t.status.type}supportsSorting(){return!0}comparator(){return(t,e)=>{let n=Un.groupName(t),i=Un.groupName(e);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>[Un.groupName(t)]}static groupName(t){return t.status.typeGroupText}};var Gc=class extends Ke{fieldName(){return"recurrence"}value(t){return t.recurrence!==null?t.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?[t.recurrence.toText()]:["None"]}};var Hc=class extends Ke{fieldName(){return"folder"}value(t){return t.file.folder}supportsGrouping(){return!0}grouper(){return t=>[Ke.escapeMarkdownCharacters(this.value(t))]}};var Bc=class extends Ke{fieldName(){return"root"}value(t){return t.file.root}supportsGrouping(){return!0}grouper(){return t=>[Ke.escapeMarkdownCharacters(this.value(t))]}};var Vc=class extends Ke{fieldName(){return"backlink"}value(t){let e=t.getLinkText({isFilenameUnique:!0});return e===null?"Unknown Location":e}createFilterOrErrorMessage(t){return ye.fromError(t,"backlink field does not support filtering")}canCreateFilterForLine(t){return!1}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;if(e===null)return["Unknown Location"];let n=t.precedingHeader;return n===null?["[["+e+"]]"]:[`[[${e}#${n}|${e} > ${n}]]`]}}};var zc=class extends vt{fieldName(){return"cancelled"}date(t){return t.cancelledDate}filterResultIfFieldMissing(){return!1}};var Kc=class extends zr{constructor(){super(),this._filters.add("is blocking",(t,e)=>t.isBlocking(e.allTasks)),this._filters.add("is not blocking",(t,e)=>!t.isBlocking(e.allTasks)),this._filters.add("is blocked",(t,e)=>t.isBlocked(e.allTasks)),this._filters.add("is not blocked",(t,e)=>!t.isBlocked(e.allTasks))}fieldName(){return"blocking"}};var Qc=class extends Ke{constructor(){super();this.filterInstructions=new or;this.filterInstructions.add("has id",e=>e.id.length>0),this.filterInstructions.add("no id",e=>e.id.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let n=this.filterInstructions.createFilterOrErrorMessage(e);return n.isValid()?n:super.createFilterOrErrorMessage(e)}fieldName(){return"id"}value(e){return e.id}supportsSorting(){return!0}supportsGrouping(){return!0}};var Xc=class extends Ue{constructor(){super();this.filterInstructions=new or;this.filterInstructions.add("has depends on",e=>e.dependsOn.length>0),this.filterInstructions.add("no depends on",e=>e.dependsOn.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let n=this.filterInstructions.createFilterOrErrorMessage(e);return n.isValid()?n:ye.fromError(e,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var Zc=class extends zr{fieldName(){return"random"}supportsSorting(){return!0}comparator(){return(t,e)=>this.sortKey(t)-this.sortKey(e)}sortKey(t){let e=i=>{let s=0,a=9;for(;s<i.length;)a=Math.imul(a^i.charCodeAt(s++),387420489);return a^a>>>9},n=window.moment().format("Y-MM-DD");return e(n+" "+t.description)}};var Ng=[()=>new $c,()=>new Un,()=>new Pi,()=>new Ic,()=>new Ds,()=>new Nc,()=>new zc,()=>new Sc,()=>new Pc,()=>new Ac,()=>new xa,()=>new Oc,()=>new Ma,()=>new Hc,()=>new Bc,()=>new Vc,()=>new Es,()=>new Ss,()=>new Rc,()=>new xc,()=>new Yc,()=>new La,()=>new Gc,()=>new Cc,()=>new Qc,()=>new Xc,()=>new Kc,()=>new Zc,()=>new jc];function Fu(r){for(let t of Ng){let e=t();if(e.canCreateFilterForLine(r))return e.createFilterOrErrorMessage(r)}return null}function rE(r){let t=/^sort by /i;if(r.match(t)===null)return null;for(let e of Ng){let i=e().createSorterFromLine(r);if(i)return i}return null}function nE(r){let t=/^group by /i;if(r.match(t)===null)return null;for(let e of Ng){let i=e().createGrouperFromLine(r);if(i)return i}return null}var Jc=class{constructor(t,e,n){this.nestingLevel=t,this.displayName=e,this.property=n}};var ed=class{constructor(t,e){this.lastHeadingAtLevel=new Array;this.groupers=e;let i=t.keys().next().value.length;for(let s=0;s<i;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(t){let e=new Array;for(let n=0;n<t.length;n++){let i=t[n];if(i!=this.lastHeadingAtLevel[n]){e.push(new Jc(n,i,this.groupers[n].property));for(let s=n;s<t.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return e}};var td=class{constructor(t){this.children=new Map;this.values=[];this.values=t}generateAllPaths(t=[]){let e=new Map;if(this.children.size==0)return e.set([...t],this.values),e;for(let[n,i]of this.children)t.push(n),i.generateAllPaths(t).forEach((a,o)=>e.set(o,a)),t.pop();return e}};var rd=class extends td{},nd=class{constructor(t,e,n){this.root=new rd(e),this.buildGroupingTree(t,n)}buildGroupingTree(t,e){let n=[
Line truncated
|
||||
Example: ${this.fieldNameSingular()} is not NON_TASK`;return De.fromError(t,r)}fieldName(){return"status.type"}value(t){return t.status.type}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=n.groupName(t),i=n.groupName(e);return r.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>[n.groupName(t)]}static groupName(t){return t.status.typeGroupText}};var Vd=class extends tt{fieldName(){return"recurrence"}value(t){return t.recurrence!==null?t.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?[t.recurrence.toText()]:["None"]}};var Kd=class extends tt{fieldName(){return"folder"}value(t){return t.file.folder}supportsGrouping(){return!0}grouper(){return t=>[tt.escapeMarkdownCharacters(this.value(t))]}};var Qd=class extends tt{fieldName(){return"root"}value(t){return t.file.root}supportsGrouping(){return!0}grouper(){return t=>[tt.escapeMarkdownCharacters(this.value(t))]}};var Zd=class extends tt{fieldName(){return"backlink"}value(t){let e=t.getLinkText({isFilenameUnique:!0});return e===null?"Unknown Location":e}createFilterOrErrorMessage(t){return De.fromError(t,"backlink field does not support filtering")}canCreateFilterForLine(t){return!1}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;if(e===null)return["Unknown Location"];let r=t.precedingHeader;return r===null?["[["+e+"]]"]:[`[[${e}#${r}|${e} > ${r}]]`]}}};var Xd=class extends an{fieldName(){return"cancelled"}date(t){return t.cancelledDate}filterResultIfFieldMissing(){return!1}};var Jd=class extends cr{constructor(){super(),this._filters.add("is blocking",(t,e)=>t.isBlocking(e.allTasks)),this._filters.add("is not blocking",(t,e)=>!t.isBlocking(e.allTasks)),this._filters.add("is blocked",(t,e)=>t.isBlocked(e.allTasks)),this._filters.add("is not blocked",(t,e)=>!t.isBlocked(e.allTasks))}fieldName(){return"blocking"}};var ef=class extends tt{constructor(){super();this.filterInstructions=new xn;this.filterInstructions.add("has id",e=>e.id.length>0),this.filterInstructions.add("no id",e=>e.id.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:super.createFilterOrErrorMessage(e)}fieldName(){return"id"}value(e){return e.id}supportsSorting(){return!0}supportsGrouping(){return!0}};var tf=class extends Ze{constructor(){super();this.filterInstructions=new xn;this.filterInstructions.add("has depends on",e=>e.dependsOn.length>0),this.filterInstructions.add("no depends on",e=>e.dependsOn.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:De.fromError(e,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var nf=class extends cr{fieldName(){return"random"}supportsSorting(){return!0}comparator(){return(t,e)=>this.sortKey(t)-this.sortKey(e)}sortKey(t){let e=i=>{let s=0,a=9;for(;s<i.length;)a=Math.imul(a^i.charCodeAt(s++),387420489);return a^a>>>9},r=window.moment().format("Y-MM-DD");return e(r+" "+t.description)}};var qb=[()=>new zd,()=>new so,()=>new Ld,()=>new Fd,()=>new Qa,()=>new Nd,()=>new Xd,()=>new Dd,()=>new Id,()=>new Pd,()=>new Va,()=>new Od,()=>new Ka,()=>new Kd,()=>new Qd,()=>new Zd,()=>new za,()=>new Yd,()=>new Md,()=>new xd,()=>new Gd,()=>new io,()=>new Vd,()=>new Cd,()=>new ef,()=>new tf,()=>new Jd,()=>new nf,()=>new Bd];function nu(n){for(let t of qb){let e=t();if(e.canCreateFilterForLine(n))return e.createFilterOrErrorMessage(n)}return null}function S1(n){let t=/^sort by /i;if(n.match(t)===null)return null;for(let e of qb){let i=e().createSorterFromLine(n);if(i)return i}return null}function rf(n){let t=/^group by /i;if(n.match(t)===null)return null;for(let e of qb){let i=e().createGrouperFromLine(n);if(i)return i}return null}var E1=["list","columns"],sf=class{constructor(){this.viewMode="list";this.grouper=null}};function D1(n,t){let{mode:e,remainder:r}=xj(t);return e==="list"?Rj(n,t,r):e==="columns"?Cj(n,r):x1(t)}function xj(n){let t=n.trim(),e=t.indexOf(" ");return e===-1?{mode:t.toLowerCase(),remainder:""}:{mode:t.slice(0,e).toLowerCase(),remainder:t.slice(e+1).trim()}}function Rj(n,t,e){return e!==""?x1(t):(n.viewMode="list",n.grouper=null,{success:!0})}function Cj(n,t){if(t==="")return Mj();let e="group "+t,r=rf(e);return r===null?{success:!1,error:`do not understand columns grouping "${t}"
|
||||
|
||||
Columns view grouping uses the same fields as "group by".
|
||||
|
||||
${O1()}`}:(n.viewMode="columns",n.grouper=r,{success:!0})}function Mj(){return{success:!1,error:`columns view requires a grouping expression
|
||||
|
||||
${O1()}`}}function O1(){return`For example:
|
||||
view columns by priority
|
||||
view columns by root
|
||||
view columns by status.type reverse`}function x1(n){return{success:!1,error:`do not understand view mode "${n}"
|
||||
|
||||
The available view modes are:
|
||||
${E1.map(t=>` ${t}`).join(`
|
||||
`)}
|
||||
|
||||
For example:
|
||||
view ${E1[0]}`}}Ps();var Aj=Object.prototype.toString,oo=Array.isArray||function(t){return Aj.call(t)==="[object Array]"};function Ub(n){return typeof n=="function"}function Pj(n){return oo(n)?"array":typeof n}function Yb(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function R1(n,t){return n!=null&&typeof n=="object"&&t in n}function Ij(n,t){return n!=null&&typeof n!="object"&&n.hasOwnProperty&&n.hasOwnProperty(t)}var Nj=RegExp.prototype.test;function Fj(n,t){return Nj.call(n,t)}var Lj=/\S/;function qj(n){return!Fj(Lj,n)}var Yj={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function Uj(n){return String(n).replace(/[&<>"'`=\/]/g,function(e){return Yj[e]})}var $j=/\s*/,jj=/\s+/,C1=/\s*=/,Wj=/\s*\}/,Hj=/#|\^|\/|>|\{|&|=|!/;function Bj(n,t){if(!n)return[];var e=!1,r=[],i=[],s=[],a=!1,o=!1,l="",u=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,p;function h(J){if(typeof J=="string"&&(J=J.split(jj,2)),!oo(J)||J.length!==2)throw new Error("Invalid tags: "+J);d=new RegExp(Yb(J[0])+"\\s*"),f=new RegExp("\\s*"+Yb(J[1])),p=new RegExp("\\s*"+Yb("}"+J[1]))}h(t||pr.tags);for(var b=new iu(n),v,D,C,O,U,ee;!b.eos();){if(v=b.pos,C=b.scanUntil(d),C)for(var V=0,j=C.length;V<j;++V)O=C.charAt(V),qj(O)?(s.push(i.length),l+=O):(o=!0,e=!0,l+=" "),i.push(["text",O,v,v+1]),v+=1,O===`
|
||||
`&&(c(),l="",u=0,e=!1);if(!b.scan(d))break;if(a=!0,D=b.scan(Hj)||"name",b.scan($j),D==="="?(C=b.scanUntil(C1),b.scan(C1),b.scanUntil(f)):D==="{"?(C=b.scanUntil(p),b.scan(Wj),b.scanUntil(f),D="&"):C=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(D==">"?U=[D,C,v,b.pos,l,u,e]:U=[D,C,v,b.pos],u++,i.push(U),D==="#"||D==="^")r.push(U);else if(D==="/"){if(ee=r.pop(),!ee)throw new Error('Unopened section "'+C+'" at '+v);if(ee[1]!==C)throw new Error('Unclosed section "'+ee[1]+'" at '+v)}else D==="name"||D==="{"||D==="&"?o=!0:D==="="&&h(C)}if(c(),ee=r.pop(),ee)throw new Error('Unclosed section "'+ee[1]+'" at '+b.pos);return zj(Gj(i))}function Gj(n){for(var t=[],e,r,i=0,s=n.length;i<s;++i)e=n[i],e&&(e[0]==="text"&&r&&r[0]==="text"?(r[1]+=e[1],r[3]=e[3]):(t.push(e),r=e));return t}function zj(n){for(var t=[],e=t,r=[],i,s,a=0,o=n.length;a<o;++a)switch(i=n[a],i[0]){case"#":case"^":e.push(i),r.push(i),e=i[4]=[];break;case"/":s=r.pop(),s[5]=i[2],e=r.length>0?r[r.length-1][4]:t;break;default:e.push(i)}return t}function iu(n){this.string=n,this.tail=n,this.pos=0}iu.prototype.eos=function(){return this.tail===""};iu.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var r=e[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};iu.prototype.scanUntil=function(t){var e=this.tail.search(t),r;switch(e){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=r.length,r};function ao(n,t){this.view=n,this.cache={".":this.view},this.parent=t}ao.prototype.push=function(t){return new ao(t,this)};ao.prototype.lookup=function(t){var e=this.cache,r;if(e.hasOwnProperty(t))r=e[t];else{for(var i=this,s,a,o,l=!1;i;){if(t.indexOf(".")>0)for(s=i.view,a=t.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(l=R1(s,a[o])||Ij(s,a[o])),s=s[a[o++]];else s=i.view[t],l=R1(i.view,t);if(l){r=s;break}i=i.parent}e[t]=r}return Ub(r)&&(r=r.call(this.view)),r};function bn(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}bn.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};bn.prototype.parse=function(t,e){var r=this.templateCache,i=t+":"+(e||pr.tags).join(":"),s=typeof r!="undefined",a=s?r.get(i):void 0;return a==null&&(a=Bj(t,e),s&&r.set(i,a)),a};bn.prototype.render=function(t,e,r,i){var s=this.getConfigTags(i),a=this.parse(t,s),o=e instanceof ao?e:new ao(e,void 0);return this.renderTokens(a,o,r,t,i)};bn.prototype.renderTokens=function(t,e,r,i,s){for(var a="",o,l,u,c=0,d=t.length;c<d;++c)u=void 0,o=t[c],l=o[0],l==="#"?u=this.renderSection(o,e,r,i,s):l==="^"?u=this.renderInverted(o,e,r,i,s):l===">"?u=this.renderPartial(o,e,r,s):l==="&"?u=this.unescapedValue(o,e):l==="name"?u=this.escapedValue(o,e,s):l==="text"&&(u=this.rawValue(o)),u!==void 0&&(a+=u);return a};bn.prototype.renderSection=function(t,e,r,i,s){var a=this,o="",l=e.lookup(t[1]);function u(f){return a.render(f,e,r,s)}if(l){if(oo(l))for(var c=0,d=l.length;c<d;++c)o+=this.renderTokens(t[4],e.push(l[c]),r,i,s);else if(typeof l=="object"||typeof l=="string"||typeof l=="number")o+=this.renderTokens(t[4],e.push(l),r,i,s);else if(Ub(l)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");l=l.call(e.view,i.slice(t[3],t[5]),u),l!=null&&(o+=l)}else o+=this.renderTokens(t[4],e,r,i,s);return o}};bn.prototype.renderInverted=function(t,e,r,i,s){var a=e.lookup(t[1]);if(!a||oo(a)&&a.length===0)return this.renderTokens(t[4],e,r,i,s)};bn.prototype.indentPartial=function(t,e,r){for(var i=e.replace(/[^ \t]/g,""),s=t.split(`
|
||||
`),a=0;a<s.length;a++)s[a].length&&(a>0||!r)&&(s[a]=i+s[a]);return s.join(`
|
||||
`)};bn.prototype.renderPartial=function(t,e,r,i){if(r){var s=this.getConfigTags(i),a=Ub(r)?r(t[1]):r[t[1]];if(a!=null){var o=t[6],l=t[5],u=t[4],c=a;l==0&&u&&(c=this.indentPartial(a,u,o));var d=this.parse(c,s);return this.renderTokens(d,e,r,c,i)}}};bn.prototype.unescapedValue=function(t,e){var r=e.lookup(t[1]);if(r!=null)return r};bn.prototype.escapedValue=function(t,e,r){var i=this.getConfigEscape(r)||pr.escape,s=e.lookup(t[1]);if(s!=null)return typeof s=="number"&&i===pr.escape?String(s):i(s)};bn.prototype.rawValue=function(t){return t[1]};bn.prototype.getConfigTags=function(t){return oo(t)?t:t&&typeof t=="object"?t.tags:void 0};bn.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!oo(t))return t.escape};var pr={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(n){ru.templateCache=n},get templateCache(){return ru.templateCache}},ru=new bn;pr.clearCache=function(){return ru.clearCache()};pr.parse=function(t,e){return ru.parse(t,e)};pr.render=function(t,e,r,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Pj(t)+'" was given as the first argument for mustache#render(template, view, partials)');return ru.render(t,e,r,i)};pr.escape=Uj;pr.Scanner=iu;pr.Context=ao;pr.Writer=bn;var $b=pr;var U1=os(I1());function L1(n,t){let e=n.trim(),r=t.query.file;switch(e){case"query.file.path":return Cr(r.path);case"query.file.pathWithoutExtension":return Cr(r.pathWithoutExtension);case"query.file.root":return Cr(r.root);case"query.file.folder":return Cr(r.folder);case"query.file.filename":return Cr(r.filename);case"query.file.filenameWithoutExtension":return Cr(r.filenameWithoutExtension);case"query.file.outlinksInProperties":return Cr(r.outlinksInProperties);case"query.file.outlinksInBody":return Cr(r.outlinksInBody);case"query.file.outlinks":return Cr(r.outlinks)}let i=F1(e,N1("query.file.property"));if(i!==null)return Cr(r.property(i));let s=F1(e,N1("query.file.hasProperty"));return s!==null?Cr(r.hasProperty(s)):Vj()}function Cr(n){return{resolved:!0,value:n}}function Vj(){return{resolved:!1}}function N1(n){let t=n.replace(/\./g,String.raw`\.`);return new RegExp(String.raw`^${t}\((['"])([^'"]*)\1\)$`)}function F1(n,t){var r;let e=new RegExp(t).exec(n);return(r=e==null?void 0:e[2])!=null?r:null}function Wb(n,t){$b.escape=function(e){return e};try{let e=Qj(n,t);return $b.render(e,(0,U1.default)(t))}catch(e){let r="";throw e instanceof Error?r=`There was an error expanding one or more placeholders.
|
||||
|
||||
The error message was:
|
||||
${e.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:r="Unknown error expanding placeholders.",r+=`
|
||||
|
||||
The problem is in:
|
||||
${n}`,new Error(r)}}var Kj=new RegExp(["\\{\\{","(.*?)","\\}\\}"].join(""),"g");function Qj(n,t){return n.replace(Kj,(e,r)=>{if(Zj(t)){let a=L1(r,t);if(a.resolved){let o=a.value;if(o===null&&Y1(r),o!==void 0)return q1(o)}}if(!on.getInstance().get()){if(Xj(r))return e;throw new Or}let i=Jj(t),s=Zl(i,r);if(s.isValid()){let a=Xl(s.queryComponent,i);if(a===null&&Y1(r),a!==void 0)return q1(a)}return e})}function q1(n){return typeof n=="object"?JSON.stringify(n):String(n)}function Zj(n){var t;return((t=n==null?void 0:n.query)==null?void 0:t.file)!==void 0}function Y1(n){throw new Error(`Invalid placeholder result 'null'.
|
||||
Check for missing file property in this expression:
|
||||
{{${n}}}`)}function Xj(n){return/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/.test(n.trim())}function Jj(n){return Object.entries(n)}ft();function Hb(n){return Bb(n,[])}function Bb(n,t){return{query:{file:n,allTasks:t,searchCache:{}},preset:q({},X().presets)}}jy();ft();var lo=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainIgnoreGlobalQuery(t)),e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainLayout(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(r=>r!=="").join(`
|
||||
`)}explainError(t){let e="";return e+=`Query has an error:
|
||||
`,e+=t.error+`
|
||||
`,e}explainIgnoreGlobalQuery(t){return t.ignoreGlobalQuery?this.indent(`ignore global query
|
||||
`):""}explainFilters(t){return t.filters.length===0?this.indent(`No filters supplied. All tasks will match the query.
|
||||
`):t.filters.map(e=>e.explainFilterIndented(this.indentation)).join(`
|
||||
`)}explainGroups(t){return this.explainStatements(t.grouping.map(e=>e.statement))}explainSorters(t){return this.explainStatements(t.sorting.map(e=>e.statement))}explainLayout(t){return this.explainStatements(t.layoutStatements)}explainQueryLimits(t){function e(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let r=[];if(t.limit!==void 0){let i=e(t.limit)+`.
|
||||
`;r.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied).
|
||||
`;r.push(this.indent(i))}return r.join(`
|
||||
`)}explainDebugSettings(){let t="",{debugSettings:e}=X();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.
|
||||
`)),t}explainStatements(t){return t.length===0?"":t.map(e=>e.explainStatement(this.indentation)).join(`
|
||||
|
||||
`)+`
|
||||
`}indent(t){return this.indentation+t}};var af=class{constructor(t,e,r){this.nestingLevel=t,this.displayName=e,this.property=r}};var of=class{constructor(t,e){this.lastHeadingAtLevel=new Array;this.groupers=e;let i=t.keys().next().value.length;for(let s=0;s<i;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(t){let e=new Array;for(let r=0;r<t.length;r++){let i=t[r];if(i!=this.lastHeadingAtLevel[r]){e.push(new af(r,i,this.groupers[r].property));for(let s=r;s<t.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[r]=i}}return e}};var lf=class{constructor(t){this.children=new Map;this.values=[];this.values=t}generateAllPaths(t=[]){let e=new Map;if(this.children.size==0)return e.set([...t],this.values),e;for(let[r,i]of this.children)t.push(r),i.generateAllPaths(t).forEach((a,o)=>e.set(o,a)),t.pop();return e}};var uf=class extends lf{},cf=class{constructor(t,e,r){this.root=new uf(e),this.buildGroupingTree(t,r)}buildGroupingTree(t,e){let r=[this.root];for(let i of t){let s=[];for(let a of r)for(let o of a.values){let l=i.grouper(o,e);l.length===0&&l.push("");for(let u of l){let c=a.children.get(u);c===void 0&&(c=new uf([]),a.children.set(u,c),s.push(c)),c.values.push(o)}}r=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var df=class{constructor(t,e){this.groups=t,this.groupHeadings=[],this.tasks=e}setGroupHeadings(t){for(let e of t)this.groupHeadings.push(e)}applyTaskLimit(t){this.tasks=this.tasks.slice(0,t)}tasksAsStringOfLines(){let t="";for(let e of this.tasks)t+=e.toFileLineString()+`
|
||||
`;return t}toString(){let t=`
|
||||
`;t+=`Group names: [${this.groups}]
|
||||
`;for(let e of this.groupHeadings)t+=`${"#".repeat(4+e.nestingLevel)} [${e.property}] ${e.displayName}
|
||||
`;return t+=this.tasksAsStringOfLines(),t}};var Ua=class{constructor(t,e,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=e.length,this._groupers=t;let s=new nd(t,e,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let t="";t+=`Groupers (if any):
|
||||
`;for(let n of this._groupers){let i=n.reverse?" reverse":"";t+=`- ${n.property}${i}
|
||||
`}for(let n of this.groups)t+=n.toString(),t+=`
|
||||
---
|
||||
`;return t+=`
|
||||
${this.totalTasksCount()} tasks
|
||||
`,t}addTaskGroups(t){for(let[e,n]of t){let i=new id(e,n);this.addTaskGroup(i)}}addTaskGroup(t){this._groups.push(t)}sortTaskGroups(){let t=(e,n)=>{let i=e.groups,s=n.groups;for(let a=0;a<i.length;a++){let o=this._groupers[a],u=i[a].localeCompare(s[a],void 0,{numeric:!0});if(u!==0)return o.reverse?-u:u}return 0};this._groups.sort(t)}setGroupsHeadings(t){let e=new ed(t,this._groupers);for(let n of this._groups)n.setGroupHeadings(e.getHeadingsForTaskGroup(n.groups))}applyTaskLimit(t){this._groupers.length!==0&&(this._groups.forEach(e=>{e.applyTaskLimit(t)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let t=[];this._groups.forEach(n=>{t=[...t,...n.tasks]});let e=[...new Set(t)];this._totalTaskCount=e.length}};var Fi=class{constructor(t,e){this.tasksFile=t,this.allTasks=[...e]}static fromAllTasks(t){return new Fi(void 0,t)}get queryPath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}queryContext(){return this.tasksFile?bg(this.tasksFile,this.allTasks):void 0}};function iE(r){return`task${r!==1?"s":""}`}var Ms=class{constructor(t,e){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=t,this.totalTasksCountBeforeLimit=e}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(t){this._searchErrorMessage=t}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let t=this.totalTasksCount,e=this.totalTasksCountBeforeLimit;return t===e?`${t} ${iE(t)}`:`${t} of ${e} ${iE(e)}`}get groups(){return this.taskGroups.groups}static fromError(t){let e=new Ms(new Ua([],[],Fi.fromAllTasks([])),0);return e._searchErrorMessage=t,e}};function sE(r){return r.endsWith("\\")}function aE(r){return r.endsWith("\\\\")}function NL(r){return r.replace(/^[ \t]*/,"")}function IL(r){return r.replace(/[ \t]*\\$/,"")}function FL(r,t){let e=r;return t&&(e=NL(r)),aE(e)?e=e.slice(0,-1):sE(r)&&(e=IL(e)),e}function oE(r){let t=[],e=!1,n="",i="",s=r+`
|
||||
`;for(let e of this.groupHeadings){let r="#".repeat(Math.min(4+e.nestingLevel,6));t+=`${r} ${e.displayName}
|
||||
|
||||
`}return t+=this.tasksAsStringOfLines(),t}};var Qs=class{constructor(t,e,r){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=e.length,this._groupers=t;let s=new cf(t,e,r).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let t="";for(let e of this.groups)t+=e.toString();return t}addTaskGroups(t){for(let[e,r]of t){let i=new df(e,r);this.addTaskGroup(i)}}addTaskGroup(t){this._groups.push(t)}sortTaskGroups(){let t=(e,r)=>{let i=e.groups,s=r.groups;for(let a=0;a<i.length;a++){let o=this._groupers[a],l=i[a].localeCompare(s[a],void 0,{numeric:!0});if(l!==0)return o.reverse?-l:l}return 0};this._groups.sort(t)}setGroupsHeadings(t){let e=new of(t,this._groupers);for(let r of this._groups)r.setGroupHeadings(e.getHeadingsForTaskGroup(r.groups))}applyTaskLimit(t){this._groupers.length!==0&&(this._groups.forEach(e=>{e.applyTaskLimit(t)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let t=[];this._groups.forEach(r=>{t=[...t,...r.tasks]});let e=[...new Set(t)];this._totalTaskCount=e.length}};var Zs=class n{constructor(t,e){this.tasksFile=t,this.allTasks=[...e],this._queryContext=this.tasksFile?Bb(this.tasksFile,this.allTasks):void 0}static fromAllTasks(t){return new n(void 0,t)}get queryPath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}queryContext(){return this._queryContext}};function $1(n){return`task${n!==1?"s":""}`}var su=class n{constructor(t,e,r){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=t,this.totalTasksCountBeforeLimit=e,this._tasksFile=r}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(t){this._searchErrorMessage=t}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let t=this.totalTasksCount,e=this.totalTasksCountBeforeLimit;return t===e?`${t} ${$1(t)}`:`${t} of ${e} ${$1(e)}`}get groups(){return this.taskGroups.groups}static fromError(t){let e=new n(new Qs([],[],Zs.fromAllTasks([])),0,void 0);return e._searchErrorMessage=t,e}asMarkdown(){let t="";return t+=this.taskGroups.groups.map(e=>this.toString(e)).join(""),t}toString(t){let e=`
|
||||
`;for(let r of t.groupHeadings){let i="#".repeat(Math.min(4+r.nestingLevel,6));e+=`${i} ${r.displayName}
|
||||
|
||||
`}return e+=this.tasksAsStringOfLines(t.tasks),e}tasksAsStringOfLines(t){let e="";for(let r of t)e+=this.toFileLineString(r)+`
|
||||
`;return e}toFileLineString(t){return`- [${t.status.symbol}] ${t.toString()}`}applyFilter(t){if(this._searchErrorMessage)return n.fromError(this._searchErrorMessage);let e=this.taskGroups.groups.flatMap(a=>a.tasks),r=new Zs(this._tasksFile,e),i=a=>t.filterFunction(a,r),s=[...new Set(e.filter(i))];return new n(new Qs(this.taskGroups.groupers,s,r),this.totalTasksCountBeforeLimit,this._tasksFile)}};function j1(n){return n.endsWith("\\")}function W1(n){return n.endsWith("\\\\")}function eW(n){return n.replace(/^[ \t]*/,"")}function tW(n){return n.replace(/[ \t]*\\$/,"")}function nW(n,t){let e=n;return t&&(e=eW(n)),W1(e)?e=e.slice(0,-1):j1(n)&&(e=tW(e)),e}function ff(n){let t=[],e=!1,r="",i="",s=n+`
|
||||
`;for(let a of s.split(`
|
||||
`)){let o=FL(a,e);e?(n+=`
|
||||
`+a,i+=" "+o):(n=a,i=o),aE(a)?e=!1:e=sE(a),e||(i.trim()!==""&&t.push(new li(n,i)),n="",i="")}return t}var Wa=class{static by(t,e,n){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of t)s.push(a.comparator);return e.sort(Wa.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new Un().createNormalSorter(),new La().createNormalSorter(),new xa().createNormalSorter(),new Ds().createNormalSorter(),new Ma().createNormalSorter()]}static makeCompositeComparator(t,e){return(n,i)=>{for(let s of t){let a=s(n,i,e);if(a!==0)return a}return 0}}};var gn=class{constructor(t,e=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Mn;this._queryLayoutOptions=new Ci;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags|depends on|id|on completion|tree)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=Kt.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=t,this.tasksFile=e,this.debug(`Creating query: ${this.formatQueryForLogging()}`),oE(t).forEach(n=>{let i=this.expandPlaceholders(n,e);if(this.error===void 0)try{this.parseLine(i,n)}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,n);return}})}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}get queryId(){return this._queryId}parseLine(t,e){switch(!0){case this.shortModeRegexp.test(t):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(t):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(t):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(t):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit(t);break;case this.parseSortBy(t):break;case this.parseGroupBy(t):break;case this.hideOptionsRegexp.test(t):this.parseHideOptions(t);break;case this.commentRegexp.test(t):break;case this.parseFilter(t,e):break;default:this.setError("do not understand query",e)}}formatQueryForLogging(){return`[${this.source.split(`
|
||||
`).join(" ; ")}]`}expandPlaceholders(t,e){let n=t.anyContinuationLinesRemoved;if(n.includes("{{")&&n.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}"
|
||||
`)){let o=nW(a,e);e?(r+=`
|
||||
`+a,i+=" "+o):(r=a,i=o),W1(a)?e=!1:e=j1(a),e||(i.trim()!==""&&t.push(new yn(r,i)),r="",i="")}return t}function H1(n){return ff(n).map(t=>t.anyContinuationLinesRemoved)}var pf=class n{static by(t,e,r){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of t)s.push(a.comparator);return e.sort(n.makeCompositeComparator([...s,...i],r))}static defaultSorters(){return[new so().createNormalSorter(),new io().createNormalSorter(),new Va().createNormalSorter(),new Qa().createNormalSorter(),new Ka().createNormalSorter()]}static makeCompositeComparator(t,e){return(r,i)=>{for(let s of t){let a=s(r,i,e);if(a!==0)return a}return 0}}};var B1=0,Mr=class n{constructor(t,e=void 0){this.statements=[];this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Br;this._queryLayoutOptions=new Qi;this._viewLayoutOptions=new sf;this.layoutStatements=[];this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.viewModeRegexp=/^view +(.*)/i;this.hideOptionsRegexp=/^(hide|show) +(.*)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=gn.getLogger("tasks.Query");this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this.presetRegexp=/^preset +(.*)/i;this._queryId=this.generateQueryId(10),this.source=t,this.tasksFile=e;let r=ff(t);for(let i of r){let s=this.expandPlaceholders(i,e);if(this.error!==void 0)return;this.statements.push(...s)}for(let i of this.statements)try{if(this.parseLine(i),this.error!==void 0)return}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,i);return}}removeIllegalGlobalQueryInstructions(){this._ignoreGlobalQuery=!1}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}get queryId(){return this._queryId}parseLine(t){let e=t.anyPlaceholdersExpanded;switch(!0){case this.presetRegexp.test(e):this.parsePreset(e,t);break;case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0,this.saveLayoutStatement(t);break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1,this.saveLayoutStatement(t);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,t):break;case this.parseGroupBy(e,t):break;case this.viewModeRegexp.test(e):this.parseViewMode(t);break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(t);break;case this.commentRegexp.test(e):break;case this.parseFilter(e,t):break;default:this.setError("do not understand query",t)}}formatQueryForLogging(){return`
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
${this.source}
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
`}expandPlaceholders(t,e){let r=t.anyContinuationLinesRemoved;if(r.includes("{{")&&r.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}"
|
||||
but no file path has been supplied, so cannot expand placeholder values.
|
||||
The query is:
|
||||
${n}`,n;let i=n;if(e){let s=qk(e);try{i=Wk(n,s)}catch(a){return a instanceof Error?this._error=a.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",n}}return t.recordExpandedPlaceholders(i),i}append(t){return this.source===""?t:t.source===""?this:new gn(`${this.source}
|
||||
${t.source}`,this.tasksFile)}explainQuery(){return new Da().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(t){this._filters.push(t)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(t,e){this._error=gn.generateErrorMessage(e,t)}static generateErrorMessage(t,e){return t.allLinesIdentical()?`${e}
|
||||
${r}`,[t];if(this.commentRegexp.test(r))return[t];let s=r;if(e){let a=Hb(e),o="";try{let u=0;for(;s!==o&&u<10;)o=s,s=Wb(o,a),u++;s!==r&&(s=ff(s).map(c=>c.anyContinuationLinesRemoved).join(`
|
||||
`))}catch(l){return l instanceof Error?this._error=l.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",[t]}}return this.createStatementsFromExpandedPlaceholders(s,t)}createStatementsFromExpandedPlaceholders(t,e){let r=t.split(`
|
||||
`).map(i=>i.trim()).filter(i=>i.length>0);return r.length===1?(e.recordExpandedPlaceholders(r[0]),[e]):r.map((i,s)=>{let a=`: statement ${s+1} after expansion of placeholder`,o=new yn(e.rawInstruction+a,e.anyContinuationLinesRemoved+a);return o.recordExpandedPlaceholders(i),o})}append(t){return this.source===""?t:t.source===""?this:new n(`${this.source}
|
||||
${t.source}`,this.tasksFile)}explainQuery(){return new lo().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get viewLayoutOptions(){return this._viewLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(t){this._filters.push(t)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(t,e){this._error=n.generateErrorMessage(e,t)}static generateErrorMessage(t,e){return t.allLinesIdentical()?`${e}
|
||||
Problem line: "${t.rawInstruction}"`:`${e}
|
||||
Problem statement:
|
||||
${t.explainStatement(" ")}
|
||||
`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let e=new Fi(this.tasksFile,t),n;try{this.filters.forEach(u=>{n=u.statement,t=t.filter(l=>u.filterFunction(l,e))}),n=void 0;let{debugSettings:i}=ie(),s=i.ignoreSortInstructions?t:Wa.by(this.sorting,t,e),a=s.slice(0,this.limit),o=new Ua(this.grouping,a,e);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new Ms(o,s.length)}catch(i){let a=ks("Search failed",i);return n&&(a=gn.generateErrorMessage(n,a)),Ms.fromError(a)}}parseHideOptions(t){let e=t.match(this.hideOptionsRegexp);if(e!==null){let n=e[1].toLowerCase()==="hide";switch(e[2].toLowerCase()){case"tree":this._queryLayoutOptions.hideTree=n;break;case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;case"id":this._taskLayoutOptions.setVisibility("id",!n);break;case"depends on":this._taskLayoutOptions.setVisibility("dependsOn",!n);break;case"on completion":this._taskLayoutOptions.setVisibility("onCompletion",!n);break;default:this.setError("do not understand hide/show option",new li(t,t))}}}parseFilter(t,e){var i;let n=Fu(t);return n!=null?(n.filter?(n.filter.setStatement(e),this._filters.push(n.filter)):this.setError((i=n.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new li(t,t));return}let n=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(t){let e=rE(t);return e?(this._sorting.push(e),!0):!1}parseGroupBy(t){let e=nE(t);return e?(this._grouping.push(e),!0):!1}generateQueryId(t){let e="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:t},()=>e[Math.floor(Math.random()*e.length)]).join("")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var Li=class{constructor(t=Li.empty){this._source=t}static getInstance(){return Li.instance||(Li.instance=new Li),Li.instance}set(t){this._source=t}query(t=void 0){return new gn(this._source,t)}hasInstructions(){return this._source.trim()!==Li.empty}},Dr=Li;Dr.empty="";var sd=class{constructor({obsidianEvents:t}){this.logger=Kt.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var AE=require("obsidian");var RE=require("obsidian");var Ig=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function uE(r){let t=[],e=new Xe().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let i of r.registeredStatuses)e.includes(i.symbol)===n&&t.push(new Ig(i));return t}var lE=require("obsidian");var Fg="---",qa=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return Fg}isCheckedForTask(t){return!1}};function Wn(r,t){return F(this,null,function*(){yield Br({originalTask:r,newTasks:t})})}var Ui=class extends lE.Menu{constructor(e){super();this.taskSaver=e}addItemsForInstructions(e,n){for(let i of e)this.addItemForInstruction(n,i)}addItemForInstruction(e,n){n.instructionDisplayName()===Fg?this.addSeparator():this.addItem(i=>th
Line truncated
|
||||
`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`[search] Executing query: ${this.formatQueryForLogging()}`);let e=new Zs(this.tasksFile,t),r;try{this.filters.forEach(c=>{r=c.statement,t=t.filter(d=>c.filterFunction(d,e))}),r=void 0;let{debugSettings:i}=X(),s=i.ignoreSortInstructions?t:pf.by(this.sorting,t,e),a=s.slice(0,this.limit),l=this.viewLayoutOptions.viewMode==="columns"&&this.viewLayoutOptions.grouper!==null?[this.viewLayoutOptions.grouper,...this.grouping]:this.grouping,u=new Qs(l,a,e);return this._taskGroupLimit!==void 0&&u.applyTaskLimit(this._taskGroupLimit),new su(u,s.length,this.tasksFile)}catch(i){let a=Bs("Search failed",i);return r&&(a=n.generateErrorMessage(r,a)),su.fromError(a)}}parseViewMode(t){let r=t.anyPlaceholdersExpanded.match(this.viewModeRegexp);if(r===null)return;let i=D1(this._viewLayoutOptions,r[1].trim());if(i.success){this.saveLayoutStatement(t);return}this.setError(i.error,t)}parseHideOptions(t){let e=t.anyPlaceholdersExpanded,r=e.match(this.hideOptionsRegexp);if(r===null)return;let i=r[1].toLowerCase()==="hide",s=r[2].toLowerCase();if(o1(this._queryLayoutOptions,s,i)){this.saveLayoutStatement(t);return}if(xE(this._taskLayoutOptions,s,!i)){this.saveLayoutStatement(t);return}this.setError("do not understand hide/show option",new yn(e,e))}saveLayoutStatement(t){this.layoutStatements.push(t)}parseFilter(t,e){var i;let r=nu(t);return r!=null?(r.filter?(r.filter.setStatement(e),this._filters.push(r.filter)):this.setError((i=r.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new yn(t,t));return}let r=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=r:this._limit=r}parseSortBy(t,e){let r=null;try{r=S1(t)}catch(i){let s=i instanceof Error?i.message:"Unknown error";return this.setError(s,e),!0}return r?(r.setStatement(e),this._sorting.push(r),!0):!1}parseGroupBy(t,e){let r;try{r=rf(t)}catch(i){let s=i instanceof Error?i.message:"Unknown error";return this.setError(s,e),!0}return r?(r.setStatement(e),this._grouping.push(r),!0):!1}parsePreset(t,e){let r=this.presetRegexp.exec(t);if(r){let i=r[1].trim(),{presets:s}=X(),a=s[i];if(!a){this.setError(pD(i,s),e);return}let o=H1(a);for(let l of o){let u=new yn(e.rawInstruction,e.anyContinuationLinesRemoved);if(u.recordExpandedPlaceholders(l),l.includes("{{")&&l.includes("}}")&&this.tasksFile){let c=Hb(this.tasksFile),d=Wb(l,c);u.recordExpandedPlaceholders(d)}this.parseLine(u)}}}generateQueryId(t){return B1+=1,B1.toString().padStart(t,"0")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}warn(t,e){this.logger.warnWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var Gb=[{name:"TQ_show_toolbar",type:"checkbox",display:"toolbar",handler:"showAndHide"},{name:"TQ_explain",type:"checkbox",handler:"instruction",trueValue:"explain",falseValue:""},{name:"TQ_short_mode",type:"checkbox",handler:"instruction",trueValue:"short mode",falseValue:"full mode"},{name:"TQ_show_tree",type:"checkbox",display:"tree",handler:"showAndHide"},{name:"TQ_show_tags",type:"checkbox",display:"tags",handler:"showAndHide"},{name:"TQ_show_id",type:"checkbox",display:"id",handler:"showAndHide"},{name:"TQ_show_depends_on",type:"checkbox",display:"depends on",handler:"showAndHide"},{name:"TQ_show_priority",type:"checkbox",display:"priority",handler:"showAndHide"},{name:"TQ_show_recurrence_rule",type:"checkbox",display:"recurrence rule",handler:"showAndHide"},{name:"TQ_show_on_completion",type:"checkbox",display:"on completion",handler:"showAndHide"},{name:"TQ_show_created_date",type:"checkbox",display:"created date",handler:"showAndHide"},{name:"TQ_show_start_date",type:"checkbox",display:"start date",handler:"showAndHide"},{name:"TQ_show_scheduled_date",type:"checkbox",display:"scheduled date",handler:"showAndHide"},{name:"TQ_show_due_date",type:"checkbox",display:"due date",handler:"showAndHide"},{name:"TQ_show_cancelled_date",type:"checkbox",display:"cancelled date",handler:"showAndHide"},{name:"TQ_show_done_date",type:"checkbox",display:"done date",handler:"showAndHide"},{name:"TQ_show_urgency",type:"checkbox",display:"urgency",handler:"showAndHide"},{name:"TQ_show_backlink",type:"checkbox",display:"backlink",handler:"showAndHide"},{name:"TQ_show_edit_button",type:"checkbox",display:"edit button",handler:"showAndHide"},{name:"TQ_show_postpone_button",type:"checkbox",display:"postpone button",handler:"showAndHide"},{name:"TQ_show_task_count",type:"checkbox",display:"task count",handler:"showAndHide"},{name:"TQ_extra_instructions",type:"text",handler:"addValue"}],Mi=class{source(t){return t?Gb.map(r=>this.generateInstruction(t,r)).filter(r=>r!=="").join(`
|
||||
`):""}generateInstruction(t,e){let r=t.hasProperty(e.name),i=t.property(e.name);switch(e.handler){case"instruction":return r&&(i?e.trueValue:e.falseValue)||"";case"showAndHide":return r&&(i?"show "+e.display:"hide "+e.display)||"";case"addValue":return r&&typeof i=="string"?i:""}}query(t){return new Mr(this.source(t),t)}allPropertyNames(){return Gb.map(t=>t.name)}allPropertyNamesSorted(){return this.allPropertyNames().sort((t,e)=>t.localeCompare(e))}propertyType(t){var e,r;return(r=(e=Gb.find(i=>i.name===t))==null?void 0:e.type)!=null?r:void 0}metaBindPluginWidgets(){return"\ntoolbar: `INPUT[toggle:TQ_show_toolbar]`\nshort mode: `INPUT[toggle:TQ_short_mode]`\ntree: `INPUT[toggle:TQ_show_tree]`\ntags: `INPUT[toggle:TQ_show_tags]`\nid: `INPUT[toggle:TQ_show_id]` depends on: `INPUT[toggle:TQ_show_depends_on]`\npriority: `INPUT[toggle:TQ_show_priority]`\nrecurrence rule: `INPUT[toggle:TQ_show_recurrence_rule]` on completion: `INPUT[toggle:TQ_show_on_completion]`\nstart date: `INPUT[toggle:TQ_show_start_date]` scheduled date: `INPUT[toggle:TQ_show_scheduled_date]` due date: `INPUT[toggle:TQ_show_due_date]`\ncreated date: `INPUT[toggle:TQ_show_created_date]` cancelled date: `INPUT[toggle:TQ_show_cancelled_date]` done date: `INPUT[toggle:TQ_show_done_date]`\nurgency: `INPUT[toggle:TQ_show_urgency]`\nbacklink: `INPUT[toggle:TQ_show_backlink]`\nedit button: `INPUT[toggle:TQ_show_edit_button]` postpone button: `INPUT[toggle:TQ_show_postpone_button]`\ntask count: `INPUT[toggle:TQ_show_task_count]`\nextra instructions: `INPUT[textArea:TQ_extra_instructions]`\nexplain: `INPUT[toggle:TQ_explain]`\n"}};function G1(n,t){return A(this,null,function*(){yield n.fileManager.processFrontMatter(t,e=>{let r=new Mi().allPropertyNamesSorted(),i=!1;r.forEach(s=>{s in e||(e[s]=null,i=!0)}),i?new zb.Notice("Properties updated successfully."):new zb.Notice("All supported properties are already present.")})})}var z1=require("obsidian");Pt();Sr();Aa();var Vb=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function mf(n){let t=[],e=new _t().coreStatuses.map(r=>r.symbol);for(let r of[!0,!1])for(let i of n.registeredStatuses)e.includes(i.symbol)===r&&t.push(new Vb(i));return t}var rW=(n,t,e)=>{let r=ke.fromLine({line:n,taskLocation:Jt.fromUnknownPosition(new mt(t)),fallbackDate:null});if(r!==null){let i=r.handleNewStatusWithRecurrenceInUsersOrder(e).map(a=>a.toFileLineString()),s=i.length>0?i.length-1:0;return{text:i.join(`
|
||||
`),moveTo:{line:s}}}},iW=n=>(t,e)=>{let r=rW(t,e,n);return r===void 0&&new z1.Notice("Cannot set status: line is not a task or does not match global filter"),r};function V1(n){let t=mf(n),e=[];for(let r of t){let i=r.newStatus,a={id:`set-status-symbol-to-${i.symbol===" "?"space":i.symbol}`,name:r.instructionDisplayName(),editorCheckCallback:wd(iW(i))};e.push(a)}return e}var Kb="Toggle task done",hf=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(r,i,s)=>i1(r,i,s,this.app,this.plugin.getTasks(),()=>A(this,null,function*(){return yield this.plugin.saveSettings()}))}),t.addCommand({id:"toggle-done",name:Kb,icon:"check-in-circle",editorCheckCallback:a1}),t.addCommand({id:"add-query-file-defaults-properties",name:"Add all Query File Defaults properties",icon:"settings",checkCallback:r=>{let i=this.app.workspace.getActiveFile();return!i||i.extension!=="md"?!1:(r||this.ensureQueryFileDefaultsFrontmatter(i).catch(console.error),!0)}});let e=V1(Je.getInstance());for(let r of e)t.addCommand(r)}ensureQueryFileDefaultsFrontmatter(t){return A(this,null,function*(){let{app:e}=this;yield G1(e,t)})}};var ei=class ei{constructor(t=ei.empty){this._source=t}static getInstance(){return ei.instance||(ei.instance=new ei),ei.instance}set(t){this._source=t}reset(){this._source=ei.empty}query(t=void 0){let e=new Mr(this._source,t);return e.removeIllegalGlobalQueryInstructions(),e}hasInstructions(){return this._source.trim()!==ei.empty}};ei.empty="";var mr=ei;Ps();var gf=class{constructor({obsidianEvents:t}){this.logger=gn.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}onReloadOpenSearchResults(t){return this.logger.debug("TasksEvents.onReloadOpenSearchResults()"),this.obsidianEvents.on("obsidian-tasks-plugin:reload-open-search-results",t)}triggerReloadOpenSearchResults(){this.logger.debug("TasksEvents.triggerReloadOpenSearchResults()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:reload-open-search-results")}onReloadVault(t){return this.logger.debug("TasksEvents.onReloadVault()"),this.obsidianEvents.on("obsidian-tasks-plugin:reload-vault",t)}triggerReloadVault(){this.logger.debug("TasksEvents.triggerReloadVault()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:reload-vault")}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var Tx=require("obsidian");hn();Es();Pt();var yx=require("obsidian");hn();ft();Pt();Bi();ed();function K1(n){for(let e of ke.allDateFields()){let r=n[e];if(r&&!r.isValid())return!1}let t=n.happensDates.some(e=>!!(e!=null&&e.isValid()));return!n.isDone&&t}function uo(n){return n.dueDate?"dueDate":n.scheduledDate?"scheduledDate":n.startDate?"startDate":null}function Qb(n,t,e,r){let i=n[t];return X1(i,n,t,e,r)}function Q1(n,t,e,r){let i=window.moment();return X1(i,n,t,e,r)}function Z1(n,t,e,r){return J1(n,t,null)}function X1(n,t,e,r,i){let s=new $t(n).postpone(r,i);return J1(t,e,s)}function J1(n,t,e){let r=jt.removeInferredStatusIfNeeded(n,[new ke(pe(q({},n),{[t]:e}))])[0];return{postponedDate:e,postponedTask:r}}function ex(n,t){if(n){let e=n==null?void 0:n.format("DD MMM YYYY");return`Task's ${t} changed to ${e}`}else return`Task's ${t} removed`}function tx(n,t,e){return`\u2139\uFE0F ${Zb(n,t,e)} (right-click for more options)`}function Zb(n,t,e){let r=uo(n),i=n[r];return co(r,i,t,e)}function nx(n,t,e){let r=uo(n),i=window.moment().startOf("day");return co(r,i,t,e)}function rx(n,t,e){let r=uo(n);return Xb(r,n)}function Xb(n,t){return n==="scheduledDate"&&t.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${yf(n)}`}function sW(n){return Ua(n.replace("Date",""))}function yf(n){return n.replace("Date"," date")}function co(n,t,e,r){let s=new $t(t).postpone(r,e).format("ddd Do MMM"),a=e!=1?Math.abs(e):"a";if(t.isSameOrBefore(window.moment(),"day")){let l=sW(n);return(e>=0?`${l} in ${a} ${r}, on ${s}`:`${l} ${a} ${r} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=yf(n);return e>=0?`Postpone ${o} by ${a} ${r}, to ${s}`:`Backdate ${o} by ${a} ${r}, to ${s}`}Es();Er();Pt();si();function ix(n){return["startDate","scheduledDate","dueDate"].includes(n)}Pt();ed();var fo=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){r
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
`+g.join("</span><span class='flatpickr-weekday'>")+`
|
||||
`+y.join("</span><span class='flatpickr-weekday'>")+`
|
||||
</span>
|
||||
`}}function w(){e.calendarContainer.classList.add("hasWeeks");var h=We("div","flatpickr-weekwrapper");h.appendChild(We("span","flatpickr-weekday",e.l10n.weekAbbreviation));var g=We("div","flatpickr-weeks");return h.appendChild(g),{weekWrapper:h,weekNumbers:g}}function D(h,g){g===void 0&&(g=!0);var k=g?h:h-e.currentMonth;k<0&&e._hidePrevMonthArrow===!0||k>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=k,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,ze("onYearChange"),C()),B(),ze("onMonthChange"),Fs())}function R(h,g){if(h===void 0&&(h=!0),g===void 0&&(g=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,g===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var k=pd(e.config),A=k.hours,q=k.minutes,z=k.seconds;m(A,q,z)}e.redraw(),h&&ze("onChange")}function N(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),ze("onClose")}function L(){e.config!==void 0&&ze("onDestroy");for(var h=e._handlers.length;h--;)e._handlers[h].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var g=e.calendarContainer.parentNode;if(g.lastChild&&g.removeChild(g.lastChild),g.parentNode){for(;g.firstChild;)g.parentNode.insertBefore(g.firstChild,g);g.parentNode.removeChild(g)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(k){try{delete e[k]}catch(A){}})}function E(h){return e.calendarContainer.contains(h)}function P(h){if(e.isOpen&&!e.config.inline){var g=lr(h),k=E(g),A=g===e.input||g===e.altInput||e.element.contains(g)||h.path&&h.path.indexOf&&(~h.path.indexOf(e.input)||~h.path.indexOf(e.altInput)),q=!A&&!k&&!E(h.relatedTarget),z=!e.config.ignoredFocusElements.some(function(he){return he.contains(g)});q&&z&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&u(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function U(h){if(!(!h||e.config.minDate&&h<e.config.minDate.getFullYear()||e.config.maxDate&&h>e.config.maxDate.getFullYear())){var g=h,k=e.currentYear!==g;e.currentYear=g||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),k&&(e.redraw(),ze("onYearChange"),C())}}function ue(h,g){var k;g===void 0&&(g=!0);var A=e.parseDate(h,void 0,g);if(e.config.minDate&&A&&cr(A,e.config.minDate,g!==void 0?g:!e.minDateHasTime)<0||e.config.maxDate&&A&&cr(A,e.config.maxDate,g!==void 0?g:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(A===void 0)return!1;for(var q=!!e.config.enable,z=(k=e.config.enable)!==null&&k!==void 0?k:e.config.disable,he=0,J=void 0;he<z.length;he++){if(J=z[he],typeof J=="function"&&J(A))return q;if(J instanceof Date&&A!==void 0&&J.getTime()===A.getTime())return q;if(typeof J=="string"){var we=e.parseDate(J,void 0,!0);return we&&we.getTime()===A.getTime()?q:!q}else if(typeof J=="object"&&A!==void 0&&J.from&&J.to&&A.getTime()>=J.from.getTime()&&A.getTime()<=J.to.getTime())return q}return!q}function me(h){return e.daysContainer!==void 0?h.className.indexOf("hidden")===-1&&h.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(h):!1}function ve(h){var g=h.target===e._input,k=e._input.value.trimEnd()!==Ls();g&&k&&!(h.relatedTarget&&E(h.relatedTarget))&&e.setDate(e._input.value,!0,h.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function je(h){var g=lr(h),k=e.config.wrap?r.contains(g):g===e._input,A=e.co
Line truncated
|
||||
`);if(m===void 0)return!1;let b=null;for(let _=0;_<m.length;_=_+1)if(m[_]!==""){b=m[_];break}return b===null?!1:Ae.getInstance().includedIn(b)});if(i.length===0)return;let s=e.sourcePath,a=e.getSectionInfo(t);if(a===null)return;let o=a.text.split(`
|
||||
`),u=0,l=[];for(let f=a.lineStart;f<=a.lineEnd;f++){let m=o[f];if(m===void 0)continue;let b=null,T=de.fromLine({line:m,taskLocation:new Rt(new Et(s),f,a.lineStart,u,b),fallbackDate:null});T!==null&&(l.push(T),u++)}let c=new fi({obsidianComponent:n,parentUlElement:t,taskLayoutOptions:new Mn,queryLayoutOptions:new Ci});for(let f=0;f<i.length;f++){let m=l[f],b=i[f];if(m===void 0||b===void 0)continue;let T=(d=b.getAttr("data-line"))!=null?d:"0",_=Number.parseInt(T,10),x=yield c.renderTaskLine(m,_),O=b.childNodes;for(let G=0;G<O.length;G=G+1){let oe=O[G],V=oe.nodeName.toLowerCase();V==="div"?x.prepend(oe):(V==="ul"||V==="ol")&&x.append(oe)}let M=b.querySelectorAll("[data-footnote-id]"),Y=x.querySelectorAll("[data-footnote-id]");if(M.length===Y.length)for(let G=0;G<M.length;G++)Y[G].replaceWith(M[G]);b.replaceWith(x)}})}};var PE=require("@codemirror/view"),NE=require("obsidian");var IE=()=>PE.ViewPlugin.fromClass(Hg),Hg=class{constructor(t){this.view=t,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(t){let{target:e}=t;if(!e||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return!1;let n=e.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview.
|
||||
If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new NE.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(e),a=i.doc.lineAt(s),o=de.fromLine({line:a.text,taskLocation:Rt.fromUnknownPosition(new Et("")),fallbackDate:null});if(o===null)return!1;t.preventDefault();let u=o.toggleWithRecurrenceInUsersOrder(),l=u.map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});if(this.view.dispatch(c),u.length===1){let f=u[0].status.symbol!==" ";setTimeout(()=>{e.checked=f},1)}return!0}};var wd=require("obsidian"),UE=require("obsidian");function FE(r,t,e,n=void 0){let i="";t.isEmpty()||(i+=`Only tasks containing the global filter '${t.get()}'.
|
||||
`}}function k(){e.calendarContainer.classList.add("hasWeeks");var g=Be("div","flatpickr-weekwrapper");g.appendChild(Be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var y=Be("div","flatpickr-weeks");return g.appendChild(y),{weekWrapper:g,weekNumbers:y}}function _(g,y){y===void 0&&(y=!0);var E=y?g:g-e.currentMonth;E<0&&e._hidePrevMonthArrow===!0||E>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=E,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,lt("onYearChange"),P()),B(),lt("onMonthChange"),gu())}function M(g,y){if(g===void 0&&(g=!0),y===void 0&&(y=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,y===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var E=Ef(e.config),N=E.hours,z=E.minutes,ne=E.seconds;p(N,z,ne)}e.redraw(),g&<("onChange")}function I(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),lt("onClose")}function Y(){e.config!==void 0&<("onDestroy");for(var g=e._handlers.length;g--;)e._handlers[g].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var y=e.calendarContainer.parentNode;if(y.lastChild&&y.removeChild(y.lastChild),y.parentNode){for(;y.firstChild;)y.parentNode.insertBefore(y.firstChild,y);y.parentNode.removeChild(y)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(E){try{delete e[E]}catch(N){}})}function L(g){return e.calendarContainer.contains(g)}function S(g){if(e.isOpen&&!e.config.inline){var y=Cn(g),E=L(y),N=y===e.input||y===e.altInput||e.element.contains(y)||g.path&&g.path.indexOf&&(~g.path.indexOf(e.input)||~g.path.indexOf(e.altInput)),z=!N&&!E&&!L(g.relatedTarget),ne=!e.config.ignoredFocusElements.some(function(Ee){return Ee.contains(y)});z&&ne&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function W(g){if(!(!g||e.config.minDate&&g<e.config.minDate.getFullYear()||e.config.maxDate&&g>e.config.maxDate.getFullYear())){var y=g,E=e.currentYear!==y;e.currentYear=y||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),E&&(e.redraw(),lt("onYearChange"),P())}}function de(g,y){var E;y===void 0&&(y=!0);var N=e.parseDate(g,void 0,y);if(e.config.minDate&&N&&Mn(N,e.config.minDate,y!==void 0?y:!e.minDateHasTime)<0||e.config.maxDate&&N&&Mn(N,e.config.maxDate,y!==void 0?y:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(N===void 0)return!1;for(var z=!!e.config.enable,ne=(E=e.config.enable)!==null&&E!==void 0?E:e.config.disable,Ee=0,ue=void 0;Ee<ne.length;Ee++){if(ue=ne[Ee],typeof ue=="function"&&ue(N))return z;if(ue instanceof Date&&N!==void 0&&ue.getTime()===N.getTime())return z;if(typeof ue=="string"){var Ce=e.parseDate(ue,void 0,!0);return Ce&&Ce.getTime()===N.getTime()?z:!z}else if(typeof ue=="object"&&N!==void 0&&ue.from&&ue.to&&N.getTime()>=ue.from.getTime()&&N.getTime()<=ue.to.getTime())return z}return!z}function ye(g){return e.daysContainer!==void 0?g.className.indexOf("hidden")===-1&&g.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(g):!1}function fe(g){var y=g.target===e._input,E=e._input.value.trimEnd()!==Qf();y&&E&&!(g.relatedTarget&&L(g.relatedTarget))&&e.setDate(e._input.value,!0,g.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Te(g){var y=Cn(g),E=e.config.wrap?n.contains(y)
Line truncated
|
||||
`);if(b===void 0)return!1;let v=null;for(let C=0;C<b.length;C=C+1)if(b[C]!==""){v=b[C];break}return v===null?!1:Ae.getInstance().includedIn(v)});if(i.length===0)return;let s=e.sourcePath,a=this.app.vault.getFileByPath(s)||void 0,o=new mt(s,{},a),l=e.getSectionInfo(t);if(l===null)return;let u=l.text.split(`
|
||||
`),c=0,d=[];for(let h=l.lineStart;h<=l.lineEnd;h++){let b=u[h];if(b===void 0)continue;let v=null,D=ke.fromLine({line:b,taskLocation:new Jt(o,h,l.lineStart,c,v),fallbackDate:null});D!==null&&(d.push(D),c++)}let f=new is({obsidianApp:this.app,obsidianComponent:r,taskLayoutOptions:new Br,queryLayoutOptions:new Qi});for(let h=0;h<i.length;h++){let b=d[h],v=i[h];if(b===void 0||v===void 0)continue;let D=(p=v.getAttr("data-line"))!=null?p:"0",C=Number.parseInt(D,10),O=Ge("li",t);yield f.renderTaskLine({li:O,task:b,taskIndex:C,isTaskInQueryFile:!0});let U=v.childNodes;for(let j=0;j<U.length;j=j+1){let J=U[j],_e=J.nodeName.toLowerCase();_e==="div"?O.prepend(J):(_e==="ul"||_e==="ol")&&O.append(J)}let ee=v.querySelectorAll("[data-footnote-id]"),V=O.querySelectorAll("[data-footnote-id]");if(ee.length===V.length)for(let j=0;j<ee.length;j++)V[j].replaceWith(ee[j]);bx(v,O)}})}};var wx=require("@codemirror/view");Pt();var vx=require("obsidian");Fr();ft();function kx(n,t,e){if(X().dismissedNotices[n])return;let r=createFragment(),i=createDiv();i.textContent=t;let s=createEl("label");s.addClass("tasks-dismissible-notice-checkbox-label");let a=createEl("input");a.type="checkbox",a.addEventListener("change",()=>{X().dismissedNotices[n]=a.checked,e.saveSettings()}),s.appendChild(a),s.appendText(" "+x.t("notices.do-not-show-message-again")),r.appendChild(i),r.appendChild(s),console.warn(t),new vx.Notice(r,45e3)}Fr();var _x=n=>wx.ViewPlugin.fromClass(class extends rT{constructor(t){super(t,n)}}),rT=class{constructor(t,e){this.handleClickEvent=t=>{let{target:e}=t;if(!e||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return!1;let r=e.closest("ul.plugin-tasks-query-result, div.callout-content");if(r){if(r.matches("div.callout-content")){let p="live-preview-callout-warning",h=x.t("notices.live-preview-callout-warning.line1")+`
|
||||
|
||||
`);let s=new Da(" "),a=new gn(r,n);if(!a.ignoreGlobalQuery&&e.hasInstructions()){let o=e.query(n);i+=`Explanation of the global query:
|
||||
`+x.t("notices.live-preview-callout-warning.line2")+`
|
||||
|
||||
${s.explainQuery(o)}
|
||||
`}return i+=`Explanation of this Tasks code block query:
|
||||
`+x.t("notices.live-preview-callout-warning.line3")+`
|
||||
|
||||
${s.explainQuery(a)}`,i}function ju(r,t,e){let n=new gn(r,e);return n.ignoreGlobalQuery?n:t.query(e).append(n)}function Yu(r,t,e){t&&r.push(jL(e))}function jL(r){return`tasks-layout-hide-${r}`}var bd=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Ci}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of e)Yu(t,n,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};var Td=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Mn}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{Yu(t,!this.taskLayoutOptions.isShown(e),e)}),Yu(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};var $u=class{constructor(t){this.label=t,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let t=performance.getEntriesByName(this.label),e=t[t.length-1];e?console.log(this.label+":",e.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:t}=ie();return t.recordTimings}};var Bg=require("obsidian");var ji=class extends Ui{constructor(t,e,n=Wn){super(n);let i=(l,c,d,f,m,b)=>{var O;let T=!1,_=$a(e);if(_){let{postponedDate:M}=b(e,_,d,f);(O=e[_])!=null&&O.isSame(M,"day")&&(T=!0)}let x=m(e,f,d);c.setChecked(T).setTitle(x).onClick(()=>ji.postponeOnClickCallback(l,e,f,d,b,n))},s=kE,a=yE;this.addItem(l=>i(t,l,"days",0,s,a)),this.addItem(l=>i(t,l,"day",1,s,a)),this.addSeparator();let o=Yg,u=jg;this.addItem(l=>i(t,l,"days",2,o,u)),this.addItem(l=>i(t,l,"days",3,o,u)),this.addItem(l=>i(t,l,"days",4,o,u)),this.addItem(l=>i(t,l,"days",5,o,u)),this.addItem(l=>i(t,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>i(t,l,"week",1,o,u)),this.addItem(l=>i(t,l,"weeks",2,o,u)),this.addItem(l=>i(t,l,"weeks",3,o,u)),this.addItem(l=>i(t,l,"month",1,o,u)),this.addSeparator(),this.addItem(l=>i(t,l,"days",2,EE,bE))}static postponeOnClickCallback(o,u,l,c){return F(this,arguments,function*(t,e,n,i,s=jg,a=Wn){var b;let d=$a(e);if(d===null){let T="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new Bg.Notice(T,1e4)}let{postponedDate:f,postponedTask:m}=s(e,d,i,n);(b=e[d])!=null&&b.isSame(f,"day")||(yield a(e,m),ji.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,n){t.style.pointerEvents="none";let i=vE(n,e);new Bg.Notice(i,2e3)}};function LE(r){let t=r.parent;for(;t!==null&&!(t instanceof de);)t=t.parent;return t}var _d=class{constructor(t,e,n,i,s,a=fi.obsidianMarkdownRenderer){switch(this.source=e,this.tasksFile=n,this.renderMarkdown=i,this.obsidianComponent=s,this.textRenderer=a,t){case"block-language-tasks":this.query=ju(this.source,Dr.getInstance(),this.tasksFile),this.queryType="tasks";break;default:this.query=ju(this.source,Dr.getInstance(),this.tasksFile),this.queryType="tasks";break}}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}render(t,e,n,i){return F(this,null,function*(){t==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(e,t,n,i):this.query.error!==void 0?this.renderErrorMessage(n,this.query.error):this.renderLoadingMessage(n)})}renderQuerySearchResults(t,e,n,i){return F(this,null,function*(){let s=this.explainAndPerformSearch(e,t,n);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(n,s.searchErrorMessage);return}yield this.renderSearchResults(s,n,i)})}explainAndPerformSearch(t,e,n){let i=new $u(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${t}; searching ${e.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(n);let s=this.query.applyQueryToTasks(e);return i.finish(),s}renderSearchResults(t,e,n){return F(this,null,function*(){let i=new $u(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(t.taskGroups,e,n);let s=t.totalTasksCount;this.addTaskCount(e,t),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(t,e){t.createDiv().innerHTML=`<pre>Tasks query: ${e.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let e=FE(this.source,Ae.getInstance(),Dr.getInstance(),this.tasksFile),n=ct("pre",t);n.classList.add("plugin-tasks-query-explanation"),n.setText(e),t.appendChild(n)}addAllTaskGroups(t,e,n){return F(this,null,function*(){for(let i of t.groups){yield this.addGroupHeadings(e,i.groupHeadings);let s=new Set;yield this.crLine truncated
|
||||
`+x.t("notices.live-preview-callout-warning.line4")+`
|
||||
`+x.t("notices.live-preview-callout-warning.line5")+`
|
||||
`+x.t("notices.live-preview-callout-warning.line6",{commandName:Kb});kx(p,h,this.plugin)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(e),a=i.doc.lineAt(s),o=ke.fromLine({line:a.text,taskLocation:Jt.fromUnknownPosition(new mt("")),fallbackDate:null});if(o===null)return!1;t.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder(),u=l.map(p=>p.toFileLineString()).join(i.lineBreak),c=a.to;if(u===""){let p=a.number<i.doc.lines?i.doc.line(a.number+1):null;p&&(c=p.from)}let d=i.update({changes:{from:a.from,to:c,insert:u}});if(this.view.dispatch(d),l.length===1){let p=l[0].status.symbol!==" ";setTimeout(()=>{e.checked=p},1)}return!0};this.view=t,this.plugin=e,this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}};var ss=require("obsidian"),Dx=require("obsidian");function Sx(n,t,e,r=void 0){let i="";t.isEmpty()||(i+=`Only tasks containing the global filter '${t.get()}'.
|
||||
|
||||
`);let s=new lo(" ");function a(c,d){return`${c}:
|
||||
|
||||
${s.explainQuery(d)}`}let o=new Mr(n,r),l=new Mi().query(r);if(!(o.ignoreGlobalQuery||l.ignoreGlobalQuery)&&e.hasInstructions()){let c=e.query(r);i+=a("Explanation of the global query",c)+`
|
||||
`}return l.source!==""&&(i+=a("Explanation of the Query File Defaults (from properties/frontmatter in the query's file)",l)+`
|
||||
`),i+=a("Explanation of this Tasks code block query",o),i}function Rf(n,t,e){let i=new Mi().query(e).append(new Mr(n,e));return i.ignoreGlobalQuery?i:t.query(e).append(i)}Bi();var ni=require("obsidian");ft();function du(n,t,e){t&&n.push(cW(e))}function cW(n){return`tasks-layout-hide-${n}`}var Cf=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Qi}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[r,i]of e)du(t,r,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};Es();var Mf=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Br}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{du(t,!this.taskLayoutOptions.isShown(e),e)}),du(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};var iT=require("obsidian");var fu=class n extends ts{constructor(t,e,r=ti){super(r);let i=(u,c,d,f,p,h)=>{var C;let b=!1,v=uo(e);if(v){let{postponedDate:O}=h(e,v,d,f);(C=e[v])!=null&&C.isSame(O,"day")&&(b=!0)}let D=p(e,f,d);c.setChecked(b).setTitle(D).onClick(()=>n.postponeOnClickCallback(u,e,f,d,h,r))},s=nx,a=Q1;this.addItem(u=>i(t,u,"days",0,s,a)),this.addItem(u=>i(t,u,"day",1,s,a)),this.addSeparator();let o=Zb,l=Qb;o(e,1,"day")!==s(e,1,"day")&&this.addItem(u=>i(t,u,"day",1,o,l)),this.addItem(u=>i(t,u,"days",2,o,l)),this.addItem(u=>i(t,u,"days",3,o,l)),this.addItem(u=>i(t,u,"days",4,o,l)),this.addItem(u=>i(t,u,"days",5,o,l)),this.addItem(u=>i(t,u,"days",6,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"week",1,o,l)),this.addItem(u=>i(t,u,"weeks",2,o,l)),this.addItem(u=>i(t,u,"weeks",3,o,l)),this.addItem(u=>i(t,u,"month",1,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"days",2,rx,Z1))}static postponeOnClickCallback(o,l,u,c){return A(this,arguments,function*(t,e,r,i,s=Qb,a=ti){var h;let d=uo(e);if(d===null){let b="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new iT.Notice(b,1e4)}let{postponedDate:f,postponedTask:p}=s(e,d,i,r);(h=e[d])!=null&&h.isSame(f,"day")||(yield a(e,p),n.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,r){t.classList.add("tasks-no-pointer-events");let i=ex(r,e);new iT.Notice(i,2e3)}};hn();Pt();var bo=class{constructor(t,e,r){this.addedListItems=new Set;this.nestingLevel=0;this.source=t,this.tasksFile=e,this.query=r}get filePath(){return this.tasksFile.path}renderQuery(t,e){return A(this,null,function*(){this.beginRender();let i=this.query.error;t==="Warm"&&i===void 0?yield this.renderQuerySearchResults(e):i?this.renderErrorMessage(i):this.renderLoadingMessage()})}renderQuerySearchResults(t){return A(this,null,function*(){if(this.explainQuery(),t.searchErrorMessage!==void 0){this.renderErrorMessage(t.searchErrorMessage);return}yield this.renderSearchResults(t)})}explainQuery(){if(this.query.queryLayoutOptions.explainQuery){let t=Sx(this.source,Ae.getInstance(),mr.getInstance(),this.tasksFile);this.renderExplanation(t)}}renderSearchResults(t){return A(this,null,function*(){this.renderSearchResultsHeader(t),yield this.addAllTaskGroups(t.taskGroups);let e=t.totalTasksCount;this.query.debug(`[render] ${e} tasks displayed`),this.renderSearchResultsFooter(t)})}addAllTaskGroups(t){return A(this,null,function*(){for(let e of t.groups)yield this.addGroupHeadings(e.groupHeadings),this.addedListItems.clear(),this.nestingLevel=0,yield this.addTaskList(e.tasks)})}addTaskList(t){return A(this,null,function*(){this.beginTaskList();try{this.query.queryLayoutOptions.hideTree?yield this.addFlatTaskList(t):yield this.addTreeTaskList(t)}finally{this.endTaskList()}})}addFlatTaskList(t){return A(this,null,function*(){for(let[e,r]of t.entries())r instanceof ke&&(this.beginListItem(),yield this.addTask(r,e))})}addTreeTaskList(t){return A(this,null,function*(){for(let[e,r]of t.entries())this.alreadyAdded(r)||this.willBeAddedLater(r,t)||(this.beginListItem(),r instanceof ke?yield this.addTask(r,e):yield this.addListItem(r,e),yield this.addChildren(r.children),this.addedListItems.add(r))})}willBeAddedLater(t,e){let r=t.findClosestParentTask();return r?!!(!this.addedListItems.has(r)&&e.includes(r)):!1}alreadyAdded(t){return this.addedListItems.has(t)}addChildren(t){return A(this,null,function*(){if(t.length>0){this.nestingLevel+=1;try{yield this.addTaskList(t)}finally{this.nestingLevel-=1}}})}addGroupHeadings(t){return A(this,null,function*(){for(let e of t)yield this.addGroupHeading(e)})}};var To=class extends bo{constructor(e,r,i,s,a,o,l,u){super(o,l,u);this.content=document.createElement("div");this.ulElementStack=[];this.lastLIElement=document.createElement("li");this.renderMarkdown=e,this.obsidianComponent=r,this.obsidianApp=i,this.htmlQueryRendererParameters=a,this.taskLineRenderer=new is({textRenderer:s,obsidianApp:i,obsidianComponent:r,taskLayoutOptio
Line truncated
|
||||
`)}beginRender(){this.markdownLines.length=0,this.taskIndentationLevel=0}renderSearchResultsHeader(e){}renderSearchResultsFooter(e){}renderLoadingMessage(){}renderExplanation(e){e&&this.markdownLines.push(e)}renderErrorMessage(e){this.markdownLines.push(e)}beginTaskList(){this.taskIndentationLevel+=1}endTaskList(){this.taskIndentationLevel-=1,this.taskIndentationLevel===0&&this.addEmptyLine()}addEmptyLine(){this.markdownLines.push("")}beginListItem(){}addTask(e,r){return this.markdownLines.push(this.formatTask(e)),Promise.resolve()}formatTask(e){return`${this.listItemIndentation()}- [${e.status.symbol}] ${e.toString()}`}addListItem(e,r){return this.markdownLines.push(this.formatListItem(e)),Promise.resolve()}formatListItem(e){let r=e.statusCharacter?`[${e.statusCharacter}] `:"";return`${this.listItemIndentation()}- ${r}${e.description}`}listItemIndentation(){let e=Math.max(0,this.taskIndentationLevel-1);return" ".repeat(e)}addGroupHeading(e){let r="#".repeat(Math.min(4+e.nestingLevel,6));return this.markdownLines.push(`${r} ${e.displayName}`),this.addEmptyLine(),Promise.resolve()}};var If=class{constructor(t,e,r,i,s,a,o,l){this._filterString="";this.source=e,this._tasksFile=r,this.queryResult=new Mr("").applyQueryToTasks([]),this.filteredQueryResult=this.queryResult,t==="block-language-tasks"?(this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks"):(this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks"),this.renderMarkdown=i,this.obsidianComponent=s,this.obsidianApp=a,this.textRenderer=o,this.htmlQueryRendererParameters=l}get filterString(){return this._filterString}makeQueryFromSourceAndTasksFile(){return Rf(this.source,mr.getInstance(),this.tasksFile)}get tasksFile(){return this._tasksFile}setTasksFile(t){this._tasksFile=t,this.rereadQueryFromFile()}rereadQueryFromFile(){this.query=this.makeQueryFromSourceAndTasksFile()}get filePath(){return this.tasksFile.path}render(t,e,r){return A(this,null,function*(){this.performSearch(e),this.addToolbar(r),yield this.renderQueryResult(t,this.filteredQueryResult,r)})}performSearch(t){let e=new Is(`Search: ${this.query.queryId} - ${this.filePath}`);e.start(),this.queryResult=this.query.applyQueryToTasks(t),this.filterResults(),e.finish()}renderQueryResult(t,e,r){return A(this,null,function*(){let i=new Is(`Render: ${this.query.queryId} - ${this.filePath}`);i.start();let s=this.query.viewLayoutOptions.viewMode==="columns"?new Af(this.renderMarkdown,this.obsidianComponent,this.obsidianApp,this.textRenderer,this.htmlQueryRendererParameters,this.source,this.tasksFile,this.query):new To(this.renderMarkdown,this.obsidianComponent,this.obsidianApp,this.textRenderer,this.htmlQueryRendererParameters,this.source,this.tasksFile,this.query);s.content=r,yield s.renderQuery(t,e),i.finish()})}addToolbar(t){if(this.query.queryLayoutOptions.hideToolbar)return;let e=Ge("div",t);e.classList.add("plugin-tasks-toolbar"),this.addSearchBox(e,t),this.addCopyButton(e)}addSearchBox(t,e){let r=Ge("label",t);(0,ni.setIcon)(r,"lucide-filter");let i=Ge("input",r);i.value=this._filterString,i.placeholder="Filter by description...",(0,ni.setTooltip)(i,"Filter results");let s=()=>A(this,null,function*(){let a=i.value;yield this.applySearchBoxFilterAndRerender(a,e)});i.addEventListener("input",(0,ni.debounce)(s,500,!0))}applySearchBoxFilterAndRerender(t,e){return A(this,null,function*(){for(this._filterString=t,this.filterResults();e.firstElementChild!==e.lastElementChild;){let r=e.lastChild;if(r===null)break;r.remove()}yield this.renderQueryResult("Warm",this.filteredQueryResult,e)})}filterResults(){let{filter:t,error:e}=new za().createFilterOrErrorMessage("description includes "+this._filterString);if(e){this.filteredQueryResult=this.queryResult;return}this.filteredQueryResult=this.queryResult.applyFilter(t)}addCopyButton(t){let e=Ge("button",t);(0,ni.setIcon)(e,"lucide-copy"),(0,ni.setTooltip)(e,"Copy results"),e.addEventListener("click",()=>A(this,null,function*(){let r=yield this.resultsAsMarkdown();yield navigator.clipboard.writeText(r),new ni.Notice("Results copied to clipboard")}))}resultsAsMarkdown(){return A(this,null,function*(){let t=new Pf(this.source,this.tasksFile,this.query);return yield t.renderQuery("Warm",this.filteredQueryResult),t.markdown})}};var Nf=class n{constructor({plugin:t,events:e}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=t.app,this.plugin=t,this.events=e,t.registerMarkdownCodeBlockProcessor("tasks",(r,i,s)=>{t.app.workspace.onLayoutReady(()=>A(this,null,function*(){yield this.addQueryRenderChild(r,i,s)}))})}_addQueryRenderChild(t,e,r){return A(this,null,function*(){let i=this.app,s=r.sourcePath,a=n.getTasksFile(i,s),o=new sT({app:i,plugin:this.plugin,events:this.events,container:e,source:t,tasksFile:a});r.addChild(o),o.load()})}static getTasksFile(t,e){let r=t.vault.getFileByPath(e),i=null;return r&&(i=t.metadataCache.getFileCache(r)),new mt(e,i!=null?i:{})}},sT=class extends ss.MarkdownRenderChild{co
Line truncated
|
||||
`,this._markdown+=`${e}
|
||||
`}addRow(t){let e=this.makeRowText(t);this._markdown+=`${e}
|
||||
`}addRowIfNew(t){let e=this.makeRowText(t);this._markdown.includes(e)||(this._markdown+=`${e}
|
||||
`)}makeRowText(t){let e="|";return t.forEach(n=>{e+=` ${n} |`}),e}};function WE(r,t){return r.findIndex(e=>e.symbol===t)}function pi(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function HL(r,t){let e=pe.getTypeForUnknownSymbol(r.symbol);r.type!==e&&(e==="TODO"&&r.symbol!==" "||t.push(`For information, the conventional type for status symbol ${pi(r.symbol)} is ${pi(e)}: you may wish to review this type.`))}function BL(r,t,e){let n=WE(r,t.nextStatusSymbol);if(n===-1){e.push(`Next symbol ${pi(t.nextStatusSymbol)} is unknown: create a status with symbol ${pi(t.nextStatusSymbol)}.`);return}if(t.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${pi(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("<br>");e.push(a)}}else e.push("Unexpected failure to find the next status.")}function VL(r,t,e){let n=[];return t.symbol===pe.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):WE(r,t.symbol)!=e?(n.push(`Duplicate symbol '${pi(t.symbol)}': this status will be ignored.`),n):(HL(t,n),BL(r,t,n),n)}function qE(r){let t=new kd(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),e=Xe.allStatuses(r);return e.forEach((n,i)=>{t.addRow([pi(n.symbol),pi(n.nextStatusSymbol),n.name,pi(n.type),VL(e,n,i).join("<br>")])}),t.markdown}function jE(r,t,e,n){let s=qE(r),a=t.mermaidDiagram(!0);return`# ${e}
|
||||
`)}makeRowText(t){let e="|";return t.forEach(r=>{e+=` ${r} |`}),e}};Fr();hn();qn();Sr();Er();function Ox(n,t){return n.findIndex(e=>e.symbol===t)}function Pi(n){return n===""?n:"`"+(n!==" "?n:"space")+"`"}function mW(n,t){let e=xe.getTypeForUnknownSymbol(n.symbol);if(n.type===e||e==="TODO"&&n.symbol!==" ")return;let r=Pi(n.symbol),i=Pi(e);t.push(x.t("reports.statusRegistry.messages.notConventionalType",{symbol:r,type:i}))}function hW(n,t,e){let r=t.nextStatusSymbol,i=Ox(n,r);if(i===-1){let a=Pi(r);e.push(x.t("reports.statusRegistry.messages.nextSymbolUnknown",{symbol:a}));return}if(t.type!=="DONE")return;let s=n[i];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let a="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",o=Pi(s.type),l=[x.t("reports.statusRegistry.messages.wrongTypeAfterDone.line1",{nextType:o}),x.t("reports.statusRegistry.messages.wrongTypeAfterDone.line2"),x.t("reports.statusRegistry.messages.wrongTypeAfterDone.line3",{helpURL:a})].join("<br>");e.push(l)}}else e.push(x.t("reports.statusRegistry.messages.cannotFindNextStatus"))}function gW(n,t,e){let r=[];if(t.symbol===xe.EMPTY.symbol)return r.push(x.t("reports.statusRegistry.messages.emptySymbol")),r;if(Ox(n,t.symbol)!=e){let s=Pi(t.symbol);return r.push(x.t("reports.statusRegistry.messages.duplicateSymbol",{symbol:s})),r}return mW(t,r),hW(n,t,r),r}function xx(n){let t=new Ff([x.t("reports.statusRegistry.columnHeadings.statusSymbol"),x.t("reports.statusRegistry.columnHeadings.nextStatusSymbol"),x.t("reports.statusRegistry.columnHeadings.statusName"),x.t("reports.statusRegistry.columnHeadings.statusType"),x.t("reports.statusRegistry.columnHeadings.problems")]),e=_t.allStatuses(n);return e.forEach((r,i)=>{t.addRow([Pi(r.symbol),Pi(r.nextStatusSymbol),r.name,Pi(r.type),gW(e,r,i).join("<br>")])}),t.markdown}function Rx(n){let t=new Je;return _t.applyToStatusRegistry(n,t),t.registeredStatuses.map((r,i)=>{let s=Ae.getInstance(),a=s.isEmpty()?"":s.get()+" ",o=`Sample task ${i+1}`,l=`status symbol=${Pi(r.symbol)}`,u=`status name='${r.name}'`;return`- [${r.symbol}] ${a}${o}: ${l} ${u}`})}function Cx(n,t,e,r){let s=xx(n),a=t.mermaidDiagram(!0),o=Rx(n);return`# ${e}
|
||||
|
||||
## About this file
|
||||
## ${x.t("reports.statusRegistry.about.title")}
|
||||
|
||||
This file was created by the Obsidian Tasks plugin (version ${n}) to help visualise the task statuses in this vault.
|
||||
${x.t("reports.statusRegistry.about.createdBy",{version:r})}
|
||||
|
||||
If you change the Tasks status settings, you can get an updated report by:
|
||||
${x.t("reports.statusRegistry.about.updateReport.line1")}
|
||||
|
||||
- Going to \`Settings\` -> \`Tasks\`.
|
||||
- Clicking on \`Review and check your Statuses\`.
|
||||
- ${x.t("reports.statusRegistry.about.updateReport.line2")}
|
||||
- ${x.t("reports.statusRegistry.about.updateReport.line3")}
|
||||
|
||||
You can delete this file any time.
|
||||
${x.t("reports.statusRegistry.about.deleteFileAnyTime")}
|
||||
|
||||
## Status Settings
|
||||
## ${x.t("reports.statusRegistry.statusSettings.title")}
|
||||
|
||||
<!--
|
||||
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.
|
||||
${x.t("reports.statusRegistry.statusSettings.comment.line1")}
|
||||
${x.t("reports.statusRegistry.statusSettings.comment.line2")}
|
||||
${x.t("reports.statusRegistry.statusSettings.comment.line3")}
|
||||
-->
|
||||
|
||||
These are the status values in the Core and Custom statuses sections.
|
||||
${x.t("reports.statusRegistry.statusSettings.theseAreStatusValues")}
|
||||
|
||||
${s}
|
||||
## Loaded Settings
|
||||
## ${x.t("reports.statusRegistry.loadedSettings.title")}
|
||||
|
||||
<!-- Switch to Live Preview or Reading Mode to see the diagram. -->
|
||||
<!-- ${x.t("reports.statusRegistry.loadedSettings.switchToLivePreview")} -->
|
||||
|
||||
These are the settings actually used by Tasks.
|
||||
${a}`}function YE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function $E(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function GE(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function HE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function BE(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function VE(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function zE(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function KE(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","
Line truncated
|
||||
${x.t("reports.statusRegistry.loadedSettings.settingsActuallyUsed")}
|
||||
${a}
|
||||
|
||||
## ${x.t("reports.statusRegistry.sampleTasks.title")}
|
||||
|
||||
${x.t("reports.statusRegistry.sampleTasks.line1")}
|
||||
|
||||
${x.t("reports.statusRegistry.sampleTasks.line2")}
|
||||
|
||||
${x.t("reports.statusRegistry.sampleTasks.line3")}
|
||||
|
||||
> [!Tip] ${x.t("reports.statusRegistry.sampleTasks.tip.line1")}
|
||||
> ${x.t("reports.statusRegistry.sampleTasks.tip.line2",{url:"https://publish.obsidian.md/tasks/How+To/Style+custom+statuses"})}
|
||||
|
||||
${o.join(`
|
||||
`)}
|
||||
|
||||
## ${x.t("reports.statusRegistry.searchSampleTasks.title")}
|
||||
|
||||
${x.t("reports.statusRegistry.searchSampleTasks.line1")}
|
||||
|
||||
\`\`\`tasks
|
||||
path includes {{query.file.path}}
|
||||
group by status.type
|
||||
group by status.name
|
||||
sort by function task.lineNumber
|
||||
hide postpone button
|
||||
short mode
|
||||
\`\`\`
|
||||
`}Fr();function Mx(){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 Ax(){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 Px(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Ix(){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 Nx(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["<","Migrated","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 Fx(){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 Lx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function qx(){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",
Line truncated
|
||||
`)+`
|
||||
|
||||
Fix errors before saving.`;new Tn.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,n){n.length===0?Sr.removeValidationError(e):Sr.setValidationError(e)}};var Jt=class extends ke.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e}saveSettings(e){return F(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new ke.Setting(e).setName("Task Format").setDesc(Jt.createFragmentWithHTML('<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(l=>{for(let c of Object.keys(cn))l.addOption(c,cn[c].displayName);l.setValue(ie().taskFormat).onChange(c=>F(this,null,function*(){ut({taskFormat:c}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Global task filter").setHeading();let n=null;new ke.Setting(e).setName("Global filter").setDesc(Jt.createFragmentWithHTML('<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(l=>{l.setPlaceholder("e.g. #task or TODO").setValue(Ae.getInstance().get()).onChange(c=>F(this,null,function*(){ut({globalFilter:c}),Ae.getInstance().set(c),yield this.plugin.saveSettings(),qn(n,c.length>0)}))}),n=new ke.Setting(e).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(l=>{let c=ie();l.setValue(c.removeGlobalFilter).onChange(d=>F(this,null,function*(){ut({removeGlobalFilter:d}),Ae.getInstance().setRemoveGlobalFilter(d),yield this.plugin.saveSettings()}))}),qn(n,ie().globalFilter.length>0),new ke.Setting(e).setName("Global Query").setHeading(),XL(new ke.Setting(e).setDesc(Jt.createFragmentWithHTML('<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(l=>{let c=ie();l.inputEl.rows=4,l.setPlaceholder(`# For example...
|
||||
path does not include _templates/
|
||||
limit 300
|
||||
show urgency`).setValue(c.globalQuery).onChange(d=>F(this,null,function*(){ut({globalQuery:d}),Dr.getInstance().set(d),yield this.plugin.saveSettings()}))})),new ke.Setting(e).setName("Task Statuses").setHeading();let{headingOpened:i}=ie();QE.forEach(l=>{var f;let c=(f=i[l.text])!=null?f:!0,d=this.addOneSettingsBlock(e,l,i);d.open=c}),new ke.Setting(e).setName("Dates").setHeading(),new ke.Setting(e).setName("Set created date on every added task").setDesc(Jt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date">documentation</a>.</p>`)).addToggle(l=>{let c=ie();l.setValue(c.setCreatedDate).onChange(d=>F(this,null,function*(){ut({setCreatedDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Set done date on every completed task").setDesc(Jt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date">documentation</a>.</p>')).addToggle(l=>{let c=ie();l.setValue(c.setDoneDate).onChange(d=>F(this,null,function*(){ut({setDoneDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Set cancelled date on every cancelled task").setDesc(Jt.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Cancelled+date">documentation</a>.</p>')).addToggle(l=>{let c=ie();l.setValue(c.setCancelledDate).onChange(d=>F(this,null,function*(){ut({setCancelledDate:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Dates from file names").setHeading();let s=null,a=null;new ke.Setting(e).setName("Use filename as Scheduled date for undated tasks").setDesc(Jt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>By default, Tasks plugin will match both <code>YYYY-MM-DD</code> and <code>YYYYMMDD</code> date 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(l=>{let c=ie();l.setValue(c.useFilenameAsScheduledDate).onChange(d=>F(this,null,function*(){ut({useFilenameAsScheduledDate:d}),qn(s,d),qn(a,d),yield this.plugin.saveSettings()}))}),s=new ke.Setting(e).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Jt.createFragmentWithHTML('An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.</br><p><a href="https://momentjs.com/docs/#/displaying/format/">Syntax Reference</a></p>')).addText(l=>{let c=ie();l.setPlaceholder("example: MMM DD YYYY").setValue(c.filenameAsScheduledDateFormat).onChange(d=>F(this,null,function*(){ut({filenameAsScheduledDateFormat:d}),yield this.plugin.saveSettings()}))}),a=new ke.Setting(e).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(l=>F(this,null,function*(){let c=ie();yield this.plugin.saveSettings(),l.setValue(Jt.renderFolderArray(c.filenameAsDateFolders)).onChange(d=>F(this,null,function*(){let f=Jt.parseCommaSeparatedFolders(d);ut({filenameAsDateFolders:f}),yield this.plugin.saveSettings()}))})),qn(s,ie().useFilenameAsScheduledDate),qn(a,ie().useFilenameAsScheduledDate),new ke.Setting(e).setName("Recurring tasks").setHeading(),new ke.Setting(e).setName("Next recurrence appears on the line below").setDesc(Jt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks">documentation</a>.</p>')).addToggle(l=>{let{recurrenceOnNextLine:c}=ie();l.setValue(c).onChange(d=>F(this,null,function*(){ut({recurrenceOnNextLine:d}),yield this.plugin.saveSettings()}))}),new ke.Setting(e).setName("Auto-suggest").setHeading();let o=null,u=null;new ke.Setting(e).setName("Auto-suggest task content").setDesc(Jt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest">documentation</a>.</p>')).addToggle(l=>{let c=ie();l.setValue(c.autoSuggestInEditor).onChange(d=>F(this,null,function*(){ut({autoSuggestInEditor:d}),yield this.plugin.save
Line truncated
|
||||
`+x.t("modals.customStatusModal.fixErrorsBeforeSaving");new Pr.Notice(d);return}this.saved=!0,this.close()})),u)),l.addExtraButton(u=>(u.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),u))}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,r){r.length===0?n.removeValidationError(e):n.setValidationError(e)}};var aT=require("obsidian");function Yx(n,t,e){if(t===e||!Object.prototype.hasOwnProperty.call(n,t))return q({},n);let r={};for(let[i,s]of Object.entries(n))i===t?r[e]=s:r[i]=s;return r}var pu=class{constructor(t,e,r){this.originalName=t,this.isValid=e,this.errorMessage=r}},Yf=class{validateRenames(t){let e={};for(let[r,i]of Object.entries(t)){let s={};for(let[a,o]of Object.entries(t))a!==r&&(s[o]="");e[r]=this.validateRename(s,"",i)}return e}validateRename(t,e,r){if(!r||r.trim()==="")return new pu(e,!1,"Preset name cannot be empty or all whitespace");for(let i of Object.keys(t))if(i!==e&&i.trim()===r.trim())return new pu(e,!1,"A preset with this name already exists");return new pu(e,!0,null)}addPreset(t){let e=this.generateUniqueKey(t),r=q({},t);return r[e]="",{presets:r,newKey:e}}renamePreset(t,e,r){return!r||r.trim()===""||(r=r.trim(),this.wouldCreateDuplicateKey(t,e,r))?null:Yx(t,e,r)}deletePreset(t,e){let r=q({},t);return delete r[e],r}updatePresetValue(t,e,r){let i=q({},t);return i[e]=r,i}wouldCreateDuplicateKey(t,e,r){let i=r.trim();if(e.trim()===i)return!1;for(let s of Object.keys(t))if(s!==e&&s.trim()===i)return!0;return!1}generateUniqueKey(t){let e="new_key",r=1;for(;Object.prototype.hasOwnProperty.call(t,`${e}_${r}`);)r++;return`${e}_${r}`}reorderPreset(t,e,r){let i=Object.keys(t),s=i.indexOf(e);if(s===-1||r<0||r>=i.length)return null;if(s===r)return q({},t);let a=[...i];a.splice(s,1),a.splice(r,0,e);let o={};for(let l of a)o[l]=t[l];return o}};Fr();ft();var Uf=class{constructor(t,e){this.presetsSettingsService=new Yf;this.nameFields=new Map;this.plugin=t,this.events=e}renderPresetsSettings(t){let e=t.createDiv(),r=X(),i=()=>{e.empty(),this.nameFields.clear(),Object.entries(r.presets).forEach(([s,a])=>{this.renderPresetItem(e,r,s,a,i)})};i(),this.createAddNewPresetButton(t,r,i)}renderPresetItem(t,e,r,i,s){let a=t.createDiv({cls:"tasks-presets-wrapper"}),o=new aT.Setting(a);o.settingEl.addClass("tasks-presets-setting"),a.setAttribute("data-preset-key",r),o.addText(l=>{l.setPlaceholder("Name").setValue(r),l.inputEl.addClass("tasks-presets-key"),this.nameFields.set(r,{inputEl:l.inputEl,originalKey:r});let u=r;l.inputEl.addEventListener("input",d=>{u=d.target.value,this.validateAllInputs()});let c=()=>{if(u&&u!==r){let d=this.presetsSettingsService.renamePreset(e.presets,r,u);d&&this.savePresetsSettings(d,e,s)}};l.inputEl.addEventListener("blur",c),l.inputEl.addEventListener("keydown",d=>{d.key==="Enter"&&(d.preventDefault(),l.inputEl.blur())})}),o.addTextArea(l=>(l.inputEl.addClass("tasks-presets-value"),l.setPlaceholder("Query or filter text...").setValue(i),this.setupAutoResizingTextarea(l),l.onChange(u=>A(this,null,function*(){let c=this.presetsSettingsService.updatePresetValue(e.presets,r,u);this.savePresetsSettings(c,e,null)})))),o.addExtraButton(l=>{l.extraSettingsEl.addClass("tasks-presets-drag-handle"),l.setIcon("grip-vertical").setTooltip("Drag to reorder"),l.extraSettingsEl.addEventListener("mousedown",u=>{a.draggable=!0,l.extraSettingsEl.addClass("tasks-presets-drag-handle-active")}),l.extraSettingsEl.addEventListener("mouseup",u=>{l.extraSettingsEl.removeClass("tasks-presets-drag-handle-active")})}),o.addExtraButton(l=>{l.extraSettingsEl.addClass("tasks-presets-delete-button"),l.setIcon("cross").setTooltip("Delete").onClick(()=>A(this,null,function*(){let u=this.presetsSettingsService.deletePreset(e.presets,r);this.savePresetsSettings(u,e,s)}))}),this.setupDragAndDrop(a,r,e,s),o.infoEl.remove()}setupDragAndDrop(t,e,r,i){t.addEventListener("dragstart",s=>{s.dataTransfer&&(s.dataTransfer.setData("text/plain",e),s.dataTransfer.effectAllowed="move"),t.addClass("tasks-presets-dragging")}),t.addEventListener("dragend",s=>{t.draggable=!1,t.removeClass("tasks-presets-dragging"),this.clearDropIndicators()}),t.addEventListener("dragover",s=>{s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="move"),this.showDropIndicator(t,s)}),t.addEventListener("dragleave",s=>{let a=t.getBoundingClientRect(),o=s.clientX,l=s.clientY;(o<a.left||o>a.right||l<a.top||l>a.bottom)&&this.clearDropIndicator(t)}),t.addEventListener("drop",s=>{var c;s.preventDefault();let a=(c=s.dataTransfer)==null?void 0:c.getData("text/plain");if(!a||a===e){this.clearDropIndicators();return}let o=this.calculateDropPosition(t,s),l=this.getTargetIndex(e,o),u=this.presetsSettingsService.reorderPreset(r.presets,a,l);u&&this.savePresetsSettings(u,r,i),this.clearDropIndicators()})}getTargetIndex(t,e){let r=X(),s=Object.keys(r.presets).indexOf(t);ret
Line truncated
|
||||
|
||||
This message has been written to the console.
|
||||
`,1e4)}var Ed=class extends Yi.EditorSuggest{constructor(e,n,i){super(e);this.settings=n,this.plugin=i,e.scope.register([],"Tab",()=>{var a;let s=(a=this.context)==null?void 0:a.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(e,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(e.line);return kw(s,e,n)?{start:{line:e.line,ch:0},end:{line:e.line,ch:s.length},query:s}:null}getSuggestions(e){var c,d,f;let n=e.query,i=e.editor.getCursor(),s=this.plugin.getTasks(),a=s.find(m=>m.taskLocation.path==e.file.path&&m.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(e),u=this.canSaveEdits(o);return((f=(d=(c=Tu()).buildSuggestions)==null?void 0:d.call(c,n,i.ch,this.settings,s,u,a))!=null?f:[]).map(m=>Ee(ne({},m),{context:e}))}getMarkdownFileInfo(e){return e.editor.cm.state.field(Yi.editorInfoField)}canSaveEdits(e){return e instanceof Yi.MarkdownView}renderSuggestion(e,n){n.setText(e.displayText)}selectSuggestion(e,n){return F(this,null,function*(){var l,c,d;let i=e.context.editor;if(e.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(c=(l=i==null?void 0:i.cm)==null?void 0:l.contentDOM)==null||c.dispatchEvent(f);return}if(e.taskItDependsOn!=null){let f=ec(e.taskItDependsOn,this.plugin.getTasks().map(m=>m.id));if(e.appendText+=` ${f.id}`,e.taskItDependsOn!==f)if(e.context.file.path==f.path){let m=e.taskItDependsOn.originalMarkdown,b={line:e.taskItDependsOn.lineNumber,ch:0},T={line:e.taskItDependsOn.lineNumber,ch:m.length},_=e.context.editor.getRange(b,T);if(_!==m){let x=`Error adding new ID, due to mismatched data in Tasks memory and the editor:
|
||||
task line in memory: '${e.taskItDependsOn.originalMarkdown}'
|
||||
`,1e4)}var jf=class extends as.EditorSuggest{constructor(t,e,r){super(t),this.settings=e,this.plugin=r,t.scope.register([],"Tab",()=>{var s;let i=(s=this.context)==null?void 0:s.editor;return i?(i.exec("indentMore"),!1):!0})}onTrigger(t,e,r){if(!this.settings.autoSuggestInEditor||r===void 0)return null;let i=e.getLine(t.line);return!cD(i,t,e)||this.grabSuggestions(e,r,i).length===0?null:{start:{line:t.line,ch:0},end:{line:t.line,ch:i.length},query:i}}getSuggestions(t){return t.file===void 0?[]:this.grabSuggestions(t.editor,t.file,t.query).map(r=>pe(q({},r),{context:t}))}grabSuggestions(t,e,r){var u,c,d;let i=t.getCursor(),s=this.plugin.getTasks(),a=s.find(f=>f.taskLocation.path==e.path&&f.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(t),l=this.canSaveEdits(o);return(d=(c=(u=Ul()).buildSuggestions)==null?void 0:c.call(u,r,i.ch,this.settings,s,l,a))!=null?d:[]}getMarkdownFileInfo(t){return t.cm.state.field(as.editorInfoField)}canSaveEdits(t){return t instanceof as.MarkdownView}renderSuggestion(t,e){e.setText(t.displayText)}selectSuggestion(t,e){return A(this,null,function*(){var l,u,c;let r=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(u=(l=r==null?void 0:r.cm)==null?void 0:l.contentDOM)==null||u.dispatchEvent(d);return}if(t.taskItDependsOn!=null){let d=Lc(t.taskItDependsOn,this.plugin.getTasks().map(f=>f.id));if(t.appendText+=` ${d.id}`,t.taskItDependsOn!==d)if(t.context.file.path==d.path){let f=t.taskItDependsOn.originalMarkdown,p={line:t.taskItDependsOn.lineNumber,ch:0},h={line:t.taskItDependsOn.lineNumber,ch:f.length},b=t.context.editor.getRange(p,h);if(b!==f){let v=`Error adding new ID, due to mismatched data in Tasks memory and the editor:
|
||||
task line in memory: '${t.taskItDependsOn.originalMarkdown}'
|
||||
|
||||
task line in editor: '${_}'
|
||||
task line in editor: '${b}'
|
||||
|
||||
file: '${f.path}'
|
||||
`;ZL(x);return}e.context.editor.replaceRange(f.toFileLineString(),b,T)}else Br({originalTask:e.taskItDependsOn,newTasks:f})}let s=e.context.editor.getCursor(),a={line:s.line,ch:(d=e.insertAt)!=null?d:s.ch},o=e.insertSkip?{line:s.line,ch:a.ch+e.insertSkip}:void 0;e.context.editor.replaceRange(e.appendText,a,o),e.context.editor.setCursor({line:s.line,ch:a.ch+e.appendText.length});let u=this.getMarkdownFileInfo(e.context);this.canSaveEdits(u)&&(yield u.save())})}};var ZE=(r,t)=>{let e,n=new Promise((a,o)=>{e=a});return t(r,a=>{let o=a.map(u=>u.toFileLineString()).join(`
|
||||
`);e(o)}).open(),n};var JE=(r,t)=>{let e=wc({line:"",path:""});return new Mi({app:r,task:e,onSubmit:t,allTasks:[]})};var eD=r=>({createTaskLineModal:()=>ZE(r,JE),executeToggleTaskDoneCommand:(t,e)=>pg(t,e).text});var Dd=class extends tD.Plugin{get apiV1(){return eD(this.app)}onload(){return F(this,null,function*(){Kt.registerConsoleLogger(),Yh("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:e}=ie();Kt.configure(e),this.addSettingTab(new Gu({plugin:this})),gk({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new sd({obsidianEvents:this.app.workspace});this.cache=new da({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:n}),this.inlineRenderer=new yd({plugin:this}),this.queryRenderer=new vd({plugin:this,events:n}),this.registerEditorExtension(IE()),this.registerEditorSuggest(new Ed(this.app,ie(),this)),new kc({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:e}=ie();Xe.applyToStatusRegistry(e,$e.getInstance())})}onunload(){var e;Yh("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(e=this.cache)==null||e.unload()}loadSettings(){return F(this,null,function*(){let e=yield this.loadData();ut(e),e=ie(),Ae.getInstance().set(e.globalFilter),Ae.getInstance().setRemoveGlobalFilter(e.removeGlobalFilter),Dr.getInstance().set(e.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(ie())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}};
|
||||
/*!
|
||||
* EventEmitter2
|
||||
* https://github.com/hij1nx/EventEmitter2
|
||||
*
|
||||
* Copyright (c) 2013 hij1nx
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
/*!
|
||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||
* http://github.com/janl/mustache.js
|
||||
*/
|
||||
file: '${d.path}'
|
||||
`;vW(v);return}t.context.editor.replaceRange(d.toFileLineString(),p,h)}else yield Wn({originalTask:t.taskItDependsOn,newTasks:d})}let i=t.context.editor.getCursor(),s={line:i.line,ch:(c=t.insertAt)!=null?c:i.ch},a=t.insertSkip?{line:i.line,ch:s.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,s,a),t.context.editor.setCursor({line:i.line,ch:s.ch+t.appendText.length});let o=this.getMarkdownFileInfo(t.context.editor);this.canSaveEdits(o)&&(yield o.save())})}};Aa();function Wf(n,t,e,r){let i,s=new Promise((c,d)=>{i=c}),a=c=>{let d=c.map(f=>f.toFileLineString()).join(`
|
||||
`);i(d)},o=()=>{i("")},l=kd({line:t!=null?t:"",path:""});return new Ki({app:n,task:l,onSaveSettings:r,onSubmit:a,onCancel:o,allTasks:e}).open(),s}var $x=(n,t,e)=>Wf(n,"",t,e);var jx=n=>{let t=n.app,e=()=>A(null,null,function*(){return yield n.saveSettings()});return{createTaskLineModal:()=>$x(t,n.getTasks(),e),editTaskLineModal:r=>Wf(t,r,n.getTasks(),e),executeToggleTaskDoneCommand:(r,i)=>Eb(r,i).text}};hn();up();var Hf=class{constructor(t){this.app=t}load(t){return this.app.loadLocalStorage(t)}save(t,e){this.app.saveLocalStorage(t,e)}};var Bf=class extends Gf.Plugin{get apiV1(){return jx(this)}onload(){return A(this,null,function*(){yield ZT(),gn.registerConsoleLogger(),zy("info",x.t("main.loadingPlugin",{name:this.manifest.name,version:this.manifest.version})),yield this.loadSettings(),on.initialise(new Hf(this.app));let{loggingOptions:t}=X();gn.configure(t),ia.getInstance().setGetFirstLinkpathDestFn((r,i)=>{let s=(0,Gf.getLinkpath)(r.link),a=this.app.metadataCache.getFirstLinkpathDest(s,i);return a?a.path:null});let e=new gf({obsidianEvents:this.app.workspace});this.addSettingTab(new $f({plugin:this,events:e})),_O({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses(),this.cache=new Ns({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:e}),this.inlineRenderer=new xf({plugin:this,app:this.app}),this.queryRenderer=new Nf({plugin:this,events:e}),this.setObsidianPropertiesTypes(),this.registerEditorExtension(_x(this)),this.registerEditorSuggest(new jf(this.app,X(),this)),new hf({plugin:this})})}loadTaskStatuses(){return A(this,null,function*(){let{statusSettings:t}=X();_t.applyToStatusRegistry(t,Je.getInstance())})}onunload(){var t;zy("info",x.t("main.unloadingPlugin",{name:this.manifest.name,version:this.manifest.version})),(t=this.cache)==null||t.unload()}loadSettings(){return A(this,null,function*(){let t=yield this.loadData();st(t),t=X(),Ae.getInstance().set(t.globalFilter),Ae.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),mr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return A(this,null,function*(){yield this.saveData(X())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}getState(){return this.cache===void 0?"Cold":this.cache.getState()}setObsidianPropertiesTypes(){var t;try{let e=this.app.metadataTypeManager,r=e.getAllProperties(),i=new Mi;for(let s of i.allPropertyNamesSorted()){let a=i.propertyType(s);((t=r[s])==null?void 0:t.type)!==a&&e.setType(s,a)}}catch(e){console.error("setObsidianPropertiesTypes error",e)}}};
|
||||
/*! Bundled license information:
|
||||
|
||||
eventemitter2/lib/eventemitter2.js:
|
||||
(*!
|
||||
* EventEmitter2
|
||||
* https://github.com/hij1nx/EventEmitter2
|
||||
*
|
||||
* Copyright (c) 2013 hij1nx
|
||||
* Licensed under the MIT license.
|
||||
*)
|
||||
|
||||
mustache/mustache.mjs:
|
||||
(*!
|
||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||
* http://github.com/janl/mustache.js
|
||||
*)
|
||||
*/
|
||||
|
||||
/* nosourcemap */
|
||||
Reference in new issue
Block a user