vault backup: 2025-02-01 15:29:07
This commit is contained in:
1 parent
9c45b41514
commit
b82c2faa25
22 files changed
+1568
-75060
No files matched your search
Vendored
+677
-356
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"id": "dataview",
|
"id": "dataview",
|
||||||
"name": "Dataview",
|
"name": "Dataview",
|
||||||
"version": "0.5.64",
|
"version": "0.5.67",
|
||||||
"minAppVersion": "0.13.11",
|
"minAppVersion": "0.13.11",
|
||||||
"description": "Complex data views for the data-obsessed.",
|
"description": "Complex data views for the data-obsessed.",
|
||||||
"author": "Michael Brenan <blacksmithgu@gmail.com>",
|
"author": "Michael Brenan <blacksmithgu@gmail.com>",
|
||||||
"authorUrl": "https://github.com/blacksmithgu",
|
"authorUrl": "https://github.com/blacksmithgu",
|
||||||
|
"helpUrl": "https://blacksmithgu.github.io/obsidian-dataview/",
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
}
|
}
|
||||||
+3
-2
@@ -1,3 +1,4 @@
|
|||||||
"use strict";var e,t,i,n=require("obsidian");!function(e){e[e.DEFINED=1]="DEFINED",e[e.INFERRED=2]="INFERRED"}(e||(e={})),function(e){e[e.PARENT=0]="PARENT",e[e.CHILD=1]="CHILD",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(t||(t={})),function(e){e[e.TO=1]="TO",e[e.FROM=2]="FROM",e[e.BOTH=3]="BOTH"}(i||(i={}));const s=/(?:\[([^[\]]+)\]\()((?:(?:ftp|https?|sftp|shttp|tftp):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>"']|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))\)|\b()((?:(?:ftp|https?|sftp|shttp|tftp):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>"']|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))\b/gi;class r{constructor(e){this.plugin=e,this.fileToUrlMap=new Map,this.fileUrlInverseMap=new Map,this.hosts=[],this.initalized=!1,this.app=e.app}async init(){const e=Date.now(),t=this.app.vault.getMarkdownFiles();for(const e of t)await this.parseFileURLs(e);this.registerFileEvents(),this.initalized=!0,console.log(`ExcaliBrain indexed ${this.fileUrlInverseMap.size} URLs from ${this.hosts.length} unique hosts in ${this.fileToUrlMap.size} of ${t.length} markdown files in ${((Date.now()-e)/1e3).toFixed(1)} seconds`)}getOrigin(e,t){try{return new URL(e).origin}catch(i){return console.log(`ExcaliBrain URLParser: Invalid URL ${e} in file ${t.path}`),":Unknown Origin:"}}async parseFileURLs(e){var t,i,r,a;if(!(e&&e instanceof n.TFile))return;let u="";try{u=await this.app.vault.cachedRead(e)}catch(t){return void console.log(`ExcaliBrain URLParser: Failed to read file ${e.path}`,t)}const o=new Map;let l;for(;null!==(l=s.exec(u));){const n=null!==(i=null!==(t=l[1])&&void 0!==t?t:l[3])&&void 0!==i?i:"";let s=null!==(a=null!==(r=l[2])&&void 0!==r?r:l[4])&&void 0!==a?a:"";if(s.match(/^(?:ftp|https?|sftp|shttp|tftp):/)||(s="https://"+s),o.has(s)){if(""!==n){const e=o.get(s);""===e.alias&&o.set(s,Object.assign(Object.assign({},e),{alias:n}))}}else{const t=this.getOrigin(s,e);o.set(s,{url:s,alias:n,origin:t}),this.updateInverseMap(s,e,t)}}const D=Array.from(o.values());D.length>0&&this.fileToUrlMap.set(e,D)}updateInverseMap(e,t,i){this.fileUrlInverseMap.has(e)||this.fileUrlInverseMap.set(e,{files:[],origin:i});const n=this.fileUrlInverseMap.get(e);n&&(n.files.includes(t)||n.files.push(t),this.hosts.includes(n.origin)||this.hosts.push(n.origin))}registerFileEvents(){const e=e=>{t(e),this.parseFileURLs(e)},t=e=>{const t=this.fileToUrlMap.get(e);this.fileToUrlMap.delete(e),t&&t.forEach((t=>{const i=this.fileUrlInverseMap.get(t.url);if(i){if(i.files=i.files.filter((t=>t!==e)),0===i.files.length)return this.fileUrlInverseMap.delete(t.url),void(this.hosts=this.hosts.filter((e=>e!==i.origin)));this.fileUrlInverseMap.set(t.url,i)}}))};this.plugin.registerEvent(this.app.vault.on("create",e)),this.plugin.registerEvent(this.app.vault.on("modify",e)),this.plugin.registerEvent(this.app.vault.on("delete",t))}}const a=(e,t,i)=>{const n=e.metadataCache.getFirstLinkpathDest(t,i);return n?n.path:t},u=(e,t)=>{var i,n,r,u,o;const l=new Set,D=e.matchAll(/[^[]*\[\[(?<wikiLink>[^#\]\|]*)[^\]]*]]|\[[^\]]*]\((?<mdLink>[^)]*)\)/g);let d,h;for(;!(d=D.next()).done;){if(null===(n=null===(i=null==d?void 0:d.value)||void 0===i?void 0:i.groups)||void 0===n?void 0:n.wikiLink){const e=a(app,d.value.groups.wikiLink,t.path);e&&l.add(e)}if(null===(u=null===(r=null==d?void 0:d.value)||void 0===r?void 0:r.groups)||void 0===u?void 0:u.mdLink){const e=a(app,decodeURIComponent(d.value.groups.mdLink),t.path);e&&l.add(e)}}for(;null!==(h=s.exec(e));)l.add(null!==(o=h[2])&&void 0!==o?o:h[4]);return Array.from(l)},o=(e,t,i)=>{var n;const s=new Set;if(t.values){const r=Array.from(t.values());r.filter((e=>(null==e?void 0:e.type)&&("file"===e.type||"header"===e.type||"block"==e.type))).forEach((t=>{const n=a(e,t.path,i.path);n&&s.add(n)})),r.filter((e=>Boolean(null==e?void 0:e.values))).forEach((t=>{const n=Array.from(t.values());o(e,n,i).forEach((e=>s.add(e)))}));const l=u(r.filter((e=>"string"==typeof e)).join(" "),i),D=null===(n=r.filter((e=>(null==e?void 0:e.values)&&"object"==typeof e&&"string"==typeof e.values[0])))||void 0===n?void 0:n.map((t=>a(e,t.values[0],i.path)));
|
"use strict";var e,t,i,n=require("obsidian");!function(e){e[e.DEFINED=1]="DEFINED",e[e.INFERRED=2]="INFERRED"}(e||(e={})),function(e){e[e.PARENT=0]="PARENT",e[e.CHILD=1]="CHILD",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(t||(t={})),function(e){e[e.TO=1]="TO",e[e.FROM=2]="FROM",e[e.BOTH=3]="BOTH"}(i||(i={}));const s=/(?:\[([^[\]]+)\]\()((?:(?:ftp|https?|sftp|shttp|tftp):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>"']|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))\)|\b()((?:(?:ftp|https?|sftp|shttp|tftp):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>"']|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))\b/gi;class r{constructor(e){this.plugin=e,this.fileToUrlMap=new Map,this.fileUrlInverseMap=new Map,this.hosts=[],this.initalized=!1,this.app=e.app}async init(){const e=Date.now(),t=this.app.vault.getMarkdownFiles();for(const e of t)await this.parseFileURLs(e);this.registerFileEvents(),this.initalized=!0,console.log(`ExcaliBrain indexed ${this.fileUrlInverseMap.size} URLs from ${this.hosts.length} unique hosts in ${this.fileToUrlMap.size} of ${t.length} markdown files in ${((Date.now()-e)/1e3).toFixed(1)} seconds`)}getOrigin(e,t){try{return new URL(e).origin}catch(i){return console.log(`ExcaliBrain URLParser: Invalid URL ${e} in file ${t.path}`),":Unknown Origin:"}}async parseFileURLs(e){var t,i,r,a;if(!(e&&e instanceof n.TFile))return;let u="";try{u=await this.app.vault.cachedRead(e)}catch(t){return void console.log(`ExcaliBrain URLParser: Failed to read file ${e.path}`,t)}const o=new Map;let l;for(;null!==(l=s.exec(u));){const n=null!==(i=null!==(t=l[1])&&void 0!==t?t:l[3])&&void 0!==i?i:"";let s=null!==(a=null!==(r=l[2])&&void 0!==r?r:l[4])&&void 0!==a?a:"";if(s.match(/^(?:ftp|https?|sftp|shttp|tftp):/)||(s="https://"+s),o.has(s)){if(""!==n){const e=o.get(s);""===e.alias&&o.set(s,Object.assign(Object.assign({},e),{alias:n}))}}else{const t=this.getOrigin(s,e);o.set(s,{url:s,alias:n,origin:t}),this.updateInverseMap(s,e,t)}}const D=Array.from(o.values());D.length>0&&this.fileToUrlMap.set(e,D)}updateInverseMap(e,t,i){this.fileUrlInverseMap.has(e)||this.fileUrlInverseMap.set(e,{files:[],origin:i});const n=this.fileUrlInverseMap.get(e);n&&(n.files.includes(t)||n.files.push(t),this.hosts.includes(n.origin)||this.hosts.push(n.origin))}registerFileEvents(){const e=e=>{t(e),this.parseFileURLs(e)},t=e=>{const t=this.fileToUrlMap.get(e);this.fileToUrlMap.delete(e),t&&t.forEach((t=>{const i=this.fileUrlInverseMap.get(t.url);if(i){if(i.files=i.files.filter((t=>t!==e)),0===i.files.length)return this.fileUrlInverseMap.delete(t.url),void(this.hosts=this.hosts.filter((e=>e!==i.origin)));this.fileUrlInverseMap.set(t.url,i)}}))};this.plugin.registerEvent(this.app.vault.on("create",e)),this.plugin.registerEvent(this.app.vault.on("modify",e)),this.plugin.registerEvent(this.app.vault.on("delete",t))}}const a=(e,t,i)=>{const n=e.metadataCache.getFirstLinkpathDest(t,i);return n?n.path:t},u=(e,t)=>{var i,n,r,u,o;const l=new Set,D=e.matchAll(/[^[]*\[\[(?<wikiLink>[^#\]\|]*)[^\]]*]]|\[[^\]]*]\((?<mdLink>[^)]*)\)/g);let d,h;for(;!(d=D.next()).done;){if(null===(n=null===(i=null==d?void 0:d.value)||void 0===i?void 0:i.groups)||void 0===n?void 0:n.wikiLink){const e=a(app,d.value.groups.wikiLink,t.path);e&&l.add(e)}if(null===(u=null===(r=null==d?void 0:d.value)||void 0===r?void 0:r.groups)||void 0===u?void 0:u.mdLink){const e=a(app,decodeURIComponent(d.value.groups.mdLink),t.path);e&&l.add(e)}}for(;null!==(h=s.exec(e));)l.add(null!==(o=h[2])&&void 0!==o?o:h[4]);return Array.from(l)},o=(e,t,i)=>{var s;const r=new Set;if(t.values){if(t.hasOwnProperty("conversionAccuracy"))return[];const l=Array.from(t.values());let D;try{l.filter((e=>(null==e?void 0:e.type)&&("file"===e.type||"header"===e.type||"block"==e.type))).forEach((t=>{const n=a(e.app,t.path,i.path);n&&r.add(n)})),l.filter((e=>Boolean(null==e?void 0:e.values))).forEach((t=>{D=t;const n=Array.from(t.values());o(e,n,i).forEach((e=>r.add(e)))}))}catch(e){console.log(e),console.log(l),console.log(D),console.log(null==D?void 0:D.values)}const d=u(l.filter((e=>"string"==typeof e)).join(" "),i),h=null===(s=l.filter((e=>(null==e?void 0:e.values)&&"object"==typeof e&&"string"==typeof e.values[0])))||void 0===s?void 0:s.map((t=>a(e.app,t.values[0],i.path)));
|
||||||
//! currently there is an issue with case sensitivity. DataView retains case sensitivity of links for the front matter, but not the others
|
//! currently there is an issue with case sensitivity. DataView retains case sensitivity of links for the front matter, but not the others
|
||||||
return D||console.log({error:"objectLinks is undefined which is unexpected",errorLocation:"readDVField",field:t,file:i}),Array.from(s).concat(l).concat(null!=D?D:[])}if(t.path){const n=a(e,t.path,i.path);return n?[n]:[]}return"string"==typeof t?u(t,i):[]},l=(e,t,i)=>{const n=[],s=new Set;return i.forEach((i=>{const r=t[i];r&&!s.has(i)&&(s.add(i),o(e.app,r,t.file).forEach((e=>n.push({link:e,field:i}))))})),n},D=(e,t)=>{var i;const n=d(e,t);if(!n)return[null,null];if(e[t.primaryTagFieldLowerCase]){const s=null===(i=e[t.primaryTagFieldLowerCase].match(/#([^\s\])$"'\\]*)(?:$|\s)/g))||void 0===i?void 0:i.map((e=>e.trim())).filter((e=>t.tagStyleList.some((t=>e.startsWith(t))))),r=s&&s.length>0?s[0]:n[0];return[r,n.filter((e=>e!=r))]}return[n[0],n.slice(1)]},d=(e,t)=>{var i,n,s;return e?(null!==(s=null===(n=null===(i=e.file)||void 0===i?void 0:i.tags)||void 0===n?void 0:n.values)&&void 0!==s?s:[]).filter((e=>t.tagStyleList.some((t=>e.startsWith(t))))):null},h=(e,t)=>{const[i,n]=e;if(!i)return{};const s=t.tagNodeStyles[t.tagStyleList.filter((e=>i.startsWith(e)))[0]];if(s&&t.displayAllStylePrefixes){const e=Object.keys(t.tagNodeStyles).filter((e=>n.includes(e))),i=new Set;s.prefix&&i.add(s.prefix),null==e||e.map((e=>t.tagNodeStyles[e].prefix)).filter((e=>Boolean(e))).forEach((e=>i.add(e)));const r=Array.from(i).join("");return Object.assign(Object.assign({},s),{prefix:r})}return s},c=e=>{console.error(Object.assign({plugin:"ExcaliBrain"},e))};console.log.bind(window.console),console.log.bind(window.console);const g=e=>`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e.replaceAll(" "," "))))}`,E=(e,t)=>{if(!e.DEVICE.isDesktop)return;let i=!0;if(!t){const n=e.targetView;if(!n)return;i=app.workspace.activeLeaf===n.leaf,t=n.ownerWindow}i&&(t.electronWindow.isAlwaysOnTop()||(t.electronWindow.setAlwaysOnTop(!0),setTimeout((()=>{t.electronWindow.setAlwaysOnTop(!1)}),500)))};function p(e){const t=e.lastIndexOf("/"),i=-1==t?e:e.substring(t+1);return{folderpath:n.normalizePath(e.substring(0,t)),filename:i,basename:i.replace(/\.[^/.]+$/,"")}}function f(e,t){return!!e&&["pdf","mp4","mp3","webm","md"].includes(e.extension)&&!t.isExcalidrawFile(e)}class F{constructor(e){this.pages=new Map,this.forEach=this.pages.forEach.bind(this.pages),this.app=e.app,this.plugin=e}add(e,t){this.pages.set(e,t)}has(e){return this.pages.has(e)}get(e){return this.pages.get(e)}getPages(){return Array.from(this.pages.values())}get size(){return this.pages.size}delete(e){const t=this.pages.get(e);t&&(t.neighbours.forEach(((t,i)=>{const n=this.pages.get(i);n&&(n.unlinkNeighbour(e),n.file||0!==n.neighbours.size||this.pages.delete(i))})),this.pages.delete(e))}addInferredParentChild(t,n){this.plugin.settings.inferAllLinksAsFriends?(n.addLeftFriend(t,e.INFERRED,i.TO),t.addLeftFriend(n,e.INFERRED,i.FROM)):this.plugin.settings.inverseInfer?(n.addChild(t,e.INFERRED,i.TO),t.addParent(n,e.INFERRED,i.FROM)):(n.addParent(t,e.INFERRED,i.TO),t.addChild(n,e.INFERRED,i.FROM))}addResolvedLinks(e){const t=this.app.metadataCache.resolvedLinks;Object.keys(t).forEach((i=>{if(e&&e.path!==i)return;const n=this.pages.get(i);Object.keys(t[i]).forEach((e=>{let t=this.pages.get(e);t||(t=this.pages.get(this.plugin.lowercasePathMap.get(e.toLowerCase()))),this.addInferredParentChild(n,t)}))}))}addPageURLs(){this.plugin.urlParser.fileToUrlMap.forEach(((t,n)=>{const s=this.get(n.path);s&&t.forEach((t=>{let n=this.get(t.url);n||(n=new A(this,t.url,null,this.plugin,!1,!1,t.alias,t.url),this.add(t.url,n)),""===t.alias||""!==n.name&&n.name!==t.url||(n.name=t.alias),this.addInferredParentChild(s,n);const r=this.get(t.origin);r&&(n.addParent(r,e.INFERRED,i.FROM),r.addChild(n,e.INFERRED,i.TO))}))}))}addUnresolvedLinks(e){if(e&&(e.isFolder||e.isTag))return;const t=this.app.metadataCache.unresolvedLinks;Object.keys(t).forEach((i=>{if(e&&e.path!==i)return;let n=this.pages.get(i);n&&i!==this.plugin.settings.excalibrainFilepath&&Object.keys(t[i]).forEach((e=>m(e,n,this.plugin,this)))}))}}const m=(t,n,s,r)=>{var a;const u=null!==(a=r.get(t))&&void 0!==a?a:new A(r,t,null,s);return s.settings.inferAllLinksAsFriends?(u.addLeftFriend(n,e.INFERRED,i.TO),n.addLeftFriend(u,e.INFERRED,i.FROM)):s.settings.inverseInfer?(u.addChild(n,e.INFERRED,i.TO),n.addParent(u,e.INFERRED,i.FROM)):(u.addParent(n,e.INFERRED,i.TO),n.addChild(u,e.INFERRED,i.FROM)),r.add(t,u),u},C={target:null,isParent:!1,isChild:!1,isLeftFriend:!1,isRightFriend:!1,isNextFriend:!1,isPreviousFriend:!1,direction:null},y=(e,t)=>e&&t?e+", "+t:e||t,S=(e,t)=>e?e===i.BOTH||e===t?e:i.BOTH:t,b=(t,i)=>t===e.DEFINED?e.DEFINED:t===e.INFERRED?i===e.DEFINED?e.DEFINED:e.INFERRED:i;class A{constructor(e,t,i,n,s=!1,r=!1,a,u=null){this.pages=e,this.path=t,this.file=i,this.plugin=n,this.isFolder=s,this.isTag=r,this.name=a,this.url=u,this.dvIndexReady=!1,a||(this.name=i?"md"===i.extension?i.basename:i.name:Boolean(u)?u:(e=>{const t=e.endsWith(".md"),i=e.substring(e.lastIndexOf("/")+1);return t?i.slice(0,-3):i})(t)),this.mtime=i?i.stat.mtime:nLine truncated
|
h||console.log({error:"objectLinks is undefined which is unexpected",errorLocation:"readDVField",field:t,file:i});const c=((e,t,i)=>{const s=new Set;return t.forEach((t=>{var i;(null===(i=null==t?void 0:t.hasOwnProperty)||void 0===i?void 0:i.call(t,"ts"))&&s.add(n.moment(t.ts).format(e.dailyNoteSettings.format))})),Array.from(s)})(e,l);return Array.from(r).concat(d).concat(null!=h?h:[]).concat(c)}if(t.path){const n=a(e.app,t.path,i.path);return n?[n]:[]}return"string"==typeof t?u(t,i):[]},l=(e,t,i)=>{const n=[],s=new Set;return i.forEach((i=>{const r=t[i];r&&!s.has(i)&&(s.add(i),o(e,r,t.file).forEach((e=>n.push({link:e,field:i}))))})),n},D=(e,t)=>{var i;const n=d(e,t);if(!n)return[null,null];if(e[t.primaryTagFieldLowerCase]){const s=null===(i=e[t.primaryTagFieldLowerCase].match(/#([^\s\])$"'\\]*)(?:$|\s)/g))||void 0===i?void 0:i.map((e=>e.trim())).filter((e=>t.tagStyleList.some((t=>e.startsWith(t))))),r=s&&s.length>0?s[0]:n[0];return[r,n.filter((e=>e!=r))]}return[n[0],n.slice(1)]},d=(e,t)=>{var i,n,s;return e?(null!==(s=null===(n=null===(i=e.file)||void 0===i?void 0:i.tags)||void 0===n?void 0:n.values)&&void 0!==s?s:[]).filter((e=>t.tagStyleList.some((t=>e.startsWith(t))))):null},h=(e,t)=>{const[i,n]=e;if(!i)return{};const s=t.tagNodeStyles[t.tagStyleList.filter((e=>i.startsWith(e)))[0]];if(s&&t.displayAllStylePrefixes){const e=Object.keys(t.tagNodeStyles).filter((e=>n.includes(e))),i=new Set;s.prefix&&i.add(s.prefix),null==e||e.map((e=>t.tagNodeStyles[e].prefix)).filter((e=>Boolean(e))).forEach((e=>i.add(e)));const r=Array.from(i).join("");return Object.assign(Object.assign({},s),{prefix:r})}return s},c=e=>{console.error(Object.assign({plugin:"ExcaliBrain"},e))};console.log.bind(window.console),console.log.bind(window.console);const g=e=>`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e.replaceAll(" "," "))))}`,E=(e,t)=>{if(!e.DEVICE.isDesktop)return;let i=!0;if(!t){const n=e.targetView;if(!n)return;i=app.workspace.activeLeaf===n.leaf,t=n.ownerWindow}i&&(t.electronWindow.isAlwaysOnTop()||(t.electronWindow.setAlwaysOnTop(!0),setTimeout((()=>{t.electronWindow.setAlwaysOnTop(!1)}),500)))};function p(e){const t=e.lastIndexOf("/"),i=-1==t?e:e.substring(t+1);return{folderpath:n.normalizePath(e.substring(0,t)),filename:i,basename:i.replace(/\.[^/.]+$/,"")}}function f(e,t){return!!e&&["pdf","mp4","mp3","webm","md"].includes(e.extension)&&!t.isExcalidrawFile(e)}class F{constructor(e){this.pages=new Map,this.forEach=this.pages.forEach.bind(this.pages),this.app=e.app,this.plugin=e}add(e,t){this.pages.set(e,t)}has(e){return this.pages.has(e)}get(e){return this.pages.get(e)}getPages(){return Array.from(this.pages.values())}get size(){return this.pages.size}delete(e){const t=this.pages.get(e);t&&(t.neighbours.forEach(((t,i)=>{const n=this.pages.get(i);n&&(n.unlinkNeighbour(e),n.file||0!==n.neighbours.size||this.pages.delete(i))})),this.pages.delete(e))}addInferredParentChild(t,n){this.plugin.settings.inferAllLinksAsFriends?(n.addLeftFriend(t,e.INFERRED,i.TO),t.addLeftFriend(n,e.INFERRED,i.FROM)):this.plugin.settings.inverseInfer?(n.addChild(t,e.INFERRED,i.TO),t.addParent(n,e.INFERRED,i.FROM)):(n.addParent(t,e.INFERRED,i.TO),t.addChild(n,e.INFERRED,i.FROM))}addResolvedLinks(e){const t=this.app.metadataCache.resolvedLinks;Object.keys(t).forEach((i=>{if(e&&e.path!==i)return;const n=this.pages.get(i);Object.keys(t[i]).forEach((e=>{let t=this.pages.get(e);t||(t=this.pages.get(this.plugin.lowercasePathMap.get(e.toLowerCase()))),this.addInferredParentChild(n,t)}))}))}addPageURLs(){this.plugin.urlParser.fileToUrlMap.forEach(((t,n)=>{const s=this.get(n.path);s&&t.forEach((t=>{let n=this.get(t.url);n||(n=new A(this,t.url,null,this.plugin,!1,!1,t.alias,t.url),this.add(t.url,n)),""===t.alias||""!==n.name&&n.name!==t.url||(n.name=t.alias),this.addInferredParentChild(s,n);const r=this.get(t.origin);r&&(n.addParent(r,e.INFERRED,i.FROM),r.addChild(n,e.INFERRED,i.TO))}))}))}addUnresolvedLinks(e){if(e&&(e.isFolder||e.isTag))return;const t=this.app.metadataCache.unresolvedLinks;Object.keys(t).forEach((i=>{if(e&&e.path!==i)return;let n=this.pages.get(i);n&&i!==this.plugin.settings.excalibrainFilepath&&Object.keys(t[i]).forEach((e=>m(e,n,this.plugin,this)))}))}}const m=(t,n,s,r)=>{var a;const u=null!==(a=r.get(t))&&void 0!==a?a:new A(r,t,null,s);return s.settings.inferAllLinksAsFriends?(u.addLeftFriend(n,e.INFERRED,i.TO),n.addLeftFriend(u,e.INFERRED,i.FROM)):s.settings.inverseInfer?(u.addChild(n,e.INFERRED,i.TO),n.addParent(u,e.INFERRED,i.FROM)):(u.addParent(n,e.INFERRED,i.TO),n.addChild(u,e.INFERRED,i.FROM)),r.add(t,u),u},C={target:null,isHidden:!1,isParent:!1,isChild:!1,isLeftFriend:!1,isRightFriend:!1,isNextFriend:!1,isPreviousFriend:!1,direction:null},y=(e,t)=>e&&t?e+", "+t:e||t,S=(e,t)=>e?e===i.BOTH||e===t?e:i.BOTH:t,b=(t,i)=>t===e.DEFINED?e.DEFINED:t===e.INFERRED?i===e.DEFINED?e.DEFINED:e.INFERRED:i;class A{constructor(e,t,i,n,s=!1,r=!1,a,u=null){this.pages=e,this.path=t,this.file=i,this.plugin=n,this.isFolder=s,thLine truncated
|
||||||
|
/* nosourcemap */
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "excalibrain",
|
"id": "excalibrain",
|
||||||
"name": "ExcaliBrain",
|
"name": "ExcaliBrain",
|
||||||
"version": "0.2.11",
|
"version": "0.2.15",
|
||||||
"minAppVersion": "1.1.6",
|
"minAppVersion": "1.1.6",
|
||||||
"description": "A clean, intuitive and editable graph view for Obsidian",
|
"description": "A clean, intuitive and editable graph view for Obsidian",
|
||||||
"author": "Zsolt Viczian",
|
"author": "Zsolt Viczian",
|
||||||
|
|||||||
+5
-3
@@ -53,7 +53,7 @@ ${i.map(r=>` - title: ${r.dataTitle}
|
|||||||
width: 80%
|
width: 80%
|
||||||
beginAtZero: true
|
beginAtZero: true
|
||||||
\`\`\``;n.replaceSelection(s)}function Za(n,t,e){let i;try{i=sf.Extractor.extractObject(n,t,!1)}catch(o){throw new nf.Notice("Table malformed"),o}let s=Object.keys(Object.values(i)[0]),r=Object.keys(i).map(o=>({dataTitle:o,data:Object.values(i[o])}));return e&&(r=r.filter(o=>e.contains(o.dataTitle))),{labels:s,dataFields:r}}var rf={modes:{point(n,t){return Gr(n,t,{intersect:!0})},nearest(n,t,e){return Ry(n,t,e)},x(n,t,e){return Gr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return Gr(n,t,{intersect:e.intersect,axis:"y"})}}};function Ja(n,t,e){return(rf.modes[e.mode]||rf.modes.nearest)(n,t,e)}function Oy(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function Ay(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function Gr(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):Oy(i,t,e.axis))}function Ry(n,t,e){let i=Number.POSITIVE_INFINITY;return Gr(n,t,e).reduce((s,r)=>{let o=r.getCenterPoint(),a=Ay(t,o,e.axis),l=Ke(t,a);return l<i?(s=[r],i=l):l===i&&s.push(r),s},[]).sort((s,r)=>s._index-r._index).slice(0,1)}var Ly=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,ni=.001,Ur=(n,t,e)=>Math.min(e,Math.max(t,n));function Fy(n,t,e){for(let i of Object.keys(n))n[i]=Ur(n[i],t,e);return n}function Iy(n,t,e,i){if(!n||!t||e<=0)return!1;let s=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+s,2)}function of(n,{x:t,y:e,x2:i,y2:s},r,o){let a=o/2,l=n.x>=t-a-ni&&n.x<=i+a+ni,c=n.y>=e-a-ni&&n.y<=s+a+ni;return r==="x"?l:(r==="y"||l)&&c}function Oi(n,t){let{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function $y(n,t,e,i=!0){let s=e.split("."),r=0;for(let o of t.split(".")){let a=s[r++];if(parseInt(o,10)<parseInt(a,10))break;if(Ly(a,o)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}var af=n=>typeof n=="string"&&n.endsWith("%"),lf=n=>parseFloat(n)/100,cf=n=>Ur(lf(n),0,1);function Qa(n,t){return t==="start"?0:t==="end"?n:af(t)?cf(t)*n:n/2}function Dn(n,t,e=!0){return typeof t=="number"?t:af(t)?(e?cf(t):lf(t))*n:n}function jy(n,t){let{x:e,width:i}=n,s=t.textAlign;return s==="center"?e+i/2:s==="end"||s==="right"?e+i:e}function tl(n,t="center"){return at(n)?{x:nt(n.x,t),y:nt(n.y,t)}:(n=nt(n,t),{x:n,y:n})}function hf(n){return n&&(Nt(n.xValue)||Nt(n.yValue))}function Ps(n,t,e,i=!1){let s=e.init;if(s){if(s===!0)return ff(t,i)}else return;return zy(t,i,wt(s,[{chart:n,properties:t,options:e}]))}function uf(n,t,e){let i=!1;return t.forEach(s=>{le(n[s])?(i=!0,e[s]=n[s]):Nt(e[s])&&delete e[s]}),i}function ff({centerX:n,centerY:t},e){return e?{centerX:n,centerY:t,radius:0,width:0,height:0}:{x:n,y:t,x2:n,y2:t,width:0,height:0}}function zy(n,t,e){if(e===!0)return ff(n,t);if(at(e))return e}var el=new Map,By=n=>isNaN(n)||n<=0,Ny=n=>n.reduce(function(t,e){return t+=e.string,t},"");function Kr(n){if(n&&typeof n=="object"){let t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function nl(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Wt(i)),n.translate(-t,-e))}function En(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function Ai(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function il(n,t){let e=t.content;if(Kr(e))return{width:Dn(e.width,t.width),height:Dn(e.height,t.height)};let i=t.font,s=pt(i)?i.map(l=>Ft(l)):[Ft(i)],r=t.textStrokeWidth,o=pt(e)?e:[e],a=o.join()+Ny(s)+r+(n._measureText?"-spriting":"");return el.has(a)||el.set(a,Xy(n,o,s,r)),el.get(a)}function df(n,t,e){let{x:i,y:s,width:r,height:o}=t;n.save(),Ai(n,e);let a=En(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),en(n,{x:i,y:s,w:r,h:o,radius:Fy(Le(e.borderRadius),0,Math.min(r,o)/2)}),n.closePath(),n.fill(),a&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function Hy(n,t,e){let i=e.content;if(Kr(i)){n.save(),n.globalAlpha=Uy(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}let s=pt(i)?i:[i],r=e.font,o=pt(r)?r.map(f=>Ft(f)):[Ft(r)],a=e.color,l=pt(a)?a:[a],c=jy(t,e),h=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,Wy(n,e)&&qy(n,{x:c,y:h},s,o),Gy(n,{x:c,y:h},s,{fonts:o,colors:l}),n.restore()}function Wy(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Vy(n,t,e,i){let{radius:s,options:r}=t,o=r.pointStyle,a=r.rotation,l=(a||0)*Xi;if(Kr(o)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),n.restore();return}By(s)||Yy(n,{x:e,y:i,radius:s,rotation:a,style:o,rad:l})}function Yy(n,{x:t,y:e,radius:i,rotation:s,style:r,rad:o}){let a,l,c,h;switch(n.beginPath(),r){default:n.arc(t,e,i,0,kt),n.closePath()Line truncated
|
\`\`\``;n.replaceSelection(s)}function Za(n,t,e){let i;try{i=sf.Extractor.extractObject(n,t,!1)}catch(o){throw new nf.Notice("Table malformed"),o}let s=Object.keys(Object.values(i)[0]),r=Object.keys(i).map(o=>({dataTitle:o,data:Object.values(i[o])}));return e&&(r=r.filter(o=>e.contains(o.dataTitle))),{labels:s,dataFields:r}}var rf={modes:{point(n,t){return Gr(n,t,{intersect:!0})},nearest(n,t,e){return Ry(n,t,e)},x(n,t,e){return Gr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return Gr(n,t,{intersect:e.intersect,axis:"y"})}}};function Ja(n,t,e){return(rf.modes[e.mode]||rf.modes.nearest)(n,t,e)}function Oy(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function Ay(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function Gr(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):Oy(i,t,e.axis))}function Ry(n,t,e){let i=Number.POSITIVE_INFINITY;return Gr(n,t,e).reduce((s,r)=>{let o=r.getCenterPoint(),a=Ay(t,o,e.axis),l=Ke(t,a);return l<i?(s=[r],i=l):l===i&&s.push(r),s},[]).sort((s,r)=>s._index-r._index).slice(0,1)}var Ly=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,ni=.001,Ur=(n,t,e)=>Math.min(e,Math.max(t,n));function Fy(n,t,e){for(let i of Object.keys(n))n[i]=Ur(n[i],t,e);return n}function Iy(n,t,e,i){if(!n||!t||e<=0)return!1;let s=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+s,2)}function of(n,{x:t,y:e,x2:i,y2:s},r,o){let a=o/2,l=n.x>=t-a-ni&&n.x<=i+a+ni,c=n.y>=e-a-ni&&n.y<=s+a+ni;return r==="x"?l:(r==="y"||l)&&c}function Oi(n,t){let{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function $y(n,t,e,i=!0){let s=e.split("."),r=0;for(let o of t.split(".")){let a=s[r++];if(parseInt(o,10)<parseInt(a,10))break;if(Ly(a,o)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}var af=n=>typeof n=="string"&&n.endsWith("%"),lf=n=>parseFloat(n)/100,cf=n=>Ur(lf(n),0,1);function Qa(n,t){return t==="start"?0:t==="end"?n:af(t)?cf(t)*n:n/2}function Dn(n,t,e=!0){return typeof t=="number"?t:af(t)?(e?cf(t):lf(t))*n:n}function jy(n,t){let{x:e,width:i}=n,s=t.textAlign;return s==="center"?e+i/2:s==="end"||s==="right"?e+i:e}function tl(n,t="center"){return at(n)?{x:nt(n.x,t),y:nt(n.y,t)}:(n=nt(n,t),{x:n,y:n})}function hf(n){return n&&(Nt(n.xValue)||Nt(n.yValue))}function Ps(n,t,e,i=!1){let s=e.init;if(s){if(s===!0)return ff(t,i)}else return;return zy(t,i,wt(s,[{chart:n,properties:t,options:e}]))}function uf(n,t,e){let i=!1;return t.forEach(s=>{le(n[s])?(i=!0,e[s]=n[s]):Nt(e[s])&&delete e[s]}),i}function ff({centerX:n,centerY:t},e){return e?{centerX:n,centerY:t,radius:0,width:0,height:0}:{x:n,y:t,x2:n,y2:t,width:0,height:0}}function zy(n,t,e){if(e===!0)return ff(n,t);if(at(e))return e}var el=new Map,By=n=>isNaN(n)||n<=0,Ny=n=>n.reduce(function(t,e){return t+=e.string,t},"");function Kr(n){if(n&&typeof n=="object"){let t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function nl(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Wt(i)),n.translate(-t,-e))}function En(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function Ai(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function il(n,t){let e=t.content;if(Kr(e))return{width:Dn(e.width,t.width),height:Dn(e.height,t.height)};let i=t.font,s=pt(i)?i.map(l=>Ft(l)):[Ft(i)],r=t.textStrokeWidth,o=pt(e)?e:[e],a=o.join()+Ny(s)+r+(n._measureText?"-spriting":"");return el.has(a)||el.set(a,Xy(n,o,s,r)),el.get(a)}function df(n,t,e){let{x:i,y:s,width:r,height:o}=t;n.save(),Ai(n,e);let a=En(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),en(n,{x:i,y:s,w:r,h:o,radius:Fy(Le(e.borderRadius),0,Math.min(r,o)/2)}),n.closePath(),n.fill(),a&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function Hy(n,t,e){let i=e.content;if(Kr(i)){n.save(),n.globalAlpha=Uy(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}let s=pt(i)?i:[i],r=e.font,o=pt(r)?r.map(f=>Ft(f)):[Ft(r)],a=e.color,l=pt(a)?a:[a],c=jy(t,e),h=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,Wy(n,e)&&qy(n,{x:c,y:h},s,o),Gy(n,{x:c,y:h},s,{fonts:o,colors:l}),n.restore()}function Wy(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Vy(n,t,e,i){let{radius:s,options:r}=t,o=r.pointStyle,a=r.rotation,l=(a||0)*Xi;if(Kr(o)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),n.restore();return}By(s)||Yy(n,{x:e,y:i,radius:s,rotation:a,style:o,rad:l})}function Yy(n,{x:t,y:e,radius:i,rotation:s,style:r,rad:o}){let a,l,c,h;switch(n.beginPath(),r){default:n.arc(t,e,i,0,kt),n.closePath()Line truncated
|
||||||
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,i1=360,Yf="keydown",io="mousedown",vl="focusin";function Ve(n,t){return(t||document).querySelector(n)}function Xf(n){n.preventDefault(),n.stopPropagation()}function _l(n,t,e,i,s){n.add(t,Yf,function(r){e.indexOf(r.key)>=0&&(s&&Xf(r),i(r))})}var yl=function(){function n(t){gl(this,n),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new t1,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return ml(n,[{key:"setOptions",value:function(e){var i=this;if(!e)return;var s=this.settings;function r(c,h,f){for(var g in c)f&&f.indexOf(g)>=0||(h[g]=c[g])}if(e instanceof HTMLElement)s.parent=e;else{s.parent&&e.parent&&s.parent!==e.parent&&(this._events.remove(s.parent),this._popupInited=!1),r(e,s),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var o=e.color||e.colour;o&&this._setColor(o)}var a=s.parent;if(a&&s.popup&&!this._popupInited){var l=function(h){return i.openHandler(h)};this._events.add(a,"click",l),_l(this._events,a,[" ","Spacebar","Enter"],l),this._popupInited=!0}else e.parent&&!s.popup&&this.show()}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var i=e&&e.type===Yf?this._domEdit:this.domElement;setTimeout(function(){return i.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var i=e&&e.type,s=!1;if(!e)s=!0;else if(i===io||i===vl){var r=(this.__containedEvent||0)+100;e.timeStamp>r&&(s=!0)}else Xf(e),s=!0;s&&this.hide()&&(this.settings.parent.style.pointerEvents="",i!==io&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,i){this.closeHandler(),this.setOptions(e),i&&this.openHandler()}},{key:"setColor",value:function(e,i){this._setColor(e,{silent:i})}},{key:"_setColor",value:function(e,i){if(typeof e=="string"&&(e=e.trim()),!!e){i=i||{};var s=void 0;try{s=new Qx(e)}catch(o){if(i.failSilently)return;throw o}if(!this.settings.alpha){var r=s.hsla;r[3]=1,s.hsla=r}this.colour=this.color=s,this._setHSLA(null,null,null,null,i)}}},{key:"setColour",value:function(e,i){this.setColor(e,i)}},{key:"show",value:function(){var e=this.settings.parent;if(!e)return!1;if(this.domElement){var i=this._toggleDOM(!0);return this._setPosition(),i}var s=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',r=e1(s);return this.domElement=r,this._domH=Ve(".picker_hue",r),this._domSL=Ve(".picker_sl",r),this._domA=Ve(".picker_alpha",r),this._domEdit=Ve(".picker_editor input",r),this._domSample=Ve(".picker_sample",r),this._domOkay=Ve(".picker_done button",r),this._domCancel=Ve(".picker_cancel button",r),r.classList.add("layout_"+this.settings.layout),this.settings.alpha||r.classList.add("no_alpha"),this.settings.editor||r.classList.add("no_editor"),this.settings.cancelButton||r.classList.add("no_cancel"),this._ifPopup(function(){return r.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,i=this,s=this.domElement,r=this._events;function o(c,h,f){r.add(c,h,f)}o(s,"click",function(c){return c.preventDefault()}),bl(r,this._domH,function(c,h){return i._setHSLA(c)}),bl(r,this._domSL,function(c,h){return i._setHSLA(null,c,1-h)}),this.settings.alpha&&bl(r,this._domA,function(c,h){return i._setHSLA(null,null,null,1-h)});var a=this._domEdit;o(a,"input",function(c){i._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(a,"focus",function(c){var h=this;h.selectionStart===h.selectionEnd&&h.select()}),this._ifPopup(function(){var c=function(g){return e.closeHandler(g)};o(window,io,c),o(window,vl,c),_l(r,s,["Esc","Escape"],c);var h=function(g){e.__containedEvent=g.timeStamp};o(s,io,h),o(s,vl,h),o(e._domCancel,"click",c)});var l=function(h){e._ifPopup(function(){return e.closeHandler(h)}),e.onDone&&e.onDone(e.colour)};o(this._domOkay,"click",l),_l(r,s,["Enter"],l)}},{key:"_setPosition",value:function(){var e=this.settings.parent,i=this.
Line truncated
|
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,i1=360,Yf="keydown",io="mousedown",vl="focusin";function Ve(n,t){return(t||document).querySelector(n)}function Xf(n){n.preventDefault(),n.stopPropagation()}function _l(n,t,e,i,s){n.add(t,Yf,function(r){e.indexOf(r.key)>=0&&(s&&Xf(r),i(r))})}var yl=function(){function n(t){gl(this,n),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new t1,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return ml(n,[{key:"setOptions",value:function(e){var i=this;if(!e)return;var s=this.settings;function r(c,h,f){for(var g in c)f&&f.indexOf(g)>=0||(h[g]=c[g])}if(e instanceof HTMLElement)s.parent=e;else{s.parent&&e.parent&&s.parent!==e.parent&&(this._events.remove(s.parent),this._popupInited=!1),r(e,s),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var o=e.color||e.colour;o&&this._setColor(o)}var a=s.parent;if(a&&s.popup&&!this._popupInited){var l=function(h){return i.openHandler(h)};this._events.add(a,"click",l),_l(this._events,a,[" ","Spacebar","Enter"],l),this._popupInited=!0}else e.parent&&!s.popup&&this.show()}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var i=e&&e.type===Yf?this._domEdit:this.domElement;setTimeout(function(){return i.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var i=e&&e.type,s=!1;if(!e)s=!0;else if(i===io||i===vl){var r=(this.__containedEvent||0)+100;e.timeStamp>r&&(s=!0)}else Xf(e),s=!0;s&&this.hide()&&(this.settings.parent.style.pointerEvents="",i!==io&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,i){this.closeHandler(),this.setOptions(e),i&&this.openHandler()}},{key:"setColor",value:function(e,i){this._setColor(e,{silent:i})}},{key:"_setColor",value:function(e,i){if(typeof e=="string"&&(e=e.trim()),!!e){i=i||{};var s=void 0;try{s=new Qx(e)}catch(o){if(i.failSilently)return;throw o}if(!this.settings.alpha){var r=s.hsla;r[3]=1,s.hsla=r}this.colour=this.color=s,this._setHSLA(null,null,null,null,i)}}},{key:"setColour",value:function(e,i){this.setColor(e,i)}},{key:"show",value:function(){var e=this.settings.parent;if(!e)return!1;if(this.domElement){var i=this._toggleDOM(!0);return this._setPosition(),i}var s=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',r=e1(s);return this.domElement=r,this._domH=Ve(".picker_hue",r),this._domSL=Ve(".picker_sl",r),this._domA=Ve(".picker_alpha",r),this._domEdit=Ve(".picker_editor input",r),this._domSample=Ve(".picker_sample",r),this._domOkay=Ve(".picker_done button",r),this._domCancel=Ve(".picker_cancel button",r),r.classList.add("layout_"+this.settings.layout),this.settings.alpha||r.classList.add("no_alpha"),this.settings.editor||r.classList.add("no_editor"),this.settings.cancelButton||r.classList.add("no_cancel"),this._ifPopup(function(){return r.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,i=this,s=this.domElement,r=this._events;function o(c,h,f){r.add(c,h,f)}o(s,"click",function(c){return c.preventDefault()}),bl(r,this._domH,function(c,h){return i._setHSLA(c)}),bl(r,this._domSL,function(c,h){return i._setHSLA(null,c,1-h)}),this.settings.alpha&&bl(r,this._domA,function(c,h){return i._setHSLA(null,null,null,1-h)});var a=this._domEdit;o(a,"input",function(c){i._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(a,"focus",function(c){var h=this;h.selectionStart===h.selectionEnd&&h.select()}),this._ifPopup(function(){var c=function(g){return e.closeHandler(g)};o(window,io,c),o(window,vl,c),_l(r,s,["Esc","Escape"],c);var h=function(g){e.__containedEvent=g.timeStamp};o(s,io,h),o(s,vl,h),o(e._domCancel,"click",c)});var l=function(h){e._ifPopup(function(){return e.closeHandler(h)}),e.onDone&&e.onDone(e.colour)};o(this._domOkay,"click",l),_l(r,s,["Enter"],l)}},{key:"_setPosition",value:function(){var e=this.settings.parent,i=this.
Line truncated
|
||||||
<p class="subDesc svelte-1tlkntj">Set Data Fields (Comma seperated)</p>`,i=It(),s=Y("td"),r=Y("input"),o=It(),a=Y("br"),l=It(),c=Y("input"),X(e,"class","desc svelte-1tlkntj"),X(r,"type","text"),X(r,"placeholder","Name"),X(c,"type","text"),X(c,"placeholder","1, -2, 11, 5"),Gt(c,"margin-top","3px"),X(s,"class","controlElement svelte-1tlkntj")},m(m,y){Xe(m,t,y),z(t,e),z(t,i),z(t,s),z(s,r),de(r,n[33].dataTitle),z(s,o),z(s,a),z(s,l),z(s,c),de(c,n[33].data),h||(f=[Jt(r,"input",g),Jt(c,"input",p)],h=!0)},p(m,y){n=m,y[0]&1024&&r.value!==n[33].dataTitle&&de(r,n[33].dataTitle),y[0]&1024&&c.value!==n[33].data&&de(c,n[33].data)},d(m){m&&Ie(t),h=!1,hn(f)}}}function w1(n){let t,e,i,s,r,o,a,l,c,h,f,g,p,m,y,S,M,C,F,D,I;return{c(){t=Y("hr"),e=It(),i=Y("table"),s=Y("tr"),r=Y("td"),r.innerHTML=`<p class="mainDesc svelte-1tlkntj">Line of Best Fit</p>
|
<p class="subDesc svelte-1tlkntj">Set Data Fields (Comma seperated)</p>`,i=It(),s=Y("td"),r=Y("input"),o=It(),a=Y("br"),l=It(),c=Y("input"),X(e,"class","desc svelte-1tlkntj"),X(r,"type","text"),X(r,"placeholder","Name"),X(c,"type","text"),X(c,"placeholder","1, -2, 11, 5"),Gt(c,"margin-top","3px"),X(s,"class","controlElement svelte-1tlkntj")},m(m,y){Xe(m,t,y),z(t,e),z(t,i),z(t,s),z(s,r),de(r,n[33].dataTitle),z(s,o),z(s,a),z(s,l),z(s,c),de(c,n[33].data),h||(f=[Jt(r,"input",g),Jt(c,"input",p)],h=!0)},p(m,y){n=m,y[0]&1024&&r.value!==n[33].dataTitle&&de(r,n[33].dataTitle),y[0]&1024&&c.value!==n[33].data&&de(c,n[33].data)},d(m){m&&Ie(t),h=!1,hn(f)}}}function w1(n){let t,e,i,s,r,o,a,l,c,h,f,g,p,m,y,S,M,C,F,D,I;return{c(){t=Y("hr"),e=It(),i=Y("table"),s=Y("tr"),r=Y("td"),r.innerHTML=`<p class="mainDesc svelte-1tlkntj">Line of Best Fit</p>
|
||||||
<p class="subDesc svelte-1tlkntj">Create a line of best fit</p>`,o=Y("td"),a=Y("input"),l=It(),c=Y("tr"),h=Y("td"),h.innerHTML=`<p class="mainDesc svelte-1tlkntj">Best Fit Line ID</p>
|
<p class="subDesc svelte-1tlkntj">Create a line of best fit</p>`,o=Y("td"),a=Y("input"),l=It(),c=Y("tr"),h=Y("td"),h.innerHTML=`<p class="mainDesc svelte-1tlkntj">Best Fit Line ID</p>
|
||||||
<p class="subDesc svelte-1tlkntj">The line ID used to create the line of best fit</p>`,f=Y("td"),g=Y("input"),p=Y("br"),m=It(),y=Y("tr"),S=Y("td"),S.innerHTML=`<p class="mainDesc svelte-1tlkntj">Line of Best Fit Title</p>
|
<p class="subDesc svelte-1tlkntj">The line ID used to create the line of best fit</p>`,f=Y("td"),g=Y("input"),p=Y("br"),m=It(),y=Y("tr"),S=Y("td"),S.innerHTML=`<p class="mainDesc svelte-1tlkntj">Line of Best Fit Title</p>
|
||||||
@@ -77,9 +77,9 @@ fill: ${h}
|
|||||||
beginAtZero: ${g}
|
beginAtZero: ${g}
|
||||||
bestFit: ${p}
|
bestFit: ${p}
|
||||||
bestFitTitle: ${m}
|
bestFitTitle: ${m}
|
||||||
bestFitNumber: ${y}`)}if(n.$$.dirty[0]&34816){t:if(F)try{D(C,F)}catch(ot){cn(ot,F)}}},[o,l,c,h,f,g,p,m,y,S,M,F,I,i,s,C,$,N,G,U,it,lt,rt,Pt,zt,et,Et,St,re,ye]}var fd=class extends Is{constructor(t){super();go(this,t,S1,k1,ro,{editor:13,renderer:14},x1,[-1,-1])}},dd=fd;var bo=class extends pd.Modal{constructor(t,e,i,s){super(t);this.settings=i,this.view=e,this.renderer=s}onOpen(){let{contentEl:t,view:e,settings:i,renderer:s}=this;t.empty(),new dd({target:t,props:{editor:e.editor,renderer:s}}).$on("close",()=>this.close())}onClose(){let{contentEl:t}=this;t.empty()}};var gd=ze(require("obsidian")),md={chart:'<svg xmlns="http://www.w3.org/2000/svg" fill-opacity="0.0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-pie-chart"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>'},bd=()=>{Object.keys(md).forEach(n=>{(0,gd.addIcon)(n,md[n])})};var Ol=class extends $e.Plugin{constructor(){super(...arguments);this.postprocessor=async(t,e,i)=>{let s;try{s=await(0,$e.parseYaml)(t.replace(/ /g," "))}catch(a){cn(a,e);return}if(!s.id&&(!s||!s.type||!s.labels||!s.series)){cn("Missing type, labels or series",e);return}if(s.bestFit===!0&&s.type==="line"){if(s.bestFitNumber!=null)var r=s.series[Number(s.bestFitNumber)].data;else var r=s.series[0].data;let a=s.labels,l=0,c=0,h=0,f=0;for(let y=0;y<r.length;++y)l=l+r[y],c=c+a[y],h=h+r[y]*r[y],f=f+r[y]*a[y];let g=(r.length*f-c*l)/(r.length*h-l*l),p=(c-g*l)/r.length,m=[];for(let y=0;y<a.length;++y)m.push((a[y]-p)/g);if(s.bestFitTitle!=null&&s.bestFitTitle!="undefined")var o=String(s.bestFitTitle);else var o="Line of Best Fit";s.series.push({title:o,data:m})}await this.renderer.renderFromYaml(s,e,i)}}async loadSettings(){this.settings=Object.assign({},eo,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async onload(){console.log("loading plugin: Obsidian Charts"),await this.loadSettings(),bd(),this.renderer=new to(this),window.renderChart=this.renderer.renderRaw,this.addSettingTab(new xl(this.app,this)),this.addCommand({id:"creation-helper",name:"Insert new Chart",checkCallback:t=>{let e=this.app.workspace.activeLeaf;return e.view instanceof $e.MarkdownView?(t||new bo(this.app,e.view,this.settings,this.renderer).open(),!0):!1}}),this.addCommand({id:"chart-from-table-column",name:"Create Chart from Table (Column oriented Layout)",editorCheckCallback:(t,e,i)=>{let s=e.getSelection();return i instanceof $e.MarkdownView&&s.split(`
|
bestFitNumber: ${y}`)}if(n.$$.dirty[0]&34816){t:if(F)try{D(C,F)}catch(ot){cn(ot,F)}}},[o,l,c,h,f,g,p,m,y,S,M,F,I,i,s,C,$,N,G,U,it,lt,rt,Pt,zt,et,Et,St,re,ye]}var fd=class extends Is{constructor(t){super();go(this,t,S1,k1,ro,{editor:13,renderer:14},x1,[-1,-1])}},dd=fd;var bo=class extends pd.Modal{constructor(t,e,i,s){super(t);this.settings=i,this.view=e,this.renderer=s}onOpen(){let{contentEl:t,view:e,settings:i,renderer:s}=this;t.empty(),new dd({target:t,props:{editor:e.editor,renderer:s}}).$on("close",()=>this.close())}onClose(){let{contentEl:t}=this;t.empty()}};var gd=ze(require("obsidian")),md={chart:'<svg xmlns="http://www.w3.org/2000/svg" fill-opacity="0.0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-pie-chart"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>'},bd=()=>{Object.keys(md).forEach(n=>{(0,gd.addIcon)(n,md[n])})};var Ol=class extends $e.Plugin{constructor(){super(...arguments);this.postprocessor=async(t,e,i)=>{let s;try{s=await(0,$e.parseYaml)(t.replace(/ /g," "))}catch(a){cn(a,e);return}if(!s.id&&(!s||!s.type||!s.labels||!s.series)){cn("Missing type, labels or series",e);return}if(s.bestFit===!0&&s.type==="line"){if(s.bestFitNumber!=null)var r=s.series[Number(s.bestFitNumber)].data;else var r=s.series[0].data;let a=s.labels,l=0,c=0,h=0,f=0;for(let y=0;y<r.length;++y)l=l+r[y],c=c+a[y],h=h+r[y]*r[y],f=f+r[y]*a[y];let g=(r.length*f-c*l)/(r.length*h-l*l),p=(c-g*l)/r.length,m=[];for(let y=0;y<a.length;++y)m.push((a[y]-p)/g);if(s.bestFitTitle!=null&&s.bestFitTitle!="undefined")var o=String(s.bestFitTitle);else var o="Line of Best Fit";s.series.push({title:o,data:m})}await this.renderer.renderFromYaml(s,e,i)}}async loadSettings(){this.settings=Object.assign({},eo,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async onload(){console.log("loading plugin: Charts"),await this.loadSettings(),bd(),this.renderer=new to(this),window.renderChart=this.renderer.renderRaw,this.addSettingTab(new xl(this.app,this)),this.addCommand({id:"creation-helper",name:"Insert new Chart",checkCallback:t=>{let e=this.app.workspace.activeLeaf;return e.view instanceof $e.MarkdownView?(t||new bo(this.app,e.view,this.settings,this.renderer).open(),!0):!1}}),this.addCommand({id:"chart-from-table-column",name:"Create Chart from Table (Column oriented Layout)",editorCheckCallback:(t,e,i)=>{let s=e.getSelection();return i instanceof $e.MarkdownView&&s.split(`
|
||||||
`).length>=3&&s.split("|").length>=2?(t||Ka(e,"columns"),!0):!1}}),this.addCommand({id:"chart-from-table-row",name:"Create Chart from Table (Row oriented Layout)",editorCheckCallback:(t,e,i)=>i instanceof $e.MarkdownView&&e.getSelection().split(`
|
`).length>=3&&s.split("|").length>=2?(t||Ka(e,"columns"),!0):!1}}),this.addCommand({id:"chart-from-table-row",name:"Create Chart from Table (Row oriented Layout)",editorCheckCallback:(t,e,i)=>i instanceof $e.MarkdownView&&e.getSelection().split(`
|
||||||
`).length>=3&&e.getSelection().split("|").length>=2?(t||Ka(e,"rows"),!0):!1}),this.addCommand({id:"chart-to-svg",name:"Create Image from Chart",editorCheckCallback:(t,e,i)=>i instanceof $e.MarkdownView&&e.getSelection().startsWith("```chart")&&e.getSelection().endsWith("```")?(t||(new $e.Notice("Rendering Chart..."),Ju(e,this.app,this.renderer,i.file,this.settings)),!0):!1}),this.registerMarkdownCodeBlockProcessor("chart",this.postprocessor),this.registerMarkdownCodeBlockProcessor("advanced-chart",async(t,e)=>this.renderer.renderRaw(await JSON.parse(t),e)),this.registerEvent(this.app.workspace.on("editor-menu",(t,e,i)=>{i&&this.settings.contextMenu&&t.addItem(s=>{s.setTitle("Insert Chart").setIcon("chart").onClick(r=>{new bo(this.app,i,this.settings,this.renderer).open()})})}))}onunload(){console.log("unloading plugin: Obsidian Charts")}};
|
`).length>=3&&e.getSelection().split("|").length>=2?(t||Ka(e,"rows"),!0):!1}),this.addCommand({id:"chart-to-svg",name:"Create Image from Chart",editorCheckCallback:(t,e,i)=>i instanceof $e.MarkdownView&&e.getSelection().startsWith("```chart")&&e.getSelection().endsWith("```")?(t||(new $e.Notice("Rendering Chart..."),Ju(e,this.app,this.renderer,i.file,this.settings)),!0):!1}),this.registerMarkdownCodeBlockProcessor("chart",this.postprocessor),this.registerMarkdownCodeBlockProcessor("advanced-chart",async(t,e)=>this.renderer.renderRaw(await JSON.parse(t),e)),this.registerEvent(this.app.workspace.on("editor-menu",(t,e,i)=>{i&&this.settings.contextMenu&&t.addItem(s=>{s.setTitle("Insert Chart").setIcon("chart").onClick(r=>{new bo(this.app,i,this.settings,this.renderer).open()})})}))}onunload(){console.log("unloading plugin: Charts")}};
|
||||||
/*
|
/*
|
||||||
* @license
|
* @license
|
||||||
*
|
*
|
||||||
@@ -211,3 +211,5 @@ bestFitNumber: ${y}`)}if(n.$$.dirty[0]&34816){t:if(F)try{D(C,F)}catch(ot){cn(ot,
|
|||||||
*
|
*
|
||||||
* @preserve
|
* @preserve
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* nosourcemap */
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-charts",
|
"id": "obsidian-charts",
|
||||||
"name": "Obsidian Charts",
|
"name": "Charts",
|
||||||
"version": "3.8.2",
|
"version": "3.9.0",
|
||||||
"minAppVersion": "0.12.7",
|
"minAppVersion": "0.12.7",
|
||||||
"description": "This Plugin lets you create Charts within Obsidian",
|
"description": "This Plugin lets you create Charts within Obsidian",
|
||||||
"author": "phibr0",
|
"author": "phibr0",
|
||||||
|
|||||||
+77
-4
@@ -1,11 +1,19 @@
|
|||||||
{
|
{
|
||||||
"folder": "Excalidraw",
|
"folder": "Excalidraw",
|
||||||
|
"cropFolder": "",
|
||||||
|
"annotateFolder": "",
|
||||||
"embedUseExcalidrawFolder": false,
|
"embedUseExcalidrawFolder": false,
|
||||||
"templateFilePath": "Excalidraw/Template.excalidraw",
|
"templateFilePath": "Excalidraw/Template.excalidraw",
|
||||||
"scriptFolderPath": "Excalidraw/Scripts",
|
"scriptFolderPath": "Excalidraw/Scripts",
|
||||||
"compress": false,
|
"fontAssetsPath": "Excalidraw/CJK Fonts",
|
||||||
|
"loadChineseFonts": false,
|
||||||
|
"loadJapaneseFonts": false,
|
||||||
|
"loadKoreanFonts": false,
|
||||||
|
"compress": true,
|
||||||
|
"decompressForMDView": false,
|
||||||
|
"onceOffCompressFlagReset": true,
|
||||||
|
"onceOffGPTVersionReset": true,
|
||||||
"autosave": true,
|
"autosave": true,
|
||||||
"autosaveInterval": 15000,
|
|
||||||
"autosaveIntervalDesktop": 15000,
|
"autosaveIntervalDesktop": 15000,
|
||||||
"autosaveIntervalMobile": 10000,
|
"autosaveIntervalMobile": 10000,
|
||||||
"drawingFilenamePrefix": "Drawing ",
|
"drawingFilenamePrefix": "Drawing ",
|
||||||
@@ -13,12 +21,19 @@
|
|||||||
"drawingFilnameEmbedPostfix": " ",
|
"drawingFilnameEmbedPostfix": " ",
|
||||||
"drawingFilenameDateTime": "YYYY-MM-DD HH.mm.ss",
|
"drawingFilenameDateTime": "YYYY-MM-DD HH.mm.ss",
|
||||||
"useExcalidrawExtension": true,
|
"useExcalidrawExtension": true,
|
||||||
|
"cropPrefix": "cropped_",
|
||||||
|
"annotatePrefix": "annotated_",
|
||||||
|
"annotatePreserveSize": false,
|
||||||
"displaySVGInPreview": true,
|
"displaySVGInPreview": true,
|
||||||
"previewImageType": "SVGIMG",
|
"previewImageType": "SVGIMG",
|
||||||
|
"renderingConcurrency": 3,
|
||||||
"allowImageCache": true,
|
"allowImageCache": true,
|
||||||
|
"allowImageCacheInScene": true,
|
||||||
"displayExportedImageIfAvailable": false,
|
"displayExportedImageIfAvailable": false,
|
||||||
"previewMatchObsidianTheme": false,
|
"previewMatchObsidianTheme": false,
|
||||||
"width": "400",
|
"width": "400",
|
||||||
|
"height": "",
|
||||||
|
"overrideObsidianFontSize": false,
|
||||||
"dynamicStyling": "colorful",
|
"dynamicStyling": "colorful",
|
||||||
"isLeftHanded": false,
|
"isLeftHanded": false,
|
||||||
"iframeMatchExcalidrawTheme": true,
|
"iframeMatchExcalidrawTheme": true,
|
||||||
@@ -27,6 +42,12 @@
|
|||||||
"matchThemeTrigger": false,
|
"matchThemeTrigger": false,
|
||||||
"defaultMode": "normal",
|
"defaultMode": "normal",
|
||||||
"defaultPenMode": "never",
|
"defaultPenMode": "never",
|
||||||
|
"penModeDoubleTapEraser": true,
|
||||||
|
"penModeSingleFingerPanning": true,
|
||||||
|
"penModeCrosshairVisible": true,
|
||||||
|
"renderImageInMarkdownReadingMode": false,
|
||||||
|
"renderImageInHoverPreviewForMDNotes": false,
|
||||||
|
"renderImageInMarkdownToPDF": false,
|
||||||
"allowPinchZoom": false,
|
"allowPinchZoom": false,
|
||||||
"allowWheelZoom": false,
|
"allowWheelZoom": false,
|
||||||
"zoomToFitOnOpen": true,
|
"zoomToFitOnOpen": true,
|
||||||
@@ -40,6 +61,8 @@
|
|||||||
"hoverPreviewWithoutCTRL": false,
|
"hoverPreviewWithoutCTRL": false,
|
||||||
"linkOpacity": 1,
|
"linkOpacity": 1,
|
||||||
"openInAdjacentPane": false,
|
"openInAdjacentPane": false,
|
||||||
|
"showSecondOrderLinks": true,
|
||||||
|
"focusOnFileTab": true,
|
||||||
"openInMainWorkspace": true,
|
"openInMainWorkspace": true,
|
||||||
"showLinkBrackets": true,
|
"showLinkBrackets": true,
|
||||||
"allowCtrlClick": true,
|
"allowCtrlClick": true,
|
||||||
@@ -52,6 +75,7 @@
|
|||||||
"exportWithTheme": true,
|
"exportWithTheme": true,
|
||||||
"exportWithBackground": true,
|
"exportWithBackground": true,
|
||||||
"exportPaddingSVG": 10,
|
"exportPaddingSVG": 10,
|
||||||
|
"exportEmbedScene": false,
|
||||||
"keepInSync": false,
|
"keepInSync": false,
|
||||||
"autoexportSVG": false,
|
"autoexportSVG": false,
|
||||||
"autoexportPNG": false,
|
"autoexportPNG": false,
|
||||||
@@ -64,8 +88,12 @@
|
|||||||
"experimentalFileType": false,
|
"experimentalFileType": false,
|
||||||
"experimentalFileTag": "✏️",
|
"experimentalFileTag": "✏️",
|
||||||
"experimentalLivePreview": true,
|
"experimentalLivePreview": true,
|
||||||
|
"fadeOutExcalidrawMarkup": false,
|
||||||
|
"loadPropertySuggestions": true,
|
||||||
"experimentalEnableFourthFont": false,
|
"experimentalEnableFourthFont": false,
|
||||||
"experimantalFourthFont": "Virgil",
|
"experimantalFourthFont": "Virgil",
|
||||||
|
"addDummyTextElement": false,
|
||||||
|
"zoteroCompatibility": false,
|
||||||
"fieldSuggester": true,
|
"fieldSuggester": true,
|
||||||
"compatibilityMode": false,
|
"compatibilityMode": false,
|
||||||
"drawingOpenCount": 0,
|
"drawingOpenCount": 0,
|
||||||
@@ -85,10 +113,11 @@
|
|||||||
"mdCSS": "",
|
"mdCSS": "",
|
||||||
"scriptEngineSettings": {},
|
"scriptEngineSettings": {},
|
||||||
"defaultTrayMode": false,
|
"defaultTrayMode": false,
|
||||||
"previousRelease": "2.0.13",
|
"previousRelease": "2.8.1",
|
||||||
"showReleaseNotes": true,
|
"showReleaseNotes": true,
|
||||||
"showNewVersionNotification": true,
|
"showNewVersionNotification": true,
|
||||||
"latexBoilerplate": "\\color{blue}",
|
"latexBoilerplate": "\\color{blue}",
|
||||||
|
"latexPreambleLocation": "preamble.sty",
|
||||||
"taskboneEnabled": false,
|
"taskboneEnabled": false,
|
||||||
"taskboneAPIkey": "",
|
"taskboneAPIkey": "",
|
||||||
"pinnedScripts": [],
|
"pinnedScripts": [],
|
||||||
@@ -407,6 +436,7 @@
|
|||||||
"numberOfCustomPens": 0,
|
"numberOfCustomPens": 0,
|
||||||
"pdfScale": 4,
|
"pdfScale": 4,
|
||||||
"pdfBorderBox": true,
|
"pdfBorderBox": true,
|
||||||
|
"pdfFrame": false,
|
||||||
"pdfGapSize": 20,
|
"pdfGapSize": 20,
|
||||||
"pdfGroupPages": false,
|
"pdfGroupPages": false,
|
||||||
"pdfLockAfterImport": true,
|
"pdfLockAfterImport": true,
|
||||||
@@ -414,6 +444,11 @@
|
|||||||
"pdfNumRows": 1,
|
"pdfNumRows": 1,
|
||||||
"pdfDirection": "right",
|
"pdfDirection": "right",
|
||||||
"pdfImportScale": 0.3,
|
"pdfImportScale": 0.3,
|
||||||
|
"gridSettings": {
|
||||||
|
"DYNAMIC_COLOR": true,
|
||||||
|
"COLOR": "#000000",
|
||||||
|
"OPACITY": 50
|
||||||
|
},
|
||||||
"laserSettings": {
|
"laserSettings": {
|
||||||
"DECAY_LENGTH": 50,
|
"DECAY_LENGTH": 50,
|
||||||
"DECAY_TIME": 1000,
|
"DECAY_TIME": 1000,
|
||||||
@@ -430,11 +465,12 @@
|
|||||||
"borderOpacity": 0,
|
"borderOpacity": 0,
|
||||||
"filenameVisible": false
|
"filenameVisible": false
|
||||||
},
|
},
|
||||||
|
"markdownNodeOneClickEditing": false,
|
||||||
"canvasImmersiveEmbed": true,
|
"canvasImmersiveEmbed": true,
|
||||||
"startupScriptPath": "",
|
"startupScriptPath": "",
|
||||||
"openAIAPIToken": "",
|
"openAIAPIToken": "",
|
||||||
"openAIDefaultTextModel": "gpt-3.5-turbo-1106",
|
"openAIDefaultTextModel": "gpt-3.5-turbo-1106",
|
||||||
"openAIDefaultVisionModel": "gpt-4-vision-preview",
|
"openAIDefaultVisionModel": "gpt-4o",
|
||||||
"openAIDefaultImageGenerationModel": "dall-e-3",
|
"openAIDefaultImageGenerationModel": "dall-e-3",
|
||||||
"openAIURL": "https://api.openai.com/v1/chat/completions",
|
"openAIURL": "https://api.openai.com/v1/chat/completions",
|
||||||
"openAIImageGenerationURL": "https://api.openai.com/v1/images/generations",
|
"openAIImageGenerationURL": "https://api.openai.com/v1/images/generations",
|
||||||
@@ -725,5 +761,42 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"slidingPanesSupport": false,
|
"slidingPanesSupport": false,
|
||||||
|
"areaZoomLimit": 1,
|
||||||
|
"longPressDesktop": 500,
|
||||||
|
"longPressMobile": 500,
|
||||||
|
"doubleClickLinkOpenViewMode": true,
|
||||||
|
"isDebugMode": false,
|
||||||
|
"rank": "Bronze",
|
||||||
|
"modifierKeyOverrides": [
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
"Mod"
|
||||||
|
],
|
||||||
|
"key": "Enter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
"Mod"
|
||||||
|
],
|
||||||
|
"key": "k"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
"Mod"
|
||||||
|
],
|
||||||
|
"key": "G"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"showSplashscreen": true,
|
||||||
|
"pdfSettings": {
|
||||||
|
"pageSize": "A4",
|
||||||
|
"pageOrientation": "portrait",
|
||||||
|
"fitToPage": 1,
|
||||||
|
"paperColor": "white",
|
||||||
|
"customPaperColor": "#ffffff",
|
||||||
|
"alignment": "center",
|
||||||
|
"margin": "normal"
|
||||||
|
},
|
||||||
|
"autosaveInterval": 15000,
|
||||||
"mathjaxSourceURL": "https://cdn.jsdelivr.net/npm/mathjax@3.2.1/es5/tex-svg.js"
|
"mathjaxSourceURL": "https://cdn.jsdelivr.net/npm/mathjax@3.2.1/es5/tex-svg.js"
|
||||||
}
|
}
|
||||||
+10
-96
@@ -1,96 +1,10 @@
|
|||||||
"use strict";var obsidian_module=require("obsidian");var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return"";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(r){return null==r?"":""==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return null==r?"":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return"";var e,t,i,s={},u={},a="",p="",c="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString});const EXCALIDRAW_PACKAGES = "PQKhCgAIUgBAbAlgYwKYDsDOrICVUCGyALlDAE6EkB0ADuQPYAmAriYg+tQLaJcBWmMmUgBhBrQCe5RAHMAFsUgAKZAEpIAMSKoARgwLine truncated
|
"use strict";var obsidian_module=require("obsidian"),state=require("@codemirror/state"),view=require("@codemirror/view");const INITIAL_TIMESTAMP=Date.now();var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return"";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(r){return null==r?"":""==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return null==r?"":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return"";var e,t,i,s={},u={},a="",p="",c="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString});
|
||||||
/*!
|
let REACT_PACKAGES = `!function(){var e,t;e=this,t=function(e){function M(e){return null!==e&&"object"==typeof e&&"function"==typeof(e=te&&e[te]||e["@@iterator"])?e:null}function t(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)ae.call(t,r)&&!ie.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:g,type:e,key:u,ref:a,props:o,_owner:w.current}}function D(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===g}function U(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}function f(e,t){return"object"==typeof e&&null!==e&&null!=e.key?U(""+e.key):t.toString(36)}function s(e,t,n,r,o){var u=!1;if(null===(e="undefined"!==(i=typeof e)&&"boolean"!==i?e:null))u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case g:case H:u=!0}}if(u)return o=o(u=e),e=""===r?"."+f(u,0):r,ue(o)?(n="",s(o,t,n=null!=e?e.replace(le,"$&/")+"/":n,"",function(e){return e})):null!=o&&(c(o)&&(o=D(o,n+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(le,"$&/")+"/")+e)),t.push(o)),1;if(u=0,r=""===r?".":r+":",ue(e))for(var a=0;a<e.length;a++){var i,l=r+f(i=e[a],a);u+=s(i,t,n,l,o)}else if("function"==typeof(l=M(e)))for(e=l.call(e),a=0;!(i=e.next()).done;)u+=s(i=i.value,t,n,l=r+f(i,a++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function u(e,t,n){var r;return null==e||(r=0,s(e,e=[],"","",function(e){return t.call(n,e,r++)})),e}function V(t){var e;if(-1===t._status&&((e=(e=t._result)()).then(function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)},function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)}),-1===t._status)&&(t._status=0,t._result=e),1===t._status)return t._result.default;throw t._result}function a(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,o=e[r];if(!(0<p(o,t)))break;e[r]=t,e[n]=o,n=r}}function i(e){return 0===e.length?null:e[0]}function l(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,o=e.length,u=o>>>1;r<u;){var a=2*(r+1)-1,i=e[a],l=a+1,c=e[l];if(p(i,n)<0)r=l<o&&p(c,i)<0?(e[r]=c,e[l]=n,l):(e[r]=i,e[a]=n,a);else{if(!(l<o&&p(c,n)<0))break;e[r]=c,e[l]=n,r=l}}}return t}function p(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function y(e){for(var t=i(E);null!==t;){if(null===t.callback)l(E);else{if(!(t.startTime<=e))break;l(E),t.sortIndex=t.expirationTime,a(C,t)}t=i(E)}}function d(e){var t;j=!1,y(e),I||(null!==i(C)?(I=!0,m(b)):null!==(t=i(E))&&_(d,t.startTime-e))}function b(e,t){I=!1,j&&(j=!1,se(L),L=-1),$=!0;var n=P;try{for(y(t),R=i(C);null!==R&&(!(R.expirationTime>t)||e&&!q());){var r,o=R.callback;"function"==typeof o?(R.callback=null,P=R.priorityLevel,r=o(R.expirationTime<=t),t=v(),"function"==typeof r?R.callback=r:R===i(C)&&l(C),y(t)):l(C),R=i(C)}var u,a=null!==R||(null!==(u=i(E))&&_(d,u.startTime-t),!1);return a}finally{R=null,P=n,$=!1}}function q(){return!(v()-de<ye)}function m(e){O=e,T||(T=!0,be())}function _(e,t){L=fe(function(){e(v())},t)}function A(e){throw Error("act(...) is not supported in production builds of React.")}var N,h,B,v,z,g=Symbol.for("react.element"),H=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),K=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Z=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),te=Symbol.iterator,ne={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},re=Object.assign,oe={},k=(t.prototype.isReactComponent={},t.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},t.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},n.prototype=t.prototype,r.prototype=new n),ue=(k.constructor=r,re(k,t.prototype),k.isPureReactComponent=!0,Array.isArray),ae=Object.prototype.hasOwnProperty,w={current:null},ie={key:!0,ref:!0,__self:!0,__source:!0},le=/\\/+/g,S={current:null},x={transition:null},C=(v="object"==typeof performance&&"function"==typeof p
Line truncated
|
||||||
*************************************************************************
|
const unpackExcalidraw = () => LZString.decompressFromBase64("BTCCBoFMEoF4D4DeAiA9gIwFaQMYBdlZY8BPAB0lQDMACSADzNQCc8BnAMg7S1wKNIVqNALaoAJgFcANpAD8YqbIB0DJqzaxIwZpACOkgJa7gyXQEN8yaOF0Hj2s5Et4AtONQjr0AFzIqkgB2+IaogYTE5JS04pBUhoGQXLHxicrmIuJyKQnaANpOLsjghfjunsgAulC+PNhWAlHCaizsci0aygCi9Djm0obizOYA7gAyhuhaOvpGJqUENnZzjhZlHl7QvqDdvf2Dw+OT0zsASs744GcXeAAiAPIAstAAvtDAbJDSVODAkOB4OBIABu5mYNHMtnAhlgiAA7AAmABsAFYAJw+MA1BCISDKABysGBqEGNAADABuUHgvCwAD0AD1gHkGQAdEaVABU70w5lBbBwzEMZDwAB9xOY8OZRcD0AKhSLoHTDCJofSOABiYDsgDU7zZI1FFOgcjpAHNwIF1cBEiMBolRVL0NAKebDOBzPS8qzJGS/WTXD6/QBGABiQbJcNDgd9ZLR4ckCP9MaTZNuPtDXVDocqbtVzHpDOUOuAPlFHBwqGkYWNefAqFgBWUxWQdKqFLxhICwTwoUCYGgiGpdCusDAotFyGsyl0ZGklm07u7ITCWJgiF0eEkzECNAAynghYEzcoqMxPABhAAWYIvEm0MDeM8gc4XNpK09n85w2khU+gyiHiqwAupu26BAAhKAE5/LAEAQcArjBgAPKgygJLE9D3FQfx5GSlRbFwsE7CIko4FeOiERwsGQHh1R4IBkBsHgfxbCayDmOgqCSHgPjoPOgQANbID4oAvC84CIiiiKYhAMA4niADSRIkuI5JQMoynLr2q5yYOsGwcSpJkkQWhyIgAzMQAqoEhiVrE15gn4yAvD4MATogT6WXgNl2fejkFhBEF4jebD3CMgQAArnhQrAkKY3m+fZkABdYXB4oltnJQFGnMQqEzMWMzixMwmjBcooXhVFMWQHFph5cKBV4EV5glWw1gTniDVkE1LVtRpZpUCIsDlZVEXRagsWkKYg2bJ1yizRpkifAAkiIZqgNIeAACoMLSo3mGF401XVyDLZAa0bVtu30Is83nZdm07XtGlkLonzMMCkATEJZUHUd1WTbV03IG9TG1V9P2Ce10DpcoYMfZDCTQ1SYI0LSwC0tBk6fi+37aIyiGsmwnJyKKrKcsTpOigA+lTciDgAzOALxUwAJOaqr/hSh4kLiyjdb1xW1Zw1G0hlhjWVl/k3swcgMV+b6E96bCsngXLvN6lOBjqlTk+IOqsso0DEzqnMaZlfkObLOrIDQbPBtYPgK3jStMirasa8yFOsjreusgbRsm2wZtmlzDveANQ1EbSLuvj+wB0qyVqIAiLPmiUye4/HBMAH6IIzLzKJTgQZ/+z454nue52X2f44nAAGBdFyXtdbACY7i/D70Q99yNsPLFf10neTAMXDOspU3resAlRj6T0DepUrLQLmFrIA7NDAGzCLQE7gJD0ryEsvAXLwG3h8J4yeSwL7lSpyz7MX4rV+st6RY6nIk/aj4NDj2zJpn6u1fmwRAZJwAIlZnkcek9f7/yAZXJOEE37zwnlPN+rJZ7jyXivNeS1VrrSejdPAcgN6O2cgBF+BMUHjxNugmelRsGT1wWXCOlDgEEzZKA8Bhd4DE1NOvOuStgAMnJoEYOYDwC8P4WXZOWd2GIK4YgYMECoGoLob/bUe49TABoMgce1gv4kw5oIhRw8mTJxNMTSRLwNTKPAEiVmIdRQ0BsdqcRRibF2PAS8VxPj3FWO4SzEx4dgw7zZozIRV9vachpvfFRhd3isj3DAvckjgxvFZMGVhCIokExiXE+xiStGpPSZk7J68d55MTsAJuzM3jqKyebDeuSzFKwbmPT+0AG6sMdm01+gQH4vFkYEeRLw+h4HIqxDckAtw7hoJWQIbAqx4lqueZgrErgvDAvMvA4kHEIjhHCWSUAARAkQNpPsNB+ygEHMOf4eA1RTgpIYHCyAGrHgiIIaINBsbIECJIEQ6BapfKaLQW5hgdRwQ7NIT4NBXmmAwPUfgkQhDgugAi0AzBhgkHQmwLFOKBzQCoCwWClJIDIR2LIY8eArwdh1HqUAeRICVBjrAG5zKCKw2ooYIikLYB22sNCKFgIYVwpJRsyA8Ldy3KZSyvlfKoWCpsPymAFIdm7kMC8S5YR4UgQuaS4cclYDgNpM8ilYIzSAsgIEdgyhqVmlpcaMAsBLXWttWwZlDKCJEVAOyolMcY5Kr0TYPAULbnqtmeBdGLwGLiD+OARAAAtTEQItWvHAAADhRJGRmPgdU3NOYCIcaMYQFsxoODV1zGzlr0ogHYHR2DEAkrWotdzS2WmIMAMkAFQy3DGOYEg3E8B3iWVKD1FIC0Qn1dq0lhhpXXOgOYPIhhKjspXZUCk5hlC3CzKAKyYxto0ysnuLoNNHgHu2itGmYwugADUuhjBpnuC8oAxgrXxAAcRGio7du7Qz7sPTTU4oBbgrTfc+rokVQAgavfcQkgQd17svTTLotxP1ntvV+7aAAJD0SGAMoYvE8SK8Guj4iPaeyKXRYMrXg7AJE4Dt1XtvSNJjygWMfs/TTaDtwwNfppg+04V7X1jFgMGdjnGBO8f49xnD9xTgrSTfB7ab7xOSdOF0M9mnbhWQvHB/ENN4M0w/ReTTjxyOqbExBFRDbGCtE0OYFtQQVyFoee28E7orQsR7coPtA6h08S6OIM0kBJ0uZ0rucwa4zmIEQ30aQ0hMZXkllcNts6NnzoSBCbuqA8B5aiLAe4vB8DKEFM4PA2hENvTywVigNhxHLtXeu1dFI7PqCbU58Arb3Mls852nzAExifuGGQOlU7otyVi/F/oSXaWpam4CDLwAstRdy/l75RWSsMXK5KKr626swEtEujdLXN3tYc665zPY+wxeLcOLzXbfPDdG1eR45hAjmFC8wcLN3dWTcHDNxLyWFuvAlSthd26asbcK8V5FZWLCVZtAd75DWTvNcCButrqh7MaCu91iLt3FsefhQN7tvb+2DuHfie8HonsARWu9p1U6NmLehIDsrs2QdsDSw89ny3Vs0GYCj2H22EcVf29Dw7aPmCncx614XUvvnKDEF9WA5aSd+vm2wBar33ufe+wtWZAXh0gR5ilnX4hJY5xEDavAAANOCZXUBVgSGaUMLgWCcm5wLN6bvQwsB/PbnU2uK4yDYH2APzAg8h4t7rvkhgpSRaj0HpUofAioGwteQw0ghg2oBHHq3bAbd24AJpO8rK748Hv8Be598Xo87vA+QFL7HyWYfYWR+b630PZphjAkT5KLv0eW9p7jxnrPKXc+6ECOAJnV50hyh90Xkvtr7fQHgDsSv9p3ee+YJyEi5h6A09iLca3+Nbe2pjoX8/C5L8O4ry7nfNf8v78P8f+8Z/i8X7t5ybdEezR+xQ8V8f8192559F82Bl9b8fx79S8N8t8n9/c98D8Vcj8T9IAv9V88Br928QC78y9H8q9d9a8380CP9T8YDIB78/8BZDBADoDv8CDbV4CGsZBpABA49yIc9xAJwTJiAuCp9xAjc8AMCoCAIHVaV5Y49VdIAAAheKYAqg+/e3AvPA5QsvXwUPGrJgM0PbLA0AnaVAbPafG1Rg7A1QpQpg2AzQq4QCPLfoAw5gsNWACAziKAqwiw6AHUNwpfTwww+AtQnXBvf3ZvR3U1OPEI6vbvE1IIjvCPMIFPSAcIuI2ccPYfH8cvCI9vPvBPJPDI5I2I3vfvQfZPGI7Iy3DQtfIom/aw6gwgskCSRXc8GHCgXLXQ/QqoowkwvPK0HrQccHYcR5GEXvWZHokCEQsQkCTtSkQIZCQwe1G1R1OlQIBlaAAFRLIgTGWAQwPIQIAiEQ8Yk0TGFXVAL6BQtcUNZQfAmwtfcNAEa4ro1vLQLQ9o1APQyrJw247ooQmfS4pokXNoz4PAaKSAcQYMdXQnXSQcbQ3QcEuCAEpXKIEQ0E+EjXGZOZXcMGcExElow7FEuEhESEv7fsStKNeZbEyBWwQErqWZfEPaYk1zAcRAdPBksSakpEto0LUQhk9EqtRIW6XE2rZXYEiaH8NgT4cQRkyLZk2E1AcUyUhEjkvE5XSWMUpiRUvk8krE88BUsEiSC7PHZga7Jk4nPrUnbzcnPzSnQLR5T0FiAAFiWC7UZhsA4JYhRBsAbBYl3nABwC7WDBsDkPp2tJNx4lHWYg+3YHAAvBDLDJHTCEjI9XABWhDMihJFtXACvDTIzLuHAAAEU4yqceJwApTBtlAVpbVIBvtwBJAQyVpP1KBbdeZwBNByyXtzAxtwAzQQztphglkJURBftXMaAuh9Ugc5sLdQ0498s5DIBtoc8wTYRxJwdBcugaStt4ddskdqsVSog0cug5csd1zOS8RbQRtOy3sPsvtappTbtNd2VIARhp1tdQJtT0Y49cixt9cbyCx2STy9y2jzzXs7zoSMTo1bQhcbR2C4ivyryDdaorgM0ALhTkTbQMDQKbkyTMTrknyaBJyci9dryazbkJIULWizynzgtQtMLmT+S8LUBoLEtLQYLSLwByL8SEhE9IowQMhZkRZaKOdTz0JbIQTeLmyRZOdgdtcPRmArV782Bpz29JY9xJB0B4yYIcACNAMj00MMMb1yNP1cNkIJNpDlLYh+hqLvoljaV1NnY49BhnBpArKioaVsytL/0dLUN0NMNDLcM4jzo9xSJWAVoLLnKQtrK3KLx+gcAZAh8whYAPLkMgMT0z09xHgYMj0Vpd0IM9LfLsMcMaZRMLwD1QADM4ioizQIzx1aQ5DtKUM9xIpFMBM9xtpNMCrUiXx0iwhqqozYA6rPKUNNNIoD09w6NDNWr2qjK8Nii8iSBerbV+r6qgNP0QM70VptpS9n02q/KZquDPAmAghxALyB9SAFrarlqj1iNHhSMrJ8RbgaZVrQB1rNrtqpr/LZrTqLine truncated
|
||||||
*
|
let {react, reactDOM } = new Function(`${REACT_PACKAGES}; return {react: React, reactDOM: ReactDOM};`)();
|
||||||
* mhchemParser.ts
|
let excalidrawLib = {};
|
||||||
* 4.2.1
|
const loadMathjaxToSVG = () => new Function(`${LZString.decompressFromBase64("G4QwTgBAsiAuAWArEAPAKgewMoDUDiAvAGYCuAdgMawCWGZAFLAJQDeARCQM4CmEnsYalTYBuUJG4EOZACbci1MtxlsAhAVgBPAA7cMRCAHMANhgBGIY2njVOAfhPnL12wC5pchUpXqtu/RAA7ooyGIF2wbJh7uSeispqGjp6Bo4Wxg6m6TGy8vE+Sf4GPMZEdiVEriwAvgA0AIoENbVgTdUiAPJmiNxUAHRxSgAKYBi6YFr0YLVsAPqz3JxQGDIkxtxstSygxiTcrqoADNVMLX04AKIASlgAkh0AcgTAGNQyEIdnlzf3T2wAzH0AEzA0TiCBoNq1MhtTrdXqwAZ5YajcaTMgzeaLZardabbaWPYHY6nMh9Ea0QQ0ABeygAMrZYM9Xu9DmJwBAMMRyFRaAxWKRKDQ6BBYPRWAhbH1qLBuABbTgEADaAF1apLONLZQrlSrqmBuLASGAyKK+tpRrAMH5uEqsJo5WYMMYtdwwHAMGAVdyhXzxQTIEzPpINa6FSIDUaTSwlChYK5Bby6P7I8ayATdvtbbAANQ5tWhJSuWAAPm4fXWZEMCGqtbqiIt1utyT6IBkMh9SYY3AarBebw+BCH9QAZCP6I1EQARC4AMQAggBVOloIZXe7rtAATSY7MgrVDMvlmsr1fgIlCLDAAFpr9VAjZ1lMSwRDmP6gAeQ/azhKr3mwRPRlTRd1TE1RRsTUjwVPpOG0YwhG4KYcwARlqT4WGg1wewtSlgNceoTlqbh6wApsbT6A05QwYBJETYUGGYAMIBDSCwxPbgqwQC8MBYbhb3vR8kO4F83xHb9jyVbgVTDdQNF3ETXzHCSYLghCKGE2oUKYUiZwXZdV3XDpNy3AgAFZ1WqcURDJCkgJpelGQIDA9wgahahAAhuDHcssTjTiZE4AAfIL6GoTsGMYYjWDA01wq6Hp+h4WARnI5IOiIEKWHmRsrXmVxVWqRR+BASgUggecwHdTQx3ov1YGilhERyy0MHmLzqhCurkwa7gBU9ehwXqNzTT6hKETIq0KPgEBOA6QIyFStFND6ChLGMege3qJgx0YJV6m9W0Dp02pqCivq6m6xjGuoIh6DYK7EhtAJvJHMg1mMOS+oQUZAggJQ/rQZILiqga2AAYWMWbOBY/zZBhnY9ggNgcywARFEMTamBzNg3JhshrQgEAIAoOh+DAEgqE9TlIHe4xjDYXcrogep/VDUmyHJymrQPIrztOBtWptAg6eMIcvLscb+goA04GEphXAnSbm10LzlZtaFuD+7aiMVV7fNmRHFi6nlIqY8FJAe02+TYIdnoMe1HWdMdHadF0j3dHmGi85SpLVVo2VuicmFilnVvWxhdyD2AxzYd7HTdW3CnKxFTwQEPDTTGNuDjBNreTGLM/AmORzAF9U84s9dqZftWVODMiRL2A/zzAs6H2VRYDrEQfrCf6tYhYHQbATa7DYKXYDx/7CY9kAzHWPo2HcV3nVdT3qdsafJ8GZRF50uFEsRHelrdSY0ExBYlhWNYNi2I3iSItA+gACVKmR1jABl+GZAc2XBMWrqRxYMzJChcoymlFnJJurZtDwU0IwSCHkwCGBIHKTisBOBMBChqfURdTQgE2uqU45Zcoq3LAaQwjI3QRXqmAtMEEpRthkFFQWeEtAnRIULFs5AKFUNaIApioYqI0SQswOonC0q6D6DNWQ6xOBTgwBQVB6CaE9T7ByLaPcwCaGAQNcErROAINsKcSEYA+ixjFLuVQT9CzcBEKY8xOdLHqNpgQJ+RswwiCDmSGR79FgKKUWgsgYpmAZ3Af9Wsa1YAUHgEAyQfFh7FlrF4daOiBA6LQGOaxAx267UaGY2KO0Rz1HDvTKYOkUn0x0UHb68BfosT6G6UYYBay9z+gDCAINmn3XBqVAA5JPLw7xfEfwgEQamoRAnoMZuI9WLZJnKOCao66fUrx4IgLXQcQ5XqbRFh9AWbERn+MUYskJTBVqy1lPzcRVlbKASpNQWkMgv7MHsS/N+H8XkEGMK5CgsIJ5Ii8NwE+Ex4EUAvtia+eI76Eg7iSWoFBKKGm0fOIgspWiIqOVcZF1BFizk9D/VkCLpEfO4Ni9GeKCUCLoeBDpqU5S2CQvQEBE4WgSm0SwVmzjqhRJiUAxEkZtHKSRekkaJUyoBHpYyuwArkUrQQJxegzL878jWeEpC9Q2UnHOby2JyrfRqLVfQkeYimAK1lSVCYwqDSWsRLYXp9MLAUAANZ2BgAgAAUqgPoDrjBOudX0VF6KlWAJpaNVlYAdICyRbahWJqdLarqIiwVmgg3UOpcxSQHSulg3dfAL1KAIApsZj3OpfdyFyo0MRS6KqgEAuPqiU+8CGpzEvjiG++J75HCIoiOUcAkCoEJR8VykhpiNHPjCCgPc+h9oQMgFATRaJgE4HybC5xrh3EeLUI5y7XAdJKa/WRboXm1AWUE+MgCtphrNLOgdKASVHuXTkqZwTCE623aS8lghKVgD3Q+vxX7cWcHxdMFNabf1kjA2it0HlOCaEoHSDAbY90fVrMHVyJAoTaChEQWEqgM1DR9iOA2RtgpBQIxoqQj07bJACCvYwLsHRuzXh6MdRHm7SRaK+Lxd1tqhxKWtMprzo6x3jmYRONGihmjTvAMJWcLF5wNaq0OJcy4aArJXBA1ch2HHrvfJuLd8ynvbgcLutZS31I6UDXQOaR7cDHhPKeBNJ6z3nuWJebB6MsZ5k5wmO8ZB7zqK0fWfR5iyxkCbJT/NmKNCtkppO9sID0d9l52ePMVQ8foKoPj6zYCuWmBOggAmI7MFqFyVUWidHjJHiIQaLItleRCvxa8EASy6ayVMEWji4zinObYkQTAMDmi4LEsxRsdK6qAZCBJzSknVEqcYNJHKwBZLMbYvJXXCnvlKRtMgFTFCpMwndNATA2kQkacPWsocMB1EhCF+YcFwuVWqpFrs51exHYnCFIE4twAoPPRxLisnquDQ5AV180I1YyfsR+Mg9i8xMFUCtkcaARosRClMDHrRnsgBWqQiinB1LlkExtHsnwTunDAEqNAh1qcqlArl1adAomY6CjjvHXCpGE8QjtrG+963ImBY20FUVW2QtxLfBucKe0VgwBgZ1JBsOIh4NocAcsOjaAYoqZX3B1hUA11r2cow5QAGluCaG17BXXCIDd8kt1wN0tuybqc8CANYsAnec3U8VU+6nSbaE0Op515vLd9uD+z9TOdVeyDnusdTFwUDR5kLHkMfQOhDDQL8LA6mrgXCgB0S46n5xDCGBcB4U5vdzXhFQHTrkYQ1CZ5zAQ3NPQiGZhgIBsU2DmEPgl2jBgS6QLttXRvXMqatCHGQbBo/m/j/FtQHSdqq+H2cuqQNJey8V7YEqfMmxES5/z4X7f14VR77TxnrPTRFA7DeJ79wgRwBkE2GMBitnFNvavZ9h6cBLBJ3U+nzPR4LAaUMgG/GQT3U7MtdpAeWzLGEQDmTgZ0csB/E0e6PNAtVwZGHMC6docEcKUNGoNvFVImTvdZAFaGagQwBgAFGWbgOWMKOZXQAWCpYgwxJiFTSWavREYPC3SORvFnAFQwQ0eaRaYXLQejNgs1AqPUZmDac2DRFoWoabdodJXREecEGEVmSQ04TDMkCxayVQEgHJJQEQXQ7rZxZibDIwo2WoXDQQ4QhaEFLQKcRYGWagTXAaBqbQU4DsIgPoI2EQdnaUTgdnegGQJgOwPwo2AgCgegVUU9WoVQbSVwDvcI3aKI2Fb5MIs1WwxpeON0FPXaNAJUbQb0IgBNSbJieJJpT0ObBbJbHREgLJIw9bccVoSDPBIpMxEnegPbebA7KpT7WpepcsGolpXBcJAXIFJwoDRgGfCmOfIcagOwAhGoBWZoE7ebYg2InsDEEAFxCAEgWobQMQerQ4X7XaTyI4XccEXDQBbaT7EAMcTZc47ZfaFUHyeYlvMAOSBfLvODJ2BmSTcqUcccRoEpK0NGQQKsXrNfAArPPoF/PkWAvpW4UAywAcJEkUNgPpfguAVlPpXGXojACAV3d3DZWFc5PpU4baGYDmGgd6DYDDEWd444ryd4zLVQDvEgLBIKUWcWbQEKbvLgp6fvCAbQWOR6XwMU7woI2wUInkuwTad43UBFZUg6WoI4pIqQ7kiIo6b0DaHk7CFUkgEQXXHgZiXDQxHkwIqqXHYI0I7w3aFCcWPwmTdIpUQ4b0O2dfUvcvLqT070nPPPAvC4IpOUkIu0+BEgJUIgQM+nb7V0jTIHWqWCT0SxPoRAV4BgTYRmcWREYvP0qcHGGYHMffEMy4McCMhUpUAsjfcvenKsqMh0qM+gGM8sw/C4enCIts2svoA/UMj48cbDfUggbQPoBQYwYNfVD/a9ds/sisrskAuQFADKLGD8EkHI+cwszfIc9U70NAegQ8+IkebwxI7SFoXsusos+nc8s1BWWI7QTUjyBNSrNQ0HSADsLQ3onI+AAgALfQqxeAYwuxP8gCpxXrO6YC8bHlOAPlJiTDGbWoszeopqDleALJYC1o+gbDALLbEcccno8I/osgQ7IOHks7IwsYq7dZEiZmEgIBEHC2RQyEeImEFCGyD8P7U5QHM8GyBHYosga8FCb0bigHJUMgDLcELkQg1QpijkcKVmE7DyAgagcwgwkAECkQTyNSwCg4xUTSgIxEGaOaRwsQ+BTBXaDAJUTgb0ZuWyiouC2JKopoMYuogYxbNCnRJ4kcVQTS7C1oNS/C7oiOBfEisiu6YY8tC7ZpGi8JG7REBPJPFPVStfKPN+FKkANfMPbgCPDNUOas1s5gGVAqWAPUNfHgxUTgNff3QPYwNfH3CYGItfMkqcz3RUDNeSiQVUxoDiz8MS9BXi7ieoBHI6YS0S5BHijk0OcsarC4EAPlGcyKVZUOWI3qO87VSyNfB3MAdq5ZRivRSjeI3qkQfqyagHZMvikanMJgMaLine truncated
|
||||||
*
|
const PLUGIN_LANGUAGES = {"ru": "B4Xg3gwg8gcgagUQEoBUD6BVJAZNKpoBiAktggFwBEghCCB8IIKIggAiCAMIILwggHCCBCIIDIgABO4HYQWoEYQFoDYQQKwgHCfwG8s2XoCYQXoG4QWoC4QZqu6tA0iCBOEF6AREGYHVlADQYYALWIAFNBCxIEMdCTJVABCDNAgiCA/CDMGrRKzDy8nBIagMIggJIg7Eam5rwIwADGAIYANgCWACYATlkA7lb2Ti5Ibh5EpBQ0YhF80XGJyWaqaZm5hSXllg4YAELYxADKABJoE3AA4s5TCBAA0lRQAEYAzoV5WQB2vA4Arpv52wAW5LyA+CC07P4avLH+nMyMEkqAEiDs9LyAWRANEFaIxOOxGGE2Pp/nN5vxjjB5gBaFLqJRWBAAWRGCAAIniAIJjBBoBxIKAOZAoYgICZUahKWgGN7hZRvFjscISQA8IHp/gDVLypJwwpicfiiSS0G5sISaYg0LYoFAsVRADggAW+72EEKh0mUelE0P57M4nO5fIFQp5IrCvEALCC0XgARgADG6AKS8WicVi0fxcCQ6f1RGIJCSAZhBnTytTrmLx6LRVG9mFZKe40MQsYT5qSJlAsBBGoA8EE4GkYekigHEQCRgiRiHrZfLFMpWYgwCYoQnYXATCBIRwoKiAYhBU/6lEHeE9GOxApwrBgHESUPmB0OqIAUEADnFigVDIgnQoNyN4rGYYh5U4dqkA8iAvcdhDTsKwQZZrDuLfuDhzDyi3SElDrLQzwTc9VHYat2BkCdmWUOtA3YXhT0AXBALyvaJHTvXhAjrCRXneCdn0XGBiTIfA3xWVZZnXX8qAAsJgITQ8wmPdh71YGRYgdbQAj4VD0KDSxeGrUVhD0HC8IItgwi4bhF1/KAVzXH8/2oCs504H1hCPKRkN4NDL2vbDcM+aSiJfSwMxgNBCQmNAEAADQgHtiDxJBCQAdSoMsKyrPgtGeWd/Fif1nnSZt+jbSx8HmeYyDQLElMaW48I0VRADkQWsDVtMQHViXhPjEdhYyvJs+lbUoESxLIigAawKAB7UoDlfWBEFQNAYCgVc8AIJyXPGdyvKoQAsEFoVggLBPVwkiARmFtcsCpUYxQVjTCavqpqWuUcqWwGXg8QGPIDgAcza+BqQc5zXOG7z/0+EQWCEcIDTRe0ACoADoAFNen2spdrRCTvoAWwKV83HlUkYAQe66AEHjIgnQwRLraIxAujrPAaNBVgQBAnCcv9vr+yLKt4EAAD5eFJ/6otKL7waxq6vFJNwHDlYtrpJ376Yp6naaZgpeAACn8MJbTeEqdz4fxeGwRrTu2H6AEcAEorDxKBPJgbAoEJPE0HGEYPKQABNKhAFoQYFAlBLTdWECDfRiJDzWYUxPlFFQVq6IWyYqgZ8k2dMqRspzJhpJEurhslCVhnzy0rSIQviCRWViDKOjR+tG1PQAkEAMkt85LQBMEDuQAEEBQwBUEEAbBBAAwQUPMwjrtP1siAFVJBx49LJP/OnCMM6zpIc4x/TC8AIhBq9GkdAEoQavy4r0aJ/r/OULLyua4bqwUA8zsIGwDA8UafPU0nGt0YbHe9/7Q/j8SqAuxlFZ3D/U/3iUEC7f8IUHU46MfTmgkDxDQ4JALQloAA4KoUtA7ygHFBKZBCAoCmPHY+RskrH3omlTKUFIhCiZG8UEE0OBGCKiVOBCD8yczslMb8BMYD0U0MwAQehZp8HmmfOIu0Ub/FrLnZg9ArCEHGE4bMuZe5+UiKtFGPJCqPFCpoWgcilBGhYKwf0MhBBPQvFIdivAA4A0GLDTyWYbImLjgnGgtBEYtDPGEVG0Cwrj14NQEs1Bq6bhruqXgJZRo1ysBYjsMdTHdhGAyGxSM+AozIQo5xBci4l3LhPCugBEEAboAMhBq6BNjsEwkHdiCKm7lYhGUT7GqNiSFeJvBJ7TzntXHxS8V5rxLD4vxATLBBJsg4SkhZ0CeQ7NreGkS7ExPkVUzQLiSwT1Gj4QA1CD5wroAOhB57qmoIAehBfH+OyZ03J5jY7FNJNiXEeIIm2INLBKBcSQIJLcR4rxDStk130khJQXCEwqBCOCJQ+gjBOjiLaVgC5dmmOCRYsJDkJSnOsbY5GDijD8LHgk9eSTeApPSfXLJLyzTMHPnwT5oCuS/MdJoWIgLgVdPbp3SxRyoVnLKWMpxkyElTxnqs3gTTV7rzads7FbyP5yV2l8olqN/lkpFDk0F3TekYH6YMnWkKTn0tGfC8ZijngJOmbMhZyzVkbKedXPlZ9BUEu+cSsV5LKHxVJPrNY2DPjpSynomQbQiFMgAYKYUQKEy5XyoVBsJUFpIU+CAsB+p9EeU8mLYQEg5A6OEL6Z86sETkgQHAWkUbRaBEhP4HkvpGCa0sMfcipI2ajh4hBSIqjjQaNoFooQxpJAGnYBBEwftNoNWakcQQvAti7AKPsI4TA2AtvYPENMlhoAOHNg5MgWJX7Gw7OsGgoRAgzTsQAbQ3f4fwehVBxAALoHqwveat6j/QeptCKZgoswiFqnTOu6bdxgwGXepWga7wGRAAIRbp3Xu7h54cWf1iEek9gJRRXKqbAywHYJhXRfdRfAs7sSv3IAAA3Gp+8NMg/27v3cwMDN5T1qIgZer17xdrCFiMYOs2lAXMC+rwAAJGAHIWRNg/RyB3HAot1YAF8ADUB9iBrHA6u9dHB7z/v3UhAA5KdIojUTgAAcQByaY6x9jnGcjTGIMgvjQmRNieI7wCT4CpPTnw8+Xgcnao/SyOpr66HYOdgQ0uvqKH511HmBSJcDJzOxAMJhBTSnVPqd4L+7d1nCPHtM2esjzpPXko+bwajtHGD0akIx9sbnOqIc8wgOdC7CRQwCx+9dkQ7NFAcxFqLMmtBEewgl2t5GUtUZo3RkQDGvq5fg/ljzyGiuobqIQDy87yvYfYbZgAZiUUGP06t4YA7F8DLWL1Javd6jrGWsvnl665/r6ACtDeK6N8bpIRMOCpNC99U27FyYyPkFTKmfoFDm1kBbS3osraayRmtG3ARbcoyodLXXhA9b6+519hWzvoG6kgHM2BJuVb4Mtgjf3DQA8gZtijqWweZe69lg7cHodIf6nDhyNQoBICoPnI0oJAEOmDLoHHQO8e7X8IAMRApASChwNmHp2RvoChniS2NAYu8EAMgg0zi4VwRE6N4e4gOg8658PbE7ScC+Xe/XFgqGsFSA2ifn6BoBYhzDAaFuu8VmeUWwP1fa9iHF2loWsrIZANcslr9A4i8x0+NZEbRjbnX8FbUy8K/MDo9vCN8KMzph0cAguO9sWIemdThFQeuPI7Zgl4HCVEXRUuTmZ7wbUs4kwqAioHQGWbaAOmZ4wMQIE4Q+kjOoyC2XhKrkcigHhARRS3jTjIJQnweQcRkHbevdZirck4P4W8hbsxp/QHCZwsBu8oG8xgeij1jQvRHTIFvKgy9/CQqeeWkD2/ZXYleE3iUrfvLbeYBMoNaqdp2j2hPo7k+HausuQg/uAqkQ/+BeqQn+7eSeE6NghSyAEwPYtkBI9Q3glA1uIEtcSyqSJYMuT+qgmueWpupW0K24wgeuKc/oTwlk0Al0nULkSARsyGZa/4eEUs4IZBAY3Cvs5gmI1OSAeAFstk8whIHYTCzQqgQWqYwkds2aIgQWmEEgachULCB23cXYl2yUYwUAdqKBAefATskyoQPEd+co3eGG1u3AmEq0jAPIsQYhCsWQKAP0jkYs542aJUdYwkAAOh4QABAnSNSgxgAHD8ZgB1T8aUy8BeEAAwJQGQgR36wRdU36osBwyIdU6s8R6szmlgr8yAxs0MjkdOQEDoU42aeuIYdaho4gIe2A9hjhVgouz8ZAdkMMPUdIO+tAeCdi38v8Bo80i0NmzoqigQrwGgfOlgSANgaAmhtOlA0xOEyYgOiKDYzANwgA6CCCKzRhjAiUY9pzY/RvYHSCayA6JNr6Kq67ZE5AZIRNQZBfQqZKYqbbD1HICTHTFMJKCiiMDErzTDFPDzGqCLGXzNC9oDhrEbERBbGpiyC8B7EHGAxHFB5VGWbnHg4MYIg3F3EPFPHjGvEDheavz0izEDiGjM7Hgwjs7kphBgn0CbGuo7FyCwkUwIkNpIlnFpZq4a7XyEgzqYIpQ4JOoGjBCcStr+BMgsicA+xRCfAGDIjkI8hWDwalZvhMKPDPB0lgQJhLGSCQyUhxx+6UAliiCxogRISxgUEWbQQknBhSD+hGAcgjpc56A6liI5j6mGmfACAmm8BmnPgWn1onF6K3hWDxzdTdi9S+6NAVy1phqvSWmIm6LIl7QMx375LUr/56mkh2RZiuknyP7Co/JwT2kcCOnHB4iEAu7MBu4Sn+nB5SbPHwY+5YiLDIbuhuijiPg27PS2iZbrZs7JbXrHG1n6JAatnei+j8D+BJh/w471kICNmLB2RUgdwyjyjEBQAMiiABj660C+j+ix4GhEKQisBY7np9nA4JjxmnFBkxTYhp6laPqTBkSZmyqPyEiICJyOp4J8C4qigSwJ4h5OjTi/yZxpwAI/EjEJiO4DrO6izmS4oQThDBYyAAiihaTBAsCLSMDCSig6ChC8DpytqqK8ACDngSDRDCSiTOiknMBkUSCFqrip4073kOSkTSiEgvlwHvkoGfmCo/kBgMDqLOqBIECKlIBvjPwTAYDYB/goRcQVoBjRJmDgjzEOhTmD4jz9lAqgSjwNhjGEA07cycWZkjA06rjQoATsCsDcRBjlEe4CVsAh7Zp1ivS0CSHsHJjcDcLsDM5oWQg847rTj2WcR1mWCIbjBPzwZUFGw07Hy8GIYMiS4fHEIAI563gOgwY5hICrBDLhxQrOAYBdiqjEC2A2oebkiqi/h4DEAoDIFoQcjMggSe7aX8qQg2mozG6WCZXZU6y5UnL5WFVYjFWlUw7lWp4yUyBOgkFKB3hIW8BboaDhAOgsB+h6Ae6hDCDPhgZMgVixCRj8CApIRojMDfq8AAA8Line truncated
|
||||||
* Parser for the \ce command and \pu command for MathJax and Co.
|
const PLUGIN_VERSION="2.8.1";;function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var obsidian_module__namespace=_interopNamespace(obsidian_module),React__namespace=_interopNamespace(React);let random$1=e=>crypto.getRandomValues(new Uint8Array(e)),customRandom=(e,t,a)=>{let i=(2<<Math.log(e.length-1)/Math.LN2)-1,n=-~(1.6*i*t/e.length);return(r=t)=>{let s="";for(;;){let t=a(n),o=n;for(;o--;)if(s+=e[t[o]&i]||"",s.length===r)return s}}},customAlphabet=(e,t=21)=>customRandom(e,t,random$1),nanoid$1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""),EXCALIDRAW_PLUGIN=null;const setExcalidrawPlugin=e=>{EXCALIDRAW_PLUGIN=e},THEME={LIGHT:"light",DARK:"dark"},MD_EXCALIDRAW="# Excalidraw Data",MD_TEXTELEMENTS="## Text Elements",MD_ELEMENTLINKS="## Element Links",MD_EMBEDFILES="## Embedded Files",MD_DRAWING="## Drawing",MD_EX_SECTIONS=[MD_EXCALIDRAW,MD_TEXTELEMENTS,MD_ELEMENTLINKS,MD_EMBEDFILES,MD_DRAWING],ERROR_IFRAME_CONVERSION_CANCELED="iframe conversion canceled",LOCALE=localStorage.getItem("language")?.toLowerCase()||"en",CJK_FONTS="CJK Fonts",obsidianToExcalidrawMap={en:"en-US",af:"af-ZA",am:"am-ET",ar:"ar-SA",eu:"eu-ES",be:"be-BY",bg:"bg-BG",bn:"bn-BD",ca:"ca-ES",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",eo:"eo-EO",es:"es-ES",fa:"fa-IR","fi-fi":"fi-FI",fr:"fr-FR",gl:"gl-ES",he:"he-IL",hi:"hi-IN",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",ml:"ml-IN",ms:"ms-MY",nl:"nl-NL",no:"nb-NO",oc:"oc-FR",pl:"pl-PL",pt:"pt-PT","pt-BR":"pt-BR",ro:"ro-RO",ru:"ru-RU",sr:"sr-RS",se:"sv-SE",sk:"sk-SK",sq:"sq-AL",ta:"ta-IN",te:"te-IN",th:"th-TH",tr:"tr-TR",uk:"uk-UA",ur:"ur-PK",vi:"vi-VN",zh:"zh-CN","zh-TW":"zh-TW"};let{sceneCoordsToViewportCoords:sceneCoordsToViewportCoords,viewportCoordsToSceneCoords:viewportCoordsToSceneCoords,determineFocusDistance:determineFocusDistance,intersectElementWithLine:intersectElementWithLine,getCommonBoundingBox:getCommonBoundingBox,getMaximumGroups:getMaximumGroups,measureText:measureText,getLineHeight:getLineHeight,wrapText:wrapText,getFontString:getFontString,getBoundTextMaxWidth:getBoundTextMaxWidth,exportToSvg:exportToSvg,exportToBlob:exportToBlob,mutateElement:mutateElement,restore:restore,mermaidToExcalidraw:mermaidToExcalidraw,getFontFamilyString:getFontFamilyString,getContainerElement:getContainerElement,refreshTextDimensions:refreshTextDimensions,getCSSFontDefinition:getCSSFontDefinition,loadSceneFonts:loadSceneFonts,loadMermaid:loadMermaid}=excalidrawLib;function updateExcalidrawLib(){({sceneCoordsToViewportCoords:sceneCoordsToViewportCoords,viewportCoordsToSceneCoords:viewportCoordsToSceneCoords,determineFocusDistance:determineFocusDistance,intersectElementWithLine:intersectElementWithLine,getCommonBoundingBox:getCommonBoundingBox,getMaximumGroups:getMaximumGroups,measureText:measureText,getLineHeight:getLineHeight,wrapText:wrapText,getFontString:getFontString,getBoundTextMaxWidth:getBoundTextMaxWidth,exportToSvg:exportToSvg,exportToBlob:exportToBlob,mutateElement:mutateElement,restore:restore,mermaidToExcalidraw:mermaidToExcalidraw,getFontFamilyString:getFontFamilyString,getContainerElement:getContainerElement,refreshTextDimensions:refreshTextDimensions,getCSSFontDefinition:getCSSFontDefinition,loadSceneFonts:loadSceneFonts,loadMermaid:loadMermaid}=excalidrawLib)}const FONTS_STYLE_ID="excalidraw-custom-fonts",CJK_STYLE_ID="excalidraw-cjk-fonts";function JSON_parse(e){return JSON.parse(e.replaceAll("[","["))}/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);const DEVICE={isDesktop:!document.body.hasClass("is-tablet")&&!document.body.hasClass("is-mobile"),isPhone:document.body.hasClass("is-phone"),isTablet:document.body.hasClass("is-tablet"),isMobile:document.body.hasClass("is-mobile"),isLinux:document.body.hasClass("mod-linux")&&!document.body.hasClass("is-android"),isMacOS:document.body.hasClass("mod-macos")&&!document.body.hasClass("is-ios"),isWindows:document.body.hasClass("mod-windows"),isIOS:document.body.hasClass("is-ios"),isAndroid:document.body.hasClass("is-android")};let ROOTELEMENTSIZE=16;function setRootElementSize(e){if(e)return void(ROOTELEMENTSIZE=e);const t=document.createElement("div");t.style.fontSize="1rem",t.style.display="none",document.body.appendChild(t);const a=getComputedStyle(t),i=parseFloat(a.fontSize);return document.body.removeChild(t),i}const nanoid=customAlphabet("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",8),KEYCODE={ESC:27},ROUNDNESS={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},THEME_FILTER="invert(100%) hue-rotate(180deg) saturate(1.25)",GITHUB_RELEASES="https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/",URLFETCHTIMEOUT=3e3,PLUGILine truncated
|
||||||
*
|
|
||||||
* mhchem's \ce is a tool for writing beautiful chemical equations easily.
|
/* nosourcemap */
|
||||||
* mhchem's \pu is a tool for writing physical units easily.
|
|
||||||
*
|
|
||||||
* ----------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015-2023 Martin Hensel
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
* ----------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* https://github.com/mhchem/mhchemParser
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Object.defineProperty(mhchemParser$1,"__esModule",{value:!0}),mhchemParser$1.mhchemParser=void 0;var mhchemParser=function(){function e(){}return e.toTex=function(e,t){return _mhchemTexify.go(_mhchemParser.go(e,t),"tex"!==t)},e}();function _mhchemCreateTransitions(e){var t,n,r={};for(t in e)for(n in e[t]){var i=n.split("|");e[t][n].stateArray=i;for(var o=0;o<i.length;o++)r[i[o]]=[]}for(t in e)for(n in e[t])for(i=e[t][n].stateArray||[],o=0;o<i.length;o++){var a=e[t][n];a.action_=[].concat(a.action_);for(var s=0;s<a.action_.length;s++)"string"==typeof a.action_[s]&&(a.action_[s]={type_:a.action_[s]});for(var l=t.split("|"),c=0;c<l.length;c++)if("*"===i[o]){var T=void 0;for(T in r)r[T].push({pattern:l[c],task:a})}else r[i[o]].push({pattern:l[c],task:a})}return r}mhchemParser$1.mhchemParser=mhchemParser;var _mhchemParser={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var n,r="0",i={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,a=[];;){n!==e?(o=10,n=e):o--;var s=_mhchemParser.stateMachines[t],l=s.transitions[r]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var T=_mhchemParser.patterns.match_(l[c].pattern,e);if(T){for(var Q=l[c].task,d=0;d<Q.action_.length;d++){var u=void 0;if(s.actions[Q.action_[d].type_])u=s.actions[Q.action_[d].type_](i,T.match_,Q.action_[d].option);else{if(!_mhchemParser.actions[Q.action_[d].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+Q.action_[d].type_+")"];u=_mhchemParser.actions[Q.action_[d].type_](i,T.match_,Q.action_[d].option)}_mhchemParser.concatArray(a,u)}if(r=Q.nextState||r,!(e.length>0))return a;if(Q.revisit||(e=T.remainder),!Q.toContinue)break e}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,"state of aggregation $":function(e){var t=_mhchemParser.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". __* ":/^([.\u22C5\u00B7\u2022]|[*])\s*/,"...":/^\.\.\.(?=$|[^.])/,"^{(...)}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return _mhchemParser.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return _mhchemParser.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return _mhchemParser.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}^":/^\{\}(?=\^)/,"{}":/^\{\}/,"{...}":function(e){return _mhcheLine truncated
|
|
||||||
//![[link|alias]] [alias](link){num}
|
|
||||||
EXPR:/(!)?(\[\[([^|\]]+)\|?([^\]]+)?]]|\[([^\]]*)]\(([^)]*)\))(\{(\d+)\})?/g,getResList:e=>{const t=e.matchAll(REGEX_LINK.EXPR);let n;const r=[];for(;!(n=t.next()).done;)r.push(n);return r},getRes:e=>e.matchAll(REGEX_LINK.EXPR),isTransclusion:e=>!!e.value[1],getLink:e=>e.value[3]?e.value[3]:e.value[6],isWikiLink:e=>!!e.value[3],getAliasOrLink:e=>REGEX_LINK.isWikiLink(e)?e.value[4]?e.value[4]:e.value[3]:e.value[5]?e.value[5]:e.value[6],getWrapLength:(e,t)=>{const n=parseInt(e.value[8]);return isNaN(n)?t>0?t:null:n}},DRAWING_REG=/\n# Drawing\n[^`]*(```json\n)([\s\S]*?)```\n/gm,DRAWING_REG_FALLBACK=/\n# Drawing\n(```json\n)?(.*)(```)?(%%)?/gm,DRAWING_COMPRESSED_REG=/(\n# Drawing\n[^`]*(?:```compressed\-json\n))([\s\S]*?)(```\n)/gm,DRAWING_COMPRESSED_REG_FALLBACK=/(\n# Drawing\n(?:```compressed\-json\n)?)(.*)((```)?(%%)?)/gm,REG_LINKINDEX_HYPERLINK=/^\w+:\/\//,isCompressedMD=e=>null!==e.match(/```compressed\-json\n/gm),getDecompressedScene=e=>{let t,n=e.matchAll(DRAWING_COMPRESSED_REG);return t=n.next(),t.done&&(n=e.matchAll(DRAWING_COMPRESSED_REG_FALLBACK),t=n.next()),t.value&&t.value.length>1?[decompress(t.value[2]),t]:[null,t]},changeThemeOfExcalidrawMD=e=>{const t=isCompressedMD(e);let n=t?getDecompressedScene(e)[0]:e;return n?(isObsidianThemeDark?1===(n.match(/"theme"\s*:\s*"light"\s*,/g)||[]).length&&(n=n.replace(/"theme"\s*:\s*"light"\s*,/,'"theme": "dark",')):1===(n.match(/"theme"\s*:\s*"dark"\s*,/g)||[]).length&&(n=n.replace(/"theme"\s*:\s*"dark"\s*,/,'"theme": "light",')),t?e.replace(DRAWING_COMPRESSED_REG,`$1${compress(n)}$3`):n):e};function getJSON(e){let t,n;if(isCompressedMD(e)){const[t,n]=getDecompressedScene(e);return t?{scene:t.substring(0,t.lastIndexOf("}")+1),pos:n.value.index}:{scene:e,pos:n.value?n.value.index:0}}if(t=e.matchAll(DRAWING_REG),n=t.next(),n.done&&(t=e.matchAll(DRAWING_REG_FALLBACK),n=t.next()),n.value&&n.value.length>1){const e=n.value[2];return{scene:e.substr(0,e.lastIndexOf("}")+1),pos:n.value.index}}return{scene:e,pos:n.value?n.value.index:0}}function getMarkdownDrawingSection(e,t){return t?`%%\n# Drawing\n\`\`\`compressed-json\n${compress(e)}\n\`\`\`\n%%`:`%%\n# Drawing\n\`\`\`json\n${e}\n\`\`\`\n%%`}const estimateMaxLineLen=(e,t)=>{if(!t||!e)return null;if(e===t)return null;let n=0;const r=e.split("\n");if(1===r.length)return null;for(const e of r){const t=e.trim();t.length>n&&(n=t.length)}return n},wrap=(e,t)=>t?wrapTextAtCharLength(e,t,!1,0):e,getExcalidrawMarkdownHeaderSection=(e,t)=>{let n=e.search(/(^%%\n)?# Text Elements\n/m);if(-1==n&&(n=e.search(/(%%\n)?# Drawing\n/)),-1==n)return e;let r=updateFrontmatterInString(e.substring(0,n),t);const i=/(^---[\w\W]*?---\n)(!\[\[.*?]]\n(%%\n)?)/m;return r.match(i)&&(r=r.replace(i,"$1")),r};class ExcalidrawData{constructor(e){this.plugin=e,this.textElements=null,this.elementLinks=null,this.scene=null,this.deletedElements=[],this.file=null,this.embeddableTheme="auto",this.autoexportPreference=AutoexportPreference.inherit,this.textMode=TextMode.raw,this.loaded=!1,this.files=null,this.equations=null,this.mermaids=null,this.compatibilityMode=!1,this.selectedElementIds={},this.disableCompression=!1,this.app=e.app,this.files=new Map,this.equations=new Map,this.mermaids=new Map}initializeNonInitializedFields(){var e,t,n;if(!this.scene||!this.scene.elements)return;const r=null!==(e=this.scene.source.split("https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/")[1])&&void 0!==e?e:"1.8.16",i=this.scene.elements;for(const e of i){if("iframe"!==e.type||e.customData||(e.type="embeddable"),e.boundElements){const t=new Map;let n=!1;e.boundElements.forEach((e=>{"text"===e.type?n?i.find((t=>t.id===e.id)).containerId=null:(t.set(e.id,e.type),n=!0):t.set(e.id,e.type)}));const r=Array.from(t,(([e,t])=>({id:e,type:t})));r.length!==e.boundElements.length&&(e.boundElements=r)}e.boundElementIds&&(e.boundElements||(e.boundElements=[]),e.boundElements=e.boundElements.concat(e.boundElementIds.map((e=>({type:"arrow",id:e})))),delete e.boundElementIds),"text"!==e.type||e.containerId||(e.containerId=null),null===e.x&&(e.x=0),null===e.y&&(e.y=0),null===(null===(t=e.startBinding)||void 0===t?void 0:t.focus)&&(e.startBinding.focus=0),null===(null===(n=e.endBinding)||void 0===n?void 0:n.focus)&&(e.endBinding.focus=0),null===e.fontSize&&(e.fontSize=20)}try{i.filter((e=>"text"===e.type&&e.containerId&&i.some((t=>t.id===e.containerId&&t.boundElements.length>0&&t.boundElements.some((t=>"text"===t.type&&t.id!==e.id&&t.id.length>8)))))).forEach((e=>{try{const t=i.filter((t=>t.id===e.containerId))[0],n=t.boundElements.filter((e=>!("text"===e.type&&!i.some((t=>t.id===e.id)))));t.boundElements=[{id:e.id,type:"text"}].concat(n)}catch(e){}}));const e=!isVersionNewerThanOther(r,"1.8.16");i.filter((e=>e.boundElements&&e.boundElements.length>0)).forEach((t=>{var n;e&&!(null===(n=t.customData)||void 0===n?void 0:n.legacyTextWrap)&&addAppendUpdateCustomData(t,{legacyTextWrap:!0});const r=t.boundElements.filter((e=>i.some((t=>t.id===e.id))));r.length!==t.boundLine truncated
|
|
||||||
/**
|
|
||||||
* chroma.js - JavaScript library for color conversions
|
|
||||||
*
|
|
||||||
* Copyright (c) 2011-2019, Gregor Aisch
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
||||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
|
||||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* -------------------------------------------------------
|
|
||||||
*
|
|
||||||
* chroma.js includes colors from colorbrewer2.org, which are released under
|
|
||||||
* the following license:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
|
||||||
* and The Pennsylvania State University.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
||||||
* either express or implied. See the License for the specific
|
|
||||||
* language governing permissions and limitations under the License.
|
|
||||||
*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Named colors are taken from X11 Color Names.
|
|
||||||
* http://www.w3.org/TR/css3-color/#svg-color
|
|
||||||
*
|
|
||||||
* @preserve
|
|
||||||
*/chroma$1.exports,function(e,t){e.exports=function(){for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t=e,n={},r=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r<i.length;r+=1){var o=i[r];n["[object "+o+"]"]=o.toLowerCase()}var a=function(e){return n[Object.prototype.toString.call(e)]||"object"},s=a,l=a,c=Math.PI,T={clip_rgb:function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var n=0;n<=3;n++)n<3?((e[n]<0||e[n]>255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):3===n&&(e[n]=t(e[n],0,1));return e},limit:e,type:a,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==s(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==l(e[t])?e[t].toLowerCase():null},PI:c,TWOPI:2*c,PITHIRD:c/3,DEG2RAD:c/180,RAD2DEG:180/c},Q={format:{},autodetect:[]},d=T.last,u=T.clip_rgb,p=T.type,h=Q,m=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=d(e),i=!1;if(!r){i=!0,h.sorted||(h.autodetect=h.autodetect.sort((function(e,t){return t.p-e.p})),h.sorted=!0);for(var o=0,a=h.autodetect;o<a.length;o+=1){var s=a[o];if(r=s.test.apply(s,e))break}}if(!h.format[r])throw new Error("unknown format: "+e);var l=h.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=u(l),3===n._rgb.length&&n._rgb.push(1)};m.prototype.toString=function(){return"function"==p(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var f=m,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g.Color,[null].concat(e)))};g.Color=f,g.version="2.4.2";var b=g,y=T.unpack,L=Math.max,v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=y(e,"rgb"),r=n[0],i=n[1],o=n[2],a=1-L(r/=255,L(i/=255,o/=255)),s=a<1?1/(1-a):0;return[(1-r-a)*s,(1-i-a)*s,(1-o-a)*s,a]},w=T.unpack,E=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=w(e,"cmyk"))[0],r=e[1],i=e[2],o=e[3],a=e.length>4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},_=b,M=f,H=Q,x=T.unpack,S=T.type,A=v;M.prototype.cmyk=function(){return A(this._rgb)},_.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(M,[null].concat(e,["cmyk"])))},H.format.cmyk=E,H.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=x(e,"cmyk"),"array"===S(e)&&4===e.length)return"cmyk"}});var C=T.unpack,O=T.last,V=function(e){return Math.round(100*e)/100},I=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=C(e,"hsla"),r=O(e)||"lsa";return n[0]=V(n[0]||0),n[1]=V(100*n[1])+"%",n[2]=V(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},k=T.unpack,N=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=k(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,s=Math.min(n,r,i),l=Math.max(n,r,i),c=(l+s)/2;return l===s?(o=0,a=Number.NaN):o=c<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?a=(r-i)/(l-s):r==l?a=2+(i-n)/(l-s):i==l&&(a=4+(n-r)/(l-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,c,e[3]]:[a,o,c]},P=T.unpack,R=T.last,j=I,D=N,B=Math.round,F=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=P(e,"rgba"),r=R(e)||"rgb";return"hsl"==r.substr(0,3)?j(D(n),r):(n[0]=B(n[0]),n[1]=B(n[1]),n[2]=B(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},G=T.unpack,W=Math.round,U=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=G(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)r=i=o=255*l;else{var c=[0,0,0],T=[0,0,0],Q=l<.5?l*(1+s):l+s-l*s,d=2*l-Q,u=a/360;c[0]=u+1/3,c[1]=u,c[2]=u-1/3;for(var p=0;p<3;p++)c[p]<0&&(c[p]+=1),c[p]>1&&(c[p]-=1),6*c[p]<1?T[p]=d+6*(Q-d)*c[p]:2*c[p]<1?T[p]=Q:3*c[p]<2?T[p]=d+(Q-d)*(2/3-c[p])*6:T[p]=d;r=(e=[W(255*T[0]),W(255*T[1]),W(255*T[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},Z=U,$=Q,z=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,q=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,X=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Y=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,K=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,J=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),$.format.named)try{return $.format.named(e)}catch(e){}if(t=e.match(z)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(q)){for(var i=t.slice(1,5),oLine truncated
|
|
||||||
//! onauxclick: (e: any) => {e.preventDefault()},
|
|
||||||
,renderTopRightUI:(e,t)=>this.obsidianMenu.renderButton(e,t),renderEmbeddableMenu:e=>this.embeddableMenu.renderButtons(e),onPaste:(e,t)=>this.onPaste(e,t),onThemeChange:async e=>this.onThemeChange(e),ownerDocument:this.ownerDocument,ownerWindow:this.ownerWindow,onDrop:e=>this.onDrop(e),onBeforeTextEdit:e=>this.onBeforeTextEdit(e),onBeforeTextSubmit:(e,t,n,r)=>this.onBeforeTextSubmit(e,t,n,r),onLinkOpen:(e,t)=>this.onLinkOpen(e,t),onLinkHover:(e,t)=>this.onLinkHover(e,t),onContextMenu:T,onViewModeChange:e=>this.onViewModeChange(e),validateEmbeddable:!0,renderWebview:DEVICE.isDesktop,renderEmbeddable:(e,t)=>Q(e,t),renderMermaid:shouldRenderMermaid(),obsidianHostPlugin:this.plugin},d(),t.createElement(a,{},t.createElement(a.Center,{},t.createElement(a.Center.Logo,{},t.createElement(LogoWrapper,{},ICONS.ExcalidrawSword)),t.createElement(a.Center.Heading,{},'Type "Excalidraw" in the Command Palette',t.createElement("br"),"Explore the Obsidian Menu in the top right",t.createElement("br"),"Visit the Script Library",t.createElement("br"),"Find help in the hamburger-menu"),t.createElement(a.Center.Menu,{},t.createElement(a.Center.MenuItemLink,{icon:ICONS.YouTube,href:"https://www.youtube.com/@VisualPKM",shortcut:null,"aria-label":"Visual PKM YouTube Channel"}," Check out the Visual PKM YouTube channel."),t.createElement(a.Center.MenuItemLink,{icon:ICONS.Discord,href:"https://discord.gg/DyfAXFwUHc",shortcut:null,"aria-label":"Join the Visual Thinking Discord Server"}," Join the Visual Thinking Discord Server"),t.createElement(a.Center.MenuItemLink,{icon:ICONS.twitter,href:"https://twitter.com/zsviczian",shortcut:null,"aria-label":"Follow me on Twitter"}," Follow me on Twitter"),t.createElement(a.Center.MenuItemLink,{icon:ICONS.heart,href:"https://ko-fi.com/zsolt",shortcut:null,"aria-label":"Donate to support Excalidraw-Obsidian"},' Say "Thank You" & support the plugin.')))),t.createElement(l,{onTextSubmit:async e=>{var t,n,r,i,o,a;try{const s=await postOpenAI({systemPrompt:"The user will provide you with a text prompt. Your task is to generate a mermaid diagram based on the prompt. Use the graph, sequenceDiagram, flowchart or classDiagram types based on what best fits the request. Return a single message containing only the mermaid diagram in a codeblock. Avoid the use of `()` parenthesis in the mermaid script.",text:e,instruction:"Return a single message containing only the mermaid diagram in a codeblock."});if(!s)return{error:new Error("Request failed")};const l=s.json;if(null==l?void 0:l.error)return console.log(s),{error:new Error(l.error.message)};if(!(null===(r=null===(n=null===(t=null==l?void 0:l.choices)||void 0===t?void 0:t[0])||void 0===n?void 0:n.message)||void 0===r?void 0:r.content))return console.log(s),{error:new Error("Generation failed... see console log for details")};let c=null===(a=extractCodeBlocks(null===(o=null===(i=l.choices[0])||void 0===i?void 0:i.message)||void 0===o?void 0:o.content)[0])||void 0===a?void 0:a.data;return c?(c.startsWith("mermaid")&&(c=c.replace(/^mermaid/,"").trim()),{generatedResponse:c,rateLimit:100,rateLimitRemaining:100}):(console.log(s),{error:new Error("Generation failed... see console log for details")})}catch(e){throw new Error("Request failed")}}}),t.createElement(s,{})),u());return t.createElement(t.Fragment,null,g)}));n.createRoot(this.contentEl).render(p)}updateContainerSize(e,t=!1){const n=this.excalidrawAPI;if(!n)return;const r=()=>{const t=e?n.getSceneElements().filter((t=>t.id===e&&"arrow"!==t.type)):n.getSceneElements().filter(isContainer);t.length>0&&(this.initialContainerSizeUpdate&&(this.semaphores.justLoaded=!0),n.updateContainerSize(t)),this.initialContainerSizeUpdate=!1};t?setTimeout((()=>r()),50):r()}zoomToFit(e=!0,t=!1){if(document.body.querySelector("div.modal-container"))return;const n=this.excalidrawAPI;if(!n||this.semaphores.isEditingText||this.semaphores.preventAutozoom)return;const r=this.plugin.settings.zoomToFitMaxLevel,i=n.getSceneElements().filter((e=>e.width<1e4&&e.height<1e4));app.isMobile&&i.length>1e3||i.length>2500?t&&n.scrollToContent():e?setTimeout((()=>n.zoomToFit(i,r,this.isFullscreen()?0:.05)),100):n.zoomToFit(i,r,this.isFullscreen()?0:.05)}updatePinnedScripts(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{pinnedScripts:this.plugin.settings.pinnedScripts}})}updatePinnedCustomPens(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens)}})}updatePinchZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowPinchZoom:this.plugin.settings.allowPinchZoom}})}updateWheelZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowWheelZoom:this.plugin.settings.allowWheelZoom}})}async toggleTrayMode(){const e=this.excalidrawAPI;if(!e)return!1;const t=e.getAppState();e.updateScene({appState:{trayModeEnabled:!t.trayModeEnabled}}),await this.plugin.loadSettings(),this.plugin.Line truncated
|
|
||||||
//!Temporary hack
|
|
||||||
if(e.activeExcalidrawView=i,i?(e.addModalContainerObserver(),e.lastActiveExcalidrawFilePath=null===(n=i.file)||void 0===n?void 0:n.path):e.removeModalContainerObserver(),this.app.isMobile&&i&&!r){const e=document.querySelector("body>.app-container>.mobile-navbar");e&&e instanceof HTMLDivElement&&(e.style.position="relative")}if(this.app.isMobile&&!i&&r){const e=document.querySelector("body>.app-container>.mobile-navbar");e&&e instanceof HTMLDivElement&&(e.style.position="")}if(r&&r!==i&&(r.leaf!==t&&r.semaphores.dirty&&!r.semaphores.viewunload&&await r.save(!0),r.file&&e.triggerEmbedUpdates(r.file.path)),i&&(!r||r.leaf!==t)){const e=i.file;i.file&&setTimeout((()=>{var t;i&&i._loaded&&(null===(t=i.file)||void 0===t?void 0:t.path)===(null==e?void 0:e.path)&&(i.activeLoader||i.loadSceneFiles())}),2e3)}if(i&&i._loaded&&i.isLoaded&&i.excalidrawAPI&&e.ea.onCanvasColorChangeHook&&e.ea.onCanvasColorChangeHook(e.ea,i,i.excalidrawAPI.getAppState().viewBackgroundColor),e.popScope&&(e.popScope(),e.popScope=null),i){const t=e.app.keymap.getRootScope(),n=t.register(["Mod"],"Enter",(()=>!0));t.keys.unshift(t.keys.pop());const r=t.register(["Mod"],"k",(()=>!0));t.keys.unshift(t.keys.pop());const i=t.register(["Mod"],"f",(()=>{const e=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!e&&(search(e),!0)}));t.keys.unshift(t.keys.pop());const o=e.forceSaveCommand&&"s"===e.forceSaveCommand.hotkeys[0].key&&e.forceSaveCommand.hotkeys[0].modifiers.includes("Ctrl")?t.register(["Ctrl"],"s",(()=>e.forceSaveActiveView(!1))):void 0;o&&t.keys.unshift(t.keys.pop()),e.popScope=()=>{t.unregister(n),t.unregister(r),t.unregister(i),Boolean(o)&&t.unregister(o)}}}))),e.addFileSaveTriggerEventHandlers();const t=app.metadataCache;t.getCachedFiles().forEach((n=>{var r;const i=null===(r=t.getCache(n))||void 0===r?void 0:r.frontmatter;(i&&void 0!==i[FRONTMATTER_KEY]||n.match(/\.excalidraw$/))&&e.updateFileCache(app.vault.getAbstractFileByPath(n),i)})),this.registerEvent(t.on("changed",((e,t,n)=>this.updateFileCache(e,null==n?void 0:n.frontmatter))))}))}addFileSaveTriggerEventHandlers(){const e=e=>{this.activeExcalidrawView&&this.activeExcalidrawView.semaphores.dirty&&(!e.target||"excalidraw__canvas"!==e.target.className&&!getParentOfClass(e.target,"excalidraw-wrapper"))&&this.activeExcalidrawView.save()};this.app.workspace.containerEl.addEventListener("click",e),this.removeEventLisnters.push((()=>{this.app.workspace.containerEl.removeEventListener("click",e)})),this.registerEvent(this.app.workspace.on("file-menu",(()=>{this.activeExcalidrawView&&this.activeExcalidrawView.semaphores.dirty&&this.activeExcalidrawView.save()}))),this.addModalContainerObserver();const t=document.querySelector(".workspace-drawer.mod-left"),n=document.querySelector(".workspace-drawer.mod-right");if(t||n){const e=async e=>{"display: none;"===e[0].oldValue&&this.activeExcalidrawView&&this.activeExcalidrawView.semaphores.dirty&&this.activeExcalidrawView.save()},r={attributeOldValue:!0,attributeFilter:["style"]};t&&(this.workspaceDrawerLeftObserver=new MutationObserver(e),this.workspaceDrawerLeftObserver.observe(t,r)),n&&(this.workspaceDrawerRightObserver=new MutationObserver(e),this.workspaceDrawerRightObserver.observe(n,r))}}addModalContainerObserver(){if(this.activeExcalidrawView){if(this.modalContainerObserver){if(this.activeViewDoc===this.activeExcalidrawView.ownerDocument)return;this.removeModalContainerObserver()}this.modalContainerObserver=new MutationObserver((async e=>{1===e.length&&"childList"===e[0].type&&1===e[0].addedNodes.length&&this.activeExcalidrawView&&this.activeExcalidrawView.semaphores.dirty&&this.activeExcalidrawView.save()})),this.activeViewDoc=this.activeExcalidrawView.ownerDocument,this.modalContainerObserver.observe(this.activeViewDoc.body,{childList:!0})}}removeModalContainerObserver(){this.modalContainerObserver&&(this.modalContainerObserver.disconnect(),this.activeViewDoc=null,this.modalContainerObserver=null)}updateFileCache(e,t,n=!1){t&&void 0!==t[FRONTMATTER_KEY]?this.excalidrawFiles.add(e):n||"excalidraw"!==e.extension?this.excalidrawFiles.delete(e):this.excalidrawFiles.add(e)}onunload(){document.body.removeChild(this.textMeasureDiv),this.stylesManager.unload(),this.removeFonts(),this.removeEventLisnters.forEach((e=>e())),destroyExcalidrawAutomate(),this.popScope&&(this.popScope(),this.popScope=null),this.legacyExcalidrawPopoverObserver&&this.legacyExcalidrawPopoverObserver.disconnect(),this.removeThemeObserver(),this.removeModalContainerObserver(),this.workspaceDrawerLeftObserver&&this.workspaceDrawerLeftObserver.disconnect(),this.workspaceDrawerRightObserver&&this.workspaceDrawerRightObserver.disconnect(),this.fileExplorerObserver&&this.fileExplorerObserver.disconnect(),this.app.workspace.getLeavesOfType("excalidraw").forEach((e=>{this.setMarkdownView(e)})),Object.values(this.packageMap).forEach((e=>{delete e.excalidrawLib,delete e.reactDOM,delete e.react}))}async embedDrawing(e){const t=this.app.workspace.getActiveViewOfType(oLine truncated
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-excalidraw-plugin",
|
"id": "obsidian-excalidraw-plugin",
|
||||||
"name": "Excalidraw",
|
"name": "Excalidraw",
|
||||||
"version": "2.0.13",
|
"version": "2.8.1",
|
||||||
"minAppVersion": "1.1.6",
|
"minAppVersion": "1.1.6",
|
||||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||||
"author": "Zsolt Viczian",
|
"author": "Zsolt Viczian",
|
||||||
"authorUrl": "https://zsolt.blog",
|
"authorUrl": "https://www.zsolt.blog",
|
||||||
"fundingUrl": "https://ko-fi.com/zsolt",
|
"fundingUrl": "https://ko-fi.com/zsolt",
|
||||||
"helpUrl": "https://github.com/zsviczian/obsidian-excalidraw-plugin#readme",
|
"helpUrl": "https://github.com/zsviczian/obsidian-excalidraw-plugin#readme",
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
.App{font-family:sans-serif;text-align:center}.excalidraw-wrapper{background-color:#fff;height:100%;margin:0}.context-menu-option__shortcut{background-color:transparent!important}.block-language-excalidraw{text-align:center}.excalidraw .github-corner{display:none}.excalidraw-embedded-img{width:100%}.excalidraw-svg-right-wrap{float:right;margin:0 0 20px 20px;width:100%}.excalidraw-svg-left-wrap{float:left;margin:0 35px 20px 0;width:100%}.excalidraw-svg-right{float:right}.excalidraw-svg-center{margin:auto;text-align:center;width:100%}.excalidraw-svg-left{float:left}div.excalidraw-svg-left,div.excalidraw-svg-right{display:table;width:100%}button.ToolIcon_type_button[title=Export]{display:none}.excalidraw-prompt-div{display:flex;max-width:800px}.excalidraw-prompt-form{display:flex;flex-grow:1}.excalidraw-prompt-input{flex-grow:1}.excalidraw-prompt-button{width:9em}.excalidraw-prompt-buttons-div{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-evenly}li[data-testid]{border:0!important;margin:0!important;padding:0!important;width:100%!important}.excalidraw .context-menu-option-separator{margin:4px!important}.excalidraw .popover{background-color:transparent!important;border:0!important;box-shadow:0!important;padding:0!important;position:fixed!important}.disable-zen-mode--visible{color:var(--text-primary-color)}.disable-zen-mode{width:9em!important}.ex-coffee-div{margin-bottom:10px;text-align:center}.excalidraw-scriptengine-install td>img{max-width:800px;width:100%}.excalidraw-scriptengine-install img.coffee{width:130px}.excalidraw-scriptengine-install tr{vertical-align:top}.excalidraw-scriptengine-install table{max-width:130ch}.excalidraw-scriptengine-install td.label{font-weight:700;min-width:11ch;padding-right:5px}.excalidraw-scriptengine-install td.data{width:100%}.excalidraw-scriptengine-install .modal-content{max-width:130ch;user-select:text}.excalidraw-scriptengine-install .modal{max-height:90%;width:auto}.excalidraw-prompt-center{text-align:center!important}.excalidraw-prompt-center button{margin:0 10px}.excalidraw-prompt-center.filepath{font-weight:700;margin-bottom:2em;text-align:center}.excalidraw-dirty{color:red}.workspace-leaf-content .excalidraw-view{overflow:hidden;padding:0 1px}.excalidraw-videoWrapper{max-width:600px}.excalidraw-videoWrapper.settings{max-width:340px}.excalidraw-videoWrapper div{height:0;margin:0 auto;padding-bottom:56.25%;position:relative}.excalidraw-videoWrapper.settings iframe{margin-bottom:1rem;position:relative}.excalidraw-videoWrapper iframe{height:100%;left:0;position:absolute;top:0;width:100%}.excalidraw-release .modal-content{margin-right:-5px;padding-right:5px;user-select:text}.excalidraw-release .modal{max-height:80%;max-width:42em}.excalidraw .Island .scrollbar{--scrollbar-thumb-bg:silver}.excalidraw .ToolIcon__icon img{height:1em}.excalidraw-scriptengine-install tbody>tr>td>div>img{background-color:silver;height:20px;padding:2px}.excalidraw-scriptengine-install tbody>tr>td>div{display:inline-block;width:50px}.excalidraw-release p>a>img{width:100%}.excalidraw .context-menu-option{box-shadow:none}textarea.excalidraw-wysiwyg{border:none;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:none}.is-mobile .excalidraw button,.is-tablet .excalidraw button{height:1.8rem;padding:initial}.ToolIcon button,.excalidraw button{box-shadow:none;justify-content:normal}.excalidraw{--default-button-size:2rem!important;--default-icon-size:1rem!important;--lg-button-size:1.8rem!important;--lg-icon-size:1rem!important}.excalidraw .tray-zoom{padding-bottom:.05rem;padding-top:.05rem;pointer-events:auto}.excalidraw-container.theme--dark{background-color:#121212;color:#fff}.color-picker-content{max-height:10rem;overflow-y:auto}.excalidraw .FixedSideContainer_side_top{top:.3rem}.excalidraw .ToolIcon__keybinding{font-size:.45rem!important}.Island>.Stack>.Stack{padding:.2rem}label.color-input-container>input{max-width:5rem}.excalidraw .FixedSideContainer_side_top{bottom:10px!important;left:10px!important;right:10px!important;top:10px!important}.excalidraw-hidden{display:none!important}.excalidraw .panelColumn .buttonList{max-width:13rem}.excalidraw button{width:auto}.excalidraw input[type=color]{height:1.65rem;width:1.65rem}.excalidraw input[type=color]::-webkit-color-swatch{height:1.65rem}.excalidraw input[type=color]::-webkit-color-swatch-wrapper{padding:0}.excalidraw-settings input:not([type=color]){min-width:10em}div.excalidraw-draginfo{background:var(--color-base-40);border-radius:5px;color:var(--text-normal);display:block;padding:3px;position:absolute;z-index:1000}.excalidraw [data-radix-popper-content-wrapper]{position:absolute!important}.excalidraw__embeddable-container .view-header{display:none!important}.excalidraw__embeddable-container input{background:initial}.excalidraw .embeddable-menu{display:block;height:fit-content;position:absolute;width:fit-content;z-index:var(--zIndex-layerUI)}.excalidraw .welcome-screen-center__logo svg{wLine truncated
|
.App{font-family:sans-serif;text-align:center}.excalidraw-wrapper{background-color:var(--background-primary);height:100%;margin:0;position:relative}.context-menu-option__shortcut{background-color:transparent!important}.block-language-excalidraw{text-align:center}.excalidraw .github-corner{display:none}.excalidraw-embedded-img{width:100%}.excalidraw-svg-right-wrap{float:right;margin:0 0 20px 20px;width:100%}.excalidraw-svg-left-wrap{float:left;margin:0 35px 20px 0;width:100%}.excalidraw-svg-right{float:right}.excalidraw-svg-center{margin:auto;text-align:center;width:100%}.excalidraw-svg-left{float:left}div.excalidraw-svg-left,div.excalidraw-svg-right{display:table;width:100%}button.ToolIcon_type_button[title=Export]{display:none}.excalidraw-prompt-div{display:flex;max-width:800px}.excalidraw-prompt-form{display:flex;flex-grow:1}.excalidraw-prompt-input{flex-grow:1}.excalidraw-prompt-button{width:9em}.excalidraw-export-button{margin-left:10px;width:9em}.excalidraw-prompt-buttons-div{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-evenly}.excalidraw-export-buttons-div{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:right}li[data-testid]{border:0!important;margin:0!important;padding:0!important;width:100%!important}.excalidraw .context-menu-option-separator{margin:4px!important}.excalidraw .popover{background-color:transparent!important;border:0!important;box-shadow:0!important;overflow-y:auto!important;padding:0!important;position:fixed!important}.disable-zen-mode--visible{color:var(--text-primary-color)}.disable-zen-mode{width:9em!important}.ex-coffee-div{margin-bottom:10px;text-align:center}.excalidraw-scriptengine-install td>img{max-width:800px;width:100%}.excalidraw-scriptengine-install img.coffee{width:130px}.excalidraw-scriptengine-install tr{vertical-align:top}.excalidraw-scriptengine-install table{max-width:130ch}.excalidraw-scriptengine-install td.label{font-weight:700;min-width:11ch;padding-right:5px}.excalidraw-scriptengine-install td.data{width:100%}.excalidraw-scriptengine-install .modal-content{max-width:130ch;user-select:text}.excalidraw-scriptengine-install .modal{max-height:90%;width:auto}.excalidraw-prompt-center{text-align:center!important}.excalidraw-prompt-center button{margin:0 10px}.excalidraw-prompt-center.filepath{font-weight:700;margin-bottom:2em;text-align:center}.excalidraw-dirty{color:red}.workspace-leaf-content .excalidraw-view{overflow:hidden;padding:0 1px}.excalidraw-videoWrapper{max-width:600px}.excalidraw-videoWrapper.settings{max-width:340px}.excalidraw-videoWrapper div{height:0;margin:0 auto;padding-bottom:56.25%;position:relative}.excalidraw-videoWrapper.settings iframe{margin-bottom:1rem;position:relative}.excalidraw-videoWrapper iframe{height:100%;left:0;position:absolute;top:0;width:100%}.excalidraw-release .modal-content{margin-right:-5px;padding-right:5px;user-select:text}.excalidraw-release .modal{max-height:80%;max-width:42em}.excalidraw .Island .scrollbar{--scrollbar-thumb-bg:silver}.excalidraw .ToolIcon__icon img{height:1rem}.excalidraw-scriptengine-install tbody>tr>td>div>img{background-color:silver;height:20px;padding:2px}.excalidraw-scriptengine-install tbody>tr>td>div{display:inline-block;width:50px}.excalidraw-release p>a>img{width:100%}.excalidraw .context-menu-option{box-shadow:none}textarea.excalidraw-wysiwyg{border:none;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:none}.is-mobile .excalidraw button,.is-tablet .excalidraw button{height:1.8rem;padding:initial}.ToolIcon button,.excalidraw button{box-shadow:none;justify-content:normal}.excalidraw{--default-button-size:2rem!important;--default-icon-size:1rem!important;--lg-button-size:1.8rem!important;--lg-icon-size:1rem!important}.excalidraw .tray-zoom{padding-bottom:.05rem;padding-top:.05rem;pointer-events:auto}.excalidraw-container.theme--dark{background-color:#121212;color:#fff}.color-picker-content{max-height:10rem;overflow-y:auto}.excalidraw .FixedSideContainer_side_top{top:.3rem}.excalidraw .ToolIcon__keybinding{font-size:.45rem!important}.Island>.Stack>.Stack{padding:.2rem}label.color-input-container>input{max-width:5rem}.excalidraw .FixedSideContainer_side_top{bottom:10px!important;left:10px!important;right:10px!important;top:10px!important}.excalidraw-hidden{display:none!important}.excalidraw .App-mobile-menu .panelColumn,.excalidraw .App-toolbar-content .dropdown-menu,.excalidraw .selected-shape-actions .panelColumn{max-height:70vh;overflow-y:auto}.excalidraw .panelColumn .buttonList{max-width:13rem}.excalidraw button{width:auto}.excalidraw input[type=color]{height:1.65rem;width:1.65rem}.excalidraw input[type=color]::-webkit-color-swatch{height:1.65rem}.excalidraw input[type=color]::-webkit-color-swatch-wrapper{padding:0}.excalidraw-settings input[type=text]{min-width:10em}div.excalidraw-draginfo{background:var(--color-base-40);border-radius:5px;color:var(--text-normal);display:block;padding:3px;position:absolute;z-indexLine truncated
|
||||||
+314
-45179
File diff suppressed because it is too large.
Load diff
+4
-3
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"author": "Vinzent",
|
||||||
|
"authorUrl": "https://github.com/Vinzent03",
|
||||||
"id": "obsidian-git",
|
"id": "obsidian-git",
|
||||||
"name": "Git",
|
"name": "Git",
|
||||||
"description": "Backup your vault with Git.",
|
"description": "Integrate Git version control with automatic backup and other advanced features.",
|
||||||
"isDesktopOnly": false,
|
"isDesktopOnly": false,
|
||||||
"fundingUrl": "https://ko-fi.com/vinzent",
|
"fundingUrl": "https://ko-fi.com/vinzent",
|
||||||
"js": "main.js",
|
"version": "2.31.1"
|
||||||
"version": "2.24.1"
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PROMPT="$1"
|
||||||
|
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
echo "$PROMPT" > "$TEMP_FILE"
|
||||||
|
|
||||||
|
while [ ! -e "$TEMP_FILE.response" ]; do
|
||||||
|
if [ ! -e "$TEMP_FILE" ]; then
|
||||||
|
echo "Trigger file got removed: Abort" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
RESPONSE=$(cat "$TEMP_FILE.response")
|
||||||
|
|
||||||
|
echo "$RESPONSE"
|
||||||
+25
@@ -39,6 +39,10 @@
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.obsidian-git-disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
.obsidian-git-center-button {
|
.obsidian-git-center-button {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
@@ -77,6 +81,10 @@
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.is-active .git-tools .buttons > * {
|
||||||
|
color: var(--nav-item-color-active);
|
||||||
|
}
|
||||||
|
|
||||||
.git-author {
|
.git-author {
|
||||||
color: var(--text-accent);
|
color: var(--text-accent);
|
||||||
}
|
}
|
||||||
@@ -549,3 +557,20 @@
|
|||||||
padding: 0px 6px 0px 6px;
|
padding: 0px 6px 0px 6px;
|
||||||
white-space: pre; /* Keep spaces and do not collapse them. */
|
white-space: pre; /* Keep spaces and do not collapse them. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
/* hide git blame gutter not to superpose text */
|
||||||
|
.cm-gutterElement.obs-git-blame-gutter {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.git-unified-diff-view,
|
||||||
|
.git-split-diff-view .cm-deletedLine .cm-changedText {
|
||||||
|
background-color: #ee443330;
|
||||||
|
}
|
||||||
|
|
||||||
|
.git-unified-diff-view,
|
||||||
|
.git-split-diff-view .cm-insertedLine .cm-changedText {
|
||||||
|
background-color: #22bb2230;
|
||||||
|
}
|
||||||
+15
-1
@@ -5,11 +5,13 @@
|
|||||||
"taskFormat": "tasksPluginEmoji",
|
"taskFormat": "tasksPluginEmoji",
|
||||||
"setCreatedDate": false,
|
"setCreatedDate": false,
|
||||||
"setDoneDate": true,
|
"setDoneDate": true,
|
||||||
|
"setCancelledDate": true,
|
||||||
"autoSuggestInEditor": true,
|
"autoSuggestInEditor": true,
|
||||||
"autoSuggestMinMatch": 0,
|
"autoSuggestMinMatch": 0,
|
||||||
"autoSuggestMaxItems": 6,
|
"autoSuggestMaxItems": 6,
|
||||||
"provideAccessKeys": true,
|
"provideAccessKeys": true,
|
||||||
"useFilenameAsScheduledDate": false,
|
"useFilenameAsScheduledDate": false,
|
||||||
|
"filenameAsScheduledDateFormat": "",
|
||||||
"filenameAsDateFolders": [],
|
"filenameAsDateFolders": [],
|
||||||
"recurrenceOnNextLine": false,
|
"recurrenceOnNextLine": false,
|
||||||
"statusSettings": {
|
"statusSettings": {
|
||||||
@@ -56,6 +58,18 @@
|
|||||||
},
|
},
|
||||||
"debugSettings": {
|
"debugSettings": {
|
||||||
"ignoreSortInstructions": false,
|
"ignoreSortInstructions": false,
|
||||||
"showTaskHiddenData": false
|
"showTaskHiddenData": false,
|
||||||
|
"recordTimings": false
|
||||||
|
},
|
||||||
|
"loggingOptions": {
|
||||||
|
"minLevels": {
|
||||||
|
"": "info",
|
||||||
|
"tasks": "info",
|
||||||
|
"tasks.Cache": "info",
|
||||||
|
"tasks.Events": "info",
|
||||||
|
"tasks.File": "info",
|
||||||
|
"tasks.Query": "info",
|
||||||
|
"tasks.Task": "info"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+177
-108
@@ -7,7 +7,7 @@ if you want to view the source visit the plugins github repository
|
|||||||
License obsidian-tasks:
|
License obsidian-tasks:
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Martin Schenck and Clare Macrae
|
Copyright (c) 2021 Clare Macrae, Ilyas Landikov and Martin Schenck
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -122,14 +122,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";var uv=Object.create;var os=Object.defineProperty,lv=Object.defineProperties,cv=Object.getOwnPropertyDescriptor,dv=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertyNames,rh=Object.getOwnPropertySymbols,pv=Object.getPrototypeOf,ih=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable;var nh=(r,e,t)=>e in r?os(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,we=(r,e)=>{for(var t in e||(e={}))ih.call(e,t)&&nh(r,t,e[t]);if(rh)for(var t of rh(e))hv.call(e,t)&&nh(r,t,e[t]);return r},it=(r,e)=>lv(r,dv(e));var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),mv=(r,e)=>{for(var t in e)os(r,t,{get:e[t],enumerable:!0})},sh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fv(e))!ih.call(r,i)&&i!==t&&os(r,i,{get:()=>e[i],enumerable:!(n=cv(e,i))||n.enumerable});return r};var us=(r,e,t)=>(t=r!=null?uv(pv(r)):{},sh(e||!r||!r.__esModule?os(t,"default",{value:r,enumerable:!0}):t,r)),gv=r=>sh(os({},"__esModule",{value:!0}),r);var F=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Ee=_(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.matchAnyPattern=rn.extractTerms=rn.repeatedTimeunitPattern=void 0;function _v(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}rn.repeatedTimeunitPattern=_v;function ah(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}rn.extractTerms=ah;function vv(r){return`(?:${ah(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}rn.matchAnyPattern=vv});var ye=_((Qu,Xu)=>{(function(r,e){typeof Qu=="object"&&typeof Xu!="undefined"?Xu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Qu,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",h="date",T="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},C=function(B,A,E){var H=String(B);return!H||H.length>=A?B:""+Array(A+1-H.length).join(E)+B},N={s:C,z:function(B){var A=-B.utcOffset(),E=Math.abs(A),H=Math.floor(E/60),P=E%60;return(A<=0?"+":"-")+C(H,2,"0")+":"+C(P,2,"0")},m:function B(A,E){if(A.date()<E.date())return-B(E,A);var H=12*(E.year()-A.year())+(E.month()-A.month()),P=A.clone().add(H,l),Z=E-P<0,d=A.clone().add(H+(Z?-1:1),l);return+(-(H+(E-P)/(Z?P-d:d-P))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:l,y:f,w:u,d:o,D:h,h:a,m:s,s:i,ms:n,Q:c}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},L="en",oe={};oe[L]=D;var z=function(B){return B instanceof Ne},ie=function(B,A,E){var H;if(!B)return L;if(typeof B=="string")oe[B]&&(H=B),A&&(oe[B]=A,H=B);else{var P=B.name;oe[P]=B,H=P}return!E&&H&&(L=H),H||!E&&L},G=function(B,A){if(z(B))return B.clone();var E=typeof A=="object"?A:{};return E.date=B,E.args=arguments,new Ne(E)},j=N;j.l=ie,j.i=z,j.w=function(B,A){return G(B,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var Ne=function(){function B(E){this.$L=ie(E.locale,null,!0),this.parse(E)}var A=B.prototype;return A.parse=function(E){this.$d=function(H){var P=H.date,Z=H.utc;if(P===null)return new Date(NaN);if(j.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var d=P.match(y);if(d){var p=d[2]-1||0,m=(d[7]||"0").substring(0,3);return Z?new Date(Date.UTC(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)):new Date(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)}}return new Date(P)}(E),this.$x=E.x||{},this.init()},A.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},A.$utils=function(){return j},A.isValid=function(){return this.$d.toString()!==T},A.isSame=function(E,H){var P=G(E);return this.startOf(H)<=P&&P<=this.endOf(H)},A.isAfter=function(E,H){return G(E)<this.startOf(H)},A.isBefore=function(E,H){return this.endOf(H)<G(E)},A.$g=function(E,H,P){return j.u(E)?this[H]:this.set(P,E)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(E,H){var P=this,Z=!!j.u(H)||H,d=j.p(E),p=function(O,I){var me=j.w(P.$u?Date.UTC(P.$y,I,O):new Date(P.$y,I,O),P);return Z?me:me.endOf(o)},m=function(O,I){return j.w(P.toDate()[O].apply(P.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(I)),P)},g=Line truncated
|
/*
|
||||||
`).map(KM).filter(function(t){return t!==null});return lt(lt({},e[0]),e[1])}function ha(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],i=t[2];return n&&(e.tzid=n),e.dtstart=ca(i),e}function KM(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return QT(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return QT(r);case"DTSTART":return ha(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function QT(r){var e=r.replace(/^RRULE:/i,""),t=ha(e),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":t.freq=ae[o.toUpperCase()];break;case"WKST":t.wkst=Zt[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=QM(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=XM(o);break;case"DTSTART":case"TZID":var c=ha(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ca(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function QM(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(XT)}return XT(r)}function XT(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function XM(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Zt[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var i=Number(n[1]),s=n[2],a=Zt[s].weekday;return new je(a,i)})}var Wn=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=Di(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:$T(this.date,this.tzid)},r}();function ga(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(pa),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!fe(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!xe(o)||ut(o)&&!o.length)){switch(a){case"FREQ":u=$.FREQUENCIES[r.freq];break;case"WKST":It(o)?u=new je(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=IT(o).map(function(T){return T instanceof je?T:ut(T)?new je(T[0],T[1]):new je(T)}).toString();break;case"DTSTART":t=ZM(o,r.tzid);break;case"UNTIL":u=Di(o,!r.tzid);break;default:if(ut(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var f=e.map(function(T){var y=T[0],w=T[1];return"".concat(y,"=").concat(w.toString())}).join(";"),h="";return f!==""&&(h="RRULE:".concat(f)),[t,h].filter(function(T){return!!T}).join(`
|
License flatpickr (included library):
|
||||||
`)}function ZM(r,e){return r?"DTSTART"+new Wn(new Date(r),e).toString():""}function JM(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var ZT=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Wo(t):Gf(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,i=t?Object.keys(t):[],s=function(c){for(var f=0;f<i.length;f++){var h=i[f];if(!JM(t[h],c[h]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(ut(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 Yr(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return ut(n)?Gf(n):n instanceof Date?Wo(n):n},r}();var JT=M(M(M(M(M(M(M(M(M(M(M(M(M([],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),eb=M(M(M(M(M(M(M(M(M(M(M(M(M([],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),eC=Xt(1,29),tC=Xt(1,30),cn=Xt(1,31),ft=Xt(1,32),tb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ft,!0),tC,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft.slice(0,7),!0),rb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ft,!0),eC,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft.slice(0,7),!0),rC=Xt(-28,0),nC=Xt(-29,0),dn=Xt(-30,0),pt=Xt(-31,0),nb=M(M(M(M(M(M(M(M(M(M(M(M(M([],pt,!0),nC,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt.slice(0,7),!0),ib=M(M(M(M(M(M(M(M(M(M(M(M(M([],pt,!0),rC,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt.slice(0,7),!0),sb=[0,31,60,91,121,152,182,213,244,274,305,335,366],ab=[0,31,59,90,120,151,181,212,243,273,304,334,365],zf=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Xt(7));return r}();function ob(r,e){var t=vr(r,1,1),n=Oi(r)?366:365,i=Oi(r+1)?366:365,s=la(t),a=Wr(t),o=lt(lt({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},iC(r)),{wnomask:null});if(Ft(e.byweekno))return o;o.wnomask=ce(0,n+7);var u,l,c=u=dt(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+dt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),h=dt(l,7),T=Math.floor(f+h/4),y=0;y<e.byweekno.length;y++){var w=e.byweekno[y];if(w<0&&(w+=T+1),w>0&&w<=T){var D=void 0;w>1?(D=c+(w-1)*7,c!==u&&(D-=7-u)):D=c;for(var C=0;C<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==e.wkst);C++);}}if(fe(e.byweekno,1)){var D=c+T*7;if(c!==u&&(D-=7-u),D<n)for(var y=0;y<7&&(o.wnomask[D]=1,D+=1,o.wdaymask[D]!==e.wkst);y++);}if(c){var N=void 0;if(fe(e.byweekno,-1))N=-1;else{var L=Wr(vr(r-1,1,1)),oe=dt(7-L.valueOf()+e.wkst,7),z=Oi(r-1)?366:365,ie=void 0;oe>=4?(oe=0,ie=z+dt(L-e.wkst,7)):ie=n-c,N=Math.floor(52+dt(ie,7)/4)}if(fe(e.byweekno,N))for(var D=0;D<c;D++)o.wnomask[D]=1}return o}function iC(r){var e=Oi(r)?366:365,t=vr(r,1,1),n=Wr(t);return e===365?{mmask:JT,mdaymask:rb,nmdaymask:ib,wdaymask:zf.slice(n),mrange:ab}:{mmask:eb,mdaymask:tb,nmdaymask:nb,wdaymask:zf.slice(n),mrange:sb}}function ub(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===$.YEARLY)if(Ft(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(n.slice(e-1,e+1));else s.freq===$.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(Ft(o))return a;a.nwdaymask=ce(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],f=l[1]-1,h=0;h<s.bynweekday.length;h++){var T=void 0,y=s.bynweekday[h],w=y[0],D=y[1];D<0?(T=f+(D+1)*7,T-=dt(i[T]-w,7)):(T=c+(D-1)*7,T+=dt(7-i[T]+w,7)),c<=T&&T<=f&&(a.nwdaymask[T]=1)}return a}function lb(r,e){e===void 0&&(e=0);var t=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*t+n-s-u+15)%30,c=Math.floor(i/4),f=i%4,h=Math.floor(32+2*a+2*c-l-f)%7,T=Math.floor((t+11*l+22*h)/451),y=Math.floor((l+h-7*T+114)/31),w=(l+h-7*T+114)%31+1,D=Date.UTC(r,y-1,w+e),C=Date.UTC(r,0,1);return[Math.ceil((D-C)/(1e3*60*60*24))]}var sC=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=ob(e,n)),qe(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=ub(e,t,s,a,o,n)}xe(n.byeaster)&&(this.eastermask=lb(e,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,configurab
Line truncated
|
The MIT License (MIT)
|
||||||
`),n=0;n<t.length;){var i=t[n]=t[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function mC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function mb(r,e){return mC(e),r.split(",").map(function(t){return ca(t)})}function gb(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var i=e._rrule[n].origOptions[r];if(i)return i}}}var Kf=function(r){xi(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=gb.apply(n,["dtstart"]),n.tzid=gb.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return pb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){yb(t,this._rrule)},e.prototype.exrule=function(t){yb(t,this._exrule)},e.prototype.rdate=function(t){Tb(t,this._rdate)},e.prototype.exdate=function(t){Tb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Yo(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Yo(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(ga({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
|
|
||||||
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
|
Copyright (c) 2017 Gregory Petrosyan
|
||||||
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(bb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(bb("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
|
|
||||||
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}($);function yb(r,e){if(!(r instanceof $))throw new TypeError(String(r)+" is not RRule instance");fe(e.map(String),String(r))||e.push(r)}function Tb(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");fe(e.map(Number),Number(r))||(e.push(r),$r(e))}function bb(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return Di(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}function jr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var et=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=$.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new $(u);return new et({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){s instanceof Error&&console.log(s.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){let e=this.nextReferenceDate();if(e!==null){let t=null,n=null,i=null;if(this.referenceDate){if(this.startDate){let s=window.moment.duration(this.startDate.diff(this.referenceDate));t=window.moment(e),t.add(Math.round(s.asDays()),"days")}if(this.scheduledDate){let s=window.moment.duration(this.scheduledDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(s.asDays()),"days")}if(this.dueDate){let s=window.moment.duration(this.dueDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(s.asDays()),"days")}}return{startDate:t,scheduledDate:n,dueDate:i}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||jr(this.startDate,e.startDate)!==0||jr(this.scheduledDate,e.scheduledDate)!==0||jr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(){if(this.baseOnToday){let e=window.moment();return this.nextReferenceDateFromToday(e).toDate()}else return this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new $(it(we({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=et.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=et.nextAfterYears(e,n,t,a[1])),et.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyMonths(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyYears(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new $(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Go(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var fn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return fn.instance||(fn.instance=new fn),fn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(fn.empty)}isEmpty(){return this.get()===fn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Go(this.get())+"($|\\s)","ug");ret
Line truncated
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function gC(r,e,t,n){let i=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),s=[];if(r.includes(n.dueDateSymbol)||s.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||s.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||s.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),i(r)||(s.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),s.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),s.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),s.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),s.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||s.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Nt.parseDate("today",!0).format(V.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Zf(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=s.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?s:o}function yC(r,e,t,n,i){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=Zf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length<t.autoSuggestMinMatch)return[];let f=c&&c.length>1?Nt.parseDate(Si(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(V.dateFormat)}`,appendText:`${l} ${f.format(V.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,T=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);T.length===0&&(T=s.slice(0,i));for(let y of T){let D=`${Nt.parseDate(y,!0).format(V.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${D})`,appendText:`${l} ${D} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function TC(r,e,t,n){var u;let i=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=Zf(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length<t.autoSuggestMinMatch)return[];if(c.length>0){let y=(u=et.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let w=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:w,insertAt:o.index,insertSkip:o[0].length}),o[0]==w)return[]}}let f=1,h=t.autoSuggestMaxItems/2,T=i.filter(y=>c&&c.length>=f&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);T.length===0&&c.trim().length===0&&(T=i.slice(0,h));for(let y of T)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Zf(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i}function bC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([i,s])=>[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function vb(r,e){return(t,n,i)=>bC(t.slice(0,n),e)?r(t,n,i):[]}function wb(r,e){return ge.getInstance().includedIn(r)&&_C(r,e)}function _C(r,e){if(r.length===0)return!1;let t=le.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var pn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var $n=class{constructor(){this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideTags=!1}},hn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=ne
Line truncated
|
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}
|
\`\`\`${n}
|
||||||
flowchart LR
|
flowchart LR
|
||||||
|
|
||||||
@@ -146,11 +171,11 @@ ${s.join(`
|
|||||||
|
|
||||||
linkStyle default stroke:gray
|
linkStyle default stroke:gray
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`}addEdgeIfNotToInternal(e,t,n,i,s){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=Db(e.name),i=e.type;if(t){let s=Ho(e.symbol),a=Ho(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}<br>${o}<br>${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var lr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/lr.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*lr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*lr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*lr.startedCoefficient),e.priority){case"0":t+=1.5*lr.priorityCoefficient;break;case"1":t+=1*lr.priorityCoefficient;break;case"2":t+=.65*lr.priorityCoefficient;break;case"3":t+=.325*lr.priorityCoefficient;break;case"5":t-=.3*lr.priorityCoefficient;break}return t}},zr=lr;zr.dueCoefficient=12,zr.scheduledCoefficient=5,zr.startedCoefficient=-3,zr.priorityCoefficient=6,zr.milliSecondsPerDay=1e3*60*60*24;var ht=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new le(it(we({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new le(it(we({},i),{scheduledDateIsInferred:!1}))),i))}};var xb=require("obsidian");var Vr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var rt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(V.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(V.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Vr("Overdue",1):t.isSame(e,"day")?new Vr("Today",2):new Vr("Future",3):new Vr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Vr("",0);let t=this.fromNowOrder(e);return new Vr(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new xb.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Ci=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var Kr=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Kr.priorityNameUsingNone(e).replace("None","Normal")}};var wC=require("obsidian"),Ab=us(Cb());var tp=class extends Ab.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new rp(this,t,n)}onLogEntry(t){return thi
Line truncated
|
`}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
|
||||||
`),o=a.length,u=new ba(()=>ht.fromPath(i.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let h=f.position.start.line;if(h>=o)return this.logger.debug(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.line<h)&&(l=Bn.getSection(h,n.sections),c=0),l===null)continue;let T=a[h];if(T===void 0){this.logger.debug(`${i.path}: line ${h} - ignoring 'undefined' line.`);continue}let y;try{y=le.fromLine({line:T,taskLocation:new ct(i.path,h,l.position.start.line,c,Bn.getPrecedingHeader(h,n.headings)),fallbackDate:u.value})}catch(w){this.reportTaskParsingErrorToUser(w,i,f,T);continue}y!==null&&(c++,s.push(y))}return s}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault.
|
`),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.
|
||||||
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
|
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
|
||||||
Error: ${e}
|
Error: ${t}
|
||||||
File: ${t.path}
|
File: ${e}
|
||||||
Line number: ${n.position.start.line}
|
Line number: ${n.position.start.line}
|
||||||
Task line: ${i}
|
Task line: ${i}
|
||||||
|
|
||||||
@@ -165,37 +190,58 @@ Include:
|
|||||||
The error popup will only be shown when Tasks is starting up, but if the error persists,
|
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
|
it will be shown in the console every time this file is edited during the Obsidian
|
||||||
session.
|
session.
|
||||||
`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new Ai.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var hp=require("obsidian");var Qb=require("obsidian");function Qr(){}function ap(r){return r()}function Pb(){return Object.create(null)}function zn(r){r.forEach(ap)}function Ko(r){return typeof r=="function"}function Ib(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Fb(r){return Object.keys(r).length===0}var Lb=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,va=class{constructor(e){this.options=e,this._listeners="WeakMap"in Lb?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)va.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};va.entries="WeakMap"in Lb?new WeakMap:void 0;var Ub=!1;function kC(){Ub=!0}function SC(){Ub=!1}function R(r,e){r.appendChild(e)}function Fi(r,e,t){r.insertBefore(e,t||null)}function Vn(r){r.parentNode&&r.parentNode.removeChild(r)}function op(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function K(r){return document.createElement(r)}function OC(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function mt(r){return document.createTextNode(r)}function pe(){return mt(" ")}function Ot(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function qb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function U(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Wb(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function DC(r){return Array.from(r.childNodes)}function up(r,e){e=""+e,r.data!==e&&(r.data=e)}function cr(r,e){r.value=e==null?"":e}function lp(r,e,t){for(let n=0;n<r.options.length;n+=1){let i=r.options[n];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function $b(r){let e=r.querySelector(":checked");return e&&e.__value}function dr(r,e,t){r.classList[t?"add":"remove"](e)}var Hn=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=OC(t.nodeName):this.e=K(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Fi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Vn)}};var wa;function _a(r){wa=r}function xC(){if(!wa)throw new Error("Function called outside component initialization");return wa}function cp(r){xC().$$.on_mount.push(r)}var Ni=[];var Qo=[],Ii=[],Nb=[],RC=Promise.resolve(),sp=!1;function MC(){sp||(sp=!0,RC.then(Yb))}function Ea(r){Ii.push(r)}var ip=new Set,Pi=0;function Yb(){if(Pi!==0)return;let r=wa;do{try{for(;Pi<Ni.length;){let e=Ni[Pi];Pi++,_a(e),CC(e.$$)}}catch(e){throw Ni.length=0,Pi=0,e}for(_a(null),Ni.length=0,Pi=0;Qo.length;)Qo.pop()();for(let e=0;e<Ii.length;e+=1){let t=Ii[e];ip.has(t)||(ip.add(t),t())}Ii.length=0}while(Ni.length);for(;Nb.length;)Nb.pop()();sp=!1,ip.clear(),_a(r)}function CC(r){if(r.fragment!==null){r.update(),zn(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Ea)}}function AC(r){let e=[],t=[];Ii.forEach(n=>r.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Ii=e}var PC=new Set;function NC(r,e){r&&r.i&&(PC.delete(r),r.i(e))}var IC=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],UU=new Set([...IC]);function FC(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Ea(()=>{let a=r.$$.on_mount.map(ap).filter(Ko);r.$$.on_destroy?r.$$.on_destroy.push(...a):zn(a),r.$$.on_mount=[]}),s.forEach(Ea)}function Gb(r,e){let t=r.$$;t.fragment!==null&&(AC(t.after_update),zn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function LC(r,e){r.$$.dirty[0]===-1&&(Ni.push(r),MC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function jb(r,e,t,n,i,s,a,o=[-1]){let u=wa;_a(r);let l=r.$$={fragment:null,ctx:[],props:s,update:Qr,not_equal:i,bound:Pb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],a
Line truncated
|
`;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
|
||||||
<span class="accesskey-first">future</span> dates:`,Gp=pe(),mr=K("input"),jp=pe(),si=K("div"),Na=K("label"),Na.innerHTML='Stat<span class="accesskey">u</span>s',Bp=pe(),Gt=K("select");for(let Y=0;Y<vt.length;Y+=1)vt[Y].c();Hp=pe(),en=K("div"),rs=K("div"),Fa=K("label"),Fa.textContent="Completed:",zp=pe(),tn=K("input"),Vp=pe(),ns=K("div"),Hu=K("span"),Hu.textContent="Created on:",Kp=pe(),Ua=K("code"),Qp=pe(),is=K("div"),zu=K("span"),zu.textContent="Done on:",Xp=pe(),qa=K("code"),Zp=pe(),ai=K("div"),Sn=K("button"),Jp=mt("Apply"),eh=pe(),ss=K("button"),ss.textContent="Cancel",U(i,"for","description"),U(a,"id","description"),U(a,"class","tasks-modal-description"),U(a,"placeholder","Take out the trash"),U(a,"accesskey",o=r[15]("t")),U(n,"class","tasks-modal-section"),U(c,"for",h="priority-"+r[1].priority),U(l,"class","tasks-modal-section tasks-modal-priorities"),U(D,"for","recurrence"),U(D,"class","accesskey-first"),U(N,"id","recurrence"),U(N,"type","text"),U(N,"placeholder","Try 'every 2 weeks on Thursday'."),U(N,"accesskey",L=r[15]("r")),dr(N,"tasks-modal-error",!r[8]),j.a=null,U(Le,"for","due"),U(Le,"class","accesskey-first"),U(A,"id","due"),U(A,"type","text"),U(A,"placeholder",dp),U(A,"accesskey",E=r[15]("d")),dr(A,"tasks-modal-error",!r[7]),p.a=null,U(g,"for","scheduled"),U(g,"class","accesskey-first"),U(v,"id","scheduled"),U(v,"type","text"),U(v,"placeholder",dp),U(v,"accesskey",k=r[15]("s")),dr(v,"tasks-modal-error",!r[5]),me.a=null,U(te,"for","start"),U(q,"id","start"),U(q,"type","text"),U(q,"placeholder",dp),U(q,"accesskey",Re=r[15]("a")),dr(q,"tasks-modal-error",!r[3]),Ue.a=null,U(Aa,"for","forwardOnly"),U(mr,"id","forwardOnly"),U(mr,"type","checkbox"),U(mr,"class","task-list-item-checkbox tasks-modal-checkbox"),U(mr,"accesskey",Pa=r[15]("f")),U(w,"class","tasks-modal-section tasks-modal-dates"),U(Na,"for","status"),U(Gt,"id","status-type"),U(Gt,"class","dropdown"),U(Gt,"accesskey",Ia=r[15]("u")),r[1].status===void 0&&Ea(()=>r[39].call(Gt)),U(si,"class","tasks-modal-section"),U(Fa,"for","status"),U(tn,"id","status"),U(tn,"type","checkbox"),U(tn,"class","task-list-item-checkbox tasks-modal-checkbox"),tn.checked=La=r[1].status.isCompleted(),tn.disabled=!0,U(en,"class","tasks-modal-section tasks-modal-status"),Sn.disabled=Wa=!r[14],U(Sn,"type","submit"),U(Sn,"class","mod-cta"),U(ss,"type","button"),U(ai,"class","tasks-modal-section tasks-modal-buttons"),dr(t,"with-accesskeys",r[9]),U(e,"class","tasks-modal")},m(Y,he){Fi(Y,e,he),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),cr(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,f),R(l,T);for(let de=0;de<_t.length;de+=1)_t[de]&&_t[de].m(l,null);R(t,y),R(t,w),R(w,D),R(w,C),R(w,N),cr(N,r[1].recurrenceRule),R(w,oe),R(w,z),R(z,ie),R(z,G),j.m(r[12],z),R(w,Ne),R(w,Le),R(w,B),R(w,A),cr(A,r[1].dueDate),R(w,H),R(w,P),R(P,Z),R(P,d),p.m(r[6],P),R(w,m),R(w,g),R(w,b),R(w,v),cr(v,r[1].scheduledDate),R(w,x),R(w,S),R(S,O),R(S,I),me.m(r[4],S),R(w,se),R(w,te),R(w,De),R(w,q),cr(q,r[1].startDate),R(w,Ae),R(w,nt),R(nt,Mr),R(nt,We),Ue.m(r[2],nt),R(w,Yp),R(w,ts),R(ts,Aa),R(ts,Gp),R(ts,mr),mr.checked=r[1].forwardOnly,R(t,jp),R(t,si),R(si,Na),R(si,Bp),R(si,Gt);for(let de=0;de<vt.length;de+=1)vt[de]&&vt[de].m(Gt,null);lp(Gt,r[1].status,!0),R(t,Hp),R(t,en),R(en,rs),R(rs,Fa),R(rs,zp),R(rs,tn),R(en,Vp),R(en,ns),R(ns,Hu),R(ns,Kp),R(ns,Ua),Ua.innerHTML=r[11],R(en,Qp),R(en,is),R(is,zu),R(is,Xp),R(is,qa),qa.innerHTML=r[13],R(t,Zp),R(t,ai),R(ai,Sn),R(Sn,Jp),R(ai,eh),R(ai,ss),Vu||(th=[Ot(a,"input",r[30]),Ot(a,"keydown",r[23]),Ot(a,"paste",r[24]),Ot(a,"drop",r[24]),Ot(l,"keyup",r[21]),Ot(N,"input",r[34]),Ot(A,"input",r[35]),Ot(v,"input",r[36]),Ot(q,"input",r[37]),Ot(mr,"change",r[38]),Ot(Gt,"change",r[39]),Ot(ss,"click",r[22]),Ot(t,"submit",qb(r[25]))],Vu=!0)},p(Y,he){if(he[0]&32768&&o!==(o=Y[15]("t"))&&U(a,"accesskey",o),he[0]&3&&cr(a,Y[1].description),he[0]&3&&h!==(h="priority-"+Y[1].priority)&&U(c,"for",h),he[0]&1081346){oi=Y[20];let de;for(de=0;de<oi.length;de+=1){let as=Hb(Y,oi,de);_t[de]?_t[de].p(as,he):(_t[de]=zb(as),_t[de].c(),_t[de].m(l,null))}for(;de<_t.length;de+=1)_t[de].d(1);_t.length=oi.length}if(he[0]&32768&&L!==(L=Y[15]("r"))&&U(N,"accesskey",L),he[0]&3&&N.value!==Y[1].recurrenceRule&&cr(N,Y[1].recurrenceRule),he[0]&256&&dr(N,"tasks-modal-error",!Y[8]),he[0]&4096&&j.p(Y[12]),he[0]&32768&&E!==(E=Y[15]("d"))&&U(A,"accesskey",E),he[0]&3&&A.value!==Y[1].dueDate&&cr(A,Y[1].dueDate),he[0]&128&&dr(A,"tasks-modal-error",!Y[7]),he[0]&64&&p.p(Y[6]),he[0]&32768&&k!==(k=Y[15]("s"))&&U(v,"accesskey",k),he[0]&3&&v.value!==Y[1].scheduledDate&&cr(v,Y[1].scheduledDate),he[0]&32&&dr(v,"tasks-modal-error",!Y[5]),he[0]&16&&me.p(Y[4]),he[0]&32768&&Re!==(Re=Y[15]("a"))&&U(q,"accesskey",Re),he[0]&3&&q.value!==Y[1].startDate&&cr(q,Y[1].startDate),he[0]&8&&dr(q,"tasks-modal-error",!Y[3]),he[0]&4&&Ue.p(Y[2]),he[0]&32768&&Pa!==(Pa=Y[15]("f"))&&U(mr,"accesskey",Pa),he[0]&3&&(mr.checked=Y[1].forwardOnly),he[0]&1){ui=Y[0];let de;for(de=0;de<ui.length;de+=1){let as=Bb(Y,ui,de);vt[de]?vt[de].p(as,Line truncated
|
|
||||||
`);e.setLine(a,T)};new gn({app:n,task:u,onSubmit:l}).open()};var mp=require("obsidian");var Zb=(r,e,t)=>{var u;if(r)return t instanceof mp.MarkdownView;if(!(t instanceof mp.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=jC(a,n);e.setLine(s,o.text),e.setCursor(BC(i,o))},jC=(r,e)=>{let t=le.fromLine({line:r,taskLocation:ct.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(`
|
The task line not updated is:
|
||||||
`),moveTo:{line:n.length-1}}}else{let n=r.match(V.taskRegex);if(n!==null){let i=n[3],a=ve.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(V.taskRegex,`$1- [${a}] $4`)}}else if(V.listItemRegex.test(r)){let i=r.replace(V.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(V.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},BC=(r,e)=>{var s;let t={line:0,ch:r.ch},n=we(we({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(`
|
${r.originalMarkdown}
|
||||||
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Jo=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>Xb(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Zb})}};var HC=Object.prototype.toString,Ui=Array.isArray||function(e){return HC.call(e)==="[object Array]"};function yp(r){return typeof r=="function"}function zC(r){return Ui(r)?"array":typeof r}function gp(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Jb(r,e){return r!=null&&typeof r=="object"&&e in r}function VC(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var KC=RegExp.prototype.test;function QC(r,e){return KC.call(r,e)}var XC=/\S/;function ZC(r){return!QC(XC,r)}var JC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function eA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return JC[t]})}var tA=/\s*/,rA=/\s+/,e_=/\s*=/,nA=/\s*\}/,iA=/#|\^|\/|>|\{|&|=|!/;function sA(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var f,h,T;function y(j){if(typeof j=="string"&&(j=j.split(rA,2)),!Ui(j)||j.length!==2)throw new Error("Invalid tags: "+j);f=new RegExp(gp(j[0])+"\\s*"),h=new RegExp("\\s*"+gp(j[1])),T=new RegExp("\\s*"+gp("}"+j[1]))}y(e||Jt.tags);for(var w=new Sa(r),D,C,N,L,oe,z;!w.eos();){if(D=w.pos,N=w.scanUntil(f),N)for(var ie=0,G=N.length;ie<G;++ie)L=N.charAt(ie),ZC(L)?(s.push(i.length),u+=L):(o=!0,t=!0,u+=" "),i.push(["text",L,D,D+1]),D+=1,L===`
|
|
||||||
`&&(c(),u="",l=0,t=!1);if(!w.scan(f))break;if(a=!0,C=w.scan(iA)||"name",w.scan(tA),C==="="?(N=w.scanUntil(e_),w.scan(e_),w.scanUntil(h)):C==="{"?(N=w.scanUntil(T),w.scan(nA),w.scanUntil(h),C="&"):N=w.scanUntil(h),!w.scan(h))throw new Error("Unclosed tag at "+w.pos);if(C==">"?oe=[C,N,D,w.pos,u,l,t]:oe=[C,N,D,w.pos],l++,i.push(oe),C==="#"||C==="^")n.push(oe);else if(C==="/"){if(z=n.pop(),!z)throw new Error('Unopened section "'+N+'" at '+D);if(z[1]!==N)throw new Error('Unclosed section "'+z[1]+'" at '+D)}else C==="name"||C==="{"||C==="&"?o=!0:C==="="&&y(N)}if(c(),z=n.pop(),z)throw new Error('Unclosed section "'+z[1]+'" at '+w.pos);return oA(aA(i))}function aA(r){for(var e=[],t,n,i=0,s=r.length;i<s;++i)t=r[i],t&&(t[0]==="text"&&n&&n[0]==="text"?(n[1]+=t[1],n[3]=t[3]):(e.push(t),n=t));return e}function oA(r){for(var e=[],t=e,n=[],i,s,a=0,o=r.length;a<o;++a)switch(i=r[a],i[0]){case"#":case"^":t.push(i),n.push(i),t=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],t=n.length>0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function Sa(r){this.string=r,this.tail=r,this.pos=0}Sa.prototype.eos=function(){return this.tail===""};Sa.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Sa.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Li(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Li.prototype.push=function(e){return new Li(e,this)};Li.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(u=Jb(s,a[o])||VC(s,a[o])),s=s[a[o++]];else s=i.view[e],u=Jb(i.view,e);if(u){n=s;break}i=i.parent}t[e]=n}return yp(n)&&(n=n.call(this.view)),n};function Dt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Dt.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};Dt.prototype.parse=function(e,t){var n=this.templateCache,i=e+":"+(t||Jt.tags).join(":"),s=typeof n!="undefined",a=s?n.get(i):void 0;return a==null&&(a=sA(e,t),s&&n.set(i,a)),a};Dt.prototype.render=function(e,t,n,i){var s=this.getConfigTags(i),a=this.parse(e,s),o=t instanceof Li?t:new Li(t,void 0);return this.renderTokens(a,o,n,e,i)};Dt.prototype.renderTokens=function(e,t,n,i,s){for(var a="",o,u,l,c=0,f=e.length;c<f;++c)l=void 0,o=e[c],u=o[0],u==="#"?l=this.renderSection(o,t,n,i,s):u==="^"?l=this.renderInverted(o,t,n,i,s):u===">"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Dt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(h){return a.render(h,t,n,s)}if(!!u){if(Ui(u))for(var c=0,f=u.length;c<f;++c)o+=this.renderTokens(e[4],t.push(u[c]),n,i,s);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(e[4],t.push(u),n,i,s);else if(yp(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(t.view,i.slice(e[3],e[5]),l),u!=null&&(o+=u)}else o+=this.renderTokens(e[4],t,n,i,s);return o}};Dt.prototype.renderInverted=function(e,t,n,i,s){var a=t.lookup(e[1]);if(!a||Ui(a)&&a.length===0)return this.renderTokens(e[4],t,n,i,s)};Dt.prototype.indentPartial=function(e,t,n){for(var i=t.replace(/[^ \t]/g,""),s=e.split(`
|
In this markdown file:
|
||||||
|
"${r.taskLocation.path}"
|
||||||
|
|
||||||
|
Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated).
|
||||||
|
|
||||||
|
Recommendations:
|
||||||
|
|
||||||
|
1. Close all panes that have the above file open, and then re-open the file.
|
||||||
|
|
||||||
|
2. Check for exactly identical copies of the task line, in this file, and see if you can make them different.
|
||||||
|
`;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}.
|
||||||
|
Expected task:
|
||||||
|
${r.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(`
|
`),a=0;a<s.length;a++)s[a].length&&(a>0||!n)&&(s[a]=i+s[a]);return s.join(`
|
||||||
`)};Dt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=yp(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,s);return this.renderTokens(f,t,n,c,i)}}};Dt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Dt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Jt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Jt.escape?String(s):i(s)};Dt.prototype.rawValue=function(e){return e[1]};Dt.prototype.getConfigTags=function(e){return Ui(e)?e:e&&typeof e=="object"?e.tags:void 0};Dt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ui(e))return e.escape};var Jt={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){ka.templateCache=r},get templateCache(){return ka.templateCache}},ka=new Dt;Jt.clearCache=function(){return ka.clearCache()};Jt.parse=function(e,t){return ka.parse(e,t)};Jt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+zC(e)+'" was given as the first argument for mustache#render(template, view, partials)');return ka.render(e,t,n,i)};Jt.escape=eA;Jt.Scanner=Sa;Jt.Context=Li;Jt.Writer=Dt;var Tp=Jt;var s_=us(i_());function a_(r,e){Tp.escape=function(t){return t};try{return Tp.render(r,(0,s_.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders.
|
`)};Zt.prototype.renderPartial=function(t,e,n,i){if(!!n){var s=this.getConfigTags(i),a=hg(n)?n(t[1]):n[t[1]];if(a!=null){var o=t[6],u=t[5],l=t[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,e,n,c,i)}}};Zt.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Zt.prototype.escapedValue=function(t,e,n){var i=this.getConfigEscape(n)||Vr.escape,s=e.lookup(t[1]);if(s!=null)return typeof s=="number"&&i===Vr.escape?String(s):i(s)};Zt.prototype.rawValue=function(t){return t[1]};Zt.prototype.getConfigTags=function(t){return Ea(t)?t:t&&typeof t=="object"?t.tags:void 0};Zt.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Ea(t))return t.escape};var Vr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ru.templateCache=r},get templateCache(){return Ru.templateCache}},Ru=new Zt;Vr.clearCache=function(){return Ru.clearCache()};Vr.parse=function(t,e){return Ru.parse(t,e)};Vr.render=function(t,e,n,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+jF(t)+'" was given as the first argument for mustache#render(template, view, partials)');return Ru.render(t,e,n,i)};Vr.escape=zF;Vr.Scanner=Au;Vr.Context=ka;Vr.Writer=Zt;var gg=Vr;var Uk=oo(Lk());function Wk(r,t){gg.escape=function(e){return e};try{return gg.render(r,(0,Uk.default)(t))}catch(e){let n="";throw e instanceof Error?n=`There was an error expanding one or more placeholders.
|
||||||
|
|
||||||
The error message was:
|
The error message was:
|
||||||
${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=`
|
${e.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=`
|
||||||
|
|
||||||
The problem is in:
|
The problem is in:
|
||||||
${r}`,Error(n)}}function eu(r){return{query:{file:new Ci(r)}}}function Kn(r,e){let t=`Error: ${r}.
|
${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(`
|
||||||
The error message was:
|
`)}explainError(t){let e="";return e+=`Query has an error:
|
||||||
`,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Xr=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Xr.maybeReverse(i,n)}static maybeReverse(e,t){return e?Xr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var yn=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.grouper=n,this.reverse=i}};var ke=class{canCreateFilterForLine(e){return ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Go(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Xr(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new yn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Se=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Se("None of",e,"NOT")}static booleanXor(e){return new Se("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+" ";for(let i=0;i<this.children.length;i++)t+=`
|
`,e+=t.error+`
|
||||||
${this.children[i].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let i=t[0],s=t[1];if(i.symbol===n&&s.symbol==="")return i.children.push(s),i}return new Se(e,t,n)}};var gt=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
|
`,e}explainFilters(t){return t.filters.length===0?this.indent(`No filters supplied. All tasks will match the query.
|
||||||
`:`${e}${this.instruction} =>
|
`):t.filters.map(e=>e.explainFilterIndented(this.indentation)).join(`
|
||||||
${t.asString(e+" ")}
|
`)}explainGroups(t){return t.grouping.length===0?this.indent(`No grouping instructions supplied.
|
||||||
`}};var Er=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Er(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Er(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Er.fromObject(e.instruction,e))}static fromError(e,t){return new J(Er.fromError(e,t))}};var tu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new gt(e,this._filter,new Se(e))):J.fromError(e,`do not understand filter: ${e}`)}};var kr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new tu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var Tn=class extends ke{constructor(){super(...arguments);this._filters=new kr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Sr=class extends Tn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Sr.oldStatusName(e),i=Sr.oldStatusName(t);return n<i?1:n>i?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Sr.oldStatusName(e)]}};var ru=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted.
|
`):t.grouping.map(e=>this.indentation+e.instruction).join(`
|
||||||
|
`)+`
|
||||||
Possible causes:
|
`}explainSorters(t){return t.sorting.length===0?this.indent(`No sorting instructions supplied.
|
||||||
- The query is an a template file, and is not intended to be searched.
|
`):t.sorting.map(e=>this.indentation+e.instruction).join(`
|
||||||
- A command such as "Replace templates in the active file" needs to be run.
|
`)+`
|
||||||
- The core "Daily notes" plugin is in use, and the template contained
|
`}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)+`.
|
||||||
date calculations that it does not support.
|
`;n.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied).
|
||||||
- Some sample template text was accidentally pasted in to a tasks query,
|
`;n.push(this.indent(i))}return n.join(`
|
||||||
instead of in to a template file.
|
`)}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+=`
|
||||||
See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text
|
${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
|
||||||
`}};var yt=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new kr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var h;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.filter!==void 0)return i;let s=ke.getMatch(this.filterRegExp(),t);if(s===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(h=s[2])==null?void 0:h.toLowerCase(),u=s[3],l=Nt.parseDateRange(u);if(!l.isValid()){let T=Nt.parseDate(a);T.isValid()&&(l=new Et(T,T))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=yt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new gt(t,c,f))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,f=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&f.push(new Se(`OR no ${t} date`)),new Se(c,f)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>jr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}checkForUnexpandedTemplateText(t){return new ru().findUnexpandedDateText(t)}};var qi=class extends yt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var _p=class extends ke{createFilterOrErrorMessage(e){var n;let t=ke.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return J.fromFilter(new gt(e,o,new Se(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return _p.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Qn=_p;Qn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Wi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var $i=class extends Wi{constructor(t){super();this.stringToFind=t}matches(t){return $i.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Se(t)}};var bn=class extends Wi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new bn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions
|
|
||||||
|
|
||||||
Regular expressions must look like this:
|
Regular expressions must look like this:
|
||||||
/pattern/
|
/pattern/
|
||||||
@@ -221,83 +267,95 @@ to find them literally, you must add a \ before them:
|
|||||||
CAUTION! Regular expression (or 'regex') searching is a powerful
|
CAUTION! Regular expression (or 'regex') searching is a powerful
|
||||||
but advanced feature that requires thorough knowledge in order to
|
but advanced feature that requires thorough knowledge in order to
|
||||||
use successfully, and not miss intended search results.
|
use successfully, and not miss intended search results.
|
||||||
`}explanation(t){let i=uA(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function uA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Me=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),i=t[2],s=null;if(n.includes("include"))s=new $i(i);else if(n.includes("regex")){try{s=bn.validateAndConstruct(i)}catch(u){let l=Kn("Parsing regular expression",u)+`
|
`}explanation(e){let i=rL(e,"using regex: ",this.regexAsString());return new qe(i)}regexAsString(){let e=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:e+="no flags";break;case 1:e+=`flag '${this.regex.flags}'`;break;default:e+=`flags '${this.regex.flags}'`;break}return e}};function rL(r,t,e){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${t.padEnd(s)}${e}`}var mn=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.comparator=mn.maybeReverse(i,n)}static maybeReverse(t,e){return t?mn.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,n,i)=>t(e,n,i)*-1}};var Ai=class{constructor(t,e,n,i){this.instruction=t,this.property=e,this.grouper=n,this.reverse=i}};var Ue=class{canCreateFilterForLine(t){return Ue.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Si(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=Ue.getMatch(this.sorterRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new mn(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=Ue.getMatch(this.grouperRegExp(),t);if(e===null)return null;let n=!!e[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Ai(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var li=class{constructor(t,e){this._rawInstruction=t,this._anyContinuationLinesRemoved=e.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(t){this._anyPlaceholdersExpanded=t}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(t){function e(a,o){o!==a&&(s+=` =>
|
||||||
|
${t}${o}`)}let n=this._rawInstruction.trim(),i=n.split(`
|
||||||
|
`).join(`
|
||||||
|
`+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}
|
||||||
|
`:`${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)+`
|
||||||
|
|
||||||
${bn.helpMessage()}`;return J.fromError(e,l)}if(s===null)return J.fromError(e,`Invalid instruction: '${e}'
|
${Ri.helpMessage()}`;return ye.fromError(t,l)}if(s===null)return ye.fromError(t,`Invalid instruction: '${t}'
|
||||||
|
|
||||||
${bn.helpMessage()}`)}if(s===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new gt(e,this.getFilter(s,a),s.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Yi=class extends Me{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Gi=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var ji=class{static by(e,t){let n=[new Gi().comparator(),new Sr().comparator(),new qi().comparator(),new Qn().comparator(),new Yi().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(ji.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var nu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var iu=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;s<i;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let i=e[n];if(i!=this.lastHeadingAtLevel[n]){t.push(new nu(n,i,this.groupers[n].property));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var su=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,i]of this.children)e.push(n),i.generateAllPaths(e).forEach((a,o)=>t.set(o,a)),e.pop();return t}};var au=class extends su{},ou=class{constructor(e,t,n){this.root=new au(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let i of e){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new au([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var uu=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+`
|
${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.
|
||||||
`;return e}toString(){let e=`
|
|
||||||
`;e+=`Group names: [${this.groups}]
|
Possible causes:
|
||||||
`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName}
|
- The query is an a template file, and is not intended to be searched.
|
||||||
`;return e+=this.tasksAsStringOfLines(),e}};var Bi=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new ou(e,t,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any):
|
- A command such as "Replace templates in the active file" needs to be run.
|
||||||
`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i}
|
- The core "Daily notes" plugin is in use, and the template contained
|
||||||
`}for(let n of this.groups)e+=n.toString(),e+=`
|
date calculations that it does not support.
|
||||||
---
|
- Some sample template text was accidentally pasted in to a tasks query,
|
||||||
`;return e+=`
|
instead of in to a template file.
|
||||||
${this.totalTasksCount()} tasks
|
|
||||||
`,e}addTaskGroups(e){for(let[t,n]of e){let i=new uu(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a<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(e)}setGroupsHeadings(e){let t=new iu(e,this._groupers);for(let n of this._groups)n.setGroupHeadings(t.getHeadingsForTaskGroup(n.groups))}applyTaskLimit(e){this._groupers.length!==0&&(this._groups.forEach(t=>{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Xn=class extends Me{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Xn.cleanDescription(e.description),i=Xn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ge.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var lu=class extends yt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var cu=class extends yt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var du=class extends Tn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Oa=class extends Er{};function vp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?Oa.fromObject(e,i):Oa.fromError(e,"Error parsing group function")}catch(n){return Oa.fromError(e,Kn(`Failed parsing expression "${e}"`,n))}}function wp(r,e){let t=e.map(([n,i])=>i);return r(...t)}function Ep(r,e,t){try{return wp(r,e)}catch(n){return Kn(`Failed calculating expression "${t}"`,n)}}function fu(r,e){return[["task",r],["query",e?e.query:null]]}function o_(r,e,t){let n=fu(r,t||null),i=vp(n,e);return i.error?i.error:Ep(i.queryComponent,n,e)}var pu=class{constructor(e){this.line=e,this.functionOrError=vp(fu(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return wp(this.functionOrError.queryComponent,fu(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?Ep(this.functionOrError.queryComponent,fu(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var hu=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],i=new pu(n);return i.isValid()?J.fromFilter(new gt(e,lA(i),new Se(e))):J.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsGrouping(){return!0}createGrouperFromLine(e){let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new yn(e,"function",dA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function lA(r){return(e,t)=>{let n=t.queryContext();return cA(r,e,n)}}function cA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function dA(r){return(e,t)=>{let n=t.queryContext();return fA(e,r,n)}}function fA(r,e,t){try{let n=o_(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var mu=class extends Me{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var gu=class extends yt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var yu=class extends yt
Line truncated
|
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
|
||||||
|
|
||||||
|
The instruction was converted to the following simplified line:
|
||||||
|
${i.simplifiedLine}
|
||||||
|
|
||||||
|
Where the sub-expressions in the simplified line are:
|
||||||
|
${a}
|
||||||
|
|
||||||
|
For help, see:
|
||||||
|
https://publish.obsidian.md/tasks/Queries/Combining+Filters
|
||||||
|
`;return ye.fromError(e,u)}stringifySubExpressionsForErrorMessage(e){return Object.entries(e).map(([n,i])=>` '${n}': '${i}'
|
||||||
|
=> ${this.stringifySubExpressionStatus(i)}`).join(`
|
||||||
|
`)}stringifySubExpressionStatus(e){let n=Fu(e);return n?n.error?`ERROR:
|
||||||
|
${n.error.split(`
|
||||||
|
`).map(s=>s.trim()).join(`
|
||||||
|
`)}`:"OK":`ERROR:
|
||||||
|
do not understand query`}helpMessageFromSimpleError(e,n){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}'.
|
||||||
Allowed options: 'is' and 'is not' (without quotes).
|
Allowed options: 'is' and 'is not' (without quotes).
|
||||||
Allowed values: ${t}
|
Allowed values: ${e}
|
||||||
Note: values are case-insensitive,
|
Note: values are case-insensitive,
|
||||||
so 'in_progress' works too, for example.
|
so 'in_progress' works too, for example.
|
||||||
Example: ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=_n.groupName(e),i=_n.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[_n.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Ru=class extends Me{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var Mu=class extends Me{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Cu=class extends Me{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Au=class extends Me{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Pp=[()=>new xu,()=>new _n,()=>new Sr,()=>new bu,()=>new Qn,()=>new Tu,()=>new lu,()=>new yu,()=>new gu,()=>new qi,()=>new cu,()=>new Yi,()=>new Mu,()=>new Cu,()=>new Au,()=>new Xn,()=>new Zn,()=>new mu,()=>new du,()=>new Du,()=>new Gi,()=>new Ru,()=>new hu,()=>new Su];function Ou(r){for(let e of Pp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function w_(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Pp){let i=t().createSorterFromLine(r);if(i)return i}return null}function E_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Pp){let i=t().createGrouperFromLine(r);if(i)return i}return null}var vn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new vn(void 0,e)}queryContext(){return this.queryPath?eu(this.queryPath):void 0}};function k_(r){return`task${r!==1?"s":""}`}var ti=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${k_(e)}`:`${e} of ${t} ${k_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ti(new Bi([],[],vn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function S_(r){return r.endsWith("\\")}function O_(r){return r.endsWith("\\\\")}function qA(r){return r.replace(/^[ \t]*/,"")}function WA(r){return r.replace(/[ \t]*\\$/,"")}function $A(r,e){let t=r;return e&&(t=qA(r)),O_(t)?t=t.slice(0,-1):S_(r)&&(t=WA(t)),t}function YA(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function GA(r){let e=[],t=!1;for(let n of r.split(`
|
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
|
||||||
`)){let i=$A(n,t);YA(e,t,i),O_(n)?t=!1:t=S_(n)}return e.join(`
|
`;return t}toString(){let t=`
|
||||||
`)}function D_(r){return GA(r).split(`
|
`;t+=`Group names: [${this.groups}]
|
||||||
`).map(e=>e.trim()).filter(e=>e!=="")}var Ji=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(`
|
`;for(let e of this.groupHeadings)t+=`${"#".repeat(4+e.nestingLevel)} [${e.property}] ${e.displayName}
|
||||||
`)}explainError(e){let t="";return t+=`Query has an error:
|
`;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):
|
||||||
`,t+=e.error+`
|
`;for(let n of this._groupers){let i=n.reverse?" reverse":"";t+=`- ${n.property}${i}
|
||||||
`,t}explainFilters(e){return e.filters.length===0?this.indent(`No filters supplied. All tasks will match the query.
|
`}for(let n of this.groups)t+=n.toString(),t+=`
|
||||||
`):e.filters.map(n=>n.explainFilterIndented(this.indentation)).join(`
|
---
|
||||||
`)}explainGroups(e){let t=e.grouping.length;if(t===0)return this.indent(`No grouping instructions supplied.
|
`;return t+=`
|
||||||
`);let n="";for(let i=0;i<t;i++)n+=this.indentation+e.grouping[i].instruction+`
|
${this.totalTasksCount()} tasks
|
||||||
`;return n}explainSorters(e){let t=e.sorting.length;if(t===0)return this.indent(`No sorting instructions supplied.
|
`,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+`
|
||||||
`);let n="";for(let i=0;i<t;i++)n+=this.indentation+e.sorting[i].instruction+`
|
`;for(let a of s.split(`
|
||||||
`;return n}explainQueryLimits(e){function t(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let n=[];if(e.limit!==void 0){let i=t(e.limit)+`.
|
`)){let o=FL(a,e);e?(n+=`
|
||||||
`;n.push(this.indent(i))}if(e.taskGroupLimit!==void 0){let i=t(e.taskGroupLimit)+` per group (if any "group by" options are supplied).
|
`+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(`
|
||||||
`;n.push(this.indent(i))}return n.join(`
|
`).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 "}}"
|
||||||
`)}explainDebugSettings(){let e="",{debugSettings:t}=Q();return t.ignoreSortInstructions&&(e+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.
|
|
||||||
`)),e}indent(e){return this.indentation+e}};var Jr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new $n;this._queryLayoutOptions=new pn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),D_(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(i):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(i):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(i):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit(i);break;case this.parseSortBy(i):break;case this.parseGroupBy(i):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions(i);break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}formatQueryForLogging(){return`[${this.source.split(`
|
|
||||||
`).join(" ; ")}]`}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}"
|
|
||||||
but no file path has been supplied, so cannot expand placeholder values.
|
but no file path has been supplied, so cannot expand placeholder values.
|
||||||
The query is:
|
The query is:
|
||||||
${e}`,e;let n=e;if(t){let i=eu(t);try{n=a_(e,i)}catch(s){return s instanceof Error?this._error=s.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Jr(`${this.source}
|
${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}
|
||||||
${e.source}`,this.filePath)}explainQuery(){return new Ji().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get layoutOptions(){return this._layoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e}
|
${t.source}`,this.tasksFile)}explainQuery(){return new Da().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(t){this._filters.push(t)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(t,e){this._error=gn.generateErrorMessage(e,t)}static generateErrorMessage(t,e){return t.allLinesIdentical()?`${e}
|
||||||
Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new vn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=Q(),i=n.ignoreSortInstructions?e:ji.by(this.sorting,e),s=i.slice(0,this.limit),a=new Bi(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ti(a,i.length)}catch(n){let i="Search failed";return ti.fromError(Kn(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._layoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=Ou(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=w_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=E_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var wn=class{constructor(e=wn.empty){this._source=e}static getInstance(){return wn.instance||(wn.instance=new wn),wn.instance}set(e){this._source=e}query(e=void 0){return new Jr(this._source,e)}hasInstructions(){return this._source.trim()!==wn.empty}},tr=wn;tr.empty="";var Pu=class{constructor({obsidianEvents:e}){this.logger=St.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Ra=require("obsidian");var xa,Np,Ip,jA=["md"];function Fu(){return St.getLogger("tasks.File")}var x_=({metadataCache:r,vault:e,workspace:t})=>{xa=r,Np=e,Ip=t},ri=t=>F(void 0,[t],function*({originalTask:r,newTasks:e}){if(Np===void 0||xa===void 0||Ip===void 0){Nu("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=Fu(),i="replaceTaskWithTasks()";zo(n,i,r),Vo(n,i,e),M_({originalTask:r,newTasks:e,vault:Np,metadataCache:xa,workspace:Ip,previousTries:0})});function Nu(r){console.error(r),new Ra.Notice(r,15e3)}function R_(r){console.warn(r),new Ra.Notice(r,1e4)}function BA(r){Fu().debug(r)}var En=class extends Error{},Iu=class extends Error{},M_=a=>F(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=Fu();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>{if(s>10){let c=`Tasks: Could not find the correct task line to update.
|
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
|
||||||
|
<span class='flatpickr-weekday'>
|
||||||
|
`+g.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()}'.
|
||||||
|
|
||||||
The task line not updated is:
|
`);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:
|
||||||
${r.originalMarkdown}
|
|
||||||
|
|
||||||
In this markdown file:
|
|
||||||
"${r.taskLocation.path}"
|
|
||||||
|
|
||||||
Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated).
|
|
||||||
|
|
||||||
Recommendations:
|
|
||||||
|
|
||||||
1. Close all panes that have the above file open, and then re-open the file.
|
|
||||||
|
|
||||||
2. Check for exactly identical copies of the task line, in this file, and see if you can make them different.
|
|
||||||
`;Nu(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>{M_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},l)};try{let[l,c,f]=yield C_(r,t),h=[...f.slice(0,l),...e.map(T=>T.toFileLineString()),...f.slice(l+1)];yield t.modify(c,h.join(`
|
|
||||||
`))}catch(l){if(l instanceof En)return l.message&&R_(l.message),u();if(l instanceof Iu)return u();l instanceof Error&&Nu(l.message)}});function C_(r,e){return F(this,null,function*(){if(xa===void 0)throw new En;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ra.TFile))throw new En(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!jA.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=xa.getFileCache(t);if(n==null||n===null)throw new En(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new En(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(`
|
|
||||||
`),o=HA(r,a,i,BA);if(o===void 0)throw new Iu;return[o,t,a]})}function Fp(r,e){return F(this,null,function*(){try{let[t,n,i]=yield C_(r,e);return[t,n]}catch(t){t instanceof En?t.message&&R_(t.message):t instanceof Error&&Nu(t.message)}})}function A_(r,e){return r<e.length}function HA(r,e,t,n){let i=zA(r,e);return i!==void 0||(i=VA(r,e),i!==void 0)?i:KA(r,e,t,n)}function zA(r,e){let t=r.taskLocation.lineNumber;if(A_(t,e)&&e[t]===r.originalMarkdown)return Fu().debug(`Found original markdown at original line number ${t}`),t}function VA(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function KA(r,e,t,n){let i,s=0;for(let a of t){let o=a.position.start.line;if(!A_(o,e))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=e[o];if(ge.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}.
|
|
||||||
Expected task:
|
|
||||||
${r.originalMarkdown}
|
|
||||||
Found task:
|
|
||||||
${u}`);return}break}s++}}return i}var F_=require("obsidian");var I_=require("obsidian");var Lu=class{constructor(){this.data=QA}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}className(e){return this.data[e].className}},Lp=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){this.attributeName!==Lp.noAttributeName&&(e.dataset[this.attributeName]=this.attributeValueCalculator(n,t))}},Ce=Lp;Ce.noAttributeName="",Ce.noAttributeValueCalculator=()=>"",Ce.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=i,l)}let a=t[e];if(a instanceof window.moment){let o=s(a);if(o)return o}return""};var QA={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>Kr.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var P_=require("obsidian");function N_(r,e){return F(this,null,function*(){yield ri({originalTask:r,newTasks:e})})}var Uu=class extends P_.Menu{constructor(t){super();this.taskSaver=t}};var qu=class extends Uu{constructor(t,n,i=N_){super(i);this.statusRegistry=t;let s="Change status to:",a=(u,l,c,f)=>{let h=`${s} [${f}] ${c}`;l.setTitle(h).setChecked(f===u.status.symbol).onClick(()=>F(this,null,function*(){if(f!==u.status.symbol){let T=this.statusRegistry.bySymbol(f),y=u.handleNewStatusWithRecurrenceInUsersOrder(T);yield this.taskSaver(u,y)}}))},o=new Pe().coreStatuses.map(u=>u.symbol);for(let u of[!0,!1])for(let l of t.registeredStatuses)o.includes(l.symbol)===u&&this.addItem(c=>a(n,c,l.name,l.symbol))}};var Ma=new Lu,kn=class{static obsidianMarkdownRenderer(e,t,n,i){return F(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield I_.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=kn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,layoutOptions:i,queryLayoutOptions:s}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.layoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(e,t,n){return F(this,null,function*(){let i=document.createElement("li");this.parentUlElement.appendChild(i),i.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");i.appendChild(s),s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=document.createElement("input");return i.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();ri({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new qu(ve.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return F(this,null,function*(){let i=new hn(this.layoutOptions,this.queryLayoutOptions),s=Hr.tasksPluginEmoji.taskSerializer;for(let a of i.shownTaskLayoutComponents){let o=s.componentToString(e,i.queryLayoutOptions.shortMode,a);if(o){let u=document.createElement("span");t.appendChild(u);let l=document.createElement("span");u.appendChild(l),yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l);let c=Ma.className(a);u.classList.add(c),Ma.addDataAttribute(u,e,a),Ma.addDataAttribute(n,e,a)}}for(let a of i.hiddenTaskLayoutComponents)Ma.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&Ma.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return F(this,null,function*(){if(n==="description"){t=ge.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=Q();s.showTaskHiddenData&&(t+=`<br>\u{1F41B} <b>${i.lineNumber}</b> . ${i.sectionStart} . ${i.sectionIndex} . '<code>${i.originalMarkdown}</code>'<bLine truncated
|
|
||||||
`);if(T===void 0)return!1;let y=null;for(let D=0;D<T.length;D=D+1)if(T[D]!==""){y=T[D];break}return y===null?!1:ge.getInstance().includedIn(y)});if(i.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
|
|
||||||
`),u=0,l=[];for(let h=a.lineStart;h<=a.lineEnd;h++){let T=o[h];if(T===void 0)continue;let y=null,w=le.fromLine({line:T,taskLocation:new ct(s,h,a.lineStart,u,y),fallbackDate:null});w!==null&&(l.push(w),u++)}let c=new kn({obsidianComponent:n,parentUlElement:e,layoutOptions:new $n,queryLayoutOptions:new pn});for(let h=0;h<i.length;h++){let T=l[h],y=i[h];if(T===void 0||y===void 0)continue;let w=(f=y.getAttr("data-line"))!=null?f:"0",D=Number.parseInt(w,10),C=yield c.renderTaskLine(T,D),N=y.childNodes;for(let z=0;z<N.length;z=z+1){let ie=N[z];ie.nodeName.toLowerCase()==="div"?C.prepend(ie):ie.nodeName.toLowerCase()==="ul"&&C.append(ie)}let L=y.querySelectorAll("[data-footnote-id]"),oe=C.querySelectorAll("[data-footnote-id]");if(L.length===oe.length)for(let z=0;z<L.length;z++)oe[z].replaceWith(L[z]);y.replaceWith(C)}})}};var L_=require("@codemirror/view"),U_=require("obsidian");var q_=()=>L_.ViewPlugin.fromClass(Up),Up=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let h=`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(h),new U_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=le.fromLine({line:a.text,taskLocation:ct.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(h=>h.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var pr=require("obsidian");function W_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'.
|
|
||||||
|
|
||||||
`);let s=new Ji(" "),a=new Jr(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);i+=`Explanation of the global query:
|
|
||||||
|
|
||||||
${s.explainQuery(o)}
|
${s.explainQuery(o)}
|
||||||
`}return i+=`Explanation of this Tasks code block query:
|
`}return i+=`Explanation of this Tasks code block query:
|
||||||
|
|
||||||
${s.explainQuery(a)}`,i}function $u(r,e,t){let n=new Jr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function $_(r){for(let t of le.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function qp(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Y_(r,e,t,n){let i=r[e],s=new rt(i).postpone(t,n),a=ht.removeInferredStatusIfNeeded(r,[new le(it(we({},r),{[e]:s}))])[0];return{postponedDate:s,postponedTask:a}}function G_(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} postponed until ${t}`}function j_(r,e,t){return`\u2139\uFE0F ${Wp(r,e,t)} (right-click for more options)`}function Wp(r,e,t){function n(l){return l.charAt(0).toUpperCase()+l.slice(1)}let i=qp(r),s=r[i],o=new rt(s).postpone(t,e).format("ddd Do MMM"),u=e>1?e:"a";return s.isSameOrBefore(window.moment(),"day")?`${n(i.replace("Date",""))} in ${u} ${t}, on ${o}`:`Postpone ${i.replace("Date"," date")} by ${u} ${t}, to ${o}`}var Yu=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return F(this,null,function*(){n.addChild(new $p({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},$p=class extends pr.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=$u(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=$u(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=$u(this.source,tr.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return F(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(i);let s=this.query.applyQueryToTasks(t);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(i,s.searchErrorMessage);return}yield this.addAllTaskGroups(s.taskGroups,i);let a=s.totalTasksCount;this.addTaskCount(i,s),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`<pre>Tasks query: ${n.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=W_(this.source,ge.getInstance(),tr.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return F(this,null,function*(){let i=new hn(this.query.layoutOptions,this.query.queryLayoutOptions),s=n.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]),s.addClasses(i.taskListHiddenClasses);let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);let o=new kn({obsidianComponent:this,parentUlElement:s,layoutOptions:this.query.layoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(w=>w.remove());let T=f.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(T,l);let y=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(T,l,y,c),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(T,l),!this.query.queryLayoutOptions.hidePostponeButton&&$_(l)&&this.addPostponeButton(T,l,y),s.appendChild(f)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>F(this,null,function*(){yield ri({originalTask:n,newTasks:ht.removeInferredStatusIfNeeded(n,u)})});new gn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpaLine truncated
|
${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
|
||||||
`,this._markdown+=`${t}
|
`,this._markdown+=`${e}
|
||||||
`}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t}
|
`}addRow(t){let e=this.makeRowText(t);this._markdown+=`${e}
|
||||||
`}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t}
|
`}addRowIfNew(t){let e=this.makeRowText(t);this._markdown.includes(e)||(this._markdown+=`${e}
|
||||||
`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function B_(r,e){return r.findIndex(t=>t.symbol===e)}function XA(r,e){let t=X.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Rr(r.symbol)} is ${Rr(t)}: you may wish to review this type.`))}function ZA(r,e,t){let n=B_(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Rr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Rr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${Rr(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>");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function JA(r,e,t){let n=[];return e.symbol===X.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):B_(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Rr(e.symbol)}': this status will be ignored.`),n):(XA(e,n),ZA(r,e,n),n)}function H_(r){let e=new Gu(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Pe.allStatuses(r);return t.forEach((n,i)=>{e.addRow([Rr(n.symbol),Rr(n.nextStatusSymbol),n.name,Rr(n.type),JA(t,n,i).join("<br>")])}),e.markdown}function z_(r,e,t,n){let s=H_(r),a=e.mermaidDiagram(!0);return`# ${t}
|
`)}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}
|
||||||
|
|
||||||
## About this file
|
## About this file
|
||||||
|
|
||||||
@@ -326,14 +384,23 @@ ${s}
|
|||||||
<!-- Switch to Live Preview or Reading Mode to see the diagram. -->
|
<!-- Switch to Live Preview or Reading Mode to see the diagram. -->
|
||||||
|
|
||||||
These are the settings actually used by Tasks.
|
These are the settings actually used by Tasks.
|
||||||
${a}`}function Rr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function V_(){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 K_(){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 Q_(){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 X_(){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 Z_(){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 J_(){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 ev(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var tv=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.</p><p>You can
Line truncated
|
${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
|
||||||
`)+`
|
`)+`
|
||||||
|
|
||||||
Fix errors before saving.`;new hr.Notice(f);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?$t.removeValidationError(t):$t.setValidationError(t)}};var Yt=class extends be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return F(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new be.Setting(t).setName("Task Format").setDesc(Yt.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(i=>{for(let s of Object.keys(Hr))i.addOption(s,Hr[s].displayName);i.setValue(Q().taskFormat).onChange(s=>F(this,null,function*(){tt({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new be.Setting(t).setName("Global task filter").setDesc(Yt.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(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(ge.getInstance().get()).onChange(s=>F(this,null,function*(){tt({globalFilter:s}),ge.getInstance().set(s),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=Q();i.setValue(s.removeGlobalFilter).onChange(a=>F(this,null,function*(){tt({removeGlobalFilter:a}),ge.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),nP(new be.Setting(t).setDesc(Yt.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(i=>{let s=Q();i.inputEl.rows=4,i.setPlaceholder(`# For example...
|
Fix errors before saving.`;new Tn.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,n){n.length===0?Sr.removeValidationError(e):Sr.setValidationError(e)}};var Jt=class extends ke.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e}saveSettings(e){return F(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new ke.Setting(e).setName("Task Format").setDesc(Jt.createFragmentWithHTML('<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/
|
path does not include _templates/
|
||||||
limit 300
|
limit 300
|
||||||
show urgency`).setValue(s.globalQuery).onChange(a=>F(this,null,function*(){tt({globalQuery:a}),tr.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=Q();tv.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new be.Setting(t).setName("Set created date on every added task").setDesc(Yt.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(i=>{let s=Q();i.setValue(s.setCreatedDate).onChange(a=>F(this,null,function*(){tt({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Set done date on every completed task").setDesc(Yt.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(i=>{let s=Q();i.setValue(s.setDoneDate).onChange(a=>F(this,null,function*(){tt({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Yt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>F(this,null,function*(){tt({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>F(this,null,function*(){let s=Q();yield this.plugin.saveSettings(),i.setValue(Yt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>F(this,null,function*(){let o=Yt.parseCommaSeparatedFolders(a);tt({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new be.Setting(t).setName("Next recurrence appears on the line below").setDesc(Yt.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(i=>{let{recurrenceOnNextLine:s}=Q();i.setValue(s).onChange(a=>F(this,null,function*(){tt({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new be.Setting(t).setName("Auto-suggest task content").setDesc(Yt.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(i=>{let s=Q();i.setValue(s.autoSuggestInEditor).onChange(a=>F(this,null,function*(){tt({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=Q();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=Q();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new be.Setting(t).setName("Provide access keys in dialogs").setDesc(Yt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.provideAccessKeys).o
Line truncated
|
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
|
||||||
`);t(o)}).open(),n};var sv=(r,e)=>{let t=Zo({line:"",path:""});return new gn({app:r,task:t,onSubmit:e})};var av=r=>({createTaskLineModal:()=>iv(r,sv)});var Bu=class extends ov.Plugin{get apiV1(){return av(app)}onload(){return F(this,null,function*(){St.registerConsoleLogger(),np("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=Q();St.configure(t),this.addSettingTab(new Ca({plugin:this})),x_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Pu({obsidianEvents:this.app.workspace});this.cache=new Bn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new Wu({plugin:this}),this.queryRenderer=new Yu({plugin:this,events:n}),this.registerEditorExtension(q_()),this.registerEditorSuggest(new ju(this.app,Q())),new Jo({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:t}=Q();Pe.applyToStatusRegistry(t,ve.getInstance())})}onunload(){var t;np("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return F(this,null,function*(){let t=yield this.loadData();tt(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(Q())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}};
|
|
||||||
|
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}'
|
||||||
|
|
||||||
|
task line in editor: '${_}'
|
||||||
|
|
||||||
|
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
|
* EventEmitter2
|
||||||
* https://github.com/hij1nx/EventEmitter2
|
* https://github.com/hij1nx/EventEmitter2
|
||||||
@@ -345,3 +412,5 @@ show urgency`).setValue(s.globalQuery).onChange(a=>F(this,null,function*(){tt({g
|
|||||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||||
* http://github.com/janl/mustache.js
|
* http://github.com/janl/mustache.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* nosourcemap */
|
||||||
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-tasks-plugin",
|
"id": "obsidian-tasks-plugin",
|
||||||
"name": "Tasks",
|
"name": "Tasks",
|
||||||
"version": "5.4.0",
|
"version": "7.14.0",
|
||||||
"minAppVersion": "1.1.1",
|
"minAppVersion": "1.1.1",
|
||||||
"description": "Task management for Obsidian",
|
"description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.",
|
||||||
"helpUrl": "https://publish.obsidian.md/tasks/",
|
"helpUrl": "https://publish.obsidian.md/tasks/",
|
||||||
"author": "Martin Schenck and Clare Macrae",
|
"author": "Clare Macrae and Ilyas Landikov (created by Martin Schenck)",
|
||||||
"authorUrl": "https://github.com/obsidian-tasks-group",
|
"authorUrl": "https://github.com/obsidian-tasks-group",
|
||||||
"fundingUrl": "https://github.com/sponsors/claremacrae",
|
"fundingUrl": "https://github.com/sponsors/claremacrae",
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
|
|||||||
+1
-356
@@ -1,356 +1 @@
|
|||||||
:root {
|
@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 #e6e6e6,-1px 0 #e6e6e6,0 1px #e6e6e6,0 -1px #e6e6e6,0 3px 13px #00000014}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:#000000e6;fill:#000000e6;height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:#000000e6;fill:#000000e6}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-heLine truncated
|
||||||
--tasks-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z'/></svg>");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fix indentation of wrapped task lines in Tasks search results, when in Live Preview. */
|
|
||||||
ul.contains-task-list .task-list-item-checkbox {
|
|
||||||
margin-inline-start: calc(var(--checkbox-size) * -1.5) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.plugin-tasks-query-explanation{
|
|
||||||
/* Prevent long explanation lines wrapping, so they are more readable,
|
|
||||||
especially on small screens.
|
|
||||||
|
|
||||||
A horizontal scroll bar will be displayed, if the explanation
|
|
||||||
is too wide to fit.
|
|
||||||
*/
|
|
||||||
--code-white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-count {
|
|
||||||
color: var(--text-faint);
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tooltip pop up above the description in short mode */
|
|
||||||
.tooltip.pop-up {
|
|
||||||
animation: pop-up-animation 200ms forwards ease-in-out;
|
|
||||||
}
|
|
||||||
@keyframes pop-up-animation {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-100%) scale(1);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
opacity: 0.7;
|
|
||||||
transform: translateY(-100%) scale(1.02);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(-100%) scale(1.05);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(-100%) scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Pencil icon. */
|
|
||||||
.tasks-edit {
|
|
||||||
background-color: var(--text-faint);
|
|
||||||
mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
|
||||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
|
||||||
mask-size: contain;
|
|
||||||
-webkit-mask-size: contain;
|
|
||||||
display: inline-block;
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-left: 0.5em;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Urgency score */
|
|
||||||
.tasks-urgency {
|
|
||||||
font-size: var(--font-ui-smaller);
|
|
||||||
font-family: var(--font-interface);
|
|
||||||
padding: 2px 6px;
|
|
||||||
border-radius: var(--radius-s);
|
|
||||||
color: var(--text-normal);
|
|
||||||
background-color: var(--background-secondary);
|
|
||||||
margin-left: 0.5em;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.internal-link.internal-link-short-mode {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Postpone icon. */
|
|
||||||
.tasks-postpone {
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
font-size: var(--font-text-size);
|
|
||||||
background-color: transparent;
|
|
||||||
display: contents;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-list-text {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-list-text .tooltip {
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide tags that Obsidian recognises, if `hide tags` instruction was used. */
|
|
||||||
.tasks-layout-hide-tags .task-description a.tag {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Workaround for issue #2073: Enabling the plugin causes blockIds to be not hidden in reading view
|
|
||||||
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2073 */
|
|
||||||
.task-list-item .task-block-link{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-setting-important {
|
|
||||||
color: red;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**------------------------------------------------------------------------
|
|
||||||
** MODAL
|
|
||||||
*------------------------------------------------------------------------**/
|
|
||||||
|
|
||||||
.tasks-modal-section + .tasks-modal-section {
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-section label {
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-section label > span {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal .with-accesskeys .accesskey-first::first-letter,
|
|
||||||
.tasks-modal .with-accesskeys .accesskey {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-underline-offset: 1pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-buttons {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 3fr 1fr;
|
|
||||||
column-gap: .5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal label + input[type="checkbox"] {
|
|
||||||
margin-left: 0.67em;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal input[type="text"] {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal textarea {
|
|
||||||
width: 100%;
|
|
||||||
min-height: calc(var(--input-height) * 2);
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 4em 8em 8em 8em;
|
|
||||||
grid-column-gap: 1.33em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities span {
|
|
||||||
line-height: 1.41;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities label {
|
|
||||||
border-radius: var(--input-radius);
|
|
||||||
padding: 2px 3px;
|
|
||||||
grid-column: 1;
|
|
||||||
grid-row-start: 1;
|
|
||||||
grid-row-end: 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities input:focus + label {
|
|
||||||
box-shadow: 0 0 0 2px var(--background-modifier-border-focus);
|
|
||||||
border-color: var(--background-modifier-border-focus);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities input:checked + label > span {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-priorities input:not(:checked) + label > span:nth-child(4) {
|
|
||||||
filter: grayscale(100%) opacity(60%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-dates {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 5.5em auto;
|
|
||||||
column-gap: .5em;
|
|
||||||
row-gap: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-dates > label {
|
|
||||||
grid-column: 1;
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-dates > input, .tasks-modal-dates > code {
|
|
||||||
grid-column: 2;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-dates > code {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-dates > div {
|
|
||||||
grid-column-start: 1;
|
|
||||||
grid-column-end: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-status {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal-error {
|
|
||||||
border: 1px solid red !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-modal button:disabled {
|
|
||||||
pointer-events: none !important;
|
|
||||||
opacity: 0.3 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 649px) {
|
|
||||||
.tasks-modal-priorities {
|
|
||||||
grid-template-columns: 4em 7.5em 5em;
|
|
||||||
margin-bottom: -10px;
|
|
||||||
}
|
|
||||||
.tasks-modal-priorities > label {
|
|
||||||
grid-row: 1 / span 7;
|
|
||||||
}
|
|
||||||
.tasks-modal-dates {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
.tasks-modal-dates > label {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.tasks-modal-dates > input, .tasks-modal-dates > code {
|
|
||||||
grid-column: 1;
|
|
||||||
}
|
|
||||||
.tasks-modal-dates > div {
|
|
||||||
grid-column-end: 1;
|
|
||||||
}
|
|
||||||
.tasks-modal-status {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 399px) {
|
|
||||||
.tasks-modal-priorities {
|
|
||||||
grid-template-columns: 4em auto;
|
|
||||||
}
|
|
||||||
.tasks-modal-priorities > label {
|
|
||||||
grid-row: 1 / span 7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 259px) {
|
|
||||||
.tasks-modal-priorities {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.tasks-modal-priorities > label {
|
|
||||||
grid-row: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**------------------------------------------------------------------------
|
|
||||||
** SETTINGS
|
|
||||||
*------------------------------------------------------------------------**/
|
|
||||||
|
|
||||||
.tasks-settings-is-invalid {
|
|
||||||
/* Dark red text on pale background*/
|
|
||||||
color: var(--text-error) !important;
|
|
||||||
background-color: rgba(var(--background-modifier-error-rgb), 0.2) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.tasks-settings .additional {
|
|
||||||
margin: 6px 12px;
|
|
||||||
}
|
|
||||||
.tasks-settings .additional > .setting-item {
|
|
||||||
border-top: 0;
|
|
||||||
padding-top: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.tasks-settings details > summary {
|
|
||||||
outline: none;
|
|
||||||
display: block !important;
|
|
||||||
list-style: none !important;
|
|
||||||
list-style-type: none !important;
|
|
||||||
min-height: 1rem;
|
|
||||||
border-top-left-radius: 0.1rem;
|
|
||||||
border-top-right-radius: 0.1rem;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-settings details > summary::-webkit-details-marker,
|
|
||||||
.tasks-settings details > summary::marker {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-settings details > summary > .collapser {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
right: 8px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-settings details > summary > .collapser > .handle {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
transition: transform 0.25s;
|
|
||||||
background-color: currentColor;
|
|
||||||
-webkit-mask-repeat: no-repeat;
|
|
||||||
mask-repeat: no-repeat;
|
|
||||||
-webkit-mask-size: contain;
|
|
||||||
mask-size: contain;
|
|
||||||
-webkit-mask-image: var(--tasks-details-icon);
|
|
||||||
mask-image: var(--tasks-details-icon);
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-settings details[open] > summary > .collapser > .handle {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-nested-settings .setting-item {
|
|
||||||
border: 0px;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
.tasks-nested-settings {
|
|
||||||
padding-bottom: 18px;
|
|
||||||
}
|
|
||||||
.tasks-nested-settings[open] .setting-item-heading,
|
|
||||||
.tasks-nested-settings:not(details) .setting-item-heading {
|
|
||||||
border-top: 0px;
|
|
||||||
border-bottom: 1px solid var(--background-modifier-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tasks-settings .row-for-status {
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
+196
-28927
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"description": "Improved table navigation, formatting, manipulation, and formulas",
|
"description": "Improved table navigation, formatting, manipulation, and formulas",
|
||||||
"isDesktopOnly": false,
|
"isDesktopOnly": false,
|
||||||
"minAppVersion": "1.0.0",
|
"minAppVersion": "1.0.0",
|
||||||
"version": "0.20.0",
|
"version": "0.22.1",
|
||||||
"js": "main.js",
|
"js": "main.js",
|
||||||
"fundingUrl": {
|
"fundingUrl": {
|
||||||
"Github Sponsor": "https://github.com/sponsors/tgrosinger",
|
"Github Sponsor": "https://github.com/sponsors/tgrosinger",
|
||||||
|
|||||||
Vendored
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"types": {
|
||||||
|
"aliases": "aliases",
|
||||||
|
"cssclasses": "multitext",
|
||||||
|
"tags": "tags",
|
||||||
|
"excalidraw-plugin": "text",
|
||||||
|
"excalidraw-export-transparent": "checkbox",
|
||||||
|
"excalidraw-mask": "checkbox",
|
||||||
|
"excalidraw-export-dark": "checkbox",
|
||||||
|
"excalidraw-export-padding": "number",
|
||||||
|
"excalidraw-export-pngscale": "number",
|
||||||
|
"excalidraw-export-embed-scene": "checkbox",
|
||||||
|
"excalidraw-link-prefix": "text",
|
||||||
|
"excalidraw-url-prefix": "text",
|
||||||
|
"excalidraw-link-brackets": "checkbox",
|
||||||
|
"excalidraw-onload-script": "text",
|
||||||
|
"excalidraw-linkbutton-opacity": "number",
|
||||||
|
"excalidraw-default-mode": "text",
|
||||||
|
"excalidraw-font": "text",
|
||||||
|
"excalidraw-font-color": "text",
|
||||||
|
"excalidraw-border-color": "text",
|
||||||
|
"excalidraw-css": "text",
|
||||||
|
"excalidraw-autoexport": "text",
|
||||||
|
"excalidraw-embeddable-theme": "text",
|
||||||
|
"excalidraw-open-md": "checkbox"
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+2
-14
@@ -134,21 +134,9 @@
|
|||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "Plugins"
|
"title": "Plugins"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "b04c1828020f00d9",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "release-notes",
|
|
||||||
"state": {
|
|
||||||
"currentVersion": "1.8.4"
|
|
||||||
},
|
|
||||||
"icon": "lucide-book-up",
|
|
||||||
"title": "Release Notes 1.8.4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentTab": 9
|
"currentTab": 8
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "vertical"
|
"direction": "vertical"
|
||||||
@@ -328,7 +316,7 @@
|
|||||||
"workspaces:Manage workspace layouts": false
|
"workspaces:Manage workspace layouts": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "b04c1828020f00d9",
|
"active": "a19912f11b8730a4",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Geschäft/IT/Online Shop/Shopware 6/TopM - Migration.md",
|
"Geschäft/IT/Online Shop/Shopware 6/TopM - Migration.md",
|
||||||
"Geschäft/IT/Online Shop/Shopware 6/Plugins.md",
|
"Geschäft/IT/Online Shop/Shopware 6/Plugins.md",
|
||||||
|
|||||||
Reference in new issue
Block a user