From 52ee531ea9bf03fda1b176e719040d2b994d3a74 Mon Sep 17 00:00:00 2001 From: iOS Date: Sun, 1 Oct 2023 22:48:42 +0200 Subject: [PATCH] sunday funday --- .obsidian/plugins/auto-card-link/main.js | 15 + .../plugins/auto-card-link/manifest.json | 2 +- .obsidian/plugins/auto-card-link/styles.css | 3 +- .obsidian/plugins/cron/data.json | 2 +- .obsidian/plugins/dataview/main.js | 4 +- .obsidian/plugins/dataview/manifest.json | 2 +- .obsidian/plugins/emoji-shortcodes/data.json | 6 +- .obsidian/plugins/meld-encrypt/main.js | 6 +- .obsidian/plugins/meld-encrypt/manifest.json | 2 +- .../obsidian-activity-history/data.json | 28 +- .obsidian/plugins/obsidian-commits/data.json | 335 ++++++++------- .../obsidian-reminder-plugin/data.json | 105 +++-- .../plugins/obsidian-tasks-plugin/main.js | 122 +++--- .../obsidian-tasks-plugin/manifest.json | 2 +- .obsidian/plugins/quickadd/data.json | 2 +- .obsidian/plugins/quickadd/main.js | 43 +- .obsidian/plugins/quickadd/manifest.json | 2 +- .obsidian/plugins/templater-obsidian/main.js | 304 ++++---------- .../plugins/templater-obsidian/manifest.json | 2 +- .../plugins/templater-obsidian/styles.css | 145 ++----- .obsidian/workspace-mobile.json | 64 +-- 00.01 Admin/Calendars/2023-09-14.md | 4 +- 00.01 Admin/Calendars/2023-09-20.md | 4 +- 00.01 Admin/Calendars/2023-09-22.md | 2 +- 00.01 Admin/Calendars/2023-09-25.md | 4 +- 00.01 Admin/Calendars/2023-09-26.md | 136 ++++++ 00.01 Admin/Calendars/2023-09-27.md | 136 ++++++ 00.01 Admin/Calendars/2023-09-28.md | 136 ++++++ 00.01 Admin/Calendars/2023-09-29.md | 134 ++++++ 00.01 Admin/Calendars/2023-09-30.md | 134 ++++++ 00.01 Admin/Calendars/2023-10-01.md | 135 ++++++ ...24-06-08 💍 Mariage Rémi & Séverine.md | 22 + 00.01 Admin/Templates/Template Source.md | 2 +- 00.02 Inbox/Le Camp des Saints.md | 2 +- ...s Exchange for Her Daughter’s Future.md | 2 +- ...s Two Decades of Power, Bluster and Ego.md | 271 ++++++++++++ ...Confessions of a McKinsey Whistleblower.md | 4 +- ...lorida has become a zoo. A literal zoo..md | 28 +- 00.03 News/How Hip-Hop Conquered the World.md | 66 +-- ... in a Jungle That Tried to Eat Me Alive.md | 2 +- ...ungeons & Dragons on Texas’ Death Row.md | 18 +- ...Prison Stole Millions from Billionaires.md | 2 +- ...h the Treacherous Currents of Hell Gate.md | 137 ++++++ ...llain for Michael Jordan to Be the Hero.md | 75 ++++ ...avid Foster Wallace · LRB 13 July 2023.md | 2 +- ...de. Her mother vowed to find the truth..md | 2 +- ...kel Prevented Ukraine's NATO Membership.md | 396 ++++++++++++++++++ ...hase to Settle With Epstein’s Victims.md | 2 +- 00.03 News/The Greatest Scam Ever Written.md | 2 +- ... Case That Could Unravel an Art Dynasty.md | 2 +- ...The Serial Killer Hiding in Plain Sight.md | 2 +- 00.03 News/The Source Years.md | 26 +- 00.03 News/The inequality of heat.md | 317 ++++++++++++++ ...ard-core world of Canadian cheerleading.md | 2 +- ...iller and the Texas Mom Who Stopped Him.md | 2 +- 01.01 Life Orga/@Lifestyle.md | 4 +- 01.02 Home/Bandes Dessinées.md | 5 + 01.02 Home/Household.md | 70 +--- 01.02 Home/League Tables.md | 6 +- 01.03 Family/Auguste Bédier.md | 3 +- 01.07 Animals/2023-07-13 Health check.md | 3 +- 01.07 Animals/@Sally.md | 5 +- 02.02 Paris/@Restaurants Paris.md | 1 - ...erstable.md => William's ButchersTable.md} | 16 +- 03.01 Reading list/@Reading master.md | 4 +- .../Le Temps gagné.md | 4 +- 03.01 Reading list/On the Road.md | 2 +- 03.04 Cinematheque/John Wick (2014).md | 2 +- .../John Wick - Chapter 2 (2017).md | 2 +- ...hn Wick - Chapter 3 - Parabellum (2019).md | 2 +- .../John Wick - Chapter 4 (2023).md | 3 +- 03.04 Cinematheque/The Hunger Games (2012).md | 1 + ...The Hunger Games - Catching Fire (2013).md | 1 + ...nger Games - Mockingjay - Part 1 (2014).md | 1 + ...nger Games - Mockingjay - Part 2 (2015).md | 3 +- 05.02 Networks/Configuring UFW.md | 6 +- 76 files changed, 2666 insertions(+), 885 deletions(-) create mode 100644 00.01 Admin/Calendars/2023-09-26.md create mode 100644 00.01 Admin/Calendars/2023-09-27.md create mode 100644 00.01 Admin/Calendars/2023-09-28.md create mode 100644 00.01 Admin/Calendars/2023-09-29.md create mode 100644 00.01 Admin/Calendars/2023-09-30.md create mode 100644 00.01 Admin/Calendars/2023-10-01.md create mode 100644 00.01 Admin/Calendars/Events/2024-06-08 💍 Mariage Rémi & Séverine.md create mode 100644 00.03 News/Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego.md create mode 100644 00.03 News/Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate.md create mode 100644 00.03 News/Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero.md create mode 100644 00.03 News/SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership.md create mode 100644 00.03 News/The inequality of heat.md rename 02.03 Zürich/{William's Butcherstable.md => William's ButchersTable.md} (85%) rename {00.02 Inbox => 03.01 Reading list}/Le Temps gagné.md (94%) diff --git a/.obsidian/plugins/auto-card-link/main.js b/.obsidian/plugins/auto-card-link/main.js index bf56271c..0d972723 100644 --- a/.obsidian/plugins/auto-card-link/main.js +++ b/.obsidian/plugins/auto-card-link/main.js @@ -372,6 +372,9 @@ var CodeBlockProcessor = class { el.appendChild(this.genErrorEl(error.message)); } else if (error instanceof YamlParseError) { el.appendChild(this.genErrorEl(error.message)); + } else if (error instanceof TypeError) { + el.appendChild(this.genErrorEl("internal links must be surrounded by quotes.")); + console.log(error); } else { console.log("Code Block: cardlink unknown error", error); } @@ -440,6 +443,8 @@ var CodeBlockProcessor = class { hostEl.addClass("auto-card-link-host"); mainEl.appendChild(hostEl); if (data.favicon) { + if (!CheckIf.isUrl(data.favicon)) + data.favicon = this.getLocalImagePath(data.favicon); const faviconEl = document.createElement("img"); faviconEl.addClass("auto-card-link-favicon"); faviconEl.setAttr("src", data.favicon); @@ -451,6 +456,8 @@ var CodeBlockProcessor = class { hostEl.appendChild(hostNameEl); } if (data.image) { + if (!CheckIf.isUrl(data.image)) + data.image = this.getLocalImagePath(data.image); const thumbnailEl = document.createElement("img"); thumbnailEl.addClass("auto-card-link-thumbnail"); thumbnailEl.setAttr("src", data.image); @@ -464,6 +471,14 @@ ${data.url}`).onClick(() => { }); return containerEl; } + getLocalImagePath(link) { + var _a; + link = link.slice(2, -2); + const imageRelativePath = (_a = this.app.metadataCache.getFirstLinkpathDest((0, import_obsidian3.getLinkpath)(link), "")) == null ? void 0 : _a.path; + if (!imageRelativePath) + return link; + return this.app.vault.adapter.getResourcePath(imageRelativePath); + } }; // src/main.ts diff --git a/.obsidian/plugins/auto-card-link/manifest.json b/.obsidian/plugins/auto-card-link/manifest.json index 82d90c6f..6a04f04a 100644 --- a/.obsidian/plugins/auto-card-link/manifest.json +++ b/.obsidian/plugins/auto-card-link/manifest.json @@ -1,7 +1,7 @@ { "id": "auto-card-link", "name": "Auto Card Link", - "version": "1.2.1", + "version": "1.2.2", "minAppVersion": "0.12.0", "description": "Automatically fetches metadata from a url and makes it as a card-styled link", "author": "Nekoshita Yuki", diff --git a/.obsidian/plugins/auto-card-link/styles.css b/.obsidian/plugins/auto-card-link/styles.css index 88644aa8..84e7a6db 100644 --- a/.obsidian/plugins/auto-card-link/styles.css +++ b/.obsidian/plugins/auto-card-link/styles.css @@ -135,12 +135,13 @@ } .auto-card-link-favicon { - width: 16px; + width: 16px !important; height: 16px; margin: 0 0.5em 0 0 !important; } .auto-card-link-thumbnail { + width: unset !important; border-radius: var(--radius-s) 0 0 var(--radius-s) !important; height: 100%; object-fit: cover; diff --git a/.obsidian/plugins/cron/data.json b/.obsidian/plugins/cron/data.json index bdf437fa..32c1c770 100644 --- a/.obsidian/plugins/cron/data.json +++ b/.obsidian/plugins/cron/data.json @@ -19,7 +19,7 @@ "601d1cc7-a4f3-4f19-aa9f-3bddd7ab6b1d": { "locked": false, "lockedDeviceName": "iPhone", - "lastRun": "2023-09-25T08:39:58+02:00" + "lastRun": "2023-10-01T10:05:15+02:00" } } } \ No newline at end of file diff --git a/.obsidian/plugins/dataview/main.js b/.obsidian/plugins/dataview/main.js index d4804b43..11a47fc7 100644 --- a/.obsidian/plugins/dataview/main.js +++ b/.obsidian/plugins/dataview/main.js @@ -15305,7 +15305,7 @@ function trimEndingLines(text) { } /** Set the task completion key on check. */ function setTaskCompletion(originalText, useEmojiShorthand, completionKey, completionDateFormat, complete) { - const blockIdRegex = /(?", diff --git a/.obsidian/plugins/emoji-shortcodes/data.json b/.obsidian/plugins/emoji-shortcodes/data.json index bd360bf4..4edc6aeb 100644 --- a/.obsidian/plugins/emoji-shortcodes/data.json +++ b/.obsidian/plugins/emoji-shortcodes/data.json @@ -4,10 +4,12 @@ "historyPriority": true, "historyLimit": 100, "history": [ + ":plate_with_cutlery:", + ":train2:", + ":book:", ":fork_and_knife:", ":soccer:", ":racehorse:", - ":plate_with_cutlery:", ":man_cook:", ":email:", ":salt:", @@ -21,7 +23,6 @@ ":stadium:", ":battery:", ":car:", - ":train2:", ":hot_pepper:", ":palm_tree:", ":candy:", @@ -38,7 +39,6 @@ ":chicken:", ":meat_on_bone:", ":avocado:", - ":book:", ":broken_heart:", ":warning:", ":musical_score:", diff --git a/.obsidian/plugins/meld-encrypt/main.js b/.obsidian/plugins/meld-encrypt/main.js index ae78c084..050a9201 100644 --- a/.obsidian/plugins/meld-encrypt/main.js +++ b/.obsidian/plugins/meld-encrypt/main.js @@ -3,9 +3,9 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var oe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Te=Object.prototype.hasOwnProperty;var Fe=(w,t)=>{for(var e in t)oe(w,e,{get:t[e],enumerable:!0})},xe=(w,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ce(t))!Te.call(w,i)&&i!==e&&oe(w,i,{get:()=>t[i],enumerable:!(n=ve(t,i))||n.enumerable});return w};var Se=w=>xe(oe({},"__esModule",{value:!0}),w);var Me={};Fe(Me,{default:()=>re});module.exports=Se(Me);var be=require("obsidian");var A=require("obsidian");var Z=class{constructor(){this.values=new Map}put(t,e){this.values.set(t,e)}get(t,e){var n;return(n=this.values.get(t))!=null?n:e}getFirst(t,e){for(let n=0;n{r.setValue(this.settings.confirmPassword).onChange(async o=>{this.settings.confirmPassword=o,await this.plugin.saveSettings()})});let n=()=>{if(!this.settings.rememberPassword){i.settingEl.hide(),s.settingEl.hide();return}i.settingEl.show(),s.settingEl.show();let r=this.settings.rememberPasswordTimeout,o=`For ${r} minutes`;r==0&&(o="Until Obsidian is closed"),i.setName(`Remember Password (${o})`)};new A.Setting(e).setName("Remember password?").setDesc("Remember the last used passwords when encrypting or decrypting. Passwords are remembered until they timeout or Obsidian is closed").addToggle(r=>{r.setValue(this.settings.rememberPassword).onChange(async o=>{this.settings.rememberPassword=o,await this.plugin.saveSettings(),g.setActive(this.settings.rememberPassword),n()})});let i=new A.Setting(e).setDesc("The number of minutes to remember passwords.").addSlider(r=>{r.setLimits(0,120,5).setValue(this.settings.rememberPasswordTimeout).onChange(async o=>{this.settings.rememberPasswordTimeout=o,await this.plugin.saveSettings(),g.setAutoExpire(this.settings.rememberPasswordTimeout),n()})}),s=new A.Setting(e).setDesc("Remember passwords by using a notes file name or parent folder").addDropdown(r=>{r.addOption(g.LevelFilename,"File Name").addOption(g.LevelParentPath,"Parent Folder").setValue(this.settings.rememberPasswordLevel).onChange(async o=>{this.settings.rememberPasswordLevel=o,await this.plugin.saveSettings(),g.setLevel(this.settings.rememberPasswordLevel),n()})});n(),this.features.forEach(r=>{r.buildSettingsUi(e,async()=>await this.plugin.saveSettings())})}};var T=require("obsidian");var L=require("obsidian"),H=class extends L.Modal{constructor(e,n,i=""){super(e);this.decryptInPlace=!1;this.canDecryptInPlace=!0;this.titleEl.setText(n),this.text=i}onOpen(){var r;let{contentEl:e}=this;e.empty(),e.classList.add("meld-encrypt-decrypt-modal");let n;(r=new L.Setting(e).addTextArea(o=>{n=o,o.setValue(this.text),o.inputEl.setSelectionRange(0,0),o.inputEl.readOnly=!0,o.inputEl.rows=10}).settingEl.querySelector(".setting-item-info"))==null||r.remove();let s=new L.Setting(e);s.addButton(o=>{o.setButtonText("Copy").onClick(a=>{navigator.clipboard.writeText(n.getValue()),new L.Notice("Copied!")})}),this.canDecryptInPlace&&s.addButton(o=>{o.setWarning().setButtonText("Decrypt in-place").onClick(a=>{this.decryptInPlace=!0,this.close()})})}};var P=require("obsidian");var X=require("obsidian"),E=class{static isSettingsModalOpen(){return document.querySelector(".mod-settings")!==null}static buildPasswordSetting({container:t,name:e,desc:n="",autoFocus:i=!1,placeholder:s="",initialValue:r="",onChangeCallback:o,onEnterCallback:a}){let h=new X.Setting(t).setName(e).setDesc(n).addButton(f=>{f.setIcon("reading-glasses").onClick(d=>{let l=h.components.find((c,p,m)=>c instanceof X.TextComponent);l instanceof X.TextComponent&&(l.inputEl.type=l.inputEl.type=="password"?"text":"password")})}).addText(f=>{f.setPlaceholder(s),f.setValue(r),f.inputEl.type="password",o!=null&&f.onChange(o),a!=null&&(f.inputEl.onkeydown=d=>{d.key==="Enter"&&(d.preventDefault(),a(f.getValue()))}),i&&setTimeout(()=>f.inputEl.focus(),0)});return h}};var R=class extends P.Modal{constructor(e,n,i,s,r=null,o=null){super(e);this.defaultPassword=null;this.defaultHint=null;this.resultConfirmed=!1;this.resultPassword=null;this.resultHint=null;this.resultShowInReadingView=null;this.defaultPassword=r,this.confirmPassword=i,this.showInReadingView=s,this.isEncrypting=n,this.defaultHint=o}onOpen(){var d,l;let{contentEl:e}=this;e.empty(),this.invalidate();let n=(d=this.defaultPassword)!=null?d:"",i="",s=(l=this.defaultHint)!=null?l:"",r=this.showInReadingView;new P.Setting(e).setHeading().setName(this.isEncrypting?"Encrypting":"Decrypting"),E.buildPasswordSetting({container:e,name:"Password:",placeholder:this.isEncrypting?"":`Hint: ${this.defaultHint}`,initialValue:n,autoFocus:!0,onChangeCallback:c=>{n=c,this.invalidate()},onEnterCallback:c=>{if(n=c,this.invalidate(),n.length>0)if(o.settingEl.isShown()){let p=o.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}else if(a.settingEl.isShown()){let p=a.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}else f()&&this.close()}});let o=E.buildPasswordSetting({container:e,name:"Confirm Password:",onChangeCallback:c=>{i=c,this.invalidate()},onEnterCallback:c=>{if(i=c,this.invalidate(),i.length>0&&f()&&a.settingEl.isShown()){let p=a.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}}});this.confirmPassword||o.settingEl.hide();let a=new P.Setting(e).setName("Optional Password Hint").addText(c=>{c.inputEl.placeholder="Password Hint",c.setValue(s),c.onChange(p=>s=p),c.inputEl.on("keypress","*",(p,m)=>{p.key=="Enter"&&m instanceof HTMLInputElement&&m.value.length>0&&(p.preventDefault(),f()&&this.close())})});this.isEncrypting||a.settingEl.hide();let h=new P.Setting(e).setName("Show encrypted marker in Reading view").addToggle(c=>{c.setValue(r).onChange(p=>{r=p})});this.isEncrypting||h.settingEl.hide(),new P.Setting(e).addButton(c=>{c.setButtonText("Confirm").onClick(p=>{f()&&this.close()})});let f=()=>(this.invalidate(),o.setDesc(""),this.confirmPassword&&n!=i?(o.setDesc("Passwords don't match"),!1):(this.resultConfirmed=!0,this.resultPassword=n,this.resultHint=s,this.resultShowInReadingView=r,!0))}invalidate(){this.resultConfirmed=!1,this.resultPassword=null,this.resultHint=null}};var ce=new TextEncoder,Ie=new TextDecoder,De=1e3,ke=ce.encode("XHWnDAT6ehMVY2zD"),z=class{async deriveKey(t){let e=ce.encode(t),n=await crypto.subtle.importKey("raw",e,{name:"PBKDF2"},!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",hash:{name:"SHA-256"},iterations:De,salt:ke},n,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async encryptToBytes(t,e){let n=await this.deriveKey(e),i=ce.encode(t),s=crypto.getRandomValues(new Uint8Array(16)),r=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:s},n,i)),o=new Uint8Array(s.byteLength+r.byteLength);return o.set(s,0),o.set(r,s.byteLength),o}convertToString(t){let e="";for(let n=0;nt.startsWith(i)))!=null?e:"",this.suffix=(n=M.find(i=>t.endsWith(i)))!=null?n:"",this.hasEncryptedPrefix=this.prefix.length>0,this.hasEncryptedSuffix=this.suffix.length>0,this.hasObsoleteEncryptedPrefix=this.prefix===pe,this.containsEncryptedMarkers=[...F,...M].some(i=>t.includes(i)),this.canDecrypt=this.hasEncryptedPrefix&&this.hasEncryptedSuffix,this.canEncrypt=!this.hasEncryptedPrefix&&!this.containsEncryptedMarkers,this.canDecrypt){let i=this.parseDecryptableContent(t);i!=null?this.decryptable=i:this.canDecrypt=!1}}parseDecryptableContent(t){let e=new te;if(!this.hasEncryptedPrefix||!this.hasEncryptedSuffix)return null;this.hasObsoleteEncryptedPrefix?e.version=0:this.prefix==ne||this.prefix==U?e.version=2:(this.prefix==de||this.prefix==Y)&&(e.version=1);let n=t.substring(this.prefix.length,t.length-this.suffix.length);if([...F,...M].some(i=>n.includes(i)))return null;if(n.substring(0,x.length)==x){let i=n.indexOf(x,x.length);if(i<0)return null;e.hint=n.substring(x.length,i),e.base64CipherText=n.substring(i+x.length)}else e.base64CipherText=n;return e}};var $=class{async onload(t,e){this.plugin=t,this.pluginSettings=e,this.featureSettings=e.featureInplaceEncrypt,this.plugin.registerMarkdownPostProcessor((n,i)=>this.processEncryptedCodeBlockProcessor(n,i)),t.addCommand({id:"meld-encrypt",name:"Encrypt/Decrypt",icon:"lock",editorCheckCallback:(n,i,s)=>this.processEncryptDecryptCommand(n,i,!1)}),t.addCommand({id:"meld-encrypt-in-place",name:"Encrypt/Decrypt In-place",icon:"lock",editorCheckCallback:(n,i,s)=>this.processEncryptDecryptCommand(n,i,!0)})}onunload(){}async processEncryptedCodeBlockProcessor(t,e){let n=e.getSectionInfo(t);if(n==null)return;let i=N.extractTextLines(n.text,n.lineStart,n.lineEnd),s=N.findFirstMarker(F,i);if(s==null||!(s.marker==Y||s.marker==U))return;let r=N.findFirstMarker(M,i,s.position+s.marker.length);if(r==null)return;let o=N.removeMarkers(i,s,r),a=new G(o);if(!a.canDecrypt)return;let h=N.extractTextBeforeMarker(i,s),f=N.extractTextAfterMarker(i,r),d=h+'\u{1F510}'+f;t.empty(),await T.MarkdownRenderer.renderMarkdown(d,t,e.sourcePath,this.plugin);let l=t.querySelector(".meld-encrypt-inline-reading-marker");l==null||l.onClickEvent(async()=>await this.handleReadingIndicatorClick(e.sourcePath,a.decryptable))}async handleReadingIndicatorClick(t,e){if(e==null){new T.Notice("\u274C Decryption failed!");return}if(await this.showDecryptedTextIfPasswordKnown(t,e))return;let n=await this.fetchPasswordFromUser(e.hint);n!=null&&(await this.showDecryptedResultForPassword(e,n)?g.putByPath({password:n,hint:e.hint},t):new T.Notice("\u274C Decryption failed!"))}async showDecryptedResultForPassword(t,e){let i=await C.BuildFromDecryptableOrThrow(t).decryptFromBase64(t.base64CipherText,e);return i===null?!1:new Promise(s=>{let r=new H(this.plugin.app,"\u{1F513}",i);r.canDecryptInPlace=!1,r.onClose=()=>{s(!0)},r.open()})}async fetchPasswordFromUser(t){return new Promise(e=>{let n=new R(this.plugin.app,!1,!1,this.featureSettings.showMarkerWhenReadingDefault,"",t);n.onClose=()=>{e(n.resultPassword)},n.open()})}async showDecryptedTextIfPasswordKnown(t,e){let n=g.getByPath(t);return n.password==null?!1:await this.showDecryptedResultForPassword(e,n.password)}buildSettingsUi(t,e){new T.Setting(t).setHeading().setName("In-place Encryption Settings"),new T.Setting(t).setName("Expand selection to whole line?").setDesc("Partial selections will get expanded to the whole line.").addToggle(n=>{n.setValue(this.featureSettings.expandToWholeLines).onChange(async i=>{this.featureSettings.expandToWholeLines=i,await e()})}),new T.Setting(t).setName("By default, show encrypted marker when reading").setDesc("When encrypting inline text, should the default be to have a visible marker in Reading view?").addToggle(n=>{n.setValue(this.featureSettings.showMarkerWhenReadingDefault).onChange(async i=>{this.featureSettings.showMarkerWhenReadingDefault=i,await e()})})}processEncryptDecryptCommand(t,e,n){if(t&&E.isSettingsModalOpen())return!0;let i=e.getCursor("from"),s=e.getCursor("to");if(this.featureSettings.expandToWholeLines){i={line:i.line,ch:0};let a=s.line,h=e.getLine(a);s={line:a,ch:h.length}}else if(!e.somethingSelected()){let o=this.getClosestPrefixCursorPos(e);if(o==null)return!1;i=o;let a=this.getClosestSuffixCursorPos(e);if(a==null)return!1;s=a}let r=e.getRange(i,s);return this.processSelection(t,e,r,i,s,n)}getClosestPrefixCursorPos(t){let e=F.reduce((i,s,r)=>r==0||s.length>i.length?s:i),n=t.posToOffset(t.getCursor("from"))+e.length;for(let i=n;i>=0;i--){let s=t.offsetToPos(i);for(let r of F){let o=i-r.length,a=t.offsetToPos(o);if(t.getRange(a,s)==r)return t.offsetToPos(o)}}return null}getClosestSuffixCursorPos(t){let e=F.reduce((r,o,a)=>a==0||o.length>r.length?o:r),n=t.posToOffset(t.getCursor("from"))-e.length+1,i=t.lastLine(),s=t.posToOffset({line:i,ch:t.getLine(i).length});for(let r=n;r<=s;r++){let o=t.offsetToPos(r);for(let a of M){let h=r+a.length,f=t.offsetToPos(h);if(t.getRange(o,f)==a)return f}}return null}processSelection(t,e,n,i,s,r,o=!0){var p;let a=new G(n);if(a.isEmpty)return t||new T.Notice("Nothing to Encrypt."),!1;if(!a.canDecrypt&&!a.canEncrypt)return t||new T.Notice("Unable to Encrypt or Decrypt that."),!1;if(a.canEncrypt&&!o)return!1;let h=this.plugin.app.workspace.getActiveFile();if(h==null)return!1;if(t)return!0;let f="",d=(p=a.decryptable)==null?void 0:p.hint;if(this.pluginSettings.rememberPassword){let m=g.getByPath(h.path);f=m.password,d=d!=null?d:m.hint}let l=a.canEncrypt&&this.pluginSettings.confirmPassword,c=new R(this.plugin.app,a.canEncrypt,l,this.featureSettings.showMarkerWhenReadingDefault,f,d);return c.onClose=async()=>{var me,we,ye;if(!c.resultConfirmed)return;let m=(me=c.resultPassword)!=null?me:"",V=(we=c.resultHint)!=null?we:"";if(a.canEncrypt){let Q=new ge;Q.text=n,Q.hint=V,this.encryptSelection(e,Q,m,i,s,(ye=c.resultShowInReadingView)!=null?ye:this.featureSettings.showMarkerWhenReadingDefault),g.putByPath({password:m,hint:V},h.path)}else a.decryptable&&await this.decryptSelection(e,a.decryptable,m,i,s,r)&&g.putByPath({password:m,hint:V},h.path)},c.open(),!0}async encryptSelection(t,e,n,i,s,r){let o=C.BuildDefault(),a=this.encodeEncryption(await o.encryptToBase64(e.text,n),e.hint,r);t.setSelection(i,s),t.replaceSelection(a)}async decryptSelection(t,e,n,i,s,r){let a=await C.BuildFromDecryptableOrThrow(e).decryptFromBase64(e.base64CipherText,n);if(a===null)return new T.Notice("\u274C Decryption failed!"),!1;if(r)t.setSelection(i,s),t.replaceSelection(a);else{let h=new H(this.plugin.app,"\u{1F513}",a);h.onClose=()=>{t.focus(),h.decryptInPlace&&(t.setSelection(i,s),t.replaceSelection(a))},h.open()}return!0}encodeEncryption(t,e,n){if(!F.some(i=>t.includes(i))&&!M.some(i=>t.includes(i))){let i=n?Pe:Ee,s=n?he:ue;return e.length>0?i.concat(x,e,x,t,s):i.concat(t,s)}return t}},ge=class{},N=class{static extractTextBeforeMarker(t,e){return t.substring(0,e.position)}static extractTextAfterMarker(t,e){return t.substring(e.position+e.marker.length)}static removeMarkers(t,e,n){return t.substring(e.position,n.position+n.marker.length)}static extractTextLines(t,e,n){return t.split(` +var ae=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var xe=Object.prototype.hasOwnProperty;var Se=(w,t)=>{for(var e in t)ae(w,e,{get:t[e],enumerable:!0})},Ie=(w,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fe(t))!xe.call(w,i)&&i!==e&&ae(w,i,{get:()=>t[i],enumerable:!(n=Te(t,i))||n.enumerable});return w};var De=w=>Ie(ae({},"__esModule",{value:!0}),w);var Ve={};Se(Ve,{default:()=>oe});module.exports=De(Ve);var Ce=require("obsidian");var k=require("obsidian");var ee=class{constructor(){this.values=new Map}put(t,e){this.values.set(t,e)}get(t,e){var n;return(n=this.values.get(t))!=null?n:e}getFirst(t,e){for(let n=0;n{r.setValue(this.settings.confirmPassword).onChange(async o=>{this.settings.confirmPassword=o,await this.plugin.saveSettings()})});let n=()=>{if(!this.settings.rememberPassword){i.settingEl.hide(),s.settingEl.hide();return}i.settingEl.show(),s.settingEl.show();let r=this.settings.rememberPasswordTimeout,o=`For ${r} minutes`;r==0&&(o="Until Obsidian is closed"),i.setName(`Remember Password (${o})`)};new k.Setting(e).setName("Remember password?").setDesc("Remember the last used passwords when encrypting or decrypting. Passwords are remembered until they timeout or Obsidian is closed").addToggle(r=>{r.setValue(this.settings.rememberPassword).onChange(async o=>{this.settings.rememberPassword=o,await this.plugin.saveSettings(),g.setActive(this.settings.rememberPassword),n()})});let i=new k.Setting(e).setDesc("The number of minutes to remember passwords.").addSlider(r=>{r.setLimits(0,120,5).setValue(this.settings.rememberPasswordTimeout).onChange(async o=>{this.settings.rememberPasswordTimeout=o,await this.plugin.saveSettings(),g.setAutoExpire(this.settings.rememberPasswordTimeout),n()})}),s=new k.Setting(e).setDesc("Remember passwords by using a notes file name or parent folder").addDropdown(r=>{r.addOption(g.LevelFilename,"File Name").addOption(g.LevelParentPath,"Parent Folder").setValue(this.settings.rememberPasswordLevel).onChange(async o=>{this.settings.rememberPasswordLevel=o,await this.plugin.saveSettings(),g.setLevel(this.settings.rememberPasswordLevel),n()})});n(),this.features.forEach(r=>{r.buildSettingsUi(e,async()=>await this.plugin.saveSettings())})}};var T=require("obsidian");var L=require("obsidian"),R=class extends L.Modal{constructor(e,n,i=""){super(e);this.decryptInPlace=!1;this.canDecryptInPlace=!0;this.titleEl.setText(n),this.text=i}onOpen(){var r;let{contentEl:e}=this;e.empty(),e.classList.add("meld-encrypt-decrypt-modal");let n;(r=new L.Setting(e).addTextArea(o=>{n=o,o.setValue(this.text),o.inputEl.setSelectionRange(0,0),o.inputEl.readOnly=!0,o.inputEl.rows=10}).settingEl.querySelector(".setting-item-info"))==null||r.remove();let s=new L.Setting(e);s.addButton(o=>{o.setButtonText("Copy").onClick(a=>{navigator.clipboard.writeText(n.getValue()),new L.Notice("Copied!")})}),this.canDecryptInPlace&&s.addButton(o=>{o.setWarning().setButtonText("Decrypt in-place").onClick(a=>{this.decryptInPlace=!0,this.close()})})}};var P=require("obsidian");var X=require("obsidian"),E=class{static isSettingsModalOpen(){return document.querySelector(".mod-settings")!==null}static buildPasswordSetting({container:t,name:e,desc:n="",autoFocus:i=!1,placeholder:s="",initialValue:r="",onChangeCallback:o,onEnterCallback:a}){let h=new X.Setting(t).setName(e).setDesc(n).addButton(f=>{f.setIcon("reading-glasses").onClick(d=>{let l=h.components.find((c,p,m)=>c instanceof X.TextComponent);l instanceof X.TextComponent&&(l.inputEl.type=l.inputEl.type=="password"?"text":"password")})}).addText(f=>{f.setPlaceholder(s),f.setValue(r),f.inputEl.type="password",o!=null&&f.onChange(o),a!=null&&(f.inputEl.onkeydown=d=>{d.key==="Enter"&&(d.preventDefault(),a(f.getValue()))}),i&&setTimeout(()=>f.inputEl.focus(),0)});return h}};var H=class extends P.Modal{constructor(e,n,i,s,r=null,o=null){super(e);this.defaultPassword=null;this.defaultHint=null;this.resultConfirmed=!1;this.resultPassword=null;this.resultHint=null;this.resultShowInReadingView=null;this.defaultPassword=r,this.confirmPassword=i,this.showInReadingView=s,this.isEncrypting=n,this.defaultHint=o}onOpen(){var d,l;let{contentEl:e}=this;e.empty(),this.invalidate();let n=(d=this.defaultPassword)!=null?d:"",i="",s=(l=this.defaultHint)!=null?l:"",r=this.showInReadingView;new P.Setting(e).setHeading().setName(this.isEncrypting?"Encrypting":"Decrypting"),E.buildPasswordSetting({container:e,name:"Password:",placeholder:this.isEncrypting?"":`Hint: ${this.defaultHint}`,initialValue:n,autoFocus:!0,onChangeCallback:c=>{n=c,this.invalidate()},onEnterCallback:c=>{if(n=c,this.invalidate(),n.length>0)if(o.settingEl.isShown()){let p=o.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}else if(a.settingEl.isShown()){let p=a.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}else f()&&this.close()}});let o=E.buildPasswordSetting({container:e,name:"Confirm Password:",onChangeCallback:c=>{i=c,this.invalidate()},onEnterCallback:c=>{if(i=c,this.invalidate(),i.length>0&&f()&&a.settingEl.isShown()){let p=a.components.find(m=>m instanceof P.TextComponent);p instanceof P.TextComponent&&p.inputEl.focus()}}});this.confirmPassword||o.settingEl.hide();let a=new P.Setting(e).setName("Optional Password Hint").addText(c=>{c.inputEl.placeholder="Password Hint",c.setValue(s),c.onChange(p=>s=p),c.inputEl.on("keypress","*",(p,m)=>{p.key=="Enter"&&m instanceof HTMLInputElement&&m.value.length>0&&(p.preventDefault(),f()&&this.close())})});this.isEncrypting||a.settingEl.hide();let h=new P.Setting(e).setName("Show encrypted marker in Reading view").addToggle(c=>{c.setValue(r).onChange(p=>{r=p})});this.isEncrypting||h.settingEl.hide(),new P.Setting(e).addButton(c=>{c.setButtonText("Confirm").onClick(p=>{f()&&this.close()})});let f=()=>(this.invalidate(),o.setDesc(""),this.confirmPassword&&n!=i?(o.setDesc("Passwords don't match"),!1):(this.resultConfirmed=!0,this.resultPassword=n,this.resultHint=s,this.resultShowInReadingView=r,!0))}invalidate(){this.resultConfirmed=!1,this.resultPassword=null,this.resultHint=null}};var le=new TextEncoder,ke=new TextDecoder,Ae=1e3,Ne=le.encode("XHWnDAT6ehMVY2zD"),Y=class{async deriveKey(t){let e=le.encode(t),n=await crypto.subtle.importKey("raw",e,{name:"PBKDF2"},!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",hash:{name:"SHA-256"},iterations:Ae,salt:Ne},n,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async encryptToBytes(t,e){let n=await this.deriveKey(e),i=le.encode(t),s=crypto.getRandomValues(new Uint8Array(16)),r=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:s},n,i)),o=new Uint8Array(s.byteLength+r.byteLength);return o.set(s,0),o.set(r,s.byteLength),o}convertToString(t){let e="";for(let n=0;nt.startsWith(i)))!=null?e:"",this.suffix=(n=A.find(i=>t.endsWith(i)))!=null?n:"",this.hasEncryptedPrefix=this.prefix.length>0,this.hasEncryptedSuffix=this.suffix.length>0,this.hasObsoleteEncryptedPrefix=this.prefix===ue,this.containsEncryptedMarkers=[...F,...A].some(i=>t.includes(i)),this.canDecrypt=this.hasEncryptedPrefix&&this.hasEncryptedSuffix,this.canEncrypt=!this.hasEncryptedPrefix&&!this.containsEncryptedMarkers,this.canDecrypt){let i=this.parseDecryptableContent(t);i!=null?this.decryptable=i:this.canDecrypt=!1}}parseDecryptableContent(t){let e=new ne;if(!this.hasEncryptedPrefix||!this.hasEncryptedSuffix)return null;this.hasObsoleteEncryptedPrefix?e.version=0:this.prefix==ie||this.prefix==U?e.version=2:(this.prefix==pe||this.prefix==z)&&(e.version=1);let n=t.substring(this.prefix.length,t.length-this.suffix.length);if([...F,...A].some(i=>n.includes(i)))return null;if(n.substring(0,x.length)==x){let i=n.indexOf(x,x.length);if(i<0)return null;e.hint=n.substring(x.length,i),e.base64CipherText=n.substring(i+x.length)}else e.base64CipherText=n;return e}};var G=class{async onload(t,e){this.plugin=t,this.pluginSettings=e,this.featureSettings=e.featureInplaceEncrypt,this.plugin.registerMarkdownPostProcessor((n,i)=>this.processEncryptedCodeBlockProcessor(n,i)),t.addCommand({id:"meld-encrypt",name:"Encrypt/Decrypt",icon:"lock",editorCheckCallback:(n,i,s)=>this.processEncryptDecryptCommand(n,i,!1)}),t.addCommand({id:"meld-encrypt-in-place",name:"Encrypt/Decrypt In-place",icon:"lock",editorCheckCallback:(n,i,s)=>this.processEncryptDecryptCommand(n,i,!0)})}onunload(){}async processEncryptedCodeBlockProcessor(t,e){let n=e.getSectionInfo(t);if(n==null)return;let i=N.extractTextLines(n.text,n.lineStart,n.lineEnd),s=N.findFirstMarker(F,i);if(s==null||!(s.marker==z||s.marker==U))return;let r=N.findFirstMarker(A,i,s.position+s.marker.length);if(r==null)return;let o=N.removeMarkers(i,s,r),a=new $(o);if(!a.canDecrypt)return;let h=N.extractTextBeforeMarker(i,s),f=N.extractTextAfterMarker(i,r),d=h+'\u{1F510}'+f;t.empty(),await T.MarkdownRenderer.renderMarkdown(d,t,e.sourcePath,this.plugin);let l=t.querySelector(".meld-encrypt-inline-reading-marker");l==null||l.onClickEvent(async()=>await this.handleReadingIndicatorClick(e.sourcePath,a.decryptable))}async handleReadingIndicatorClick(t,e){if(e==null){new T.Notice("\u274C Decryption failed!");return}if(await this.showDecryptedTextIfPasswordKnown(t,e))return;let n=await this.fetchPasswordFromUser(e.hint);n!=null&&(await this.showDecryptedResultForPassword(e,n)?g.putByPath({password:n,hint:e.hint},t):new T.Notice("\u274C Decryption failed!"))}async showDecryptedResultForPassword(t,e){let i=await C.BuildFromDecryptableOrThrow(t).decryptFromBase64(t.base64CipherText,e);return i===null?!1:new Promise(s=>{let r=new R(this.plugin.app,"\u{1F513}",i);r.canDecryptInPlace=!1,r.onClose=()=>{s(!0)},r.open()})}async fetchPasswordFromUser(t){return new Promise(e=>{let n=new H(this.plugin.app,!1,!1,this.featureSettings.showMarkerWhenReadingDefault,"",t);n.onClose=()=>{e(n.resultPassword)},n.open()})}async showDecryptedTextIfPasswordKnown(t,e){let n=g.getByPath(t);return n.password==null?!1:await this.showDecryptedResultForPassword(e,n.password)}buildSettingsUi(t,e){new T.Setting(t).setHeading().setName("In-place Encryption Settings"),new T.Setting(t).setName("Expand selection to whole line?").setDesc("Partial selections will get expanded to the whole line.").addToggle(n=>{n.setValue(this.featureSettings.expandToWholeLines).onChange(async i=>{this.featureSettings.expandToWholeLines=i,await e()})}),new T.Setting(t).setName("By default, show encrypted marker when reading").setDesc("When encrypting inline text, should the default be to have a visible marker in Reading view?").addToggle(n=>{n.setValue(this.featureSettings.showMarkerWhenReadingDefault).onChange(async i=>{this.featureSettings.showMarkerWhenReadingDefault=i,await e()})})}processEncryptDecryptCommand(t,e,n){if(t&&E.isSettingsModalOpen())return!0;let i=e.getCursor("from"),s=e.getCursor("to");if(this.featureSettings.expandToWholeLines){i={line:i.line,ch:0};let a=s.line,h=e.getLine(a);s={line:a,ch:h.length}}else if(!e.somethingSelected()){let o=this.getClosestPrefixCursorPos(e);if(o==null)return!1;i=o;let a=this.getClosestSuffixCursorPos(e);if(a==null)return!1;s=a}let r=e.getRange(i,s);return this.processSelection(t,e,r,i,s,n)}getClosestPrefixCursorPos(t){let e=F.reduce((i,s,r)=>r==0||s.length>i.length?s:i),n=t.posToOffset(t.getCursor("from"))+e.length;for(let i=n;i>=0;i--){let s=t.offsetToPos(i);for(let r of F){let o=i-r.length,a=t.offsetToPos(o);if(t.getRange(a,s)==r)return t.offsetToPos(o)}}return null}getClosestSuffixCursorPos(t){let e=F.reduce((r,o,a)=>a==0||o.length>r.length?o:r),n=t.posToOffset(t.getCursor("from"))-e.length+1,i=t.lastLine(),s=t.posToOffset({line:i,ch:t.getLine(i).length});for(let r=n;r<=s;r++){let o=t.offsetToPos(r);for(let a of A){let h=r+a.length,f=t.offsetToPos(h);if(t.getRange(o,f)==a)return f}}return null}processSelection(t,e,n,i,s,r,o=!0){var p;let a=new $(n);if(a.isEmpty)return t||new T.Notice("Nothing to Encrypt."),!1;if(!a.canDecrypt&&!a.canEncrypt)return t||new T.Notice("Unable to Encrypt or Decrypt that."),!1;if(a.canEncrypt&&!o)return!1;let h=this.plugin.app.workspace.getActiveFile();if(h==null)return!1;if(t)return!0;let f="",d=(p=a.decryptable)==null?void 0:p.hint;if(this.pluginSettings.rememberPassword){let m=g.getByPath(h.path);f=m.password,d=d!=null?d:m.hint}let l=a.canEncrypt&&this.pluginSettings.confirmPassword,c=new H(this.plugin.app,a.canEncrypt,l,this.featureSettings.showMarkerWhenReadingDefault,f,d);return c.onClose=async()=>{var we,ye,Ee;if(!c.resultConfirmed)return;let m=(we=c.resultPassword)!=null?we:"",V=(ye=c.resultHint)!=null?ye:"";if(a.canEncrypt){let Z=new fe;Z.text=n,Z.hint=V,this.encryptSelection(e,Z,m,i,s,(Ee=c.resultShowInReadingView)!=null?Ee:this.featureSettings.showMarkerWhenReadingDefault),g.putByPath({password:m,hint:V},h.path)}else a.decryptable&&await this.decryptSelection(e,a.decryptable,m,i,s,r)&&g.putByPath({password:m,hint:V},h.path)},c.open(),!0}async encryptSelection(t,e,n,i,s,r){let o=C.BuildDefault(),a=this.encodeEncryption(await o.encryptToBase64(e.text,n),e.hint,r);t.setSelection(i,s),t.replaceSelection(a)}async decryptSelection(t,e,n,i,s,r){let a=await C.BuildFromDecryptableOrThrow(e).decryptFromBase64(e.base64CipherText,n);if(a===null)return new T.Notice("\u274C Decryption failed!"),!1;if(r)t.setSelection(i,s),t.replaceSelection(a);else{let h=new R(this.plugin.app,"\u{1F513}",a);h.onClose=()=>{t.focus(),h.decryptInPlace&&(t.setSelection(i,s),t.replaceSelection(a))},h.open()}return!0}encodeEncryption(t,e,n){if(!F.some(i=>t.includes(i))&&!A.some(i=>t.includes(i))){let i=n?be:Pe,s=n?ge:he;return e.length>0?i.concat(x,e,x,t,s):i.concat(t,s)}return t}},fe=class{},N=class{static extractTextBeforeMarker(t,e){return t.substring(0,e.position)}static extractTextAfterMarker(t,e){return t.substring(e.position+e.marker.length)}static removeMarkers(t,e,n){return t.substring(e.position,n.position+n.marker.length)}static extractTextLines(t,e,n){return t.split(` `).slice(e,n+1).join(` -`)}static findFirstMarker(t,e,n=0){let i=null,s=null;return t.forEach(r=>{let o=e.indexOf(r,n);o!=-1&&(i==null||othis.actionToggleEditMode()),this.elActionReadingView=this.addAction(this.iconReadingView,"Reading",()=>this.actionToggleEditMode()),this.elActionIconLockNote=this.addAction(this.iconLockFile,"Lock",()=>this.actionLockFile()),this.elActionChangePassword=this.addAction(this.iconChangePassword,"Change Password",()=>this.actionChangePassword()),this.elActionEditView.hide(),this.elActionReadingView.hide(),this.elActionIconLockNote.hide(),this.elActionChangePassword.hide(),this.containerEl.classList.add("meld-encrypt-encrypted-note-view"),this.contentEl.classList.add("meld-encrypt-encrypted-note-view-content")}actionToggleEditMode(){this.currentView==2&&(this.currentEditNoteMode=="Reading"?this.currentEditNoteMode="Source":this.currentEditNoteMode=="Source"&&(this.currentEditNoteMode="Reading"),this.refreshView(2))}actionLockFile(){this.encryptionPassword="",g.clearForFile(this.file),this.refreshView(1)}actionChangePassword(){this.refreshView(3)}onPaneMenu(e,n){n=="tab-header"&&this.currentView==2&&(e.addItem(i=>{i.setSection("action").setIcon(this.iconToggleEditView).setTitle("Toggle Editing/Reading").onClick(()=>this.actionToggleEditMode())}),e.addItem(i=>{i.setSection("action").setIcon(this.iconLockFile).setTitle("Lock").onClick(()=>this.actionLockFile())}),e.addItem(i=>{i.setSection("action").setIcon(this.iconChangePassword).setTitle("Change Password").onClick(()=>this.actionChangePassword())})),super.onPaneMenu(e,n)}addHeader(e,n){var i;e.createDiv({text:`\u{1F510} ${n} \u{1F510}`,cls:"encrypted-note-message"}),K.showInlineTitle&&e.createDiv({text:(i=this.file)==null?void 0:i.basename,cls:"inline-title"})}validatePassword(e){return""}validateConfirm(e,n){return e===n?"":"Password doesn't match"}addNewNoteView(e){this.addHeader(e,"This note will be encrypted");let n=this.addUserInputContainer(e);new y.Setting(n).setDesc("Please provide a password and hint to start editing this note.");let i=async(l,c,p)=>{let m=this.validatePassword(l),V=this.validateConfirm(l,c);h.setDesc(m),f.setDesc(V),m.length===0&&V.length===0&&(this.encryptionPassword=l,this.hint=p,K.showInlineTitle||(this.currentEditorSourceText=`# ${this.file.basename} +`)}static findFirstMarker(t,e,n=0){let i=null,s=null;return t.forEach(r=>{let o=e.indexOf(r,n);o!=-1&&(i==null||othis.toggleReadingView()),this.elActionReadingView=this.addAction(this.iconReadingView,"Reading",()=>this.toggleReadingView()),this.elActionIconLockNote=this.addAction(this.iconLockFile,"Lock",()=>this.actionLockFile()),this.elActionChangePassword=this.addAction(this.iconChangePassword,"Change Password",()=>this.actionChangePassword()),this.elActionEditView.hide(),this.elActionReadingView.hide(),this.elActionIconLockNote.hide(),this.elActionChangePassword.hide(),this.containerEl.classList.add("meld-encrypt-encrypted-note-view"),this.contentEl.classList.add("meld-encrypt-encrypted-note-view-content")}toggleReadingView(){this.currentView==2&&(this.currentEditNoteMode=="Reading"?this.currentEditNoteMode="Source":this.currentEditNoteMode=="Source"&&(this.currentEditNoteMode="Reading"),this.refreshView(2))}actionLockFile(){this.encryptionPassword="",g.clearForFile(this.file),this.refreshView(1)}actionChangePassword(){this.refreshView(3)}onPaneMenu(e,n){n=="tab-header"&&this.currentView==2&&(e.addItem(i=>{i.setSection("action").setIcon(this.iconToggleEditView).setTitle("Toggle Editing/Reading").onClick(()=>this.toggleReadingView())}),e.addItem(i=>{i.setSection("action").setIcon(this.iconLockFile).setTitle("Lock").onClick(()=>this.actionLockFile())}),e.addItem(i=>{i.setSection("action").setIcon(this.iconChangePassword).setTitle("Change Password").onClick(()=>this.actionChangePassword())})),super.onPaneMenu(e,n)}addHeader(e,n){var i;e.createDiv({text:`\u{1F510} ${n} \u{1F510}`,cls:"encrypted-note-message"}),_.showInlineTitle&&e.createDiv({text:(i=this.file)==null?void 0:i.basename,cls:"inline-title"})}validatePassword(e){return""}validateConfirm(e,n){return e===n?"":"Password doesn't match"}addNewNoteView(e){this.addHeader(e,"This note will be encrypted");let n=this.addUserInputContainer(e);new y.Setting(n).setDesc("Please provide a password and hint to start editing this note.");let i=async(l,c,p)=>{let m=this.validatePassword(l),V=this.validateConfirm(l,c);h.setDesc(m),f.setDesc(V),m.length===0&&V.length===0&&(this.encryptionPassword=l,this.hint=p,_.showInlineTitle||(this.currentEditorSourceText=`# ${this.file.basename} -`),await this.encodeAndSave(),g.putByFile({password:l,hint:p},this.file),this.currentEditNoteMode="Source",this.refreshView(2))},s=g.getByFile(this.file),r=s.password,o="",a=s.hint,h=E.buildPasswordSetting({container:n,name:"Password:",autoFocus:!0,initialValue:r,onChangeCallback:l=>{r=l,h.setDesc(this.validatePassword(r)),f.setDesc(this.validateConfirm(r,o))},onEnterCallback:l=>{var c;r=l,r.length>0&&((c=f.controlEl.querySelector("input"))==null||c.focus())}}),f=E.buildPasswordSetting({container:n,name:"Confirm:",autoFocus:!1,onChangeCallback:l=>{o=l,h.setDesc(this.validatePassword(r)),f.setDesc(this.validateConfirm(r,o))},onEnterCallback:l=>{var p;o=l,r===o&&((p=d.controlEl.querySelector("input"))==null||p.focus())}}),d=new y.Setting(n).setName("Hint:").addText(l=>{l.setValue(a),l.onChange(c=>{a=c})});d.controlEl.on("keydown","*",l=>{l.key==="Enter"&&(l.preventDefault(),i(r,o,a))}),new y.Setting(n).addButton(l=>{l.setCta().setIcon("go-to-file").setTooltip("Edit").onClick(c=>i(r,o,a))})}addDecryptNoteView(e){this.addHeader(e,"This note is encrypted");let n=this.addUserInputContainer(e);new y.Setting(n).setDesc("Please provide a password to unlock this note.");let i=E.buildPasswordSetting({container:n,name:"Password:",autoFocus:!0,placeholder:this.formatHint(this.hint),onChangeCallback:r=>{this.encryptionPassword=r,i.setDesc(this.validatePassword(this.encryptionPassword))},onEnterCallback:async()=>await this.handleDecryptButtonClick()});new y.Setting(n).addButton(r=>{r.setCta().setIcon("checkmark").setTooltip("Unlock & Edit").onClick(o=>this.handleDecryptButtonClick())});let s=g.getByFile(this.file);this.encryptionPassword=s.password,s.password.length>0&&this.decryptWithPassword(s.password).then(r=>{r!=null&&(this.currentEditorSourceText=r,this.refreshView(2),new y.Notice("Decrypted using remembered password",2e3))})}async encodeAndSave(){try{let e=await S.encode(this.encryptionPassword,this.hint,this.currentEditorSourceText);this.data=I.encode(e),this.requestSave()}catch(e){console.error(e),new y.Notice(e,1e4)}}addEditorSourceView(e){this.elActionReadingView.show(),this.elActionIconLockNote.show(),this.elActionChangePassword.show(),this.addHeader(e,"Editing an encrypted note");let n=e.createDiv({cls:"editor-source-view"});n.spellcheck=!0,n.autocapitalize="on",n.translate=!1,n.contentEditable="plaintext-only",n.innerText=this.currentEditorSourceText,n.focus(),n.on("input","*",async(i,s)=>{this.currentEditorSourceText=n.innerText,await this.encodeAndSave()})}addEditorReadingView(e){this.elActionEditView.show(),this.elActionIconLockNote.show(),this.elActionChangePassword.show(),this.addHeader(e,"Reading an encrypted note");let n=e.createDiv({cls:"editor-reading-view"});y.MarkdownRenderer.renderMarkdown(this.currentEditorSourceText,n,this.file.path,this).catch(i=>{console.error(i)})}addUserInputContainer(e){return e.createDiv({cls:"input-container"})}addChangePasswordView(e){this.addHeader(e,"Change encrypted note password");let n=this.addUserInputContainer(e),i="",s="",r="",o=async(d,l,c)=>{let p=this.validatePassword(d),m=this.validateConfirm(d,l);a.setDesc(p),h.setDesc(m),p.length===0&&m.length===0&&(this.encryptionPassword=d,this.hint=c,this.encodeAndSave(),this.refreshView(2),g.putByFile({password:d,hint:c},this.file),new y.Notice("Password and Hint were changed"))},a=E.buildPasswordSetting({container:n,name:"New Password:",autoFocus:!0,onChangeCallback:d=>{i=d,a.setDesc(this.validatePassword(i)),h.setDesc(this.validateConfirm(i,s))},onEnterCallback:d=>{var l;i=d,i.length>0&&((l=h.controlEl.querySelector("input"))==null||l.focus())}}),h=E.buildPasswordSetting({container:n,name:"Confirm:",onChangeCallback:d=>{s=d,a.setDesc(this.validatePassword(i)),h.setDesc(this.validateConfirm(i,s))},onEnterCallback:d=>{var c;s=d,i===s&&((c=f.controlEl.querySelector("input"))==null||c.focus())}}),f=new y.Setting(n).setName("New Hint:").addText(d=>{d.onChange(l=>{r=l})});f.controlEl.on("keydown","*",d=>{d.key==="Enter"&&(d.preventDefault(),o(i,s,r))}),new y.Setting(n).addButton(d=>{d.removeCta().setIcon("cross").setTooltip("Cancel").onClick(()=>{this.refreshView(2)})}).addButton(d=>{d.setCta().setIcon("checkmark").setTooltip("Change Password").setWarning().onClick(l=>{o(i,s,r)})})}formatHint(e){return e.length>0?`Hint: ${e}`:""}refreshView(e){this.currentView=e,this.elActionEditView.hide(),this.elActionReadingView.hide(),this.elActionIconLockNote.hide(),this.elActionChangePassword.hide(),this.contentEl.empty(),K.readableLineLength?this.contentEl.classList.add("is-readable-line-width"):this.contentEl.classList.remove("is-readable-line-width");let n=this.contentEl.createDiv({cls:"content-container"});switch(this.currentView){case 4:this.addNewNoteView(n);break;case 1:this.addDecryptNoteView(n);break;case 2:this.currentEditNoteMode=="Source"?this.addEditorSourceView(n):this.addEditorReadingView(n);break;case 3:this.addChangePasswordView(n);break}}async decryptWithPassword(e){let n=I.decode(this.data);return await S.decrypt(n,e)}async handleDecryptButtonClick(){let e=await this.decryptWithPassword(this.encryptionPassword);e===null?new y.Notice("Decryption failed"):(g.putByFile({password:this.encryptionPassword,hint:this.hint},this.file),this.currentEditorSourceText=e,this.refreshView(2))}canAcceptExtension(e){return e==k}getViewType(){return q}setViewData(e,n){if(n){let i;e===""?i=4:i=1,this.encryptionPassword="";let s=I.decode(this.data);this.hint=s.hint,this.refreshView(i)}else this.leaf.detach(),new y.Notice("Multiple views of the same encrypted note isn't supported")}getViewData(){return this.data}clear(){}};var j=class{async onload(t,e){this.plugin=t,this.settings=e.featureWholeNoteEncrypt,this.plugin.addRibbonIcon("file-lock-2","New encrypted note",n=>{this.processCreateNewEncryptedNoteCommand()}),this.plugin.registerView(q,n=>new se(n,this.settings)),this.plugin.registerExtensions([k],q),this.plugin.addCommand({id:"meld-encrypt-create-new-note",name:"Create new encrypted note",icon:"file-lock-2",callback:()=>this.processCreateNewEncryptedNoteCommand()})}onunload(){this.plugin.app.workspace.detachLeavesOfType(q)}processCreateNewEncryptedNoteCommand(){try{let t=(0,D.moment)().format("[Untitled] YYYYMMDD hhmmss[.encrypted]"),e,n=this.plugin.app.workspace.getActiveFile();n!=null?e=this.plugin.app.fileManager.getNewFileParent(n.path):e=this.plugin.app.fileManager.getNewFileParent("");let i=(0,D.normalizePath)(e.path+"/"+t);return this.plugin.app.vault.create(i,"").then(async s=>{await this.plugin.app.workspace.getLeaf(!0).openFile(s)}).catch(s=>{new D.Notice(s,1e4)}),!0}catch(t){return console.error(t),new D.Notice(t,1e4),!1}}buildSettingsUi(t,e){new D.Setting(t).setHeading().setName("Whole Note Encryption Settings"),new D.Setting(t).setName("Default view for new tabs").setDesc("The default view that a new encrypted note tab gets opened in").addDropdown(n=>{var i;n.addOption(`${"Source"}`,"Source view").addOption(`${"Reading"}`,"Reading view").setValue(`${(i=this.settings.defaultView)!=null?i:"Source"}`).onChange(async s=>{this.settings.defaultView=s,await e()})})}};var v=require("obsidian");var b=require("obsidian");var _=class extends b.Modal{constructor(e,n,i,s,r){super(e);this.resultConfirmed=!1;this.title=n,this.defaultPassword=r,this.confirmPassword=s,this.isEncrypting=i}onOpen(){var h,f,d,l;let{contentEl:e}=this;e.empty(),this.invalidate();let n=(f=(h=this.defaultPassword)==null?void 0:h.password)!=null?f:"",i="",s=(l=(d=this.defaultPassword)==null?void 0:d.hint)!=null?l:"";new b.Setting(e).setHeading().setName(this.title),E.buildPasswordSetting({container:e,name:"Password:",placeholder:this.isEncrypting?"":`Hint: ${s}`,initialValue:n,autoFocus:n=="",onChangeCallback:c=>{n=c,this.invalidate()},onEnterCallback:c=>{if(n=c,this.invalidate(),n.length>0)if(r.settingEl.isShown()){let p=r.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}else if(o.settingEl.isShown()){let p=o.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}else a()&&this.close()}});let r=E.buildPasswordSetting({container:e,name:"Confirm Password:",autoFocus:n!="",onChangeCallback:c=>{i=c,this.invalidate()},onEnterCallback:c=>{if(i=c,this.invalidate(),i.length>0&&a()&&o.settingEl.isShown()){let p=o.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}}});this.confirmPassword||r.settingEl.hide();let o=new b.Setting(e).setName("Optional Password Hint").addText(c=>{c.inputEl.placeholder="Password Hint",c.setValue(s),c.onChange(p=>s=p),c.inputEl.on("keypress","*",(p,m)=>{p.key=="Enter"&&m instanceof HTMLInputElement&&m.value.length>0&&(p.preventDefault(),a()&&this.close())})});this.isEncrypting||o.settingEl.hide(),new b.Setting(e).addButton(c=>{c.setButtonText("Confirm").onClick(p=>{a()&&this.close()})});let a=()=>(this.invalidate(),r.setDesc(""),this.confirmPassword&&n!=i?(r.setDesc("Passwords don't match"),!1):(this.resultConfirmed=!0,this.resultPassword={password:n,hint:s},!0))}openAsync(){return new Promise((e,n)=>{this.onClose=()=>{this.resultConfirmed==!0?e(this.resultPassword):n()},this.open()})}invalidate(){this.resultConfirmed=!1,this.resultPassword={password:"",hint:""}}};var J=class{async onload(t,e){this.plugin=t,this.plugin.addCommand({id:"meld-encrypt-convert-to-or-from-encrypted-note",name:"Convert to or from an Encrypted note",icon:"file-lock",checkCallback:n=>this.processCommandConvertActiveNote(n)}),this.plugin.addRibbonIcon("file-lock","Convert to or from an Encrypted note",n=>this.processCommandConvertActiveNote(!1)),this.plugin.registerEvent(this.plugin.app.workspace.on("file-menu",(n,i)=>{i instanceof v.TFile&&(i.extension=="md"&&n.addItem(s=>{s.setTitle("Encrypt note").setIcon("file-lock").onClick(()=>this.processCommandEncryptNote(i))}),i.extension==k&&n.addItem(s=>{s.setTitle("Decrypt note").setIcon("file").onClick(()=>this.processCommandDecryptNote(i))}))}))}onunload(){}buildSettingsUi(t,e){}checkCanEncryptFile(t){return t==null?!1:t.extension=="md"}checkCanDecryptFile(t){return t==null?!1:t.extension==k}processCommandEncryptNote(t){this.getPasswordAndEncryptFile(t).catch(e=>{e&&new v.Notice(e,1e4)})}processCommandDecryptNote(t){this.getPasswordAndDecryptFile(t).catch(e=>{e&&new v.Notice(e,1e4)})}processCommandConvertActiveNote(t){let e=this.plugin.app.workspace.getActiveFile();if(t)return this.checkCanEncryptFile(e)||this.checkCanDecryptFile(e);(e==null?void 0:e.extension)=="md"&&this.getPasswordAndEncryptFile(e).catch(n=>{n&&new v.Notice(n,1e4)}),(e==null?void 0:e.extension)==k&&this.getPasswordAndDecryptFile(e).catch(n=>{n&&new v.Notice(n,1e4)})}async getPasswordAndEncryptFile(t){if(!this.checkCanEncryptFile(t))throw new Error("Unable to encrypt file");let e=g.getByFile(t),n=new _(app,"Encrypt Note",!0,!0,e);try{let i=await n.openAsync(),s=await this.encryptFile(t,i);await this.closeUpdateRememberPasswordThenReopen(t,k,s,i),new v.Notice("\u{1F510} Note was encrypted \u{1F510}")}catch(i){i&&new v.Notice(i,1e4)}}async getPasswordAndDecryptFile(t){if(!this.checkCanDecryptFile(t))throw new Error("Unable to decrypt file");let e=g.getByFile(t);if(e.password!=""){let r=await this.decryptFile(t,e.password);if(r!=null){await this.closeUpdateRememberPasswordThenReopen(t,"md",r,e);return}}let n=await app.vault.read(t),i=I.decode(n),s=new _(app,"Decrypt Note",!1,!1,{password:"",hint:i.hint});try{if(e=await s.openAsync(),!s.resultConfirmed)return;let r=await this.decryptFile(t,e.password);if(r==null)throw new Error("Decryption failed");await this.closeUpdateRememberPasswordThenReopen(t,"md",r,e),new v.Notice("\u{1F513} Note was decrypted \u{1F513}")}catch(r){r&&new v.Notice(r,1e4)}}async closeUpdateRememberPasswordThenReopen(t,e,n,i){let s=!1;this.plugin.app.workspace.iterateAllLeaves(r=>{r.view instanceof v.TextFileView&&r.view.file==t&&(r.detach(),s=!0)});try{let r=B.getFilePathWithNewExtension(t,e);await app.fileManager.renameFile(t,r),await app.vault.modify(t,n),g.putByFile(i,t)}finally{s&&await app.workspace.getLeaf().openFile(t)}}async encryptFile(t,e){let n=await app.vault.read(t),i=await S.encode(e.password,e.hint,n);return I.encode(i)}async decryptFile(t,e){let n=await app.vault.read(t),i=I.decode(n);return await S.decrypt(i,e)}};var re=class extends be.Plugin{constructor(){super(...arguments);this.enabledFeatures=[]}async onload(){await this.loadSettings(),this.enabledFeatures.push(new j,new J,new $),this.addSettingTab(new W(this.app,this,this.settings,this.enabledFeatures)),this.enabledFeatures.forEach(async e=>{await e.onload(this,this.settings)})}onunload(){this.enabledFeatures.forEach(async e=>{e.onunload()})}async loadSettings(){let e={confirmPassword:!0,rememberPassword:!0,rememberPasswordTimeout:30,rememberPasswordLevel:g.LevelFilename,featureWholeNoteEncrypt:{defaultView:"Source".toString()},featureInplaceEncrypt:{expandToWholeLines:!1,showMarkerWhenReadingDefault:!0}};this.settings=Object.assign(e,await this.loadData()),g.setActive(this.settings.rememberPassword),g.setAutoExpire(this.settings.rememberPasswordTimeout==0?null:this.settings.rememberPasswordTimeout),g.setLevel(this.settings.rememberPasswordLevel)}async saveSettings(){await this.saveData(this.settings)}}; +`),await this.encodeAndSave(),g.putByFile({password:l,hint:p},this.file),this.currentEditNoteMode="Source",this.refreshView(2))},s=g.getByFile(this.file),r=s.password,o="",a=s.hint,h=E.buildPasswordSetting({container:n,name:"Password:",autoFocus:!0,initialValue:r,onChangeCallback:l=>{r=l,h.setDesc(this.validatePassword(r)),f.setDesc(this.validateConfirm(r,o))},onEnterCallback:l=>{var c;r=l,r.length>0&&((c=f.controlEl.querySelector("input"))==null||c.focus())}}),f=E.buildPasswordSetting({container:n,name:"Confirm:",autoFocus:!1,onChangeCallback:l=>{o=l,h.setDesc(this.validatePassword(r)),f.setDesc(this.validateConfirm(r,o))},onEnterCallback:l=>{var p;o=l,r===o&&((p=d.controlEl.querySelector("input"))==null||p.focus())}}),d=new y.Setting(n).setName("Hint:").addText(l=>{l.setValue(a),l.onChange(c=>{a=c})});d.controlEl.on("keydown","*",l=>{l.key==="Enter"&&(l.preventDefault(),i(r,o,a))}),new y.Setting(n).addButton(l=>{l.setCta().setIcon("go-to-file").setTooltip("Edit").onClick(c=>i(r,o,a))})}addDecryptNoteView(e){this.addHeader(e,"This note is encrypted");let n=this.addUserInputContainer(e);new y.Setting(n).setDesc("Please provide a password to unlock this note.");let i=E.buildPasswordSetting({container:n,name:"Password:",autoFocus:!0,placeholder:this.formatHint(this.hint),onChangeCallback:r=>{this.encryptionPassword=r,i.setDesc(this.validatePassword(this.encryptionPassword))},onEnterCallback:async()=>await this.handleDecryptButtonClick()});new y.Setting(n).addButton(r=>{r.setCta().setIcon("checkmark").setTooltip("Unlock & Edit").onClick(o=>this.handleDecryptButtonClick())});let s=g.getByFile(this.file);this.encryptionPassword=s.password,s.password.length>0&&this.decryptWithPassword(s.password).then(r=>{r!=null&&(this.currentEditorSourceText=r,this.refreshView(2),new y.Notice("Decrypted using remembered password",2e3))})}async encodeAndSave(){try{let e=await S.encode(this.encryptionPassword,this.hint,this.currentEditorSourceText);this.data=I.encode(e),this.requestSave()}catch(e){console.error(e),new y.Notice(e,1e4)}}addEditorSourceView(e){this.elActionReadingView.show(),this.elActionIconLockNote.show(),this.elActionChangePassword.show(),this.addHeader(e,"Editing an encrypted note");let n=e.createDiv({cls:"editor-source-view"});n.spellcheck=!0,n.autocapitalize="on",n.translate=!1,n.contentEditable="plaintext-only",n.innerText=this.currentEditorSourceText,n.focus(),n.on("input","*",async(i,s)=>{this.currentEditorSourceText=n.innerText,await this.encodeAndSave()})}addEditorReadingView(e){this.elActionEditView.show(),this.elActionIconLockNote.show(),this.elActionChangePassword.show(),this.addHeader(e,"Reading an encrypted note");let n=e.createDiv({cls:"editor-reading-view"});y.MarkdownRenderer.renderMarkdown(this.currentEditorSourceText,n,this.file.path,this).catch(i=>{console.error(i)})}addUserInputContainer(e){return e.createDiv({cls:"input-container"})}addChangePasswordView(e){this.addHeader(e,"Change encrypted note password");let n=this.addUserInputContainer(e),i="",s="",r="",o=async(d,l,c)=>{let p=this.validatePassword(d),m=this.validateConfirm(d,l);a.setDesc(p),h.setDesc(m),p.length===0&&m.length===0&&(this.encryptionPassword=d,this.hint=c,this.encodeAndSave(),this.refreshView(2),g.putByFile({password:d,hint:c},this.file),new y.Notice("Password and Hint were changed"))},a=E.buildPasswordSetting({container:n,name:"New Password:",autoFocus:!0,onChangeCallback:d=>{i=d,a.setDesc(this.validatePassword(i)),h.setDesc(this.validateConfirm(i,s))},onEnterCallback:d=>{var l;i=d,i.length>0&&((l=h.controlEl.querySelector("input"))==null||l.focus())}}),h=E.buildPasswordSetting({container:n,name:"Confirm:",onChangeCallback:d=>{s=d,a.setDesc(this.validatePassword(i)),h.setDesc(this.validateConfirm(i,s))},onEnterCallback:d=>{var c;s=d,i===s&&((c=f.controlEl.querySelector("input"))==null||c.focus())}}),f=new y.Setting(n).setName("New Hint:").addText(d=>{d.onChange(l=>{r=l})});f.controlEl.on("keydown","*",d=>{d.key==="Enter"&&(d.preventDefault(),o(i,s,r))}),new y.Setting(n).addButton(d=>{d.removeCta().setIcon("cross").setTooltip("Cancel").onClick(()=>{this.refreshView(2)})}).addButton(d=>{d.setCta().setIcon("checkmark").setTooltip("Change Password").setWarning().onClick(l=>{o(i,s,r)})})}formatHint(e){return e.length>0?`Hint: ${e}`:""}refreshView(e){this.currentView=e,this.elActionEditView.hide(),this.elActionReadingView.hide(),this.elActionIconLockNote.hide(),this.elActionChangePassword.hide(),this.contentEl.empty(),_.readableLineLength?this.contentEl.classList.add("is-readable-line-width"):this.contentEl.classList.remove("is-readable-line-width");let n=this.contentEl.createDiv({cls:"content-container"});switch(this.currentView){case 4:this.addNewNoteView(n);break;case 1:this.addDecryptNoteView(n);break;case 2:this.currentEditNoteMode=="Source"?this.addEditorSourceView(n):this.addEditorReadingView(n);break;case 3:this.addChangePasswordView(n);break}}async decryptWithPassword(e){let n=I.decode(this.data);return await S.decrypt(n,e)}async handleDecryptButtonClick(){let e=await this.decryptWithPassword(this.encryptionPassword);e===null?new y.Notice("Decryption failed"):(g.putByFile({password:this.encryptionPassword,hint:this.hint},this.file),this.currentEditorSourceText=e,this.refreshView(2))}canAcceptExtension(e){return M.contains(e)}getViewType(){return j}setViewData(e,n){if(n){let i;e===""?i=4:i=1,this.encryptionPassword="";let s=I.decode(this.data);this.hint=s.hint,this.refreshView(i)}else this.leaf.detach(),new y.Notice("Multiple views of the same encrypted note isn't supported")}getViewData(){return this.data}clear(){}};var J=class{async onload(t,e){this.plugin=t,this.settings=e.featureWholeNoteEncrypt,this.plugin.addRibbonIcon("file-lock-2","New encrypted note",n=>{this.processCreateNewEncryptedNoteCommand()}),this.plugin.registerView(j,n=>new q(n,this.settings)),this.plugin.registerExtensions(M,j),this.plugin.addCommand({id:"meld-encrypt-create-new-note",name:"Create new encrypted note",icon:"file-lock-2",callback:()=>this.processCreateNewEncryptedNoteCommand()}),this.plugin.addCommand({id:"meld-encrypt-toggle-reading-view",name:"Toggle Reading View",icon:"edit",callback:()=>this.processToggleReadingViewCommand()})}onunload(){this.plugin.app.workspace.detachLeavesOfType(j)}processToggleReadingViewCommand(){let t=this.plugin.app.workspace.getActiveViewOfType(q);t==null||t.toggleReadingView()}processCreateNewEncryptedNoteCommand(){try{let t=(0,D.moment)().format(`[Untitled] YYYYMMDD hhmmss[.${re}]`),e,n=this.plugin.app.workspace.getActiveFile();n!=null?e=this.plugin.app.fileManager.getNewFileParent(n.path):e=this.plugin.app.fileManager.getNewFileParent("");let i=(0,D.normalizePath)(e.path+"/"+t);this.plugin.app.vault.create(i,"").then(async s=>{await this.plugin.app.workspace.getLeaf(!0).openFile(s)}).catch(s=>{new D.Notice(s,1e4)})}catch(t){console.error(t),new D.Notice(t,1e4)}}buildSettingsUi(t,e){new D.Setting(t).setHeading().setName("Whole Note Encryption Settings"),new D.Setting(t).setName("Default view for new tabs").setDesc("The default view that a new encrypted note tab gets opened in").addDropdown(n=>{var i;n.addOption(`${"Source"}`,"Source view").addOption(`${"Reading"}`,"Reading view").setValue(`${(i=this.settings.defaultView)!=null?i:"Source"}`).onChange(async s=>{this.settings.defaultView=s,await e()})})}};var v=require("obsidian");var b=require("obsidian");var K=class extends b.Modal{constructor(e,n,i,s,r){super(e);this.resultConfirmed=!1;this.title=n,this.defaultPassword=r,this.confirmPassword=s,this.isEncrypting=i}onOpen(){var h,f,d,l;let{contentEl:e}=this;e.empty(),this.invalidate();let n=(f=(h=this.defaultPassword)==null?void 0:h.password)!=null?f:"",i="",s=(l=(d=this.defaultPassword)==null?void 0:d.hint)!=null?l:"";new b.Setting(e).setHeading().setName(this.title),E.buildPasswordSetting({container:e,name:"Password:",placeholder:this.isEncrypting?"":`Hint: ${s}`,initialValue:n,autoFocus:n=="",onChangeCallback:c=>{n=c,this.invalidate()},onEnterCallback:c=>{if(n=c,this.invalidate(),n.length>0)if(r.settingEl.isShown()){let p=r.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}else if(o.settingEl.isShown()){let p=o.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}else a()&&this.close()}});let r=E.buildPasswordSetting({container:e,name:"Confirm Password:",autoFocus:n!="",onChangeCallback:c=>{i=c,this.invalidate()},onEnterCallback:c=>{if(i=c,this.invalidate(),i.length>0&&a()&&o.settingEl.isShown()){let p=o.components.find(m=>m instanceof b.TextComponent);p instanceof b.TextComponent&&p.inputEl.focus()}}});this.confirmPassword||r.settingEl.hide();let o=new b.Setting(e).setName("Optional Password Hint").addText(c=>{c.inputEl.placeholder="Password Hint",c.setValue(s),c.onChange(p=>s=p),c.inputEl.on("keypress","*",(p,m)=>{p.key=="Enter"&&m instanceof HTMLInputElement&&m.value.length>0&&(p.preventDefault(),a()&&this.close())})});this.isEncrypting||o.settingEl.hide(),new b.Setting(e).addButton(c=>{c.setButtonText("Confirm").onClick(p=>{a()&&this.close()})});let a=()=>(this.invalidate(),r.setDesc(""),this.confirmPassword&&n!=i?(r.setDesc("Passwords don't match"),!1):(this.resultConfirmed=!0,this.resultPassword={password:n,hint:s},!0))}openAsync(){return new Promise((e,n)=>{this.onClose=()=>{this.resultConfirmed==!0?e(this.resultPassword):n()},this.open()})}invalidate(){this.resultConfirmed=!1,this.resultPassword={password:"",hint:""}}};var Q=class{async onload(t,e){this.plugin=t,this.plugin.addCommand({id:"meld-encrypt-convert-to-or-from-encrypted-note",name:"Convert to or from an Encrypted note",icon:"file-lock",checkCallback:n=>this.processCommandConvertActiveNote(n)}),this.plugin.addRibbonIcon("file-lock","Convert to or from an Encrypted note",n=>this.processCommandConvertActiveNote(!1)),this.plugin.registerEvent(this.plugin.app.workspace.on("file-menu",(n,i)=>{i instanceof v.TFile&&(i.extension=="md"&&n.addItem(s=>{s.setTitle("Encrypt note").setIcon("file-lock").onClick(()=>this.processCommandEncryptNote(i))}),M.contains(i.extension)&&n.addItem(s=>{s.setTitle("Decrypt note").setIcon("file").onClick(()=>this.processCommandDecryptNote(i))}))}))}onunload(){}buildSettingsUi(t,e){}checkCanEncryptFile(t){return t==null?!1:t.extension=="md"}checkCanDecryptFile(t){return t==null?!1:M.contains(t.extension)}processCommandEncryptNote(t){this.getPasswordAndEncryptFile(t).catch(e=>{e&&new v.Notice(e,1e4)})}processCommandDecryptNote(t){this.getPasswordAndDecryptFile(t).catch(e=>{e&&new v.Notice(e,1e4)})}processCommandConvertActiveNote(t){let e=this.plugin.app.workspace.getActiveFile();if(t)return this.checkCanEncryptFile(e)||this.checkCanDecryptFile(e);(e==null?void 0:e.extension)=="md"&&this.getPasswordAndEncryptFile(e).catch(n=>{n&&new v.Notice(n,1e4)}),e&&M.contains(e.extension)&&this.getPasswordAndDecryptFile(e).catch(n=>{n&&new v.Notice(n,1e4)})}async getPasswordAndEncryptFile(t){if(!this.checkCanEncryptFile(t))throw new Error("Unable to encrypt file");let e=g.getByFile(t),n=new K(app,"Encrypt Note",!0,!0,e);try{let i=await n.openAsync(),s=await this.encryptFile(t,i);await this.closeUpdateRememberPasswordThenReopen(t,re,s,i),new v.Notice("\u{1F510} Note was encrypted \u{1F510}")}catch(i){i&&new v.Notice(i,1e4)}}async getPasswordAndDecryptFile(t){if(!this.checkCanDecryptFile(t))throw new Error("Unable to decrypt file");let e=g.getByFile(t);if(e.password!=""){let r=await this.decryptFile(t,e.password);if(r!=null){await this.closeUpdateRememberPasswordThenReopen(t,"md",r,e);return}}let n=await app.vault.read(t),i=I.decode(n),s=new K(app,"Decrypt Note",!1,!1,{password:"",hint:i.hint});try{if(e=await s.openAsync(),!s.resultConfirmed)return;let r=await this.decryptFile(t,e.password);if(r==null)throw new Error("Decryption failed");await this.closeUpdateRememberPasswordThenReopen(t,"md",r,e),new v.Notice("\u{1F513} Note was decrypted \u{1F513}")}catch(r){r&&new v.Notice(r,1e4)}}async closeUpdateRememberPasswordThenReopen(t,e,n,i){let s=!1;this.plugin.app.workspace.iterateAllLeaves(r=>{r.view instanceof v.TextFileView&&r.view.file==t&&(r.detach(),s=!0)});try{let r=B.getFilePathWithNewExtension(t,e);await app.fileManager.renameFile(t,r),await app.vault.modify(t,n),g.putByFile(i,t)}finally{s&&await app.workspace.getLeaf().openFile(t)}}async encryptFile(t,e){let n=await app.vault.read(t),i=await S.encode(e.password,e.hint,n);return I.encode(i)}async decryptFile(t,e){let n=await app.vault.read(t),i=I.decode(n);return await S.decrypt(i,e)}};var oe=class extends Ce.Plugin{constructor(){super(...arguments);this.enabledFeatures=[]}async onload(){await this.loadSettings(),this.enabledFeatures.push(new J,new Q,new G),this.addSettingTab(new W(this.app,this,this.settings,this.enabledFeatures)),this.enabledFeatures.forEach(async e=>{await e.onload(this,this.settings)})}onunload(){this.enabledFeatures.forEach(async e=>{e.onunload()})}async loadSettings(){let e={confirmPassword:!0,rememberPassword:!0,rememberPasswordTimeout:30,rememberPasswordLevel:g.LevelFilename,featureWholeNoteEncrypt:{defaultView:"Source".toString()},featureInplaceEncrypt:{expandToWholeLines:!1,showMarkerWhenReadingDefault:!0}};this.settings=Object.assign(e,await this.loadData()),g.setActive(this.settings.rememberPassword),g.setAutoExpire(this.settings.rememberPasswordTimeout==0?null:this.settings.rememberPasswordTimeout),g.setLevel(this.settings.rememberPasswordLevel)}async saveSettings(){await this.saveData(this.settings)}}; diff --git a/.obsidian/plugins/meld-encrypt/manifest.json b/.obsidian/plugins/meld-encrypt/manifest.json index 231738bf..49ac8b6b 100644 --- a/.obsidian/plugins/meld-encrypt/manifest.json +++ b/.obsidian/plugins/meld-encrypt/manifest.json @@ -1,7 +1,7 @@ { "id": "meld-encrypt", "name": "Meld Encrypt", - "version": "2.3.1", + "version": "2.3.2", "minAppVersion": "1.0.3", "description": "Hide secrets in your vault", "author": "meld-cp", diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index 6db2fcf6..3fb1d2de 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2023-09-25", - "size": 18383005 + "date": "2023-10-01", + "size": 18560755 } ], "activityHistory": [ @@ -2507,6 +2507,30 @@ { "date": "2023-09-25", "value": 53091 + }, + { + "date": "2023-09-26", + "value": 2707 + }, + { + "date": "2023-09-27", + "value": 2064 + }, + { + "date": "2023-09-28", + "value": 1462 + }, + { + "date": "2023-09-29", + "value": 1880 + }, + { + "date": "2023-09-30", + "value": 13291 + }, + { + "date": "2023-10-01", + "value": 184982 } ] } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index 0486f6ac..4ff9f7ce 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -1570,7 +1570,7 @@ "links": 1 }, "01.02 Home/Household.md": { - "size": 9001, + "size": 1775, "tags": 2, "links": 2 }, @@ -3015,7 +3015,7 @@ "links": 1 }, "01.02 Home/Bandes Dessinées.md": { - "size": 1671, + "size": 1888, "tags": 2, "links": 3 }, @@ -8714,11 +8714,6 @@ "tags": 4, "links": 2 }, - "02.03 Zürich/William's Butcherstable.md": { - "size": 1636, - "tags": 2, - "links": 2 - }, "00.01 Admin/Calendars/2023-03-12.md": { "size": 1412, "tags": 0, @@ -8804,11 +8799,6 @@ "tags": 0, "links": 2 }, - "00.02 Inbox/Le Temps gagné.md": { - "size": 969, - "tags": 1, - "links": 1 - }, "00.02 Inbox/Le Camp des Saints.md": { "size": 885, "tags": 1, @@ -9937,7 +9927,7 @@ "00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md": { "size": 73609, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/In the American West, a Clown Motel and a Cemetery Tell a Story of Kitsch and Carnage.md": { "size": 17667, @@ -9947,12 +9937,12 @@ "00.03 News/A Mother’s Exchange for Her Daughter’s Future.md": { "size": 36800, "tags": 2, - "links": 1 + "links": 2 }, "00.03 News/Three days inside the sparkly, extremely hard-core world of Canadian cheerleading.md": { "size": 22655, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/The Disease of More.md": { "size": 9027, @@ -9977,7 +9967,7 @@ "00.03 News/The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims.md": { "size": 9020, "tags": 4, - "links": 1 + "links": 2 }, "00.01 Admin/Calendars/2023-06-14.md": { "size": 1412, @@ -10257,7 +10247,7 @@ "00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md": { "size": 46313, "tags": 2, - "links": 1 + "links": 2 }, "00.03 News/Robert F. Kennedy Jr.’s Inside Job.md": { "size": 52839, @@ -10325,7 +10315,7 @@ "links": 2 }, "01.07 Animals/2023-07-13 Health check.md": { - "size": 1404, + "size": 1550, "tags": 3, "links": 3 }, @@ -10382,7 +10372,7 @@ "00.03 News/How I Survived a Wedding in a Jungle That Tried to Eat Me Alive.md": { "size": 3554, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/They lost their kids to Fortnite - Macleans.ca.md": { "size": 39704, @@ -10437,7 +10427,7 @@ "00.03 News/The Greatest Scam Ever Written.md": { "size": 33396, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/Mythology and Misogyny at the Edge of the World.md": { "size": 45222, @@ -10532,7 +10522,7 @@ "03.04 Cinematheque/The Hunger Games (2012).md": { "size": 2047, "tags": 0, - "links": 1 + "links": 4 }, "00.01 Admin/Calendars/2023-08-10.md": { "size": 1412, @@ -10572,7 +10562,7 @@ "03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md": { "size": 2084, "tags": 0, - "links": 1 + "links": 4 }, "00.01 Admin/Calendars/2023-08-12.md": { "size": 1412, @@ -10662,12 +10652,12 @@ "00.03 News/How Hip-Hop Conquered the World.md": { "size": 26622, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him.md": { "size": 51340, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/Who Murdered Apotex Pharma Billionaire Barry Sherman and Honey.md": { "size": 50834, @@ -10682,12 +10672,12 @@ "03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md": { "size": 2096, "tags": 0, - "links": 1 + "links": 4 }, "03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md": { "size": 2096, "tags": 0, - "links": 1 + "links": 4 }, "00.01 Admin/Calendars/2023-08-24.md": { "size": 1412, @@ -10747,7 +10737,7 @@ "00.03 News/The Inheritance Case That Could Unravel an Art Dynasty.md": { "size": 47782, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/Buried under the ice.md": { "size": 34526, @@ -10807,12 +10797,12 @@ "00.03 News/How a Man in Prison Stole Millions from Billionaires.md": { "size": 40192, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/How Some Men Play Dungeons & Dragons on Texas’ Death Row.md": { "size": 33916, "tags": 4, - "links": 1 + "links": 2 }, "00.01 Admin/Calendars/2023-09-10.md": { "size": 1412, @@ -10867,7 +10857,7 @@ "00.03 News/Confessions of a McKinsey Whistleblower.md": { "size": 31218, "tags": 3, - "links": 1 + "links": 2 }, "00.03 News/Naomi Klein on following her ‘doppelganger’ down the conspiracy rabbit hole – and why millions of people have entered an alternative political reality.md": { "size": 43060, @@ -10882,7 +10872,7 @@ "00.03 News/The Serial Killer Hiding in Plain Sight.md": { "size": 28863, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/The maestro The man who built the biggest match-fixing ring in tennis.md": { "size": 46201, @@ -10891,8 +10881,8 @@ }, "00.03 News/The Source Years.md": { "size": 19331, - "tags": 5, - "links": 1 + "tags": 4, + "links": 2 }, "00.03 News/Can We Talk to Whales.md": { "size": 50785, @@ -10942,7 +10932,7 @@ "00.01 Admin/Calendars/2023-09-22.md": { "size": 1412, "tags": 0, - "links": 4 + "links": 6 }, "01.07 Animals/@@Animals Master.md": { "size": 1157, @@ -10982,7 +10972,7 @@ "00.03 News/Florida has become a zoo. A literal zoo..md": { "size": 33545, "tags": 4, - "links": 1 + "links": 2 }, "00.03 News/The radical earnestness of Tony P.md": { "size": 16735, @@ -10993,14 +10983,79 @@ "size": 1613, "tags": 2, "links": 1 + }, + "00.01 Admin/Calendars/2023-09-26.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2023-09-27.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "03.01 Reading list/Le Temps gagné.md": { + "size": 969, + "tags": 1, + "links": 2 + }, + "00.01 Admin/Calendars/2023-09-28.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "00.01 Admin/Calendars/2023-09-29.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "00.01 Admin/Calendars/2023-09-30.md": { + "size": 1280, + "tags": 0, + "links": 4 + }, + "02.03 Zürich/William's ButchersTable.md": { + "size": 1581, + "tags": 3, + "links": 2 + }, + "00.01 Admin/Calendars/2023-10-01.md": { + "size": 1426, + "tags": 0, + "links": 5 + }, + "00.03 News/Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero.md": { + "size": 7987, + "tags": 4, + "links": 1 + }, + "00.03 News/Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate.md": { + "size": 23426, + "tags": 5, + "links": 1 + }, + "00.03 News/SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership.md": { + "size": 59606, + "tags": 3, + "links": 1 + }, + "00.03 News/Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego.md": { + "size": 56793, + "tags": 3, + "links": 1 + }, + "00.03 News/The inequality of heat.md": { + "size": 34427, + "tags": 3, + "links": 1 } }, "commitTypes": { "/": { - "Refactor": 6136, - "Create": 2026, - "Link": 7943, - "Expand": 1778 + "Refactor": 6146, + "Create": 2038, + "Link": 7989, + "Expand": 1783 } }, "dailyCommits": { @@ -11012,39 +11067,44 @@ "4": 17, "5": 14, "6": 69, - "7": 747, - "8": 979, - "9": 926, - "10": 637, - "11": 483, - "12": 6615, - "13": 516, - "14": 460, + "7": 751, + "8": 985, + "9": 939, + "10": 639, + "11": 484, + "12": 6617, + "13": 517, + "14": 462, "15": 495, - "16": 614, - "17": 671, - "18": 844, - "19": 580, - "20": 572, - "21": 581, - "22": 557, + "16": 634, + "17": 676, + "18": 847, + "19": 586, + "20": 573, + "21": 583, + "22": 562, "23": 1257 } }, "weeklyCommits": { "/": { "Mon": 2600, - "Tue": 1470, - "Wed": 7623, - "Thu": 1038, - "Fri": 1111, + "Tue": 1482, + "Wed": 7633, + "Thu": 1041, + "Fri": 1114, "Sat": 0, - "Sun": 4041 + "Sun": 4086 } }, "recentCommits": { "/": { "Expanded": [ + " 2023-10-01 ", + " William's ButchersTable ", + " Household ", + " Bandes Dessinées ", + " 2023-07-13 Health check ", " Felix Hoffmann ", " Felix Hoffmann ", " @Sally ", @@ -11090,14 +11150,21 @@ " Life mementos ", " Household ", " Configuring UFW ", - " Bandes Dessinées ", - " 2023-07-13 Health check ", - " 2023-08-12 Front leg inflammation ", - " 2023-07-13 Health check ", - " 2023-08-12 Front leg inflammation ", - " 2023-07-22 Check " + " Bandes Dessinées " ], "Created": [ + " The inequality of heat ", + " Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego ", + " SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership ", + " Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate ", + " Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero ", + " 2023-10-01 ", + " Untitled ", + " 2023-09-30 ", + " 2023-09-29 ", + " 2023-09-28 ", + " 2023-09-27 ", + " 2023-09-26 ", " Felix Hoffmann ", " The radical earnestness of Tony P ", " Florida has become a zoo. A literal zoo. ", @@ -11136,21 +11203,16 @@ " 2023-09-11 ", " 2023-09-10 ", " Carlos Alcaraz Is Bringing the Thrill Back to Tennis ", - " How Some Men Play Dungeons & Dragons on Texas’ Death Row ", - " How a Man in Prison Stole Millions from Billionaires ", - " 2023-09-08 🏉 France - New Zealand ", - " 2023-09-09 ", - " 2023-09-08 ", - " 2023-09-07 ", - " 2023-09-06 ", - " 2023-09-05 ", - " 2023-09-04 ", - " 2023-09-03 ", - " Untitled ", - " 2023-09-02 ", - " Buried under the ice " + " How Some Men Play Dungeons & Dragons on Texas’ Death Row " ], "Renamed": [ + " The inequality of heat ", + " Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego ", + " SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership ", + " Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate ", + " Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero ", + " William's ButchersTable ", + " Le Temps gagné ", " Felix Hoffmann ", " The radical earnestness of Tony P ", " Florida has become a zoo. A literal zoo. ", @@ -11194,16 +11256,16 @@ " The Maltese Falcon (1941) ", " A Climate Warning from the Cradle of Civilization ", " Held Together ", - " Utopia to blight Surviving in Henry Ford’s lost jungle town ", - " In the Bahamas, a smuggler’s paradise thrives on today’s cargo people ", - " The Hunger Games (2012) ", - " One Night in Miami (2020) ", - " Black Girl (1966) ", - " Beau travail (1999) ", - " Operation Corned Beef (1991) ", - " Breathless (1960) " + " Utopia to blight Surviving in Henry Ford’s lost jungle town " ], "Tagged": [ + " The inequality of heat ", + " SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership ", + " Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego ", + " Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero ", + " Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate ", + " William's ButchersTable ", + " William's ButchersTable ", " Felix Hoffmann ", " Florida has become a zoo. A literal zoo. ", " The radical earnestness of Tony P ", @@ -11247,16 +11309,10 @@ " We Are All Animals at Night Hazlitt ", " A Small-Town Paper Lands a Very Big Story ", " The Greatest Scam Ever Written ", - " Mythology and Misogyny at the Edge of the World ", - " Sihlmatt ", - " Sihlmatt ", - " The Grey ", - " Bookmarks - Social Media ", - " Bookmarks - Admin & services ", - " Bookmarks - Investments ", - " The Cautionary Tale of J. Robert Oppenheimer " + " Mythology and Misogyny at the Edge of the World " ], "Refactored": [ + " Household ", " 2023-09-23 ", " 2023-09-20 ", " 2023-09-16 ", @@ -11306,10 +11362,10 @@ " Configuring UFW ", " Bookmarks - Admin & services ", " Household ", - " @lebv.org Tasks ", - " Hosting Tasks " + " @lebv.org Tasks " ], "Deleted": [ + " William's Butcherstable ", " Untitled ", " Carlos Alcaraz Is Bringing the Thrill Back to Tennis ", " 2023-08-26 Paris SG - RC Lens ", @@ -11359,10 +11415,48 @@ " The Times & The Sunday Times ", " Broccoli and Cheese Quiche ", " 2023-09-08 Trip to NYC ", - " 2022–23 Paris Saint-Germain FC season ", - " 2022-12-30 Stef & Kyna in Zürich 1 " + " 2022–23 Paris Saint-Germain FC season " ], "Linked": [ + " The Hunger Games - Catching Fire (2013) ", + " The Hunger Games - Mockingjay - Part 1 (2014) ", + " The Hunger Games (2012) ", + " The Hunger Games - Mockingjay - Part 2 (2015) ", + " Police called her hanging a suicide. Her mother vowed to find the truth. ", + " How Hip-Hop Conquered the World ", + " 2023-10-01 ", + " Confessions of a McKinsey Whistleblower ", + " How a Man in Prison Stole Millions from Billionaires ", + " Florida has become a zoo. A literal zoo. ", + " Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023 ", + " The inequality of heat ", + " SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership ", + " Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego ", + " Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero ", + " Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate ", + " 2023-10-01 ", + " 2023-09-29 ", + " William's ButchersTable ", + " 2023-09-30 ", + " 2023-09-29 ", + " 2023-09-28 ", + " 2023-09-28 ", + " The Greatest Scam Ever Written ", + " Three days inside the sparkly, extremely hard-core world of Canadian cheerleading ", + " A Mother’s Exchange for Her Daughter’s Future ", + " Le Temps gagné ", + " How Some Men Play Dungeons & Dragons on Texas’ Death Row ", + " 2023-09-22 ", + " 2023-09-27 ", + " 2023-09-27 ", + " 2023-09-26 ", + " The Serial Killer Hiding in Plain Sight ", + " The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims ", + " How I Survived a Wedding in a Jungle That Tried to Eat Me Alive ", + " True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him ", + " The Source Years ", + " The Inheritance Case That Could Unravel an Art Dynasty ", + " 2023-09-26 ", " Felix Hoffmann ", " 2023-09-25 ", " The radical earnestness of Tony P ", @@ -11374,48 +11468,10 @@ " 2023-09-24 ", " 2023-09-23 ", " 2023-09-23 ", - " 2023-09-23 ", - " 2023-09-23 Patron's Cup ", - " 2023-09-23 Patron's Cup ", - " 2023-09-22 Vet Clearance ", - " 2023-09-23 ", - " Conservatives Have a New Master Theory of American Politics ", - " Bandes Dessinées ", - " Why Bill Watterson Vanished - The American Conservative ", - " The maestro The man who built the biggest match-fixing ring in tennis ", - " @@Animals Master ", - " Riley Keough on Growing Up as Elvis’s Granddaughter, Losing Lisa Marie, and Inheriting Graceland ", - " America’s Surprising Partisan Divide on Life Expectancy ", - " Gisele Fetterman’s Had a Hell of a Year ", - " Can We Talk to Whales ", - " 2023-09-22 ", - " 2023-09-21 ", - " 2023-09-21 Last ironing ", - " 2023-09-21 Last ironing ", - " 2023-09-21 ", - " 2023-09-20 ", - " 2023-09-20 ", - " 2023-09-20 ", - " 2023-09-19 ", - " 2023-09-19 ⚽️ PSG - Borussia Dortmund ", - " 2023-09-19 ", - " 2023-09-19 ", - " 2023-09-19 Influenza vaccine ", - " 2023-09-19 ", - " 2023-09-18 ", - " Buried under the ice ", - " 2023-09-18 ", - " Can We Talk to Whales ", - " The Source Years ", - " The maestro The man who built the biggest match-fixing ring in tennis ", - " Gisele Fetterman’s Had a Hell of a Year ", - " The Serial Killer Hiding in Plain Sight ", - " Naomi Klein on following her ‘doppelganger’ down the conspiracy rabbit hole – and why millions of people have entered an alternative political reality ", - " Confessions of a McKinsey Whistleblower ", - " America’s Surprising Partisan Divide on Life Expectancy ", - " 2024-06-08 💍 Mariage Rémi & Séverine " + " 2023-09-23 " ], "Removed Tags from": [ + " The Source Years ", " Msakhan Fatteh ", " Country Music’s Culture Wars and the Remaking of Nashville ", " Bandes Dessinées ", @@ -11465,8 +11521,7 @@ " Selfhosting ", " Configuring Postfix ", " Domains ", - " Configuring Prometheus ", - " Configuring Monit " + " Configuring Prometheus " ], "Removed Links from": [ " Life mementos ", diff --git a/.obsidian/plugins/obsidian-reminder-plugin/data.json b/.obsidian/plugins/obsidian-reminder-plugin/data.json index c586cfe7..056485e4 100644 --- a/.obsidian/plugins/obsidian-reminder-plugin/data.json +++ b/.obsidian/plugins/obsidian-reminder-plugin/data.json @@ -327,7 +327,7 @@ "01.03 Family/Auguste Bédier.md": [ { "title": ":birthday: **[[Auguste Bédier|Auguste]]** %%done_del%%", - "time": "2023-09-30", + "time": "2024-09-30", "rowNumber": 105 } ], @@ -340,39 +340,39 @@ ], "01.02 Home/Household.md": [ { - "title": "♻ [[Household]]: *Paper* recycling collection %%done_del%%", - "time": "2023-09-26", - "rowNumber": 75 - }, - { - "title": "🛎️ :house: [[Household]]: Pay rent %%done_del%%", - "time": "2023-09-30", - "rowNumber": 105 + "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", + "time": "2023-10-03", + "rowNumber": 76 }, { - "title": ":bed: [[Household]] Change bedsheets %%done_del%%", - "time": "2023-09-30", - "rowNumber": 135 + "title": "🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%%", + "time": "2023-10-09", + "rowNumber": 83 }, { - "title": "🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%%", - "time": "2023-10-02", - "rowNumber": 111 + "title": "♻ [[Household]]: *Paper* recycling collection %%done_del%%", + "time": "2023-10-10", + "rowNumber": 75 }, { - "title": "♻ [[Household]]: *Cardboard* recycling collection %%done_del%%", - "time": "2023-10-03", - "rowNumber": 87 + "title": ":bed: [[Household]] Change bedsheets %%done_del%%", + "time": "2023-10-14", + "rowNumber": 84 }, { "title": ":blue_car: [[Household]]: Change to Winter tyres %%done_del%%", "time": "2023-10-15", - "rowNumber": 153 + "rowNumber": 91 + }, + { + "title": "🛎️ :house: [[Household]]: Pay rent %%done_del%%", + "time": "2023-10-31", + "rowNumber": 82 }, { "title": ":blue_car: [[Household]]: Change to Summer tyres %%done_del%%", "time": "2024-04-15", - "rowNumber": 152 + "rowNumber": 90 } ], "01.03 Family/Pia Bousquié.md": [ @@ -455,13 +455,13 @@ "05.02 Networks/Configuring UFW.md": [ { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%%", - "time": "2023-09-30", + "time": "2023-10-07", "rowNumber": 239 }, { "title": "🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%%", - "time": "2023-09-30", - "rowNumber": 276 + "time": "2023-10-07", + "rowNumber": 277 } ], "01.03 Family/Amélie Solanet.md": [ @@ -593,11 +593,6 @@ "title": "🤵🏻 [[@Lifestyle|Lifestyle]]: Etre plus social", "time": "2023-12-31", "rowNumber": 79 - }, - { - "title": "🏃🏻‍♂️ [[@Lifestyle|Lifestyle]]: Etre plus actif & plus sain", - "time": "2023-12-31", - "rowNumber": 80 } ], "06.02 Investments/Equity Tasks.md": [ @@ -641,25 +636,25 @@ } ], "01.07 Animals/@Sally.md": [ - { - "title": ":racehorse: [[@Sally|Sally]]: Vet check %%done_del%%", - "time": "2023-09-30", - "rowNumber": 127 - }, { "title": ":racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%%", "time": "2023-10-10", - "rowNumber": 130 + "rowNumber": 131 }, { "title": ":racehorse: [[@Sally|Sally]]: EHV-1 vaccination dose %%done_del%%", "time": "2024-01-31", - "rowNumber": 128 + "rowNumber": 129 }, { "title": ":racehorse: [[@Sally|Sally]]: Influenza vaccination dose %%done_del%%", "time": "2024-01-31", - "rowNumber": 129 + "rowNumber": 130 + }, + { + "title": ":racehorse: [[@Sally|Sally]]: Vet check %%done_del%%", + "time": "2024-03-30", + "rowNumber": 127 } ], "02.03 Zürich/Juan Bautista Bossio.md": [ @@ -732,7 +727,7 @@ "01.07 Animals/2023-07-13 Health check.md": [ { "title": ":racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing", - "time": "2023-09-26", + "time": "2023-10-10", "rowNumber": 53 } ], @@ -744,14 +739,9 @@ } ], "00.01 Admin/Calendars/2023-09-14.md": [ - { - "title": "16:17 :house: [[@Life Admin|Admin]]: Buy lamps for the flat", - "time": "2023-09-28", - "rowNumber": 106 - }, { "title": "16:14 :house: [[@Life Admin|Admin]]: Start checking auction website for opportunities to buy", - "time": "2023-09-30", + "time": "2023-10-15", "rowNumber": 105 } ], @@ -770,16 +760,6 @@ } ], "00.01 Admin/Calendars/2023-09-20.md": [ - { - "title": "11:58 :house: [[@Life Admin|Admin]]: Change address for Insurances", - "time": "2023-09-30", - "rowNumber": 105 - }, - { - "title": "11:59 :house: [[@Life Admin|Admin]]: Change address at Consulate", - "time": "2023-09-30", - "rowNumber": 106 - }, { "title": "12:04 :house: [[@Life Admin|Admin]]: Change address at Verkehrsamt", "time": "2023-09-30", @@ -792,6 +772,25 @@ "time": "2023-11-05", "rowNumber": 49 } + ], + "00.01 Admin/Calendars/2023-09-28.md": [ + { + "title": "21:26 :racehorse: [[@Sally|Sally]]: Buy a mask against the flies", + "time": "2024-03-31", + "rowNumber": 103 + }, + { + "title": "21:27 :racehorse: [[@Sally|Sally]]: Buy a lead (longe)", + "time": "2024-03-31", + "rowNumber": 104 + } + ], + "00.01 Admin/Calendars/2023-10-01.md": [ + { + "title": "10:08 :house: :potted_plant: [[@Life Admin|Admin]]: Look at plants and aromatic garden", + "time": "2023-10-31", + "rowNumber": 103 + } ] }, "debug": false, diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 52a71910..f5d90b50 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,36 +122,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var Nb=Object.create;var ji=Object.defineProperty,Ib=Object.defineProperties,Fb=Object.getOwnPropertyDescriptor,Lb=Object.getOwnPropertyDescriptors,Ub=Object.getOwnPropertyNames,Sp=Object.getOwnPropertySymbols,Wb=Object.getPrototypeOf,Rp=Object.prototype.hasOwnProperty,qb=Object.prototype.propertyIsEnumerable;var Dp=(r,e,t)=>e in r?ji(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ge=(r,e)=>{for(var t in e||(e={}))Rp.call(e,t)&&Dp(r,t,e[t]);if(Sp)for(var t of Sp(e))qb.call(e,t)&&Dp(r,t,e[t]);return r},Dt=(r,e)=>Ib(r,Lb(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Yb=(r,e)=>{for(var t in e)ji(r,t,{get:e[t],enumerable:!0})},Mp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ub(e))!Rp.call(r,i)&&i!==t&&ji(r,i,{get:()=>e[i],enumerable:!(n=Fb(e,i))||n.enumerable});return r};var zn=(r,e,t)=>(t=r!=null?Nb(Wb(r)):{},Mp(e||!r||!r.__esModule?ji(t,"default",{value:r,enumerable:!0}):t,r)),$b=r=>Mp(ji({},"__esModule",{value:!0}),r);var W=(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=b(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.matchAnyPattern=Br.extractTerms=Br.repeatedTimeunitPattern=void 0;function Hb(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Br.repeatedTimeunitPattern=Hb;function xp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Br.extractTerms=xp;function zb(r){return`(?:${xp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Br.matchAnyPattern=zb});var ye=b((wu,ku)=>{(function(r,e){typeof wu=="object"&&typeof ku!="undefined"?ku.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(wu,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+)?$/,E=/\[([^\]]+)]|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("_")},A=function(B,C,w){var H=String(B);return!H||H.length>=C?B:""+Array(C+1-H.length).join(w)+B},P={s:A,z:function(B){var C=-B.utcOffset(),w=Math.abs(C),H=Math.floor(w/60),N=w%60;return(C<=0?"+":"-")+A(H,2,"0")+":"+A(N,2,"0")},m:function B(C,w){if(C.date(){"use strict";var Kb=Hr&&Hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.findYearClosestToRef=Hr.findMostLikelyADYear=void 0;var Vb=Kb(ye());function Qb(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Hr.findMostLikelyADYear=Qb;function Xb(r,e,t){let n=Vb.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.parseTimeUnits=ie.TIME_UNITS_PATTERN=ie.parseYear=ie.YEAR_PATTERN=ie.parseOrdinalNumberPattern=ie.ORDINAL_NUMBER_PATTERN=ie.parseNumberPattern=ie.NUMBER_PATTERN=ie.TIME_UNIT_DICTIONARY=ie.ORDINAL_WORD_DICTIONARY=ie.INTEGER_WORD_DICTIONARY=ie.MONTH_DICTIONARY=ie.FULL_MONTH_NAME_DICTIONARY=ie.WEEKDAY_DICTIONARY=void 0;var Sa=Ee(),Zb=nt();ie.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ie.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ie.MONTH_DICTIONARY=Object.assign(Object.assign({},ie.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ie.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ie.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ie.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ie.NUMBER_PATTERN=`(?:${Sa.matchAnyPattern(ie.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Cp(r){let e=r.toLowerCase();return ie.INTEGER_WORD_DICTIONARY[e]!==void 0?ie.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ie.parseNumberPattern=Cp;ie.ORDINAL_NUMBER_PATTERN=`(?:${Sa.matchAnyPattern(ie.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Jb(r){let e=r.toLowerCase();return ie.ORDINAL_WORD_DICTIONARY[e]!==void 0?ie.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ie.parseOrdinalNumberPattern=Jb;ie.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function ev(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return Zb.findMostLikelyADYear(e)}ie.parseYear=ev;var Pp=`(${ie.NUMBER_PATTERN})\\s{0,3}(${Sa.matchAnyPattern(ie.TIME_UNIT_DICTIONARY)})`,Ap=new RegExp(Pp,"i");ie.TIME_UNITS_PATTERN=Sa.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Pp);function tv(r){let e={},t=r,n=Ap.exec(t);for(;n;)rv(e,n),t=t.substring(n[0].length).trim(),n=Ap.exec(t);return e}ie.parseTimeUnits=tv;function rv(r,e){let t=Cp(e[1]),n=ie.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Np=b((Ou,Su)=>{(function(r,e){typeof Ou=="object"&&typeof Su!="undefined"?Su.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Ou,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Wt=b(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.implySimilarTime=lr.assignSimilarTime=lr.assignSimilarDate=lr.assignTheNextDay=void 0;var Ip=Be();function nv(r,e){e=e.add(1,"day"),Fp(r,e),Lp(r,e)}lr.assignTheNextDay=nv;function Fp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}lr.assignSimilarDate=Fp;function iv(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",Ip.Meridiem.AM):r.assign("meridiem",Ip.Meridiem.PM)}lr.assignSimilarTime=iv;function Lp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}lr.implySimilarTime=Lp});var Up=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.toTimezoneOffset=fn.TIMEZONE_ABBR_MAP=void 0;fn.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function sv(r){var e;return r==null?null:typeof r=="number"?r:(e=fn.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}fn.toTimezoneOffset=sv});var Ne=b(cr=>{"use strict";var Wp=cr&&cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cr,"__esModule",{value:!0});cr.ParsingResult=cr.ParsingComponents=cr.ReferenceWithTimezone=void 0;var av=Wp(Np()),Da=Wp(ye()),Du=Wt(),ov=Up();Da.default.extend(av.default);var Ru=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=ov.toTimezoneOffset(e.timezone))}};cr.ReferenceWithTimezone=Ru;var pn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Da.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new pn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Da.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Da.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new pn(e);return t.hour||t.minute||t.second?(Du.assignSimilarTime(i,n),Du.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Du.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};cr.ParsingComponents=pn;var Gi=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new pn(e),this.end=s}clone(){let e=new Gi(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};cr.ParsingResult=Gi});var q=b(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.AbstractParserWithWordBoundaryChecking=void 0;var Mu=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var Au=it(),uv=Ne(),lv=q(),cv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Au.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),dv=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Au.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),xu=class extends lv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?dv:cv}innerExtract(e,t){let n=Au.parseTimeUnits(t[1]);return uv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Cu.default=xu});var Hp=b(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var fv=nt(),Gp=it(),Bp=it(),Ma=it(),pv=Ee(),hv=q(),mv=new RegExp(`(?:on\\s{0,3})?(${Ma.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ma.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${pv.matchAnyPattern(Gp.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Bp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Yp=1,$p=2,gv=3,jp=4,Pu=class extends hv.AbstractParserWithWordBoundaryChecking{innerPattern(){return mv}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gp.MONTH_DICTIONARY[t[gv].toLowerCase()],s=Ma.parseOrdinalNumberPattern(t[Yp]);if(s>31)return t.index=t.index+t[Yp].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[jp]){let a=Bp.parseYear(t[jp]);n.start.assign("year",a)}else{let a=fv.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[$p]){let a=Ma.parseOrdinalNumberPattern(t[$p]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Nu.default=Pu});var Xp=b(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var yv=nt(),Vp=it(),xa=it(),Qp=it(),Tv=Ee(),_v=q(),bv=new RegExp(`(${Tv.matchAnyPattern(Vp.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${xa.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${xa.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Qp.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),vv=1,Ev=2,zp=3,Kp=4,Iu=class extends _v.AbstractParserWithWordBoundaryChecking{innerPattern(){return bv}innerExtract(e,t){let n=Vp.MONTH_DICTIONARY[t[vv].toLowerCase()],i=xa.parseOrdinalNumberPattern(t[Ev]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Kp]){let u=Qp.parseYear(t[Kp]);s.assign("year",u)}else{let u=yv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[zp])return s;let a=xa.parseOrdinalNumberPattern(t[zp]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Fu.default=Iu});var eh=b(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var Lu=it(),wv=nt(),kv=Ee(),Jp=it(),Ov=q(),Sv=new RegExp(`((?:in)\\s*)?(${kv.matchAnyPattern(Lu.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Jp.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Dv=1,Rv=2,Zp=3,Uu=class extends Ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sv}innerExtract(e,t){let n=t[Rv].toLowerCase();if(t[0].length<=3&&!Lu.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Dv]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Lu.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Zp]){let a=Jp.parseYear(t[Zp]);i.start.assign("year",a)}else{let a=wv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Wu.default=Uu});var nh=b(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var rh=it(),Mv=Ee(),xv=q(),Av=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Mv.matchAnyPattern(rh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Cv=1,Pv=2,th=3,Nv=4,qu=class extends xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Av}innerExtract(e,t){let n=t[th]?parseInt(t[th]):rh.MONTH_DICTIONARY[t[Pv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Cv]);return{day:parseInt(t[Nv]),month:n,year:i}}};Yu.default=qu});var ih=b(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});var Iv=q(),Fv=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Lv=1,Uv=2,$u=class extends Iv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Fv}innerExtract(e,t){let n=parseInt(t[Uv]),i=parseInt(t[Lv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ju.default=$u});var hn=b(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.AbstractTimeExpressionParser=void 0;var gt=Be();function Wv(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function qv(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var sh=2,Kn=3,Aa=4,Ca=5,Bi=6,Gu=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[sh]);if(o>100){if(this.strictMode||t[Kn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Kn]!=null){if(t[Kn].length==1&&!t[Bi])return null;s=parseInt(t[Kn])}if(s>=60)return null;if(o>12&&(a=gt.Meridiem.PM),t[Bi]!=null){if(o>12)return null;let u=t[Bi][0].toLowerCase();u=="a"&&(a=gt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=gt.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",gt.Meridiem.AM):i.imply("meridiem",gt.Meridiem.PM),t[Ca]!=null){let u=parseInt(t[Ca].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Aa]!=null){let u=parseInt(t[Aa]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Ca]!=null){let u=parseInt(t[Ca].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Aa]!=null){let u=parseInt(t[Aa]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[sh]),a=0,o=-1;if(t[Kn]!=null?a=parseInt(t[Kn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=gt.Meridiem.PM),t[Bi]!=null){if(s>12)return null;let u=t[Bi][0].toLowerCase();u=="a"&&(o=gt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=gt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==gt.Meridiem.AM?(n.start.imply("meridiem",gt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",gt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",gt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",gt.Meridiem.PM)):s>12?i.imply("meridiem",gt.Meridiem.PM):s<=12&&i.imply("meridiem",gt.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Wv(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=qv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Pa.AbstractTimeExpressionParser=Gu});var ah=b(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var Na=Be(),Yv=hn(),Bu=class extends Yv.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Na.Meridiem.PM)):i<6&&n.assign("meridiem",Na.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Na.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Na.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Hu.default=Bu});var qt=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.addImpliedTimeUnits=Vn.reverseTimeUnits=void 0;function $v(r){let e={};for(let t in r)e[t]=-r[t];return e}Vn.reverseTimeUnits=$v;function jv(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Vn.addImpliedTimeUnits=jv});var oh=b(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Ku=it(),Gv=Ne(),Bv=q(),Hv=qt(),zv=new RegExp(`(${Ku.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Kv=new RegExp(`(${Ku.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),zu=class extends Bv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Kv:zv}innerExtract(e,t){let n=Ku.parseTimeUnits(t[1]),i=Hv.reverseTimeUnits(n);return Gv.ParsingComponents.createRelativeFromReference(e.reference,i)}};Vu.default=zu});var uh=b(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Xu=it(),Vv=Ne(),Qv=q(),Xv=new RegExp(`(${Xu.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Zv=new RegExp("("+Xu.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Jv=1,Qu=class extends Qv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Zv:Xv}innerExtract(e,t){let n=Xu.parseTimeUnits(t[Jv]);return Vv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Zu.default=Qu});var Xn=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.MergingRefiner=Qn.Filter=void 0;var Ju=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Qn.Filter=Ju;var el=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};Qn.MergingRefiner=el});var dr=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var eE=Xn(),tl=class extends eE.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var tE=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var rE=tE(dr()),nl=class extends rE.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Hi.default=nl});var ch=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.mergeDateTimeComponent=Zn.mergeDateTimeResult=void 0;var nE=Be();function iE(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=il(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=il(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(al,"__esModule",{value:!0});var sE=Xn(),dh=ch(),sl=class extends sE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?dh.mergeDateTimeResult(t,n):dh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};al.default=sl});var fh=b(zi=>{"use strict";var aE=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var oE=aE(Er()),ol=class extends oE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};zi.default=ol});var ph=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var uE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),lE={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},ul=class{constructor(e){this.timezone=Object.assign(Object.assign({},lE),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=uE.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&f!=h&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",f),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",f))}),t}};ll.default=ul});var Ia=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var cE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),dE=1,fE=2,pE=3,cl=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=cE.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[fE]),o=parseInt(s[pE]||"0"),u=a*60+o;u>14*60||(s[dE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};dl.default=cl});var hh=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var fl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};pl.default=fl});var mh=b(Ki=>{"use strict";var hE=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var mE=hE(ye()),hl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=mE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Ki.default=hl});var gh=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var gE=Xn(),ml=class extends gE.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};gl.default=ml});var _l=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var yE=q(),TE=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),_E=1,bE=2,vE=3,yh=4,EE=5,Th=6,_h=7,bh=8,vh=9,yl=class extends yE.AbstractParserWithWordBoundaryChecking{innerPattern(){return TE}innerExtract(e,t){let n={};if(n.year=parseInt(t[_E]),n.month=parseInt(t[bE]),n.day=parseInt(t[vE]),t[yh]!=null)if(n.hour=parseInt(t[yh]),n.minute=parseInt(t[EE]),t[Th]!=null&&(n.second=parseInt(t[Th])),t[_h]!=null&&(n.millisecond=parseInt(t[_h])),t[bh]==null)n.timezoneOffset=0;else{let i=parseInt(t[bh]),s=0;t[vh]!=null&&(s=parseInt(t[vh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Tl.default=yl});var Eh=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var wE=Xn(),bl=class extends wE.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};vl.default=bl});var wr=b(Jn=>{"use strict";var mn=Jn&&Jn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.includeCommonConfiguration=void 0;var kE=mn(ph()),OE=mn(Ia()),wh=mn(hh()),SE=mn(mh()),DE=mn(gh()),RE=mn(_l()),ME=mn(Eh());function xE(r,e=!1){return r.parsers.unshift(new RE.default),r.refiners.unshift(new ME.default),r.refiners.unshift(new kE.default),r.refiners.unshift(new OE.default),r.refiners.unshift(new wh.default),r.refiners.push(new wh.default),r.refiners.push(new SE.default),r.refiners.push(new DE.default(e)),r}Jn.includeCommonConfiguration=xE});var Or=b(be=>{"use strict";var AE=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.noon=be.morning=be.midnight=be.yesterdayEvening=be.evening=be.lastNight=be.tonight=be.theDayAfter=be.tomorrow=be.theDayBefore=be.yesterday=be.today=be.now=void 0;var fr=Ne(),ei=AE(ye()),kr=Wt(),Vi=Be();function CE(r){let e=ei.default(r.instant),t=new fr.ParsingComponents(r,{});return kr.assignSimilarDate(t,e),kr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}be.now=CE;function PE(r){let e=ei.default(r.instant),t=new fr.ParsingComponents(r,{});return kr.assignSimilarDate(t,e),kr.implySimilarTime(t,e),t}be.today=PE;function NE(r){return kh(r,1)}be.yesterday=NE;function kh(r,e){return El(r,-e)}be.theDayBefore=kh;function IE(r){return El(r,1)}be.tomorrow=IE;function El(r,e){let t=ei.default(r.instant),n=new fr.ParsingComponents(r,{});return t=t.add(e,"day"),kr.assignSimilarDate(n,t),kr.implySimilarTime(n,t),n}be.theDayAfter=El;function FE(r,e=22){let t=ei.default(r.instant),n=new fr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Vi.Meridiem.PM),kr.assignSimilarDate(n,t),n}be.tonight=FE;function LE(r,e=0){let t=ei.default(r.instant),n=new fr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),kr.assignSimilarDate(n,t),n.imply("hour",e),n}be.lastNight=LE;function UE(r,e=20){let t=new fr.ParsingComponents(r,{});return t.imply("meridiem",Vi.Meridiem.PM),t.imply("hour",e),t}be.evening=UE;function WE(r,e=20){let t=ei.default(r.instant),n=new fr.ParsingComponents(r,{});return t=t.add(-1,"day"),kr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Vi.Meridiem.PM),n}be.yesterdayEvening=WE;function qE(r){let e=new fr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}be.midnight=qE;function YE(r,e=6){let t=new fr.ParsingComponents(r,{});return t.imply("meridiem",Vi.Meridiem.AM),t.imply("hour",e),t}be.morning=YE;function $E(r){let e=new fr.ParsingComponents(r,{});return e.imply("meridiem",Vi.Meridiem.AM),e.imply("hour",12),e}be.noon=$E});var Oh=b(Xt=>{"use strict";var jE=Xt&&Xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),GE=Xt&&Xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BE=Xt&&Xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&jE(e,r,t);return GE(e,r),e},HE=Xt&&Xt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xt,"__esModule",{value:!0});var zE=HE(ye()),KE=q(),VE=Wt(),Qi=BE(Or()),QE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,wl=class extends KE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return QE}innerExtract(e,t){let n=zE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return Qi.now(e.reference);case"today":return Qi.today(e.reference);case"yesterday":return Qi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Qi.tomorrow(e.reference);case"tonight":return Qi.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),VE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Xt.default=wl});var Sh=b(Xi=>{"use strict";var XE=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var Fa=Be(),ZE=q(),JE=XE(ye()),ew=Wt(),tw=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,kl=class extends ZE.AbstractParserWithWordBoundaryChecking{innerPattern(){return tw}innerExtract(e,t){let n=JE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Fa.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Fa.Meridiem.PM),i.imply("hour",20);break;case"midnight":ew.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Fa.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Fa.Meridiem.AM),i.imply("hour",12);break}return i}};Xi.default=kl});var gn=b(zr=>{"use strict";var rw=zr&&zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zr,"__esModule",{value:!0});zr.toDayJSClosestWeekday=zr.toDayJSWeekday=void 0;var Dh=rw(ye());function nw(r,e,t){if(!t)return Rh(r,e);let n=Dh.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}zr.toDayJSWeekday=nw;function Rh(r,e){let t=Dh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var Mh=it(),iw=Ee(),sw=q(),aw=gn(),ow=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${iw.matchAnyPattern(Mh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),uw=1,lw=2,cw=3,Ol=class extends sw.AbstractParserWithWordBoundaryChecking{innerPattern(){return ow}innerExtract(e,t){let n=t[lw].toLowerCase(),i=Mh.WEEKDAY_DICTIONARY[n],s=t[uw],a=t[cw],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=aw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Sl.default=Ol});var Ph=b(Zi=>{"use strict";var dw=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var Ch=it(),Ah=Ne(),fw=dw(ye()),pw=q(),hw=Ee(),mw=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${hw.matchAnyPattern(Ch.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),gw=1,yw=2,Dl=class extends pw.AbstractParserWithWordBoundaryChecking{innerPattern(){return mw}innerExtract(e,t){let n=t[gw].toLowerCase(),i=t[yw].toLowerCase(),s=Ch.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Ah.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Ah.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=fw.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Zi.default=Dl});var Zt=b(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.ParsingContext=ni.Chrono=void 0;var ti=Ne(),Tw=Rl(),ri=class{constructor(e){e=e||Tw.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new ri({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new La(e,t,n),s=[];return this.parsers.forEach(a=>{let o=ri.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof ti.ParsingResult?c=l:l instanceof ti.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};ni.Chrono=ri;var La=class{constructor(e,t,n){this.text=e,this.reference=new ti.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ti.ParsingComponents?e:new ti.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new ti.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ni.ParsingContext=La});var yn=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var Nh=nt(),_w=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Ua=1,Ih=5,Fh=2,Lh=3,Ml=4,xl=class{constructor(e){this.groupNumberMonth=e?Lh:Fh,this.groupNumberDay=e?Fh:Lh}pattern(){return _w}extract(e,t){if(t[Ua]=="/"||t[Ih]=="/"){t.index+=t[0].length;return}let n=t.index+t[Ua].length,i=t[0].substr(t[Ua].length,t[0].length-t[Ua].length-t[Ih].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Ml]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Ml]){let u=parseInt(t[Ml]),l=Nh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Nh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Al.default=xl});var Wh=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var Uh=it(),bw=Ne(),vw=q(),Ew=qt(),ww=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Uh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Cl=class extends vw.AbstractParserWithWordBoundaryChecking{innerPattern(){return ww}innerExtract(e,t){let n=t[1].toLowerCase(),i=Uh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=Ew.reverseTimeUnits(i);break}return bw.ParsingComponents.createRelativeFromReference(e.reference,i)}};Pl.default=Cl});var Yh=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var kw=Xn(),Nl=Ne(),Ow=it(),Sw=qt();function qh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Dw(r){return r.text.match(/\s+(after|since)$/i)!=null}var Il=class extends kw.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!qh(t)&&!Dw(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=Ow.parseTimeUnits(t.text);qh(t)&&(i=Sw.reverseTimeUnits(i));let s=Nl.ParsingComponents.createRelativeFromReference(new Nl.ReferenceWithTimezone(n.start.date()),i);return new Nl.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Fl.default=Il});var Rl=b(qe=>{"use strict";var ze=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});qe.createConfiguration=qe.createCasualConfiguration=qe.parseDate=qe.parse=qe.GB=qe.strict=qe.casual=void 0;var Rw=ze(qp()),Mw=ze(Hp()),xw=ze(Xp()),Aw=ze(eh()),Cw=ze(nh()),Pw=ze(ih()),Nw=ze(ah()),Iw=ze(oh()),Fw=ze(uh()),Lw=ze(lh()),Uw=ze(fh()),Ww=wr(),qw=ze(Oh()),Yw=ze(Sh()),$w=ze(xh()),jw=ze(Ph()),Ll=Zt(),Gw=ze(yn()),Bw=ze(Wh()),Hw=ze(Yh());qe.casual=new Ll.Chrono($h(!1));qe.strict=new Ll.Chrono(Wa(!0,!1));qe.GB=new Ll.Chrono(Wa(!1,!0));function zw(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=zw;function Kw(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=Kw;function $h(r=!1){let e=Wa(!1,r);return e.parsers.unshift(new qw.default),e.parsers.unshift(new Yw.default),e.parsers.unshift(new Aw.default),e.parsers.unshift(new jw.default),e.parsers.unshift(new Bw.default),e}qe.createCasualConfiguration=$h;function Wa(r=!0,e=!1){return Ww.includeCommonConfiguration({parsers:[new Gw.default(e),new Rw.default,new Mw.default,new xw.default,new $w.default,new Cw.default,new Pw.default,new Nw.default(r),new Iw.default(r),new Fw.default(r)],refiners:[new Hw.default,new Uw.default,new Lw.default]},r)}qe.createConfiguration=Wa});var jh=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var Vw=hn(),Ul=class extends Vw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Wl.default=Ul});var Ji=b(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.parseTimeUnits=Se.TIME_UNITS_PATTERN=Se.parseYear=Se.YEAR_PATTERN=Se.parseNumberPattern=Se.NUMBER_PATTERN=Se.TIME_UNIT_DICTIONARY=Se.INTEGER_WORD_DICTIONARY=Se.MONTH_DICTIONARY=Se.WEEKDAY_DICTIONARY=void 0;var ql=Ee(),Qw=nt();Se.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Se.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Se.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Se.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Se.NUMBER_PATTERN=`(?:${ql.matchAnyPattern(Se.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Bh(r){let e=r.toLowerCase();return Se.INTEGER_WORD_DICTIONARY[e]!==void 0?Se.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Se.parseNumberPattern=Bh;Se.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function Xw(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return Qw.findMostLikelyADYear(e)}Se.parseYear=Xw;var Hh=`(${Se.NUMBER_PATTERN})\\s{0,5}(${ql.matchAnyPattern(Se.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Gh=new RegExp(Hh,"i");Se.TIME_UNITS_PATTERN=ql.repeatedTimeunitPattern("",Hh);function Zw(r){let e={},t=r,n=Gh.exec(t);for(;n;)Jw(e,n),t=t.substring(n[0].length),n=Gh.exec(t);return e}Se.parseTimeUnits=Zw;function Jw(r,e){let t=Bh(e[1]),n=Se.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Kh=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var zh=Ji(),ek=Ee(),tk=q(),rk=gn(),nk=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${ek.matchAnyPattern(zh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),ik=1,sk=3,ak=2,Yl=class extends tk.AbstractParserWithWordBoundaryChecking{innerPattern(){return nk}innerExtract(e,t){let n=t[ak].toLowerCase(),i=zh.WEEKDAY_DICTIONARY[n],s=t[ik],a=t[sk],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=rk.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};$l.default=Yl});var Zh=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Kr=Be(),ok=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),uk=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),lk=2,Vh=3,Qh=4,Xh=5,ii=class{pattern(e){return ok}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ii.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=uk.exec(i);return s&&(n.end=ii.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[lk]),t[Vh]!=null&&(i=parseInt(t[Vh])),i>=60||n>24)return null;if(n>=12&&(s=Kr.Meridiem.PM),t[Xh]!=null){if(n>12)return null;let a=t[Xh].toLowerCase();a.match(/morgen|vormittag/)&&(s=Kr.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Kr.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Kr.Meridiem.AM,n=0):n<6?s=Kr.Meridiem.AM:(s=Kr.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Kr.Meridiem.AM):e.imply("meridiem",Kr.Meridiem.PM),t[Qh]!=null){let a=parseInt(t[Qh]);if(a>=60)return null;e.assign("second",a)}return e}};jl.default=ii});var Jh=b(es=>{"use strict";var ck=es&&es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(es,"__esModule",{value:!0});var dk=ck(dr()),Gl=class extends dk.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};es.default=Gl});var em=b(ts=>{"use strict";var fk=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var pk=fk(Er()),Bl=class extends pk.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};ts.default=Bl});var Hl=b(ns=>{"use strict";var hk=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var mk=hk(ye()),Tn=Be(),gk=q(),yk=Wt(),Tk=qt(),rs=class extends gk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=mk.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return yk.implySimilarTime(s,n),rs.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=Tk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Tn.Meridiem.AM);break}return e}};ns.default=rs});var nm=b(Jt=>{"use strict";var _k=Jt&&Jt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),bk=Jt&&Jt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vk=Jt&&Jt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&_k(e,r,t);return bk(e,r),e},rm=Jt&&Jt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jt,"__esModule",{value:!0});var Ek=rm(ye()),wk=q(),_n=Wt(),kk=rm(Hl()),tm=vk(Or()),Ok=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),Sk=1,Dk=2,zl=class extends wk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Ok}innerExtract(e,t){let n=Ek.default(e.refDate),i=(t[Sk]||"").toLowerCase(),s=(t[Dk]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=tm.now(e.reference);break;case"heute":a=tm.today(e.reference);break;case"morgen":_n.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),_n.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),_n.assignSimilarDate(a,n),_n.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),_n.assignSimilarDate(a,n),_n.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),_n.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=kk.default.extractTimeComponents(a,s)),a}};Jt.default=zl});var lm=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var Rk=nt(),om=Ji(),um=Ji(),Mk=Ee(),xk=q(),Ak=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${Mk.matchAnyPattern(om.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${um.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),im=1,sm=2,Ck=3,am=4,Kl=class extends xk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ak}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=om.MONTH_DICTIONARY[t[Ck].toLowerCase()],s=parseInt(t[im]);if(s>31)return t.index=t.index+t[im].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[am]){let a=um.parseYear(t[am]);n.start.assign("year",a)}else{let a=Rk.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[sm]){let a=parseInt(t[sm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Vl.default=Kl});var cm=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var qa=Ji(),Pk=Ne(),Nk=q(),Ik=qt(),Fk=Ee(),Ql=class extends Nk.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${qa.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${Fk.matchAnyPattern(qa.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?qa.parseNumberPattern(t[2]):1,i=qa.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=Ik.reverseTimeUnits(s)),Pk.ParsingComponents.createRelativeFromReference(e.reference,s)}};Xl.default=Ql});var pm=b(Ke=>{"use strict";var er=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createConfiguration=Ke.createCasualConfiguration=Ke.parseDate=Ke.parse=Ke.strict=Ke.casual=void 0;var Lk=wr(),dm=Zt(),Uk=er(yn()),Wk=er(_l()),qk=er(jh()),Yk=er(Kh()),$k=er(Zh()),jk=er(Jh()),Gk=er(em()),Bk=er(nm()),Hk=er(Hl()),zk=er(lm()),Kk=er(cm());Ke.casual=new dm.Chrono(fm());Ke.strict=new dm.Chrono(Zl(!0));function Vk(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=Vk;function Qk(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=Qk;function fm(r=!0){let e=Zl(!1,r);return e.parsers.unshift(new Hk.default),e.parsers.unshift(new Bk.default),e.parsers.unshift(new Kk.default),e}Ke.createCasualConfiguration=fm;function Zl(r=!0,e=!0){return Lk.includeCommonConfiguration({parsers:[new Wk.default,new Uk.default(e),new qk.default,new $k.default,new zk.default,new Yk.default],refiners:[new jk.default,new Gk.default]},r)}Ke.createConfiguration=Zl});var mm=b(tr=>{"use strict";var Xk=tr&&tr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Zk=tr&&tr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jk=tr&&tr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Xk(e,r,t);return Zk(e,r),e},e1=tr&&tr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tr,"__esModule",{value:!0});var t1=e1(ye()),r1=Be(),n1=q(),hm=Wt(),Ya=Jk(Or()),Jl=class extends n1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=t1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Ya.now(e.reference);case"aujourd'hui":return Ya.today(e.reference);case"hier":return Ya.yesterday(e.reference);case"demain":return Ya.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(hm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",r1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),hm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};tr.default=Jl});var gm=b(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var is=Be(),i1=q(),ec=class extends i1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",is.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",is.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",is.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",is.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",is.Meridiem.AM);break}return i}};tc.default=ec});var ym=b(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var s1=hn(),rc=class extends s1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};nc.default=rc});var Tm=b(ss=>{"use strict";var a1=ss&&ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ss,"__esModule",{value:!0});var o1=a1(Er()),ic=class extends o1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ss.default=ic});var _m=b(as=>{"use strict";var u1=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var l1=u1(dr()),sc=class extends l1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};as.default=sc});var Vr=b(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var ac=Ee();Te.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Te.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Te.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Te.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Te.NUMBER_PATTERN=`(?:${ac.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function vm(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Te.parseNumberPattern=vm;Te.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function c1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Te.parseOrdinalNumberPattern=c1;Te.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function d1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Te.parseYear=d1;var Em=`(${Te.NUMBER_PATTERN})\\s{0,5}(${ac.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,bm=new RegExp(Em,"i");Te.TIME_UNITS_PATTERN=ac.repeatedTimeunitPattern("",Em);function f1(r){let e={},t=r,n=bm.exec(t);for(;n;)p1(e,n),t=t.substring(n[0].length),n=bm.exec(t);return e}Te.parseTimeUnits=f1;function p1(r,e){let t=vm(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var km=b(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var wm=Vr(),h1=Ee(),m1=q(),g1=gn(),y1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${h1.matchAnyPattern(wm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),T1=1,_1=2,oc=class extends m1.AbstractParserWithWordBoundaryChecking{innerPattern(){return y1}innerExtract(e,t){let n=t[T1].toLowerCase(),i=wm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[_1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=g1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};uc.default=oc});var Rm=b(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var os=Be(),b1=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),v1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),E1=2,Om=3,Sm=4,Dm=5,si=class{pattern(e){return b1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=si.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=v1.exec(i);return s&&(n.end=si.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[E1]),t[Om]!=null&&(i=parseInt(t[Om])),i>=60||n>24)return null;if(n>=12&&(s=os.Meridiem.PM),t[Dm]!=null){if(n>12)return null;let a=t[Dm][0].toLowerCase();a=="a"&&(s=os.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=os.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",os.Meridiem.AM):e.imply("meridiem",os.Meridiem.PM),t[Sm]!=null){let a=parseInt(t[Sm]);if(a>=60)return null;e.assign("second",a)}return e}};lc.default=si});var Nm=b(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var w1=nt(),Cm=Vr(),Pm=Vr(),$a=Vr(),k1=Ee(),O1=q(),S1=new RegExp(`(?:on\\s*?)?(${$a.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${$a.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${k1.matchAnyPattern(Cm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Pm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Mm=1,xm=2,D1=3,Am=4,cc=class extends O1.AbstractParserWithWordBoundaryChecking{innerPattern(){return S1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Cm.MONTH_DICTIONARY[t[D1].toLowerCase()],s=$a.parseOrdinalNumberPattern(t[Mm]);if(s>31)return t.index=t.index+t[Mm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Am]){let a=Pm.parseYear(t[Am]);n.start.assign("year",a)}else{let a=w1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[xm]){let a=$a.parseOrdinalNumberPattern(t[xm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};dc.default=cc});var Fm=b(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var Im=Vr(),R1=Ne(),M1=q(),x1=qt(),fc=class extends M1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Im.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Im.parseTimeUnits(t[1]),i=x1.reverseTimeUnits(n);return R1.ParsingComponents.createRelativeFromReference(e.reference,i)}};pc.default=fc});var Um=b(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var Lm=Vr(),A1=Ne(),C1=q(),hc=class extends C1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Lm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Lm.parseTimeUnits(t[1]);return A1.ParsingComponents.createRelativeFromReference(e.reference,n)}};mc.default=hc});var Wm=b(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var ja=Vr(),P1=Ne(),N1=q(),I1=qt(),F1=Ee(),gc=class extends N1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ja.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${F1.matchAnyPattern(ja.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?ja.parseNumberPattern(t[1]):1,i=ja.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=I1.reverseTimeUnits(s)),P1.ParsingComponents.createRelativeFromReference(e.reference,s)}};yc.default=gc});var $m=b(Ve=>{"use strict";var Yt=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var L1=wr(),qm=Zt(),U1=Yt(mm()),W1=Yt(gm()),q1=Yt(yn()),Y1=Yt(ym()),$1=Yt(Tm()),j1=Yt(_m()),G1=Yt(km()),B1=Yt(Rm()),H1=Yt(Nm()),z1=Yt(Fm()),K1=Yt(Um()),V1=Yt(Wm());Ve.casual=new qm.Chrono(Ym());Ve.strict=new qm.Chrono(Tc(!0));function Q1(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=Q1;function X1(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=X1;function Ym(r=!0){let e=Tc(!1,r);return e.parsers.unshift(new U1.default),e.parsers.unshift(new W1.default),e.parsers.unshift(new V1.default),e}Ve.createCasualConfiguration=Ym;function Tc(r=!0,e=!0){return L1.includeCommonConfiguration({parsers:[new q1.default(e),new H1.default,new Y1.default,new B1.default,new z1.default,new K1.default,new G1.default],refiners:[new $1.default,new j1.default]},r)}Ve.createConfiguration=Tc});var jm=b(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.toHankaku=void 0;function Z1(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,J1)}Ga.toHankaku=Z1;function J1(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Bm=b(us=>{"use strict";var eO=us&&us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(us,"__esModule",{value:!0});var _c=jm(),tO=nt(),rO=eO(ye()),nO=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Gm=1,iO=2,bc=3,sO=4,aO=5,oO=6,vc=class{pattern(){return nO}extract(e,t){let n=parseInt(_c.toHankaku(t[aO])),i=parseInt(_c.toHankaku(t[oO])),s=e.createParsingComponents({day:i,month:n});if(t[Gm]&&t[Gm].match("\u540C|\u4ECA|\u672C")){let a=rO.default(e.refDate);s.assign("year",a.year())}if(t[iO]){let a=t[sO],o=a=="\u5143"?1:parseInt(_c.toHankaku(a));t[bc]=="\u4EE4\u548C"?o+=2018:t[bc]=="\u5E73\u6210"?o+=1988:t[bc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=tO.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};us.default=vc});var Hm=b(ls=>{"use strict";var uO=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var lO=uO(dr()),Ec=class extends lO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};ls.default=Ec});var Km=b(rr=>{"use strict";var cO=rr&&rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),dO=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fO=rr&&rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&cO(e,r,t);return dO(e,r),e},pO=rr&&rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rr,"__esModule",{value:!0});var hO=pO(ye()),zm=Be(),wc=fO(Or()),mO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,kc=class{pattern(){return mO}extract(e,t){let n=t[0],i=hO.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return wc.yesterday(e.reference);case"\u660E\u65E5":return wc.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return wc.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",zm.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",zm.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};rr.default=kc});var Xm=b(Qe=>{"use strict";var Oc=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var gO=Oc(Bm()),yO=Oc(Hm()),TO=Oc(Km()),Vm=Zt();Qe.casual=new Vm.Chrono(Qm());Qe.strict=new Vm.Chrono(Sc());function _O(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=_O;function bO(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=bO;function Qm(){let r=Sc();return r.parsers.unshift(new TO.default),r}Qe.createCasualConfiguration=Qm;function Sc(){return{parsers:[new gO.default],refiners:[new yO.default]}}Qe.createConfiguration=Sc});var Ba=b(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.parseYear=pr.YEAR_PATTERN=pr.MONTH_DICTIONARY=pr.WEEKDAY_DICTIONARY=void 0;pr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};pr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};pr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function vO(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}pr.parseYear=vO});var Jm=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Zm=Ba(),EO=Ee(),wO=q(),kO=gn(),OO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${EO.matchAnyPattern(Zm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),SO=1,DO=2,RO=3,Dc=class extends wO.AbstractParserWithWordBoundaryChecking{innerPattern(){return OO}innerExtract(e,t){let n=t[DO].toLowerCase(),i=Zm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[SO],a=t[RO],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=kO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Rc.default=Dc});var eg=b(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var MO=hn(),Mc=class extends MO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};xc.default=Mc});var tg=b(cs=>{"use strict";var xO=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var AO=xO(Er()),Ac=class extends AO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};cs.default=Ac});var rg=b(ds=>{"use strict";var CO=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var PO=CO(dr()),Cc=class extends PO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ds.default=Cc});var ug=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var NO=nt(),ag=Ba(),og=Ba(),IO=Ee(),FO=q(),LO=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${IO.matchAnyPattern(ag.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${og.YEAR_PATTERN}))?(?=\\W|$)`,"i"),ng=1,ig=2,UO=3,sg=4,Pc=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return LO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ag.MONTH_DICTIONARY[t[UO].toLowerCase()],s=parseInt(t[ng]);if(s>31)return t.index=t.index+t[ng].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[sg]){let a=og.parseYear(t[sg]);n.start.assign("year",a)}else{let a=NO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ig]){let a=parseInt(t[ig]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Nc.default=Pc});var lg=b(Sr=>{"use strict";var WO=Sr&&Sr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),qO=Sr&&Sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YO=Sr&&Sr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&WO(e,r,t);return qO(e,r),e};Object.defineProperty(Sr,"__esModule",{value:!0});var $O=q(),Ha=YO(Or()),Ic=class extends $O.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return Ha.now(e.reference);case"hoje":return Ha.today(e.reference);case"amanha":case"amanh\xE3":return Ha.tomorrow(e.reference);case"ontem":return Ha.yesterday(e.reference)}return i}};Sr.default=Ic});var cg=b(fs=>{"use strict";var jO=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var za=Be(),GO=q(),BO=Wt(),HO=jO(ye()),Fc=class extends GO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=HO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",za.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",za.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",za.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":BO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",za.Meridiem.AM),i.imply("hour",12);break}return i}};fs.default=Fc});var pg=b(Xe=>{"use strict";var Qr=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var zO=wr(),dg=Zt(),KO=Qr(yn()),VO=Qr(Jm()),QO=Qr(eg()),XO=Qr(tg()),ZO=Qr(rg()),JO=Qr(ug()),eS=Qr(lg()),tS=Qr(cg());Xe.casual=new dg.Chrono(fg());Xe.strict=new dg.Chrono(Lc(!0));function rS(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=rS;function nS(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=nS;function fg(r=!0){let e=Lc(!1,r);return e.parsers.push(new eS.default),e.parsers.push(new tS.default),e}Xe.createCasualConfiguration=fg;function Lc(r=!0,e=!0){return zO.includeCommonConfiguration({parsers:[new KO.default(e),new VO.default,new QO.default,new JO.default],refiners:[new XO.default,new ZO.default]},r)}Xe.createConfiguration=Lc});var hg=b(ps=>{"use strict";var iS=ps&&ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ps,"__esModule",{value:!0});var sS=iS(dr()),Uc=class extends sS.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};ps.default=Uc});var mg=b(hs=>{"use strict";var aS=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var oS=aS(Er()),Wc=class extends oS.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};hs.default=Wc});var gg=b(Dr=>{"use strict";var uS=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lS=Dr&&Dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cS=Dr&&Dr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&uS(e,r,t);return lS(e,r),e};Object.defineProperty(Dr,"__esModule",{value:!0});var dS=q(),Ka=cS(Or()),qc=class extends dS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return Ka.now(e.reference);case"vandaag":return Ka.today(e.reference);case"morgen":case"morgend":return Ka.tomorrow(e.reference);case"gisteren":return Ka.yesterday(e.reference)}return i}};Dr.default=qc});var yg=b(ms=>{"use strict";var fS=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var Va=Be(),pS=q(),hS=fS(ye()),mS=Wt(),gS=1,yS=2,Yc=class extends pS.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=hS.default(e.refDate),i=e.createParsingComponents();switch(t[gS]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[yS].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Va.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Va.Meridiem.PM),i.imply("hour",20);break;case"middernacht":mS.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Va.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Va.Meridiem.AM),i.imply("hour",12);break}return i}};ms.default=Yc});var Rt=b(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.parseTimeUnits=ue.TIME_UNITS_PATTERN=ue.parseYear=ue.YEAR_PATTERN=ue.parseOrdinalNumberPattern=ue.ORDINAL_NUMBER_PATTERN=ue.parseNumberPattern=ue.NUMBER_PATTERN=ue.TIME_UNIT_DICTIONARY=ue.ORDINAL_WORD_DICTIONARY=ue.INTEGER_WORD_DICTIONARY=ue.MONTH_DICTIONARY=ue.WEEKDAY_DICTIONARY=void 0;var Qa=Ee(),TS=nt();ue.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};ue.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};ue.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};ue.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};ue.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};ue.NUMBER_PATTERN=`(?:${Qa.matchAnyPattern(ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function _g(r){let e=r.toLowerCase();return ue.INTEGER_WORD_DICTIONARY[e]!==void 0?ue.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ue.parseNumberPattern=_g;ue.ORDINAL_NUMBER_PATTERN=`(?:${Qa.matchAnyPattern(ue.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function _S(r){let e=r.toLowerCase();return ue.ORDINAL_WORD_DICTIONARY[e]!==void 0?ue.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ue.parseOrdinalNumberPattern=_S;ue.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function bS(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return TS.findMostLikelyADYear(e)}ue.parseYear=bS;var bg=`(${ue.NUMBER_PATTERN})\\s{0,5}(${Qa.matchAnyPattern(ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Tg=new RegExp(bg,"i");ue.TIME_UNITS_PATTERN=Qa.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",bg);function vS(r){let e={},t=r,n=Tg.exec(t);for(;n;)ES(e,n),t=t.substring(n[0].length),n=Tg.exec(t);return e}ue.parseTimeUnits=vS;function ES(r,e){let t=_g(e[1]),n=ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Eg=b(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var vg=Rt(),wS=Ne(),kS=q(),$c=class extends kS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+vg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=vg.parseTimeUnits(t[1]);return wS.ParsingComponents.createRelativeFromReference(e.reference,n)}};jc.default=$c});var kg=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var wg=Rt(),OS=Ee(),SS=q(),DS=gn(),RS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${OS.matchAnyPattern(wg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),MS=1,xS=2,AS=3,Gc=class extends SS.AbstractParserWithWordBoundaryChecking{innerPattern(){return RS}innerExtract(e,t){let n=t[xS].toLowerCase(),i=wg.WEEKDAY_DICTIONARY[n],s=t[MS],a=t[AS],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=DS.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Bc.default=Gc});var xg=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var CS=nt(),Rg=Rt(),Xa=Rt(),Mg=Rt(),PS=Ee(),NS=q(),IS=new RegExp(`(?:on\\s*?)?(${Xa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Xa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+PS.matchAnyPattern(Rg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Mg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),FS=3,Og=1,Sg=2,Dg=4,Hc=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return IS}innerExtract(e,t){let n=Rg.MONTH_DICTIONARY[t[FS].toLowerCase()],i=Xa.parseOrdinalNumberPattern(t[Og]);if(i>31)return t.index=t.index+t[Og].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Dg]){let u=Mg.parseYear(t[Dg]);s.assign("year",u)}else{let u=CS.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Sg])return s;let a=Xa.parseOrdinalNumberPattern(t[Sg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};zc.default=Hc});var Ng=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var Cg=Rt(),LS=nt(),US=Ee(),Pg=Rt(),WS=q(),qS=new RegExp(`(${US.matchAnyPattern(Cg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Pg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),YS=1,Ag=2,Kc=class extends WS.AbstractParserWithWordBoundaryChecking{innerPattern(){return qS}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[YS],s=Cg.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Ag]){let a=Pg.parseYear(t[Ag]);n.assign("year",a)}else{let a=LS.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Vc.default=Kc});var Ig=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var $S=q(),jS=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),GS=1,BS=2,Qc=class extends $S.AbstractParserWithWordBoundaryChecking{innerPattern(){return jS}innerExtract(e,t){let n=parseInt(t[BS]),i=parseInt(t[GS]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Xc.default=Qc});var Fg=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var HS=hn(),Zc=class extends HS.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Jc.default=Zc});var Wg=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var Ug=Rt(),zS=Ee(),KS=q(),VS=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${zS.matchAnyPattern(Ug.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),QS=1,XS=2,Lg=3,ZS=4,ed=class extends KS.AbstractParserWithWordBoundaryChecking{innerPattern(){return VS}innerExtract(e,t){let n=t[Lg]?parseInt(t[Lg]):Ug.MONTH_DICTIONARY[t[XS].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[QS]);return{day:parseInt(t[ZS]),month:n,year:i}}};td.default=ed});var qg=b(gs=>{"use strict";var JS=gs&&gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gs,"__esModule",{value:!0});var e0=q(),Za=Be(),rd=Wt(),t0=JS(ye()),r0=1,n0=2,nd=class extends e0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[r0].toLowerCase(),i=t[n0].toLowerCase(),s=e.createParsingComponents(),a=t0.default(e.refDate);switch(n){case"gisteren":rd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":rd.assignSimilarDate(s,a);break;case"morgen":rd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",Za.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",Za.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",Za.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",Za.Meridiem.PM),s.imply("hour",20);break}return s}};gs.default=nd});var $g=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var Yg=Rt(),i0=Ne(),s0=q(),a0=qt(),o0=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Yg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),id=class extends s0.AbstractParserWithWordBoundaryChecking{innerPattern(){return o0}innerExtract(e,t){let n=t[1].toLowerCase(),i=Yg.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=a0.reverseTimeUnits(i);break}return i0.ParsingComponents.createRelativeFromReference(e.reference,i)}};sd.default=id});var Bg=b(ys=>{"use strict";var u0=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var Gg=Rt(),jg=Ne(),l0=u0(ye()),c0=q(),d0=Ee(),f0=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${d0.matchAnyPattern(Gg.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),p0=1,h0=2,ad=class extends c0.AbstractParserWithWordBoundaryChecking{innerPattern(){return f0}innerExtract(e,t){let n=t[p0].toLowerCase(),i=t[h0].toLowerCase(),s=Gg.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,jg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,jg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=l0.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ys.default=ad});var Hg=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var ud=Rt(),m0=Ne(),g0=q(),y0=qt(),T0=new RegExp("("+ud.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),_0=new RegExp("("+ud.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),od=class extends g0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?_0:T0}innerExtract(e,t){let n=ud.parseTimeUnits(t[1]),i=y0.reverseTimeUnits(n);return m0.ParsingComponents.createRelativeFromReference(e.reference,i)}};ld.default=od});var zg=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var dd=Rt(),b0=Ne(),v0=q(),E0=new RegExp("("+dd.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),w0=new RegExp("("+dd.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),k0=1,cd=class extends v0.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?w0:E0}innerExtract(e,t){let n=dd.parseTimeUnits(t[k0]);return b0.ParsingComponents.createRelativeFromReference(e.reference,n)}};fd.default=cd});var Xg=b(Ze=>{"use strict";var st=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var O0=wr(),Kg=Zt(),S0=st(hg()),D0=st(mg()),R0=st(gg()),M0=st(yg()),x0=st(yn()),A0=st(Eg()),C0=st(kg()),P0=st(xg()),Vg=st(Ng()),N0=st(Ig()),I0=st(Fg()),F0=st(Wg()),L0=st(qg()),U0=st($g()),W0=st(Bg()),q0=st(Hg()),Y0=st(zg());Ze.casual=new Kg.Chrono(Qg());Ze.strict=new Kg.Chrono(pd(!0));function $0(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=$0;function j0(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=j0;function Qg(r=!0){let e=pd(!1,r);return e.parsers.unshift(new R0.default),e.parsers.unshift(new M0.default),e.parsers.unshift(new L0.default),e.parsers.unshift(new Vg.default),e.parsers.unshift(new W0.default),e.parsers.unshift(new U0.default),e}Ze.createCasualConfiguration=Qg;function pd(r=!0,e=!0){return O0.includeCommonConfiguration({parsers:[new x0.default(e),new A0.default,new P0.default,new Vg.default,new C0.default,new F0.default,new N0.default,new I0.default(r),new q0.default(r),new Y0.default(r)],refiners:[new D0.default,new S0.default]},r)}Ze.createConfiguration=pd});var ty=b(Ts=>{"use strict";var G0=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var B0=G0(ye()),H0=q(),z0=1,Zg=2,K0=3,Jg=4,ey=5,V0=6,hd=class extends H0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=B0.default(e.refDate),a=s;if(t[z0])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Zg]){let o=t[Zg],u=t[K0];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Jg]){let u=t[Jg][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[ey]){let o=t[ey];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[V0];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ts.default=hd});var ai=b(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.zhStringToYear=Et.zhStringToNumber=Et.WEEKDAY_OFFSET=Et.NUMBER=void 0;Et.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Et.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function Q0(r){let e=0;for(let t=0;t{"use strict";var Z0=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var J0=Z0(ye()),eD=q(),bn=ai(),md=1,ry=2,gd=3,yd=class extends eD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(bn.NUMBER).join("")+"]{4}|["+Object.keys(bn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(bn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(bn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=J0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[ry]);if(isNaN(s)&&(s=bn.zhStringToNumber(t[ry])),i.start.assign("month",s),t[gd]){let a=parseInt(t[gd]);isNaN(a)&&(a=bn.zhStringToNumber(t[gd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[md]){let a=parseInt(t[md]);isNaN(a)&&(a=bn.zhStringToYear(t[md])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};_s.default=yd});var sy=b(bs=>{"use strict";var tD=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var rD=tD(ye()),nD=q(),iy=ai(),iD=new RegExp("(\\d+|["+Object.keys(iy.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),Td=1,sD=2,_d=class extends nD.AbstractParserWithWordBoundaryChecking{innerPattern(){return iD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Td]);if(isNaN(i)&&(i=iy.zhStringToNumber(t[Td])),isNaN(i)){let u=t[Td];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=rD.default(e.refDate),o=t[sD][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};bs.default=_d});var oy=b(vs=>{"use strict";var aD=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var oD=aD(ye()),uD=q(),ay=ai(),lD=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(ay.WEEKDAY_OFFSET).join("|")+")"),bd=class extends uD.AbstractParserWithWordBoundaryChecking{innerPattern(){return lD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=ay.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=oD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var cD=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var dD=cD(ye()),fD=q(),jt=ai(),pD=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),hD=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(jt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Ja=1,eo=2,to=3,ro=4,no=5,io=6,$t=7,oi=8,so=9,vd=class extends fD.AbstractParserWithWordBoundaryChecking{innerPattern(){return pD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=dD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Ja]){var a=t[Ja];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[ro]){var o=t[ro];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[oi]){var f=parseInt(t[oi]);if(isNaN(f)&&(f=jt.zhStringToNumber(t[oi])),f>=60)return null;i.start.assign("second",f)}if(u=parseInt(t[io]),isNaN(u)&&(u=jt.zhStringToNumber(t[io])),t[$t]?t[$t]=="\u534A"?l=30:t[$t]=="\u6B63"||t[$t]=="\u6574"?l=0:(l=parseInt(t[$t]),isNaN(l)&&(l=jt.zhStringToNumber(t[$t]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[so]){if(u>12)return null;var h=t[so][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[eo]){var T=t[eo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[to]){var E=t[to],D=E[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[no]){var A=t[no],P=A[0];P=="\u4E0A"||P=="\u671D"||P=="\u65E9"||P=="\u51CC"?(c=0,u==12&&(u=0)):(P=="\u4E0B"||P=="\u664F"||P=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=hD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let F=s.clone();if(i.end=e.createParsingComponents(),t[Ja]){var a=t[Ja];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else if(t[ro]){var o=t[ro];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else i.end.imply("day",F.date()),i.end.imply("month",F.month()+1),i.end.imply("year",F.year());if(u=0,l=0,c=-1,t[oi]){var f=parseInt(t[oi]);if(isNaN(f)&&(f=jt.zhStringToNumber(t[oi])),f>=60)return null;i.end.assign("second",f)}if(u=parseInt(t[io]),isNaN(u)&&(u=jt.zhStringToNumber(t[io])),t[$t]?t[$t]=="\u534A"?l=30:t[$t]=="\u6B63"||t[$t]=="\u6574"?l=0:(l=parseInt(t[$t]),isNaN(l)&&(l=jt.zhStringToNumber(t[$t]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[so]){if(u>12)return null;var h=t[so][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[eo]){var T=t[eo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[to]){var E=t[to],D=E[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[no]){var A=t[no],P=A[0];P=="\u4E0A"||P=="\u671D"||P=="\u65E9"||P=="\u51CC"?(c=0,u==12&&(u=0)):(P=="\u4E0B"||P=="\u664F"||P=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var mD=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var gD=mD(ye()),yD=q(),ly=ai(),TD=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(ly.WEEKDAY_OFFSET).join("|")+")"),Ed=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return TD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=ly.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=gD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var _D=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var bD=_D(dr()),wd=class extends bD.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ks.default=wd});var fy=b(Os=>{"use strict";var vD=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var ED=vD(Er()),kd=class extends ED.default{patternBetween(){return/^\s*$/i}};Os.default=kd});var py=b(Ye=>{"use strict";var Rr=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var Od=Zt(),wD=Rr(Ia()),kD=wr(),OD=Rr(ty()),SD=Rr(ny()),DD=Rr(sy()),RD=Rr(oy()),MD=Rr(uy()),xD=Rr(cy()),AD=Rr(dy()),CD=Rr(fy());Ye.hant=new Od.Chrono(Sd());Ye.casual=new Od.Chrono(Sd());Ye.strict=new Od.Chrono(Dd());function PD(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=PD;function ND(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=ND;function Sd(){let r=Dd();return r.parsers.unshift(new OD.default),r}Ye.createCasualConfiguration=Sd;function Dd(){let r=kD.includeCommonConfiguration({parsers:[new SD.default,new RD.default,new xD.default,new MD.default,new DD.default],refiners:[new AD.default,new CD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof wD.default)),r}Ye.createConfiguration=Dd});var yy=b(Ss=>{"use strict";var ID=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var FD=ID(ye()),LD=q(),UD=1,hy=2,WD=3,my=4,gy=5,qD=6,Rd=class extends LD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=FD.default(e.refDate),a=s;if(t[UD])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[hy]){let o=t[hy],u=t[WD];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[my]){let u=t[my][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[gy]){let o=t[gy];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[qD];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ss.default=Rd});var ui=b(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.zhStringToYear=wt.zhStringToNumber=wt.WEEKDAY_OFFSET=wt.NUMBER=void 0;wt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};wt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function YD(r){let e=0;for(let t=0;t{"use strict";var jD=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var GD=jD(ye()),BD=q(),vn=ui(),Md=1,Ty=2,xd=3,Ad=class extends BD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(vn.NUMBER).join("")+"]{4}|["+Object.keys(vn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(vn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(vn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=GD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ty]);if(isNaN(s)&&(s=vn.zhStringToNumber(t[Ty])),i.start.assign("month",s),t[xd]){let a=parseInt(t[xd]);isNaN(a)&&(a=vn.zhStringToNumber(t[xd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Md]){let a=parseInt(t[Md]);isNaN(a)&&(a=vn.zhStringToYear(t[Md])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Ds.default=Ad});var vy=b(Rs=>{"use strict";var HD=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var zD=HD(ye()),KD=q(),by=ui(),VD=new RegExp("(\\d+|["+Object.keys(by.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Cd=1,QD=2,Pd=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(){return VD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Cd]);if(isNaN(i)&&(i=by.zhStringToNumber(t[Cd])),isNaN(i)){let u=t[Cd];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=zD.default(e.refDate),o=t[QD][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Rs.default=Pd});var wy=b(Ms=>{"use strict";var XD=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var ZD=XD(ye()),JD=q(),Ey=ui(),eR=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Ey.WEEKDAY_OFFSET).join("|")+")"),Nd=class extends JD.AbstractParserWithWordBoundaryChecking{innerPattern(){return eR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ey.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=ZD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var tR=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var rR=tR(ye()),nR=q(),Bt=ui(),iR=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),sR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ao=1,oo=2,uo=3,lo=4,co=5,fo=6,Gt=7,li=8,po=9,Id=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return iR}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=rR.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[ao]){let c=t[ao];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[lo]){let c=t[lo];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[li]){let c=parseInt(t[li]);if(isNaN(c)&&(c=Bt.zhStringToNumber(t[li])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[fo]),isNaN(a)&&(a=Bt.zhStringToNumber(t[fo])),t[Gt]?t[Gt]=="\u534A"?o=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?o=0:(o=parseInt(t[Gt]),isNaN(o)&&(o=Bt.zhStringToNumber(t[Gt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[po]){if(a>12)return null;let c=t[po][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[oo]){let f=t[oo][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[uo]){let f=t[uo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[co]){let f=t[co][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=sR.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[ao]){let c=t[ao];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[lo]){let c=t[lo];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[li]){let c=parseInt(t[li]);if(isNaN(c)&&(c=Bt.zhStringToNumber(t[li])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[fo]),isNaN(a)&&(a=Bt.zhStringToNumber(t[fo])),t[Gt]?t[Gt]=="\u534A"?o=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?o=0:(o=parseInt(t[Gt]),isNaN(o)&&(o=Bt.zhStringToNumber(t[Gt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[po]){if(a>12)return null;let c=t[po][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[oo]){let f=t[oo][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[uo]){let f=t[uo][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[co]){let f=t[co][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var aR=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var oR=aR(ye()),uR=q(),Oy=ui(),lR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Oy.WEEKDAY_OFFSET).join("|")+")"),Fd=class extends uR.AbstractParserWithWordBoundaryChecking{innerPattern(){return lR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Oy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=oR.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var cR=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var dR=cR(dr()),Ld=class extends dR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Cs.default=Ld});var Ry=b(Ps=>{"use strict";var fR=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var pR=fR(Er()),Ud=class extends pR.default{patternBetween(){return/^\s*$/i}};Ps.default=Ud});var My=b($e=>{"use strict";var Mr=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Wd=Zt(),hR=Mr(Ia()),mR=wr(),gR=Mr(yy()),yR=Mr(_y()),TR=Mr(vy()),_R=Mr(wy()),bR=Mr(ky()),vR=Mr(Sy()),ER=Mr(Dy()),wR=Mr(Ry());$e.hans=new Wd.Chrono(qd());$e.casual=new Wd.Chrono(qd());$e.strict=new Wd.Chrono(Yd());function kR(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=kR;function OR(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=OR;function qd(){let r=Yd();return r.parsers.unshift(new gR.default),r}$e.createCasualConfiguration=qd;function Yd(){let r=mR.includeCommonConfiguration({parsers:[new yR.default,new _R.default,new vR.default,new bR.default,new TR.default],refiners:[new ER.default,new wR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof hR.default)),r}$e.createConfiguration=Yd});var Ay=b(Mt=>{"use strict";var xy=Mt&&Mt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),SR=Mt&&Mt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),DR=Mt&&Mt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&xy(e,r,t)},RR=Mt&&Mt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xy(e,r,t);return SR(e,r),e};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.hans=void 0;DR(py(),Mt);Mt.hans=RR(My())});var kt=b(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.parseTimeUnits=te.TIME_UNITS_PATTERN=te.parseYear=te.YEAR_PATTERN=te.parseOrdinalNumberPattern=te.ORDINAL_NUMBER_PATTERN=te.parseNumberPattern=te.NUMBER_PATTERN=te.TIME_UNIT_DICTIONARY=te.ORDINAL_WORD_DICTIONARY=te.INTEGER_WORD_DICTIONARY=te.MONTH_DICTIONARY=te.FULL_MONTH_NAME_DICTIONARY=te.WEEKDAY_DICTIONARY=te.REGEX_PARTS=void 0;var ho=Ee(),MR=nt();te.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};te.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};te.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};te.MONTH_DICTIONARY=Object.assign(Object.assign({},te.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});te.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};te.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};te.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};te.NUMBER_PATTERN=`(?:${ho.matchAnyPattern(te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function Py(r){let e=r.toLowerCase();return te.INTEGER_WORD_DICTIONARY[e]!==void 0?te.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}te.parseNumberPattern=Py;te.ORDINAL_NUMBER_PATTERN=`(?:${ho.matchAnyPattern(te.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function xR(r){let e=r.toLowerCase();return te.ORDINAL_WORD_DICTIONARY[e]!==void 0?te.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}te.parseOrdinalNumberPattern=xR;var $d="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";te.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${$d}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${$d}|[5-9][0-9]${$d})`;function AR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return MR.findMostLikelyADYear(e)}te.parseYear=AR;var Ny=`(${te.NUMBER_PATTERN})\\s{0,3}(${ho.matchAnyPattern(te.TIME_UNIT_DICTIONARY)})`,Cy=new RegExp(Ny,"i");te.TIME_UNITS_PATTERN=ho.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Ny);function CR(r){let e={},t=r,n=Cy.exec(t);for(;n;)PR(e,n),t=t.substring(n[0].length).trim(),n=Cy.exec(t);return e}te.parseTimeUnits=CR;function PR(r,e){let t=Py(e[1]),n=te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Fy=b(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var Ns=kt(),NR=Ne(),IR=q(),Iy=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ns.TIME_UNITS_PATTERN})${Ns.REGEX_PARTS.rightBoundary}`,FR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Iy}`,Ns.REGEX_PARTS.flags),LR=new RegExp(Iy,"i"),jd=class extends IR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ns.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?LR:FR}innerExtract(e,t){let n=Ns.parseTimeUnits(t[1]);return NR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gd.default=jd});var Yy=b(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var UR=nt(),Is=kt(),qy=kt(),mo=kt(),WR=Ee(),qR=q(),YR=new RegExp(`(?:\u0441)?\\s*(${mo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${mo.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${WR.matchAnyPattern(Is.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${qy.YEAR_PATTERN}(?![^\\s]\\d)))?${Is.REGEX_PARTS.rightBoundary}`,Is.REGEX_PARTS.flags),Ly=1,Uy=2,$R=3,Wy=4,Bd=class extends qR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Is.REGEX_PARTS.leftBoundary}innerPattern(){return YR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Is.MONTH_DICTIONARY[t[$R].toLowerCase()],s=mo.parseOrdinalNumberPattern(t[Ly]);if(s>31)return t.index=t.index+t[Ly].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Wy]){let a=qy.parseYear(t[Wy]);n.start.assign("year",a)}else{let a=UR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Uy]){let a=mo.parseOrdinalNumberPattern(t[Uy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hd.default=Bd});var Gy=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var Fs=kt(),jR=nt(),GR=Ee(),jy=kt(),BR=q(),HR=new RegExp(`((?:\u0432)\\s*)?(${GR.matchAnyPattern(Fs.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${jy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Fs.REGEX_PARTS.flags),zR=2,$y=3,zd=class extends BR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fs.REGEX_PARTS.leftBoundary}innerPattern(){return HR}innerExtract(e,t){let n=t[zR].toLowerCase();if(t[0].length<=3&&!Fs.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Fs.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[$y]){let a=jy.parseYear(t[$y]);i.start.assign("year",a)}else{let a=jR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Kd.default=zd});var Hy=b(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var go=Be(),KR=hn(),By=kt(),Vd=class extends KR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return By.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${By.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",go.Meridiem.PM)):i<6&&n.assign("meridiem",go.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",go.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",go.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qd.default=Vd});var zy=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var yo=kt(),VR=Ne(),QR=q(),XR=qt(),ZR=new RegExp(`(${yo.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,yo.REGEX_PARTS.flags),Xd=class extends QR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return yo.REGEX_PARTS.leftBoundary}innerPattern(){return ZR}innerExtract(e,t){let n=yo.parseTimeUnits(t[1]),i=XR.reverseTimeUnits(n);return VR.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zd.default=Xd});var Ky=b(Ls=>{"use strict";var JR=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var eM=JR(dr()),Jd=class extends eM.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Ls.default=Jd});var Vy=b(Us=>{"use strict";var tM=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var rM=tM(Er()),ef=class extends rM.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Us.default=ef});var Qy=b(xr=>{"use strict";var nM=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),iM=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),sM=xr&&xr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&nM(e,r,t);return iM(e,r),e};Object.defineProperty(xr,"__esModule",{value:!0});var aM=q(),Ws=sM(Or()),tf=kt(),oM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${tf.REGEX_PARTS.rightBoundary}`,tf.REGEX_PARTS.flags),rf=class extends aM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return tf.REGEX_PARTS.leftBoundary}innerPattern(e){return oM}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ws.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ws.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ws.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ws.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ws.theDayBefore(e.reference,2)}return i}};xr.default=rf});var Xy=b(nr=>{"use strict";var uM=nr&&nr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lM=nr&&nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cM=nr&&nr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&uM(e,r,t);return lM(e,r),e},dM=nr&&nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nr,"__esModule",{value:!0});var fM=q(),En=cM(Or()),pM=Wt(),hM=dM(ye()),nf=kt(),mM=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${nf.REGEX_PARTS.rightBoundary}`,nf.REGEX_PARTS.flags),sf=class extends fM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return nf.REGEX_PARTS.leftBoundary}innerPattern(){return mM}innerExtract(e,t){let n=hM.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return En.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return En.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return En.morning(e.reference);if(i.match(/в\s*полдень/))return En.noon(e.reference);if(i.match(/прошлой\s*ночью/))return En.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return En.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),pM.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?En.midnight(e.reference):s}};nr.default=sf});var Zy=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var qs=kt(),gM=Ee(),yM=q(),TM=gn(),_M=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${gM.matchAnyPattern(qs.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${qs.REGEX_PARTS.rightBoundary}`,qs.REGEX_PARTS.flags),bM=1,vM=2,EM=3,af=class extends yM.AbstractParserWithWordBoundaryChecking{innerPattern(){return _M}patternLeftBoundary(){return qs.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[vM].toLowerCase(),i=qs.WEEKDAY_DICTIONARY[n],s=t[bM],a=t[EM],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=TM.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};of.default=af});var eT=b($s=>{"use strict";var wM=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var Ys=kt(),Jy=Ne(),kM=wM(ye()),OM=q(),SM=Ee(),DM=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${SM.matchAnyPattern(Ys.TIME_UNIT_DICTIONARY)})(?=\\s*)${Ys.REGEX_PARTS.rightBoundary}`,Ys.REGEX_PARTS.flags),RM=1,MM=2,uf=class extends OM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ys.REGEX_PARTS.leftBoundary}innerPattern(){return DM}innerExtract(e,t){let n=t[RM].toLowerCase(),i=t[MM].toLowerCase(),s=Ys.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,Jy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,Jy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=kM.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};$s.default=uf});var tT=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var js=kt(),xM=Ne(),AM=q(),CM=qt(),PM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${js.TIME_UNITS_PATTERN})${js.REGEX_PARTS.rightBoundary}`,js.REGEX_PARTS.flags),lf=class extends AM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return js.REGEX_PARTS.leftBoundary}innerPattern(){return PM}innerExtract(e,t){let n=t[1].toLowerCase(),i=js.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=CM.reverseTimeUnits(i);break}return xM.ParsingComponents.createRelativeFromReference(e.reference,i)}};cf.default=lf});var iT=b(Je=>{"use strict";var xt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var NM=xt(Fy()),IM=xt(Yy()),FM=xt(Gy()),LM=xt(Hy()),UM=xt(zy()),WM=xt(Ky()),qM=xt(Vy()),YM=wr(),$M=xt(Qy()),jM=xt(Xy()),GM=xt(Zy()),BM=xt(eT()),rT=Zt(),HM=xt(yn()),zM=xt(tT());Je.casual=new rT.Chrono(nT());Je.strict=new rT.Chrono(df(!0));function KM(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=KM;function VM(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=VM;function nT(){let r=df(!1);return r.parsers.unshift(new $M.default),r.parsers.unshift(new jM.default),r.parsers.unshift(new FM.default),r.parsers.unshift(new BM.default),r.parsers.unshift(new zM.default),r}Je.createCasualConfiguration=nT;function df(r=!0){return YM.includeCommonConfiguration({parsers:[new HM.default(!0),new NM.default,new IM.default,new GM.default,new LM.default(r),new UM.default],refiners:[new qM.default,new WM.default]},r)}Je.createConfiguration=df});var Be=b(se=>{"use strict";var QM=se&&se.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),XM=se&&se.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Xr=se&&se.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&QM(e,r,t);return XM(e,r),e};Object.defineProperty(se,"__esModule",{value:!0});se.parseDate=se.parse=se.casual=se.strict=se.ru=se.zh=se.nl=se.pt=se.ja=se.fr=se.de=se.Meridiem=se.Chrono=se.en=void 0;var ff=Xr(Rl());se.en=ff;var ZM=Zt();Object.defineProperty(se,"Chrono",{enumerable:!0,get:function(){return ZM.Chrono}});var JM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(JM=se.Meridiem||(se.Meridiem={}));var ex=Xr(pm());se.de=ex;var tx=Xr($m());se.fr=tx;var rx=Xr(Xm());se.ja=rx;var nx=Xr(pg());se.pt=nx;var ix=Xr(Xg());se.nl=ix;var sx=Xr(Ay());se.zh=sx;var ax=Xr(iT());se.ru=ax;se.strict=ff.strict;se.casual=ff.casual;function ox(r,e,t){return se.casual.parse(r,e,t)}se.parse=ox;function ux(r,e,t){return se.casual.parseDate(r,e,t)}se.parseDate=ux});var RT=b((JN,wo)=>{var oT,uT,lT,cT,dT,fT,pT,hT,mT,vo,hf,gT,yT,TT,di,_T,bT,vT,ET,wT,kT,OT,ST,DT,Eo;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof wo=="object"&&typeof wo.exports=="object"?r(t(e,t(wo.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};oT=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},uT=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},dT=function(n,i){return function(s,a){i(s,a,n)}},fT=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},pT=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(T){try{h(a.next(T))}catch(y){l(y)}}function f(T){try{h(a.throw(T))}catch(y){l(y)}}function h(T){T.done?u(T.value):o(T.value).then(c,f)}h((a=a.apply(n,i||[])).next())})},hT=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(h){return function(T){return f([h,T])}}function f(h){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=h[0]&2?o.return:h[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,h[1])).done)return u;switch(o=0,u&&(h=[h[0]&2,u.value]),h[0]){case 0:case 1:u=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,o=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(h[0]===6||h[0]===2)){s=0;continue}if(h[0]===3&&(!u||h[1]>u[0]&&h[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},hf=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},gT=function(){for(var n=[],i=0;i1||c(E,D)})})}function c(E,D){try{f(a[E](D))}catch(A){y(u[0][3],A)}}function f(E){E.value instanceof di?Promise.resolve(E.value.v).then(h,T):y(u[0][2],E)}function h(E){c("next",E)}function T(E){c("throw",E)}function y(E,D){E(D),u.shift(),u.length&&c(u[0][0],u[0][1])}},bT=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:di(n[o](l)),done:o==="return"}:u?u(l):l}:u}},vT=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof vo=="function"?vo(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,f){l=n[u](l),o(c,f,l.done,l.value)})}}function o(u,l,c,f){Promise.resolve(f).then(function(h){u({value:h,done:c})},l)}},ET=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};wT=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&Eo(i,n,s);return t(i,n),i},kT=function(n){return n&&n.__esModule?n:{default:n}},OT=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},ST=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},DT=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",oT),r("__assign",uT),r("__rest",lT),r("__decorate",cT),r("__param",dT),r("__metadata",fT),r("__awaiter",pT),r("__generator",hT),r("__exportStar",mT),r("__createBinding",Eo),r("__values",vo),r("__read",hf),r("__spread",gT),r("__spreadArrays",yT),r("__spreadArray",TT),r("__await",di),r("__asyncGenerator",_T),r("__asyncDelegator",bT),r("__asyncValues",vT),r("__makeTemplateObject",ET),r("__importStar",wT),r("__importDefault",kT),r("__classPrivateFieldGet",OT),r("__classPrivateFieldSet",ST),r("__classPrivateFieldIn",DT)})});var m_=b((p_,h_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(d,p){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var T=function(d,p,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,m];default:for(var _=new Array(g);g--;)_[g]=arguments[g];return _}};function y(d,p){for(var m={},g,_=d.length,v=p?p.length:0,k=0;k<_;k++)g=d[k],m[g]=k0;)d=v[O],k.call(R,d,m[d]);this._listeners={},this._listenersCount=0,S()}}});function D(d,p,m,g){var _=Object.assign({},p);if(!d)return _;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,R,O,S;function I(ae){throw Error('Invalid "'+R+'" option value'+(ae?". Reason: "+ae:""))}for(var me=0;me0;)if(R===d[O])return v;k(p)}}var F=P(["function"]),Z=P(["object","function"]);function Q(d,p,m){var g,_,v=0,k,R=new d(function(O,S,I){m=D(m,{timeout:0,overload:!1},{timeout:function(De,U){return De*=1,(typeof De!="number"||De<0||!Number.isFinite(De))&&U("timeout must be a positive number"),De}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){_&&(_=null),v&&(clearTimeout(v),v=0)}var ae=function(De){me(),O(De)},ne=function(De){me(),S(De)};g?p(ae,ne,I):(_=[function(De){ne(De||Error("canceled"))}],p(ae,ne,function(De){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof De!="function")throw TypeError("onCancel callback must be a function");_.push(De)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var De=Error("timeout");De.code="ETIMEDOUT",v=0,R.cancel(De),S(De)},m.timeout))});return g||(R.cancel=function(O){if(!!_){for(var S=_.length,I=1;I0;)ne=We[R],ne!=="_listeners"&&(Le=j(d,p,m[ne],g+1,_),Le&&(ae?ae.push.apply(ae,Le):ae=Le));return ae}else if(rt==="**"){for(Ce=g+1===_||g+2===_&&vr==="*",Ce&&m._listeners&&(ae=j(d,p,m,_,_)),We=l(m),R=We.length;R-- >0;)ne=We[R],ne!=="_listeners"&&(ne==="*"||ne==="**"?(m[ne]._listeners&&!Ce&&(Le=j(d,p,m[ne],_,_),Le&&(ae?ae.push.apply(ae,Le):ae=Le)),Le=j(d,p,m[ne],g,_)):ne===vr?Le=j(d,p,m[ne],g+2,_):Le=j(d,p,m[ne],g,_),Le&&(ae?ae.push.apply(ae,Le):ae=Le));return ae}else m[rt]&&(ae=j(d,p,m[rt],g+1,_));if(De=m["*"],De&&j(d,p,De,g+1,_),U=m["**"],U)if(g<_)for(U._listeners&&j(d,p,U,_,_),We=l(U),R=We.length;R-- >0;)ne=We[R],ne!=="_listeners"&&(ne===vr?j(d,p,U[ne],g+2,_):ne===rt?j(d,p,U[ne],g+1,_):(Ae={},Ae[ne]=U[ne],j(d,p,{"**":Ae},g+1,_)));else U._listeners?j(d,p,U,_,_):U["*"]&&U["*"]._listeners&&j(d,p,U["*"],_,_);return ae}function G(d,p,m){var g=0,_=0,v,k=this.delimiter,R=k.length,O;if(typeof d=="string")if((v=d.indexOf(k))!==-1){O=new Array(5);do O[g++]=d.slice(_,v),_=v+R;while((v=d.indexOf(k,_))!==-1);O[g++]=d.slice(_)}else O=[d],g=1;else O=d,g=d.length;if(g>1){for(v=0;v+10&&S._listeners.length>this._maxListeners&&(S._listeners.warned=!0,h.call(this,S._listeners.length,I))):S._listeners=p,!0;return!0}function Pe(d,p,m,g){for(var _=l(d),v=_.length,k,R,O,S=d._listeners,I;v-- >0;)R=_[v],k=d[R],R==="_listeners"?O=m:O=m?m.concat(R):[R],I=g||typeof R=="symbol",S&&p.push(I?O:O.join(this.delimiter)),typeof k=="object"&&Pe.call(this,k,p,O,I);return p}function Fe(d){for(var p=l(d),m=p.length,g,_,v;m-- >0;)_=p[m],g=d[_],g&&(v=!0,_!=="_listeners"&&!Fe(g)&&delete d[_]);return v}function B(d,p,m){this.emitter=d,this.event=p,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(d,p,m){if(m===!0)_=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,_=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||_){var R=p,O=p._origin||p;if(v&&!i)throw Error("process.nextTick is not supported");_===r&&(_=p.constructor.name==="AsyncFunction"),p=function(){var S=arguments,I=this,me=this.event;return _?v?Promise.resolve():new Promise(function(ae){u(ae)}).then(function(){return I.event=me,R.apply(I,S)}):(v?process.nextTick:u)(function(){I.event=me,R.apply(I,S)})},p._async=!0,p._origin=O}return[p,k?new B(this,d,p):this]}function w(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}w.EventEmitter2=w,w.prototype.listenTo=function(d,p,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=D(m,{on:r,off:r,reducers:r},{on:F,off:F,reducers:Z});function _(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,R=he.call(g,d),O;R===-1?O=new E(g,d,m):O=g._observers[R];for(var S=l(v),I=S.length,me,ae=typeof k=="function",ne=0;ne0;)_=m[g],(!d||_._target===d)&&(_.unsubscribe(p),v=!0);return v},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(d,p,m){return this._once(d,p,!1,m)},w.prototype.prependOnceListener=function(d,p,m){return this._once(d,p,!0,m)},w.prototype._once=function(d,p,m,g){return this._many(d,1,p,m,g)},w.prototype.many=function(d,p,m,g){return this._many(d,p,m,!1,g)},w.prototype.prependMany=function(d,p,m,g){return this._many(d,p,m,!0,g)},w.prototype._many=function(d,p,m,g,_){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--p===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,_)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,m=this.wildcard,g,_,v,k,R;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(_=d.length,s){for(v=0;v<_;v++)if(typeof d[v]=="symbol"){R=!0;break}}R||(d=d.join(this.delimiter))}var O=arguments.length,S;if(this._all&&this._all.length)for(S=this._all.slice(),v=0,_=S.length;v<_;v++)switch(this.event=d,O){case 1:S[v].call(this,d);break;case 2:S[v].call(this,d,arguments[1]);break;case 3:S[v].call(this,d,arguments[1],arguments[2]);break;default:S[v].apply(this,arguments)}if(m)S=[],j.call(this,S,p,this.listenerTree,0,_);else if(S=this._events[d],typeof S=="function"){switch(this.event=d,O){case 1:S.call(this);break;case 2:S.call(this,arguments[1]);break;case 3:S.call(this,arguments[1],arguments[2]);break;default:for(g=new Array(O-1),k=1;k3)for(g=new Array(O-1),k=1;k3)for(_=new Array(S-1),R=1;R0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=p,_)},w.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var _=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=j.call(this,null,_,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v0){for(g=this._all,p=0,m=g.length;p0;)g=p[m[v]],typeof g=="function"?_.push(g):_.push.apply(_,g);return _}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var R=[],O=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,R,O,k,0),R}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},w.prototype.eventNames=function(d){var p=this._events;return this.wildcard?Pe.call(this,this.listenerTree,[],null,d):p?l(p):[]},w.prototype.listenerCount=function(d){return this.listeners(d).length},w.prototype.hasListeners=function(d){if(this.wildcard){var p=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,p,m,this.listenerTree,0),p.length>0}var g=this._events,_=this._all;return!!(_&&_.length||g&&(d===r?l(g).length:g[d]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(d,p){var m=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=D(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:A}),Q(p.Promise,function(_,v,k){function R(){var O=p.filter;if(!(O&&!O.apply(m,arguments)))if(m.off(d,R),p.handleError){var S=arguments[0];S?v(S):_(T.apply(null,arguments).slice(1))}else _(T.apply(null,arguments))}k(function(){m.off(d,R)}),m._on(d,R,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,m){m=D(m,{Promise,timeout:0,overload:!1},{Promise:A});var g=m.Promise;return Q(g,function(_,v,k){var R;if(typeof d.addEventListener=="function"){R=function(){_(T.apply(null,arguments))},k(function(){d.removeEventListener(p,R)}),d.addEventListener(p,R,{once:!0});return}var O=function(){S&&d.removeListener("error",S),_(T.apply(null,arguments))},S;p!=="error"&&(S=function(I){d.removeListener(p,O),v(I)},d.once("error",S)),k(function(){S&&d.removeListener("error",S),d.removeListener(p,O)}),d.once(p,O)},{timeout:m.timeout,overload:m.overload})}var N=w.prototype;if(Object.defineProperties(w,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");N._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return w});else if(typeof p_=="object")h_.exports=w;else{var J=new Function("","return this")();J.EventEmitter2=w}})()});var J_=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var X_=Symbol("MustacheDataPath");function Q_({target:r,propertyName:e}){return[...r[X_]||[],e]}function Z_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Q_({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[X_]=Q_({target:t,propertyName:n}),Z_(i,e)):i}})}Kf.default=Z_});var br=b(ln=>{"use strict";ln.__esModule=!0;var ZA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(ZA=ln.Operators||(ln.Operators={}));var JA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(JA=ln.StructuralCharacters||(ln.StructuralCharacters={}));var eC;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(eC=ln.Tokens||(ln.Tokens={}))});var Jf=b(iu=>{"use strict";iu.__esModule=!0;var Ie=br();iu.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};iu.VALID_TOKENS={identifierOnly:[{name:Ie.Tokens.IDENTIFIER},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ie.Tokens.IDENTIFIER},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.OPEN_PARENTHESIS},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.NOT}],binaryOperator:[{name:Ie.Tokens.OPERATOR,value:Ie.Operators.AND},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.OR},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.XOR}],binaryOperatorOrClose:[{name:Ie.Tokens.OPERATOR,value:Ie.Operators.AND},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.OR},{name:Ie.Tokens.OPERATOR,value:Ie.Operators.XOR},{name:Ie.Tokens.STRUCTURAL_CHARACTER,value:Ie.StructuralCharacters.CLOSE_PARENTHESIS}]}});var ep=b(Ur=>{"use strict";Ur.__esModule=!0;var xi=br();Ur.STRUCTURAL_CHARACTERS={"(":xi.StructuralCharacters.OPEN_PARENTHESIS,")":xi.StructuralCharacters.CLOSE_PARENTHESIS};Ur.OPERATORS={AND:xi.Operators.AND,OR:xi.Operators.OR,XOR:xi.Operators.XOR,NOT:xi.Operators.NOT};Ur.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Ur.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Ur.COMMENT_DELIMITER=String.fromCodePoint(35);Ur.EOL=String.fromCodePoint(10);Ur.ESCAPE_CHARACTER=String.fromCodePoint(92)});var sb=b(Wr=>{"use strict";var tp=Wr&&Wr.__assign||function(){return tp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";rp.__esModule=!0;var Ai=br(),It=ep(),Ci=sb();rp.lex=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var tC=qr&&qr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var Ni=fa&&fa.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";Yr.__esModule=!0;var cb=br();Yr.andUtil=function(r,e){return r&&e};Yr.orUtil=function(r,e){return r||e};Yr.xorUtil=function(r,e){return r!==e};Yr.notUtil=function(r){return!r};Yr.isIdentifier=function(r){var e=r.name,t=r.value;return e===cb.Tokens.IDENTIFIER&&typeof t=="string"};Yr.isOperator=function(r){var e=r.name,t=r.value;return e===cb.Tokens.OPERATOR&&typeof t=="string"};Yr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var db=b(up=>{"use strict";var pa;up.__esModule=!0;var ap=br(),op=sp();up.OPERATOR_MAP=(pa={},pa[ap.Operators.AND]=op.andUtil,pa[ap.Operators.OR]=op.orUtil,pa[ap.Operators.XOR]=op.xorUtil,pa)});var pb=b(Wn=>{"use strict";var lp=Wn&&Wn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";ha.__esModule=!0;var hb=pb();ha.getEvaluator=hb.getEvaluator;ha.evaluate=hb.evaluate;var sC=ip();ha.parse=sC.parse});var dC={};Yb(dC,{default:()=>Tu});module.exports=$b(dC);var Pb=require("obsidian");var gi=require("obsidian");var pC=new Error("timeout while waiting for mutex to become available"),hC=new Error("mutex already locked"),jb=new Error("request for lock canceled"),Gb=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Eu=class{constructor(e,t=jb){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return Gb(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Bb=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Oa=class{constructor(e){this._semaphore=new Eu(1,e)}acquire(){return Bb(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var To=zn(Be());var yt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new yt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new yt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var At=class{static parseDate(e,t=!1){return window.moment(To.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[At.parseRelativeDateRange,At.parseNumberedDateRange,At.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return yt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=To.parse(e,void 0,{forwardDate:t});if(n.length===0)return yt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new yt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=yt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return yt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new yt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return yt.buildInvalid()}};var lx={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function ci(r){for(let[e,t]of Object.entries(lx))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var _o=["MO","TU","WE","TH","FR","SA","SU"],je=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(_o.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=_o[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Me=function(r){return r!=null},Ct=function(r){return typeof r=="number"},pf=function(r){return typeof r=="string"&&_o.includes(r)},at=Array.isArray,Ht=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=le(t,e/t.length)),t.slice(0,e)+String(n))}var aT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},ut=function(r,e){var t=r%e;return t*e<0?t+e:t},bo=function(r,e){return{div:Math.floor(r/e),mod:ut(r,e)}},Pt=function(r){return!Me(r)||r.length===0},Ue=function(r){return!Pt(r)},de=function(r,e){return Ue(r)&&r.indexOf(e)!==-1};var Zr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Ar=cx;var MT=zn(RT(),1),{__extends:fi,__assign:Tt,__rest:eI,__decorate:tI,__param:rI,__metadata:nI,__awaiter:iI,__generator:sI,__exportStar:aI,__createBinding:oI,__values:uI,__read:lI,__spread:cI,__spreadArrays:dI,__spreadArray:x,__await:fI,__asyncGenerator:pI,__asyncDelegator:hI,__asyncValues:mI,__makeTemplateObject:gI,__importStar:yI,__importDefault:TI,__classPrivateFieldGet:_I,__classPrivateFieldSet:bI,__classPrivateFieldIn:vI}=MT.default;var dx=function(r){fi(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Ar),mf=dx;var fx={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},kn=fx;var xT=function(r,e){return r.indexOf(e)!==-1},px=function(r){return r.toString()},hx=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},mx=function(){function r(e,t,n,i){if(t===void 0&&(t=px),n===void 0&&(n=kn),i===void 0&&(i=hx),this.text=[],this.language=n||kn,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,f){return c-f}),a.sort(function(c,f){return f-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Me(this.origOptions.byweekday)){var o=at(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,f){return c.weekday-f.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(xT(["dtstart","wkst","freq"],n))return!0;if(!xT(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[Y.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=Ct(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),at(e)||(e=[e]);var a=function(u,l,c){for(var f="",h=0;he[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Gs(r,e){e===void 0&&(e=kn);var t={},n=new gx(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=Y.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=Y.WEEKLY,t.byweekday=[Y.MO,Y.TU,Y.WE,Y.TH,Y.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=Y.WEEKLY,n.nextSymbol()&&(s(),f());break;case"hour(s)":t.freq=Y.HOURLY,n.nextSymbol()&&(s(),f());break;case"minute(s)":t.freq=Y.MINUTELY,n.nextSymbol()&&(s(),f());break;case"month(s)":t.freq=Y.MONTHLY,n.nextSymbol()&&(s(),f());break;case"year(s)":t.freq=Y.YEARLY,n.nextSymbol()&&(s(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=Y.WEEKLY;var T=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[Y[T]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(Y[y]),n.nextSymbol()}c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=Y.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var E=o();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(E),n.nextSymbol()}s(),f();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),T=n.accept("the");if(!!(h||T))do{var y=l(),E=u(),D=o();if(y)E?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(Y[E].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(E)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(Y[E]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[Y.MO,Y.TU,Y.WE,Y.TH,Y.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var A=n.acceptNumber();if(!A)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(A[0],10)];n.accept("comma");){if(A=n.acceptNumber(),!A)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(A[0],10))}}else if(D)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(D);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(T[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function f(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var oe;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(oe||(oe={}));function Bs(r){return r12){var n=Math.floor(this.month/12),i=ut(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=bo(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Pt(i)||de(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=bo(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Pt(i)||de(i,this.hour))&&(Pt(s)||de(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=bo(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Pt(i)||de(i,this.hour))&&(Pt(s)||de(s,this.minute))&&(Pt(a)||de(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Zr.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Zr.MAXYEAR))return;t=Zr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case oe.YEARLY:return this.addYears(s);case oe.MONTHLY:return this.addMonths(s);case oe.WEEKLY:return this.addWeekly(s,a);case oe.DAILY:return this.addDaily(s);case oe.HOURLY:return this.addHours(s,n,o);case oe.MINUTELY:return this.addMinutes(s,n,o,u);case oe.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(hi);function gf(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||Ue(e.byweekno)||Ue(e.byyearday)||Boolean(e.bymonthday)||Ue(e.bymonthday)||Me(e.byweekday)||Me(e.byeaster)))switch(e.freq){case Y.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case Y.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case Y.WEEKLY:e.byweekday=[K.getWeekday(e.dtstart)];break}if(Me(e.bymonth)&&!at(e.bymonth)&&(e.bymonth=[e.bymonth]),Me(e.byyearday)&&!at(e.byyearday)&&Ct(e.byyearday)&&(e.byyearday=[e.byyearday]),!Me(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(at(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Me(e.byweekno)&&!at(e.byweekno)&&(e.byweekno=[e.byweekno]),!Me(e.byweekday))e.bynweekday=null;else if(Ct(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(pf(e.byweekday))e.byweekday=[je.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof je)!e.byweekday.n||e.freq>Y.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tY.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=Ue(a)?a:null,e.bynweekday=Ue(o)?o:null}return Me(e.byhour)?Ct(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+ut(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),h=ut(l,7),T=Math.floor(f+h/4),y=0;y0&&E<=T){var D=void 0;E>1?(D=c+(E-1)*7,c!==u&&(D-=7-u)):D=c;for(var A=0;A<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==e.wkst);A++);}}if(de(e.byweekno,1)){var D=c+T*7;if(c!==u&&(D-=7-u),D=4?(Z=0,he=Q+ut(F-e.wkst,7)):he=n-c,P=Math.floor(52+ut(he,7)/4)}if(de(e.byweekno,P))for(var D=0;Ds)return Cr(r);if(P>=t){var F=e_(P,e);if(!r.accept(F)||o&&(--o,!o))return Cr(r)}}else for(var A=T;As)return Cr(r);if(P>=t){var F=e_(P,e);if(!r.accept(F)||o&&(--o,!o))return Cr(r)}}}if(e.interval===0||(u.add(e,E),u.year>K.MAXYEAR))return Cr(r);Bs(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Rx(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return Ue(n)&&!de(n,r.mmask[e])||Ue(i)&&!r.wnomask[e]||Ue(s)&&!de(s,r.wdaymask[e])||Ue(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!de(r.eastermask,e)||(Ue(o)||Ue(u))&&!de(o,r.mdaymask[e])&&!de(u,r.nmdaymask[e])||Ue(l)&&(e=r.yearlen&&!de(l,e+1-r.yearlen)&&!de(l,-r.nextyearlen+e-r.yearlen))}function e_(r,e){return new On(r,e.tzid).rezonedDate()}function Cr(r){return r.getValue()}function Mx(r,e,t,n,i){for(var s=!1,a=e;a=Y.HOURLY&&Ue(i)&&!de(i,e.hour)||n>=Y.MINUTELY&&Ue(s)&&!de(s,e.minute)||n>=Y.SECONDLY&&Ue(a)&&!de(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var zt={MO:new je(0),TU:new je(1),WE:new je(2),TH:new je(3),FR:new je(4),SA:new je(5),SU:new je(6)},Hs={freq:oe.YEARLY,dtstart:null,interval:1,wkst:zt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},LT=Object.keys(Hs),Y=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new qT,this.origOptions=gf(e);var n=IT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Gs(e,t)},r.fromText=function(e,t){return AT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return ko(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new mf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Ar("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!K.isValidDate(e)||!K.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new mf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Ar("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!K.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Ar("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!K.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Ar("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Vs(this.origOptions)},r.prototype.toText=function(e,t,n){return CT(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return PT(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=oe.YEARLY,r.MONTHLY=oe.MONTHLY,r.WEEKLY=oe.WEEKLY,r.DAILY=oe.DAILY,r.HOURLY=oe.HOURLY,r.MINUTELY=oe.MINUTELY,r.SECONDLY=oe.SECONDLY,r.MO=zt.MO,r.TU=zt.TU,r.WE=zt.WE,r.TH=zt.TH,r.FR=zt.FR,r.SA=zt.SA,r.SU=zt.SU,r.parseString=Ks,r.optionsToString=Vs,r}();function t_(r,e,t,n,i,s){var a={},o=r.accept;function u(h,T){t.forEach(function(y){y.between(h,T,!0).forEach(function(E){a[Number(E)]=!0})})}i.forEach(function(h){var T=new On(h,s).rezonedDate();a[Number(T)]=!0}),r.accept=function(h){var T=Number(h);return isNaN(T)?o.call(this,h):!a[T]&&(u(new Date(T-1),new Date(T+1)),!a[T])?(a[T]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var T=Number(h);return a[T]?!0:(a[T]=!0,o.call(this,h))});for(var l=0;l1||i.length||s.length||a.length){var c=new _f(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new Y(Tf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new Y(Tf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new Y(Tf(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function Oo(r,e){return e===void 0&&(e={}),Cx(r,Px(e))}function Tf(r,e,t){return Tt(Tt({},r),{dtstart:e,tzid:t})}function Px(r){var e=[],t=Object.keys(r),n=Object.keys(r_);if(t.forEach(function(i){de(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Tt(Tt({},r_),r)}function Nx(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=aT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function Ix(r){var e=Nx(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function Fx(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function Lx(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function n_(r,e){return Lx(e),r.split(",").map(function(t){return K.untilStringToDate(t)})}function i_(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;ne in r?Xi(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pe=(r,e)=>{for(var t in e||(e={}))qp.call(e,t)&&Wp(r,t,e[t]);if(Up)for(var t of Up(e))I_.call(e,t)&&Wp(r,t,e[t]);return r},Tt=(r,e)=>x_(r,C_(e));var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),F_=(r,e)=>{for(var t in e)Xi(r,t,{get:e[t],enumerable:!0})},$p=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P_(e))!qp.call(r,i)&&i!==t&&Xi(r,i,{get:()=>e[i],enumerable:!(n=A_(e,i))||n.enumerable});return r};var Zi=(r,e,t)=>(t=r!=null?M_(N_(r)):{},$p(e||!r||!r.__esModule?Xi(t,"default",{value:r,enumerable:!0}):t,r)),L_=r=>$p(Xi({},"__esModule",{value:!0}),r);var q=(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=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.matchAnyPattern=Xr.extractTerms=Xr.repeatedTimeunitPattern=void 0;function $_(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Xr.repeatedTimeunitPattern=$_;function Yp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Xr.extractTerms=Yp;function Y_(r){return`(?:${Yp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Xr.matchAnyPattern=Y_});var Te=b((Iu,Fu)=>{(function(r,e){typeof Iu=="object"&&typeof Fu!="undefined"?Fu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Iu,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",p="year",h="date",_="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,M={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("_")},P=function(B,A,E){var H=String(B);return!H||H.length>=A?B:""+Array(A+1-H.length).join(E)+B},N={s:P,z:function(B){var A=-B.utcOffset(),E=Math.abs(A),H=Math.floor(E/60),C=E%60;return(A<=0?"+":"-")+P(H,2,"0")+":"+P(C,2,"0")},m:function B(A,E){if(A.date(){"use strict";var j_=Zr&&Zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.findYearClosestToRef=Zr.findMostLikelyADYear=void 0;var G_=j_(Te());function B_(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Zr.findMostLikelyADYear=B_;function H_(r,e,t){let n=G_.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.parseTimeUnits=ne.TIME_UNITS_PATTERN=ne.parseYear=ne.YEAR_PATTERN=ne.parseOrdinalNumberPattern=ne.ORDINAL_NUMBER_PATTERN=ne.parseNumberPattern=ne.NUMBER_PATTERN=ne.TIME_UNIT_DICTIONARY=ne.ORDINAL_WORD_DICTIONARY=ne.INTEGER_WORD_DICTIONARY=ne.MONTH_DICTIONARY=ne.FULL_MONTH_NAME_DICTIONARY=ne.WEEKDAY_DICTIONARY=void 0;var Ia=Ee(),z_=rt();ne.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};ne.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};ne.MONTH_DICTIONARY=Object.assign(Object.assign({},ne.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});ne.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};ne.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};ne.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ne.NUMBER_PATTERN=`(?:${Ia.matchAnyPattern(ne.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Gp(r){let e=r.toLowerCase();return ne.INTEGER_WORD_DICTIONARY[e]!==void 0?ne.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ne.parseNumberPattern=Gp;ne.ORDINAL_NUMBER_PATTERN=`(?:${Ia.matchAnyPattern(ne.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function K_(r){let e=r.toLowerCase();return ne.ORDINAL_WORD_DICTIONARY[e]!==void 0?ne.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ne.parseOrdinalNumberPattern=K_;ne.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function V_(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return z_.findMostLikelyADYear(e)}ne.parseYear=V_;var Bp=`(${ne.NUMBER_PATTERN})\\s{0,3}(${Ia.matchAnyPattern(ne.TIME_UNIT_DICTIONARY)})`,jp=new RegExp(Bp,"i");ne.TIME_UNITS_PATTERN=Ia.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Bp);function Q_(r){let e={},t=r,n=jp.exec(t);for(;n;)X_(e,n),t=t.substring(n[0].length).trim(),n=jp.exec(t);return e}ne.parseTimeUnits=Q_;function X_(r,e){let t=Gp(e[1]),n=ne.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Hp=b((Lu,Uu)=>{(function(r,e){typeof Lu=="object"&&typeof Uu!="undefined"?Uu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Lu,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var p=this.quarter()-1;return c?this.month(3*p).startOf(r).startOf("day"):this.month(3*p+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var $t=b(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.implySimilarTime=pr.assignSimilarTime=pr.assignSimilarDate=pr.assignTheNextDay=void 0;var zp=je();function Z_(r,e){e=e.add(1,"day"),Kp(r,e),Vp(r,e)}pr.assignTheNextDay=Z_;function Kp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}pr.assignSimilarDate=Kp;function J_(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",zp.Meridiem.AM):r.assign("meridiem",zp.Meridiem.PM)}pr.assignSimilarTime=J_;function Vp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}pr.implySimilarTime=Vp});var Qp=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.toTimezoneOffset=Tn.TIMEZONE_ABBR_MAP=void 0;Tn.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function ev(r){var e;return r==null?null:typeof r=="number"?r:(e=Tn.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Tn.toTimezoneOffset=ev});var Pe=b(hr=>{"use strict";var Xp=hr&&hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hr,"__esModule",{value:!0});hr.ParsingResult=hr.ParsingComponents=hr.ReferenceWithTimezone=void 0;var tv=Xp(Hp()),Fa=Xp(Te()),Wu=$t(),rv=Qp();Fa.default.extend(tv.default);var qu=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=rv.toTimezoneOffset(e.timezone))}};hr.ReferenceWithTimezone=qu;var bn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Fa.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new bn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Fa.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Fa.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new bn(e);return t.hour||t.minute||t.second?(Wu.assignSimilarTime(i,n),Wu.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Wu.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};hr.ParsingComponents=bn;var Ji=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new bn(e),this.end=s}clone(){let e=new Ji(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};hr.ParsingResult=Ji});var W=b(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.AbstractParserWithWordBoundaryChecking=void 0;var $u=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var ju=nt(),nv=Pe(),iv=W(),sv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ju.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),av=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ju.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Yu=class extends iv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?av:sv}innerExtract(e,t){let n=ju.parseTimeUnits(t[1]);return nv.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gu.default=Yu});var ih=b(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var ov=rt(),rh=nt(),nh=nt(),Ua=nt(),uv=Ee(),lv=W(),cv=new RegExp(`(?:on\\s{0,3})?(${Ua.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ua.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${uv.matchAnyPattern(rh.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${nh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Jp=1,eh=2,dv=3,th=4,Bu=class extends lv.AbstractParserWithWordBoundaryChecking{innerPattern(){return cv}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=rh.MONTH_DICTIONARY[t[dv].toLowerCase()],s=Ua.parseOrdinalNumberPattern(t[Jp]);if(s>31)return t.index=t.index+t[Jp].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[th]){let a=nh.parseYear(t[th]);n.start.assign("year",a)}else{let a=ov.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[eh]){let a=Ua.parseOrdinalNumberPattern(t[eh]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hu.default=Bu});var lh=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var fv=rt(),oh=nt(),Wa=nt(),uh=nt(),pv=Ee(),hv=W(),mv=new RegExp(`(${pv.matchAnyPattern(oh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Wa.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Wa.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${uh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),gv=1,yv=2,sh=3,ah=4,zu=class extends hv.AbstractParserWithWordBoundaryChecking{innerPattern(){return mv}innerExtract(e,t){let n=oh.MONTH_DICTIONARY[t[gv].toLowerCase()],i=Wa.parseOrdinalNumberPattern(t[yv]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[ah]){let u=uh.parseYear(t[ah]);s.assign("year",u)}else{let u=fv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[sh])return s;let a=Wa.parseOrdinalNumberPattern(t[sh]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Ku.default=zu});var fh=b(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Vu=nt(),Tv=rt(),bv=Ee(),dh=nt(),_v=W(),vv=new RegExp(`((?:in)\\s*)?(${bv.matchAnyPattern(Vu.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${dh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Ev=1,wv=2,ch=3,Qu=class extends _v.AbstractParserWithWordBoundaryChecking{innerPattern(){return vv}innerExtract(e,t){let n=t[wv].toLowerCase();if(t[0].length<=3&&!Vu.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Ev]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Vu.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[ch]){let a=dh.parseYear(t[ch]);i.start.assign("year",a)}else{let a=Tv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Xu.default=Qu});var mh=b(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var hh=nt(),kv=Ee(),Ov=W(),Sv=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${kv.matchAnyPattern(hh.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Dv=1,Rv=2,ph=3,Mv=4,Zu=class extends Ov.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sv}innerExtract(e,t){let n=t[ph]?parseInt(t[ph]):hh.MONTH_DICTIONARY[t[Rv].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Dv]);return{day:parseInt(t[Mv]),month:n,year:i}}};Ju.default=Zu});var gh=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var xv=W(),Av=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Cv=1,Pv=2,el=class extends xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Av}innerExtract(e,t){let n=parseInt(t[Pv]),i=parseInt(t[Cv]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};tl.default=el});var _n=b(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.AbstractTimeExpressionParser=void 0;var bt=je();function Nv(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function Iv(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var yh=2,Jn=3,qa=4,$a=5,es=6,rl=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[yh]);if(o>100){if(this.strictMode||t[Jn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Jn]!=null){if(t[Jn].length==1&&!t[es])return null;s=parseInt(t[Jn])}if(s>=60)return null;if(o>12&&(a=bt.Meridiem.PM),t[es]!=null){if(o>12)return null;let u=t[es][0].toLowerCase();u=="a"&&(a=bt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=bt.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",bt.Meridiem.AM):i.imply("meridiem",bt.Meridiem.PM),t[$a]!=null){let u=parseInt(t[$a].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[qa]!=null){let u=parseInt(t[qa]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[$a]!=null){let u=parseInt(t[$a].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[qa]!=null){let u=parseInt(t[qa]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[yh]),a=0,o=-1;if(t[Jn]!=null?a=parseInt(t[Jn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=bt.Meridiem.PM),t[es]!=null){if(s>12)return null;let u=t[es][0].toLowerCase();u=="a"&&(o=bt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=bt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==bt.Meridiem.AM?(n.start.imply("meridiem",bt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",bt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",bt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",bt.Meridiem.PM)):s>12?i.imply("meridiem",bt.Meridiem.PM):s<=12&&i.imply("meridiem",bt.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Nv(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=Iv(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Ya.AbstractTimeExpressionParser=rl});var Th=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var ja=je(),Fv=_n(),nl=class extends Fv.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",ja.Meridiem.PM)):i<6&&n.assign("meridiem",ja.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",ja.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",ja.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};il.default=nl});var Yt=b(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.addImpliedTimeUnits=ei.reverseTimeUnits=void 0;function Lv(r){let e={};for(let t in r)e[t]=-r[t];return e}ei.reverseTimeUnits=Lv;function Uv(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}ei.addImpliedTimeUnits=Uv});var bh=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var al=nt(),Wv=Pe(),qv=W(),$v=Yt(),Yv=new RegExp(`(${al.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),jv=new RegExp(`(${al.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),sl=class extends qv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?jv:Yv}innerExtract(e,t){let n=al.parseTimeUnits(t[1]),i=$v.reverseTimeUnits(n);return Wv.ParsingComponents.createRelativeFromReference(e.reference,i)}};ol.default=sl});var _h=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var ll=nt(),Gv=Pe(),Bv=W(),Hv=new RegExp(`(${ll.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),zv=new RegExp("("+ll.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Kv=1,ul=class extends Bv.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?zv:Hv}innerExtract(e,t){let n=ll.parseTimeUnits(t[Kv]);return Gv.ParsingComponents.createRelativeFromReference(e.reference,n)}};cl.default=ul});var ri=b(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.MergingRefiner=ti.Filter=void 0;var dl=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};ti.Filter=dl;var fl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};ti.MergingRefiner=fl});var mr=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var Vv=ri(),pl=class extends Vv.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var Qv=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var Xv=Qv(mr()),ml=class extends Xv.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ts.default=ml});var Eh=b(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.mergeDateTimeComponent=ni.mergeDateTimeResult=void 0;var Zv=je();function Jv(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=gl(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=gl(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var eE=ri(),wh=Eh(),yl=class extends eE.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?wh.mergeDateTimeResult(t,n):wh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Tl.default=yl});var kh=b(rs=>{"use strict";var tE=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0});var rE=tE(Mr()),bl=class extends rE.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};rs.default=bl});var Oh=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var nE=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),iE={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},_l=class{constructor(e){this.timezone=Object.assign(Object.assign({},iE),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=nE.exec(u);if(!l)return;let c=l[1].toUpperCase(),p=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(p===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${p} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&p!=h&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",p),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",p))}),t}};vl.default=_l});var Ga=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var sE=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),aE=1,oE=2,uE=3,El=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=sE.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[oE]),o=parseInt(s[uE]||"0"),u=a*60+o;u>14*60||(s[aE]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};wl.default=El});var Sh=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var kl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};Ol.default=kl});var Dh=b(ns=>{"use strict";var lE=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0});var cE=lE(Te()),Sl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=cE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};ns.default=Sl});var Rh=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var dE=ri(),Dl=class extends dE.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};Rl.default=Dl});var Al=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var fE=W(),pE=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),hE=1,mE=2,gE=3,Mh=4,yE=5,xh=6,Ah=7,Ch=8,Ph=9,Ml=class extends fE.AbstractParserWithWordBoundaryChecking{innerPattern(){return pE}innerExtract(e,t){let n={};if(n.year=parseInt(t[hE]),n.month=parseInt(t[mE]),n.day=parseInt(t[gE]),t[Mh]!=null)if(n.hour=parseInt(t[Mh]),n.minute=parseInt(t[yE]),t[xh]!=null&&(n.second=parseInt(t[xh])),t[Ah]!=null&&(n.millisecond=parseInt(t[Ah])),t[Ch]==null)n.timezoneOffset=0;else{let i=parseInt(t[Ch]),s=0;t[Ph]!=null&&(s=parseInt(t[Ph]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};xl.default=Ml});var Nh=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var TE=ri(),Cl=class extends TE.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Pl.default=Cl});var xr=b(ii=>{"use strict";var vn=ii&&ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ii,"__esModule",{value:!0});ii.includeCommonConfiguration=void 0;var bE=vn(Oh()),_E=vn(Ga()),Ih=vn(Sh()),vE=vn(Dh()),EE=vn(Rh()),wE=vn(Al()),kE=vn(Nh());function OE(r,e=!1){return r.parsers.unshift(new wE.default),r.refiners.unshift(new kE.default),r.refiners.unshift(new bE.default),r.refiners.unshift(new _E.default),r.refiners.unshift(new Ih.default),r.refiners.push(new Ih.default),r.refiners.push(new vE.default),r.refiners.push(new EE.default(e)),r}ii.includeCommonConfiguration=OE});var Cr=b(_e=>{"use strict";var SE=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.noon=_e.morning=_e.midnight=_e.yesterdayEvening=_e.evening=_e.lastNight=_e.tonight=_e.theDayAfter=_e.tomorrow=_e.theDayBefore=_e.yesterday=_e.today=_e.now=void 0;var gr=Pe(),si=SE(Te()),Ar=$t(),is=je();function DE(r){let e=si.default(r.instant),t=new gr.ParsingComponents(r,{});return Ar.assignSimilarDate(t,e),Ar.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}_e.now=DE;function RE(r){let e=si.default(r.instant),t=new gr.ParsingComponents(r,{});return Ar.assignSimilarDate(t,e),Ar.implySimilarTime(t,e),t}_e.today=RE;function ME(r){return Fh(r,1)}_e.yesterday=ME;function Fh(r,e){return Nl(r,-e)}_e.theDayBefore=Fh;function xE(r){return Nl(r,1)}_e.tomorrow=xE;function Nl(r,e){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t=t.add(e,"day"),Ar.assignSimilarDate(n,t),Ar.implySimilarTime(n,t),n}_e.theDayAfter=Nl;function AE(r,e=22){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",is.Meridiem.PM),Ar.assignSimilarDate(n,t),n}_e.tonight=AE;function CE(r,e=0){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Ar.assignSimilarDate(n,t),n.imply("hour",e),n}_e.lastNight=CE;function PE(r,e=20){let t=new gr.ParsingComponents(r,{});return t.imply("meridiem",is.Meridiem.PM),t.imply("hour",e),t}_e.evening=PE;function NE(r,e=20){let t=si.default(r.instant),n=new gr.ParsingComponents(r,{});return t=t.add(-1,"day"),Ar.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",is.Meridiem.PM),n}_e.yesterdayEvening=NE;function IE(r){let e=new gr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}_e.midnight=IE;function FE(r,e=6){let t=new gr.ParsingComponents(r,{});return t.imply("meridiem",is.Meridiem.AM),t.imply("hour",e),t}_e.morning=FE;function LE(r){let e=new gr.ParsingComponents(r,{});return e.imply("meridiem",is.Meridiem.AM),e.imply("hour",12),e}_e.noon=LE});var Lh=b(er=>{"use strict";var UE=er&&er.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),WE=er&&er.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),qE=er&&er.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&UE(e,r,t);return WE(e,r),e},$E=er&&er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(er,"__esModule",{value:!0});var YE=$E(Te()),jE=W(),GE=$t(),ss=qE(Cr()),BE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Il=class extends jE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return BE}innerExtract(e,t){let n=YE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ss.now(e.reference);case"today":return ss.today(e.reference);case"yesterday":return ss.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ss.tomorrow(e.reference);case"tonight":return ss.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),GE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};er.default=Il});var Uh=b(as=>{"use strict";var HE=as&&as.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(as,"__esModule",{value:!0});var Ba=je(),zE=W(),KE=HE(Te()),VE=$t(),QE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Fl=class extends zE.AbstractParserWithWordBoundaryChecking{innerPattern(){return QE}innerExtract(e,t){let n=KE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Ba.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Ba.Meridiem.PM),i.imply("hour",20);break;case"midnight":VE.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Ba.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Ba.Meridiem.AM),i.imply("hour",12);break}return i}};as.default=Fl});var En=b(Jr=>{"use strict";var XE=Jr&&Jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.toDayJSClosestWeekday=Jr.toDayJSWeekday=void 0;var Wh=XE(Te());function ZE(r,e,t){if(!t)return qh(r,e);let n=Wh.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Jr.toDayJSWeekday=ZE;function qh(r,e){let t=Wh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var $h=nt(),JE=Ee(),ew=W(),tw=En(),rw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${JE.matchAnyPattern($h.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),nw=1,iw=2,sw=3,Ll=class extends ew.AbstractParserWithWordBoundaryChecking{innerPattern(){return rw}innerExtract(e,t){let n=t[iw].toLowerCase(),i=$h.WEEKDAY_DICTIONARY[n],s=t[nw],a=t[sw],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=tw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ul.default=Ll});var Bh=b(os=>{"use strict";var aw=os&&os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(os,"__esModule",{value:!0});var Gh=nt(),jh=Pe(),ow=aw(Te()),uw=W(),lw=Ee(),cw=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${lw.matchAnyPattern(Gh.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),dw=1,fw=2,Wl=class extends uw.AbstractParserWithWordBoundaryChecking{innerPattern(){return cw}innerExtract(e,t){let n=t[dw].toLowerCase(),i=t[fw].toLowerCase(),s=Gh.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,jh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,jh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=ow.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};os.default=Wl});var tr=b(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.ParsingContext=ui.Chrono=void 0;var ai=Pe(),pw=ql(),oi=class{constructor(e){e=e||pw.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new oi({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new Ha(e,t,n),s=[];return this.parsers.forEach(a=>{let o=oi.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof ai.ParsingResult?c=l:l instanceof ai.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};ui.Chrono=oi;var Ha=class{constructor(e,t,n){this.text=e,this.reference=new ai.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ai.ParsingComponents?e:new ai.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new ai.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ui.ParsingContext=Ha});var wn=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Hh=rt(),hw=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),za=1,zh=5,Kh=2,Vh=3,$l=4,Yl=class{constructor(e){this.groupNumberMonth=e?Vh:Kh,this.groupNumberDay=e?Kh:Vh}pattern(){return hw}extract(e,t){if(t[za]=="/"||t[zh]=="/"){t.index+=t[0].length;return}let n=t.index+t[za].length,i=t[0].substr(t[za].length,t[0].length-t[za].length-t[zh].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[$l]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[$l]){let u=parseInt(t[$l]),l=Hh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Hh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};jl.default=Yl});var Xh=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Qh=nt(),mw=Pe(),gw=W(),yw=Yt(),Tw=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Qh.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Gl=class extends gw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tw}innerExtract(e,t){let n=t[1].toLowerCase(),i=Qh.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=yw.reverseTimeUnits(i);break}return mw.ParsingComponents.createRelativeFromReference(e.reference,i)}};Bl.default=Gl});var Jh=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var bw=ri(),Hl=Pe(),_w=nt(),vw=Yt();function Zh(r){return r.text.match(/\s+(before|from)$/i)!=null}function Ew(r){return r.text.match(/\s+(after|since)$/i)!=null}var zl=class extends bw.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Zh(t)&&!Ew(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=_w.parseTimeUnits(t.text);Zh(t)&&(i=vw.reverseTimeUnits(i));let s=Hl.ParsingComponents.createRelativeFromReference(new Hl.ReferenceWithTimezone(n.start.date()),i);return new Hl.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};Kl.default=zl});var ql=b(We=>{"use strict";var Be=We&&We.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(We,"__esModule",{value:!0});We.createConfiguration=We.createCasualConfiguration=We.parseDate=We.parse=We.GB=We.strict=We.casual=void 0;var ww=Be(Zp()),kw=Be(ih()),Ow=Be(lh()),Sw=Be(fh()),Dw=Be(mh()),Rw=Be(gh()),Mw=Be(Th()),xw=Be(bh()),Aw=Be(_h()),Cw=Be(vh()),Pw=Be(kh()),Nw=xr(),Iw=Be(Lh()),Fw=Be(Uh()),Lw=Be(Yh()),Uw=Be(Bh()),Vl=tr(),Ww=Be(wn()),qw=Be(Xh()),$w=Be(Jh());We.casual=new Vl.Chrono(em(!1));We.strict=new Vl.Chrono(Ka(!0,!1));We.GB=new Vl.Chrono(Ka(!1,!0));function Yw(r,e,t){return We.casual.parse(r,e,t)}We.parse=Yw;function jw(r,e,t){return We.casual.parseDate(r,e,t)}We.parseDate=jw;function em(r=!1){let e=Ka(!1,r);return e.parsers.unshift(new Iw.default),e.parsers.unshift(new Fw.default),e.parsers.unshift(new Sw.default),e.parsers.unshift(new Uw.default),e.parsers.unshift(new qw.default),e}We.createCasualConfiguration=em;function Ka(r=!0,e=!1){return Nw.includeCommonConfiguration({parsers:[new Ww.default(e),new ww.default,new kw.default,new Ow.default,new Lw.default,new Dw.default,new Rw.default,new Mw.default(r),new xw.default(r),new Aw.default(r)],refiners:[new $w.default,new Pw.default,new Cw.default]},r)}We.createConfiguration=Ka});var tm=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Gw=_n(),Ql=class extends Gw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Xl.default=Ql});var us=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseTimeUnits=Oe.TIME_UNITS_PATTERN=Oe.parseYear=Oe.YEAR_PATTERN=Oe.parseNumberPattern=Oe.NUMBER_PATTERN=Oe.TIME_UNIT_DICTIONARY=Oe.INTEGER_WORD_DICTIONARY=Oe.MONTH_DICTIONARY=Oe.WEEKDAY_DICTIONARY=void 0;var Zl=Ee(),Bw=rt();Oe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Oe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Oe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Oe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Oe.NUMBER_PATTERN=`(?:${Zl.matchAnyPattern(Oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function nm(r){let e=r.toLowerCase();return Oe.INTEGER_WORD_DICTIONARY[e]!==void 0?Oe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Oe.parseNumberPattern=nm;Oe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function Hw(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return Bw.findMostLikelyADYear(e)}Oe.parseYear=Hw;var im=`(${Oe.NUMBER_PATTERN})\\s{0,5}(${Zl.matchAnyPattern(Oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,rm=new RegExp(im,"i");Oe.TIME_UNITS_PATTERN=Zl.repeatedTimeunitPattern("",im);function zw(r){let e={},t=r,n=rm.exec(t);for(;n;)Kw(e,n),t=t.substring(n[0].length),n=rm.exec(t);return e}Oe.parseTimeUnits=zw;function Kw(r,e){let t=nm(e[1]),n=Oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var am=b(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var sm=us(),Vw=Ee(),Qw=W(),Xw=En(),Zw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${Vw.matchAnyPattern(sm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Jw=1,ek=3,tk=2,Jl=class extends Qw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zw}innerExtract(e,t){let n=t[tk].toLowerCase(),i=sm.WEEKDAY_DICTIONARY[n],s=t[Jw],a=t[ek],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=Xw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};ec.default=Jl});var cm=b(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var en=je(),rk=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),nk=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),ik=2,om=3,um=4,lm=5,li=class{pattern(e){return rk}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=li.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=nk.exec(i);return s&&(n.end=li.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[ik]),t[om]!=null&&(i=parseInt(t[om])),i>=60||n>24)return null;if(n>=12&&(s=en.Meridiem.PM),t[lm]!=null){if(n>12)return null;let a=t[lm].toLowerCase();a.match(/morgen|vormittag/)&&(s=en.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=en.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=en.Meridiem.AM,n=0):n<6?s=en.Meridiem.AM:(s=en.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",en.Meridiem.AM):e.imply("meridiem",en.Meridiem.PM),t[um]!=null){let a=parseInt(t[um]);if(a>=60)return null;e.assign("second",a)}return e}};tc.default=li});var dm=b(ls=>{"use strict";var sk=ls&&ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ls,"__esModule",{value:!0});var ak=sk(mr()),rc=class extends ak.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ls.default=rc});var fm=b(cs=>{"use strict";var ok=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0});var uk=ok(Mr()),nc=class extends uk.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};cs.default=nc});var ic=b(fs=>{"use strict";var lk=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var ck=lk(Te()),kn=je(),dk=W(),fk=$t(),pk=Yt(),ds=class extends dk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=ck.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return fk.implySimilarTime(s,n),ds.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=pk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",kn.Meridiem.AM);break}return e}};fs.default=ds});var mm=b(rr=>{"use strict";var hk=rr&&rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),mk=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gk=rr&&rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&hk(e,r,t);return mk(e,r),e},hm=rr&&rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rr,"__esModule",{value:!0});var yk=hm(Te()),Tk=W(),On=$t(),bk=hm(ic()),pm=gk(Cr()),_k=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),vk=1,Ek=2,sc=class extends Tk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return _k}innerExtract(e,t){let n=yk.default(e.refDate),i=(t[vk]||"").toLowerCase(),s=(t[Ek]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=pm.now(e.reference);break;case"heute":a=pm.today(e.reference);break;case"morgen":On.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),On.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),On.assignSimilarDate(a,n),On.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),On.assignSimilarDate(a,n),On.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),On.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=bk.default.extractTimeComponents(a,s)),a}};rr.default=sc});var vm=b(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var wk=rt(),bm=us(),_m=us(),kk=Ee(),Ok=W(),Sk=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${kk.matchAnyPattern(bm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${_m.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gm=1,ym=2,Dk=3,Tm=4,ac=class extends Ok.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=bm.MONTH_DICTIONARY[t[Dk].toLowerCase()],s=parseInt(t[gm]);if(s>31)return t.index=t.index+t[gm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Tm]){let a=_m.parseYear(t[Tm]);n.start.assign("year",a)}else{let a=wk.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ym]){let a=parseInt(t[ym]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};oc.default=ac});var Em=b(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var Va=us(),Rk=Pe(),Mk=W(),xk=Yt(),Ak=Ee(),uc=class extends Mk.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Va.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${Ak.matchAnyPattern(Va.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Va.parseNumberPattern(t[2]):1,i=Va.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=xk.reverseTimeUnits(s)),Rk.ParsingComponents.createRelativeFromReference(e.reference,s)}};lc.default=uc});var Om=b(He=>{"use strict";var nr=He&&He.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(He,"__esModule",{value:!0});He.createConfiguration=He.createCasualConfiguration=He.parseDate=He.parse=He.strict=He.casual=void 0;var Ck=xr(),wm=tr(),Pk=nr(wn()),Nk=nr(Al()),Ik=nr(tm()),Fk=nr(am()),Lk=nr(cm()),Uk=nr(dm()),Wk=nr(fm()),qk=nr(mm()),$k=nr(ic()),Yk=nr(vm()),jk=nr(Em());He.casual=new wm.Chrono(km());He.strict=new wm.Chrono(cc(!0));function Gk(r,e,t){return He.casual.parse(r,e,t)}He.parse=Gk;function Bk(r,e,t){return He.casual.parseDate(r,e,t)}He.parseDate=Bk;function km(r=!0){let e=cc(!1,r);return e.parsers.unshift(new $k.default),e.parsers.unshift(new qk.default),e.parsers.unshift(new jk.default),e}He.createCasualConfiguration=km;function cc(r=!0,e=!0){return Ck.includeCommonConfiguration({parsers:[new Nk.default,new Pk.default(e),new Ik.default,new Lk.default,new Yk.default,new Fk.default],refiners:[new Uk.default,new Wk.default]},r)}He.createConfiguration=cc});var Dm=b(ir=>{"use strict";var Hk=ir&&ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),zk=ir&&ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Kk=ir&&ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Hk(e,r,t);return zk(e,r),e},Vk=ir&&ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ir,"__esModule",{value:!0});var Qk=Vk(Te()),Xk=je(),Zk=W(),Sm=$t(),Qa=Kk(Cr()),dc=class extends Zk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=Qk.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Qa.now(e.reference);case"aujourd'hui":return Qa.today(e.reference);case"hier":return Qa.yesterday(e.reference);case"demain":return Qa.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Sm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",Xk.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Sm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};ir.default=dc});var Rm=b(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var ps=je(),Jk=W(),fc=class extends Jk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",ps.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",ps.Meridiem.AM);break}return i}};pc.default=fc});var Mm=b(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var e1=_n(),hc=class extends e1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};mc.default=hc});var xm=b(hs=>{"use strict";var t1=hs&&hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hs,"__esModule",{value:!0});var r1=t1(Mr()),gc=class extends r1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};hs.default=gc});var Am=b(ms=>{"use strict";var n1=ms&&ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ms,"__esModule",{value:!0});var i1=n1(mr()),yc=class extends i1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ms.default=yc});var tn=b(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseTimeUnits=be.TIME_UNITS_PATTERN=be.parseYear=be.YEAR_PATTERN=be.parseOrdinalNumberPattern=be.ORDINAL_NUMBER_PATTERN=be.parseNumberPattern=be.NUMBER_PATTERN=be.TIME_UNIT_DICTIONARY=be.INTEGER_WORD_DICTIONARY=be.MONTH_DICTIONARY=be.WEEKDAY_DICTIONARY=void 0;var Tc=Ee();be.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};be.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};be.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};be.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};be.NUMBER_PATTERN=`(?:${Tc.matchAnyPattern(be.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Pm(r){let e=r.toLowerCase();return be.INTEGER_WORD_DICTIONARY[e]!==void 0?be.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}be.parseNumberPattern=Pm;be.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function s1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}be.parseOrdinalNumberPattern=s1;be.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function a1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}be.parseYear=a1;var Nm=`(${be.NUMBER_PATTERN})\\s{0,5}(${Tc.matchAnyPattern(be.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Cm=new RegExp(Nm,"i");be.TIME_UNITS_PATTERN=Tc.repeatedTimeunitPattern("",Nm);function o1(r){let e={},t=r,n=Cm.exec(t);for(;n;)u1(e,n),t=t.substring(n[0].length),n=Cm.exec(t);return e}be.parseTimeUnits=o1;function u1(r,e){let t=Pm(e[1]),n=be.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Fm=b(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Im=tn(),l1=Ee(),c1=W(),d1=En(),f1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${l1.matchAnyPattern(Im.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),p1=1,h1=2,bc=class extends c1.AbstractParserWithWordBoundaryChecking{innerPattern(){return f1}innerExtract(e,t){let n=t[p1].toLowerCase(),i=Im.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[h1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=d1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};_c.default=bc});var qm=b(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var gs=je(),m1=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),g1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),y1=2,Lm=3,Um=4,Wm=5,ci=class{pattern(e){return m1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ci.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=g1.exec(i);return s&&(n.end=ci.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[y1]),t[Lm]!=null&&(i=parseInt(t[Lm])),i>=60||n>24)return null;if(n>=12&&(s=gs.Meridiem.PM),t[Wm]!=null){if(n>12)return null;let a=t[Wm][0].toLowerCase();a=="a"&&(s=gs.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=gs.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",gs.Meridiem.AM):e.imply("meridiem",gs.Meridiem.PM),t[Um]!=null){let a=parseInt(t[Um]);if(a>=60)return null;e.assign("second",a)}return e}};vc.default=ci});var Hm=b(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var T1=rt(),Gm=tn(),Bm=tn(),Xa=tn(),b1=Ee(),_1=W(),v1=new RegExp(`(?:on\\s*?)?(${Xa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Xa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${b1.matchAnyPattern(Gm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Bm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$m=1,Ym=2,E1=3,jm=4,Ec=class extends _1.AbstractParserWithWordBoundaryChecking{innerPattern(){return v1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gm.MONTH_DICTIONARY[t[E1].toLowerCase()],s=Xa.parseOrdinalNumberPattern(t[$m]);if(s>31)return t.index=t.index+t[$m].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[jm]){let a=Bm.parseYear(t[jm]);n.start.assign("year",a)}else{let a=T1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ym]){let a=Xa.parseOrdinalNumberPattern(t[Ym]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};wc.default=Ec});var Km=b(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var zm=tn(),w1=Pe(),k1=W(),O1=Yt(),kc=class extends k1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${zm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=zm.parseTimeUnits(t[1]),i=O1.reverseTimeUnits(n);return w1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Oc.default=kc});var Qm=b(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Vm=tn(),S1=Pe(),D1=W(),Sc=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Vm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Vm.parseTimeUnits(t[1]);return S1.ParsingComponents.createRelativeFromReference(e.reference,n)}};Dc.default=Sc});var Xm=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var Za=tn(),R1=Pe(),M1=W(),x1=Yt(),A1=Ee(),Rc=class extends M1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Za.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${A1.matchAnyPattern(Za.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Za.parseNumberPattern(t[1]):1,i=Za.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=x1.reverseTimeUnits(s)),R1.ParsingComponents.createRelativeFromReference(e.reference,s)}};Mc.default=Rc});var eg=b(ze=>{"use strict";var jt=ze&&ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ze,"__esModule",{value:!0});ze.createConfiguration=ze.createCasualConfiguration=ze.parseDate=ze.parse=ze.strict=ze.casual=void 0;var C1=xr(),Zm=tr(),P1=jt(Dm()),N1=jt(Rm()),I1=jt(wn()),F1=jt(Mm()),L1=jt(xm()),U1=jt(Am()),W1=jt(Fm()),q1=jt(qm()),$1=jt(Hm()),Y1=jt(Km()),j1=jt(Qm()),G1=jt(Xm());ze.casual=new Zm.Chrono(Jm());ze.strict=new Zm.Chrono(xc(!0));function B1(r,e,t){return ze.casual.parse(r,e,t)}ze.parse=B1;function H1(r,e,t){return ze.casual.parseDate(r,e,t)}ze.parseDate=H1;function Jm(r=!0){let e=xc(!1,r);return e.parsers.unshift(new P1.default),e.parsers.unshift(new N1.default),e.parsers.unshift(new G1.default),e}ze.createCasualConfiguration=Jm;function xc(r=!0,e=!0){return C1.includeCommonConfiguration({parsers:[new I1.default(e),new $1.default,new F1.default,new q1.default,new Y1.default,new j1.default,new W1.default],refiners:[new L1.default,new U1.default]},r)}ze.createConfiguration=xc});var tg=b(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.toHankaku=void 0;function z1(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,K1)}Ja.toHankaku=z1;function K1(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var ng=b(ys=>{"use strict";var V1=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var Ac=tg(),Q1=rt(),X1=V1(Te()),Z1=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,rg=1,J1=2,Cc=3,eO=4,tO=5,rO=6,Pc=class{pattern(){return Z1}extract(e,t){let n=parseInt(Ac.toHankaku(t[tO])),i=parseInt(Ac.toHankaku(t[rO])),s=e.createParsingComponents({day:i,month:n});if(t[rg]&&t[rg].match("\u540C|\u4ECA|\u672C")){let a=X1.default(e.refDate);s.assign("year",a.year())}if(t[J1]){let a=t[eO],o=a=="\u5143"?1:parseInt(Ac.toHankaku(a));t[Cc]=="\u4EE4\u548C"?o+=2018:t[Cc]=="\u5E73\u6210"?o+=1988:t[Cc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=Q1.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};ys.default=Pc});var ig=b(Ts=>{"use strict";var nO=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0});var iO=nO(mr()),Nc=class extends iO.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ts.default=Nc});var ag=b(sr=>{"use strict";var sO=sr&&sr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),aO=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oO=sr&&sr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&sO(e,r,t);return aO(e,r),e},uO=sr&&sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sr,"__esModule",{value:!0});var lO=uO(Te()),sg=je(),Ic=oO(Cr()),cO=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Fc=class{pattern(){return cO}extract(e,t){let n=t[0],i=lO.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Ic.yesterday(e.reference);case"\u660E\u65E5":return Ic.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Ic.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",sg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",sg.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};sr.default=Fc});var lg=b(Ke=>{"use strict";var Lc=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createConfiguration=Ke.createCasualConfiguration=Ke.parseDate=Ke.parse=Ke.strict=Ke.casual=void 0;var dO=Lc(ng()),fO=Lc(ig()),pO=Lc(ag()),og=tr();Ke.casual=new og.Chrono(ug());Ke.strict=new og.Chrono(Uc());function hO(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=hO;function mO(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=mO;function ug(){let r=Uc();return r.parsers.unshift(new pO.default),r}Ke.createCasualConfiguration=ug;function Uc(){return{parsers:[new dO.default],refiners:[new fO.default]}}Ke.createConfiguration=Uc});var eo=b(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.parseYear=yr.YEAR_PATTERN=yr.MONTH_DICTIONARY=yr.WEEKDAY_DICTIONARY=void 0;yr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};yr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};yr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function gO(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}yr.parseYear=gO});var dg=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var cg=eo(),yO=Ee(),TO=W(),bO=En(),_O=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${yO.matchAnyPattern(cg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),vO=1,EO=2,wO=3,Wc=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(){return _O}innerExtract(e,t){let n=t[EO].toLowerCase(),i=cg.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[vO],a=t[wO],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=bO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};qc.default=Wc});var fg=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var kO=_n(),$c=class extends kO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Yc.default=$c});var pg=b(bs=>{"use strict";var OO=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var SO=OO(Mr()),jc=class extends SO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};bs.default=jc});var hg=b(_s=>{"use strict";var DO=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var RO=DO(mr()),Gc=class extends RO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};_s.default=Gc});var _g=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var MO=rt(),Tg=eo(),bg=eo(),xO=Ee(),AO=W(),CO=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${xO.matchAnyPattern(Tg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${bg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),mg=1,gg=2,PO=3,yg=4,Bc=class extends AO.AbstractParserWithWordBoundaryChecking{innerPattern(){return CO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Tg.MONTH_DICTIONARY[t[PO].toLowerCase()],s=parseInt(t[mg]);if(s>31)return t.index=t.index+t[mg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[yg]){let a=bg.parseYear(t[yg]);n.start.assign("year",a)}else{let a=MO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[gg]){let a=parseInt(t[gg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Hc.default=Bc});var vg=b(Pr=>{"use strict";var NO=Pr&&Pr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FO=Pr&&Pr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NO(e,r,t);return IO(e,r),e};Object.defineProperty(Pr,"__esModule",{value:!0});var LO=W(),to=FO(Cr()),zc=class extends LO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return to.now(e.reference);case"hoje":return to.today(e.reference);case"amanha":case"amanh\xE3":return to.tomorrow(e.reference);case"ontem":return to.yesterday(e.reference)}return i}};Pr.default=zc});var Eg=b(vs=>{"use strict";var UO=vs&&vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vs,"__esModule",{value:!0});var ro=je(),WO=W(),qO=$t(),$O=UO(Te()),Kc=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=$O.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",ro.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",ro.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",ro.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":qO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",ro.Meridiem.AM),i.imply("hour",12);break}return i}};vs.default=Kc});var Og=b(Ve=>{"use strict";var rn=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var YO=xr(),wg=tr(),jO=rn(wn()),GO=rn(dg()),BO=rn(fg()),HO=rn(pg()),zO=rn(hg()),KO=rn(_g()),VO=rn(vg()),QO=rn(Eg());Ve.casual=new wg.Chrono(kg());Ve.strict=new wg.Chrono(Vc(!0));function XO(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=XO;function ZO(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=ZO;function kg(r=!0){let e=Vc(!1,r);return e.parsers.push(new VO.default),e.parsers.push(new QO.default),e}Ve.createCasualConfiguration=kg;function Vc(r=!0,e=!0){return YO.includeCommonConfiguration({parsers:[new jO.default(e),new GO.default,new BO.default,new KO.default],refiners:[new HO.default,new zO.default]},r)}Ve.createConfiguration=Vc});var Sg=b(Es=>{"use strict";var JO=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0});var e0=JO(mr()),Qc=class extends e0.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Es.default=Qc});var Dg=b(ws=>{"use strict";var t0=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var r0=t0(Mr()),Xc=class extends r0.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ws.default=Xc});var Rg=b(Nr=>{"use strict";var n0=Nr&&Nr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),i0=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),s0=Nr&&Nr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&n0(e,r,t);return i0(e,r),e};Object.defineProperty(Nr,"__esModule",{value:!0});var a0=W(),no=s0(Cr()),Zc=class extends a0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return no.now(e.reference);case"vandaag":return no.today(e.reference);case"morgen":case"morgend":return no.tomorrow(e.reference);case"gisteren":return no.yesterday(e.reference)}return i}};Nr.default=Zc});var Mg=b(ks=>{"use strict";var o0=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var io=je(),u0=W(),l0=o0(Te()),c0=$t(),d0=1,f0=2,Jc=class extends u0.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=l0.default(e.refDate),i=e.createParsingComponents();switch(t[d0]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[f0].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",io.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",io.Meridiem.PM),i.imply("hour",20);break;case"middernacht":c0.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",io.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",io.Meridiem.AM),i.imply("hour",12);break}return i}};ks.default=Jc});var Mt=b(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.parseTimeUnits=oe.TIME_UNITS_PATTERN=oe.parseYear=oe.YEAR_PATTERN=oe.parseOrdinalNumberPattern=oe.ORDINAL_NUMBER_PATTERN=oe.parseNumberPattern=oe.NUMBER_PATTERN=oe.TIME_UNIT_DICTIONARY=oe.ORDINAL_WORD_DICTIONARY=oe.INTEGER_WORD_DICTIONARY=oe.MONTH_DICTIONARY=oe.WEEKDAY_DICTIONARY=void 0;var so=Ee(),p0=rt();oe.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};oe.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};oe.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};oe.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};oe.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};oe.NUMBER_PATTERN=`(?:${so.matchAnyPattern(oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Ag(r){let e=r.toLowerCase();return oe.INTEGER_WORD_DICTIONARY[e]!==void 0?oe.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}oe.parseNumberPattern=Ag;oe.ORDINAL_NUMBER_PATTERN=`(?:${so.matchAnyPattern(oe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function h0(r){let e=r.toLowerCase();return oe.ORDINAL_WORD_DICTIONARY[e]!==void 0?oe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}oe.parseOrdinalNumberPattern=h0;oe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function m0(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return p0.findMostLikelyADYear(e)}oe.parseYear=m0;var Cg=`(${oe.NUMBER_PATTERN})\\s{0,5}(${so.matchAnyPattern(oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,xg=new RegExp(Cg,"i");oe.TIME_UNITS_PATTERN=so.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Cg);function g0(r){let e={},t=r,n=xg.exec(t);for(;n;)y0(e,n),t=t.substring(n[0].length),n=xg.exec(t);return e}oe.parseTimeUnits=g0;function y0(r,e){let t=Ag(e[1]),n=oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ng=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var Pg=Mt(),T0=Pe(),b0=W(),ed=class extends b0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Pg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Pg.parseTimeUnits(t[1]);return T0.ParsingComponents.createRelativeFromReference(e.reference,n)}};td.default=ed});var Fg=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var Ig=Mt(),_0=Ee(),v0=W(),E0=En(),w0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${_0.matchAnyPattern(Ig.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),k0=1,O0=2,S0=3,rd=class extends v0.AbstractParserWithWordBoundaryChecking{innerPattern(){return w0}innerExtract(e,t){let n=t[O0].toLowerCase(),i=Ig.WEEKDAY_DICTIONARY[n],s=t[k0],a=t[S0],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=E0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};nd.default=rd});var Yg=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var D0=rt(),qg=Mt(),ao=Mt(),$g=Mt(),R0=Ee(),M0=W(),x0=new RegExp(`(?:on\\s*?)?(${ao.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ao.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+R0.matchAnyPattern(qg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${$g.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),A0=3,Lg=1,Ug=2,Wg=4,id=class extends M0.AbstractParserWithWordBoundaryChecking{innerPattern(){return x0}innerExtract(e,t){let n=qg.MONTH_DICTIONARY[t[A0].toLowerCase()],i=ao.parseOrdinalNumberPattern(t[Lg]);if(i>31)return t.index=t.index+t[Lg].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Wg]){let u=$g.parseYear(t[Wg]);s.assign("year",u)}else{let u=D0.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Ug])return s;let a=ao.parseOrdinalNumberPattern(t[Ug]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};sd.default=id});var Hg=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Gg=Mt(),C0=rt(),P0=Ee(),Bg=Mt(),N0=W(),I0=new RegExp(`(${P0.matchAnyPattern(Gg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Bg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),F0=1,jg=2,ad=class extends N0.AbstractParserWithWordBoundaryChecking{innerPattern(){return I0}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[F0],s=Gg.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[jg]){let a=Bg.parseYear(t[jg]);n.assign("year",a)}else{let a=C0.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};od.default=ad});var zg=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var L0=W(),U0=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),W0=1,q0=2,ud=class extends L0.AbstractParserWithWordBoundaryChecking{innerPattern(){return U0}innerExtract(e,t){let n=parseInt(t[q0]),i=parseInt(t[W0]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ld.default=ud});var Kg=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var $0=_n(),cd=class extends $0.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};dd.default=cd});var Xg=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var Qg=Mt(),Y0=Ee(),j0=W(),G0=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Y0.matchAnyPattern(Qg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),B0=1,H0=2,Vg=3,z0=4,fd=class extends j0.AbstractParserWithWordBoundaryChecking{innerPattern(){return G0}innerExtract(e,t){let n=t[Vg]?parseInt(t[Vg]):Qg.MONTH_DICTIONARY[t[H0].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[B0]);return{day:parseInt(t[z0]),month:n,year:i}}};pd.default=fd});var Zg=b(Os=>{"use strict";var K0=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0});var V0=W(),oo=je(),hd=$t(),Q0=K0(Te()),X0=1,Z0=2,md=class extends V0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[X0].toLowerCase(),i=t[Z0].toLowerCase(),s=e.createParsingComponents(),a=Q0.default(e.refDate);switch(n){case"gisteren":hd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":hd.assignSimilarDate(s,a);break;case"morgen":hd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",oo.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",oo.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",oo.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",oo.Meridiem.PM),s.imply("hour",20);break}return s}};Os.default=md});var ey=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var Jg=Mt(),J0=Pe(),eS=W(),tS=Yt(),rS=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Jg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),gd=class extends eS.AbstractParserWithWordBoundaryChecking{innerPattern(){return rS}innerExtract(e,t){let n=t[1].toLowerCase(),i=Jg.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=tS.reverseTimeUnits(i);break}return J0.ParsingComponents.createRelativeFromReference(e.reference,i)}};yd.default=gd});var ny=b(Ss=>{"use strict";var nS=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var ry=Mt(),ty=Pe(),iS=nS(Te()),sS=W(),aS=Ee(),oS=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${aS.matchAnyPattern(ry.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),uS=1,lS=2,Td=class extends sS.AbstractParserWithWordBoundaryChecking{innerPattern(){return oS}innerExtract(e,t){let n=t[uS].toLowerCase(),i=t[lS].toLowerCase(),s=ry.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,ty.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,ty.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=iS.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Ss.default=Td});var iy=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var _d=Mt(),cS=Pe(),dS=W(),fS=Yt(),pS=new RegExp("("+_d.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),hS=new RegExp("("+_d.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),bd=class extends dS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?hS:pS}innerExtract(e,t){let n=_d.parseTimeUnits(t[1]),i=fS.reverseTimeUnits(n);return cS.ParsingComponents.createRelativeFromReference(e.reference,i)}};vd.default=bd});var sy=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var wd=Mt(),mS=Pe(),gS=W(),yS=new RegExp("("+wd.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),TS=new RegExp("("+wd.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),bS=1,Ed=class extends gS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?TS:yS}innerExtract(e,t){let n=wd.parseTimeUnits(t[bS]);return mS.ParsingComponents.createRelativeFromReference(e.reference,n)}};kd.default=Ed});var ly=b(Qe=>{"use strict";var it=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var _S=xr(),ay=tr(),vS=it(Sg()),ES=it(Dg()),wS=it(Rg()),kS=it(Mg()),OS=it(wn()),SS=it(Ng()),DS=it(Fg()),RS=it(Yg()),oy=it(Hg()),MS=it(zg()),xS=it(Kg()),AS=it(Xg()),CS=it(Zg()),PS=it(ey()),NS=it(ny()),IS=it(iy()),FS=it(sy());Qe.casual=new ay.Chrono(uy());Qe.strict=new ay.Chrono(Od(!0));function LS(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=LS;function US(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=US;function uy(r=!0){let e=Od(!1,r);return e.parsers.unshift(new wS.default),e.parsers.unshift(new kS.default),e.parsers.unshift(new CS.default),e.parsers.unshift(new oy.default),e.parsers.unshift(new NS.default),e.parsers.unshift(new PS.default),e}Qe.createCasualConfiguration=uy;function Od(r=!0,e=!0){return _S.includeCommonConfiguration({parsers:[new OS.default(e),new SS.default,new RS.default,new oy.default,new DS.default,new AS.default,new MS.default,new xS.default(r),new IS.default(r),new FS.default(r)],refiners:[new ES.default,new vS.default]},r)}Qe.createConfiguration=Od});var py=b(Ds=>{"use strict";var WS=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var qS=WS(Te()),$S=W(),YS=1,cy=2,jS=3,dy=4,fy=5,GS=6,Sd=class extends $S.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=qS.default(e.refDate),a=s;if(t[YS])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[cy]){let o=t[cy],u=t[jS];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[dy]){let u=t[dy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[fy]){let o=t[fy];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[GS];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ds.default=Sd});var di=b(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.zhStringToYear=kt.zhStringToNumber=kt.WEEKDAY_OFFSET=kt.NUMBER=void 0;kt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function BS(r){let e=0;for(let t=0;t{"use strict";var zS=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var KS=zS(Te()),VS=W(),Sn=di(),Dd=1,hy=2,Rd=3,Md=class extends VS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Sn.NUMBER).join("")+"]{4}|["+Object.keys(Sn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Sn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Sn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=KS.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[hy]);if(isNaN(s)&&(s=Sn.zhStringToNumber(t[hy])),i.start.assign("month",s),t[Rd]){let a=parseInt(t[Rd]);isNaN(a)&&(a=Sn.zhStringToNumber(t[Rd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Dd]){let a=parseInt(t[Dd]);isNaN(a)&&(a=Sn.zhStringToYear(t[Dd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Rs.default=Md});var yy=b(Ms=>{"use strict";var QS=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var XS=QS(Te()),ZS=W(),gy=di(),JS=new RegExp("(\\d+|["+Object.keys(gy.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),xd=1,eD=2,Ad=class extends ZS.AbstractParserWithWordBoundaryChecking{innerPattern(){return JS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[xd]);if(isNaN(i)&&(i=gy.zhStringToNumber(t[xd])),isNaN(i)){let u=t[xd];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=XS.default(e.refDate),o=t[eD][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ms.default=Ad});var by=b(xs=>{"use strict";var tD=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var rD=tD(Te()),nD=W(),Ty=di(),iD=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(Ty.WEEKDAY_OFFSET).join("|")+")"),Cd=class extends nD.AbstractParserWithWordBoundaryChecking{innerPattern(){return iD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ty.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=rD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var sD=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var aD=sD(Te()),oD=W(),Bt=di(),uD=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),lD=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),uo=1,lo=2,co=3,fo=4,po=5,ho=6,Gt=7,fi=8,mo=9,Pd=class extends oD.AbstractParserWithWordBoundaryChecking{innerPattern(){return uD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=aD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[uo]){var a=t[uo];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[fo]){var o=t[fo];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[fi]){var p=parseInt(t[fi]);if(isNaN(p)&&(p=Bt.zhStringToNumber(t[fi])),p>=60)return null;i.start.assign("second",p)}if(u=parseInt(t[ho]),isNaN(u)&&(u=Bt.zhStringToNumber(t[ho])),t[Gt]?t[Gt]=="\u534A"?l=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?l=0:(l=parseInt(t[Gt]),isNaN(l)&&(l=Bt.zhStringToNumber(t[Gt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[mo]){if(u>12)return null;var h=t[mo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[lo]){var _=t[lo],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[co]){var w=t[co],M=w[0];M=="\u4E0A"||M=="\u671D"||M=="\u65E9"||M=="\u51CC"?(c=0,u==12&&(u=0)):(M=="\u4E0B"||M=="\u664F"||M=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[po]){var P=t[po],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=lD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let F=s.clone();if(i.end=e.createParsingComponents(),t[uo]){var a=t[uo];a=="\u660E"||a=="\u807D"?n.hour()>1&&F.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?F.add(-1,"day"):a=="\u524D"?F.add(-2,"day"):a=="\u5927\u524D"?F.add(-3,"day"):a=="\u5F8C"?F.add(2,"day"):a=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else if(t[fo]){var o=t[fo];o=="\u660E"||o=="\u807D"?F.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?F.add(-1,"day"):o=="\u524D"?F.add(-2,"day"):o=="\u5927\u524D"?F.add(-3,"day"):o=="\u5F8C"?F.add(2,"day"):o=="\u5927\u5F8C"&&F.add(3,"day"),i.end.assign("day",F.date()),i.end.assign("month",F.month()+1),i.end.assign("year",F.year())}else i.end.imply("day",F.date()),i.end.imply("month",F.month()+1),i.end.imply("year",F.year());if(u=0,l=0,c=-1,t[fi]){var p=parseInt(t[fi]);if(isNaN(p)&&(p=Bt.zhStringToNumber(t[fi])),p>=60)return null;i.end.assign("second",p)}if(u=parseInt(t[ho]),isNaN(u)&&(u=Bt.zhStringToNumber(t[ho])),t[Gt]?t[Gt]=="\u534A"?l=30:t[Gt]=="\u6B63"||t[Gt]=="\u6574"?l=0:(l=parseInt(t[Gt]),isNaN(l)&&(l=Bt.zhStringToNumber(t[Gt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[mo]){if(u>12)return null;var h=t[mo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[lo]){var _=t[lo],y=_[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[co]){var w=t[co],M=w[0];M=="\u4E0A"||M=="\u671D"||M=="\u65E9"||M=="\u51CC"?(c=0,u==12&&(u=0)):(M=="\u4E0B"||M=="\u664F"||M=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[po]){var P=t[po],N=P[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var cD=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var dD=cD(Te()),fD=W(),vy=di(),pD=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(vy.WEEKDAY_OFFSET).join("|")+")"),Nd=class extends fD.AbstractParserWithWordBoundaryChecking{innerPattern(){return pD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=vy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=dD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var hD=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var mD=hD(mr()),Id=class extends mD.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ps.default=Id});var ky=b(Ns=>{"use strict";var gD=Ns&&Ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ns,"__esModule",{value:!0});var yD=gD(Mr()),Fd=class extends yD.default{patternBetween(){return/^\s*$/i}};Ns.default=Fd});var Oy=b(qe=>{"use strict";var Ir=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0});qe.createConfiguration=qe.createCasualConfiguration=qe.parseDate=qe.parse=qe.strict=qe.casual=qe.hant=void 0;var Ld=tr(),TD=Ir(Ga()),bD=xr(),_D=Ir(py()),vD=Ir(my()),ED=Ir(yy()),wD=Ir(by()),kD=Ir(_y()),OD=Ir(Ey()),SD=Ir(wy()),DD=Ir(ky());qe.hant=new Ld.Chrono(Ud());qe.casual=new Ld.Chrono(Ud());qe.strict=new Ld.Chrono(Wd());function RD(r,e,t){return qe.casual.parse(r,e,t)}qe.parse=RD;function MD(r,e,t){return qe.casual.parseDate(r,e,t)}qe.parseDate=MD;function Ud(){let r=Wd();return r.parsers.unshift(new _D.default),r}qe.createCasualConfiguration=Ud;function Wd(){let r=bD.includeCommonConfiguration({parsers:[new vD.default,new wD.default,new OD.default,new kD.default,new ED.default],refiners:[new SD.default,new DD.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof TD.default)),r}qe.createConfiguration=Wd});var My=b(Is=>{"use strict";var xD=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var AD=xD(Te()),CD=W(),PD=1,Sy=2,ND=3,Dy=4,Ry=5,ID=6,qd=class extends CD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=AD.default(e.refDate),a=s;if(t[PD])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Sy]){let o=t[Sy],u=t[ND];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Dy]){let u=t[Dy][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Ry]){let o=t[Ry];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[ID];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Is.default=qd});var pi=b(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.zhStringToYear=Ot.zhStringToNumber=Ot.WEEKDAY_OFFSET=Ot.NUMBER=void 0;Ot.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Ot.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function FD(r){let e=0;for(let t=0;t{"use strict";var UD=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0});var WD=UD(Te()),qD=W(),Dn=pi(),$d=1,xy=2,Yd=3,jd=class extends qD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Dn.NUMBER).join("")+"]{4}|["+Object.keys(Dn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Dn.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Dn.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=WD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[xy]);if(isNaN(s)&&(s=Dn.zhStringToNumber(t[xy])),i.start.assign("month",s),t[Yd]){let a=parseInt(t[Yd]);isNaN(a)&&(a=Dn.zhStringToNumber(t[Yd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[$d]){let a=parseInt(t[$d]);isNaN(a)&&(a=Dn.zhStringToYear(t[$d])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Fs.default=jd});var Py=b(Ls=>{"use strict";var $D=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var YD=$D(Te()),jD=W(),Cy=pi(),GD=new RegExp("(\\d+|["+Object.keys(Cy.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Gd=1,BD=2,Bd=class extends jD.AbstractParserWithWordBoundaryChecking{innerPattern(){return GD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Gd]);if(isNaN(i)&&(i=Cy.zhStringToNumber(t[Gd])),isNaN(i)){let u=t[Gd];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=YD.default(e.refDate),o=t[BD][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ls.default=Bd});var Iy=b(Us=>{"use strict";var HD=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var zD=HD(Te()),KD=W(),Ny=pi(),VD=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Ny.WEEKDAY_OFFSET).join("|")+")"),Hd=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(){return VD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ny.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=zD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var QD=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0});var XD=QD(Te()),ZD=W(),zt=pi(),JD=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),eR=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),go=1,yo=2,To=3,bo=4,_o=5,vo=6,Ht=7,hi=8,Eo=9,zd=class extends ZD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=XD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[go]){let c=t[go];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[bo]){let c=t[bo];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[hi]){let c=parseInt(t[hi]);if(isNaN(c)&&(c=zt.zhStringToNumber(t[hi])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[vo]),isNaN(a)&&(a=zt.zhStringToNumber(t[vo])),t[Ht]?t[Ht]=="\u534A"?o=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?o=0:(o=parseInt(t[Ht]),isNaN(o)&&(o=zt.zhStringToNumber(t[Ht]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Eo]){if(a>12)return null;let c=t[Eo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[yo]){let p=t[yo][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[To]){let p=t[To][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[_o]){let p=t[_o][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=eR.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[go]){let c=t[go];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[bo]){let c=t[bo];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[hi]){let c=parseInt(t[hi]);if(isNaN(c)&&(c=zt.zhStringToNumber(t[hi])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[vo]),isNaN(a)&&(a=zt.zhStringToNumber(t[vo])),t[Ht]?t[Ht]=="\u534A"?o=30:t[Ht]=="\u6B63"||t[Ht]=="\u6574"?o=0:(o=parseInt(t[Ht]),isNaN(o)&&(o=zt.zhStringToNumber(t[Ht]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Eo]){if(a>12)return null;let c=t[Eo][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[yo]){let p=t[yo][0];p=="\u65E9"?(u=0,a==12&&(a=0)):p=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[To]){let p=t[To][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[_o]){let p=t[_o][0];p=="\u4E0A"||p=="\u65E9"||p=="\u51CC"?(u=0,a==12&&(a=0)):(p=="\u4E0B"||p=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var tR=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0});var rR=tR(Te()),nR=W(),Ly=pi(),iR=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(Ly.WEEKDAY_OFFSET).join("|")+")"),Kd=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return iR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Ly.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=rR.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var sR=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var aR=sR(mr()),Vd=class extends aR.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};$s.default=Vd});var qy=b(Ys=>{"use strict";var oR=Ys&&Ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ys,"__esModule",{value:!0});var uR=oR(Mr()),Qd=class extends uR.default{patternBetween(){return/^\s*$/i}};Ys.default=Qd});var $y=b($e=>{"use strict";var Fr=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.strict=$e.casual=$e.hans=void 0;var Xd=tr(),lR=Fr(Ga()),cR=xr(),dR=Fr(My()),fR=Fr(Ay()),pR=Fr(Py()),hR=Fr(Iy()),mR=Fr(Fy()),gR=Fr(Uy()),yR=Fr(Wy()),TR=Fr(qy());$e.hans=new Xd.Chrono(Zd());$e.casual=new Xd.Chrono(Zd());$e.strict=new Xd.Chrono(Jd());function bR(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=bR;function _R(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=_R;function Zd(){let r=Jd();return r.parsers.unshift(new dR.default),r}$e.createCasualConfiguration=Zd;function Jd(){let r=cR.includeCommonConfiguration({parsers:[new fR.default,new hR.default,new gR.default,new mR.default,new pR.default],refiners:[new yR.default,new TR.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof lR.default)),r}$e.createConfiguration=Jd});var jy=b(xt=>{"use strict";var Yy=xt&&xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vR=xt&&xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ER=xt&&xt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yy(e,r,t)},wR=xt&&xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Yy(e,r,t);return vR(e,r),e};Object.defineProperty(xt,"__esModule",{value:!0});xt.hans=void 0;ER(Oy(),xt);xt.hans=wR($y())});var St=b(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var wo=Ee(),kR=rt();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${wo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function By(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=By;ee.ORDINAL_NUMBER_PATTERN=`(?:${wo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function OR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=OR;var ef="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${ef}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${ef}|[5-9][0-9]${ef})`;function SR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return kR.findMostLikelyADYear(e)}ee.parseYear=SR;var Hy=`(${ee.NUMBER_PATTERN})\\s{0,3}(${wo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,Gy=new RegExp(Hy,"i");ee.TIME_UNITS_PATTERN=wo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Hy);function DR(r){let e={},t=r,n=Gy.exec(t);for(;n;)RR(e,n),t=t.substring(n[0].length).trim(),n=Gy.exec(t);return e}ee.parseTimeUnits=DR;function RR(r,e){let t=By(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ky=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var js=St(),MR=Pe(),xR=W(),zy=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${js.TIME_UNITS_PATTERN})${js.REGEX_PARTS.rightBoundary}`,AR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${zy}`,js.REGEX_PARTS.flags),CR=new RegExp(zy,"i"),tf=class extends xR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return js.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?CR:AR}innerExtract(e,t){let n=js.parseTimeUnits(t[1]);return MR.ParsingComponents.createRelativeFromReference(e.reference,n)}};rf.default=tf});var Jy=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var PR=rt(),Gs=St(),Zy=St(),ko=St(),NR=Ee(),IR=W(),FR=new RegExp(`(?:\u0441)?\\s*(${ko.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${ko.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${NR.matchAnyPattern(Gs.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Zy.YEAR_PATTERN}(?![^\\s]\\d)))?${Gs.REGEX_PARTS.rightBoundary}`,Gs.REGEX_PARTS.flags),Vy=1,Qy=2,LR=3,Xy=4,nf=class extends IR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Gs.REGEX_PARTS.leftBoundary}innerPattern(){return FR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Gs.MONTH_DICTIONARY[t[LR].toLowerCase()],s=ko.parseOrdinalNumberPattern(t[Vy]);if(s>31)return t.index=t.index+t[Vy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Xy]){let a=Zy.parseYear(t[Xy]);n.start.assign("year",a)}else{let a=PR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Qy]){let a=ko.parseOrdinalNumberPattern(t[Qy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};sf.default=nf});var rT=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Bs=St(),UR=rt(),WR=Ee(),tT=St(),qR=W(),$R=new RegExp(`((?:\u0432)\\s*)?(${WR.matchAnyPattern(Bs.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${tT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Bs.REGEX_PARTS.flags),YR=2,eT=3,af=class extends qR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Bs.REGEX_PARTS.leftBoundary}innerPattern(){return $R}innerExtract(e,t){let n=t[YR].toLowerCase();if(t[0].length<=3&&!Bs.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Bs.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[eT]){let a=tT.parseYear(t[eT]);i.start.assign("year",a)}else{let a=UR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};of.default=af});var iT=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var Oo=je(),jR=_n(),nT=St(),uf=class extends jR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return nT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${nT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Oo.Meridiem.PM)):i<6&&n.assign("meridiem",Oo.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Oo.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Oo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};lf.default=uf});var sT=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var So=St(),GR=Pe(),BR=W(),HR=Yt(),zR=new RegExp(`(${So.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,So.REGEX_PARTS.flags),cf=class extends BR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return So.REGEX_PARTS.leftBoundary}innerPattern(){return zR}innerExtract(e,t){let n=So.parseTimeUnits(t[1]),i=HR.reverseTimeUnits(n);return GR.ParsingComponents.createRelativeFromReference(e.reference,i)}};df.default=cf});var aT=b(Hs=>{"use strict";var KR=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});var VR=KR(mr()),ff=class extends VR.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Hs.default=ff});var oT=b(zs=>{"use strict";var QR=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0});var XR=QR(Mr()),pf=class extends XR.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};zs.default=pf});var uT=b(Lr=>{"use strict";var ZR=Lr&&Lr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),JR=Lr&&Lr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),eM=Lr&&Lr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ZR(e,r,t);return JR(e,r),e};Object.defineProperty(Lr,"__esModule",{value:!0});var tM=W(),Ks=eM(Cr()),hf=St(),rM=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${hf.REGEX_PARTS.rightBoundary}`,hf.REGEX_PARTS.flags),mf=class extends tM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return hf.REGEX_PARTS.leftBoundary}innerPattern(e){return rM}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ks.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ks.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ks.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ks.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ks.theDayBefore(e.reference,2)}return i}};Lr.default=mf});var lT=b(ar=>{"use strict";var nM=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),iM=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),sM=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&nM(e,r,t);return iM(e,r),e},aM=ar&&ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ar,"__esModule",{value:!0});var oM=W(),Rn=sM(Cr()),uM=$t(),lM=aM(Te()),gf=St(),cM=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${gf.REGEX_PARTS.rightBoundary}`,gf.REGEX_PARTS.flags),yf=class extends oM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return gf.REGEX_PARTS.leftBoundary}innerPattern(){return cM}innerExtract(e,t){let n=lM.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Rn.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Rn.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Rn.morning(e.reference);if(i.match(/в\s*полдень/))return Rn.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Rn.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Rn.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),uM.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Rn.midnight(e.reference):s}};ar.default=yf});var cT=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var Vs=St(),dM=Ee(),fM=W(),pM=En(),hM=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${dM.matchAnyPattern(Vs.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Vs.REGEX_PARTS.rightBoundary}`,Vs.REGEX_PARTS.flags),mM=1,gM=2,yM=3,Tf=class extends fM.AbstractParserWithWordBoundaryChecking{innerPattern(){return hM}patternLeftBoundary(){return Vs.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[gM].toLowerCase(),i=Vs.WEEKDAY_DICTIONARY[n],s=t[mM],a=t[yM],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=pM.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};bf.default=Tf});var fT=b(Xs=>{"use strict";var TM=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0});var Qs=St(),dT=Pe(),bM=TM(Te()),_M=W(),vM=Ee(),EM=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${vM.matchAnyPattern(Qs.TIME_UNIT_DICTIONARY)})(?=\\s*)${Qs.REGEX_PARTS.rightBoundary}`,Qs.REGEX_PARTS.flags),wM=1,kM=2,_f=class extends _M.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Qs.REGEX_PARTS.leftBoundary}innerPattern(){return EM}innerExtract(e,t){let n=t[wM].toLowerCase(),i=t[kM].toLowerCase(),s=Qs.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=bM.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Xs.default=_f});var pT=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Zs=St(),OM=Pe(),SM=W(),DM=Yt(),RM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${Zs.TIME_UNITS_PATTERN})${Zs.REGEX_PARTS.rightBoundary}`,Zs.REGEX_PARTS.flags),vf=class extends SM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zs.REGEX_PARTS.leftBoundary}innerPattern(){return RM}innerExtract(e,t){let n=t[1].toLowerCase(),i=Zs.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=DM.reverseTimeUnits(i);break}return OM.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ef.default=vf});var gT=b(Xe=>{"use strict";var At=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var MM=At(Ky()),xM=At(Jy()),AM=At(rT()),CM=At(iT()),PM=At(sT()),NM=At(aT()),IM=At(oT()),FM=xr(),LM=At(uT()),UM=At(lT()),WM=At(cT()),qM=At(fT()),hT=tr(),$M=At(wn()),YM=At(pT());Xe.casual=new hT.Chrono(mT());Xe.strict=new hT.Chrono(wf(!0));function jM(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=jM;function GM(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=GM;function mT(){let r=wf(!1);return r.parsers.unshift(new LM.default),r.parsers.unshift(new UM.default),r.parsers.unshift(new AM.default),r.parsers.unshift(new qM.default),r.parsers.unshift(new YM.default),r}Xe.createCasualConfiguration=mT;function wf(r=!0){return FM.includeCommonConfiguration({parsers:[new $M.default(!0),new MM.default,new xM.default,new WM.default,new CM.default(r),new PM.default],refiners:[new IM.default,new NM.default]},r)}Xe.createConfiguration=wf});var je=b(ie=>{"use strict";var BM=ie&&ie.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),HM=ie&&ie.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),nn=ie&&ie.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&BM(e,r,t);return HM(e,r),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.parseDate=ie.parse=ie.casual=ie.strict=ie.ru=ie.zh=ie.nl=ie.pt=ie.ja=ie.fr=ie.de=ie.Meridiem=ie.Chrono=ie.en=void 0;var kf=nn(ql());ie.en=kf;var zM=tr();Object.defineProperty(ie,"Chrono",{enumerable:!0,get:function(){return zM.Chrono}});var KM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(KM=ie.Meridiem||(ie.Meridiem={}));var VM=nn(Om());ie.de=VM;var QM=nn(eg());ie.fr=QM;var XM=nn(lg());ie.ja=XM;var ZM=nn(Og());ie.pt=ZM;var JM=nn(ly());ie.nl=JM;var ex=nn(jy());ie.zh=ex;var tx=nn(gT());ie.ru=tx;ie.strict=kf.strict;ie.casual=kf.casual;function rx(r,e,t){return ie.casual.parse(r,e,t)}ie.parse=rx;function nx(r,e,t){return ie.casual.parseDate(r,e,t)}ie.parseDate=nx});var Cb=b(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var xb=Symbol("MustacheDataPath");function Mb({target:r,propertyName:e}){return[...r[xb]||[],e]}function Ab(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Mb({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[xb]=Mb({target:t,propertyName:n}),Ab(i,e)):i}})}tp.default=Ab});var Or=b(cr=>{"use strict";cr.__esModule=!0;cr.Tokens=cr.StructuralCharacters=cr.Operators=void 0;var NA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(NA=cr.Operators||(cr.Operators={}));var IA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(IA=cr.StructuralCharacters||(cr.StructuralCharacters={}));var FA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(FA=cr.Tokens||(cr.Tokens={}))});var ap=b(Fi=>{"use strict";Fi.__esModule=!0;Fi.VALID_TOKENS=Fi.OPERATOR_PRECEDENCE=void 0;var Ne=Or();Fi.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Fi.VALID_TOKENS={identifierOnly:[{name:Ne.Tokens.IDENTIFIER},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Ne.Tokens.IDENTIFIER},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.OPEN_PARENTHESIS},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.NOT}],binaryOperator:[{name:Ne.Tokens.OPERATOR,value:Ne.Operators.AND},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.OR},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.XOR}],binaryOperatorOrClose:[{name:Ne.Tokens.OPERATOR,value:Ne.Operators.AND},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.OR},{name:Ne.Tokens.OPERATOR,value:Ne.Operators.XOR},{name:Ne.Tokens.STRUCTURAL_CHARACTER,value:Ne.StructuralCharacters.CLOSE_PARENTHESIS}]}});var op=b(ht=>{"use strict";ht.__esModule=!0;ht.ESCAPE_CHARACTER=ht.EOL=ht.COMMENT_DELIMITER=ht.QUOTED_IDENTIFIER_DELIMITER=ht.SEPARATORS=ht.OPERATORS=ht.STRUCTURAL_CHARACTERS=void 0;var Li=Or();ht.STRUCTURAL_CHARACTERS={"(":Li.StructuralCharacters.OPEN_PARENTHESIS,")":Li.StructuralCharacters.CLOSE_PARENTHESIS};ht.OPERATORS={AND:Li.Operators.AND,OR:Li.Operators.OR,XOR:Li.Operators.XOR,NOT:Li.Operators.NOT};ht.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));ht.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);ht.COMMENT_DELIMITER=String.fromCodePoint(35);ht.EOL=String.fromCodePoint(10);ht.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Ub=b(Zt=>{"use strict";var up=Zt&&Zt.__assign||function(){return up=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";uu.__esModule=!0;uu.lex=void 0;var Ui=Or(),Ft=op(),Wi=Ub(),qA=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var qb=Lt&&Lt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var Sr=$i&&$i.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";mt.__esModule=!0;mt.throwInvalidExpression=mt.isOperator=mt.isIdentifier=mt.notUtil=mt.xorUtil=mt.orUtil=mt.andUtil=void 0;var Gb=Or(),zA=function(r,e){return r&&e};mt.andUtil=zA;var KA=function(r,e){return r||e};mt.orUtil=KA;var VA=function(r,e){return r!==e};mt.xorUtil=VA;var QA=function(r){return!r};mt.notUtil=QA;var XA=function(r){var e=r.name,t=r.value;return e===Gb.Tokens.IDENTIFIER&&typeof t=="string"};mt.isIdentifier=XA;var ZA=function(r){var e=r.name,t=r.value;return e===Gb.Tokens.OPERATOR&&typeof t=="string"};mt.isOperator=ZA;var JA=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};mt.throwInvalidExpression=JA});var Bb=b(du=>{"use strict";var ba;du.__esModule=!0;du.OPERATOR_MAP=void 0;var fp=Or(),pp=dp();du.OPERATOR_MAP=(ba={},ba[fp.Operators.AND]=pp.andUtil,ba[fp.Operators.OR]=pp.orUtil,ba[fp.Operators.XOR]=pp.xorUtil,ba)});var zb=b(zr=>{"use strict";var Yi=zr&&zr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var hp=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});Dr.__esModule=!0;Dr.parse=Dr.evaluate=Dr.getEvaluator=void 0;var Kb=zb();hp(Dr,Kb,"getEvaluator");hp(Dr,Kb,"evaluate");var iC=cp();hp(Dr,iC,"parse")});var r_=b((e_,t_)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(f){return Object.prototype.toString.call(f)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var f=Object.getOwnPropertyNames(d);return f.push.apply(f,Object.getOwnPropertySymbols(d)),f}:Object.keys;function c(){this._events={},this._conf&&p.call(this,this._conf)}function p(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(d,f){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+f+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var _=function(d,f,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,f];case 3:return[d,f,m];default:for(var T=new Array(g);g--;)T[g]=arguments[g];return T}};function y(d,f){for(var m={},g,T=d.length,v=f?f.length:0,k=0;k0;)d=v[O],k.call(D,d,m[d]);this._listeners={},this._listenersCount=0,S()}}});function M(d,f,m,g){var T=Object.assign({},f);if(!d)return T;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,D,O,S;function I(se){throw Error('Invalid "'+D+'" option value'+(se?". Reason: "+se:""))}for(var me=0;me0;)if(D===d[O])return v;k(f)}}var F=N(["function"]),X=N(["object","function"]);function V(d,f,m){var g,T,v=0,k,D=new d(function(O,S,I){m=M(m,{timeout:0,overload:!1},{timeout:function(Se,U){return Se*=1,(typeof Se!="number"||Se<0||!Number.isFinite(Se))&&U("timeout must be a positive number"),Se}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){T&&(T=null),v&&(clearTimeout(v),v=0)}var se=function(Se){me(),O(Se)},re=function(Se){me(),S(Se)};g?f(se,re,I):(T=[function(Se){re(Se||Error("canceled"))}],f(se,re,function(Se){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Se!="function")throw TypeError("onCancel callback must be a function");T.push(Se)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var Se=Error("timeout");Se.code="ETIMEDOUT",v=0,D.cancel(Se),S(Se)},m.timeout))});return g||(D.cancel=function(O){if(!!T){for(var S=T.length,I=1;I0;)re=Ue[D],re!=="_listeners"&&(Fe=j(d,f,m[re],g+1,T),Fe&&(se?se.push.apply(se,Fe):se=Fe));return se}else if(tt==="**"){for(Ae=g+1===T||g+2===T&&Rr==="*",Ae&&m._listeners&&(se=j(d,f,m,T,T)),Ue=l(m),D=Ue.length;D-- >0;)re=Ue[D],re!=="_listeners"&&(re==="*"||re==="**"?(m[re]._listeners&&!Ae&&(Fe=j(d,f,m[re],T,T),Fe&&(se?se.push.apply(se,Fe):se=Fe)),Fe=j(d,f,m[re],g,T)):re===Rr?Fe=j(d,f,m[re],g+2,T):Fe=j(d,f,m[re],g,T),Fe&&(se?se.push.apply(se,Fe):se=Fe));return se}else m[tt]&&(se=j(d,f,m[tt],g+1,T));if(Se=m["*"],Se&&j(d,f,Se,g+1,T),U=m["**"],U)if(g0;)re=Ue[D],re!=="_listeners"&&(re===Rr?j(d,f,U[re],g+2,T):re===tt?j(d,f,U[re],g+1,T):(Me={},Me[re]=U[re],j(d,f,{"**":Me},g+1,T)));else U._listeners?j(d,f,U,T,T):U["*"]&&U["*"]._listeners&&j(d,f,U["*"],T,T);return se}function G(d,f,m){var g=0,T=0,v,k=this.delimiter,D=k.length,O;if(typeof d=="string")if((v=d.indexOf(k))!==-1){O=new Array(5);do O[g++]=d.slice(T,v),T=v+D;while((v=d.indexOf(k,T))!==-1);O[g++]=d.slice(T)}else O=[d],g=1;else O=d,g=d.length;if(g>1){for(v=0;v+10&&S._listeners.length>this._maxListeners&&(S._listeners.warned=!0,h.call(this,S._listeners.length,I))):S._listeners=f,!0;return!0}function Ce(d,f,m,g){for(var T=l(d),v=T.length,k,D,O,S=d._listeners,I;v-- >0;)D=T[v],k=d[D],D==="_listeners"?O=m:O=m?m.concat(D):[D],I=g||typeof D=="symbol",S&&f.push(I?O:O.join(this.delimiter)),typeof k=="object"&&Ce.call(this,k,f,O,I);return f}function Ie(d){for(var f=l(d),m=f.length,g,T,v;m-- >0;)T=f[m],g=d[T],g&&(v=!0,T!=="_listeners"&&!Ie(g)&&delete d[T]);return v}function B(d,f,m){this.emitter=d,this.event=f,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function A(d,f,m){if(m===!0)T=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,T=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||T){var D=f,O=f._origin||f;if(v&&!i)throw Error("process.nextTick is not supported");T===r&&(T=f.constructor.name==="AsyncFunction"),f=function(){var S=arguments,I=this,me=this.event;return T?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return I.event=me,D.apply(I,S)}):(v?process.nextTick:u)(function(){I.event=me,D.apply(I,S)})},f._async=!0,f._origin=O}return[f,k?new B(this,d,f):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,p.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,f,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=M(m,{on:r,off:r,reducers:r},{on:F,off:F,reducers:X});function T(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,D=he.call(g,d),O;D===-1?O=new w(g,d,m):O=g._observers[D];for(var S=l(v),I=S.length,me,se=typeof k=="function",re=0;re0;)T=m[g],(!d||T._target===d)&&(T.unsubscribe(f),v=!0);return v},E.prototype.delimiter=".",E.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},E.prototype.getMaxListeners=function(){return this._maxListeners},E.prototype.event="",E.prototype.once=function(d,f,m){return this._once(d,f,!1,m)},E.prototype.prependOnceListener=function(d,f,m){return this._once(d,f,!0,m)},E.prototype._once=function(d,f,m,g){return this._many(d,1,f,m,g)},E.prototype.many=function(d,f,m,g){return this._many(d,f,m,!1,g)},E.prototype.prependMany=function(d,f,m,g){return this._many(d,f,m,!0,g)},E.prototype._many=function(d,f,m,g,T){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--f===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,T)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],f,m=this.wildcard,g,T,v,k,D;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(f=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(T=d.length,s){for(v=0;v3)for(g=new Array(O-1),k=1;k3)for(T=new Array(S-1),D=1;D0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=f,T)},E.prototype.off=function(d,f){if(typeof f!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var T=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=j.call(this,null,T,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v0){for(g=this._all,f=0,m=g.length;f0;)g=f[m[v]],typeof g=="function"?T.push(g):T.push.apply(T,g);return T}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var D=[],O=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,D,O,k,0),D}return f?(g=f[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var f=this._events;return this.wildcard?Ce.call(this,this.listenerTree,[],null,d):f?l(f):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var f=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return j.call(this,f,m,this.listenerTree,0),f.length>0}var g=this._events,T=this._all;return!!(T&&T.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,f){var m=this,g=typeof f;return g==="number"?f={timeout:f}:g==="function"&&(f={filter:f}),f=M(f,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:F,Promise:P}),V(f.Promise,function(T,v,k){function D(){var O=f.filter;if(!(O&&!O.apply(m,arguments)))if(m.off(d,D),f.handleError){var S=arguments[0];S?v(S):T(_.apply(null,arguments).slice(1))}else T(_.apply(null,arguments))}k(function(){m.off(d,D)}),m._on(d,D,!1)},{timeout:f.timeout,overload:f.overload})};function H(d,f,m){m=M(m,{Promise,timeout:0,overload:!1},{Promise:P});var g=m.Promise;return V(g,function(T,v,k){var D;if(typeof d.addEventListener=="function"){D=function(){T(_.apply(null,arguments))},k(function(){d.removeEventListener(f,D)}),d.addEventListener(f,D,{once:!0});return}var O=function(){S&&d.removeListener("error",S),T(_.apply(null,arguments))},S;f!=="error"&&(S=function(I){d.removeListener(f,O),v(I)},d.once("error",S)),k(function(){S&&d.removeListener("error",S),d.removeListener(f,O)}),d.once(f,O)},{timeout:m.timeout,overload:m.overload})}var C=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return C._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");C._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(C,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return E});else if(typeof e_=="object")t_.exports=E;else{var Z=new Function("","return this")();Z.EventEmitter2=E}})()});var MC={};F_(MC,{default:()=>xu});module.exports=L_(MC);var R_=require("obsidian");var Ei=require("obsidian");var AC=new Error("timeout while waiting for mutex to become available"),CC=new Error("mutex already locked"),U_=new Error("request for lock canceled"),W_=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Nu=class{constructor(e,t=U_){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return W_(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},q_=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(p){a(p)}}function u(c){try{l(n.throw(c))}catch(p){a(p)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Na=class{constructor(e){this._semaphore=new Nu(1,e)}acquire(){return q_(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var Do=Zi(je());var _t=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new _t(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new _t(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Ct=class{static parseDate(e,t=!1){return window.moment(Do.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Ct.parseRelativeDateRange,Ct.parseNumberedDateRange,Ct.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return _t.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=Do.parse(e,void 0,{forwardDate:t});if(n.length===0)return _t.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new _t(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=_t.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return _t.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new _t(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return _t.buildInvalid()}};var ix={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function mi(r){for(let[e,t]of Object.entries(ix))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Ro=["MO","TU","WE","TH","FR","SA","SU"],Ye=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Ro.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Ro[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Re=function(r){return r!=null},Pt=function(r){return typeof r=="number"},Of=function(r){return typeof r=="string"&&Ro.includes(r)},st=Array.isArray,Kt=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ue(t,e/t.length)),t.slice(0,e)+String(n))}var TT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},ut=function(r,e){var t=r%e;return t*e<0?t+e:t},Mo=function(r,e){return{div:Math.floor(r/e),mod:ut(r,e)}},Nt=function(r){return!Re(r)||r.length===0},Le=function(r){return!Nt(r)},ce=function(r,e){return Le(r)&&r.indexOf(e)!==-1};var Tr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},sx=[31,28,31,30,31,30,31,31,30,31,30,31],vT=1e3*60*60*24,xo=9999,ET=Tr(1970,1,1),ax=[6,0,1,2,3,4,5];var gi=function(r){return r%4===0&&r%100!==0||r%400===0},Sf=function(r){return r instanceof Date},xn=function(r){return Sf(r)&&!isNaN(r.getTime())},bT=function(r){return r.getTimezoneOffset()*60*1e3},ox=function(r,e){var t=r.getTime()-bT(r),n=e.getTime()-bT(e),i=t-n;return Math.round(i/vT)},Js=function(r){return ox(r,ET)},Ao=function(r){return new Date(ET.getTime()+r*vT)},ux=function(r){var e=r.getUTCMonth();return e===1&&gi(r.getUTCFullYear())?29:sx[e]},Ur=function(r){return ax[r.getUTCDay()]},Df=function(r,e){var t=Tr(r,e+1,1);return[Ur(t),ux(t)]},Co=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Po=function(r){var e=new Date(r.getTime());return e},Rf=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),qr=lx;var Mf=function(r,e){return Mf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Mf(r,e)};function Ti(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mf(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var at=function(){return at=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function ta(r,e){e===void 0&&(e=An);var t={},n=new mx(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=$.DAILY,n.nextSymbol()&&(a(),p());break;case"weekday(s)":t.freq=$.WEEKLY,t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR],n.nextSymbol(),p();break;case"week(s)":t.freq=$.WEEKLY,n.nextSymbol()&&(s(),p());break;case"hour(s)":t.freq=$.HOURLY,n.nextSymbol()&&(s(),p());break;case"minute(s)":t.freq=$.MINUTELY,n.nextSymbol()&&(s(),p());break;case"month(s)":t.freq=$.MONTHLY,n.nextSymbol()&&(s(),p());break;case"year(s)":t.freq=$.YEARLY,n.nextSymbol()&&(s(),p());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=$.WEEKLY;var _=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[$[_]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push($[y]),n.nextSymbol()}c(),p();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=$.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=o();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}s(),p();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),_=n.accept("the");if(!!(h||_))do{var y=l(),w=u(),M=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var P=n.acceptNumber();if(!P)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(P[0],10)];n.accept("comma");){if(P=n.acceptNumber(),!P)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(P[0],10))}}else if(M)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(M);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var _=n.acceptNumber();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(_[0],10)];n.accept("comma");){if(_=n.acceptNumber(),!_)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(_[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function p(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ae;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ae||(ae={}));function ra(r){return r12){var n=Math.floor(this.month/12),i=ut(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Mo(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Nt(i)||ce(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Mo(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Nt(i)||ce(i,this.hour))&&(Nt(s)||ce(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Mo(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Nt(i)||ce(i,this.hour))&&(Nt(s)||ce(s,this.minute))&&(Nt(a)||ce(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Df(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>xo))return;t=Df(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ae.YEARLY:return this.addYears(s);case ae.MONTHLY:return this.addMonths(s);case ae.WEEKLY:return this.addWeekly(s,a);case ae.DAILY:return this.addDaily(s);case ae.HOURLY:return this.addHours(s,n,o);case ae.MINUTELY:return this.addMinutes(s,n,o,u);case ae.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(_i);function Af(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||Le(e.byweekno)||Le(e.byyearday)||Boolean(e.bymonthday)||Le(e.bymonthday)||Re(e.byweekday)||Re(e.byeaster)))switch(e.freq){case $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[Ur(e.dtstart)];break}if(Re(e.bymonth)&&!st(e.bymonth)&&(e.bymonth=[e.bymonth]),Re(e.byyearday)&&!st(e.byyearday)&&Pt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Re(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(st(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Re(e.byweekno)&&!st(e.byweekno)&&(e.byweekno=[e.byweekno]),!Re(e.byweekday))e.bynweekday=null;else if(Pt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Of(e.byweekday))e.byweekday=[Ye.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof Ye)!e.byweekday.n||e.freq>$.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t$.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=Le(a)?a:null,e.bynweekday=Le(o)?o:null}return Re(e.byhour)?Pt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,Re(e.byminute)?Pt(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Re(e.bysecond)?Pt(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function xT(r){var e=r.dtstart.getTime()%1e3;if(!ra(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new _i(n,i,s,e))})})}),t}function sa(r){var e=r.split(` +`).map(gx).filter(function(t){return t!==null});return at(at({},e[0]),e[1])}function ia(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=ea(i),e}function gx(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return CT(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return CT(r);case"DTSTART":return ia(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function CT(r){var e=r.replace(/^RRULE:/i,""),t=ia(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=Vt[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=yx(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=Tx(o);break;case"DTSTART":case"TZID":var c=ia(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ea(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function yx(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(PT)}return PT(r)}function PT(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function Tx(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Vt[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=Vt[s].weekday;return new Ye(a,i)})}var Cn=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=yi(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:wT(this.date,this.tzid)},r}();function aa(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(na),s=0;s=4?(c=0,l=o.yearlen+ut(a-e.wkst,7)):l=n-c;for(var p=Math.floor(l/7),h=ut(l,7),_=Math.floor(p+h/4),y=0;y0&&w<=_){var M=void 0;w>1?(M=c+(w-1)*7,c!==u&&(M-=7-u)):M=c;for(var P=0;P<7&&(o.wnomask[M]=1,M++,o.wdaymask[M]!==e.wkst);P++);}}if(ce(e.byweekno,1)){var M=c+_*7;if(c!==u&&(M-=7-u),M=4?(X=0,he=V+ut(F-e.wkst,7)):he=n-c,N=Math.floor(52+ut(he,7)/4)}if(ce(e.byweekno,N))for(var M=0;Ms)return $r(r);if(N>=t){var F=KT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}else for(var P=_;Ps)return $r(r);if(N>=t){var F=KT(N,e);if(!r.accept(F)||o&&(--o,!o))return $r(r)}}}if(e.interval===0||(u.add(e,w),u.year>xo))return $r(r);ra(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Dx(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return Le(n)&&!ce(n,r.mmask[e])||Le(i)&&!r.wnomask[e]||Le(s)&&!ce(s,r.wdaymask[e])||Le(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!ce(r.eastermask,e)||(Le(o)||Le(u))&&!ce(o,r.mdaymask[e])&&!ce(u,r.nmdaymask[e])||Le(l)&&(e=r.yearlen&&!ce(l,e+1-r.yearlen)&&!ce(l,-r.nextyearlen+e-r.yearlen))}function KT(r,e){return new Cn(r,e.tzid).rezonedDate()}function $r(r){return r.getValue()}function Rx(r,e,t,n,i){for(var s=!1,a=e;a=$.HOURLY&&Le(i)&&!ce(i,e.hour)||n>=$.MINUTELY&&Le(s)&&!ce(s,e.minute)||n>=$.SECONDLY&&Le(a)&&!ce(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Vt={MO:new Ye(0),TU:new Ye(1),WE:new Ye(2),TH:new Ye(3),FR:new Ye(4),SA:new Ye(5),SU:new Ye(6)},na={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Vt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},AT=Object.keys(na),$=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new NT,this.origOptions=Af(e);var n=MT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return ta(e,t)},r.fromText=function(e,t){return OT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return No(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new xf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new qr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!xn(e)||!xn(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new xf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new qr("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!xn(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new qr("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!xn(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new qr("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return aa(this.origOptions)},r.prototype.toText=function(e,t,n){return ST(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return DT(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ae.YEARLY,r.MONTHLY=ae.MONTHLY,r.WEEKLY=ae.WEEKLY,r.DAILY=ae.DAILY,r.HOURLY=ae.HOURLY,r.MINUTELY=ae.MINUTELY,r.SECONDLY=ae.SECONDLY,r.MO=Vt.MO,r.TU=Vt.TU,r.WE=Vt.WE,r.TH=Vt.TH,r.FR=Vt.FR,r.SA=Vt.SA,r.SU=Vt.SU,r.parseString=sa,r.optionsToString=aa,r}();function VT(r,e,t,n,i,s){var a={},o=r.accept;function u(h,_){t.forEach(function(y){y.between(h,_,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(h){var _=new Cn(h,s).rezonedDate();a[Number(_)]=!0}),r.accept=function(h){var _=Number(h);return isNaN(_)?o.call(this,h):!a[_]&&(u(new Date(_-1),new Date(_+1)),!a[_])?(a[_]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var _=Number(h);return a[_]?!0:(a[_]=!0,o.call(this,h))});for(var l=0;l1||i.length||s.length||a.length){var c=new Nf(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new $(Pf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new $(Pf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var p=n[0]||{};return new $(Pf(p,p.dtstart||e.dtstart||o,p.tzid||e.tzid||u),l)}function Io(r,e){return e===void 0&&(e={}),Ax(r,Cx(e))}function Pf(r,e,t){return at(at({},r),{dtstart:e,tzid:t})}function Cx(r){var e=[],t=Object.keys(r),n=Object.keys(QT);if(t.forEach(function(i){ce(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return at(at({},QT),r)}function Px(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=TT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function Nx(r){var e=Px(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function Ix(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` +`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function Fx(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function XT(r,e){return Fx(e),r.split(",").map(function(t){return ea(t)})}function ZT(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));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 Y(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function So(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Kt=class{static get(){let{globalFilter:e}=X();return e}static set(e){Ge({globalFilter:e})}static reset(){Ge({globalFilter:Kt.empty})}static isEmpty(){return Kt.get()===Kt.empty}static equals(e){return Kt.get()===e}static includedIn(e){let t=Kt.get();return e.includes(t)}static prependTo(e){return Kt.get()+" "+e}static removeAsWordFromDependingOnSettings(e){let{removeGlobalFilter:t}=X();return t?Kt.removeAsWordFrom(e):e}static removeAsWordFrom(e){if(Kt.isEmpty())return e;let t=RegExp("(^|\\s)"+So(Kt.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}static removeAsSubstringFrom(e){let t=Kt.get();return e.replace(t,"").trim()}},we=Kt;we.empty="";var bf=5;function vf(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(Wx(n,i,s,t,e)),a=a.concat(qx(n,i,s,r.recurrenceSymbol)),a=a.concat(Ux(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function Ux(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=At.parseDate("today",!0).format(z.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Ef(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 Wx(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=Ef(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?At.parseDate(ci(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(z.dateFormat)}`,appendText:`${l} ${f.format(z.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=`${At.parseDate(y,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${D})`,appendText:`${l} ${D} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function qx(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=Ef(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let y=(u=et.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let E=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:E,insertAt:o.index,insertSkip:o[0].length}),o[0]==E)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 Ef(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 Yx(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 l_(r,e){return(t,n,i)=>Yx(t.slice(0,n),e)?r(t,n,i):[]}function c_(r,e){return we.includedIn(r)&&$x(r,e)}function $x(r,e){if(r.length===0)return!1;let t=_e.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var Qs=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTags=!1;this.shortMode=!1;this.explainQuery=!1}},tn=class{constructor(e){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new Qs,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.options.hideUrgency,"urgency"],[this.options.hideBacklinks,"backlinks"],[this.options.hideEditButton,"edit-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.options.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var wf={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Sn=class{constructor(e){this.symbols=e}serialize(e){let t=new tn,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var f;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(f=e.blockLink)!=null?f:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",f=null,h="",T=20,y=0;do{n=!1;let E=e.match(t.priorityRegex);E!==null&&(i=this.parsePriority(E[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let D=e.match(t.doneDateRegex);D!==null&&(u=window.moment(D[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let A=e.match(t.dueDateRegex);A!==null&&(o=window.moment(A[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let P=e.match(t.scheduledDateRegex);P!==null&&(a=window.moment(P[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let F=e.match(t.startDateRegex);F!==null&&(s=window.moment(F[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let Z=e.match(t.createdDateRegex);Z!==null&&(l=window.moment(Z[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let Q=e.match(t.recurrenceRegex);Q!==null&&(c=Q[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let he=e.match(z.hashTagsFromEnd);if(he!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let j=he[0].trim();h=h.length>0?[j,h].join(" "):j}y++}while(n&&y<=T);return c.length>0&&(f=et.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:f,tags:_e.extractHashtags(e)}}};function Dn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var kf={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Dn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Dn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Dn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Dn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Dn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Dn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Dn(/repeat:: *([a-zA-Z0-9, !]+)/)}},Do=class extends Sn{constructor(){super(kf)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?` [${i.trim()}]`:i}};var Vt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Vt||{}),tt=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var Ot=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Ot(new tt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Ot(new tt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Ot(new tt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Ot(new tt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Ot(new tt("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Vt[e]||"TODO"}static createUnknownStatus(e){return new Ot(new tt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Ot.getTypeFromStatusTypeString(e[3]);return new Ot(new tt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return Ot.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},re=Ot;re.DONE=Ot.makeDone(),re.EMPTY=Ot.makeEmpty(),re.TODO=Ot.makeTodo();var Ro=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var He=class{constructor(){this.coreStatuses=[re.makeTodo().configuration,re.makeDone().configuration],this.customStatuses=[re.makeInProgress().configuration,re.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new re(e);return t.findIndex(i=>new re(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){He.deleteAllCustomStatuses(e),new He().customStatuses.forEach(n=>{He.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):He.addStatus(e.customStatuses,re.createFromImportedValue(i))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var d_=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var mr=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return d_.forEach(t=>{e=[...e,new mr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return mr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of mr.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Nr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Sn(wf),buildSuggestions:vf(wf,bf)},dataview:{displayName:"Dataview",taskSerializer:new Do,buildSuggestions:l_(vf(kf,bf),[["(",")"],["[","]"]])}},Gx={globalQuery:"",globalFilter:we.empty,removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new He,features:mr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Ro},rn=ge({},Gx),X=()=>{for(let r in mr.settingsFlags)rn.features[r]===void 0&&(rn.features[r]=mr.settingsFlags[r]);return rn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=re.getTypeFromStatusTypeString(r.type);t[e]=new tt((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),ge({},rn)},Ge=r=>(rn=ge(ge({},rn),r),X());var Rn=(r,e)=>(rn.generalSettings[r]=e,X()),f_=r=>{var e;return(e=rn.features[r])!=null?e:!1};function Zs(){return Nr[X().taskFormat]}function Of(){return{source:X().globalQuery}}var Re=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==re.EMPTY.symbol)}static getInstance(){return Re.instance||(Re.instance=new Re),Re.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof re?this._registeredStatuses.push(e):this._registeredStatuses.push(new re(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):re.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):re.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:re.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return re.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:re.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new Re,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=Re.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i}static copyStatusWithNewName(e,t){let n=new tt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new re(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[re.makeTodo(),re.makeInProgress(),re.makeDone(),re.makeCancelled()].forEach(t=>{this.add(t)})}};var ir=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/ir.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*ir.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*ir.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*ir.startedCoefficient),e.priority){case"0":t+=1.5*ir.priorityCoefficient;break;case"1":t+=1*ir.priorityCoefficient;break;case"2":t+=.65*ir.priorityCoefficient;break;case"3":t+=.325*ir.priorityCoefficient;break;case"5":t-=.3*ir.priorityCoefficient;break}return t}},Ir=ir;Ir.dueCoefficient=12,Ir.scheduledCoefficient=5,Ir.startedCoefficient=-3,Ir.priorityCoefficient=6,Ir.milliSecondsPerDay=1e3*60*60*24;var E_=require("obsidian");var ta=require("obsidian");var Bx=require("obsidian"),g_=zn(m_());var Sf=class extends g_.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 Df(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Mo=new Sf,Df=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){Js=r,Rf=e,Mf=t},Co=t=>W(void 0,[t],function*({originalTask:r,newTasks:e}){if(Rf===void 0||Js===void 0||Mf===void 0){xo("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),ea.debug(`replaceTaskWithTasks entered. ${r.path}`),__({originalTask:r,newTasks:e,vault:Rf,metadataCache:Js,workspace:Mf,previousTries:0})});function xo(r){console.error(r),new ta.Notice(r,15e3)}function T_(r){console.warn(r),new ta.Notice(r,1e4)}function zx(r){ea.debug(r)}var nn=class extends Error{},Ao=class extends Error{},__=a=>W(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){ea.debug(`tryRepetitive after ${s} previous tries`);let o=()=>{if(s>10){let l=`Tasks: Could not find the correct task line to update. - -The task line not updated is: -${r.originalMarkdown} - -In this markdown file: -"${r.taskLocation.path}" - -Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). - -Recommendations: - -1. Close all panes that have the above file open, and then re-open the file. - -2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. -`;xo(l);return}let u=Math.min(Math.pow(10,s),100);ea.debug(`timeout = ${u}`),setTimeout(()=>{__({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},u)};try{let[u,l,c]=yield b_(r,t),f=[...c.slice(0,u),...e.map(h=>h.toFileLineString()),...c.slice(u+1)];yield t.modify(l,f.join(` -`))}catch(u){if(u instanceof nn)return u.message&&T_(u.message),o();if(u instanceof Ao)return o();u instanceof Error&&xo(u.message)}});function b_(r,e){return W(this,null,function*(){if(Js===void 0)throw new nn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof ta.TFile))throw new nn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!Hx.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Js.getFileCache(t);if(n==null||n===null)throw new nn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new nn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=Kx(r,a,i,zx);if(o===void 0)throw new Ao;return[o,t,a]})}function xf(r,e){return W(this,null,function*(){try{let[t,n,i]=yield b_(r,e);return[t,n]}catch(t){t instanceof nn?t.message&&T_(t.message):t instanceof Error&&xo(t.message)}})}function v_(r,e){return r{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=r.toggleWithRecurrenceInUsersOrder();Co({originalTask:r,newTasks:l})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&uA({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function rA(r,e,t,n){return W(this,null,function*(){let i={},s=new tn(e.layoutOptions),a=Nr.tasksPluginEmoji.taskSerializer;for(let o of s.shownTaskLayoutComponents){let u=a.componentToString(r,s,o);if(u){o==="description"&&(u=we.removeAsWordFromDependingOnSettings(u));let l=document.createElement("span");if(t.appendChild(l),l){let c=document.createElement("span");l.appendChild(c),yield nA(c,u,o,r,n,e.obsidianComponent),sA(o,c);let f=iA(o,r);l.classList.add(...f);let h=Af(o,r);for(let T in h)l.dataset[T]=h[T];i=ge(ge({},i),h)}}}for(let o of s.hiddenTaskLayoutComponents){let u=Af(o,r);i=ge(ge({},i),u)}if(i.taskPriority===void 0){let o=Af("priority",r);i=ge(ge({},i),o)}return i})}function nA(r,e,t,n,i,s){return W(this,null,function*(){if(t==="description"){let{debugSettings:a}=X();a.showTaskHiddenData&&(e+=`
\u{1F41B} ${n.lineNumber} . ${n.sectionStart} . ${n.sectionIndex} . '${n.originalMarkdown}'
'${n.path}' > '${n.precedingHeader}'
`),yield i(e,r,n.path,s);let o=r.querySelector("blockquote"),u=o!=null?o:r,l=u.querySelector("p");if(l!==null){for(;l.firstChild;)u.insertBefore(l.firstChild,l);l.remove()}r.querySelectorAll("p").forEach(c=>{c.hasChildNodes()||c.remove()}),r.querySelectorAll(".footnotes").forEach(c=>{c.remove()})}else r.innerHTML=e})}function iA(r,e){let t=[],n=Zx[r];switch(r){case"blockLink":break;case"description":case"priority":case"recurrenceRule":t.push(n);break;case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{e[r]&&t.push(n);break}}return t}function Af(r,e){let t={};function n(i,s){if(i){let a=aA(i);a&&(t[s]=a)}}switch(r){case"description":case"recurrenceRule":break;case"priority":{t.taskPriority=gr.priorityNameUsingNormal(e.priority).toLocaleLowerCase();break}case"createdDate":{n(e.createdDate,"taskCreated");break}case"dueDate":{n(e.dueDate,"taskDue");break}case"startDate":{n(e.startDate,"taskStart");break}case"scheduledDate":{n(e.scheduledDate,"taskScheduled");break}case"doneDate":{n(e.doneDate,"taskDone");break}}return t}function sA(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=Jx?t+=Math.abs(n).toString()+"d":t+=eA,t)}function oA(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function uA({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:i,createdDateSymbol:s,scheduledDateSymbol:a,dueDateSymbol:o,doneDateSymbol:u}=Nr.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let l=e.createDiv();l.addClasses(["tooltip","pop-up"]),r.recurrence&&l.createDiv().setText(`${n} ${r.recurrence.toText()}`),ra(l,r.createdDate,s),ra(l,r.startDate,i),ra(l,r.scheduledDate,a),ra(l,r.dueDate,o),ra(l,r.doneDate,u);let c=r.getLinkText({isFilenameUnique:t});c&&l.createDiv().setText(`\u{1F517} ${c}`),e.addEventListener("mouseleave",()=>{l.remove()})})}function ra(r,e,t){e&&r.createDiv().setText(lA({signifier:t,date:e}))}function lA({signifier:r,date:e}){return`${r} ${e.format(z.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var St=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=X();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),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 _e(Dt(ge({},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 _e(Dt(ge({},i),{scheduledDateIsInferred:!1}))),i))}};var _t=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}};var mi=class{constructor(e){this._path=e}get path(){return this._path}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]:""}};var Nt=class{},z=Nt;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp(Nt.indentationRegex.source+Nt.listMarkerRegex.source+" +"+Nt.checkboxRegex.source+Nt.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp(Nt.indentationRegex.source+Nt.listMarkerRegex.source+"? *("+Nt.checkboxRegex.source+")?"+Nt.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp(Nt.indentationRegex.source+Nt.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp(Nt.hashTags.source+"$");var _e=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,recurrence:h,blockLink:T,tags:y,originalMarkdown:E,scheduledDateIsInferred:D}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.recurrence=h,this.blockLink=T,this.originalMarkdown=E,this.scheduledDateIsInferred=D}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=_e.extractTaskComponents(e);return i===null||!we.includedIn(i.body)?null:_e.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=_e.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=Zs(),a=s.deserialize(i.body),o=!1;return St.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!we.equals(u)),new _e(Dt(ge(ge({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=Re.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toLi(e){return W(this,null,function*(){return w_(this,e)})}toString(){return Zs().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Re.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:a}=X();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new _e(Dt(ge({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=X(),o=null;a&&(o=window.moment());let u=Re.getInstance().getNextStatusOrCreate(e),l=new _e(Dt(ge(ge({},this),n),{status:u,blockLink:"",createdDate:o}));s.push(l)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=X();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return gr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Ir.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new _t(this.createdDate)}get done(){return new _t(this.doneDate)}get due(){return new _t(this.dueDate)}get scheduled(){return new _t(this.scheduledDate)}get start(){return new _t(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Pr);return new _t(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new mi(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Pr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var na=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ot=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ot(e,0,0,0,null)}fromRenamedFile(e){return new ot(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var Mn=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Oa,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>W(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=X(),t=this.vault.on("create",s=>{s instanceof gi.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof gi.TFile&&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 gi.TFile&&this.tasksMutex.runExclusive(()=>{let o=new na(()=>St.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?St.updateTaskPath(u,s.path,o.value):new _e(Dt(ge({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>W(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return W(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}_e.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` -`),o=a.length,u=new na(()=>St.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 console.log(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.linen}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Ze.isSkippingTooManyYears(e,t,s);)t=Ze.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 Fo(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var on=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return on.instance||(on.instance=new on),on.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(on.empty)}isEmpty(){return this.get()===on.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)"+Fo(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ge=on;ge.empty="";var If=5;function Ff(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(Ux(n,i,s,t,e)),a=a.concat(Wx(n,i,s,r.recurrenceSymbol)),a=a.concat(Lx(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function Lx(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=Ct.parseDate("today",!0).format(z.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Lf(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 Ux(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=Lf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length1?Ct.parseDate(mi(c),!0):null;p&&p.isValid()&&a.push({displayText:`${p.format(z.dateFormat)}`,appendText:`${l} ${p.format(z.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,_=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);_.length===0&&(_=s.slice(0,i));for(let y of _){let M=`${Ct.parseDate(y,!0).format(z.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${M})`,appendText:`${l} ${M} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function Wx(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=Lf(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length0){let y=(u=Ze.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 p=1,h=t.autoSuggestMaxItems/2,_=i.filter(y=>c&&c.length>=p&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);_.length===0&&c.trim().length===0&&(_=i.slice(0,h));for(let y of _)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Lf(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 qx(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 nb(r,e){return(t,n,i)=>qx(t.slice(0,n),e)?r(t,n,i):[]}function ib(r,e){return ge.getInstance().includedIn(r)&&$x(r,e)}function $x(r,e){if(r.length===0)return!1;let t=ye.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var oa=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTags=!1;this.shortMode=!1;this.explainQuery=!1}},un=class{constructor(e){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new oa,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.options.hideUrgency,"urgency"],[this.options.hideBacklinks,"backlinks"],[this.options.hideEditButton,"edit-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.options.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var Uf={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Pn=class{constructor(e){this.symbols=e}serialize(e){let t=new un,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t,i);return n}componentToString(e,t,n){var p;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t.options.shortMode?" "+s:` ${s} ${e.startDate.format(z.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+a:` ${a} ${e.createdDate.format(z.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+o:` ${o} ${e.scheduledDate.format(z.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+u:` ${u} ${e.doneDate.format(z.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+c:` ${c} ${e.dueDate.format(z.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(p=e.blockLink)!=null?p:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",p=null,h="",_=20,y=0;do{n=!1;let w=e.match(t.priorityRegex);w!==null&&(i=this.parsePriority(w[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let M=e.match(t.doneDateRegex);M!==null&&(u=window.moment(M[1],z.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let P=e.match(t.dueDateRegex);P!==null&&(o=window.moment(P[1],z.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let N=e.match(t.scheduledDateRegex);N!==null&&(a=window.moment(N[1],z.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let F=e.match(t.startDateRegex);F!==null&&(s=window.moment(F[1],z.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let X=e.match(t.createdDateRegex);X!==null&&(l=window.moment(X[1],z.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let V=e.match(t.recurrenceRegex);V!==null&&(c=V[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let he=e.match(z.hashTagsFromEnd);if(he!=null){e=e.replace(z.hashTagsFromEnd,"").trim(),n=!0;let j=he[0].trim();h=h.length>0?[j,h].join(" "):j}y++}while(n&&y<=_);return c.length>0&&(p=Ze.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:p,tags:ye.extractHashtags(e)}}};function Nn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Wf={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Nn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Nn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Nn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Nn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Nn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Nn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Nn(/repeat:: *([a-zA-Z0-9, !]+)/)}},Lo=class extends Pn{constructor(){super(Wf)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?` [${i.trim()}]`:i}};var Qt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Qt||{}),Je=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var Dt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Dt(new Je("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Dt(new Je("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Dt(new Je(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Dt(new Je("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Dt(new Je("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Qt[e]||"TODO"}static createUnknownStatus(e){return new Dt(new Je(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Dt.getTypeFromStatusTypeString(e[3]);return new Dt(new Je(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return Dt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},te=Dt;te.DONE=Dt.makeDone(),te.EMPTY=Dt.makeEmpty(),te.TODO=Dt.makeTodo();var Uo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Ge=class{constructor(){this.coreStatuses=[te.makeTodo().configuration,te.makeDone().configuration],this.customStatuses=[te.makeInProgress().configuration,te.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new te(e);return t.findIndex(i=>new te(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Ge.deleteAllCustomStatuses(e),new Ge().customStatuses.forEach(n=>{Ge.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Ge.addStatus(e.customStatuses,te.createFromImportedValue(i))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var sb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var _r=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return sb.forEach(t=>{e=[...e,new _r(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return _r.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of _r.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var jr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Pn(Uf),buildSuggestions:Ff(Uf,If)},dataview:{displayName:"Dataview",taskSerializer:new Lo,buildSuggestions:nb(Ff(Wf,If),[["(",")"],["[","]"]])}},jx={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Ge,features:_r.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Uo},ln=pe({},jx),Q=()=>{for(let r in _r.settingsFlags)ln.features[r]===void 0&&(ln.features[r]=_r.settingsFlags[r]);return ln.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=te.getTypeFromStatusTypeString(r.type);t[e]=new Je((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),pe({},ln)},et=r=>(ln=pe(pe({},ln),r),Q());var In=(r,e)=>(ln.generalSettings[r]=e,Q()),ab=r=>{var e;return(e=ln.features[r])!=null?e:!1};function la(){return jr[Q().taskFormat]}var De=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==te.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof te?this._registeredStatuses.push(e):this._registeredStatuses.push(new te(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):te.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):te.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:te.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return te.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:te.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new De,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=De.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i}static copyStatusWithNewName(e,t){let n=new Je(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new te(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[te.makeTodo(),te.makeInProgress(),te.makeDone(),te.makeCancelled()].forEach(t=>{this.add(t)})}};var or=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/or.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*or.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*or.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*or.startedCoefficient),e.priority){case"0":t+=1.5*or.priorityCoefficient;break;case"1":t+=1*or.priorityCoefficient;break;case"2":t+=.65*or.priorityCoefficient;break;case"3":t+=.325*or.priorityCoefficient;break;case"5":t-=.3*or.priorityCoefficient;break}return t}},Gr=or;Gr.dueCoefficient=12,Gr.scheduledCoefficient=5,Gr.startedCoefficient=-3,Gr.priorityCoefficient=6,Gr.milliSecondsPerDay=1e3*60*60*24;var Rt=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 ye(Tt(pe({},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 ye(Tt(pe({},i),{scheduledDateIsInferred:!1}))),i))}};var vt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(z.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(z.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}};var vi=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 vr=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 vr.priorityNameUsingNone(e).replace("None","Normal")}};var It=class{},z=It;z.dateFormat="YYYY-MM-DD",z.dateTimeFormat="YYYY-MM-DD HH:mm",z.indentationRegex=/^([\s\t>]*)/,z.listMarkerRegex=/([-*+]|[0-9]+\.)/,z.checkboxRegex=/\[(.)\]/u,z.afterCheckboxRegex=/ *(.*)/u,z.taskRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source+" +"+It.checkboxRegex.source+It.afterCheckboxRegex.source,"u"),z.nonTaskRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source+"? *("+It.checkboxRegex.source+")?"+It.afterCheckboxRegex.source,"u"),z.listItemRegex=new RegExp(It.indentationRegex.source+It.listMarkerRegex.source),z.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,z.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,z.hashTagsFromEnd=new RegExp(It.hashTags.source+"$");var ye=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:p,recurrence:h,blockLink:_,tags:y,originalMarkdown:w,scheduledDateIsInferred:M}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=p,this.recurrence=h,this.blockLink=_,this.originalMarkdown=w,this.scheduledDateIsInferred=M}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=ye.extractTaskComponents(e);return i===null||!ge.getInstance().includedIn(i.body)?null:ye.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=ye.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=la(),a=s.deserialize(i.body),o=!1;return Rt.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ge.getInstance().equals(u)),new ye(Tt(pe(pe({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(z.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=De.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(z.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(z.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toString(){return la().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=De.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:a}=Q();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new ye(Tt(pe({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=Q(),o=null;a&&(o=window.moment());let u=De.getInstance().getNextStatusOrCreate(e),l=new ye(Tt(pe(pe({},this),n),{status:u,blockLink:"",createdDate:o}));s.push(l)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=Q();return t?e.reverse():e}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get descriptionWithoutTags(){return this.description.replace(z.hashTags,"").trim()}get priorityName(){return vr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Gr.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new vt(this.createdDate)}get done(){return new vt(this.doneDate)}get due(){return new vt(this.dueDate)}get scheduled(){return new vt(this.scheduledDate)}get start(){return new vt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(Yr);return new vt(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new vi(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Yr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static extractHashtags(e){var t,n;return(n=(t=e.match(z.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var ca=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ot=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ot(e,0,0,0,null)}fromRenamedFile(e){return new ot(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var Fn=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Na,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>q(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof Ei.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ei.TFile&&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 Ei.TFile&&this.tasksMutex.runExclusive(()=>{let o=new ca(()=>Rt.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Rt.updateTaskPath(u,s.path,o.value):new ye(Tt(pe({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>q(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return q(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}ye.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` +`),o=a.length,u=new ca(()=>Rt.fromPath(i.path)),l=null,c=0;for(let p of t)if(p.task!==void 0){let h=p.position.start.line;if(h>=o)return console.log(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.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 $f=require("obsidian");var Y_=require("obsidian");function Fr(){}function Nf(r){return r()}function k_(){return Object.create(null)}function An(r){r.forEach(Nf)}function Po(r){return typeof r=="function"}function S_(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function D_(r){return Object.keys(r).length===0}var R_=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,sa=class{constructor(e){this.options=e,this._listeners="WeakMap"in R_?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)sa.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};sa.entries="WeakMap"in R_?new WeakMap:void 0;var M_=!1;function dA(){M_=!0}function fA(){M_=!1}function M(r,e){r.appendChild(e)}function bi(r,e,t){r.insertBefore(e,t||null)}function Cn(r){r.parentNode&&r.parentNode.removeChild(r)}function If(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function x_(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function A_(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 hA(r){return Array.from(r.childNodes)}function Ff(r,e){e=""+e,r.data!==e&&(r.data=e)}function sr(r,e){r.value=e==null?"":e}function Lf(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),_i=e}var bA=new Set;function vA(r,e){r&&r.i&&(bA.delete(r),r.i(e))}var EA=["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"],EU=new Set([...EA]);function wA(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||oa(()=>{let a=r.$$.on_mount.map(Nf).filter(Po);r.$$.on_destroy?r.$$.on_destroy.push(...a):An(a),r.$$.on_mount=[]}),s.forEach(oa)}function N_(r,e){let t=r.$$;t.fragment!==null&&(_A(t.after_update),An(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function kA(r,e){r.$$.dirty[0]===-1&&(Ti.push(r),yA(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=T.length?T[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=y)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](y),c&&kA(r,f)),h}):[],l.update(),c=!0,An(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){dA();let f=hA(e.target);l.fragment&&l.fragment.l(f),f.forEach(Cn)}else l.fragment&&l.fragment.c();e.intro&&vA(r.$$.fragment),wA(r,e.target,e.anchor,e.customElement),fA(),P_()}ia(u)}var OA;typeof HTMLElement=="function"&&(OA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Nf).filter(Po);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){An(this.$$.on_disconnect)}$destroy(){N_(this,1),this.$destroy=Fr}$on(r,e){if(!Po(e))return Fr;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!D_(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Io=class{$destroy(){N_(this,1),this.$destroy=Fr}$on(e,t){if(!Po(t))return Fr;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!D_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var qf=zn(Be());function F_(r,e,t){let n=r.slice();return n[45]=e[t],n}function L_(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function SA(r){let e,t=r[50]+"",n;return{c(){e=V("span"),n=dt(t)},m(i,s){bi(i,e,s),M(e,n)},p:Fr,d(i){i&&Cn(e)}}}function U_(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,f,h=r[49].substring(r[52],r[52]+1)+"",T,y,E=r[49].substring(r[52]+1)+"",D,A,P=r[50]&&r[50].charCodeAt(0)>=256,F,Z,Q,he,j,G=P&&SA(r);return Q=A_(r[33][0]),{c(){e=V("span"),t=V("input"),a=fe(),o=V("label"),u=V("span"),c=dt(l),f=V("span"),T=dt(h),y=V("span"),D=dt(E),A=fe(),G&&G.c(),Z=fe(),L(t,"type","radio"),L(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,L(t,"accesskey",s=r[15](r[51])),L(f,"class","accesskey"),L(o,"for",F="priority-"+r[48]),Q.p(t)},m(Pe,Fe){bi(Pe,e,Fe),M(e,t),t.checked=t.__value===r[1].priority,M(e,a),M(e,o),M(o,u),M(u,c),M(o,f),M(f,T),M(o,y),M(y,D),M(o,A),G&&G.m(o,null),M(e,Z),he||(j=bt(t,"change",r[32]),he=!0)},p(Pe,Fe){Fe[0]&32768&&s!==(s=Pe[15](Pe[51]))&&L(t,"accesskey",s),Fe[0]&3&&(t.checked=t.__value===Pe[1].priority),P&&G.p(Pe,Fe)},d(Pe){Pe&&Cn(e),G&&G.d(),Q.r(),he=!1,j()}}}function W_(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=V("option"),n=dt(t),i=dt(" ["),a=dt(s),o=dt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){bi(l,e,c),M(e,n),M(e,i),M(e,a),M(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&Ff(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&Ff(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&Cn(e)}}}function DA(r){let e,t,n,i,s,a,o,u,l,c,f,h,T,y,E,D,A,P,F,Z,Q,he,j,G,Pe,Fe,B,C,w,H,N,J,d,p,m,g,_,v,k,R,O,S,I,me,ae,ne,De,U,Ae,Ce,rt,vr,We,Le,fp,Li,ga,pp,ur,ya,hp,jn,Ta,mp,Ut,_a,gp,jr,Ui,ba,yp,Gr,va,Tp,Wi,_u,_p,Ea,bp,qi,bu,vp,wa,Ep,Gn,dn,wp,ka,kp,Yi,vu,Op,Bn=r[20],ht=[];for(let $=0;$tion',s=fe(),a=V("textarea"),u=fe(),l=V("div"),c=V("label"),f=dt("Priority"),T=fe();for(let $=0;$art',De=fe(),U=V("input"),Ce=fe(),rt=V("code"),vr=dt(r[17]),We=fe(),Le=new xn(!1),fp=fe(),Li=V("div"),ga=V("label"),ga.innerHTML=`Only - future dates:`,pp=fe(),ur=V("input"),hp=fe(),jn=V("div"),Ta=V("label"),Ta.innerHTML='Status',mp=fe(),Ut=V("select");for(let $=0;$r[39].call(Ut)),L(jn,"class","tasks-modal-section"),L(ba,"for","status"),L(Gr,"id","status"),L(Gr,"type","checkbox"),L(Gr,"class","task-list-item-checkbox tasks-modal-checkbox"),Gr.checked=va=r[1].status.isCompleted(),Gr.disabled=!0,L(jr,"class","tasks-modal-section tasks-modal-status"),dn.disabled=ka=!r[14],L(dn,"type","submit"),L(dn,"class","mod-cta"),L(Yi,"type","button"),L(Gn,"class","tasks-modal-section tasks-modal-buttons"),ar(t,"with-accesskeys",r[9]),L(e,"class","tasks-modal")},m($,pe){bi($,e,pe),M(e,t),M(t,n),M(n,i),M(n,s),M(n,a),sr(a,r[1].description),r[31](a),M(t,u),M(t,l),M(l,c),M(c,f),M(l,T);for(let ce=0;ceno ${U} date`;let rt=qf.parseDate(Ae,Ce,{forwardDate:Ce!=null});return rt!==null?window.moment(rt).format("YYYY-MM-DD"):`invalid ${U} date`}function N(U,Ae){return H(U,Ae,y.forwardOnly?new Date:void 0)}function J(U){let Ae=null,Ce=qf.parseDate(U,new Date,{forwardDate:y.forwardOnly});return Ce!==null&&(Ae=window.moment(Ce)),Ae}Uf(()=>{let{provideAccessKeys:U}=X();t(9,B=U);let Ae=we.removeAsWordFrom(s.description);(Ae!=s.description||!we.includedIn(s.description))&&(Fe=!0);let Ce="none";s.priority==="5"?Ce="lowest":s.priority==="4"?Ce="low":s.priority==="2"?Ce="medium":s.priority==="1"?Ce="high":s.priority==="0"&&(Ce="highest"),t(1,y={description:Ae,status:s.status,priority:Ce,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new _t(s.createdDate).formatAsDate(),startDate:new _t(s.startDate).formatAsDate(),scheduledDate:new _t(s.scheduledDate).formatAsDate(),dueDate:new _t(s.dueDate).formatAsDate(),doneDate:new _t(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{T.focus()},10)});let d=U=>{if(U.key&&!U.altKey&&!U.ctrlKey){let Ae=w.find(Ce=>Ce.label.charAt(0).toLowerCase()==U.key);Ae&&t(1,y.priority=Ae.value,y)}},p=()=>{a([])},m=U=>{U.key==="Enter"&&(U.preventDefault(),C&&_())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},_=()=>{let U=y.description.trim();Fe&&(U=we.prependTo(U));let Ae=J(y.startDate),Ce=J(y.scheduledDate),rt=J(y.dueDate),vr=null;y.recurrenceRule&&(vr=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:Ae,scheduledDate:Ce,dueDate:rt}));let We;switch(y.priority){case"lowest":We="5";break;case"low":We="4";break;case"medium":We="2";break;case"high":We="1";break;case"highest":We="0";break;default:We="3"}let Le=new _e(Object.assign(Object.assign({},s),{description:U,status:y.status,priority:We,recurrence:vr,startDate:Ae,scheduledDate:Ce,dueDate:rt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Le])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function R(U){No[U?"unshift":"push"](()=>{T=U,t(10,T)})}function O(){y.priority=this.__value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function S(){y.recurrenceRule=this.value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function ae(){y.startDate=this.value,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function ne(){y.forwardOnly=this.checked,t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}function De(){y.status=C_(this),t(1,y),t(6,Q),t(2,A),t(4,F),t(0,o)}return r.$$set=U=>{"task"in U&&t(26,s=U.task),"onSubmit"in U&&t(27,a=U.onSubmit),"statusOptions"in U&&t(0,o=U.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=U=>B?U:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=ci(y.dueDate),y),t(6,Q=N("due",y.dueDate)),t(7,he=!Q.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=ci(y.startDate),y),t(2,A=N("start",y.startDate)),t(3,P=!A.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=ci(y.scheduledDate),y),t(4,F=N("scheduled",y.scheduledDate)),t(5,Z=!F.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,G=!0),!y.recurrenceRule)t(12,j="not recurring");else{let U=t(28,i=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();U?t(12,j=U):(t(12,j="invalid recurrence rule"),t(8,G=!1))}}if(r.$$.dirty[0]&2){e:t(29,E=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,C=he&&G&&Z&&P&&E)}if(r.$$.dirty[0]&2){e:t(11,D=H("created",y.createdDate)),t(13,Pe=H("done",y.doneDate))}},[o,y,A,P,F,Z,Q,he,G,B,T,D,j,Pe,C,n,l,c,f,h,w,d,p,m,g,_,s,a,i,E,k,R,O,v,S,I,me,ae,ne,De]}var Yf=class extends Io{constructor(e){super(),I_(this,e,RA,DA,S_,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},q_=Yf;var sn=class extends Y_.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new q_({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Re.getInstance().registeredStatuses;return Re.getInstance().bySymbol(this.task.status.symbol)===re.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Fo=({line:r,path:e})=>{var T,y;let t=_e.parseTaskSignifiers(r,ot.fromUnknownPosition(e),St.fromPath(e));if(t!==null)return t;let{setCreatedDate:n}=X(),i=n?window.moment():null,s=r.match(z.nonTaskRegex);if(s===null)return console.error("Tasks: Cannot create task on line:",r),new _e({status:re.TODO,description:"",taskLocation:ot.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:i,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let a=s[1],o=(T=s[2])!=null?T:"-",u=(y=s[4])!=null?y:" ",l=Re.getInstance().bySymbolOrCreate(u),c=s[5],f=r.match(z.blockLinkRegex),h=f!==null?f[0]:"";return h!==""&&(c=c.replace(z.blockLinkRegex,"")),new _e({status:l,description:c,taskLocation:ot.fromUnknownPosition(e),indentation:a,listMarker:o,blockLink:h,priority:"3",createdDate:i,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var $_=(r,e,t,n)=>{var f;if(r)return t instanceof $f.MarkdownView;if(!(t instanceof $f.MarkdownView))return;let i=(f=t.file)==null?void 0:f.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Fo({line:o,path:i}),l=h=>{let T=St.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(` -`);e.setLine(a,T)};new sn({app:n,task:u,onSubmit:l}).open()};var jf=require("obsidian");var j_=(r,e,t)=>{var u;if(r)return t instanceof jf.MarkdownView;if(!(t instanceof jf.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=MA(a,n);e.setLine(s,o.text),e.setCursor(xA(i,o))},MA=(r,e)=>{let t=_e.fromLine({line:r,taskLocation:ot.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let i=n[3],a=Re.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let i=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(z.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},xA=(r,e)=>{var s;let t={line:0,ch:r.ch},n=ge(ge({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` -`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Lo=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)=>$_(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:j_})}};var Uo=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var G_=require("obsidian");var Wo=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return W(this,null,function*(){var c;let n=new G_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(f=>{var y;let h=(y=f.textContent)==null?void 0:y.split(` -`);if(h===void 0)return!1;let T=null;for(let E=0;EB_.ViewPlugin.fromClass(Gf),Gf=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 H_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=_e.fromLine({line:a.text,taskLocation:ot.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 Ii=require("obsidian");var AA=Object.prototype.toString,Ei=Array.isArray||function(e){return AA.call(e)==="[object Array]"};function Hf(r){return typeof r=="function"}function CA(r){return Ei(r)?"array":typeof r}function Bf(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function K_(r,e){return r!=null&&typeof r=="object"&&e in r}function PA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var NA=RegExp.prototype.test;function IA(r,e){return NA.call(r,e)}var FA=/\S/;function LA(r){return!IA(FA,r)}var UA={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function WA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return UA[t]})}var qA=/\s*/,YA=/\s+/,V_=/\s*=/,$A=/\s*\}/,jA=/#|\^|\/|>|\{|&|=|!/;function GA(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(G){if(typeof G=="string"&&(G=G.split(YA,2)),!Ei(G)||G.length!==2)throw new Error("Invalid tags: "+G);f=new RegExp(Bf(G[0])+"\\s*"),h=new RegExp("\\s*"+Bf(G[1])),T=new RegExp("\\s*"+Bf("}"+G[1]))}y(e||Qt.tags);for(var E=new la(r),D,A,P,F,Z,Q;!E.eos();){if(D=E.pos,P=E.scanUntil(f),P)for(var he=0,j=P.length;he"?Z=[A,P,D,E.pos,u,l,t]:Z=[A,P,D,E.pos],l++,i.push(Z),A==="#"||A==="^")n.push(Z);else if(A==="/"){if(Q=n.pop(),!Q)throw new Error('Unopened section "'+P+'" at '+D);if(Q[1]!==P)throw new Error('Unclosed section "'+Q[1]+'" at '+D)}else A==="name"||A==="{"||A==="&"?o=!0:A==="="&&y(P)}if(c(),Q=n.pop(),Q)throw new Error('Unclosed section "'+Q[1]+'" at '+E.pos);return HA(BA(i))}function BA(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function la(r){this.string=r,this.tail=r,this.pos=0}la.prototype.eos=function(){return this.tail===""};la.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};la.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 vi(r,e){this.view=r,this.cache={".":this.view},this.parent=e}vi.prototype.push=function(e){return new vi(e,this)};vi.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};vt.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(Ei(u))for(var c=0,f=u.length;c=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 Qf=require("obsidian");var kb=require("obsidian");function Br(){}function Yf(r){return r()}function ob(){return Object.create(null)}function Un(r){r.forEach(Yf)}function Wo(r){return typeof r=="function"}function lb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function cb(r){return Object.keys(r).length===0}var db=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,fa=class{constructor(e){this.options=e,this._listeners="WeakMap"in db?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)fa.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};fa.entries="WeakMap"in db?new WeakMap:void 0;var fb=!1;function Bx(){fb=!0}function Hx(){fb=!1}function R(r,e){r.appendChild(e)}function Si(r,e,t){r.insertBefore(e,t||null)}function Wn(r){r.parentNode&&r.parentNode.removeChild(r)}function jf(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function pb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function hb(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 Kx(r){return Array.from(r.childNodes)}function Gf(r,e){e=""+e,r.data!==e&&(r.data=e)}function ur(r,e){r.value=e==null?"":e}function Bf(r,e,t){for(let n=0;nr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Oi=e}var eA=new Set;function tA(r,e){r&&r.i&&(eA.delete(r),r.i(e))}var rA=["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"],X2=new Set([...rA]);function nA(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||ha(()=>{let a=r.$$.on_mount.map(Yf).filter(Wo);r.$$.on_destroy?r.$$.on_destroy.push(...a):Un(a),r.$$.on_mount=[]}),s.forEach(ha)}function yb(r,e){let t=r.$$;t.fragment!==null&&(Jx(t.after_update),Un(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function iA(r,e){r.$$.dirty[0]===-1&&(ki.push(r),Xx(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=_.length?_[0]:h;return l.ctx&&i(l.ctx[p],l.ctx[p]=y)&&(!l.skip_bound&&l.bound[p]&&l.bound[p](y),c&&iA(r,p)),h}):[],l.update(),c=!0,Un(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){Bx();let p=Kx(e.target);l.fragment&&l.fragment.l(p),p.forEach(Wn)}else l.fragment&&l.fragment.c();e.intro&&tA(r.$$.fragment),nA(r,e.target,e.anchor,e.customElement),Hx(),gb()}da(u)}var sA;typeof HTMLElement=="function"&&(sA=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Yf).filter(Wo);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Un(this.$$.on_disconnect)}$destroy(){yb(this,1),this.$destroy=Br}$on(r,e){if(!Wo(e))return Br;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!cb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var $o=class{$destroy(){yb(this,1),this.$destroy=Br}$on(e,t){if(!Wo(t))return Br;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!cb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Kf=Zi(je());function bb(r,e,t){let n=r.slice();return n[45]=e[t],n}function _b(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function aA(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=dt(t)},m(i,s){Si(i,e,s),R(e,n)},p:Br,d(i){i&&Wn(e)}}}function vb(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,p,h=r[49].substring(r[52],r[52]+1)+"",_,y,w=r[49].substring(r[52]+1)+"",M,P,N=r[50]&&r[50].charCodeAt(0)>=256,F,X,V,he,j,G=N&&aA(r);return V=hb(r[33][0]),{c(){e=K("span"),t=K("input"),a=de(),o=K("label"),u=K("span"),c=dt(l),p=K("span"),_=dt(h),y=K("span"),M=dt(w),P=de(),G&&G.c(),X=de(),L(t,"type","radio"),L(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,L(t,"accesskey",s=r[15](r[51])),L(p,"class","accesskey"),L(o,"for",F="priority-"+r[48]),V.p(t)},m(Ce,Ie){Si(Ce,e,Ie),R(e,t),t.checked=t.__value===r[1].priority,R(e,a),R(e,o),R(o,u),R(u,c),R(o,p),R(p,_),R(o,y),R(y,M),R(o,P),G&&G.m(o,null),R(e,X),he||(j=Et(t,"change",r[32]),he=!0)},p(Ce,Ie){Ie[0]&32768&&s!==(s=Ce[15](Ce[51]))&&L(t,"accesskey",s),Ie[0]&3&&(t.checked=t.__value===Ce[1].priority),N&&G.p(Ce,Ie)},d(Ce){Ce&&Wn(e),G&&G.d(),V.r(),he=!1,j()}}}function Eb(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=K("option"),n=dt(t),i=dt(" ["),a=dt(s),o=dt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){Si(l,e,c),R(e,n),R(e,i),R(e,a),R(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&Gf(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&Gf(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&Wn(e)}}}function oA(r){let e,t,n,i,s,a,o,u,l,c,p,h,_,y,w,M,P,N,F,X,V,he,j,G,Ce,Ie,B,A,E,H,C,Z,d,f,m,g,T,v,k,D,O,S,I,me,se,re,Se,U,Me,Ae,tt,Rr,Ue,Fe,kp,Bi,Oa,Op,fr,Sa,Sp,Vn,Da,Dp,qt,Ra,Rp,Vr,Hi,Ma,Mp,Qr,xa,xp,zi,Au,Ap,Aa,Cp,Ki,Cu,Pp,Ca,Np,Qn,yn,Ip,Pa,Fp,Vi,Pu,Lp,Xn=r[20],gt=[];for(let Y=0;Ytion',s=de(),a=K("textarea"),u=de(),l=K("div"),c=K("label"),p=dt("Priority"),_=de();for(let Y=0;Yart',Se=de(),U=K("input"),Ae=de(),tt=K("code"),Rr=dt(r[17]),Ue=de(),Fe=new Ln(!1),kp=de(),Bi=K("div"),Oa=K("label"),Oa.innerHTML=`Only + future dates:`,Op=de(),fr=K("input"),Sp=de(),Vn=K("div"),Da=K("label"),Da.innerHTML='Status',Dp=de(),qt=K("select");for(let Y=0;Yr[39].call(qt)),L(Vn,"class","tasks-modal-section"),L(Ma,"for","status"),L(Qr,"id","status"),L(Qr,"type","checkbox"),L(Qr,"class","task-list-item-checkbox tasks-modal-checkbox"),Qr.checked=xa=r[1].status.isCompleted(),Qr.disabled=!0,L(Vr,"class","tasks-modal-section tasks-modal-status"),yn.disabled=Pa=!r[14],L(yn,"type","submit"),L(yn,"class","mod-cta"),L(Vi,"type","button"),L(Qn,"class","tasks-modal-section tasks-modal-buttons"),lr(t,"with-accesskeys",r[9]),L(e,"class","tasks-modal")},m(Y,fe){Si(Y,e,fe),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),ur(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,p),R(l,_);for(let le=0;leno ${U} date`;let tt=Kf.parseDate(Me,Ae,{forwardDate:Ae!=null});return tt!==null?window.moment(tt).format("YYYY-MM-DD"):`invalid ${U} date`}function C(U,Me){return H(U,Me,y.forwardOnly?new Date:void 0)}function Z(U){let Me=null,Ae=Kf.parseDate(U,new Date,{forwardDate:y.forwardOnly});return Ae!==null&&(Me=window.moment(Ae)),Me}Hf(()=>{let{provideAccessKeys:U}=Q();t(9,B=U);let Me=ge.getInstance().removeAsWordFrom(s.description);(Me!=s.description||!ge.getInstance().includedIn(s.description))&&(Ie=!0);let Ae="none";s.priority==="5"?Ae="lowest":s.priority==="4"?Ae="low":s.priority==="2"?Ae="medium":s.priority==="1"?Ae="high":s.priority==="0"&&(Ae="highest"),t(1,y={description:Me,status:s.status,priority:Ae,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new vt(s.createdDate).formatAsDate(),startDate:new vt(s.startDate).formatAsDate(),scheduledDate:new vt(s.scheduledDate).formatAsDate(),dueDate:new vt(s.dueDate).formatAsDate(),doneDate:new vt(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{_.focus()},10)});let d=U=>{if(U.key&&!U.altKey&&!U.ctrlKey){let Me=E.find(Ae=>Ae.label.charAt(0).toLowerCase()==U.key);Me&&t(1,y.priority=Me.value,y)}},f=()=>{a([])},m=U=>{U.key==="Enter"&&(U.preventDefault(),A&&T())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},T=()=>{let U=y.description.trim();Ie&&(U=ge.getInstance().prependTo(U));let Me=Z(y.startDate),Ae=Z(y.scheduledDate),tt=Z(y.dueDate),Rr=null;y.recurrenceRule&&(Rr=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:Me,scheduledDate:Ae,dueDate:tt}));let Ue;switch(y.priority){case"lowest":Ue="5";break;case"low":Ue="4";break;case"medium":Ue="2";break;case"high":Ue="1";break;case"highest":Ue="0";break;default:Ue="3"}let Fe=new ye(Object.assign(Object.assign({},s),{description:U,status:y.status,priority:Ue,recurrence:Rr,startDate:Me,scheduledDate:Ae,dueDate:tt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Fe])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function D(U){qo[U?"unshift":"push"](()=>{_=U,t(10,_)})}function O(){y.priority=this.__value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function S(){y.recurrenceRule=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function re(){y.forwardOnly=this.checked,t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}function Se(){y.status=mb(this),t(1,y),t(6,V),t(2,P),t(4,F),t(0,o)}return r.$$set=U=>{"task"in U&&t(26,s=U.task),"onSubmit"in U&&t(27,a=U.onSubmit),"statusOptions"in U&&t(0,o=U.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=U=>B?U:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=mi(y.dueDate),y),t(6,V=C("due",y.dueDate)),t(7,he=!V.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=mi(y.startDate),y),t(2,P=C("start",y.startDate)),t(3,N=!P.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=mi(y.scheduledDate),y),t(4,F=C("scheduled",y.scheduledDate)),t(5,X=!F.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,G=!0),!y.recurrenceRule)t(12,j="not recurring");else{let U=t(28,i=Ze.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();U?t(12,j=U):(t(12,j="invalid recurrence rule"),t(8,G=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,A=he&&G&&X&&N&&w)}if(r.$$.dirty[0]&2){e:t(11,M=H("created",y.createdDate)),t(13,Ce=H("done",y.doneDate))}},[o,y,P,N,F,X,V,he,G,B,_,M,j,Ce,A,n,l,c,p,h,E,d,f,m,g,T,s,a,i,w,k,D,O,v,S,I,me,se,re,Se]}var Vf=class extends $o{constructor(e){super(),Tb(this,e,uA,oA,lb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},wb=Vf;var cn=class extends kb.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new wb({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===te.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function lA(){let{setCreatedDate:r}=Q();return r?window.moment():null}function cA(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ge.getInstance().isEmpty(),i=!ge.getInstance().includedIn(r.description);return t||n&&i}var Yo=({line:r,path:e})=>{var h,_;let t=ye.parseTaskSignifiers(r,ot.fromUnknownPosition(e),Rt.fromPath(e)),n=lA();if(t!==null)return cA(t)?new ye(Tt(pe({},t),{createdDate:n})):t;let i=r.match(z.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ye({status:te.TODO,description:"",taskLocation:ot.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(h=i[2])!=null?h:"-",o=(_=i[4])!=null?_:" ",u=De.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(z.blockLinkRegex),p=c!==null?c[0]:"";return p!==""&&(l=l.replace(z.blockLinkRegex,"")),new ye({status:u,description:l,taskLocation:ot.fromUnknownPosition(e),indentation:s,listMarker:a,blockLink:p,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var Ob=(r,e,t,n)=>{var p;if(r)return t instanceof Qf.MarkdownView;if(!(t instanceof Qf.MarkdownView))return;let i=(p=t.file)==null?void 0:p.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Yo({line:o,path:i}),l=h=>{let _=Rt.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(` +`);e.setLine(a,_)};new cn({app:n,task:u,onSubmit:l}).open()};var Xf=require("obsidian");var Sb=(r,e,t)=>{var u;if(r)return t instanceof Xf.MarkdownView;if(!(t instanceof Xf.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=dA(a,n);e.setLine(s,o.text),e.setCursor(fA(i,o))},dA=(r,e)=>{let t=ye.fromLine({line:r,taskLocation:ot.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(z.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(z.taskRegex,`$1- [${a}] $4`)}}else if(z.listItemRegex.test(r)){let i=r.replace(z.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(z.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},fA=(r,e)=>{var s;let t={line:0,ch:r.ch},n=pe(pe({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` +`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var 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)=>Ob(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Sb})}};var pA=Object.prototype.toString,Ri=Array.isArray||function(e){return pA.call(e)==="[object Array]"};function Jf(r){return typeof r=="function"}function hA(r){return Ri(r)?"array":typeof r}function Zf(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Db(r,e){return r!=null&&typeof r=="object"&&e in r}function mA(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var gA=RegExp.prototype.test;function yA(r,e){return gA.call(r,e)}var TA=/\S/;function bA(r){return!yA(TA,r)}var _A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function vA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return _A[t]})}var EA=/\s*/,wA=/\s+/,Rb=/\s*=/,kA=/\s*\}/,OA=/#|\^|\/|>|\{|&|=|!/;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 p,h,_;function y(G){if(typeof G=="string"&&(G=G.split(wA,2)),!Ri(G)||G.length!==2)throw new Error("Invalid tags: "+G);p=new RegExp(Zf(G[0])+"\\s*"),h=new RegExp("\\s*"+Zf(G[1])),_=new RegExp("\\s*"+Zf("}"+G[1]))}y(e||Xt.tags);for(var w=new ga(r),M,P,N,F,X,V;!w.eos();){if(M=w.pos,N=w.scanUntil(p),N)for(var he=0,j=N.length;he"?X=[P,N,M,w.pos,u,l,t]:X=[P,N,M,w.pos],l++,i.push(X),P==="#"||P==="^")n.push(X);else if(P==="/"){if(V=n.pop(),!V)throw new Error('Unopened section "'+N+'" at '+M);if(V[1]!==N)throw new Error('Unclosed section "'+V[1]+'" at '+M)}else P==="name"||P==="{"||P==="&"?o=!0:P==="="&&y(N)}if(c(),V=n.pop(),V)throw new Error('Unclosed section "'+V[1]+'" at '+w.pos);return RA(DA(i))}function DA(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function ga(r){this.string=r,this.tail=r,this.pos=0}ga.prototype.eos=function(){return this.tail===""};ga.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};ga.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 Di(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Di.prototype.push=function(e){return new Di(e,this)};Di.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};wt.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(Ri(u))for(var c=0,p=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` -`)};vt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=Hf(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)}}};vt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};vt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Qt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Qt.escape?String(s):i(s)};vt.prototype.rawValue=function(e){return e[1]};vt.prototype.getConfigTags=function(e){return Ei(e)?e:e&&typeof e=="object"?e.tags:void 0};vt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ei(e))return e.escape};var Qt={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){ua.templateCache=r},get templateCache(){return ua.templateCache}},ua=new vt;Qt.clearCache=function(){return ua.clearCache()};Qt.parse=function(e,t){return ua.parse(e,t)};Qt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+CA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return ua.render(e,t,n,i)};Qt.escape=WA;Qt.Scanner=la;Qt.Context=vi;Qt.Writer=vt;var zf=Qt;var eb=zn(J_());function tb(r,e){zf.escape=function(t){return t};try{return zf.render(r,(0,eb.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. +`)};wt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=Jf(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 p=this.parse(c,s);return this.renderTokens(p,t,n,c,i)}}};wt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};wt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Xt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Xt.escape?String(s):i(s)};wt.prototype.rawValue=function(e){return e[1]};wt.prototype.getConfigTags=function(e){return Ri(e)?e:e&&typeof e=="object"?e.tags:void 0};wt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ri(e))return e.escape};var Xt={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){ma.templateCache=r},get templateCache(){return ma.templateCache}},ma=new wt;Xt.clearCache=function(){return ma.clearCache()};Xt.parse=function(e,t){return ma.parse(e,t)};Xt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+hA(e)+'" was given as the first argument for mustache#render(template, view, partials)');return ma.render(e,t,n,i)};Xt.escape=vA;Xt.Scanner=ga;Xt.Context=Di;Xt.Writer=wt;var ep=Xt;var Pb=Zi(Cb());function Nb(r,e){ep.escape=function(t){return t};try{return ep.render(r,(0,Pb.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. The error message was: ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` The problem is in: - ${r}`,Error(n)}}function rb(r){return{query:{file:new mi(r)}}}function Pn(r,e){let t=`Error: ${r}. + ${r}`,Error(n)}}function Ib(r){return{query:{file:new vi(r)}}}function qn(r,e){let t=`Error: ${r}. The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Lr=class{constructor(e,t,n){this.property=e,this.comparator=Lr.maybeReverse(n,t)}static maybeReverse(e,t){return e?Lr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var an=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};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 So(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)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Lr(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)?$`)}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new an(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Oe=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 Oe("None of",e,"NOT")}static booleanXor(e){return new Oe("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;ie(t,n)*-1}};var dn=class{constructor(e,t,n){this.property=e,this.grouper=t,this.reverse=n}};var we=class{canCreateFilterForLine(e){return we.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 Fo(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=we.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)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Hr(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=we.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)?$`)}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new dn(this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var ke=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 ke("None of",e,"NOT")}static booleanXor(e){return new ke("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 ${t.asString(" ")} -`}};var yr=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 yr(e);return n._queryComponent=t,n}static fromError(e,t){let n=new yr(e);return n._error=t,n}};var ee=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 ee(yr.fromObject(e.instruction,e))}static fromError(e,t){return new ee(yr.fromError(e,t))}};var qo=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){return e===this._instruction?ee.fromFilter(new ft(e,this._filter,new Oe(e))):ee.fromError(e,`do not understand filter: ${e}`)}};var Tr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new qo(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 ee.fromError(e,`do not understand filter: ${e}`)}};var on=class extends ke{constructor(){super(...arguments);this._filters=new Tr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var _r=class extends on{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=_r.oldStatusName(e),i=_r.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[_r.oldStatusName(e)]}};var pt=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Tr,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){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=ke.getMatch(this.filterRegExp(),t);if(i===null)return ee.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let s=i[1],a=i[2],o=i[3],u=At.parseDateRange(o);if(!u.isValid()){let f=At.parseDate(s);f.isValid()&&(u=new yt(f,f))}if(!u.isValid())return ee.fromError(t,"do not understand "+this.fieldName()+" date");let l=this.buildFilterFunction(a,u),c=pt.buildExplanation(this.fieldNameForExplanation(),a,this.filterResultIfFieldMissing(),u);return ee.fromFilter(new ft(t,l,c))}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)? ?(.*))`)}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 Oe(`${s.start.format(o)} and`),new Oe(`${s.end.format(o)} inclusive`)];return i&&f.push(new Oe(`OR no ${t} date`)),new Oe(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 Oe(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Pr(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")]}}};var wi=class extends pt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Vf=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t!==null){let n=t[5],i=null;switch(n){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return ee.fromError(e,"do not understand priority");let s=e,a;switch(t[3]){case"above":a=o=>o.priority.localeCompare(i)<0;break;case"below":a=o=>o.priority.localeCompare(i)>0;break;case"not":a=o=>o.priority!==i;break;default:a=o=>o.priority===i,s=`${this.fieldName()} is ${n}`}return ee.fromFilter(new ft(e,a,new Oe(s)))}else return ee.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Vf.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t=gr.priorityNameUsingNormal(e.priority);return[`%%${e.priority}%%${t} priority`]}}},Nn=Vf;Nn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var ki=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Oi=class extends ki{constructor(t){super();this.stringToFind=t}matches(t){return Oi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Oe(t)}};var un=class extends ki{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 un(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 +`}};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 Go=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){return e===this._instruction?J.fromFilter(new ft(e,this._filter,new ke(e))):J.fromError(e,`do not understand filter: ${e}`)}};var wr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Go(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 fn=class extends we{constructor(){super(...arguments);this._filters=new wr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var kr=class extends fn{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=kr.oldStatusName(e),i=kr.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[kr.oldStatusName(e)]}};var pt=class extends we{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new wr,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){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=we.getMatch(this.filterRegExp(),t);if(i===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let s=i[1],a=i[2],o=i[3],u=Ct.parseDateRange(o);if(!u.isValid()){let p=Ct.parseDate(s);p.isValid()&&(u=new _t(p,p))}if(!u.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let l=this.buildFilterFunction(a,u),c=pt.buildExplanation(this.fieldNameForExplanation(),a,this.filterResultIfFieldMissing(),u);return J.fromFilter(new ft(t,l,c))}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)? ?(.*))`)}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:`,p=[new ke(`${s.start.format(o)} and`),new ke(`${s.end.format(o)} inclusive`)];return i&&p.push(new ke(`OR no ${t} date`)),new ke(c,p)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new ke(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Yr(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")]}}};var Mi=class extends pt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var rp=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t!==null){let n=t[5],i=null;switch(n){case"lowest":i="5";break;case"low":i="4";break;case"none":i="3";break;case"medium":i="2";break;case"high":i="1";break;case"highest":i="0";break}if(i===null)return J.fromError(e,"do not understand priority");let s=e,a;switch(t[3]){case"above":a=o=>o.priority.localeCompare(i)<0;break;case"below":a=o=>o.priority.localeCompare(i)>0;break;case"not":a=o=>o.priority!==i;break;default:a=o=>o.priority===i,s=`${this.fieldName()} is ${n}`}return J.fromFilter(new ft(e,a,new ke(s)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return rp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t=vr.priorityNameUsingNormal(e.priority);return[`%%${e.priority}%%${t} priority`]}}},$n=rp;$n.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/;var xi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Ai=class extends xi{constructor(t){super();this.stringToFind=t}matches(t){return Ai.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new ke(t)}};var pn=class extends xi{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 pn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions Regular expressions must look like this: /pattern/ @@ -217,55 +193,79 @@ to find them literally, you must add a \ before them: CAUTION! Regular expression (or 'regex') searching is a powerful but advanced feature that requires thorough knowledge in order to use successfully, and not miss intended search results. -`}explanation(t){let i=zA(t,"using regex: ",this.regexAsString());return new Oe(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 zA(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 xe=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return ee.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Oi(s);else if(i.includes("regex")){try{a=un.validateAndConstruct(s)}catch(l){let c=Pn("Parsing regular expression",l)+` +`}explanation(t){let i=MA(t,"using regex: ",this.regexAsString());return new ke(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 MA(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 xe=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Ai(s);else if(i.includes("regex")){try{a=pn.validateAndConstruct(s)}catch(l){let c=qn("Parsing regular expression",l)+` -${un.helpMessage()}`;return ee.fromError(e,c)}if(a===null)return ee.fromError(e,`Invalid instruction: '${e}' +${pn.helpMessage()}`;return J.fromError(e,c)}if(a===null)return J.fromError(e,`Invalid instruction: '${e}' -${un.helpMessage()}`)}if(a===null)return ee.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new ft(e,this.getFilter(a,o),a.explanation(e));return ee.fromFilter(u)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}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 Si=class extends xe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Di=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return ee.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)}};var Ri=class{static by(e,t){let n=[new Di().comparator(),new _r().comparator(),new wi().comparator(),new Nn().comparator(),new Si().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(Ri.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 Yo=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var $o=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;st.set(o,a)),e.pop();return t}};var Go=class extends jo{},Bo=class{constructor(e,t){this.root=new Go(t),this.buildGroupingTree(e)}buildGroupingTree(e){let t=[this.root];for(let n of e){let i=[];for(let s of t)for(let a of s.values){let o=n.grouper(a);o.length===0&&o.push("");for(let u of o){let l=s.children.get(u);l===void 0&&(l=new Go([]),s.children.set(u,l),i.push(l)),l.values.push(a)}}t=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ho=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()+` +${pn.helpMessage()}`)}if(a===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new ft(e,this.getFilter(a,o),a.explanation(e));return J.fromFilter(u)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}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 Ci=class extends xe{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Pi=class extends we{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)}};var Ni=class{static by(e,t){let n=[new Pi().comparator(),new kr().comparator(),new Mi().comparator(),new $n().comparator(),new Ci().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(Ni.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 Bo=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var Ho=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;st.set(o,a)),e.pop();return t}};var Ko=class extends zo{},Vo=class{constructor(e,t){this.root=new Ko(t),this.buildGroupingTree(e)}buildGroupingTree(e){let t=[this.root];for(let n of e){let i=[];for(let s of t)for(let a of s.values){let o=n.grouper(a);o.length===0&&o.push("");for(let u of o){let l=s.children.get(u);l===void 0&&(l=new Ko([]),s.children.set(u,l),i.push(l)),l.values.push(a)}}t=i}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Qo=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` `;return e}toString(){let e=` `;e+=`Group names: [${this.groups}] `;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName} -`;return e+=this.tasksAsStringOfLines(),e}};var Mi=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Bo(e,t).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): +`;return e+=this.tasksAsStringOfLines(),e}};var Ii=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let i=new Vo(e,t).generateTaskTreeStorage();this.addTaskGroups(i),this.sortTaskGroups(),this.setGroupsHeadings(i)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any): `;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i} `}for(let n of this.groups)e+=n.toString(),e+=` --- `;return e+=` ${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let i=new Ho(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var In=class extends xe{fieldName(){return"description"}value(e){return we.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=In.cleanDescription(e.description),i=In.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=we.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 zo=class extends pt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Ko=class extends pt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Vo=class extends on{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 ca=class extends yr{};function da(r){return[["task",r]]}function Qf(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?ca.fromObject(e,i):ca.fromError(e,"Error parsing group function")}catch(n){return ca.fromError(e,Pn(`Failed parsing expression "${e}"`,n))}}function Xf(r,e){let t=e.map(([n,i])=>i);return r(...t)}function Zf(r,e,t){try{return Xf(r,e)}catch(n){return Pn(`Failed calculating expression "${t}"`,n)}}function nb(r,e){let t=da(r),n=Qf(t,e);return n.error?n.error:Zf(n.queryComponent,t,e)}var Qo=class{constructor(e){this.line=e,this.functionOrError=Qf(da(null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Xf(this.functionOrError.queryComponent,da(e))}evaluateOrCatch(e){return this.isValid()?Zf(this.functionOrError.queryComponent,da(e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var Xo=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return ee.fromError(e,"Unable to parse line");let n=t[1],i=new Qo(n);return i.isValid()?ee.fromFilter(new ft(e,KA(i),new Oe(e))):ee.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`)}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 an("function",QA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`)}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function KA(r){return e=>VA(r,e)}function VA(r,e){let t=r.evaluate(e);if(typeof t=="boolean")return t;throw Error(`filtering function must return true or false. This returned "${t}".`)}function QA(r){return e=>XA(e,r)}function XA(r,e){try{let t=nb(r,e);return Array.isArray(t)?t.map(i=>i.toString()):t===null?[]:[t.toString()]}catch(t){let n=`Error: Failed calculating expression "${e}". The error message was: `;return t instanceof Error?[n+t.message]:[n+"Unknown error"]}}var Zo=class extends xe{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 Jo=class extends pt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var eu=class extends pt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var tu=class extends pt{constructor(){let e=new Tr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var ru=class extends on{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var nu=class extends xe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new an(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`)}};var Fn=class extends nu{constructor(){super();this.filterInstructions=new Tr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Fn.makeCompareByTagComparator(s);return new Lr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Fn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var gb=zn(mb());var ou=class extends ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return ee.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,gb.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=uu(u);if(l===null)return ee.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return ee.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return ee.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return ee.fromError(t,`unknown boolean operator '${o.value}'`)}let s=o=>this.filterTaskWithParsedQuery(o,i),a=this.constructExplanation(i);return ee.fromFilter(new ft(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return ee.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(Oe.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(Oe.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(Oe.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(Oe.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var lu=class extends xe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var cu=class extends xe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var cn=class extends ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Vt[s.toUpperCase()];if(!a)return this.helpMessage(e);let o;switch(i){case"is":o=u=>u.status.type===a;break;case"is not":o=u=>u.status.type!==a;break;default:return this.helpMessage(e)}return ee.fromFilter(new ft(e,o,new Oe(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Vt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. +`,e}addTaskGroups(e){for(let[t,n]of e){let i=new Qo(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Yn=class extends xe{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Yn.cleanDescription(e.description),i=Yn.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 Xo=class extends pt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Zo=class extends pt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Jo=class extends fn{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 ya=class extends Er{};function Ta(r){return[["task",r]]}function np(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?ya.fromObject(e,i):ya.fromError(e,"Error parsing group function")}catch(n){return ya.fromError(e,qn(`Failed parsing expression "${e}"`,n))}}function ip(r,e){let t=e.map(([n,i])=>i);return r(...t)}function sp(r,e,t){try{return ip(r,e)}catch(n){return qn(`Failed calculating expression "${t}"`,n)}}function Fb(r,e){let t=Ta(r),n=np(t,e);return n.error?n.error:sp(n.queryComponent,t,e)}var eu=class{constructor(e){this.line=e,this.functionOrError=np(Ta(null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return ip(this.functionOrError.queryComponent,Ta(e))}evaluateOrCatch(e){return this.isValid()?sp(this.functionOrError.queryComponent,Ta(e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var tu=class extends we{createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],i=new eu(n);return i.isValid()?J.fromFilter(new ft(e,xA(i),new ke(e))):J.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`)}supportsGrouping(){return!0}createGrouperFromLine(e){let t=we.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new dn("function",CA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`)}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function xA(r){return e=>AA(r,e)}function AA(r,e){let t=r.evaluate(e);if(typeof t=="boolean")return t;throw Error(`filtering function must return true or false. This returned "${t}".`)}function CA(r){return e=>PA(e,r)}function PA(r,e){try{let t=Fb(r,e);return Array.isArray(t)?t.map(i=>i.toString()):t===null?[]:[t.toString()]}catch(t){let n=`Error: Failed calculating expression "${e}". The error message was: `;return t instanceof Error?[n+t.message]:[n+"Unknown error"]}}var ru=class extends xe{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 nu=class extends pt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var iu=class extends pt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var su=class extends pt{constructor(){let e=new wr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var au=class extends fn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var ou=class extends xe{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new dn(this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`)}};var jn=class extends ou{constructor(){super();this.filterInstructions=new wr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=jn.makeCompareByTagComparator(s);return new Hr(this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return jn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var Qb=Zi(Vb());var fu=class extends we{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,Qb.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=pu(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let s=o=>this.filterTaskWithParsedQuery(o,i),a=this.constructExplanation(i);return J.fromFilter(new ft(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(ke.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(ke.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(ke.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(ke.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var hu=class extends xe{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var mu=class extends xe{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var hn=class extends we{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return we.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=we.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,i,s]=t,a=Qt[s.toUpperCase()];if(!a)return this.helpMessage(e);let o;switch(i){case"is":o=u=>u.status.type===a;break;case"is not":o=u=>u.status.type!==a;break;default:return this.helpMessage(e)}return J.fromFilter(new ft(e,o,new ke(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Qt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'. Allowed options: 'is' and 'is not' (without quotes). Allowed values: ${t} Note: values are case-insensitive, so 'in_progress' works too, for example. - Example: ${this.fieldNameSingular()} is not NON_TASK`;return ee.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=cn.groupName(e),i=cn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[cn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e.status.type}`}};var du=class extends xe{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 fu=class extends xe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var pu=class extends xe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var hu=class extends xe{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return ee.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=xe.escapeMarkdownCharacters(t);return e.precedingHeader&&e.precedingHeader!==t&&(n+=" > "+e.precedingHeader),[n]}}};var cp=[()=>new cu,()=>new cn,()=>new _r,()=>new ru,()=>new Nn,()=>new tu,()=>new zo,()=>new eu,()=>new Jo,()=>new wi,()=>new Ko,()=>new Si,()=>new fu,()=>new pu,()=>new hu,()=>new In,()=>new Fn,()=>new Zo,()=>new Vo,()=>new lu,()=>new Di,()=>new du,()=>new Xo,()=>new ou];function uu(r){for(let e of cp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function yb(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of cp){let i=t().createSorterFromLine(r);if(i)return i}return null}function Tb(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of cp){let i=t().createGrouperFromLine(r);if(i)return i}return null}var qn=class{constructor(e){this._searchErrorMessage=void 0;this.taskGroups=e}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}get groups(){return this.taskGroups.groups}static fromError(e){let t=new qn(new Mi([],[]));return t._searchErrorMessage=e,t}};var $r=class{constructor({source:e},t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new Qs;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|urgency|tags)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.ignoreGlobalQueryRegexp=/^ignore global query/;this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,this.filePath=t,e.split(` -`).map(n=>n.trim()).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case i==="":break;case this.shortModeRegexp.test(i):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(i):this._layoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit({line:i});break;case this.parseSortBy({line:i}):break;case this.parseGroupBy({line:i}):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions({line:i});break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}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 "}}" + 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=hn.groupName(e),i=hn.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[hn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e.status.type}`}};var gu=class extends xe{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 yu=class extends xe{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var Tu=class extends xe{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[xe.escapeMarkdownCharacters(this.value(e))]}};var bu=class extends xe{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 mp=[()=>new mu,()=>new hn,()=>new kr,()=>new au,()=>new $n,()=>new su,()=>new Xo,()=>new iu,()=>new nu,()=>new Mi,()=>new Zo,()=>new Ci,()=>new yu,()=>new Tu,()=>new bu,()=>new Yn,()=>new jn,()=>new ru,()=>new Jo,()=>new hu,()=>new Pi,()=>new gu,()=>new tu,()=>new fu];function pu(r){for(let e of mp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Xb(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of mp){let i=t().createSorterFromLine(r);if(i)return i}return null}function Zb(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of mp){let i=t().createGrouperFromLine(r);if(i)return i}return null}function Jb(r){return`task${r!==1?"s":""}`}var Hn=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} ${Jb(e)}`:`${e} of ${t} ${Jb(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new Hn(new Ii([],[]),0);return t._searchErrorMessage=e,t}};var Kr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new oa;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|urgency|tags)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.ignoreGlobalQueryRegexp=/^ignore global query/;this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,this.filePath=t,e.split(` +`).map(n=>n.trim()).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case i==="":break;case this.shortModeRegexp.test(i):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(i):this._layoutOptions.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)}})}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" but no file path has been supplied, so cannot expand placeholder values. The query is: -${e}`,e;let n=e;if(t){let i=rb(t);try{n=tb(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 $r({source:`${this.source} -${e.source}`},this.filePath)}explainQuery(){let e="";if(this.error!==void 0)return e+=`Query has an error: +${e}`,e;let n=e;if(t){let i=Ib(t);try{n=Nb(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 Kr(`${this.source} +${e.source}`,this.filePath)}explainQuery(){let e="";if(this.error!==void 0)return e+=`Query has an error: `,e+=this.error+` `,e;let t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let i=0;i0&&(e+=` -`),e+=this.filters[i].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=X();return n.ignoreSortInstructions&&(e+=` +`),e+=this.filters[i].explainFilterIndented("");e+=this.explainQueryLimits();let{debugSettings:n}=Q();return n.ignoreSortInstructions&&(e+=` NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}explainQueryLimits(){let e="";function t(n){let i=` At most ${n} task`;return n!==1&&(i+="s"),i}return this._limit!==void 0&&(e+=t(this._limit),e+=`. `),this._taskGroupLimit!==void 0&&(e+=t(this._taskGroupLimit),e+=` per group (if any "group by" options are supplied). `),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e} -Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){try{this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=X(),i=(t.ignoreSortInstructions?e:Ri.by(this.sorting,e)).slice(0,this.limit),s=new Mi(this.grouping,i);return this._taskGroupLimit!==void 0&&s.applyTaskLimit(this._taskGroupLimit),new qn(s)}catch(t){let n="Search failed";return qn.fromError(Pn(n,t))}}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=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._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.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=uu(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit({line: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({line:e}){let t=yb(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=Tb(e);return t?(this._grouping.push(t),!0):!1}};function _b(r,e=void 0){let t="";we.isEmpty()||(t+=`Only tasks containing the global filter '${we.get()}'. +Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){try{this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=Q(),n=t.ignoreSortInstructions?e:Ni.by(this.sorting,e),i=n.slice(0,this.limit),s=new Ii(this.grouping,i);return this._taskGroupLimit!==void 0&&s.applyTaskLimit(this._taskGroupLimit),new Hn(s,n.length)}catch(t){let n="Search failed";return Hn.fromError(qn(n,t))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=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._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.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=pu(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=Xb(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=Zb(e);return t?(this._grouping.push(t),!0):!1}};var mn=class{constructor(e=mn.empty){this._source=e}static getInstance(){return mn.instance||(mn.instance=new mn),mn.instance}set(e){this._source=e}query(e=void 0){return new Kr(this._source,e)}hasInstructions(){return this._source.trim()!==mn.empty}},Jt=mn;Jt.empty="";var _u=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Ea=require("obsidian");var aC=require("obsidian"),n_=Zi(r_());var gp=class extends n_.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 yp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},vu=new gp,yp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){_a=r,Tp=e,bp=t},ku=t=>q(void 0,[t],function*({originalTask:r,newTasks:e}){if(Tp===void 0||_a===void 0||bp===void 0){Eu("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),va.debug(`replaceTaskWithTasks entered. ${r.path}`),a_({originalTask:r,newTasks:e,vault:Tp,metadataCache:_a,workspace:bp,previousTries:0})});function Eu(r){console.error(r),new Ea.Notice(r,15e3)}function s_(r){console.warn(r),new Ea.Notice(r,1e4)}function uC(r){va.debug(r)}var gn=class extends Error{},wu=class extends Error{},a_=a=>q(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){va.debug(`tryRepetitive after ${s} previous tries`);let o=()=>{if(s>10){let l=`Tasks: Could not find the correct task line to update. + +The task line not updated is: +${r.originalMarkdown} + +In this markdown file: +"${r.taskLocation.path}" + +Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). + +Recommendations: + +1. Close all panes that have the above file open, and then re-open the file. + +2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. +`;Eu(l);return}let u=Math.min(Math.pow(10,s),100);va.debug(`timeout = ${u}`),setTimeout(()=>{a_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},u)};try{let[u,l,c]=yield o_(r,t),p=[...c.slice(0,u),...e.map(h=>h.toFileLineString()),...c.slice(u+1)];yield t.modify(l,p.join(` +`))}catch(u){if(u instanceof gn)return u.message&&s_(u.message),o();if(u instanceof wu)return o();u instanceof Error&&Eu(u.message)}});function o_(r,e){return q(this,null,function*(){if(_a===void 0)throw new gn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ea.TFile))throw new gn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!oC.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=_a.getFileCache(t);if(n==null||n===null)throw new gn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new gn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` +`),o=lC(r,a,i,uC);if(o===void 0)throw new wu;return[o,t,a]})}function _p(r,e){return q(this,null,function*(){try{let[t,n,i]=yield o_(r,e);return[t,n]}catch(t){t instanceof gn?t.message&&s_(t.message):t instanceof Error&&Eu(t.message)}})}function u_(r,e){return r{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=r.toggleWithRecurrenceInUsersOrder();ku({originalTask:r,newTasks:l})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&wC({task:r,element:i,isFilenameUnique:e.isFilenameUnique}),n})}function yC(r,e,t,n){return q(this,null,function*(){let i={},s=new un(e.layoutOptions),a=jr.tasksPluginEmoji.taskSerializer;for(let o of s.shownTaskLayoutComponents){let u=a.componentToString(r,s,o);if(u){o==="description"&&(u=ge.getInstance().removeAsWordFromDependingOnSettings(u));let l=document.createElement("span");if(t.appendChild(l),l){let c=document.createElement("span");l.appendChild(c),yield TC(c,u,o,r,n,e.obsidianComponent),_C(o,c);let p=bC(o,r);l.classList.add(...p);let h=vp(o,r);for(let _ in h)l.dataset[_]=h[_];i=pe(pe({},i),h)}}}for(let o of s.hiddenTaskLayoutComponents){let u=vp(o,r);i=pe(pe({},i),u)}if(i.taskPriority===void 0){let o=vp("priority",r);i=pe(pe({},i),o)}return i})}function TC(r,e,t,n,i,s){return q(this,null,function*(){if(t==="description"){let{debugSettings:a}=Q();a.showTaskHiddenData&&(e+=`
\u{1F41B} ${n.lineNumber} . ${n.sectionStart} . ${n.sectionIndex} . '${n.originalMarkdown}'
'${n.path}' > '${n.precedingHeader}'
`),yield i(e,r,n.path,s);let o=r.querySelector("blockquote"),u=o!=null?o:r,l=u.querySelector("p");if(l!==null){for(;l.firstChild;)u.insertBefore(l.firstChild,l);l.remove()}r.querySelectorAll("p").forEach(c=>{c.hasChildNodes()||c.remove()}),r.querySelectorAll(".footnotes").forEach(c=>{c.remove()})}else r.innerHTML=e})}function bC(r,e){let t=[],n=pC[r];switch(r){case"blockLink":break;case"description":case"priority":case"recurrenceRule":t.push(n);break;case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{e[r]&&t.push(n);break}}return t}function vp(r,e){let t={},n={createdDate:"taskCreated",dueDate:"taskDue",startDate:"taskStart",scheduledDate:"taskScheduled",doneDate:"taskDone",priority:"taskPriority",description:"",recurrenceRule:"",blockLink:""};switch(r){case"description":case"recurrenceRule":case"blockLink":break;case"priority":{let i=n[r];t[i]=vr.priorityNameUsingNormal(e.priority).toLocaleLowerCase();break}case"createdDate":case"dueDate":case"startDate":case"scheduledDate":case"doneDate":{let i=e[r];if(i){let s=vC(i);if(s){let a=n[r];t[a]=s}}break}}return t}function _C(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=hC?t+=Math.abs(n).toString()+"d":t+=mC,t)}function EC(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function wC({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:i,createdDateSymbol:s,scheduledDateSymbol:a,dueDateSymbol:o,doneDateSymbol:u}=jr.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let l=e.createDiv();l.addClasses(["tooltip","pop-up"]),r.recurrence&&l.createDiv().setText(`${n} ${r.recurrence.toText()}`),wa(l,r.createdDate,s),wa(l,r.startDate,i),wa(l,r.scheduledDate,a),wa(l,r.dueDate,o),wa(l,r.doneDate,u);let c=r.getLinkText({isFilenameUnique:t});c&&l.createDiv().setText(`\u{1F517} ${c}`),e.addEventListener("mouseleave",()=>{l.remove()})})}function wa(r,e,t){e&&r.createDiv().setText(kC({signifier:t,date:e}))}function kC({signifier:r,date:e}){return`${r} ${e.format(z.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function Ou(r,e){function t(n,i,s,a){return q(this,null,function*(){if(!a)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield l_.MarkdownRenderer.renderMarkdown(n,i,s,a)})}return gC(r,e,t)}var Su=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return q(this,null,function*(){var c;let n=new c_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(p=>{var y;let h=(y=p.textContent)==null?void 0:y.split(` +`);if(h===void 0)return!1;let _=null;for(let w=0;wd_.ViewPlugin.fromClass(Ep),Ep=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 f_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ye.fromLine({line:a.text,taskLocation:ot.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 p=t.checked;return setTimeout(()=>{t.checked=p},1),!0}};var ji=require("obsidian");function h_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. -`);let n=new $r({source:r},e);if(!n.ignoreGlobalQuery){let i=new $r(Of(),e);i.source.trim()!==""&&(t+=`Explanation of the global query: +`);let s=new Kr(r,n);return s.ignoreGlobalQuery||t.hasInstructions()&&(i+=`Explanation of the global query: -${i.explainQuery()} -`)}return t+=`Explanation of this Tasks code block query: +${t.query(n).explainQuery()} +`),i+=`Explanation of this Tasks code block query: -${n.explainQuery()}`,t}function mu(r,e){let t=new $r(Of(),e),n=new $r({source:r},e);return n.ignoreGlobalQuery?n:t.append(n)}var gu=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 W(this,null,function*(){n.addChild(new dp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},dp=class extends Ii.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=mu(this.source,this.filePath),this.queryType="tasks";break;default:this.query=mu(this.source,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=mu(this.source,this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return W(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 W(this,null,function*(){this.query.layoutOptions.explainQuery&&this.createExplanation(i);let a=this.query.applyQueryToTasks(t);if(a.searchErrorMessage!==void 0){this.renderErrorMessage(i,a.searchErrorMessage);return}yield this.addAllTaskGroups(a.taskGroups,i);let o=a.totalTasksCount;this.addTaskCount(i,o)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=_b(this.source,this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return W(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=new tn(this.query.layoutOptions),o=n.createEl("ul");o.addClasses(["contains-task-list","plugin-tasks-query-result"]),o.addClasses(a.taskListHiddenClasses);let u=this.getGroupingAttribute();u&&u.length>0&&(o.dataset.taskGroupBy=u);for(let l=0;lD.remove());let y=this.query.layoutOptions.shortMode,E=h.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(E,c),this.query.layoutOptions.hideBacklinks||this.addBacklinks(E,c,y,f),this.query.layoutOptions.hideEditButton||this.addEditButton(E,c),o.appendChild(h)}return{taskList:o,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{Co({originalTask:n,newTasks:St.removeInferredStatusIfNeeded(n,u)})};new sn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return W(this,null,function*(){for(let i of t.groups){this.addGroupHeadings(n,i.groupHeadings);let{taskList:s}=yield this.createTasksList({tasks:i.tasks,content:n});n.appendChild(s)}})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return W(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield Ii.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>W(this,null,function*(){let h=yield xf(n,l);if(h){let[T,y]=h;yield this.app.workspace.getLeaf(Ii.Keymap.isModEvent(f)).openFile(y,{eState:{line:T}})}})),o.addEventListener("mousedown",f=>W(this,null,function*(){if(f.button===1){let h=yield xf(n,l);if(h){let[T,y]=h;yield this.app.workspace.getLeaf("tab").openFile(y,{eState:{line:T}})}}})),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var ve=require("obsidian");function bb(){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 vb(){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 Eb(){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 wb(){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 kb(){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 Ob(){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 Sb(){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 Db=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

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

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

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

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

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

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

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var or=require("obsidian");var Yn=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=re.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Yn.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Yn.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Vt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new Re,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var $n=new Yn,Ft=class extends or.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new tt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return W(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new or.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,Ft.setValid(l,$n.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{Ft.setValid(i,$n.validateSymbol(this.statusConfiguration()))});let s;new or.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,Ft.setValid(l,$n.validateName(this.statusConfiguration()))})}).then(l=>{Ft.setValid(s,$n.validateName(this.statusConfiguration()))});let a;new or.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,Ft.setValid(l,$n.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{Ft.setValid(a,$n.validateNextSymbol(this.statusConfiguration()))}),new or.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(f=>{l.addOption(f,f)}),l.setValue(this.type).onChange(f=>{this.type=re.getTypeFromStatusTypeString(f)})}),re.tasksPluginCanCreateCommandsForStatuses()&&new or.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>W(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new or.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>W(this,null,function*(){let c=$n.validate(this.statusConfiguration());if(c.length>0){let f=c.join(` +${s.explainQuery()}`,i}function Du(r,e,t){let n=new Kr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}var Ru=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 q(this,null,function*(){n.addChild(new wp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},wp=class extends ji.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=Du(this.source,Jt.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=Du(this.source,Jt.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=Du(this.source,Jt.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return q(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 q(this,null,function*(){this.query.layoutOptions.explainQuery&&this.createExplanation(i);let a=this.query.applyQueryToTasks(t);if(a.searchErrorMessage!==void 0){this.renderErrorMessage(i,a.searchErrorMessage);return}yield this.addAllTaskGroups(a.taskGroups,i);let o=a.totalTasksCount;this.addTaskCount(i,a)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`
Tasks query: ${n.replace(/\n/g,"
")}
`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=h_(this.source,ge.getInstance(),Jt.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return q(this,null,function*(){let i=new un(this.query.layoutOptions),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);for(let[o,u]of t.entries()){let l=this.isFilenameUnique({task:u}),c=yield Ou(u,{parentUlElement:s,listIndex:o,layoutOptions:this.query.layoutOptions,isFilenameUnique:l,taskLayout:i,obsidianComponent:this});c.querySelectorAll("[data-footnote-id]").forEach(_=>_.remove());let h=c.createSpan("task-extras");if(this.query.layoutOptions.hideUrgency||this.addUrgency(h,u),!this.query.layoutOptions.hideBacklinks){let _=this.query.layoutOptions.shortMode;this.addBacklinks(h,u,_,l)}this.query.layoutOptions.hideEditButton||this.addEditButton(h,u),s.appendChild(c)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{ku({originalTask:n,newTasks:Rt.removeInferredStatusIfNeeded(n,u)})};new cn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return q(this,null,function*(){for(let i of t.groups)this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return q(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield ji.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",p=>q(this,null,function*(){let h=yield _p(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf(ji.Keymap.isModEvent(p)).openFile(y,{eState:{line:_}})}})),o.addEventListener("mousedown",p=>q(this,null,function*(){if(p.button===1){let h=yield _p(n,l);if(h){let[_,y]=h;yield this.app.workspace.getLeaf("tab").openFile(y,{eState:{line:_}})}}})),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var ve=require("obsidian");function m_(){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 g_(){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 y_(){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 T_(){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 b_(){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 __(){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 v_(){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 E_=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

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

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

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

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

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

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

See the documentation to get started!

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

The format that Tasks uses to read and write tasks.

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

See the documentation.

')).addDropdown(i=>{for(let s of Object.keys(Nr))i.addOption(s,Nr[s].displayName);i.setValue(X().taskFormat).onChange(s=>W(this,null,function*(){Ge({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new ve.Setting(t).setName("Global task filter").setDesc(Lt.createFragmentWithHTML('

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

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

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

See the documentation.

')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(we.get()).onChange(s=>W(this,null,function*(){we.set(s),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=X();i.setValue(s.removeGlobalFilter).onChange(a=>W(this,null,function*(){Ge({removeGlobalFilter:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),cC(new ve.Setting(t).setDesc(Lt.createFragmentWithHTML('

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

See the documentation.

')).addTextArea(i=>{let s=X();i.inputEl.rows=4,i.setPlaceholder(`# For example... +Fix errors before saving.`;new dr.Notice(p);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?Ut.removeValidationError(t):Ut.setValidationError(t)}};var Wt=class extends ve.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return q(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new ve.Setting(t).setName("Task Format").setDesc(Wt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

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

See the documentation.

')).addDropdown(i=>{for(let s of Object.keys(jr))i.addOption(s,jr[s].displayName);i.setValue(Q().taskFormat).onChange(s=>q(this,null,function*(){et({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new ve.Setting(t).setName("Global task filter").setDesc(Wt.createFragmentWithHTML('

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

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

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

See the documentation.

')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(ge.getInstance().get()).onChange(s=>q(this,null,function*(){et({globalFilter:s}),ge.getInstance().set(s),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=Q();i.setValue(s.removeGlobalFilter).onChange(a=>q(this,null,function*(){et({removeGlobalFilter:a}),ge.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),RC(new ve.Setting(t).setDesc(Wt.createFragmentWithHTML('

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

See the documentation.

')).addTextArea(i=>{let s=Q();i.inputEl.rows=4,i.setPlaceholder(`# For example... path does not include _templates/ limit 300 -show urgency`).setValue(s.globalQuery).onChange(a=>W(this,null,function*(){Ge({globalQuery:a}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=X();Db.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new ve.Setting(t).setName("Set created date on every added task").setDesc(Lt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(i=>{let s=X();i.setValue(s.setCreatedDate).onChange(a=>W(this,null,function*(){Ge({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set done date on every completed task").setDesc(Lt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.setDoneDate).onChange(a=>W(this,null,function*(){Ge({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Lt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>W(this,null,function*(){Ge({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>W(this,null,function*(){let s=X();yield this.plugin.saveSettings(),i.setValue(Lt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>W(this,null,function*(){let o=Lt.parseCommaSeparatedFolders(a);Ge({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new ve.Setting(t).setName("Next recurrence appears on the line below").setDesc(Lt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(i=>{let{recurrenceOnNextLine:s}=X();i.setValue(s).onChange(a=>W(this,null,function*(){Ge({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new ve.Setting(t).setName("Auto-suggest task content").setDesc(Lt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.autoSuggestInEditor).onChange(a=>W(this,null,function*(){Ge({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=X();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>W(this,null,function*(){Ge({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=X();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>W(this,null,function*(){Ge({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new ve.Setting(t).setName("Provide access keys in dialogs").setDesc(Lt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.provideAccessKeys).onChange(a=>W(this,null,function*(){Ge({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:ge({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,Ge({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!f_(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=X();l.generalSettings[o.settingName]||Rn(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>W(this,null,function*(){Rn(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=X();l.generalSettings[o.settingName]||Rn(o.settingName,o.initialValue);let c=f=>W(this,null,function*(){Rn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=X();l.generalSettings[o.settingName]||Rn(o.settingName,o.initialValue);let c=f=>W(this,null,function*(){Rn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=X();i.coreStatuses.forEach(s=>{Rb(t,s,i.coreStatuses,i,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=X();i.customStatuses.forEach(l=>{Rb(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>W(this,null,function*(){He.addStatus(i.customStatuses,new tt("","","",!1,"TODO")),yield Fi(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",bb()],["Aura Theme",vb()],["Ebullientworks Theme",Eb()],["ITS Theme & SlRvb Checkboxes",wb()],["Minimal Theme",Ob()],["Things Theme",Sb()],["LYT Mode Theme (Dark mode only)",kb()]];for(let[l,c]of a)new ve.Setting(t).addButton(h=>{let T=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(T).onClick(()=>W(this,null,function*(){yield lC(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>W(this,null,function*(){let f=this.plugin.getTasks().map(T=>T.status),h=Re.getInstance().findUnknownStatuses(f);h.length!==0&&(h.forEach(T=>{He.addStatus(i.customStatuses,T)}),yield Fi(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>W(this,null,function*(){He.resetAllCustomStatuses(i),yield Fi(i,n)}))}).infoEl.remove()}},ma=Lt;ma.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Rb(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new re(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>W(this,null,function*(){He.deleteStatus(t,e)&&(yield Fi(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>W(this,null,function*(){let c=new Ft(s,e,a);c.onClose=()=>W(this,null,function*(){c.saved&&He.replaceStatus(t,e,c.statusConfiguration())&&(yield Fi(n,i))}),c.open()}))}),u.infoEl.remove()}function lC(r,e,t){return W(this,null,function*(){He.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield Fi(e,t)})}function Fi(r,e){return W(this,null,function*(){Ge({statusSettings:r}),He.applyToStatusRegistry(r,Re.getInstance()),yield e.saveSettings(!0)})}function cC(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var Mb=require("obsidian");var yu=class extends Mb.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return c_(s,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=Zs()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>Dt(ge({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var xb=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var Ab=(r,e)=>{let t=Fo({line:"",path:""});return new sn({app:r,task:t,onSubmit:e})};var Cb=r=>({createTaskLineModal:()=>xb(r,Ab)});var Tu=class extends Pb.Plugin{get apiV1(){return Cb(app)}onload(){return W(this,null,function*(){Mo.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new ma({plugin:this})),y_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Uo({obsidianEvents:this.app.workspace});this.cache=new Mn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Wo({plugin:this}),this.queryRenderer=new gu({plugin:this,events:t}),this.registerEditorExtension(z_()),this.registerEditorSuggest(new yu(this.app,X())),new Lo({plugin:this})})}loadTaskStatuses(){return W(this,null,function*(){let{statusSettings:t}=X();He.applyToStatusRegistry(t,Re.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return W(this,null,function*(){let t=yield this.loadData();Ge(t),yield this.loadTaskStatuses()})}saveSettings(){return W(this,null,function*(){yield this.saveData(X())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; +show urgency`).setValue(s.globalQuery).onChange(a=>q(this,null,function*(){et({globalQuery:a}),Jt.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=Q();E_.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new ve.Setting(t).setName("Set created date on every added task").setDesc(Wt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

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

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.setDoneDate).onChange(a=>q(this,null,function*(){et({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Wt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>q(this,null,function*(){et({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>q(this,null,function*(){let s=Q();yield this.plugin.saveSettings(),i.setValue(Wt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>q(this,null,function*(){let o=Wt.parseCommaSeparatedFolders(a);et({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new ve.Setting(t).setName("Next recurrence appears on the line below").setDesc(Wt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(i=>{let{recurrenceOnNextLine:s}=Q();i.setValue(s).onChange(a=>q(this,null,function*(){et({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new ve.Setting(t).setName("Auto-suggest task content").setDesc(Wt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

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

See the documentation.

')).addToggle(i=>{let s=Q();i.setValue(s.provideAccessKeys).onChange(a=>q(this,null,function*(){et({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:pe({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,et({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!ab(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>q(this,null,function*(){In(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){In(o.settingName,p),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=Q();l.generalSettings[o.settingName]||In(o.settingName,o.initialValue);let c=p=>q(this,null,function*(){In(o.settingName,p),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=Q();i.coreStatuses.forEach(s=>{w_(t,s,i.coreStatuses,i,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{w_(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>q(this,null,function*(){Ge.addStatus(i.customStatuses,new Je("","","",!1,"TODO")),yield Gi(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",m_()],["Aura Theme",g_()],["Ebullientworks Theme",y_()],["ITS Theme & SlRvb Checkboxes",T_()],["Minimal Theme",__()],["Things Theme",v_()],["LYT Mode Theme (Dark mode only)",b_()]];for(let[l,c]of a)new ve.Setting(t).addButton(h=>{let _=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(_).onClick(()=>q(this,null,function*(){yield DC(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>q(this,null,function*(){let p=this.plugin.getTasks().map(_=>_.status),h=De.getInstance().findUnknownStatuses(p);h.length!==0&&(h.forEach(_=>{Ge.addStatus(i.customStatuses,_)}),yield Gi(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>q(this,null,function*(){Ge.resetAllCustomStatuses(i),yield Gi(i,n)}))}).infoEl.remove()}},ka=Wt;ka.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function w_(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new te(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>q(this,null,function*(){Ge.deleteStatus(t,e)&&(yield Gi(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>q(this,null,function*(){let c=new Ut(s,e,a);c.onClose=()=>q(this,null,function*(){c.saved&&Ge.replaceStatus(t,e,c.statusConfiguration())&&(yield Gi(n,i))}),c.open()}))}),u.infoEl.remove()}function DC(r,e,t){return q(this,null,function*(){Ge.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield Gi(e,t)})}function Gi(r,e){return q(this,null,function*(){et({statusSettings:r}),Ge.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function RC(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var k_=require("obsidian");var Mu=class extends k_.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return ib(s,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=la()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>Tt(pe({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let p=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(p);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var O_=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` +`);t(o)}).open(),n};var S_=(r,e)=>{let t=Yo({line:"",path:""});return new cn({app:r,task:t,onSubmit:e})};var D_=r=>({createTaskLineModal:()=>O_(r,S_)});var xu=class extends R_.Plugin{get apiV1(){return D_(app)}onload(){return q(this,null,function*(){vu.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new ka({plugin:this})),i_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new _u({obsidianEvents:this.app.workspace});this.cache=new Fn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Su({plugin:this}),this.queryRenderer=new Ru({plugin:this,events:t}),this.registerEditorExtension(p_()),this.registerEditorSuggest(new Mu(this.app,Q())),new jo({plugin:this})})}loadTaskStatuses(){return q(this,null,function*(){let{statusSettings:t}=Q();Ge.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return q(this,null,function*(){let t=yield this.loadData();et(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),Jt.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return q(this,null,function*(){yield this.saveData(Q())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index e9e05936..693a9bb0 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "4.7.0", + "version": "4.8.1", "minAppVersion": "1.1.1", "description": "Task management for Obsidian", "author": "Martin Schenck and Clare Macrae", diff --git a/.obsidian/plugins/quickadd/data.json b/.obsidian/plugins/quickadd/data.json index 25faa75d..ad801ec6 100644 --- a/.obsidian/plugins/quickadd/data.json +++ b/.obsidian/plugins/quickadd/data.json @@ -48,7 +48,7 @@ "devMode": false, "templateFolderPath": "00.01 Admin/Templates", "announceUpdates": true, - "version": "1.2.1", + "version": "1.3.0", "disableOnlineFeatures": true, "ai": { "OpenAIApiKey": "", diff --git a/.obsidian/plugins/quickadd/main.js b/.obsidian/plugins/quickadd/main.js index 70f98a0e..2de680bf 100644 --- a/.obsidian/plugins/quickadd/main.js +++ b/.obsidian/plugins/quickadd/main.js @@ -11470,14 +11470,15 @@ async function ChunkedPrompt(settings, formatter) { const chunks = text2.split(chunkSeparator); const systemPromptLength = getTokenCount(systemPrompt, model); const renderedPromptTemplate = await formatter(promptTemplate, { - chunk: "" + chunk: " " + // empty would make QA ask for a value, which we don't want }); const promptTemplateTokenCount = getTokenCount( renderedPromptTemplate, model ); const maxChunkTokenSize = getModelMaxTokens(model) / 2 - systemPromptLength; - const shouldMerge = true; + const shouldMerge = settings.shouldMerge ?? true; const chunkedPrompts = []; const maxCombinedChunkSize = maxChunkTokenSize - promptTemplateTokenCount; if (shouldMerge) { @@ -11530,7 +11531,7 @@ async function ChunkedPrompt(settings, formatter) { `${chunkedPrompts.length} prompts being sent.` ]; notice.setMessage(promptingMsg[0], promptingMsg[1]); - const rateLimiter = new RateLimiter(5, 1e3); + const rateLimiter = new RateLimiter(5, 1e3 * 30); const results = Promise.all( chunkedPrompts.map( (prompt) => rateLimiter.add(() => makeRequest(prompt)) @@ -11686,7 +11687,8 @@ var QuickAddApi = class { outputVariableName: settings?.variableName ?? "output", showAssistantMessages: settings?.showAssistantMessages ?? true, systemPrompt: settings?.systemPrompt ?? AISettings.defaultSystemPrompt, - resultJoiner: settings?.chunkJoiner ?? "\n" + resultJoiner: settings?.chunkJoiner ?? "\n", + shouldMerge: settings?.shouldMerge ?? true }, (txt, variables) => { return formatter(txt, variables, false); @@ -14766,25 +14768,37 @@ var UserScriptSettingsModal = class extends import_obsidian26.Modal { if (this.command.settings[option] !== void 0) { value = this.command.settings[option]; } + let setting; const type = entry.type; if (type === "text" || type === "input") { - this.addInputBox( + setting = this.addInputBox( option, value, entry?.placeholder, entry.secret ); } else if (type === "checkbox" || type === "toggle") { - this.addToggle(option, value); + setting = this.addToggle(option, value); } else if (type === "dropdown" || type === "select") { - this.addDropdown(option, entry.options, value); + setting = this.addDropdown( + option, + entry.options, + value + ); } else if (type === "format") { - this.addFormatInput(option, value, entry.placeholder); + setting = this.addFormatInput( + option, + value, + entry.placeholder + ); + } + if (entry.description && setting) { + setting.setDesc(entry.description); } } } addInputBox(name, value, placeholder, passwordOnBlur) { - new import_obsidian26.Setting(this.contentEl).setName(name).addText((input) => { + return new import_obsidian26.Setting(this.contentEl).setName(name).addText((input) => { input.setValue(value).onChange((value2) => this.command.settings[name] = value2).setPlaceholder(placeholder ?? ""); if (passwordOnBlur) { setPasswordOnBlur(input.inputEl); @@ -14792,19 +14806,21 @@ var UserScriptSettingsModal = class extends import_obsidian26.Modal { }); } addToggle(name, value) { - new import_obsidian26.Setting(this.contentEl).setName(name).addToggle( + return new import_obsidian26.Setting(this.contentEl).setName(name).addToggle( (toggle) => toggle.setValue(value).onChange((value2) => this.command.settings[name] = value2) ); } addDropdown(name, options, value) { - new import_obsidian26.Setting(this.contentEl).setName(name).addDropdown((dropdown) => { + return new import_obsidian26.Setting(this.contentEl).setName(name).addDropdown((dropdown) => { options.forEach((item) => void dropdown.addOption(item, item)); dropdown.setValue(value); - dropdown.onChange((value2) => this.command.settings[name] = value2); + dropdown.onChange( + (value2) => this.command.settings[name] = value2 + ); }); } addFormatInput(name, value, placeholder) { - new import_obsidian26.Setting(this.contentEl).setName(name); + const setting = new import_obsidian26.Setting(this.contentEl).setName(name); const formatDisplay = this.contentEl.createEl("span"); const input = new import_obsidian26.TextAreaComponent(this.contentEl); new FormatSyntaxSuggester(this.app, input.inputEl, QuickAdd.instance); @@ -14820,6 +14836,7 @@ var UserScriptSettingsModal = class extends import_obsidian26.Modal { input.inputEl.style.height = "100px"; input.inputEl.style.marginBottom = "1em"; void (async () => formatDisplay.innerText = await displayFormatter.format(value))(); + return setting; } }; diff --git a/.obsidian/plugins/quickadd/manifest.json b/.obsidian/plugins/quickadd/manifest.json index d5a2af3f..fdccc409 100644 --- a/.obsidian/plugins/quickadd/manifest.json +++ b/.obsidian/plugins/quickadd/manifest.json @@ -1,7 +1,7 @@ { "id": "quickadd", "name": "QuickAdd", - "version": "1.2.1", + "version": "1.3.0", "minAppVersion": "0.13.19", "description": "Quickly add new pages or content to your vault.", "author": "Christian B. B. Houmann", diff --git a/.obsidian/plugins/templater-obsidian/main.js b/.obsidian/plugins/templater-obsidian/main.js index 32262538..c891a6f6 100644 --- a/.obsidian/plugins/templater-obsidian/main.js +++ b/.obsidian/plugins/templater-obsidian/main.js @@ -47,7 +47,7 @@ var __toBinary = /* @__PURE__ */ (() => { __export(exports, { default: () => TemplaterPlugin }); -var import_obsidian18 = __toModule(require("obsidian")); +var import_obsidian17 = __toModule(require("obsidian")); // src/settings/Settings.ts var import_obsidian6 = __toModule(require("obsidian")); @@ -245,7 +245,7 @@ var round = Math.round; // node_modules/@popperjs/core/lib/utils/userAgent.js function getUAString() { var uaData = navigator.userAgentData; - if (uaData != null && uaData.brands) { + if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) { return uaData.brands.map(function(item) { return item.brand + "/" + item.version; }).join(" "); @@ -476,15 +476,7 @@ function effect2(_ref2) { return; } } - if (true) { - if (!isHTMLElement(arrowElement)) { - console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); - } - } if (!contains(state.elements.popper, arrowElement)) { - if (true) { - console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); - } return; } state.elements.arrow = arrowElement; @@ -511,9 +503,8 @@ var unsetSides = { bottom: "auto", left: "auto" }; -function roundOffsetsByDPR(_ref) { +function roundOffsetsByDPR(_ref, win) { var x = _ref.x, y = _ref.y; - var win = window; var dpr = win.devicePixelRatio || 1; return { x: round(x * dpr) / dpr || 0, @@ -569,7 +560,7 @@ function mapToStyles(_ref2) { var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ x, y - }) : { + }, getWindow(popper2)) : { x, y }; @@ -584,14 +575,6 @@ function mapToStyles(_ref2) { function computeStyles(_ref5) { var state = _ref5.state, options = _ref5.options; var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; - if (true) { - var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || ""; - if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { - return transitionProperty.indexOf(property) >= 0; - })) { - console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); - } - } var commonStyles = { placement: getBasePlacement(state.placement), variation: getVariation(state.placement), @@ -948,9 +931,6 @@ function computeAutoPlacement(state, options) { }); if (allowedPlacements.length === 0) { allowedPlacements = placements2; - if (true) { - console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); - } } var overflows = allowedPlacements.reduce(function(acc, placement2) { acc[placement2] = detectOverflow(state, { @@ -1394,92 +1374,6 @@ function debounce(fn2) { }; } -// node_modules/@popperjs/core/lib/utils/format.js -function format(str) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - return [].concat(args).reduce(function(p, c) { - return p.replace(/%s/, c); - }, str); -} - -// node_modules/@popperjs/core/lib/utils/validateModifiers.js -var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; -var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; -var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; -function validateModifiers(modifiers) { - modifiers.forEach(function(modifier) { - [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { - return self.indexOf(value) === index; - }).forEach(function(key) { - switch (key) { - case "name": - if (typeof modifier.name !== "string") { - console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); - } - break; - case "enabled": - if (typeof modifier.enabled !== "boolean") { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); - } - break; - case "phase": - if (modifierPhases.indexOf(modifier.phase) < 0) { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); - } - break; - case "fn": - if (typeof modifier.fn !== "function") { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); - } - break; - case "effect": - if (modifier.effect != null && typeof modifier.effect !== "function") { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); - } - break; - case "requires": - if (modifier.requires != null && !Array.isArray(modifier.requires)) { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); - } - break; - case "requiresIfExists": - if (!Array.isArray(modifier.requiresIfExists)) { - console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); - } - break; - case "options": - case "data": - break; - default: - console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { - return '"' + s + '"'; - }).join(", ") + '; but "' + key + '" was provided.'); - } - modifier.requires && modifier.requires.forEach(function(requirement) { - if (modifiers.find(function(mod) { - return mod.name === requirement; - }) == null) { - console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); - } - }); - }); - }); -} - -// node_modules/@popperjs/core/lib/utils/uniqueBy.js -function uniqueBy(arr, fn2) { - var identifiers = new Set(); - return arr.filter(function(item) { - var identifier = fn2(item); - if (!identifiers.has(identifier)) { - identifiers.add(identifier); - return true; - } - }); -} - // node_modules/@popperjs/core/lib/utils/mergeByName.js function mergeByName(modifiers) { var merged = modifiers.reduce(function(merged2, current) { @@ -1496,8 +1390,6 @@ function mergeByName(modifiers) { } // node_modules/@popperjs/core/lib/createPopper.js -var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; -var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; var DEFAULT_OPTIONS = { placement: "bottom", modifiers: [], @@ -1548,28 +1440,6 @@ function popperGenerator(generatorOptions) { state.orderedModifiers = orderedModifiers.filter(function(m) { return m.enabled; }); - if (true) { - var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { - var name = _ref.name; - return name; - }); - validateModifiers(modifiers); - if (getBasePlacement(state.options.placement) === auto) { - var flipModifier = state.orderedModifiers.find(function(_ref2) { - var name = _ref2.name; - return name === "flip"; - }); - if (!flipModifier) { - console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); - } - } - var _getComputedStyle = getComputedStyle(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; - if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { - return parseFloat(margin); - })) { - console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); - } - } runModifierEffects(); return instance.update(); }, @@ -1579,9 +1449,6 @@ function popperGenerator(generatorOptions) { } var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; if (!areValidElements(reference3, popper3)) { - if (true) { - console.error(INVALID_ELEMENT_ERROR); - } return; } state.rects = { @@ -1593,15 +1460,7 @@ function popperGenerator(generatorOptions) { state.orderedModifiers.forEach(function(modifier) { return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); }); - var __debug_loops__ = 0; for (var index = 0; index < state.orderedModifiers.length; index++) { - if (true) { - __debug_loops__ += 1; - if (__debug_loops__ > 100) { - console.error(INFINITE_LOOP_ERROR); - break; - } - } if (state.reset === true) { state.reset = false; index = -1; @@ -1630,9 +1489,6 @@ function popperGenerator(generatorOptions) { } }; if (!areValidElements(reference2, popper2)) { - if (true) { - console.error(INVALID_ELEMENT_ERROR); - } return instance; } instance.setOptions(options).then(function(state2) { @@ -1641,8 +1497,8 @@ function popperGenerator(generatorOptions) { } }); function runModifierEffects() { - state.orderedModifiers.forEach(function(_ref3) { - var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect4 = _ref3.effect; + state.orderedModifiers.forEach(function(_ref) { + var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect; if (typeof effect4 === "function") { var cleanupFn = effect4({ state, @@ -1949,6 +1805,7 @@ var DEFAULT_SETTINGS = { enable_folder_templates: true, folder_templates: [{ folder: "", template: "" }], syntax_highlighting: true, + syntax_highlighting_mobile: false, enabled_templates_hotkeys: [""], startup_templates: [""], enable_ribbon_icon: true @@ -1963,7 +1820,7 @@ var TemplaterSettingTab = class extends import_obsidian6.PluginSettingTab { this.add_general_setting_header(); this.add_template_folder_setting(); this.add_internal_functions_setting(); - this.add_syntax_highlighting_setting(); + this.add_syntax_highlighting_settings(); this.add_auto_jump_to_cursor(); this.add_trigger_on_new_file_creation_setting(); this.add_ribbon_icon_setting(); @@ -1997,16 +1854,25 @@ var TemplaterSettingTab = class extends import_obsidian6.PluginSettingTab { }), " to get a list of all the available internal variables / functions."); new import_obsidian6.Setting(this.containerEl).setName("Internal Variables and Functions").setDesc(desc); } - add_syntax_highlighting_setting() { - const desc = document.createDocumentFragment(); - desc.append("Adds syntax highlighting for Templater commands in edit mode."); - new import_obsidian6.Setting(this.containerEl).setName("Syntax Highlighting").setDesc(desc).addToggle((toggle) => { + add_syntax_highlighting_settings() { + const desktopDesc = document.createDocumentFragment(); + desktopDesc.append("Adds syntax highlighting for Templater commands in edit mode."); + const mobileDesc = document.createDocumentFragment(); + mobileDesc.append("Adds syntax highlighting for Templater commands in edit mode on mobile. Use with caution: this may break live preview on mobile platforms."); + new import_obsidian6.Setting(this.containerEl).setName("Syntax Highlighting on Desktop").setDesc(desktopDesc).addToggle((toggle) => { toggle.setValue(this.plugin.settings.syntax_highlighting).onChange((syntax_highlighting) => { this.plugin.settings.syntax_highlighting = syntax_highlighting; this.plugin.save_settings(); this.plugin.event_handler.update_syntax_highlighting(); }); }); + new import_obsidian6.Setting(this.containerEl).setName("Syntax Highlighting on Mobile").setDesc(mobileDesc).addToggle((toggle) => { + toggle.setValue(this.plugin.settings.syntax_highlighting_mobile).onChange((syntax_highlighting_mobile) => { + this.plugin.settings.syntax_highlighting_mobile = syntax_highlighting_mobile; + this.plugin.save_settings(); + this.plugin.event_handler.update_syntax_highlighting(); + }); + }); } add_auto_jump_to_cursor() { const desc = document.createDocumentFragment(); @@ -2459,7 +2325,7 @@ var InternalModuleDate = class extends InternalModule { async create_dynamic_templates() { } generate_now() { - return (format2 = "YYYY-MM-DD", offset2, reference2, reference_format) => { + return (format = "YYYY-MM-DD", offset2, reference2, reference_format) => { if (reference2 && !window.moment(reference2, reference_format).isValid()) { throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); } @@ -2469,25 +2335,25 @@ var InternalModuleDate = class extends InternalModule { } else if (typeof offset2 === "number") { duration = window.moment.duration(offset2, "days"); } - return window.moment(reference2, reference_format).add(duration).format(format2); + return window.moment(reference2, reference_format).add(duration).format(format); }; } generate_tomorrow() { - return (format2 = "YYYY-MM-DD") => { - return window.moment().add(1, "days").format(format2); + return (format = "YYYY-MM-DD") => { + return window.moment().add(1, "days").format(format); }; } generate_weekday() { - return (format2 = "YYYY-MM-DD", weekday, reference2, reference_format) => { + return (format = "YYYY-MM-DD", weekday, reference2, reference_format) => { if (reference2 && !window.moment(reference2, reference_format).isValid()) { throw new TemplaterError("Invalid reference date format, try specifying one with the argument 'reference_format'"); } - return window.moment(reference2, reference_format).weekday(weekday).format(format2); + return window.moment(reference2, reference_format).weekday(weekday).format(format); }; } generate_yesterday() { - return (format2 = "YYYY-MM-DD") => { - return window.moment().add(-1, "days").format(format2); + return (format = "YYYY-MM-DD") => { + return window.moment().add(-1, "days").format(format); }; } }; @@ -2539,8 +2405,8 @@ var InternalModuleFile = class extends InternalModule { }; } generate_creation_date() { - return (format2 = "YYYY-MM-DD HH:mm") => { - return window.moment(this.config.target_file.stat.ctime).format(format2); + return (format = "YYYY-MM-DD HH:mm") => { + return window.moment(this.config.target_file.stat.ctime).format(format); }; } generate_cursor() { @@ -2550,12 +2416,12 @@ var InternalModuleFile = class extends InternalModule { } generate_cursor_append() { return (content) => { - const active_view = app.workspace.getActiveViewOfType(import_obsidian8.MarkdownView); - if (active_view === null) { - log_error(new TemplaterError("No active view, can't append to cursor.")); + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.editor) { + log_error(new TemplaterError("No active editor, can't append to cursor.")); return; } - const editor = active_view.editor; + const editor = active_editor.editor; const doc = editor.getDoc(); doc.replaceSelection(content); return ""; @@ -2629,8 +2495,8 @@ var InternalModuleFile = class extends InternalModule { }; } generate_last_modified_date() { - return (format2 = "YYYY-MM-DD HH:mm") => { - return window.moment(this.config.target_file.stat.mtime).format(format2); + return (format = "YYYY-MM-DD HH:mm") => { + return window.moment(this.config.target_file.stat.mtime).format(format); }; } generate_move() { @@ -2682,11 +2548,11 @@ var InternalModuleFile = class extends InternalModule { } generate_selection() { return () => { - const active_view = app.workspace.getActiveViewOfType(import_obsidian8.MarkdownView); - if (active_view == null) { - throw new TemplaterError("Active view is null, can't read selection."); + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.editor) { + throw new TemplaterError("Active editor is null, can't read selection."); } - const editor = active_view.editor; + const editor = active_editor.editor; return editor.getSelection(); }; } @@ -3616,7 +3482,7 @@ var Templater = class { this.plugin.registerMarkdownPostProcessor((el, ctx) => this.process_dynamic_templates(el, ctx)); } create_running_config(template_file, target_file, run_mode) { - const active_file = app.workspace.getActiveFile(); + const active_file = app.workspace.activeEditor?.file; return { template_file, target_file, @@ -3639,7 +3505,7 @@ var Templater = class { const new_file_location = app.vault.getConfig("newFileLocation"); switch (new_file_location) { case "current": { - const active_file = app.workspace.getActiveFile(); + const active_file = app.workspace.activeEditor?.file; if (active_file) { folder = active_file.parent; } @@ -3692,26 +3558,28 @@ var Templater = class { } async append_template_to_active_file(template_file) { const active_view = app.workspace.getActiveViewOfType(import_obsidian13.MarkdownView); - if (active_view === null) { - log_error(new TemplaterError("No active view, can't append templates.")); + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.file || !active_editor.editor) { + log_error(new TemplaterError("No active editor, can't append templates.")); return; } - const running_config = this.create_running_config(template_file, active_view.file, 1); + const running_config = this.create_running_config(template_file, active_editor.file, 1); const output_content = await errorWrapper(async () => this.read_and_parse_template(running_config), "Template parsing error, aborting."); if (output_content == null) { return; } - const editor = active_view.editor; + const editor = active_editor.editor; const doc = editor.getDoc(); const oldSelections = doc.listSelections(); doc.replaceSelection(output_content); app.workspace.trigger("templater:template-appended", { view: active_view, + editor: active_editor, content: output_content, oldSelections, newSelections: doc.listSelections() }); - await this.plugin.editor_handler.jump_to_next_cursor_location(active_view.file, true); + await this.plugin.editor_handler.jump_to_next_cursor_location(active_editor.file, true); } async write_template_to_file(template_file, file) { const running_config = this.create_running_config(template_file, file, 2); @@ -3727,12 +3595,12 @@ var Templater = class { await this.plugin.editor_handler.jump_to_next_cursor_location(file, true); } overwrite_active_file_commands() { - const active_view = app.workspace.getActiveViewOfType(import_obsidian13.MarkdownView); - if (active_view === null) { - log_error(new TemplaterError("Active view is null, can't overwrite content")); + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.file) { + log_error(new TemplaterError("Active editor is null, can't overwrite content")); return; } - this.overwrite_file_commands(active_view.file, true); + this.overwrite_file_commands(active_editor.file, true); } async overwrite_file_commands(file, active_file = false) { const running_config = this.create_running_config(file, file, active_file ? 3 : 2); @@ -3804,7 +3672,9 @@ var Templater = class { if (file.path.includes(template_folder) && template_folder !== "/") { return; } - await delay(300); + if (!(0, import_obsidian13.requireApiVersion)("1.0")) { + await delay(300); + } if (file.stat.size == 0 && templater.plugin.settings.enable_folder_templates) { const folder_template_match = templater.get_new_file_template_for_folder(file.parent); if (!folder_template_match) { @@ -3856,7 +3726,9 @@ var EventHandler = class { this.update_file_menu(); } update_syntax_highlighting() { - if (this.plugin.settings.syntax_highlighting) { + const desktopShouldHighlight = this.plugin.editor_handler.desktopShouldHighlight(); + const mobileShouldHighlight = this.plugin.editor_handler.mobileShouldHighlight(); + if (desktopShouldHighlight || mobileShouldHighlight) { this.syntax_highlighting_event = app.workspace.on("codemirror", (cm) => { cm.setOption("mode", "templater"); }); @@ -3988,28 +3860,25 @@ var CommandHandler = class { }; // src/editor/Editor.ts -var import_obsidian17 = __toModule(require("obsidian")); +var import_obsidian16 = __toModule(require("obsidian")); // src/editor/CursorJumper.ts -var import_obsidian15 = __toModule(require("obsidian")); var CursorJumper = class { constructor() { } async jump_to_next_cursor_location() { - const active_view = app.workspace.getActiveViewOfType(import_obsidian15.MarkdownView); - if (!active_view) { + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.editor) { return; } - const active_file = active_view.file; - await active_view.save(); - const content = await app.vault.read(active_file); + const content = active_editor.editor.getValue(); const { new_content, positions } = this.replace_and_get_cursor_positions(content); if (positions) { - await app.vault.modify(active_file, new_content); + active_editor.editor.setValue(new_content); this.set_cursor_location(positions); } if (app.vault.getConfig("vimMode")) { - const cm = active_view.editor.cm.cm; + const cm = active_editor.editor.cm.cm; window.CodeMirrorAdapter.Vim.handleKey(cm, "i", "mapping"); } } @@ -4027,7 +3896,7 @@ var CursorJumper = class { replace_and_get_cursor_positions(content) { let cursor_matches = []; let match; - const cursor_regex = new RegExp("<%\\s*tp.file.cursor\\((?[0-9]{0,2})\\)\\s*%>", "g"); + const cursor_regex = new RegExp("<%\\s*tp.file.cursor\\((?[0-9]*)\\)\\s*%>", "g"); while ((match = cursor_regex.exec(content)) != null) { cursor_matches.push(match); } @@ -4055,11 +3924,11 @@ var CursorJumper = class { return { new_content: content, positions }; } set_cursor_location(positions) { - const active_view = app.workspace.getActiveViewOfType(import_obsidian15.MarkdownView); - if (!active_view) { + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.editor) { return; } - const editor = active_view.editor; + const editor = active_editor.editor; const selections = []; for (const pos of positions) { selections.push({ from: pos }); @@ -4072,10 +3941,10 @@ var CursorJumper = class { }; // src/editor/Autocomplete.ts -var import_obsidian16 = __toModule(require("obsidian")); +var import_obsidian15 = __toModule(require("obsidian")); // toml:/home/runner/work/Templater/Templater/docs/documentation.toml -var tp = { config: { name: "config", description: "This module exposes Templater's running configuration.\n\nThis is mostly useful when writing scripts requiring some context information.\n", functions: { template_file: { name: "template_file", description: "The `TFile` object representing the template file.", definition: "tp.file.template_file" }, target_file: { name: "target_file", description: "The `TFile` object representing the target file where the template will be inserted.", definition: "tp.config.target_file" }, run_mode: { name: "run_mode", description: "The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...)", definition: "tp.config.run_mode" }, active_file: { name: "active_file", description: "The active file (if existing) when launching Templater.", definition: "tp.config.active_file?" } } }, date: { name: "date", description: "This module contains every internal function related to dates.", functions: { now: { name: "now", description: "Retrieves the date.", definition: 'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)', args: { format: { name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, offset: { name: "offset", description: "Offset for the day, e.g. set this to `-7` to get last week's date. You can also specify the offset as a string using the ISO 8601 format" }, reference: { name: "reference", description: "The date referential, e.g. set this to the note's title" }, reference_format: { name: "reference_format", description: "The date reference format." } } }, tomorrow: { name: "tomorrow", description: "Retrieves tomorrow's date.", definition: 'tp.date.tomorrow(format: string = "YYYY-MM-DD")', args: { format: { name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" } } }, yesterday: { name: "yesterday", description: "Retrieves yesterday's date.", definition: 'tp.date.yesterday(format: string = "YYYY-MM-DD")', args: { format: { name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" } } }, weekday: { name: "weekday", description: "", definition: 'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)', args: { format: { name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, weekday: { name: "weekday", description: "Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day." }, reference: { name: "reference", description: "The date referential, e.g. set this to the note's title" }, reference_format: { name: "reference_format", description: "The date reference format." } } } } }, file: { name: "file", description: "This module contains every internal function related to files.", functions: { content: { name: "content", description: "Retrieves the file's content", definition: "tp.file.content" }, create_new: { name: "create_new", description: "Creates a new file using a specified template or with a specified content.", definition: "tp.file.create_new(template: TFile \u23AE string, filename?: string, open_new: boolean = false, folder?: TFolder)", args: { template: { name: "template", description: "Either the template used for the new file content, or the file content as a string. If it is the template to use, you retrieve it with `tp.file.find_tfile(TEMPLATENAME)`" }, filename: { name: "filename", description: 'The filename of the new file, defaults to "Untitled".' }, open_new: { name: "open_new", description: "Whether to open or not the newly created file. Warning: if you use this option, since commands are executed asynchronously, the file can be opened first and then other commands are appended to that new file and not the previous file." }, folder: { name: "folder", description: 'The folder to put the new file in, defaults to obsidian\'s default location. If you want the file to appear in a different folder, specify it with `app.vault.getAbstractFileByPath("FOLDERNAME")`' } } }, creation_date: { name: "creation_date", description: "Retrieves the file's creation date.", definition: 'tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm")', args: { format: { name: "format", description: "Format for the date, refer to format reference" } } }, cursor: { name: "cursor", description: "Sets the cursor to this location after the template has been inserted. \n\nYou can navigate between the different tp.file.cursor using the configured hotkey in obsidian settings.\n", definition: "tp.file.cursor(order?: number)", args: { order: { name: "order", description: "The order of the different cursors jump, e.g. it will jump from 1 to 2 to 3, and so on.\nIf you specify multiple tp.file.cursor with the same order, the editor will switch to multi-cursor.\n" } } }, cursor_append: { name: "cursor_append", description: "Appends some content after the active cursor in the file.", definition: "tp.file.cursor_append(content: string)", args: { content: { name: "content", description: "The content to append after the active cursor" } } }, exists: { name: "exists", description: "The filename of the file we want to check existence. The fullpath to the file, relative to the Vault and containing the extension, must be provided. e.g. MyFolder/SubFolder/MyFile.", definition: "tp.file.exists(filename: string)", args: { filename: { name: "filename", description: "The filename of the file we want to check existence, e.g. MyFile." } } }, find_tfile: { name: "find_tfile", description: "Search for a file and returns its `TFile` instance", definition: "tp.file.find_tfile(filename: string)", args: { filename: { name: "filename", description: "The filename we want to search and resolve as a `TFile`" } } }, folder: { name: "folder", description: "Retrieves the file's folder name.", definition: "tp.file.folder(relative: boolean = false)", args: { relative: { name: "relative", description: "If set to true, appends the vault relative path to the folder name." } } }, include: { name: "include", description: "Includes the file's link content. Templates in the included content will be resolved.", definition: "tp.file.include(include_link: string \u23AE TFile)", args: { include_link: { name: "include_link", description: "The link to the file to include, e.g. [[MyFile]], or a TFile object. Also supports sections or blocks inclusions, e.g. [[MyFile#Section1]]" } } }, last_modified_date: { name: "last_modified_date", description: "Retrieves the file's last modification date.", definition: 'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")', args: { format: { name: "format", description: "Format for the date, refer to format reference." } } }, move: { name: "functions.move", description: "Moves the file to the desired vault location.", definition: "tp.file.move(new_path: string, file_to_move?: TFile)", args: { new_path: { name: "new_path", description: "The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. /Notes/MyNote" } } }, path: { name: "path", description: "Retrieves the file's absolute path on the system.", definition: "tp.file.path(relative: boolean = false)", args: { relative: { name: "relative", description: "If set to true, only retrieves the vault's relative path." } } }, rename: { name: "rename", description: "Renames the file (keeps the same file extension).", definition: "tp.file.rename(new_title: string)", args: { new_title: { name: "new_title", description: "The new file title." } } }, selection: { name: "selection", description: "Retrieves the active file's text selection.", definition: "tp.file.selection()" }, tags: { name: "tags", description: "Retrieves the file's tags (array of string)", definition: "tp.file.tags" }, title: { name: "title", definition: "tp.file.title", description: "Retrieves the file's title." } } }, frontmatter: { name: "frontmatter", description: "This modules exposes all the frontmatter variables of a file as variables." }, obsidian: { name: "obsidian", description: "This module exposes all the functions and classes from the obsidian API." }, system: { name: "system", description: "This module contains system related functions.", functions: { clipboard: { name: "clipboard", description: "Retrieves the clipboard's content", definition: "tp.system.clipboard()" }, prompt: { name: "prompt", description: "Spawns a prompt modal and returns the user's input.", definition: "tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false)", args: { prompt_text: { name: "prompt_text", description: "Text placed above the input field" }, default_value: { name: "default_value", description: "A default value for the input field" }, throw_on_cancel: { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, multiline: { name: "multiline", description: "If set to true, the input field will be a multiline textarea" } } }, suggester: { name: "suggester", description: "Spawns a suggester prompt and returns the user's chosen item.", definition: 'tp.system.suggester(text_items: string[] \u23AE ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined)', args: { text_items: { name: "text_items", description: "Array of strings representing the text that will be displayed for each item in the suggester prompt. This can also be a function that maps an item to its text representation." }, items: { name: "items", description: "Array containing the values of each item in the correct order." }, throw_on_cancel: { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, placeholder: { name: "placeholder", description: "Placeholder string of the prompt" }, limit: { name: "limit", description: "Limit the number of items rendered at once (useful to improve performance when displaying large lists)" } } } } }, web: { name: "web", description: "This modules contains every internal function related to the web (making web requests).", functions: { daily_quote: { name: "daily_quote", description: "Retrieves and parses the daily quote from the API https://api.quotable.io", definition: "tp.web.daily_quote()" }, random_picture: { name: "random_picture", description: "Gets a random image from https://unsplash.com/", definition: "tp.web.random_picture(size?: string, query?: string, include_size?: boolean)", args: { size: { name: "size", description: "Image size in the format `x`" }, query: { name: "query", description: "Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma `,`" }, include_dimensions: { name: "include_size", description: "Optional argument to include the specified size in the image link markdown. Defaults to false" } } } } } }; +var tp = { config: { name: "config", description: "This module exposes Templater's running configuration.\n\nThis is mostly useful when writing scripts requiring some context information.\n", functions: { template_file: { name: "template_file", description: "The `TFile` object representing the template file.", definition: "tp.config.template_file" }, target_file: { name: "target_file", description: "The `TFile` object representing the target file where the template will be inserted.", definition: "tp.config.target_file" }, run_mode: { name: "run_mode", description: "The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...)", definition: "tp.config.run_mode" }, active_file: { name: "active_file", description: "The active file (if existing) when launching Templater.", definition: "tp.config.active_file?" } } }, date: { name: "date", description: "This module contains every internal function related to dates.", functions: { now: { name: "now", description: "Retrieves the date.", definition: 'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "offset", description: "Offset for the day, e.g. set this to `-7` to get last week's date. You can also specify the offset as a string using the ISO 8601 format" }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] }, tomorrow: { name: "tomorrow", description: "Retrieves tomorrow's date.", definition: 'tp.date.tomorrow(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, yesterday: { name: "yesterday", description: "Retrieves yesterday's date.", definition: 'tp.date.yesterday(format: string = "YYYY-MM-DD")', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }] }, weekday: { name: "weekday", description: "", definition: 'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)', args: [{ name: "format", description: "Format for the date, refer to [format reference](https://momentjs.com/docs/#/displaying/format/)" }, { name: "weekday", description: "Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day." }, { name: "reference", description: "The date referential, e.g. set this to the note's title" }, { name: "reference_format", description: "The date reference format." }] } } }, file: { name: "file", description: "This module contains every internal function related to files.", functions: { content: { name: "content", description: "Retrieves the file's content", definition: "tp.file.content" }, create_new: { name: "create_new", description: "Creates a new file using a specified template or with a specified content.", definition: "tp.file.create_new(template: TFile \u23AE string, filename?: string, open_new: boolean = false, folder?: TFolder)", args: [{ name: "template", description: "Either the template used for the new file content, or the file content as a string. If it is the template to use, you retrieve it with `tp.file.find_tfile(TEMPLATENAME)`" }, { name: "filename", description: 'The filename of the new file, defaults to "Untitled".' }, { name: "open_new", description: "Whether to open or not the newly created file. Warning: if you use this option, since commands are executed asynchronously, the file can be opened first and then other commands are appended to that new file and not the previous file." }, { name: "folder", description: 'The folder to put the new file in, defaults to obsidian\'s default location. If you want the file to appear in a different folder, specify it with `app.vault.getAbstractFileByPath("FOLDERNAME")`' }] }, creation_date: { name: "creation_date", description: "Retrieves the file's creation date.", definition: 'tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference" }] }, cursor: { name: "cursor", description: "Sets the cursor to this location after the template has been inserted. \n\nYou can navigate between the different tp.file.cursor using the configured hotkey in obsidian settings.\n", definition: "tp.file.cursor(order?: number)", args: [{ name: "order", description: "The order of the different cursors jump, e.g. it will jump from 1 to 2 to 3, and so on.\nIf you specify multiple tp.file.cursor with the same order, the editor will switch to multi-cursor.\n" }] }, cursor_append: { name: "cursor_append", description: "Appends some content after the active cursor in the file.", definition: "tp.file.cursor_append(content: string)", args: [{ name: "content", description: "The content to append after the active cursor" }] }, exists: { name: "exists", description: "The filename of the file we want to check existence. The fullpath to the file, relative to the Vault and containing the extension, must be provided. e.g. MyFolder/SubFolder/MyFile.", definition: "tp.file.exists(filename: string)", args: [{ name: "filename", description: "The filename of the file we want to check existence, e.g. MyFile." }] }, find_tfile: { name: "find_tfile", description: "Search for a file and returns its `TFile` instance", definition: "tp.file.find_tfile(filename: string)", args: [{ name: "filename", description: "The filename we want to search and resolve as a `TFile`" }] }, folder: { name: "folder", description: "Retrieves the file's folder name.", definition: "tp.file.folder(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, appends the vault relative path to the folder name." }] }, include: { name: "include", description: "Includes the file's link content. Templates in the included content will be resolved.", definition: "tp.file.include(include_link: string \u23AE TFile)", args: [{ name: "include_link", description: "The link to the file to include, e.g. [[MyFile]], or a TFile object. Also supports sections or blocks inclusions, e.g. [[MyFile#Section1]]" }] }, last_modified_date: { name: "last_modified_date", description: "Retrieves the file's last modification date.", definition: 'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")', args: [{ name: "format", description: "Format for the date, refer to format reference." }] }, move: { name: "functions.move", description: "Moves the file to the desired vault location.", definition: "tp.file.move(new_path: string, file_to_move?: TFile)", args: [{ name: "new_path", description: "The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. /Notes/MyNote" }] }, path: { name: "path", description: "Retrieves the file's absolute path on the system.", definition: "tp.file.path(relative: boolean = false)", args: [{ name: "relative", description: "If set to true, only retrieves the vault's relative path." }] }, rename: { name: "rename", description: "Renames the file (keeps the same file extension).", definition: "tp.file.rename(new_title: string)", args: [{ name: "new_title", description: "The new file title." }] }, selection: { name: "selection", description: "Retrieves the active file's text selection.", definition: "tp.file.selection()" }, tags: { name: "tags", description: "Retrieves the file's tags (array of string)", definition: "tp.file.tags" }, title: { name: "title", definition: "tp.file.title", description: "Retrieves the file's title." } } }, frontmatter: { name: "frontmatter", description: "This modules exposes all the frontmatter variables of a file as variables." }, obsidian: { name: "obsidian", description: "This module exposes all the functions and classes from the obsidian API." }, system: { name: "system", description: "This module contains system related functions.", functions: { clipboard: { name: "clipboard", description: "Retrieves the clipboard's content", definition: "tp.system.clipboard()" }, prompt: { name: "prompt", description: "Spawns a prompt modal and returns the user's input.", definition: "tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false)", args: [{ name: "prompt_text", description: "Text placed above the input field" }, { name: "default_value", description: "A default value for the input field" }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "multiline", description: "If set to true, the input field will be a multiline textarea" }] }, suggester: { name: "suggester", description: "Spawns a suggester prompt and returns the user's chosen item.", definition: 'tp.system.suggester(text_items: string[] \u23AE ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined)', args: [{ name: "text_items", description: "Array of strings representing the text that will be displayed for each item in the suggester prompt. This can also be a function that maps an item to its text representation." }, { name: "items", description: "Array containing the values of each item in the correct order." }, { name: "throw_on_cancel", description: "Throws an error if the prompt is canceled, instead of returning a `null` value" }, { name: "placeholder", description: "Placeholder string of the prompt" }, { name: "limit", description: "Limit the number of items rendered at once (useful to improve performance when displaying large lists)" }] } } }, web: { name: "web", description: "This modules contains every internal function related to the web (making web requests).", functions: { daily_quote: { name: "daily_quote", description: "Retrieves and parses the daily quote from the API https://api.quotable.io", definition: "tp.web.daily_quote()" }, random_picture: { name: "random_picture", description: "Gets a random image from https://unsplash.com/", definition: "tp.web.random_picture(size?: string, query?: string, include_size?: boolean)", args: [{ name: "size", description: "Image size in the format `x`" }, { name: "query", description: "Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma `,`" }, { name: "include_size", description: "Optional argument to include the specified size in the image link markdown. Defaults to false" }] } } } }; var documentation_default = { tp }; // src/editor/TpDocumentation.ts @@ -4128,7 +3997,7 @@ var Documentation = class { }; // src/editor/Autocomplete.ts -var Autocomplete = class extends import_obsidian16.EditorSuggest { +var Autocomplete = class extends import_obsidian15.EditorSuggest { constructor() { super(app); this.tp_keyword_regex = /tp\.(?[a-z]*)?(?\.(?[a-z_]*)?)?$/; @@ -4185,15 +4054,15 @@ var Autocomplete = class extends import_obsidian16.EditorSuggest { } } selectSuggestion(value, _evt) { - const active_view = app.workspace.getActiveViewOfType(import_obsidian16.MarkdownView); - if (!active_view) { + const active_editor = app.workspace.activeEditor; + if (!active_editor || !active_editor.editor) { return; } - active_view.editor.replaceRange(value.name, this.latest_trigger_info.start, this.latest_trigger_info.end); + active_editor.editor.replaceRange(value.name, this.latest_trigger_info.start, this.latest_trigger_info.end); if (this.latest_trigger_info.start.ch == this.latest_trigger_info.end.ch) { const cursor_pos = this.latest_trigger_info.end; cursor_pos.ch += value.name.length; - active_view.editor.setCursor(cursor_pos); + active_editor.editor.setCursor(cursor_pos); } } }; @@ -5479,10 +5348,16 @@ var Editor2 = class { this.plugin = plugin; this.cursor_jumper = new CursorJumper(); } + desktopShouldHighlight() { + return import_obsidian16.Platform.isDesktopApp && this.plugin.settings.syntax_highlighting; + } + mobileShouldHighlight() { + return import_obsidian16.Platform.isMobileApp && this.plugin.settings.syntax_highlighting_mobile; + } async setup() { await this.registerCodeMirrorMode(); this.plugin.registerEditorSuggest(new Autocomplete()); - if (import_obsidian17.Platform.isDesktopApp && this.plugin.settings.syntax_highlighting) { + if (this.desktopShouldHighlight() || this.mobileShouldHighlight()) { this.plugin.registerEditorExtension(import_language.StreamLanguage.define(window.CodeMirror.getMode({}, { name: "templater" }))); } } @@ -5490,16 +5365,13 @@ var Editor2 = class { if (auto_jump && !this.plugin.settings.auto_jump_to_cursor) { return; } - if (file && app.workspace.getActiveFile() !== file) { + if (file && app.workspace.activeEditor?.file !== file) { return; } await this.cursor_jumper.jump_to_next_cursor_location(); } async registerCodeMirrorMode() { - if (!this.plugin.settings.syntax_highlighting) { - return; - } - if (import_obsidian17.Platform.isMobileApp) { + if (!this.desktopShouldHighlight() && !this.mobileShouldHighlight()) { return; } const js_mode = window.CodeMirror.getMode({}, "javascript"); @@ -5585,7 +5457,7 @@ var Editor2 = class { }; // src/main.ts -var TemplaterPlugin = class extends import_obsidian18.Plugin { +var TemplaterPlugin = class extends import_obsidian17.Plugin { async onload() { await this.load_settings(); this.templater = new Templater(this); @@ -5597,7 +5469,7 @@ var TemplaterPlugin = class extends import_obsidian18.Plugin { this.event_handler.setup(); this.command_handler = new CommandHandler(this); this.command_handler.setup(); - (0, import_obsidian18.addIcon)("templater-icon", ICON_DATA); + (0, import_obsidian17.addIcon)("templater-icon", ICON_DATA); if (this.settings.enable_ribbon_icon) { this.addRibbonIcon("templater-icon", "Templater", async () => { this.fuzzy_suggester.insert_template(); diff --git a/.obsidian/plugins/templater-obsidian/manifest.json b/.obsidian/plugins/templater-obsidian/manifest.json index 70cf5959..b28f9ee7 100644 --- a/.obsidian/plugins/templater-obsidian/manifest.json +++ b/.obsidian/plugins/templater-obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "templater-obsidian", "name": "Templater", - "version": "1.16.0", + "version": "1.16.1", "description": "Create and use templates", "minAppVersion": "0.11.13", "author": "SilentVoid", diff --git a/.obsidian/plugins/templater-obsidian/styles.css b/.obsidian/plugins/templater-obsidian/styles.css index 207db950..c9ece98e 100644 --- a/.obsidian/plugins/templater-obsidian/styles.css +++ b/.obsidian/plugins/templater-obsidian/styles.css @@ -107,142 +107,81 @@ textarea.templater-prompt-input:focus { } .cm-s-obsidian .cm-templater-command.cm-templater-interpolation-tag { - color: #008bff; + color: var(--code-property, #008bff); } .cm-s-obsidian .cm-templater-command.cm-templater-execution-tag { - color: #c0d700; + color: var(--code-function, #c0d700); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-keyword { - color: #00a7aa; +.cm-s-obsidian .cm-templater-command.cm-keyword { + color: var(--code-keyword, #00a7aa); font-weight: normal; } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-atom { - color: #f39b35; +.cm-s-obsidian .cm-templater-command.cm-atom { + color: var(--code-normal, #f39b35); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-number { - color: #a06fca; +.cm-s-obsidian .cm-templater-command.cm-value, +.cm-s-obsidian .cm-templater-command.cm-number, +.cm-s-obsidian .cm-templater-command.cm-type { + color: var(--code-value, #a06fca); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-type { - color: #a06fca; +.cm-s-obsidian .cm-templater-command.cm-def, +.cm-s-obsidian .cm-templater-command.cm-type.cm-def { + color: var(--code-normal, var(--text-normal)); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-def { - color: #98e342; +.cm-s-obsidian .cm-templater-command.cm-property, +.cm-s-obsidian .cm-templater-command.cm-property.cm-def, +.cm-s-obsidian .cm-templater-command.cm-attribute { + color: var(--code-function, #98e342); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-property { - color: #d4d4d4; +.cm-s-obsidian .cm-templater-command.cm-variable, +.cm-s-obsidian .cm-templater-command.cm-variable-2, +.cm-s-obsidian .cm-templater-command.cm-variable-3, +.cm-s-obsidian .cm-templater-command.cm-meta { + color: var(--code-property, #d4d4d4); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-variable { - color: #d4d4d4; +.cm-s-obsidian .cm-templater-command.cm-callee, +.cm-s-obsidian .cm-templater-command.cm-operator, +.cm-s-obsidian .cm-templater-command.cm-qualifier, +.cm-s-obsidian .cm-templater-command.cm-builtin { + color: var(--code-operator, #fc4384); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-variable-2 { - color: #da7dae; +.cm-s-obsidian .cm-templater-command.cm-tag { + color: var(--code-tag, #fc4384); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-variable-3 { - color: #a06fca; +.cm-s-obsidian .cm-templater-command.cm-comment, +.cm-s-obsidian .cm-templater-command.cm-comment.cm-tag, +.cm-s-obsidian .cm-templater-command.cm-comment.cm-attribute { + color: var(--code-comment, #696d70); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-type.cm-def { - color: #fc4384; +.cm-s-obsidian .cm-templater-command.cm-string, +.cm-s-obsidian .cm-templater-command.cm-string-2 { + color: var(--code-string, #e6db74); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-property.cm-def { - color: #fc4384; +.cm-s-obsidian .cm-templater-command.cm-header, +.cm-s-obsidian .cm-templater-command.cm-hr { + color: var(--code-keyword, #da7dae); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-callee { - color: #fc4384; +.cm-s-obsidian .cm-templater-command.cm-link { + color: var(--code-normal, #696d70); } -.theme-dark .cm-s-obsidian .cm-templater-command.cm-operator { - color: #fc4384; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-qualifier { - color: #fc4384; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-tag { - color: #fc4384; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-tag.cm-bracket { - color: #d4d4d4; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-attribute { - color: #a06fca; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-comment { - color: #696d70; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-comment.cm-tag { - color: #fc4384; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-comment.cm-attribute { - color: #d4d4d4; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-string { - color: #e6db74; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-string-2 { - color: #f39b35; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-meta { - color: #d4d4d4; - background: inherit; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-builtin { - color: #fc4384; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-header { - color: #da7dae; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-hr { - color: #98e342; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-link { - color: #696d70; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.cm-error { +.cm-s-obsidian .cm-templater-command.cm-error { border-bottom: 1px solid #c42412; } -.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-keyword { - font-weight: normal; -} - -.theme-dark - .cm-s-obsidian - .cm-templater-command.CodeMirror-activeline-background { - background: #272727; -} - -.theme-dark .cm-s-obsidian .cm-templater-command.CodeMirror-matchingbracket { - outline: 1px solid grey; - color: #d4d4d4 !important; -} - .CodeMirror-hints { position: absolute; z-index: 10; diff --git a/.obsidian/workspace-mobile.json b/.obsidian/workspace-mobile.json index 03f636c5..b26ff24f 100644 --- a/.obsidian/workspace-mobile.json +++ b/.obsidian/workspace-mobile.json @@ -69,7 +69,7 @@ "state": { "type": "markdown", "state": { - "file": "01.02 Home/@Main Dashboard.md", + "file": "03.04 Cinematheque/The Lord of the Rings - The Return of the King (2003).md", "mode": "preview", "source": false } @@ -158,7 +158,7 @@ "state": { "type": "backlink", "state": { - "file": "01.02 Home/@Main Dashboard.md", + "file": "03.04 Cinematheque/The Lord of the Rings - The Return of the King (2003).md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -175,7 +175,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "01.02 Home/@Main Dashboard.md", + "file": "03.04 Cinematheque/The Lord of the Rings - The Return of the King (2003).md", "linksCollapsed": false, "unlinkedCollapsed": false } @@ -217,7 +217,6 @@ }, "left-ribbon": { "hiddenItems": { - "templater-obsidian:Templater": false, "obsidian-camera:Obsidian Camera": false, "switcher:Open quick switcher": false, "graph:Open graph view": false, @@ -238,44 +237,45 @@ "obsidian-read-it-later:ReadItLater: Save clipboard": false, "obsidian-tts:Text to Speech": false, "obsidian-gallery:Gallery": false, - "meld-encrypt:New encrypted note": false, - "meld-encrypt:Convert to or from an Encrypted note": false, "obsidian-metatable:Metatable": false, "obsidian-full-calendar:Open Full Calendar": false, - "obsidian-memos:Memos": false + "obsidian-memos:Memos": false, + "templater-obsidian:Templater": false, + "meld-encrypt:New encrypted note": false, + "meld-encrypt:Convert to or from an Encrypted note": false } }, - "active": "2d9db1814950ef3b", + "active": "1f6a6b4151d812b3", "lastOpenFiles": [ - "01.07 Animals/Felix Hoffmann.md", + "03.04 Cinematheque/The Godfather Part II (1974).md", + "03.04 Cinematheque/Men in Black II (2002).md", + "03.04 Cinematheque/Lock Stock and Two Smoking Barrels (1998).md", + "03.04 Cinematheque/Jaws 2 (1978).md", + "03.04 Cinematheque/Jaws (1975).md", + "03.04 Cinematheque/John Wick - Chapter 2 (2017).md", + "03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md", + "03.04 Cinematheque/John Wick - Chapter 4 (2023).md", + "03.04 Cinematheque/John Wick (2014).md", + "00.01 Admin/Calendars/2023-10-01.md", + "04.03 Creative snippets/Working note - Project 1.md", + "03.04 Cinematheque/@Cinematheque.md", + "03.04 Cinematheque/The Hunger Games (2012).md", + "03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md", + "03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md", + "03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md", + "03.04 Cinematheque/Indiana Jones and the Last Crusade (1989).md", "01.07 Animals/@Sally.md", - "02.03 Zürich/Polo Park Zürich.md", + "01.07 Animals/Felix Hoffmann.md", "01.02 Home/@Main Dashboard.md", - "00.02 Inbox/Untitled.md", - "01.07 Animals/@@Animals Master.md", - "01.02 Home/@Shopping list.md", - "03.03 Food & Wine/Spiced Eggs with Tzatziki.md", - "00.01 Admin/Calendars/2023-09-25.md", - "00.01 Admin/Pictures/Sally/ima1046640698913285522.jpeg", - "00.03 News/The radical earnestness of Tony P.md", + "00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md", + "00.03 News/How Hip-Hop Conquered the World.md", + "00.03 News/Confessions of a McKinsey Whistleblower.md", + "00.03 News/How a Man in Prison Stole Millions from Billionaires.md", "00.03 News/Florida has become a zoo. A literal zoo..md", - "00.01 Admin/Calendars/2023-09-24.md", - "00.01 Admin/Calendars/Events/2023-09-24 ⚽️ PSG - O Marseille (4-0).md", - "00.01 Admin/Calendars/2023-09-23.md", - "03.03 Food & Wine/Korean Barbecue-Style Meatballs.md", - "01.07 Animals/2023-09-23 Patron's Cup.md", - "01.07 Animals/2023-09-21 Last ironing.md", - "03.03 Food & Wine/Torched Banana Cake.md", - "03.03 Food & Wine/@Desserts.md", - "03.03 Food & Wine/Japanese Souffle Pancakes.md", + "00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md", + "00.01 Admin/Pictures/Sally/ima1046640698913285522.jpeg", "00.01 Admin/Pictures/Sally/8db2ca52-4745-49db-8efc-5c0b8795e65d.jpg", "00.01 Admin/Pictures/Sally/ac7647bf-ac03-45fe-a4d5-d0eab35198ea.jpg", - "01.07 Animals/2023-09-02 First Tournament.md", - "01.07 Animals/2023-09-22 Vet Clearance.md", - "00.01 Admin/Calendars/2023-09-22.md", - "00.03 News/Conservatives Have a New Master Theory of American Politics.md", - "01.02 Home/Bandes Dessinées.md", - "00.03 News/Why Bill Watterson Vanished - The American Conservative.md", "00.01 Admin/Pictures/Sally/ima13927264761198733686.jpeg", "00.01 Admin/Pictures/Sally/IMG_3710.jpg", "00.01 Admin/Pictures/Sally/IMG_3716.jpg", diff --git a/00.01 Admin/Calendars/2023-09-14.md b/00.01 Admin/Calendars/2023-09-14.md index c06e4da0..d3180038 100644 --- a/00.01 Admin/Calendars/2023-09-14.md +++ b/00.01 Admin/Calendars/2023-09-14.md @@ -103,8 +103,8 @@ This section does serve for quick memos.   - [x] 16:12 :house: [[@Life Admin|Admin]]: Buy shelves for the pantry 📅 2023-09-30 ✅ 2023-09-20 ^temkxw - [x] 16:13 :house: [[@Life Admin|Admin]]: Buy furnitures for the balcony 📅 2023-09-30 ✅ 2023-09-20 -- [ ] 16:14 :house: [[@Life Admin|Admin]]: Start checking auction website for opportunities to buy 📅 2023-09-30 -- [ ] 16:17 :house: [[@Life Admin|Admin]]: Buy lamps for the flat 📅 2023-09-28 +- [ ] 16:14 :house: [[@Life Admin|Admin]]: Start checking auction website for opportunities to buy 📅 2023-10-15 +- [x] 16:17 :house: [[@Life Admin|Admin]]: Buy lamps for the flat 📅 2023-09-28 ✅ 2023-09-29 - [x] 16:25 :racehorse: [[@Sally|Sally]]: Print Health certificate 📅 2023-09-20 ✅ 2023-09-18 diff --git a/00.01 Admin/Calendars/2023-09-20.md b/00.01 Admin/Calendars/2023-09-20.md index 6f7ce5c6..9dce5d2c 100644 --- a/00.01 Admin/Calendars/2023-09-20.md +++ b/00.01 Admin/Calendars/2023-09-20.md @@ -103,8 +103,8 @@ This section does serve for quick memos.   - [x] 11:57 :house: [[@Life Admin|Admin]]: Change address at the bank 📅 2023-09-30 ✅ 2023-09-21 -- [ ] 11:58 :house: [[@Life Admin|Admin]]: Change address for Insurances 📅2023-09-30 -- [ ] 11:59 :house: [[@Life Admin|Admin]]: Change address at Consulate 📅2023-09-30 +- [x] 11:58 :house: [[@Life Admin|Admin]]: Change address for Insurances 📅 2023-09-30 ✅ 2023-09-29 +- [x] 11:59 :house: [[@Life Admin|Admin]]: Change address at Consulate 📅 2023-09-30 ✅ 2023-09-30 - [ ] 12:04 :house: [[@Life Admin|Admin]]: Change address at Verkehrsamt 📅2023-09-30 diff --git a/00.01 Admin/Calendars/2023-09-22.md b/00.01 Admin/Calendars/2023-09-22.md index 0fe1768a..74445b8a 100644 --- a/00.01 Admin/Calendars/2023-09-22.md +++ b/00.01 Admin/Calendars/2023-09-22.md @@ -114,7 +114,7 @@ This section does serve for quick memos.   -Loret ipsum +🚆: A/R de [[@@Zürich|Zürich]] à [[Geneva]]   diff --git a/00.01 Admin/Calendars/2023-09-25.md b/00.01 Admin/Calendars/2023-09-25.md index 804f353e..67fdbfed 100644 --- a/00.01 Admin/Calendars/2023-09-25.md +++ b/00.01 Admin/Calendars/2023-09-25.md @@ -16,9 +16,9 @@ Stress: 25 FrontHeadBar: 5 EarHeadBar: 20 BackHeadBar: 30 -Water: 2.5 +Water: 3 Coffee: 4 -Steps: +Steps: 11527 Weight: Ski: IceSkating: diff --git a/00.01 Admin/Calendars/2023-09-26.md b/00.01 Admin/Calendars/2023-09-26.md new file mode 100644 index 00000000..9c32810f --- /dev/null +++ b/00.01 Admin/Calendars/2023-09-26.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-09-26 +Date: 2023-09-26 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 2.58 +Coffee: 1 +Steps: 5339 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-25|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-09-27|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-09-26Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-09-26NSave + +  + +# 2023-09-26 + +  + +> [!summary]+ +> Daily note for 2023-09-26 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-09-26 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🚆: [[@@Zürich|Zürich]] to [[@@Paris|Paris]] + +📖: [[Le Temps gagné]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-09-26]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-09-27.md b/00.01 Admin/Calendars/2023-09-27.md new file mode 100644 index 00000000..b44e24c6 --- /dev/null +++ b/00.01 Admin/Calendars/2023-09-27.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-09-27 +Date: 2023-09-27 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 6.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 4.33 +Coffee: 5 +Steps: 7491 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-26|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-09-28|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-09-27Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-09-27NSave + +  + +# 2023-09-27 + +  + +> [!summary]+ +> Daily note for 2023-09-27 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-09-27 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🚆: [[@@Paris|Paris]] to [[@@Zürich|Zürich]] + +📖: [[Le Temps gagné]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-09-27]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-09-28.md b/00.01 Admin/Calendars/2023-09-28.md new file mode 100644 index 00000000..6021fb73 --- /dev/null +++ b/00.01 Admin/Calendars/2023-09-28.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-09-28 +Date: 2023-09-28 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 3.5 +Coffee: 2 +Steps: 5323 +Weight: 89.6 +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-27|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-09-29|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-09-28Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-09-28NSave + +  + +# 2023-09-28 + +  + +> [!summary]+ +> Daily note for 2023-09-28 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-09-28 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  +- [ ] 21:26 :racehorse: [[@Sally|Sally]]: Buy a mask against the flies 📅2024-03-31 ^vbiiyw +- [ ] 21:27 :racehorse: [[@Sally|Sally]]: Buy a lead (longe) 📅2024-03-31 + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-09-28]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-09-29.md b/00.01 Admin/Calendars/2023-09-29.md new file mode 100644 index 00000000..86fbc93d --- /dev/null +++ b/00.01 Admin/Calendars/2023-09-29.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-09-29 +Date: 2023-09-29 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 8.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 2.75 +Coffee: 1 +Steps: 6625 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-28|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-09-30|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-09-29Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-09-29NSave + +  + +# 2023-09-29 + +  + +> [!summary]+ +> Daily note for 2023-09-29 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-09-29 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍽: [[William's ButchersTable]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-09-29]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-09-30.md b/00.01 Admin/Calendars/2023-09-30.md new file mode 100644 index 00000000..2ece3a73 --- /dev/null +++ b/00.01 Admin/Calendars/2023-09-30.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-09-30 +Date: 2023-09-30 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 1.75 +Coffee: 1 +Steps: 10306 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-29|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-10-01|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-09-30Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-09-30NSave + +  + +# 2023-09-30 + +  + +> [!summary]+ +> Daily note for 2023-09-30 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-09-30 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-09-30]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2023-10-01.md b/00.01 Admin/Calendars/2023-10-01.md new file mode 100644 index 00000000..7ebfde52 --- /dev/null +++ b/00.01 Admin/Calendars/2023-10-01.md @@ -0,0 +1,135 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2023-10-01 +Date: 2023-10-01 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 20 +BackHeadBar: 30 +Water: 2.5 +Coffee: 2 +Steps: +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2023-09-30|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2023-10-02|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2023-10-01Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2023-10-01NSave + +  + +# 2023-10-01 + +  + +> [!summary]+ +> Daily note for 2023-10-01 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2023-10-01 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  +- [ ] 10:08 :house: :potted_plant: [[@Life Admin|Admin]]: Look at plants and aromatic garden 📅2023-10-31 ^fixwhn + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍽: [[Korean Barbecue-Style Meatballs]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2023-10-01]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2024-06-08 💍 Mariage Rémi & Séverine.md b/00.01 Admin/Calendars/Events/2024-06-08 💍 Mariage Rémi & Séverine.md new file mode 100644 index 00000000..c498892f --- /dev/null +++ b/00.01 Admin/Calendars/Events/2024-06-08 💍 Mariage Rémi & Séverine.md @@ -0,0 +1,22 @@ +--- + +title: 💍 Mariage Rémi & Séverine +allDay: true +date: 2024-06-08 +completed: null +CollapseMetaTable: true + +--- + +[[2024-06-08|Ce jour]], mariage de Rémi & Séverine + +Contacts: +🏠 +1C Carmalt Gardens +Londres SW15 6NE + +📞 +06 98 11 94 17 + +📧 +severine.remi.2024@gmail.com diff --git a/00.01 Admin/Templates/Template Source.md b/00.01 Admin/Templates/Template Source.md index 0a8677e0..3f906623 100644 --- a/00.01 Admin/Templates/Template Source.md +++ b/00.01 Admin/Templates/Template Source.md @@ -8,7 +8,7 @@ Hierarchy: "NonRoot" TimeStamp: location: Source: - Type: + Type: "Source" Language: Author: Published: diff --git a/00.02 Inbox/Le Camp des Saints.md b/00.02 Inbox/Le Camp des Saints.md index 52224492..55a0b3f3 100644 --- a/00.02 Inbox/Le Camp des Saints.md +++ b/00.02 Inbox/Le Camp des Saints.md @@ -19,7 +19,7 @@ CollapseMetaTable: true --- Parent:: [[@Reading master|Reading list]] -ReadingState:: 🟥 +ReadingState:: 🟧 --- diff --git a/00.03 News/A Mother’s Exchange for Her Daughter’s Future.md b/00.03 News/A Mother’s Exchange for Her Daughter’s Future.md index b10669a5..82726b44 100644 --- a/00.03 News/A Mother’s Exchange for Her Daughter’s Future.md +++ b/00.03 News/A Mother’s Exchange for Her Daughter’s Future.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-27]] --- diff --git a/00.03 News/Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego.md b/00.03 News/Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego.md new file mode 100644 index 00000000..39c31520 --- /dev/null +++ b/00.03 News/Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego.md @@ -0,0 +1,271 @@ +--- + +Tag: ["🗳️", "🇮🇱", "👤"] +Date: 2023-10-01 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-10-01 +Link: https://www.nytimes.com/2023/09/27/magazine/benjamin-netanyahu-israel.html +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-NetanyahuTwoDecadesofPowerBlusterEgoNSave + +  + +# Benjamin Netanyahu’s Two Decades of Power, Bluster and Ego + +![A portrait of Netanyahu composed of various images of his face collaged together.](https://static01.nyt.com/images/2023/10/01/magazine/01oct-netanyahu/01oct-netanyahu-articleLarge.jpg?quality=75&auto=webp&disable=upscale) + +Credit...Photo illustration by Lola Dupre + +The nation’s current crisis can be traced back, in ways large and small, to the outsize personality of its longest-serving prime minister. + +Credit...Photo illustration by Lola Dupre + +Ruth Margalit + +Ruth Margalit, a contributing writer for The Times Magazine, spoke to more than 50 of Netanyahu’s childhood acquaintances, friends, current and former associates, critics and biographers, for this article. She is based in Tel Aviv. + +- Published Sept. 27, 2023Updated Sept. 28, 2023 + +Flanked by two bickering ministers, Benjamin Netanyahu appeared to shrivel in his seat. It was late July in the Knesset, the last week before the summer recess, but there was no anticipatory buzz in the air. While lawmakers were preparing to vote, anti-government protesters, walled off from Parliament by newly installed barbed wire, chanted *“Busha!”* — “Shame!” + +### Listen to This Article + +Sitting to Netanyahu’s left was Yariv Levin, Israel’s dour justice minister, a man “with less charisma than that of a napkin,” in the mordant opinion of Anshel Pfeffer, a Haaretz journalist and Netanyahu biographer. To Netanyahu’s right was Yoav Gallant, a former major general who serves as Israel’s defense minister. The two ministers hail from the right-wing Likud party, as does Netanyahu himself. But their consensus — much like every other consensus in the country — had splintered. Levin’s camp was bent on using the government’s majority to pass a package of bills that would do away with judicial oversight in the country and concentrate power in its hands. Gallant’s camp, seeing the extraordinary blowback that the bills had touched off around the nation, worried that this was a step too far. + +The manner of the proposed legislative package (unilateral; rushed through) and scope ([total overhaul of the system](https://www.nytimes.com/article/israel-judiciary-crisis-explainer.html)) had managed to rattle a public that had already accepted the most extremist coalition in Israeli history. Israel has no written constitution. Its Parliament is largely toothless as a check on power: The governing coalition has the majority and the means to impose its decisions there. Now it was proposing to neutralize the only curb to executive overreach: the country’s Supreme Court. + +Hundreds of thousands of [protesters have poured onto the streets](https://www.haaretz.com/israel-news/judicial-coup/2023-09-23/ty-article/.premium/israelis-protest-against-netanyahu-for-38th-week-ahead-of-yom-kippur/0000018a-c34d-d3ca-a9ef-c3ed2ee10000) of Tel Aviv and other Israeli cities every Saturday since the legislation was introduced in January. The energy and breadth of the protest movement has been staggering. To see this human wave surge through blocked highways shouting “Democracy!” is to glimpse Israeli society in all its variety: There are white-coat groups (doctors) and black robes (lawyers), Brothers and Sisters in Arms (military reservists), Handmaids (women’s groups), students, teachers, young people, academics, anti-occupation activists, “religious Zionist democrats,” high-tech workers and civil servants. + +Image + +![An aerial view of demonstrators on the streets of Tel Aviv.](https://static01.nyt.com/images/2023/10/01/magazine/01mag-Netanyahu-04/01mag-Netanyahu-04-articleLarge.jpg?quality=75&auto=webp&disable=upscale) + +Demonstrators opposed to Prime Minister Benjamin Netanyahu’s judicial overhaul in July.Credit...Yair Palti/Anadolu Agency via Getty Images + +With the proposed judicial overhaul came ominous warnings from Moody’s and other financial agencies about a “deterioration of Israel’s governance” and a downgrading of the country’s credit outlook. Foreign investments were pulled; the shekel depreciated. Military reservists threatened to not show up for duty. Panicking, Netanyahu, Israel’s longest-serving prime minister, [suspended the legislation in March](https://www.nytimes.com/live/2023/03/27/world/israel-protests-netanyahu). But this prompted his base to rebel, calling it a “surrender.” As one Likud lawmaker posted on Twitter, “You voted right and you got left.” The pressure on Netanyahu closed in from all sides. “If it were up to Bibi, the overhaul would simply disappear, but he can’t because the genie is now out of the bottle,” Tal Shalev, a political reporter for Walla News, told me. + +By July, Netanyahu calculated that he was paying a steep public cost and getting nothing in return. Suspending the legislation had been a strategic mistake, his advisers reasoned: If the other side realized that the “unilateral threat is real” — that the government was willing to pass bills without seeking wider approval from the opposition — “they’ll move to compromise,” a source close to Netanyahu told me earlier that month. The judicial overhaul was back on the table. + +The issue before Parliament now, as Netanyahu sat between his squabbling ministers, was an amendment that would bar the Supreme Court from using a standard of reasonableness to reverse government decisions. Gallant was desperate for a last-minute compromise, concerned about military disunity. Levin was steadfast in his intention to push the law through. + +“Give me something!” Gallant pleaded over Netanyahu’s head. + +Netanyahu sat there, mute and impassive, uncharacteristically careless about the optics. Though he prefers not to be seen wearing his eyeglasses, enlarging the font of his speeches to 24, he kept them on this time. + +Shortly after 3:30 p.m., the Knesset speaker announced a roll-call vote, to the sound of jeers. One by one, the coalition members stated “In favor” while the opposition members all rose from their seats, some pounding their fists, others calling out “Shame!” and stalked out of the plenum, refusing to vote. “There is no prime minister in Israel,” Yair Lapid, the head of the opposition, said to reporters outside. “Netanyahu has become a puppet on a string of messianic extremists.” + +As soon as the vote passed, 64-0, lawmakers made a beeline to Levin’s desk, where, beaming, they took selfies with him. Few noticed the man who rose from his chair, folded his eyeglasses and, looking “mortified,” as one observer put it, quietly made for the doors. + +**Netanyahu thinks of** himself in Churchillian terms. He would like to be remembered as the leader who faced down the Iran menace, the savior of Israel in the face of forbidding odds for the Jewish people. But the country’s 75th year will be noted for something quite different. Its democracy is dimming; the public has never been more divided. Netanyahu has pushed Israel to the brink, gradually and then suddenly. + +In 1996, when he first moved into the prime minister’s residence, Netanyahu was 46, broad faced, with appealing asymmetrical eyes (one hooded, the other wide open) — the first head of the country to be born after its founding, in 1948, and one who brought an unapologetic outlook toward Israel’s occupation of the West Bank. Now 73, he is besieged on multiple fronts. He [stands trial in three cases of corruption](https://www.nytimes.com/2022/11/03/world/middleeast/netanyahu-corruption-charges-israel.html) that were rolled into one indictment in 2019 — charges he denies. Though his wife, Sara, is not a defendant, two of the cases feature her. Reports of their dealings, and those of their elder son, Yair, have the trappings of a royal soap opera: a steady supply of Champagne, cigars and expensive jewelry; demands for fawning press coverage; flagrant interference in matters of appointments and policy. These days, his gait is halting; his shoulders are hunched. His eyes sag. Try as his aides might, they have no way to spin this: The man looks exhausted. + +The judicial overhaul has now jeopardized every one of his perceived accomplishments, including Israel’s economic success and its international standing. Netanyahu is “in a Job-like state,” Nahum Barnea, a veteran columnist for Yedioth Ahronoth, told me. His coalition members embarrass him on a daily basis. His legal woes are mounting. On top of which, Barnea added, “He can’t travel to the White House, and it’s killing him.” (Netanyahu’s meeting with President Biden on Sept. 20 was the first since [Netanyahu’s re-election](https://www.nytimes.com/2022/11/03/world/middleeast/israel-netanyahu-election.html) last November and came on the sidelines of the United Nations General Assembly.) Still, many who know Netanyahu well rebuff the suggestion that he is losing control. “That’s like saying that Orban or Erdogan has lost control,” a former senior aide to Netanyahu told me recently. + +But while the judicial overhaul is unpopular — only one in four Israelis wants it to proceed, according to a recent survey by the Israel Democracy Institute — it hasn’t diminished the passion of Netanyahu’s core supporters. In a recent poll measuring suitability to lead the country, he and Benny Gantz, who heads the centrist National Unity party, were tied with 38 percent each. (By comparison, Lapid, the current opposition leader, trailed them with 29 percent.) For vast parts of the country, from the Jewish settlements in the West Bank to ultra-Orthodox enclaves to Israel’s impoverished development towns, he remains “King Bibi.” + +His status is such that his personal base of supporters is far greater than that of his party. Campaign posters from 2019 showed him shaking hands with Donald Trump and Vladimir Putin, with the caption “Netanyahu: A Different League.” For his electorate, he is exactly that: a once-in-a-generation leader, suave and polished, speaking a refined American English, and also a bare-knuckled sabra who has shown no qualms about taking on Barack Obama, the Palestinian leadership and the U. N. Security Council. “He has turned himself into a symbol for entire sectors of the public that are drastically different from him but that are willing to die for him,” Zeev Elkin, a former Likud minister under Netanyahu who is now chairman of National Unity, told me. + +Image + +Yariv Levin, Israel’s justice minister, in January.Credit...Olivier Fitoussi/Flash90 + +Netanyahu is secular and Ashkenazi (of Jewish European origins); he comes from a liberal milieu in Jerusalem that is similar to the social elites against which he, and his voters, rail. He is erudite, thorough, lonesome and vengeful. He is prone to grandiloquence, but then so are his admirers: “I look at Bibi and think that he’s a rare man, and we should thank God every day for giving us such a gift,” Benny Ziffer, a friend of his, told me. + +One of Netanyahu’s main achievements in office has been overseeing Israel’s transformation into a country with one of the highest per-capita investments in start-ups in the world; a second has been forging relations with the United Arab Emirates, Bahrain, Sudan and Morocco. Each achievement has asterisks attached. In the early 2000s, he served as finance minister in the government of Ariel Sharon; he spurred growth in part by slashing large annual subsidies to the ultra-Orthodox. He then led Likud to its worst-ever defeat in an election. Lesson learned: Never again would he dare cross the Haredim, or ultra-Orthodox. As prime minister, Netanyahu has since doled out more annual subsidies and additional inflated budgets to the Haredim than any leader before him. A Haredi family in which the father is unemployed (as more than half of Haredi men are) now receives four times more financial assistance than a non-Haredi Jewish household, one research institute found. + +Admirers credit Netanyahu with “changing the paradigm” around the Israeli-Palestinian conflict, Boaz Bismuth, a Likud lawmaker, told me. Netanyahu did so by effectively bypassing the Palestinians and signing normalization agreements with other Arab countries in the region. But those agreements, known as the Abraham Accords, are the diplomatic end result of an arms deal in which Israel would provide nearly all signatories with [licenses to its powerful cybersurveillance technology Pegasus](https://www.nytimes.com/2022/01/28/magazine/nso-group-israel-spyware.html), as an investigation in this magazine revealed last year. “He made use of knowledge and technologies to get closer to dictators,” a former senior defense official told me. A normalization agreement with Saudi Arabia, which Netanyahu is eager to advance, would be even more consequential. But such a deal would entail concessions to the Palestinians, something that his extremist coalition partners would no doubt torpedo. + +Netanyahu’s impressive endurance in office is, in part, a reflection of his enlarged base. The Likud electorate has historically been the Mizrahi (Jews of Middle Eastern and North African descent), the religiously observant, the noncollege-educated and the poor. But it has expanded to include Israelis who support his conservative economic agenda and others who cite his reluctance to go to needless wars and his international connections, Mazal Mualem writes in “Cracking the Netanyahu Code.” Netanyahu has refashioned Likud from a hawkish yet liberal party into a populist party wholly in his thrall. + +But a broadened Likud base, even when combined with ultra-Orthodox allies, still doesn’t amount to a majority in Parliament. For that, Netanyahu turned to the far right. Last year, he orchestrated an [alliance between two competing hard-right factions](https://www.timesofisrael.com/netanyahu-meets-ben-gvir-smotrich-in-bid-to-press-far-right-merger/) in order to guarantee that their joint list made it to the Knesset and into his governing coalition. One faction, led by Bezalel Smotrich, an ultranationalist zealot and Israel’s current finance minister, represents the interests of the growing settler movement, which numbers more than 600,000 in the West Bank, including East Jerusalem. The second, headed by Itamar Ben-Gvir, a man [convicted of support for a terrorist organization,](https://www.newyorker.com/magazine/2023/02/27/itamar-ben-gvir-israels-minister-of-chaos) is an offshoot of a virulent racist movement founded by the Brooklyn-born rabbi, Meir Kahane. Under Netanyahu, the Israeli left has not only diminished but is regarded by much of Israeli society as illegitimate: not Jewish enough, not patriotic enough. + +“There has always been this dualistic element in covering Netanyahu,” Shalev, the Walla journalist, says. “Netanyahu the politician versus Netanyahu the statesman; the responsible Netanyahu versus the corrupt Netanyahu; Netanyahu in English versus Netanyahu in Hebrew; Dr. Netanyahu, Mr. Bibi. There was always this dissonance. But he managed to synchronize it so that you at least knew what his goals were.” She went on: “At the start of this government, Bibi laid out four goals” — preventing a nuclear Iran, restoring security, bringing down the cost of living and expanding Israel’s diplomatic ties — “and every day something happens that is counterproductive to those goals. You no longer understand what he is doing.” + +If the various components of the judicial overhaul pass, Israeli democracy will be in peril: The courts will be powerless, a government-appointed authority will be tasked with overseeing broadcast media, a parallel system will be set up for the ultra-Orthodox, who will be exempt from military conscription and whose children will receive only minimal education in core subjects such as math and science. The experiment of finding a balance between the Jewish and the democratic aspects of the state will be tipped toward the former. + +Netanyahu, more than anyone, is responsible for this transformation: a leader whose blend of staying power, deep suspicions and legal entanglements have hollowed out the political discourse in his country. These days, Israeli society can be seen as a reflection of Netanyahu and his neuroses; an entire political class is now devoted to burrowing into his psyche for clues on how far he is willing go. + +Netanyahu declined to speak to me for this article. In response to a detailed fact-checking request, Netanyahu’s office offered only this statement: “Your questions indicate a malicious and farcical hit job aimed at smearing a strong conservative Israeli prime minister. Such a compilation of regurgitated and tired lies — all of which have previously been discredited — is not worthy of our response.” + +But in speaking to more than 50 people around Netanyahu — childhood acquaintances, friends, current and former associates, outside observers, critics and biographers, some of whom asked to remain anonymous to talk about sensitive matters — what emerged was a portrait of a remarkable yet flawed man whose vision for Israel has become clouded by self-interest; a leader who has fallen prey to the idea that, in the words of his wife, “Without Bibi the country is lost.” + +**Cela Netanyahu** predicted that her middle son, nicknamed Bibi after a cousin with the same name, would become a painter. The historian Benzion Netanyahu told an interviewer in 1998 that his son was suited for the role of foreign minister. (The compliment was barbed: Netanyahu was already prime minister at the time.) In “Bibi: My Story,” his 2022 memoir, which he wrote longhand in English, Netanyahu underplays his privilege: military service in the elite Matkal Unit; university studies at M.I.T.; a job at the prestigious Boston Consulting Group. “I had taken all these decisions with an attitude of ‘What the hell, let’s give it a try and see what happens,’” he writes. + +Tragedy soon brought his life into focus. On July 4, 1976, as the United States celebrated its bicentennial, an Air France flight taking off from Tel Aviv was diverted to Entebbe, [Uganda, by Palestinian and German terrorists.](https://www.nytimes.com/1976/07/11/archives/drama-in-hijacking-of-jet-to-uganda-a-long-week-of-terror-and.html) An Israeli commando force raided the airfield where the hostages were held. More than 100 hostages were successfully liberated, but an Israeli officer was killed in the rescue. Netanyahu was living in Boston at the time with his then wife, Miki Weissman, whom he started seeing while both were still in high school. He went by the name Ben Nitay and worked as a consultant. That summer night, the couple’s phone rang. As he picked up the receiver, he recalls in his memoir, he told Miki: “It’s Iddo, to tell me that Yoni is dead.” His premonition proved right. Iddo, his younger brother, was on the line from Jerusalem. Yoni, their older brother, had been killed in the raid. + +Bibi and Yoni shared an extraordinary bond. “I think I love him more than anyone else in the world,” Yoni wrote in a letter to his girlfriend in 1964. At times, they were each other’s sole family. Their parents left Israel with them when they were young, after Benzion failed to secure an academic position. They resorted to a lengthy American exile, with Benzion working first at Dropsie College in Pennsylvania and later at Cornell. The parents were notoriously absent, spending months abroad and leaving Netanyahu with friends. + +Image + +Netanyahu speaks in front of a banner depicting his late brother Yoni Netanyahu.Credit...Amir Cohen/AFP, via Getty Images + +“Bibi spent the whole summer in Israel alone when he was 13, and they didn’t bother calling him more than once,” someone who knew him as a child recently recalled. Bibi “was different from all of us from a very young age in his over-independence,” he went on. “What you see is a lonely person. He didn’t have this thing that the rest of us had” — a warm parental presence. + +Benzion, who died in 2012 at age 102, was an intransigent, difficult man. But the boys “worshiped him,” Dan Netanyahu, a cousin, told me. For Bibi, “the image of the father remains a guiding light,” his friend Ziffer says. + +As a young man, Benzion evangelized the views of Ze’ev Jabotinsky, the leader of the right-wing Revisionist movement. Jabotinky believed in territorial maximalism, which he considered a “revision” to the too-compromising interpretation of Zionism advocated by the country’s founding generation. He viewed Jewish history as an ongoing series of catastrophes. Toward the end of the Second World War, he “regarded the Palestinian leadership as a continuation of the Nazis — the embodiment of evil,” Adi Armon, a scholar of Jewish history and author of essays on the elder Netanyahu, published in Haaretz, told me. Bibi has inherited much of his father’s pessimistic worldview. Friends recall him warning against Israel’s peace treaty with Egypt, which became a singular diplomatic and strategic milestone. + +He also took on his father’s resentments. “Netanyahu presents this impressive combination of a strongman who’s also a victim,” Barnea says. It’s a paradox typical of right-wing leaders in the West, Barnea adds, but in Netanyahu’s case, “I think it truly represents what he thinks of himself.” + +The night in 1976 when he heard of Yoni’s death, Bibi drove seven hours to Ithaca, N.Y., to break the news to his parents. Benzion greeted him with a surprised smile, but “when he saw my face, he instantly understood,” Netanyahu writes in his memoir. “He let out a terrible cry like a wounded animal.” The Netanyahu family founded a think tank in Yoni’s name, the Jonathan Institute, for the study of terrorism. The institute would lend Netanyahu gravitas and connections; it would also help start his political career. People who knew Netanyahu at the time say that were it not for Yoni’s death, they doubt whether he or his parents would even have returned to live in Israel. + +To ease his foray into politics, Netanyahu took up work as a marketing executive at one of Israel’s largest furniture manufacturers. The decision appears to have been mostly financial. But the salesman in him, who pitches people using hyperbole and deception, has never quit. His stage presence and his easily digestible, good-versus-evil outlook on the Middle East set him apart when he began his career as a young diplomat. By 1982, he was back in the United States, serving as deputy ambassador to Washington during the early years of the Reagan administration. The jingoism of that time has remained a Netanyahu trademark: “It is not the Jews who usurp the land from the Arabs, but the Arabs who usurp the land from the Jews,” he writes in his memoir, adding, “The Jews are the original natives, the Arabs the colonialists.” + +In 1984, Netanyahu was named as Israel’s permanent representative to the United Nations, and he later threw himself into defending the right-wing policies of Yitzhak Shamir, the prime minister, with gusto and skill. He became a fixture on “Nightline” and U.S. news, learning to present his best side to the camera: the one that hid the scar on his lip (a result of a childhood game involving an electric socket). During one memorable appearance, at the height of the gulf war, air-raid sirens sounded while he was on the air from Jerusalem. Rather than cut the interview short, Netanyahu — ever attuned to ratings — suggested that they keep rolling with gas masks on. Larry King told Vanity Fair that women used to stop by the studio to inquire about his dashing guest from Israel. + +Image + +In the middle of a live TV interview in 1991, Netanyahu put on a gas mask when air-raid sirens sounded during the gulf war.Credit...Mario Suriani/Associated Press + +Netanyahu’s first marriage ended when Miki, pregnant with their daughter, discovered that he had been carrying on an affair with Fleur Cates, a British-German student he had met at Harvard Business School. He and Cates — who, the Israeli tabloids were scandalized to note, was not Jewish when they met — married in 1981. After Netanyahu’s stint at the United Nations ended, in 1988, the couple moved to Tel Aviv. They lived rent-free in a seafront apartment belonging to the Australian billionaire John Gandel, two independent sources told me. This was an early indication of Netanyahu’s cozying up to moneyed friends, a pattern that would come back to haunt him. His thriftiness is, by now, infamous. “He is stingy to the point of extreme,” Uzi Arad, Netanyahu’s former national-security adviser, who has since turned into a critic, told me. “He cannot pay for his lunches!” A former employee of Benzion’s recalled of Bibi, with whom she also worked for a while, “He was a person who walked around without a wallet.” + +As Netanyahu and Cates settled in Tel Aviv, Netanyahu quickly established himself on the Likud roster. He showed little reverence for party seniority. “His innovation was that he moved from the outside in,” Elkin, the former Likud minister, told me. He set up marathon sessions with many of the 2,500 voters who made up the committee that determined the party’s list for Parliament. + +But he soon encountered a problem: A group of well-connected and much admired second-generation politicians, known as the Likud “princes,” had their own ambitions. They included Ehud Olmert, Dan Meridor and Benny Begin. “One day I get a phone call, and it’s Bibi,” Olmert recalled recently. “He wants to come see me. So I meet him, and he tells me: ‘Listen, there are only two people who can run this country. Me and you. Let’s make a deal. I don’t need more than one term. I’ll take a term, and you take a term.’ He tells me, ‘Just don’t go against me.’ I told him: ‘What are you talking about? Is this a private bargain? Besides, I’m in no rush.’ So we say goodbye, and I tell him that I support him.” A few days later, Olmert says, he recounted that conversation to Meridor. Meridor told Olmert: “He told *me* that there were only two people who could run this country. Him and me.” Later, Olmert ran into Benny Begin, who said: “He told me that it was him and *me*.” + +Netanyahu dispensed with the princes — one after another. He has done the same with every other rival who has threatened to gain prominence. “He always took care to decapitate those who grew strong,” Elkin told me. + +By 1992, Labor had overturned Likud’s political dominance. Rabin was elected prime minister and embarked on historic peace talks with the Palestinian leader, Yasir Arafat. A year later, Netanyahu clinched the Likud chairmanship, ousting Shamir, his former boss. He set about excoriating the peace talks, and the subsequent Oslo Accords, every chance he had. Not that he had many: Rabin, Arafat and Israel’s foreign minister, Shimon Peres, shared a Nobel Peace Prize in 1994 and were exalted internationally. The Israeli media, which had previously celebrated its young, Americanized diplomat, became critical of him. “The only game in town was Oslo,” Pfeffer says. + +Yet Netanyahu soon won the opinion on the street. Mass-casualty suicide bombings by Palestinian terrorists on Israeli buses and on bustling promenades turned the Israeli public against the recently signed treaty. Netanyahu presented himself as a bellicose alternative to the left-wing government’s concessions. He installed himself at the sites of the attacks, lambasting Rabin. In October 1995, he gave an infamous balcony speech at a Jerusalem protest in which some protesters carried signs of Rabin dressed as a Nazi. Netanyahu later claimed that he did not witness such incitement from his perch, though other Likud politicians who were present sensed what was brewing and walked away. A month later, a Jewish extremist assassinated Rabin at the end of a peace rally in Tel Aviv. + +In elections held the following year, Netanyahu defied the polls and a newly hostile press and triumphed over Peres. For right-wing voters, this was a deliverance from the Oslo debacle. For the left, there was no recovering from the bloodied circumstances that brought about his rule. + +**One paradox of** Netanyahu’s time in office is that although he is venerated in Israel for his presence on the world stage, he has made few friends there. According to Aaron David Miller’s “The Much Too Promised Land,” an exasperated Bill Clinton came out of their first meeting in 1996 fuming to aides: “Who the \[expletive\] does he think he is? Who’s the \[expletive\] superpower here?” Clinton’s secretary of state, Madeleine Albright, used to describe Netanyahu unfavorably as an “Israeli Newt Gingrich” and felt condescended to, Miller, who worked for her, has written. In 2011, President Nicolas Sarkozy of France was caught on mic complaining to President Barack Obama, “I cannot bear Netanyahu, he’s a liar.” Obama responded, “You’re fed up with him, but I have to deal with him even more often than you.” + +Image + +President Nicolas Sarkozy of France was caught on mic complaining to President Barack Obama.Credit...Sasha Mordovets/Getty Images + +That May, Netanyahu traveled to Washington for a scheduled meeting with Obama in the Oval Office. From the outset, their relationship had been strained. During their first meeting in office, two years earlier, according to Netanyahu’s memoir, he expected pleasantries when Obama suddenly turned to him. + +“Bibi,” he recalled Obama saying. “I meant what I said. I expect you to immediately freeze all construction in the areas beyond the 1967 borders. Not one brick!” + +Netanyahu tried to deflect with the usual shtick. “Israel,” he told Obama, “is willing to begin unconditional peace talks with the Palestinians immediately.” + +But Obama was undeterred. Coming from Chicago, he told Netanyahu, he knew how to deal with tough opponents. “He then said something out of character that shocked me deeply,” Netanyahu writes. He doesn’t specify what it was, but in Mualem’s book, Michael Oren, a former Israeli ambassador to the United States, described the moment: “I know how to deal with people who oppose me,” Obama reportedly said and then made a slashing gesture across his throat. + +Now Netanyahu was stunned again. The day before they met, Obama reiterated in a speech his demand for Israel to withdraw from the occupied territories in the West Bank. + +“I was absolutely furious,” Netanyahu wrote. In front of a roomful of reporters, he seemed to lecture Obama, saying, “It’s not going to happen.” + +Image + +Obama and Netanyahu meeting at the White House in 2011. They had a frosty relationship.Credit...Jim Watson/AFP via Getty Images + +Obama was understandably dubious when, in 2013, John Kerry, his secretary of state, pressed him to begin peace talks between Israel and the Palestinians. Still, Obama told Kerry to proceed. The issue of Palestinian refugees became a major flashpoint. At stake was whether Israel would grant refugees who had fled or been expelled from the country during its war for independence in 1948 a “right of return,” as the Palestinians demanded. + +Speaking via video conference from Paris, Kerry and Martin Indyk, the U.S. special envoy for Israeli-Palestinean negotiations, proposed to Netanyahu that Israel would take in a symbolic number of refugees and contribute to a fund that would provide further compensation. Netanyahu then asked to take a break. When it was time to resume, half an hour later, the Israeli negotiators “came into the room, and said, ‘We’re very sorry, the prime minister is indisposed,’” Indyk recalls. Netanyahu had reportedly gone over the details of the refugee agreement with his media adviser, who told him that it was a “complete disaster” and that the Israeli public “would never accept it,” Indyk says. + +“It was at that point that he apparently had a breakdown,” Indyk adds. “The pressure came not because we were putting the screws on him, but because he was thinking of the politics of it and how he would try to sell it.” This wasn’t the first time that Netanyahu had taken ill at critical junctures. At least a dozen people, including his friend Ziffer, told me about health problems he has experienced when he was under intense pressure. + +In the summer of 2013, U.S. negotiators drew up a document that would serve as a basis for a final peace deal. Its language said that Israel would retreat to its pre-1967 borders with “reality-driven swaps”: Israel’s largest settlement blocs would be left in place in exchange for other territory. This time, though he has never publicly acknowledged it, Netanyahu was willing to accept the terms. + +Tzipi Livni, a centrist politician who served as Israel’s chief negotiator for peace, told me, “Netanyahu agreed to the American paper that was based on the ’67 borders.” This seems almost unimaginable in hindsight: that Netanyahu, who has done more than any other leader to entrench Israel’s occupation of the West Bank, agreed to the framework for a historic peace agreement that would have ended it. The deal never materialized, Livni added, in part because Mahmoud Abbas, the president of the Palestinian Authority, never gave his response. Soon after the paper circulated, Abbas announced a reconciliation between his Fatah party and Hamas, which Israel considers a terrorist organization. This buried any prospects for a deal. Indyk confirmed that Netanyahu appeared open to accepting the 1967 outline. But he has since come to believe that Netanyahu never intended to follow through. “He saw the ’67 language. The question was, Was he serious about it? My view is that both leaders were not serious. They were ready to blame the other.” + +Biden, Indyk says, agrees. He “doesn’t think Netanyahu’s serious when it comes to peacemaking. He admires Netanyahu’s political skill but is skeptical about his statesmanship.” + +Talk to Netanyahu’s longtime observers, and you come away convinced that he is a heartfelt ideologue, his father’s son. Talk to others, and he’s a calculated pragmatist. He has been compared in the Israeli press to a “weather vane” blowing with the wind. He advocated a nation-state law that relegates Arab Israelis (who make up 21 percent of the public) to second-class citizenship but was also responsible for passing an unprecedented $3 billion program to improve living conditions in Arab communities. He used to endorse a two-state solution (publicly, at least), before announcing his intention to annex parts of the West Bank when it became politically expedient. He reassured protesters that he would not pass the judicial overhaul unilaterally, then watched as his Likud base responded with outrage and announced that it would move forward anyway. + +What the left “doesn’t get,” a source close to Netanyahu says, “is that he’s very flexible, and he will switch, but for him there are issues and then there are politics.” The source adds: “Iran is the big issue for him. His thinking is, Everything else I have to navigate to thwart that danger; if I’m not here, then I can’t deal with this big issue. Saudi Arabia is also very big for him right now. Principles are big issues, and the rest is pragmatism.” + +The most consistent he has been on any issue is on the prospects of a nuclear Iran. But that has proved a colossal failure. At least three former Mossad chiefs have called Netanyahu’s actions on Iran dangerous. In 2015, he blindsided Obama by speaking out in Congress against the United States’ [signing “a very bad deal” with Iran,](https://www.nytimes.com/2015/07/15/world/middleeast/iran-nuclear-deal-israel.html) even though a deal was imminent and Democratic support was all but ensured. In fact, according to Indyk, while Netanyahu knew that the United States and Iran had been negotiating, he himself was blindsided by the nuclear agreement. “He was screaming at Kerry the day after the framework deal was announced,” Indyk says. “He was furious.” Three years later, at Netanyahu’s urging, President [Trump pulled out of that agreement](https://www.nytimes.com/2018/05/08/world/middleeast/trump-iran-nuclear-deal.html). Iran now has enough enriched uranium to produce “several” bombs, the director-general of the International Atomic Energy Agency warned earlier this year. Iran’s enrichment is “100 percent the result of the U.S. pulling out of the agreement,” Tamir Hayman, a former Israel military intelligence chief and the managing director of the Institute for National Security Studies, told me. Hayman called the pullout from the deal a “grave mistake,” adding, “We retreated from Plan A without having a Plan B in place.” + +Image + +Netanyahu gives a speech against the Iran nuclear deal to the U.S. Congress in 2015.Credit...Win McNamee/Getty Images + +Elkin, the former Likud minister, believes that Netanyahu’s sole governing ideology is his own survival. “He began with a worldview that said, ‘I’m the best leader for Israel at this time,’” Elkin says. “Slowly it morphed into a worldview that said, ‘The worst thing that can happen to Israel is if I stop leading it, and therefore my survival justifies anything.’ From there, you quickly reach a worldview of ‘The state is me.’ He believes in it wholeheartedly.” + +**It’s impossible to** grasp Netanyahu’s complex brew of self-regard and insecurity without understanding his marriage to his third and current wife, Sara. In one astonishing recording from 2002, released by the public broadcaster Kan, Sara can be heard lashing out at those who have criticized her husband: “Bibi is bigger than this country!” she declares. “People here want to be slaughtered and burned? Why should he even bother? We’ll move abroad, and the whole country can burn.” + +In reporting for this article, I tried to resist the “family narrative” that characterizes much of the reporting on Netanyahu, which presents him as a kind of pawn, an unwitting captive of his wife’s and elder son’s demands. But while its conclusion may be faulty, implying that Netanyahu is somehow subservient, I have become convinced that his family plays a significant role in his decision-making and, ultimately, in how the country is run. The stories range from the salacious to the serious: from allegations that Sara had routinely underpaid, overworked and verbally abused employees of the prime minister’s residence to reports in The Washington Post that she used to take suitcases of dirty laundry on her husband’s official flights to Washington so as to enjoy the free dry-cleaning services offered to official guests of the White House. Netanyahu has denied all of these claims. + +He met Sara Ben-Artzi in 1988 on a layover at Amsterdam’s Schiphol Airport. She was 30 and a flight attendant; he was 39 and Israel’s deputy foreign minister. They went out on several dates, but according to Ben Caspit’s “The Netanyahu Years,” there was no great chemistry. Soon after that, he told friends that they broke up. By 1991, they had reunited. They married in March of that year at his parents’ house in Jerusalem; Sara was visibly pregnant. + +Two years later, Netanyahu shocked the nation when he went on the air and confessed to having cheated on his new wife. In the aftermath of the affair, there were reports in the Israeli press about rumors that Sara had agreed to take him back only after making him sign some sort of secret agreement stipulating that he could not have contact with other women without her knowledge and could go hardly anywhere without her. She also intervened at work. “Sara was shot into the Prime Minister’s Office as from a cannon,” Caspit writes in his book. The former senior aide to Netanyahu told me, “Our whole goal was to build a layer of defense around Bibi to protect him from Sara’s madness and allow him to do his work.” The portrait that emerges from such stories is of a scorned, grifting, raging woman. In various successful lawsuits and investigative reports over the years, this portrait appears to bear out. + +Since his indictment in 2019, Netanyahu’s bond with Sara seems to have hardened. In their view, they are victims of a state plot to unseat them. The state prosecution claims that from 2011 to 2016, Netanyahu accepted a steady supply of cigars, cases of Champagne and jewelry from [Arnon Milchan, an Israeli film producer in Hollywood,](https://www.nytimes.com/2023/06/24/world/middleeast/israel-netanyahu-corruption-milchan.html) and James Packer, an Australian billionaire. In exchange for these presents, estimated to have been worth hundreds of thousands of dollars, the prosecution says that Netanyahu lobbied U.S. officials to help Milchan renew his U.S. visa and tried to lighten his tax burden in Israel. (Milchan and Packer are not on trial, and Packer has not been accused of a quid pro quo.) A former Netanyahu spokesman who turned state witness in 2018 told prosecutors that he had learned of “a method, let’s say, in which, on every visit abroad, the Netanyahu family was attached to a walking credit card on two legs” — meaning to local benefactors. + +In 2021, an unusual video went viral in Israel. Set against a black background, it featured the account of a man named David Artzi. Artzi, the former deputy head of Israel Aerospace Industries, met with David Shimron, Netanyahu’s cousin who was then his private lawyer in 1999. Shimron, Artzi claimed, had recently been fired by another client, and in trying to illustrate to Artzi that he was still in demand, he brought up his work with Netanyahu. He opened his briefcase and pulled out a contract that he had drawn up between Sara and Bibi. “So I read it over carefully, slowly, slowly, and I almost faint,” Artzi recalled. It was 15 pages long and, according to Artzi, stated that “he would have no credit cards, only she would, and that if he needed money she would give it to him in cash.” It also outlined Sara’s veto power over appointments including the military’s chief of staff, the head of Shin Bet and the head of the Mossad, Artzi said. Shimron denies Artzi’s account and has since sued him for libel. In testimony early this year, Sara Netanyahu said that “this agreement did not exist,” and Netanyahu called Artzi’s account a “gross lie.” + +But the former senior defense official said he was convinced of Sara’s power. He told me that he had spoken to someone who had witnessed Netanyahu grilling a candidate for a sensitive role about personal “loyalty.” The former Netanyahu spokesman told the investigative program “Hamakor,” “There is an agreement that the innermost appointments in the bureau don’t pass without a green light from Sara Netanyahu.” + +However shaky the beginning of their relationship, by now there is no question that Netanyahu is deeply committed to his wife. Pfeffer, Netanyahu’s biographer, told me: “Sara is the most hated woman in Israel. If he divorced her, he would probably be more popular. He loves her. She’s a problem in many ways, but he also relies on her.” He works tirelessly to clear her name and to get her the plaudits he feels she deserves. His efforts have embroiled him in one of the corruption cases for which he’s under indictment. + +Known in Israel as Case 4000, it details allegations that, in exchange for giving the owner of the news site Walla regulatory benefits, Netanyahu had sought favorable coverage for himself and his family, claims that the defendants have denied. Many of the demands, according to the indictment, had to do with Sara. (Walla ran stories about her “fashionable makeover,” lighting Hanukkah candles with Holocaust survivors and attending a Mariah Carey concert.) + +Image + +Netanyahu and his wife, Sara, on the way to a state visit to the United States in 1996.Credit...Yaakov Saar/GPO, via Getty Images. + +Critics of Netanyahu argue that his insistence on forging ahead with the judicial overhaul stems from his legal woes. Netanyahu and his inner circle reject the argument. But Elkin, the former Likud minister, recalled that Netanyahu summoned him to his office in 2020, as his trial got underway. Earlier, Netanyahu signed a power-sharing agreement with the centrist Gantz, whereby he would serve first in rotation as prime minister and Gantz would serve second. Now Netanyahu told Elkin that he wished to renege on that agreement. “I was very much opposed, and told him why,” Elkin says. “He listened and nodded and then he said something I will never forget. He said, ‘If I don’t call an election now, I won’t get to nominate the next state prosecutor.’ He was willing to risk *everything* just to save his own skin.” + +**If you were** to identify a turning point in Netanyahu’s 16-year rule, the election of 2015 would be it. The previous year, Netanyahu called for the dissolution of Parliament over disagreements with his center-left coalition partners, including their attempts to pass a law that would curb the influence of a free newspaper bankrolled by the U.S. mogul Sheldon Adelson that was widely seen as friendly to Netanyahu. That decision reflected his growing obsession with his own press coverage and a sharp rightward turn in his political calculus. Told by the news media and many advisers that he was facing defeat, Netanyahu ended up winning that election decisively — thanks in large part to a by-now infamous video in which he warned against the voting rights of a fifth of the public: “Arab voters are coming out in droves to the polls. Left-wing organizations are busing them out.” Netanyahu’s scare-tactics campaign that year was the brainchild of his son Yair, together with two of Yair’s friends from the military spokesperson’s unit who now run Netanyahu’s social media strategy. + +Two days after the election, according to Netanyahu’s former senior aide, “he called his advisers into a meeting and told them that one person was in charge of this victory. Then he turned to Yair. Some people in the room were shocked.” Before that night, the former aide continued: “Sara and Yair kept telling him that he was all-powerful, but he didn’t think so. He was like me and you. After that win, he really started to believe that he was above the country.” That year, Netanyahu not only served as Israel’s prime minister but also held the positions of foreign minister, health minister and communications minister. “He no longer speaks in years but in decades,” the columnist Yossi Verter wrote in Haaretz. + +With Yair’s backing, Netanyahu realized that by playing to his base’s resentments, he could simply write off the political center. His close adviser Natan Eshel admitted as much. “This public — I call it the non-Ashkenazi camp — what gets it going?” Eshel said in a tape released by the magazine program “Uvda” in 2020. “We’ve managed to fuel this, this hate. It’s what unites us.” + +Long before the invention of Trumpism, there was Bibism. It, too, has been marked by a strain of grievance politics and a galvanizing of the ranks against perceived elites. But the election of Trump, which happened to coincide with the start of the police investigations into Netanyahu, has bolstered Netanyahu’s confrontational styles. With Trump, in general, “Netanyahu got everything he wanted,” Amit Segal, a political reporter for Channel 12, told me in 2021. Israel got a pass on settlement construction in the West Bank and signed normalization accords with four Arab states; the United States withdrew from the Iran agreement and [moved its embassy to Jerusalem.](https://www.nytimes.com/2018/05/13/world/middleeast/jerusalem-embassy-israel-independence.html) “Our years together were the best ever for the Israeli-American alliance,” Netanyahu writes in his memoir. + +Netanyahu’s attacks on the courts have since grown constant (“ginned-up cases”; “attempt to overthrow the government”), as have those on veteran Israeli journalists (“a woman of the extreme left”; “ leaders of an orchestrated rebellion”). In recent years, he has shunned Israeli mainstream media, opting instead for Facebook Live videos and frequent “exclusive” interviews with Channel 14, a media outlet that he has personally helped elevate into one of the most-watched news programs in the country. His inner circle has changed, too, from an abundance of freethinking policy advisers to a narrow group of loyalists. Behind all these decisions, insiders say, lurks the figure Yair Netanyahu. + +In a country in which the American alt-right is largely unfamiliar, Yair Netanyahu is a fan of Breitbart News, Mark Levin and Ben Shapiro. He is embraced by the Fidesz party of Viktor Orban in Hungary, where earlier this year he attended a conference on the media and denounced a “global elite” and a state of “Sorosization” with seemingly little awareness of the antisemitic overtones. At 32, he has never held down a job that wasn’t directly connected to his father. + +Whatever caution Netanyahu still possesses in attacking opponents is wholly lacking from his son’s arsenal of obscenities. Yair has tweeted that two Israeli news channels were an “existential threat to the State of Israel as much as Iran!” and compared protesters against the judicial overhaul to Nazi storm troopers. Yair reportedly urged his father to push through the controversial legislation despite wide public disapproval. This spring, after heated arguments at home, Bibi and Sara ordered Yair off social media, according to reporting by Shalev, the Walla journalist. His Twitter presence went down to zero posts a day from 77. And then, for the next couple of months, Yair disappeared from public view. He has left the country, shuttling between Puerto Rico and Miami, where, according to Caspit, he has been getting help with job referrals from Jared Kushner, Trump’s son-in-law. (Kushner’s father, Charles, is a longtime family friend of Netanyahu’s.) In April, during a news conference, Netanyahu was asked about Yair’s degree of influence. “Zero,” he replied. + +**In mid-August,** as lawmakers scampered for their summer vacations, the Netanyahus visited the northern township Ramot, on the Golan Heights. It’s a quiet, pastoral place, with rolling farmland and gravelly roads. But when Bibi and Sara arrived with a long police motorcade, a thousand anti-government protesters awaited them, carrying Israeli flags and blowing bicycle horns. Tensions were palpable throughout the country. In July, as the judicial overhaul resurfaced, Netanyahu fainted. Several days later, he was fitted with a pacemaker. Doctors revealed a history of heart problems that had been kept from the public. + +In early September, Israel’s Supreme Court heard petitions against the amendment to strike down the court’s ability to cite “extreme unreasonableness” in government decisions. For the first time in Israel’s history, [all 15 justices convened for a single case.](https://www.nytimes.com/2023/09/12/world/middleeast/israel-supreme-court-power-limit.html) Leading economists caution that without the standard of reasonableness, Israel will experience an increase in political and public corruption. Several Likud lawmakers have already indicated that if the court rules against the proposed amendment, they might not abide by the ruling. This would throw the country into an unprecedented constitutional crisis. On Sept. 28, the court was scheduled to hear a challenge to another law, which [protects the prime minister from being removed](https://en.idi.org.il/articles/50968#:~:text=On%20August%203%2C%202023%2C%20Supreme,Law%3A%20The%20Government%20relating%20to) from office on grounds of incapacitation. It’s this law that Netanyahu is said to care about most, though there is little evidence to support his fear that he would be ousted. Israel’s attorney general has warned that passing the law was a “flagrant misuse” of Parliament’s authority. + +Still another court hearing looms. Until now, during the three years of his trial, Netanyahu has resisted taking a plea bargain, which would most likely require him to admit wrongdoing and thus avoid prison time but force him out of political life for years. His former senior aide told me that Sara wouldn’t let him consider such a deal: “She is clinging to power at all costs.” Things may be different now. Next year, the prosecution is expected to wrap up its side of the hearings, and Netanyahu will be called to take the witness stand. It’s a prospect he dreads. “His close associates have told me that he doesn’t want to testify,” Shalev, the Walla reporter, says. “There are gaps between the things he told police and what his lawyers wrote in their defense, and he doesn’t want those gaps to be exposed. It will make him out to be a liar.” + +Image + +Netanyahu accompanied by members of his Likud party at the district court in Jerusalem in 2020.Credit...Yonatan Sindel/Associated Press. + +Observers who follow the trial closely say that he might accept a plea bargain this time. Especially if Israel and Saudi Arabia manage to reach a normalization agreement — an agreement that, by all accounts, Netanyahu is desperate to sign. Perhaps then the historical record will show a palpable achievement: something to distract from the crisis in his own country that he has helped engineer. For years, liberal Israelis were afraid that a right-wing coalition would come along and annex West Bank settlements. “Then came the twist,” the author Etgar Keret wrote earlier this year. “Instead, the settlers annexed the country.” + +These may be the twilight months of Israel’s longest-serving leader, then, a feeble coda to two decades’ worth of power and bluster and ego. + +This summer, a TikTok video that the Netanyahus posted from their vacation in Ramot piqued the ire of the protesters. The Netanyahus are sitting at a small dining table, a bottle of rosé chilling in a cooler beside them. Netanyahu wore Barbie-pink sunglasses, and took them off for the camera. “I don’t see the world in rose-colored glasses,” he says smiling, in a rehearsed tone. “I want to assure you: Things are much better. It’s fun to spend a few days in the Sea of Galilee!” + +“And the Golan Heights!” Sara chimes in. “The country belongs to all of us.” + +“Enjoy yourselves!” Netanyahu says. + +--- + +Ruth Margalit is a contributing writer living in Tel Aviv. She last wrote a cover story about a decade-old murder that has consumed Israel. + +A version of this article appears in print on  , Page 41 of the Sunday Magazine with the headline: Bibiland. [Order Reprints](https://www.parsintl.com/publication/the-new-york-times/) | [Today’s Paper](https://www.nytimes.com/section/todayspaper) | [Subscribe](https://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=48JQY) + +Advertisement + +[SKIP ADVERTISEMENT](https://www.nytimes.com/2023/09/27/magazine/benjamin-netanyahu-israel.html?unlocked_article_code=nLCbuNBiLVuFjr-bjyatdkjrn0oLh3CQmbIh609yAyjmU0rX5Lw8HsJVZck43ebf1ONkwp22N6NEBZ4A8xmI_jSEAa77SARUgERYJMhvhcR1RYyy8dOLkWCIRpixr23B_1w6ySFDZE5V_CuWy-BME28T2-g9mFoc7Wy7gFSJV1Lls54RbqZ0Tlhi4w_wC2XzvHCy1vwKraO_pI-vqTOTqDiDsrT1bfX3HxuSo4f2we7wtvaUsxmNO7eVHLxOJTx8duk0FMyKwRkq7Qs5Ulh-f76UINxzvGlUE16rdwBDz7PU97Fe1a9L8I3JG8cshEjguh4H3lQe7eVlrYeTIDxQbciw1aY&smid=url-share#after-bottom) + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Confessions of a McKinsey Whistleblower.md b/00.03 News/Confessions of a McKinsey Whistleblower.md index f14ea9bc..56874f97 100644 --- a/00.03 News/Confessions of a McKinsey Whistleblower.md +++ b/00.03 News/Confessions of a McKinsey Whistleblower.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- @@ -68,8 +68,6 @@ McKinsey made the prescient decision to avoid credit for its work, keeping its c ## Popular -“swipe left below to view more authors”Swipe → - McKinsey’s recruiting materials offer you the chance to “Change the world. Improve lives.” Naïve as it seems in hindsight, I came to McKinsey believing those words. But after a year and a half there, I eventually understood that not only does McKinsey fail to make the world better—it often colludes with those who make the world worse. ![Emmanuel Macron’s government handed hundreds of millions of dollars to McKinsey and other consulting firms.](https://www.thenation.com/wp-content/uploads/2023/08/Lovely-Macron-getty.jpg) diff --git a/00.03 News/Florida has become a zoo. A literal zoo..md b/00.03 News/Florida has become a zoo. A literal zoo..md index b202d1a1..4a0f9c70 100644 --- a/00.03 News/Florida has become a zoo. A literal zoo..md +++ b/00.03 News/Florida has become a zoo. A literal zoo..md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- @@ -242,32 +242,6 @@ I visited a small park in Miami on my last day in Florida, where I’d heard the I didn’t have to travel to the jungles of Central or South America, their native range, to see them; I just had to drive 15 minutes from my hotel. They squawked and preened each other and fought over water. These animals are not from here, but this is their home. -**We're here to shed some clarity** - -One of our core beliefs here at Vox is that everyone needs and deserves access to the information that helps them understand the world, regardless of whether they can pay for a subscription. With the 2024 election on the horizon, more people are turning to us for clear and balanced explanations of the issues and policies at stake. We’re so grateful that we’re on track to hit 85,000 contributions to the Vox Contributions program before the end of the year, which in turn helps us keep this work free. We need to add 2,500 contributions this month to hit that goal. [Will you make a contribution today to help us hit this goal and support our policy coverage? Any amount helps.](http://vox.com/pages/support-now?itm_campaign=sept-week-1&itm_medium=site&itm_source=article-footer) - -$5/month - -$10/month - -$25/month - -$50/month - -Other - -[ - -Yes, I'll give $5/month - -](https://vox.memberful.com/checkout?plan=) - -Yes, I'll give $5/month - -We accept credit card, Apple Pay, and Google Pay. You can also contribute via - -[![](https://cdn.vox-cdn.com/uploads/chorus_asset/file/22734206/paypal_logo.png)](https://www.paypal.com/donate/?hosted_button_id=VSP4PYJX98SHL) -     diff --git a/00.03 News/How Hip-Hop Conquered the World.md b/00.03 News/How Hip-Hop Conquered the World.md index 3aa2a779..eda50355 100644 --- a/00.03 News/How Hip-Hop Conquered the World.md +++ b/00.03 News/How Hip-Hop Conquered the World.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- @@ -58,22 +58,6 @@ I was down to bring that dogma to my grave. But somebody made a case, and the ca For [Grammy night](https://www.youtube.com/watch?v=HXsqCrHSKvU), his job entailed boiling down five decades to 15 minutes, and some uncanny artisanship resulted. On the generations came, each one submitting no more than a snippet — a TikTok-ya-don’t-stop, if you will. The Roots’ rapper in chief, Black Thought, opened with a fairy tale. “Fifty years ago, a street princess was born to be an icon,” it began. Then appeared a whirl of originators. Grandmaster Flash with Barshon, Melle Mel, Rahiem and Scorpio, who melded into Run-DMC. And Run-DMC into LL Cool J. LL Cool J into DJ Jazzy Jeff. Jazzy Jeff into Salt-N-Pepa. Those two into Rakim, who was followed by Chuck D and Flavor Flav. That was simply the first course of three loosely chronological movements. The third closed with the progeny: Lil Baby then GloRilla then Lil Uzi Vert. -Run-DMC with their fan Teddy No Neck, 1985. - -Josh Cheuse - -Almighty Kay Gee of the Cold Crush Brothers at Harlem World, 1981. - -Joe Conzo Archives - -The break dancers Ken Swift and, in the background, Take One and Frosty Freeze of Rock Steady Crew, 1982. - -David Corio - -Terminator X, Flavor Flav, Chuck D and Professor Griff of Public Enemy, 1987. - -Jack Mitchell/Getty Images - The performances may not have lasted long. But revelations overtook me anyway, like how physical this music has always been to make, how bodily. Salt-N-Pepa, Kid ’n Play, MC Hammer, Missy Elliott, Beyoncé — they dance. That’s not what I mean. I’m talking about how you can’t just stand there and rap. Hands jab. Wrists snap. Heels stomp. Heads nod, bob, swivel, swing. Whatever parts can make action, do: Fingers, shoulders, brows. Used to be the move to kind of bow your legs, one hand on each thigh, bend forward and rock. LL would do this so hard his gold ropes would be punching him in the mouth. Suddenly something amazed me that just an hour before seemed as elemental as “it takes two to make a thing go right.” And that’s this: The body raps, too. Listen, I could go on, droolingly, about innate hip-hop hotness, about the bodaciousness of physiques: LL and Lil’ Kim, Tupac, Trina and 50 Cent; about Cardi B. About the rocket-science profundity in the hook of one of Megan Thee Stallion’s hits: @@ -92,22 +76,6 @@ None of this resplendence was irony-free. We’re talking about the celebration Here then is why I can’t exclaim that hip-hop is on a continuum and call it a day. Here is why it’s apart from spirituals and jazz, blues, R.&B. and rock ’n’ roll while also being apiece. Here’s why the passage of these decades matters: Hip-hop, baby of the American musical family, has for 50 years been a contested category, unsettled because it remains unsettling, somehow unsung despite its centrality to multitudes. Tears salted my pizza that night because what I thought would be another awards-show nostalgia spasm was really a proclamation of endurance and a pungent condemnation. Here is music you can hear while dining out at a place where the only Black people are you and the dining room’s soundtrack. There aren’t many countries left on this planet that don’t have some kind of hip-hop scene or rap patois, some at-best oblivious comfort with “nigga” this and that. Yet there’s often a chip on some rapper’s shoulder, on some rap fan’s. Because it’s quite something, half a century in, to carry with you the suspicion that the thing you made might be valued more than the people you are. This is a continuum concern, of course: Every phase of Black artistic achievement treks through that cognitive-dissonance zone. The Negro spiritual is the other major American music whose existence floodlights a crime. But spirituals sought deliverance from this country’s original sin. Hip-hop doesn’t expect salvation. An alternate reality drives its craftspeople. Maybe nobody wants us to succeed. So we’ll deliver ourselves. Let’s build an empire from that. -Pepa, Salt and DJ Spinderella of Salt-N-Pepa, 1989. - -Al Pereira/Michael Ochs Archives, via Getty Images - -Biz Markie, 2001. - -Mike Schreiber - -LL Cool J, 1988. - -Catherine McGann/Getty Images - -Tupac (center), 1994. - -Mike Miller - **I’m just younger** enough than hip-hop to have taken the empire for granted all these decades and just old enough to ask some urgent questions. What’s the point of this art form anyway? Why did we need it? Why did we need it so bad that it spread from the Bronx to everywhere else? Would there even be hip-hop had events in this country gone differently, gone farther, in Black Americans’ favor. Then I suppose I have to ask: which events? And how many would have had to go just right and stay right in order to complete Black Americans’ trajectory toward actual freedom, to head off the full force of hip-hop’s coming this vibrantly to life? Some back-of-the-napkin ruminating tells me that hip-hop was inevitable because this country has never been consistently sure about how to treat us. The mere fact of hip-hop denounces that inconsistency. It maybe shouldn’t exist. But here it is. In everything. Indicting. This 50th anniversary dates to the night, in the Bronx, in August 1973, that Kool Herc stood over a set of turntables and combined two records to form one continuous breakbeat. Doesn’t sound too seismic when you put it that way. But this was it: the Big Bang, a mythical event. And when you do put it that way, these 50 years really do have to stand on their own. The earliest blues artists were enslaved. Depending on when you think jazz was born — we’re talking about both history and mythology here — its originators had parents who were enslaved. The inventors of rock ’n’ roll hail-hailed from parts central and south. But hip-hop happens right about when the Great Migration winds down. Its beginnings are overwhelmingly Northern and completely urban. @@ -128,22 +96,6 @@ The thrill of the music, the lifestyle — that life force — has been in its a It’s not as if Black artistic expression has ever relied on doubt. Consider all that it took for Duke Ellington, Ella Fitzgerald, Dinah Washington, Billie Holiday or for Mahalia Jackson, Nat King Cole, Sammy Davis Jr. or Miles Davis, for the Supremes and the Temptations to embody then exude excellence during an era in which that sort of confidence was all but illegal in certain counties, when you were likely to have had a parent who fled those places. It’s just that a certain decorum was expected. -Posdnous, Maseo and Trugoy The Dove of De La Soul, 1993. - -David Corio/Redferns, via Getty Images - -The Notorious B.I.G., 1995. - -Jonathan Mannion - -DJ Yella, MC Ren, Easy-E and Dr. Dre of N.W.A. - -Lgi Stock/Corbis, via VCG, via Getty Images - -MCA, Mike D and Ad-Rock of the Beastie Boys, 1987 - -Vinnie Zuffante/Michael Ochs Archives, via Getty Images - Take Motown. Berry Gordy put his artists through a rigorous etiquette program, to make them palatable to the crowds of Jim Crow-tolerant white people who would be seeing them in concert or from their living rooms. I’ve wondered what kind of rappers a charm school might produce. I’ve also thought about what just a little charmlessness might have done for — or to! — the Motown sound. Charm afforded Motown its bounteous luxury. But by the late 1970s and early 1980s, Black decorum had reached its political limit. Gordy’s big new star was the magnetically louche Rick James, a hip-hop progenitor. The early rappers weren’t arguing for integration. They cultivated iconography all their own: hair styles, accessories, attitudes, these celebratory exponents of apartness, of apartheid (in America). The art form’s greatest innovation was its mass-production of unfettered, un-self-conscious self-esteem, of retributive refulgence. Boy, could you feel that. Friends and classmates took on such an unsinkable boldness that I can’t imagine them without this music and its style. But around the country, all kinds of people were encouraged, by Hollywood and the news, to be scared of Black youth (as they were called). Some of those people took out full-page ads wishing them the death penalty. Some chased them from neighborhoods and mistook them for piñatas. Our parents, though, weren’t afraid of the kids and the rappers those kids adored, not necessarily. The moms and dads and grandparents, the aunts, uncles and older cousins, understood the old life-or-death stakes. They knew that hip-hop had unleashed a new confrontational energy. They were afraid *for* them. @@ -164,22 +116,6 @@ Its practitioners may have attended church, but there’s little church in this Before that reunion at the Grammys, I knew all the places the life force had gone and all it had come to mean. But after, I got to thinking about its stupendous range. Take the rap voice, for instance. It’s an instrument with timbres and pitches that expand at least my understanding of what else it means to sing — and if it’s Ol’ Dirty Bastard, Eminem, Nicki Minaj and Kendrick Lamar, we’re talking about singing in the rain, a monsoon. There’s almost nowhere hip-hop hasn’t been: the White House, the Pulitzers, the Oscars, the sitcom, the Louvre, syllabi, country radio, fashion week, Sesame Street. It uses some of everything, and everything uses some of it. But its longevity and ubiquity amount to more than what’s stamped in its passport. Even when its practitioners aren’t Black, maybe especially when they’re white, hip-hop incriminates the country that drove its people to dream it up in the first place. For it contains the stubborn truth of how America has felt about certain Americans. Hip-hop is what this country gets. -Jay-Z, 2007. - -Damon Winter/The New York Times - -Wyclef Jean and Lauryn Hill of the Fugees, 1993. - -Lisa Leone - -Nas, far left, with friends in Queens, 1993. - -Danny Clinch - -Snoop Dogg, 2000. - -Mike Miller - It still possesses incantatory powers. But it also continues to acquire a tremendous capacity for melancholy, for a blues of sorts. The same group who fretted about C.R.E.A.M. also chanted, in harmony, that “you can’t party your life away, drink your life away, smoke your life away, \[expletive\] your life away, dream your life away, scheme your life away, ’cause your seeds grow up the same way.” That was 26 years ago. In the B.L.M. era, the seeds sound addled. The early boom-bap and the disco backbeats that exploded into a galaxy of sounds has, in its current incarnation, returned to a new, samey orthodoxy of beats that, for not much longer than two minutes, stutter, drag and drone. A little weed used to be all a rapper needed to get by; now it’s zany. It’s not just nerves that seek settling anymore. It’s entire psyches. The canon makes room for breakdowns: Lauryn Hill’s, Kendrick Lamar’s, Kanye West’s. Happiness and abandon are now hard to come by, that old sauce. The rappers seem to know this. They’re rhyming with a lot fewer words for the moment. The sound of some of this music doubles as another environmental mirror. Somebody thought to call it “trap.” Maybe another reason that that Grammy anniversary segment got to me was that it worked in defiance of the current gravity. It felt stress-free and full of exhalation, but, as crucial, also put inhalation on poignant display. As a practical matter, this wasn’t news. We karaoke people have our personal Everests. “Paid in Full” and “Mama Said Knock You Out” are mine. Very different songs in divergent styles. One is silk, the other is steroids. To pull either off, you have to know how to breathe. This is true enough for singing. But rapping requires the kind of respiration that a swimmer depends on: mechanical but rhythmic. (To excel at either, it helps to know your way around a freestyle.) Rappers have to time when in the stroke to snatch some air. Snatch wrong and choke. You have to be precise while still being you. Some rappers, like Busta Rhymes, rarely get caught taking a breath. A karaoke rapper will tell you: It’s not for the weak. I know someone who can perform “Tha Crossroads” as though Bone Thugs-n-Harmony were his government name. But by the time he’s done, he practically needs CPR. diff --git a/00.03 News/How I Survived a Wedding in a Jungle That Tried to Eat Me Alive.md b/00.03 News/How I Survived a Wedding in a Jungle That Tried to Eat Me Alive.md index d553442c..c45669a7 100644 --- a/00.03 News/How I Survived a Wedding in a Jungle That Tried to Eat Me Alive.md +++ b/00.03 News/How I Survived a Wedding in a Jungle That Tried to Eat Me Alive.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- diff --git a/00.03 News/How Some Men Play Dungeons & Dragons on Texas’ Death Row.md b/00.03 News/How Some Men Play Dungeons & Dragons on Texas’ Death Row.md index 9bf6c1cd..626d8d4a 100644 --- a/00.03 News/How Some Men Play Dungeons & Dragons on Texas’ Death Row.md +++ b/00.03 News/How Some Men Play Dungeons & Dragons on Texas’ Death Row.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-27]] --- @@ -130,10 +130,6 @@ Sometimes, through their characters, they opened up about problems they would ne Some of the character sheets that Wardlow created for D&D included detailed notes about spellcasting abilities, physical traits and the powers of individual characters. Glenna Gordon for The New York Times -Some of the character sheets that Wardlow created for D&D included detailed notes about spellcasting abilities, physical traits and the powers of individual characters. Glenna Gordon for The New York Times - -Some of the character sheets that Wardlow created for D&D included detailed notes about spellcasting abilities, physical traits and the powers of individual characters. Glenna Gordon for The New York Times - Death row didn’t offer any of the educational or mental-health programs available in regular prisons; rehabilitation isn’t the goal for those on death row, and special programming is not always logistically feasible for people held in solitary confinement. For these players, the games served as their life-skills course, anger-management class and drug counseling, too. Like Ford and Wardlow, a lot of the men on the row came to prison at a young age and never had a chance to be adults in the free world. In 2005, the Supreme Court banned capital punishment for crimes committed by people under 18, [saying that “evolving standards of decency” forbade it](https://www.nytimes.com/2005/03/02/politics/supreme-court-54-forbids-execution-in-juvenile-crime.html). Though Texas had to stop executing minors, the state could still sentence older teenagers — those who were 18 and 19 — to death. Some of the men in the D&D crew never had their own apartments or bank accounts, never paid rent or bought car insurance or cashed a paycheck. Once they got to prison, their lives were, in essence, frozen. @@ -144,13 +140,7 @@ When the men heard about the details of Wardlow’s appeal, they began to feel h In the meantime, D&D was their best chance to learn about the world. They had to manage “money,” to make sure they had enough gold to rent a tenement or buy a horse. And when they were running low, they had to consider the best path for getting more: finding work at the local tavern, for example, or searching for treasure in a dungeon. If they opted for the latter, they had to exercise caution and weigh the risks. -[ - -Intimate portraits of people who have been touched by the criminal justice system - - - -](https://www.themarshallproject.org/we-are-witnesses) +[Intimate portraits of people who have been touched by the criminal justice system](https://www.themarshallproject.org/we-are-witnesses) Over time, their lives in the game world led to the sort of friendships solitary confinement usually prevents. From their respective rec cages in the prison yard, Wardlow would offer Ford advice whenever he was having problems with another prisoner. Or Wardlow would get one of the general-population prisoners who worked as janitors to deliver the jailhouse comfort food he made in his cell. Sometimes they would test recipes, like the time they both made Kool-Aid-flavored cheesecakes with powdered creamer, and shuttle samples back and forth. They talked about game strategies and what to do when guards confiscated their playbooks or moved them to different cells every few months. @@ -158,10 +148,6 @@ And whenever Ford and Wardlow were housed near each other, they played D&D. Some Some of the settings that Wardlow drew for D&D adventures. Glenna Gordon for The New York Times -Some of the settings that Wardlow drew for D&D adventures. Glenna Gordon for The New York Times - -Some of the settings that Wardlow drew for D&D adventures. Glenna Gordon for The New York Times - In 2013, Ford’s mother died, and he quit the game. But Wardlow kept talking to him, even when it was just a one-way conversation through the rec-cage fence. At first, Wardlow just mused aloud about whatever was on his mind, his voice calming and hypnotic. As he kept talking, Ford started to open up, too, crying as he recounted memories of his mother. He remembered the pride she took in her work as a police officer, and how much she taught him about computers when she worked in an Atari warehouse years later. He remembered how she showed him the basics of chess. At one point, Wardlow sent over some jelly beans — he knew Ford loved them, especially the black ones. “Next thing you know, I’m not crying when I’m talking about my mother,” Ford told me two years ago during one of our first in-person interviews. “I’m just talking about her.” A few weeks later, he jumped back in the game. diff --git a/00.03 News/How a Man in Prison Stole Millions from Billionaires.md b/00.03 News/How a Man in Prison Stole Millions from Billionaires.md index e5627dbf..18f5bd32 100644 --- a/00.03 News/How a Man in Prison Stole Millions from Billionaires.md +++ b/00.03 News/How a Man in Prison Stole Millions from Billionaires.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- diff --git a/00.03 News/Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate.md b/00.03 News/Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate.md new file mode 100644 index 00000000..4f094fa6 --- /dev/null +++ b/00.03 News/Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate.md @@ -0,0 +1,137 @@ +--- + +Tag: ["📜", "🇺🇸", "🗽", "⛴️", "🌊"] +Date: 2023-10-01 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-10-01 +Link: https://www.atlasobscura.com/articles/sunken-treasure-hell-gate-new-york-east-river +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-IsThereSunkenTreasureBeneathHellGateNSave + +  + +# Is There Sunken Treasure Beneath the Treacherous Currents of Hell Gate? + +Just off the coast of Astoria, Queens, at the confluence of the Harlem and East Rivers, is a narrow tidal channel. Hell Gate. Its fast currents change multiple times a day and it used to be riddled with rocks just beneath the surface. Even today, visitors to Randall’s Island Park can see the swirling churn and watch pleasure boaters struggle through. American author Washington Irving wrote an essay about it: “Woe to the unlucky vessel that ventures into its clutches.” + +But many a vessel did venture into those clutches over the centuries. Traversing it could save sailors navigating between New York Harbor and Southern New England days of travel around Long Island. This expediency often came at a cost. Hell Gate is the final resting place of literally hundreds of ships. Most of them are forgotten but one continues to captivate. Because down there, under the minor maelstroms, is the promise of gold. + +--- + +The East River runs up from New York Harbor with Manhattan on one side and first Brooklyn then Queens on the other. At Randall’s Island it splits. To the west, it becomes the Harlem River, which skirts around the top of Manhattan to join the Hudson. In the other direction, it connects to the entirety of Long Island Sound—but it’s easy to miss that this connection comes only via a single, slim channel. Each time the tide turns, the Atlantic forces its way through this passage in one direction or the other, with the discharge of the Harlem River adding to the chaos. + +![Hell Gate, seen in a Hammond's map from 1909, is where the East River skirts two islands. On the upper left, it turns into the Harlem River and connects to the Hudson. At the upper right, it leads out. to Long Island Sound.](https://img.atlasobscura.com/z53R-daEMBlACE-M0pGRWPAyw24h57Exw-Y4xuoB4xY/rs:fill:12000:12000/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy9mZGI4YzJlNC1m/ZDZmLTRlZjAtODI2/MS1lYjc2YmZmNmFh/NWYxMjIxYjljZTgw/Mjk0NDgxMTBfSGVs/bCBHYXRlLmpwZw.jpg) + +Hell Gate, seen in a Hammond’s map from 1909, is where the East River skirts two islands. On the upper left, it turns into the Harlem River and connects to the Hudson. At the upper right, it leads out. to Long Island Sound. [The New York Public Library Digital Collections/Public Domain](https://digitalcollections.nypl.org/items/16a71df0-010b-0131-232c-58d385a7bbd0) + +“Because those volumes are large, and the opening at Hell Gate is small, it means the velocity is going to get very high and that makes it difficult to navigate,” says Roy Messaros, a coastal engineer and professor of hydraulics at New York University. + +“Even on a calm day the current is boiling,” says John Lipscomb, who regularly patrols New York Harbor on a 36-foot wooden boat for the environmental nonprofit Riverkeeper. “It’s a boisterous place. There are whirlpools and the wind against the tide causes interesting, short, aggressive waves. You pay attention when you’re in Hell Gate.” + +That’s today. Conditions in the past were even worse. Most rocks in the area have now been removed to facilitate navigation, but Hell Gate used to be a minefield. It sounded like Hell, too. The whirlpools could be heard from “a quarter of an hour’s distance,” according to one 17th-century Dutch traveler. During the 1850s, it was estimated that about one in 50 ships that crossed Hell Gate was either damaged or sunk. + +“You’re talking about centuries of navigation,” says Bronx Borough Historian Lloyd Ultan. “Everything from rowboats to large ships have been sunk by hitting those rocks. One on top of the other on top of the other on top of the other.” + +![Hell Gate already had a reputation for treachery in 1775.](https://img.atlasobscura.com/0b6FDCKUoARhulQL0o2reDYeeSWtbyvK41i3sIJa3A4/rt:fill/w:1200/el:1/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/MTI1MzQyNy1jcm9w/LmpwZw.jpg) + +Hell Gate already had a reputation for treachery in 1775. [The New York Public Library Digital Collections/Public Domain](https://digitalcollections.nypl.org/items/510d47db-1774-a3d9-e040-e00a18064a99) + +Out of all those wrecks, one in particular has obsessed people for over 240 years—HMS *Hussar*. The whole gamut of underwater exploration technology has been employed in the search for its purported treasure, from 18th-century diving bells to modern sonar scanners. The cast of characters who have invested significant time and money into salvaging the ship is equally wide-ranging. Thomas Jefferson had a go, as did the inventor of the modern submarine. Alongside crews of schemers and hustlers, serious underwater archaeologists have tried, too. Most recently the most prominent attempts to find the wreck were the brainchild of a Bronx man who calls himself Joey Treasures. + +The coveted ship was a frigate of the Royal Navy that arrived in British-occupied New York during the Revolutionary War, in November 1780, reportedly carrying the payroll of British troops in gold coins. Shortly after arriving in the city, *Hussar* set sail for Gardiner’s Bay on the eastern end of Long Island (though some accounts say it was headed to Newport, Rhode Island). While traversing Hell Gate it hit a submerged formation known as Pot Rock and began taking on water. The ship drifted down the East River until it sank to a depth of 60 to 80 feet, somewhere off the coast of the Bronx. This much is known. The rest, much like the waters of Hell Gate, is murky. + +Accounts differ on how many, if any, of the crew were lost, but most agree that around 60 American prisoners of war who were shackled below deck went down with the ship. Crucially, whether *Hussar* still had gold on board when it sank has also been the subject of much debate over the past two centuries. Modern historians tend to think not. Contemporaneous news articles about the accident made no mention of treasure, nor do the minutes from the Royal Navy court martial into the loss of the frigate. + +“It’s a pie-in-the-sky romantic notion that you could find gold in the waters of the Bronx,” says Ultan. But this did not stop generations of people from trying, beginning in the early 19th century. It was known that the ship was carrying gold when it arrived in New York, and in the decades after *Hussar* sank, “the legend began to grow that the gold was still on the ship,” says Ultan. “The East River at the southeastern end of the Bronx suddenly becomes the Spanish Main.” + +![Captain Charles Morice Pole (left) was in command of HMS Hussar when it wrecked, but was acquitted of wrongdoing at a court martial. This British gold George III guinea (right) from 1777 represents the coins that were rumored to have been carried in the ship.](https://img.atlasobscura.com/fznDimYiaoJJ_CypTbqXqJW0Z85moUCcyoMzZigOjy4/rt:fill/w:1200/el:1/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/RFAtMTQyNC0wMTcg/Y29weS5wbmc.png) + +Captain Charles Morice Pole (left) was in command of HMS *Hussar* when it wrecked, but was acquitted of wrongdoing at a court martial. This British gold George III guinea (right) from 1777 represents the coins that were rumored to have been carried in the ship. [Public Domain; The Metropolitan Museum of Art/Public Domain](https://commons.wikimedia.org/wiki/File:Captain_Charles_Morice_Pole,_by_John_Francis_Rigaud.jpg%20) + +By the 1810s, the notion that a fortune in gold was lying near the bottom of Hell Gate had become an almost-uncontested truth in the New York press, and would remain so well into the 20th century. “You have to remember it’s a good story,” says Ultan. “It sells copy.” This frenzy may have been initially fed by the British themselves, who, despite denying that there was gold in *Hussar* when it sank, sent over a team of experts to salvage the ship in the 1790s, “with results wholly ineffectual,” according to a *New York Times* article from several decades later. + +Press speculation on the value of the gold varied wildly. The “large amount” vaguely referred to in early articles suddenly became the oddly specific sum of £600,000, and then $1,000,000, then $5,000,000. In the 1980s, an international coin dealer told *The New York Times* that the bullion said to be in the *Hussar* wreck could fetch a whopping half a billion dollars in the rare coins market. “Everything gets distorted,” says Ultan. “It’s like a game of telephone.” + +--- + +Early attempts to salvage the ship, including by the British, involved diving bells, a technology that dates back to antiquity and is still used today. Divers descended in a small metal chamber with an open bottom, with the air pocket that allowed them to breathe at depth as they more or less felt around the bottom. At and around Hell Gate, this yielded few results. Diving was only possible for short windows, and even then the currents would toss the bell around, making any kind of concerted search impossible. + +![An engraving dating to around 1880 shows the diving bell technology of the time.](https://img.atlasobscura.com/suRREnKAwM9AXpY9gjrmqt2iAbdEna2Fc8sVdUKn_PU/rs:fill:12000:12000/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/UllKOTlBLmpwZw.jpg) + +An engraving dating to around 1880 shows the diving bell technology of the time. INTERFOTO/Alamy + +In 1811, a salvage company partially funded by Thomas Jefferson managed to bring up iron nails and copper, which amounted to a “considerable sum,” according to an article in the *New York Evening Post* from that year. They also raised a barrel of butter, value unknown, but alas, no gold. + +Where one might see failure, another might see opportunity. A man from Baltimore named Samuel Davis thought he would have a go at raising the entire vessel. He began publishing ads in newspapers throughout the Northeast in 1819, seeking funds to build a machine capable of the feat. + +In his ads, Davis provided a statement from a man who claimed his father had witnessed gold being loaded into *Hussar*. Another oft-quoted anecdote involved the widow of *Hussar*’s pilot, who was still living in New York and had frequently heard her late husband say that there was a “large quantity of money aboard the ship when she sunk,” according to an 1823 article in the *New York Evening Post*. + +Fundraising schemes like this, where shares of a potential treasure are sold to investors, have long been common in the salvage industry, even today. “Treasure hunting operations are often scams,” says author Jerry Kuntz, who wrote a book on 19th-century salvagers, *The Heroic Age of Diving*. “The size of the treasure is often exaggerated. The evidence for the treasure is often falsified. It’s a murky business, has been for centuries and continues to be so to this day.” + +Evidently the enticements—and, as always, the promise of gold—lured enough investors to Davis’s enterprise. His crowd-funded machine operated like a massive claw, with each side supported by an adjacent ship. One journalist described it as a set of “huge iron tongs.” By 1823 it had been built and was ready to be put to work in Hell Gate. What happened next is not entirely clear. There is no account from the time of how Davis’s invention fared, or how satisfied his investors were with the results. A *New Yorker* article from over a century later would say that Davis managed to raise part of *Hussar*’s stern above water. “At that point the cables broke and he gave up the effort,” it read. + +--- + +As underwater technology evolved, so did the search for *Hussar*. George W. Taylor, a pioneer of American diving, was the first to explore the wreck in a diving suit in 1843, but his ill health and premature death a few years later meant he never completed his investigation. In his deathbed, he urged his protégé, Charles Pratt, to keep searching for the lost gold. Pratt returned to Hell Gate every summer for over a decade. + +He was arguably more successful than any of his predecessors. The suit, which was officially patented as “submarine armor,” afforded divers a level of mobility that previous salvagers, constrained by diving bells, could have only dreamed of. “They could range around more, see through the ports of the helmet and pick up objects and use tools,” says Kuntz. “It revolutionized the work of salvagers.” It also helped that Pratt was highly skilled at his craft and probably the most experienced American diver of his time. + +![A Charles Pratt diving helmet which is on display at the Worcester Historical Museum in Massachusetts.](https://img.atlasobscura.com/wtR6qHl57Gl7pThpDqOA9eM-SodBYeaLDJSSjCq5IvY/rs:fill:12000:12000/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/Q2hhcmxlcyBQcmF0/dCBIZWxtZXQgV29y/Y2VzdGVyIEhpc3Rv/cmljYWwgTXVzZXVt/LmpwZw.jpg) + +A Charles Pratt diving helmet which is on display at the Worcester Historical Museum in Massachusetts. Joaquim Salles + +But even for him the waters around Hell Gate were a worthy opponent. The bottom lived up to the tempestuous reputation of its surface waters. Currents remained fierce, visibility was near-nonexistent, and the submarine armor was cumbersome. It was made of a combination of rubber and metal and weighed around 70 pounds. Its copper helmet had to be bolted to the diver’s neck piece. A rubber hose connected the helmet to a hand-cranked air pump at the surface. + +Over the course of 13 years, Pratt salvaged numerous artifacts from *Hussar*. He raised cannons and cannonballs, bottles of wine and swords. He found human bones still in shackles—likely the remains of the American prisoners. Tantalizingly, he also found several 18th-century gold guineas, but far from the promised windfall. The coins probably belonged to the crew and were not a part of a larger haul, but were more than enough to keep the legend alive. Like others before him, Pratt had difficulty breaching the wreck’s lower deck, where cargo was traditionally stored. He dove on *Hussar* for the last time in 1866. (Fast forward to 2013, when Central Park Conservancy employees were cleaning a cannon from *Hussar* that had likely been donated by Pratt and kept in storage for many years. They were surprised to discover it was still loaded with gunpowder and a cannonball. The NYPD bomb squad was called on to diffuse it.) + +![McGowan's Pass, now in Central Park, was a British position during the Revolutionary War. Today, a cannon from HMS Hussar marks the site. In 2013, the Central Park Conservancy discovered that it was still loaded, and called on the NYPD bomb squad to defuse it.](https://img.atlasobscura.com/GrigaFFXJMRXMGo8_1cPL6ekxKBTO_Qt2qpa2wo2diM/rt:fill/w:1200/el:1/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/TWNHb3duc19QYXNz/XzEuanBn.jpg) + +McGowan’s Pass, now in Central Park, was a British position during the Revolutionary War. Today, a cannon from HMS *Hussar* marks the site. In 2013, the Central Park Conservancy discovered that it was still loaded, and called on the NYPD bomb squad to defuse it. [Station1/CC BY-SA 4.0](https://commons.wikimedia.org/wiki/File:McGowns_Pass_1.jpg) + +Several salvage companies worked on *Hussar* over the ensuing decades, without Pratt’s success. One notable attempt was led by a less-than-reputable street preacher named George W. Thomas, who, like Davis before him, convinced investors to back his effort. They gave him $70,000, roughly equivalent to $2 million today, though he was later accused of using the money to buy a lavish house in New Jersey. In 1900, divers trying to salvage a yacht in the East River found an anchor with “H.M.S. Hussar” inscribed on it and sold it to a junk shop. After a century of regular media coverage, it would be almost 40 years until *Hussar* made headlines again. + +Four decades is a long time in a place like Hell Gate. Somewhere along the way, the location of the wreck was lost. Hell Gate itself had changed significantly over the course of the 19th century. Its rocks had been blown to bits to facilitate boat traffic, first by a French civil engineer in the 1850s and later by the U.S. Army Corps of Engineers. Pot Rock, the hazard that sank *Hussar*, was the first to go. The greatest of these blasts happened in 1885, when 300,000 pounds of explosives were simultaneously set off in the waters of Hell Gate, lifting a geyser of foam and rock high in the air. Journalists at the time hyped it as the single largest explosion in history. The blast was felt as far as Princeton, New Jersey, 50 miles away, according to the New York City Parks Department website entry for Mill Rock Island, where the explosives were prepped. One can only imagine the effect that this blast and the ones that came before it, all over Hell Gate, had on the remains of the wrecks below. + +But even after dozens of failed attempts and the bombardment, there were still those who believed there was a fortune waiting to be discovered. Simon Lake, one of the inventors of the modern submarine, began looking for *Hussar* in 1935 in a “baby-submarine” of his own creation, adapted to the conditions of the East River. A year later he gathered journalists in his hotel room and announced that he had found the ship. “Within six weeks I expect to step within her hold,” he told *The New York Times.* This never came to pass. Whatever Lake had found, it was not *Hussar*. He ended the 1930s in dire financial straits. + +![The Flood Rock Explosion of 1885 was one of numerous efforts to improve the navigability of Hell Gate.](https://img.atlasobscura.com/nvNnw_118-tVb0z1TXvrOI0eENmsxlb2x6m1VPWxfck/rt:fill/w:1200/el:1/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL2Fzc2V0/cy84YjNlZTA5OGYx/MjAwM2I2MjBfSGVs/bCBHYXRlIGluIE5l/dyBZb3JrIENpdHlf/NzMyNzY3RmEtY3Jv/cC5qcGc.jpg) + +The Flood Rock Explosion of 1885 was one of numerous efforts to improve the navigability of Hell Gate. [Ewing Galloway/The New York Public Library Digital Collections/Public Domain](https://digitalcollections.nypl.org/items/510d47dd-a074-a3d9-e040-e00a18064a99) + +Fifty years later, another underwater explorer would continue the search. Salvage expert Barry Clifford came to the project with a pedigree. He had just discovered Samuel Bellamy’s treasure-filled pirate ship, *Wydah*, off the coast of Cape Cod. *Hussar* seemed like the next logical step. Clifford and his team began taking sonar images of the bottom of Hell Gate in 1985. The same technology had just been used to locate the wreck of *Titanic* that same year. Within months, in an echo of Simon Lake’s hotel room press conference, Clifford announced to the world that he had found the wreck. “My opinion is there is a very strong possibility that there is treasure on board the *Hussar*,” he told *The New York Times*. But when divers got in the water it was a different story. In the end, Clifford and his team encountered abandoned cars, washing machines and seven other shipwrecks, but none from the Revolutionary War era. + +And with that, the era of serious salvagers and underwater explorers was deep-sixed. The latest to take up the mantle left by others before is an actor and demolition worker from the Bronx named Joe Governali, who goes by “Joey Treasures.” Governali has been trying to secure exclusive salvage rights over the wreck since the early 2000s. In a deposition, Governali claimed to have found an old map in the Rare Books Room of the New York Public Library that revealed the location of the ship. His salvage company conducted several exploratory dives, but have little to show for it other than some grainy video of what Governali claims is the wreck of *Hussar* and an 18th-century beer pitcher of British origin. Governali produced a reality TV pilot of his escapades. Alas, he is also being accused of fraud by one of his investors, James Kays, who was convinced to pitch in $100,000 after being shown gold coins purported to be from *Hussar*. According to court records, they were allegedly “junk bought on eBay.” + +--- + +It’s difficult to predict what the next phase of this centuries-long treasure hunt will be, but it’s likely to continue in some form. James Kays’s lawyer wrote in a letter to the judge presiding over the case that his client intends to continue the search, just as soon as he gets his money back. + +The next big development might be with Hell Gate itself. The U.S. Army Corps of Engineers has proposed major civil works in the area to protect New York City from storm surges. Some versions of the proposal include large storm barriers that could permanently alter the tidal exchange between the East River, Long Island Sound, and New York Harbor, potentially weakening Hell Gate’s infamous currents. Although such barriers would only close during rare storms, they “threaten to choke off the tidal flow” even when open, according to Riverkeeper. The Army Corps of Engineers indicated recently that they are leaning towards a less invasive alternative but the storm barriers have not yet been ruled out. “It remains possible that other alternatives or components of those alternatives may also be advanced,” according to New York/New Jersey Harbor and Tributaries Project Manager Bryce Wisemiller. + +For now at least, the currents of Hell Gate will keep on flowing unobstructed. As for *Hussar*, the promise of its gold remains alive and well, even if the same may not be true for the ship itself. After two centuries of salt corrosion, violent tides, salvage attempts and maybe explosives, it’s a safe bet that whatever remains of it is probably beyond recognition. “I think the *Hussar* is hither and yon,” says Lloyd Ultan. “It’s a little bit here, a little bit there, a little bit everywhere.” + +In his essay about Hell Gate, Washington Irving mentions how he had grown up hearing fantastic stories about the remains of a ship that lay scattered among the channel’s rocks, one of the many that fell victim to its currents. As an adult, he tried to find the truth about those stories. “I found infinite difficulty, however, in arriving at any precise information,” he wrote. “In seeking to dig up one fact it is incredible the number of fables which I unearthed.” + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero.md b/00.03 News/Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero.md new file mode 100644 index 00000000..42ee3071 --- /dev/null +++ b/00.03 News/Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero.md @@ -0,0 +1,75 @@ +--- + +Tag: ["🥉", "🇺🇸", "🏀", "👤"] +Date: 2023-10-01 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-10-01 +Link: https://www.rollingstone.com/culture/culture-commentary/isiah-thomas-nba-michael-jordan-1234830727/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-IsiahThomasHadtoBeaVillainforMJtoBetheHeroNSave + +  + +# Isiah Thomas Had to Be a NBA Villain for Michael Jordan to Be the Hero + +## How Isiah Thomas Went from All-Time NBA Great to Cartoon Villain + +In an excerpt from ‘When the Game Was War,’ author Rich Cohen makes the case for Detroit bad boy — and Michael Jordan's nemesis — as the grittiest, toughest point guard to ever lace them up + +The vilification of [Isiah Thomas](https://www.rollingstone.com/t/isiah-thomas/) began in his prime playing years. As the star and floor leader of the [Detroit Pistons](https://www.rollingstone.com/t/detroit-pistons/), the so-called Bad Boys — Isiah named the team after a line of dialogue from Al Pacino’s *Scarface* — Thomas became associated with all the sins of that two-time [NBA](https://www.rollingstone.com/t/nba/) champion and its rogues gallery of stars. Rodman, Mahorn, Laimbeer — it could seem less like a pro roster than a pirate crew. Isiah’s reputation only worsened after his retirement, first with his poor performance as a head coach in Indianapolis, then with disastrous turn as the general manager of the Knicks. But mostly, if you hate him, it’s because of his epic battle with [Michael Jordan](https://www.rollingstone.com/t/michael-jordan/). Isiah, a Chicago native and product of the west side playgrounds, battled MJ for the hearts and minds of Chicagoans. For years, the Bulls’ season continued only until they ran into Detroit in the postseason. When the Bulls finally defeated the Pistons in the 1990 playoffs and went on to win six championships in eight years, Michael Jordan became God. When Michael Jordan became God, Isiah Thomas became the devil. That’s why you hate him. So consider me the devil’s advocate. Inch for inch, Thomas was the best player in NBA history. He is the only player in the *Athletic’s* top 50 under six feet tall. He was a (relatively) small man, who played big and got knocked around, but always got up and usually played better after he’d been hurt. Not in spite of the pain, because of it. In this passage from *Rolling Stone* contributor Rich Cohen’s new book *When the Game Was War*, Cohen describes one of Isiah’s great Bull-killing performances from the 1988 playoffs. + +A storm blew through Chicago early in Game 3, a freak system that came from the West. The sky turned black at midday. Streetlamps with sensors flicked on across the Loop. The thunder came with the lightning; the beast was right on top of you. Rain poured down. Upper Wacker Drive was a snarl. Lower Wacker Drive filled up like a bowl. A bartender stood in the window of the Billy Goat Tavern, looking out. When the wind arrived, it hit the skyscrapers like an open hand. The storm warning was upgraded first to a tornado watch, then to a tornado warning. People scurried for cover on Michigan Avenue and State Street. The gusts turned umbrellas inside out. Even people inside the stadium could feel the storm. The broadcast was knocked briefly off the air, but the game continued, meaning, for a time, that only those in attendance knew what was happening. To them, the weather was too perfect, a pathetic fallacy, the outer world reflecting the gloom felt by every fan who watched the Pistons descend on the Bulls with renewed focus.  + +## Editor’s picks + +Bill Laimbeer fed on dark energy. He was a Bond villain, a heel. He hit a shot from the top of the key, pumped his fist, then caught Jordan with a quick, dirty hip check as the Bulls were running up-court. Jordan reeled, turned, and charged at Laimbeer.  + +From that moment, Jordan, who later said Laimbeer had hit him “in the balls,” forgot the mission, lost his composure, timing, and shot.  + +“It distracted us,” said Bulls coach Doug Collins. “And we never recovered.”  + +![](https://www.rollingstone.com/wp-content/uploads/2023/09/When-The-Game-Was-War.jpg?w=683) + +The Bulls scored just 79 points that night, their worst performance of the 1988 postseason. Having come for a coronation, Chicago fans witnessed a funeral.  + +What followed seemed inevitable: a desultory performance in Game 4—the Bulls did even worse, scoring just 77 points— followed by the Bulls’ final loss of the season in Game 5 in Detroit. What people remember is Michael Jordan and Pistons guard Isiah Thomas going up for a rebound in the third quarter. Michael caught Isiah with an elbow in the head. Isiah was unconscious before he hit the ground. For a moment, the game continued around him. Then the whistles blew. Trainers and coaches came running. Detroit assistant Ron Rothstein waved smelling salts under Zeke’s nose. His eyes opened. In them, you recognized fundamental questions: Who am I? Why am I here? His vision cleared; he got up and stumbled off. They said he was done for the night. He went to the locker room, found the door locked, and so, not knowing where else to go, returned to the bench. The announcer said he’d come back not to play but only to support his team. Then, a minute later, the same announcer said he would play but only if absolutely necessary. A few minutes after that, he was out on the floor. The Bulls were rallying. Thomas was told to stanch the bleeding.  + +## Related + +Bulls fans dismiss Isiah Thomas as a whiner, a flopper prone to bitching and complaining, like the rest of the Bad Boy Pistons. But I’ve never bought this because I actually watched Isiah play. There was no one grittier, tougher, or more willing to sacrifice his body and well-being to the cause. As a regular-sized person in a big man’s game, he swallowed more than an adult portion of abuse, was knocked down, knocked out, and stepped on but almost always came back, reenergized, angry, and ready to play.  + +Post-retirement episodes have cast a shadow on Isiah the player, as has the acceptance of Michael Jordan as the NBA’s GOAT, whose bitter struggle with the Bad Boy Pistons became part of the legend, turning members of that Detroit team—those who dared thwart Michael—into villains. For Isiah, it’s a bum rap cemented for another generation by *The Last Dance*, which cast Isiah as the Eternal Foe. What happened to Isiah is like what happened to the Jews when Rome converted to Christianity. What had been a local rivalry between sects—one side of the story—was canonized into an immortal battle between good and evil.  + +But I remember it differently. Because I was there. Because I saw Isiah play in high school and college. Because I understood what he faced in Detroit, how he sublimated his talent to turn that team around. I admired how he took the weak hand he’d been dealt in Detroit and, with leadership and at tremendous physical cost, turned the team into a back-to-back winner.  + +What Isiah did that afternoon at the Silverdome is proof. At 1:55, he was out cold in the paint. At 2:10, he was pulling on the bolted locker room door. At 2:30 he was back in the game, carrying his team across the finish line.  + +The Bulls were within a basket when Zeke returned. Five minutes later, when he checked back out, they were finished. He’d scored 9 consecutive points in three minutes to end Chicago’s season.  + +## Trending + +From the book WHEN THE GAME WAS WAR: The NBA’s Greatest Season by Rich Cohen. Copyright © 2023 by Tough Jews, Inc. Published by Random House, an imprint and division of Penguin Random House LLC. + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md b/00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md index b0133581..e81c32cb 100644 --- a/00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md +++ b/00.03 News/Patricia Lockwood · Where be your jibes now David Foster Wallace · LRB 13 July 2023.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- diff --git a/00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md b/00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md index 6f08def3..9566c72e 100644 --- a/00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md +++ b/00.03 News/Police called her hanging a suicide. Her mother vowed to find the truth..md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-10-01]] --- diff --git a/00.03 News/SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership.md b/00.03 News/SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership.md new file mode 100644 index 00000000..1c542a95 --- /dev/null +++ b/00.03 News/SPIEGEL Reconstruction How Merkel Prevented Ukraine's NATO Membership.md @@ -0,0 +1,396 @@ +--- + +Tag: ["🗳️", "🇺🇦/🇷🇺", "🪖"] +Date: 2023-10-01 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-10-01 +Link: https://www.spiegel.de/international/europe/ukraine-how-merkel-prevented-ukraine-s-nato-membership-a-der-spiegel-reconstruction-a-c7f03472-2a21-4e4e-b905-8e45f1fad542 +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-HowMerkelPreventedUkraineNATOMembershipNSave + +  + +# How Merkel Prevented Ukraine's NATO Membership + +And when it came to assigning responsibility, Zelenskyy didn't just single out the Russians – the murderers who hunted down pedestrians and cyclists. He also mentioned former German Chancellor Angela Merkel and ex-French President Nicolas Sarkozy. "I invite Ms. Merkel and Mr. Sarkozy to visit Bucha to see what the policy of 14 years of concessions to Russia has led to." + +Zelenskyy was referring to the NATO summit that took place in Bucharest in April 2008. + + ![Summit participants Angela Merkel, Vladimir Putin (second from left) and George W. Bush (second from right)](https://cdn.prod.www.spiegel.de/images/16858008-90f9-4f03-9e22-a0ec6796ee58_w520_r1.4492350486787204_fpx40_fpy61.jpg "Summit participants Angela Merkel, Vladimir Putin (second from left) and George W. Bush (second from right)") + +Summit participants Angela Merkel, Vladimir Putin (second from left) and George W. Bush (second from right) + +Foto: + +Vladimir Rodionov / picture alliance + +That was the year that Ukraine was likely closer to becoming a member of the Western alliance than ever, before or since. United States President George W. Bush stood solidly behind Kyiv's accession. But the effort failed, as Zelenskyy made clear, due to the opposition of Merkel and Sarkozy – and an "absurd fear" of Russia. Because of this "miscalculation," the Ukrainian president continued, his country is facing "the most terrible war in Europe since World War II." + +Must Germany once again bear the blame for a war, this time stemming from cowardice? Does Bucharest mark a kind of "original catastrophe" for the failures of Berlin's relations with Russia? + +DER SPIEGEL 38/2023 + + ![](https://cdn.prod.www.spiegel.de/images/0eb026f8-3c6a-4134-9b71-caf37cdcebf2_w335_r0.7502857142857143_fpx50.96_fpy62.26.jpg) + +**The article you are reading originally appeared in German in issue 38/2023 (September 16th, 2023) of DER SPIEGEL.** + +[SPIEGEL International](https://www.spiegel.de/international/ "SPIEGEL International") + +Zelenskyy's accusations resulted in Merkel breaking the silence that she had maintained since leaving office in December 2021. She issued a statement saying that she stands by her "decisions relating to the NATO summit in 2008." A short time later, she expanded on that statement, saying that, at the time, Ukraine had been divided on the issue of joining NATO and that Russian President Vladimir Putin would not have just quietly stood aside and allowed the country to be accepted into the alliance. "I didn't want to provoke that," she said. + +Was her position the right one? And were the steps taken by Germany the correct ones? + +DER SPIEGEL has spoken with a half-dozen people who attended the 2008 Bucharest summit. Some of them, like Latvia's then-President Valdis Zatlers, have agreed to be quoted on the record. Other diplomats and aides asked not to be named. They describe a kind of "High Noon" situation between Merkel and Bush, tears of anger from U.S. Secretary of State Condoleezza Rice and pointed attacks from Polish Foreign Minister Radosław Sikorski against his German counterpart Frank-Walter Steinmeier, who is today Germany's president and head of state. There were, say participants, wild threats coming from Putin. The German chancellor even spoke Russian on occasion with her Central Eastern European allies from the former Warsaw Pact nations in the attempt to negotiate a way out of the impasse, since it was the language they all had in common. And finally, say participants, Merkel – using the green pen that German heads of government use in day-to-day operations – personally added changes to the closing communiqué. + +Photos from Bucharest show an apparently high-spirited chancellor in the Romanian capital's Palace of Parliament, one of the largest buildings in Europe, with conference halls the size of half a football field. But there are also images of Merkel looking surly, the strain clearly visible. The summit lasted from April 2-4, a Wednesday to Friday. On the first evening, Merkel dined with the other heads of state and government, and the next day, the national leaders met together with ministers, advisers and military leaders in a large conference setting. On the last day, member state leaders welcomed Russian President Putin. Many witnesses also remember how Merkel wore a green jacket on that Thursday, making her stand out among the gray suits worn by all the men. + + ![The 2008 NATO Summit: "High Noon" in Bucharest](https://cdn.prod.www.spiegel.de/images/650f0cb1-4ad5-4f5b-bf05-43d1b20168b7_w520_r1.5066208925944091_fpx29.86_fpy44.98.jpg "The 2008 NATO Summit: "High Noon" in Bucharest") + +The 2008 NATO Summit: "High Noon" in Bucharest + +Foto: Belga / IMAGO + + ![Merkel and Bush (second from left) in Bucharest: "George, I've thought things through carefully."](https://cdn.prod.www.spiegel.de/images/1c66f8cb-31fb-4a59-8517-99882059534c_w520_r1.3289036544850499_fpx33.84_fpy44.97.jpg "Merkel and Bush (second from left) in Bucharest: "George, I've thought things through carefully."") + +Merkel and Bush (second from left) in Bucharest: "George, I've thought things through carefully." + +Foto: Gerald Herbert / picture alliance + +The accounts of the summit also make it clear that Bucharest was the climax of a conflict that had begun in 2007 and first came to an end with Bush's departure from the White House in January 2009. And that Merkel wasn't alone. She had support from France in addition to Spain, Italy, the Benelux countries, Portugal and Norway. Even the British, normally so loyal to the U.S., were wavering. Merkel's opposition in Bucharest, in other words, was not the result of Germany going it alone. Perhaps Berlin was right after all? + +Ever since the Russian invasion of Ukraine in February 2022, there have been demands that Germany's relations with Russia under Merkel, of the center-right Christian Democrats, and under Steinmeier, of the center-left Social Democrats, be closely reexamined. Yet very few steps to actually do so have been taken. Here, DER SPIEGEL is making an effort to reconstruct a key year in the Ukraine question from a number of different perspectives. It was possible for the first time to examine German Foreign Ministry documentation that had thus far been classified, including draft talking points for Merkel, dispatches from embassies in Washington and at NATO headquarters in Brussels, memos from the German Foreign Ministry's political affairs division for Steinmeier and "guidelines" for the German delegation in Bucharest, which outlined the German positions. Other source material used for this reconstruction include interviews, declassified U.S. records, documents published by WikiLeaks, memoirs and the results of a project [completed](https://www.smu.edu/Dedman/Research/Institutes-and-Centers/Center-for-Presidential-History/CMP/US-Russian-Relations-under-Bush-and-Putin)  by Southern Methodist University in Texas, where scholars systematically interviewed former members of Bush's staff about his Russia policy. + +Neither Merkel nor Steinmeier made themselves available for an interview when contacted by DER SPIEGEL. + +### **A Nightmare** + +### **Kyiv, Fall 2007 +** + +A letter to NATO expressing a demand to start the accession process. That's all it would take. For several months, Ukrainian President Viktor Yushchenko had been consulting with U.S. diplomats about sending just such a signal, signed by Ukraine's highest constitutional institutions: President Yushchenko in addition to the prime minister and the president of parliament. A signal of unity. Such a gesture would demonstrate to the West that Kyiv's interest in joining NATO had to be taken seriously – in contrast to the signals sent in previous years. + +Yushchenko was in favor of the step. A former banker, the Ukrainian president was married to an American woman who used to work at the U.S. State Department, and his fear of the Russians was based on personal experience. Just a few years earlier, the reformer had only narrowly survived a dioxin poison attack. He was convinced that Putin, a former KGB agent, was responsible. From Yushchenko's perspective, only NATO membership could guarantee sovereignty for his country. Otherwise, he feared, Ukraine would remain "in a semi-colonial state," dependent on Moscow. + +But the letter never came. + +It had been the same story for quite some time. In conversations with the Americans, leading Ukrainian politicians would insist that they aspired to NATO membership – particularly Yushchenko, a leader of the 2004 Orange Revolution, with its promise of freedom and prosperity. His one-time political ally turned bitter rival Yulia Tymoshenko also wanted Ukraine to become part of the trans-Atlantic alliance. Even the pro-Kremlin opposition leader Viktor Yanukovych, who would ultimately flee to Russia in 2014, would occasionally give the impression that he wasn't opposing Ukrainian NATO membership for all eternity. + +The problem, however, was that political reforms in Ukraine simply weren't progressing to the point where they would meet NATO standards when it came to the military, the judiciary and politics. That lack of progress could only partly be blamed on Russia, which was eager to weaken Ukraine wherever it could so as not to lose influence. On the Corruption Perception Index kept by Transparency International, Ukraine had fallen to 118th place, almost as low as Russia, and the trend remained negative. Yanukovych and Tymoshenko themselves were suspected of malfeasance. + +More than anything, though, they were not having success in reversing the populace's skepticism of NATO. Indeed, the efforts undertaken by Yushchenko and Tymoshenko to that end had been less than monumental, with opposition leader Yanukovych even using the September 2007 parliamentary elections to brand himself as the leader of the anti-NATO movement in the country. + +A strong majority of Ukrainians indicated in surveys that they weren't particularly interested in joining the alliance. Merkel's administration in Berlin believed that around two-thirds of the population "held negative views of NATO." Cold War prejudices fueled by Russian television continued to have an influence, particularly in the eastern and southern parts of the country. Furthermore, many Ukrainians had fought for the Soviet Union in Afghanistan and were worried about being sent back, this time to fight for the West, should Ukraine become part of NATO. + +Victoria Nuland, the U.S. ambassador to NATO in Brussels, advised the Ukrainian government to launch an expansive information campaign in the country to dispel the image of NATO as a "four-letter word." To some observers, it seemed as though the Americans were more interested in Ukraine's accession to NATO than the Ukrainians themselves. + +Yushchenko and Tymoshenko were ultimately able to set aside their differences following the parliamentary elections for long enough to establish a coalition to prevent election victor Yanukovych from become prime minister. Instead, Tymoshenko took the position, the woman with the striking braid wrapped across her head. It was the fourth change in government in just three years for Ukraine. And in January 2008, Yushchenko, Tymoshenko and the president of parliament finally sent the letter to Brussels. + +In the letter, they requested from NATO a Membership Action Plan (MAP) for Ukraine. Normally, such plans outline the reforms that must be undertaken ahead of accession and are part of the standardized process that takes a number of years to complete. In theory, MAP status does not guarantee ultimate accession to the alliance, but in practice, it is widely considered to be a sign of almost inevitable membership. + +Yet the letter did not actually become the symbol of unity Kyiv had hoped to send. In protest against the request for MAP status, Yanukovych's people paralyzed parliament for several weeks. There were even fisticuffs on the floor. Ultimately, the government and the opposition agreed to hold a referendum prior to a NATO accession. + +Reformers Tymoshenko and Yanukovych also sought to block each other. Ukraine planned to hold presidential elections in 2010 and, as the German Embassy in Washington learned, Tymoshenko was hoping to win that election and wanted to wait to start the MAP process until that time. That desire translated into hesitancy from Tymoshenko when it came to pushing for her country's NATO accession during a visit to alliance headquarters in Brussels. + +German Foreign Minister Steinmeier warned his NATO counterparts in a confidential meeting of domestic political intrigue in Kyiv on the MAP issue. "Hidden agendas cannot be ruled out," he said. + +The Ukrainian reformers frequently bickered like children for all to see. "It's always the other one who is to blame for the situation," one Berlin diplomat said, describing the situation. When Merkel visited Ukraine later that year, Yushchenko tried to prevent the prime minister from meeting with the German chancellor. The Germans, though, found a cagey way to set up a meeting anyway: Merkel sat down in a restaurant and Tymoshenko came in through the backdoor. The situation in Kyiv is a "nightmare," Merkel's security adviser, Christoph Heusgen, told the Americans. + +But the letter sent to NATO by Kyiv did at least force alliance member states to reveal where they stood on Ukrainian accession. + +### **Threats from Moscow** + +### **Brussels, NATO Headquarters, January 30, 2008 +** + +Things hadn't been going well for quite some time in the NATO-Russia Council, a body that provided a venue for the West and Moscow to discuss security issues. In the early 2000s, Putin had thought that Russia could ultimately become a NATO member, on a par with the Americans. At the time, he even said that he saw no problem with Ukrainian membership. But such sentiments had long since evaporated. In early 2008, Putin sent the ultranationalist populist Dmitry Rogozin to Brussels, a tall, bulky man with closely cropped hair. His nickname in Moscow was "The Hooligan." Rogozin's mission as NATO ambassador was to stifle the influence of Russia's critics, particularly coming from the new, Central and Eastern European NATO member states. + +Rogozin claimed that the Baltic states, the Crimean Peninsula and extensive regions of Ukraine belong to "traditional territory of the Russian nation." At the very first council meeting in which he took part, he made reference to the anti-NATO sentiment in Ukraine and threatened that Ukrainian accession to NATO could "be a threat to the very existence of Ukraine as a sovereign state." Britain and Hungary stood up to him. + +Attempts at intimidation were a frequently used tool in Moscow's political repertoire. Putin left no doubt about his desire to return Russia to its role as a global power. But from the perspective of several NATO countries, it wasn't clear what method Putin would choose to achieve this goal: old-style aggressive power politics; or economic strength coupled with technological prowess, as demonstrated by the West. "You could sense that the Russians themselves weren't totally sure," says one Merkel adviser. Secretary of State Rice spoke of two versions of Russia. The one accepts commonly held values, the other does not, a sentiment documented in Cable 359 from Germany's NATO representation. + +The Baltic states and Poland would regularly meet to harmonize their positions ahead of NATO meetings, says Zatlers, the former president of Latvia. Zatlers, a medical doctor and a former reserve officer in the Soviet army, exudes fearlessness in public. Immediately after the reactor meltdown in Chernobyl in 1986, the Soviet army sent him there for a two-month stint. "The Ukrainians like me because I'm the only head of state who has been to Chernobyl," says Zatlers, a brawny man with a friendly smile. + +Zatlers, who served in office from 2007 to 2011, doesn't harbor any anti-Russian sentiments and strove for friendly relations with his country's massive neighbor to the east. But Zatlers also spoke frequently with Polish President Lech Kaczyński about their countries' past experiences. In contrast to Zatlers, the archconservative Polish law professor had clear conceptions about who his enemies were: "Dangers? That would be our neighbors – Russia and Germany." + +One-time Solidarność activist Kaczyński was arrested when the communist regime in Warsaw imposed martial law with the support of Moscow. His parents had fought against Nazi Germany in the 1944 Warsaw Uprising. Stalin's advancing Red Army paused combat operations before entering the Polish capital, giving the Nazis the time they needed to complete their destruction of the uprising and the city. + +Zatlers says that even back in 2008, Kaczyński was concerned that Moscow might attack neighboring countries Ukraine and Georgia, which was also seeking to join NATO at the time. A powerful show of unity by the alliance at the Bucharest summit, it was hoped, would deter Putin and improve the strategic position of Central and Eastern European countries. + +But the alliance was divided. Nuland, the U.S. NATO ambassador, counted 14 countries of 26 in the North Atlantic Council that backed Kyiv's ambitions to begin the MAP process, but aside from the U.S. and Canada, almost all of them were Central and Eastern European countries. + +Alliance skeptics grouped around Germany's NATO ambassador, Ulrich Brandenburg, a typical proponent of Foreign Minister Steinmeier's restrained approach to diplomacy. A deliberate man who had once been a conscientious objector, Brandenburg sat between France and Greece in NATO's alphabetized seating arrangement and sought to hold together a kind of blocking minority of around 10 countries. NATO may adhere to the principle of consensus, but Germany on its own would not have been able to stand up to pressure from the Americans. + +The U.S., meanwhile, kept a close eye on what Steinmeier's representative was up to in Brussels – as he sought to prevent Ukraine and Georgia from even making it onto the agenda for the Bucharest summit. When Nuland and her team would manage to defeat Germany on a specific question, they would joyfully write to Washington that Brandenburg was "stone-faced" or was "visibly unhappy." + +The kid gloves had long since been taken off. "We aren't alone, but we are exposed. The result will have an effect on our status in NATO," Brandenburg noted. The Germans and their allies had to face accusations that they were primarily concerned about their economic interests in Russia, says Zatlers. Minor episodes he had experienced reinforced that impression. During his first visit to Berlin, he says, Merkel opened their discussion by asking whether he was opposed or in favor of the Nord Stream natural gas pipeline from Russia to Germany. That was apparently the most important issue from the chancellor's perspective. And it was clear what she wanted to hear: The pipeline is a super idea. + +"Some harbor the suspicion that we and others have conceded zones of influence to Russia," Brandenburg wrote to the Foreign Ministry in Berlin. Still today, all German participants continue to deny that such suspicions were at all justified. According to a U.S. cable from Warsaw, Polish diplomats at the time even went so far as to advance a claim that bordered on character assassination – namely that Foreign Minister Steinmeier was profiting financially from Nord Stream, just like his friend Gerhard Schröder, the former German chancellor who Steinmeier had served as head of the Chancellery. Still, Warsaw wasn't interested in a blanket boycott of Russian natural gas, they just wanted the pipelines to run through Poland. + +Ambassador Brandenburg, for his part, introduced the horrific scenario of a political partitioning of Ukraine. The German diplomat told his American counterpart face-to-face that it was "impossible to have security in Europe without Russia, and foolish to try to have it against Russia." The sentiment was a classic mantra from Merkel's and Steinmeier's relations with Moscow – one that is today considered to be one of the greatest failures of the Merkel era. + +### Evil Spirits + +### Washington, D.C., White House, February 2008 + +With the wars in Afghanistan and Iraq dominating the headlines, President Bush had long paid little attention to the issue of Ukraine. But the letter from Kyiv changed that. Fundamentally, the Texan received European countries interested in joining NATO with open arms. Bush was a believer in the American mission of bringing democracy to the world and had bipartisan support on the issue in Congress, with Democratic Senator Joe Biden, the current U.S. president, leading the way. Yushchenko was seen as a hero by many in the U.S., with influential Democrats and Republicans even nominating him for the Nobel Peace Prize following the Orange Revolution. + +Bush was aware of Ukraine's corruption problems, but he hoped that the prospect of NATO membership would accelerate reforms in Kyiv and also prompt Moscow to pursue a less aggressive course against Ukraine and Georgia. The Americans told the Germans over and over again that under no circumstances could the impression be created that Kyiv and Tbilisi were being denied MAP status out of consideration for Moscow's sensitivities. + +There were, however, also warnings from intelligence agents, diplomats and ministers. U.S. Ambassador to Moscow William Burns, who is now director of the CIA, wrote that NATO membership for Ukraine was the "brightest of all red lines" for the Russian elite (not just Putin). The Russian president, he noted, had no flexibility on the issue. Burns recommended that MAP status for Ukraine be delayed, arguing that the West needed Russian cooperation on a number of other issues, such as Iran. + + ![The Palace of Parliament in Bucharest: Conference halls the size of half a football field.](https://cdn.prod.www.spiegel.de/images/77dab051-356c-4f39-9155-ea1f2ad4f60b_w520_r1.4998642411077925_fpx55.33_fpy54.99.jpg "The Palace of Parliament in Bucharest: Conference halls the size of half a football field.") + +The Palace of Parliament in Bucharest: Conference halls the size of half a football field. + +Foto: Micha Korb / picture alliance + +Defense Secretary Robert Gates agreed with Burns. "One Cold War was quite enough," he said. He considered NATO membership for Ukraine to be a "monumental provocation" of Moscow and a dangerous weakening of the alliance. He doubted that Americans and Europeans were prepared to put their lives on the line for Ukraine, and that being so, an empty guarantee of security for Ukraine would damage NATO's credibility. Privately, Gates was hoping that the Germans and French would stand in the way of his president's expansion plans. + +Even Secretary of State Rice has said she had doubts about the advisability of pushing for Ukrainian accession. Doing so, she feared, could weigh on the alliance and even lead to a defeat for Bush in Bucharest. Was it worth the risk? + +At a National Security Council meeting in the White House a few weeks before the NATO summit, Rice only outlined the arguments in favor of and against Ukrainian membership, without making any recommendation. + +Still, Bush stayed true to his line, and administration staff believe that's because of the neo-conservative advisers lined up behind Vice President Dick Cheney. Still today, Cheney is seen as the black hat in the Bush administration who pushed the U.S. into the illegal invasion of Iraq and the torture program that damaged America's reputation for years. + + ![Dick Cheney, George W. Bush and Condoleeza Rice in Washington in 2006: Tears of anger](https://cdn.prod.www.spiegel.de/images/8cb9230d-a37e-4b29-be03-81fdde5c7e43_w520_r1.5015015015015014_fpx64.55_fpy44.97.jpg "Dick Cheney, George W. Bush and Condoleeza Rice in Washington in 2006: Tears of anger") + +Dick Cheney, George W. Bush and Condoleeza Rice in Washington in 2006: Tears of anger + +Foto: EVAN VUCCI/ AP + +Even before German reunification in 1990, Cheney – who was U.S. secretary of defense at the time – was eyeing NATO's eastward expansion because he didn't trust the Russians. He also wanted to prevent a second superpower from ever again posing a threat to U.S. hegemony, and thus sought to pursue the enlargement of NATO, which had lost some of its importance with the end of the Cold War. It proved advantageous that Central and Eastern European countries sided reliably with the U.S. when it came to conflicts within the alliance. NATO Ambassador Nuland in Brussels had once been a member of Cheney's staff. + +Officially, the Americans insisted that Ukraine was making its own sovereign decisions on the NATO issue, but many German diplomats and politicians harbored suspicions that Washington was seeking to enlarge its own sphere of influence. When it came to the issue of MAP status, scoffed a Foreign Ministry staffer in Berlin, Ukraine was receiving "a lot of support, except from its own people." + +This impression was strengthened by a number of minor episodes. When the U.S. government learned that Prime Minister Tymoshenko was hesitant on the MAP issue, Secretary of State Rice took it upon herself to speak with her – the Germans learned from a source in the U.S. capital. Rice apparently wanted to get the Ukrainians back in line. A Merkel administration staffer says that on the Ukraine issue, the Americans were motivated by "ideology and great power aspirations." In the German guidelines for Bucharest, the first item in the list of German interests is the sentence: "Maintain a sense of proportion in expanding NATO's regional and functional role." + +It isn't clear from the historical record whether the rather artless Bush shared Cheney's viewpoint. According to contemporaries, he took a principled stance: If democratically elected governments sought MAP status, then he couldn't stand in the way. He wanted his staff to pile the pressure on America's allies. "I like it when diplomacy is tough," Fiona Hill, then a national intelligence officer, recently recalled Bush as saying in an [interview](https://www.nytimes.com/2022/04/11/magazine/trump-putin-ukraine-fiona-hill.html)  with the *New York Times Magazine*. + +Bush and his team, however, faced a fundamental handicap in their efforts: The entire world knew that his tenure in the White House would soon be coming to an end. + +### U.S. Pressure on Merkel and Steinmeier + +### Berlin, Chancellery, March 2008 + +With the Americans firmly sticking to Bush's course on Ukraine, Washington took advantage of every tool in the diplomatic toolbox. They pressured the Germans, sought to maneuver and wooed them. When Bush's people learned that Heusgen's family was in Washington on vacation, his wife and children were invited to the White House for a tour. Seemingly by chance, the president turned up. They did everything they could to buy us, says a Merkel adviser. + +Secretary of State Rice tried her luck with her German counterpart Steinmeier. Rice speaks Russian and turned her expertise on the country into a career. She felt that Moscow needed to "know that the Cold War is over and Russia lost." But Steinmeier wasn't a fan of that kind of triumphalism. In the tradition of German Social Democratic Ostpolitik, he wanted to build bridges to Moscow and was hoping for "change through interconnectedness." That was a mistake, as he believes today. Back then, though, the German Foreign Ministry still thought that even Russian NATO membership was still a possibility in the long term. + +And then there was the Medvedev factor. According to the Russian constitution, the end of Putin's presidency was approaching, and the young lawyer Dmitri Medvedev, who presented himself as a liberal reformer (read DER SPIEGEL's 2009 interview with Medvedev [here](https://www.spiegel.de/international/world/spiegel-interview-with-russian-president-dmitry-medvedev-oil-and-gas-is-our-drug-a-660114.html) ), had been elected to succeed him. Steinmeier knew Medvedev from his time as the head of Schröder's Chancellery, back when the Russian was head of the presidential administration at the Kremlin. And whereas Rice argued that when it came to pushing ahead on Ukraine, there was no better time than the Putin/Medvedev interregnum, the Germans felt that the timing was "particularly inauspicious." + +Looking back today, Medvedev's 2008 succession of Putin is seen as a having been a bait-and-switch operation from the beginning – Putin returned to the Kremlin in 2012. These days, Medvedev primarily attracts attention for his incendiary rants. Was it then naïve to place hopes in Medvedev back then? Heusgen says that Medvedev "really tried to free himself from Putin's grasp." He just didn't succeed. + + ![Then-Russian President Dmitri Medvedev (right) and his predecessor Putin in Moscow in 2008: a bait and switch?](https://cdn.prod.www.spiegel.de/images/67084cc1-44ca-46eb-b2d7-7b03c25c46c1_w488_r0.809_fpx49.98_fpy40.44.jpg "Then-Russian President Dmitri Medvedev (right) and his predecessor Putin in Moscow in 2008: a bait and switch?") + +Then-Russian President Dmitri Medvedev (right) and his predecessor Putin in Moscow in 2008: a bait and switch? + +Foto: IMAGO + +In the German Foreign Ministry guidelines for the Bucharest summit, beneath the heading "our interests," is the sentence: "Minimize strains in the relationship to RUS," the abbreviation for Russia. In his public comments, Steinmeier would say that the West was already in conflict with Moscow on a number of issues, such as Kosovo. He therefore saw "no compelling reason" to open up an additional disagreement. + +Soon, it became clear to the Americans that Steinmeier could not be moved. Bush would have to negotiate with Merkel personally, at the top. He called her at least three times in the run-up to Bucharest, and he asked allies to also call Berlin. + +Merkel responded to the efforts with humor. According to someone familiar with the conversation, she told him: "George, I've noticed that you have asked other Europeans to call me as well. And when they do, I ask them: Are you calling on George's behalf? And then I know that they are. It makes no difference if you call yourself or if others do. I've thought things through carefully. It is not a tactical position, I am convinced of that. You shouldn't think that I am one of those people who say something different before the summit than they do at the summit." That's how someone present at the time recalls the conversation. + +Bush took her recalcitrance in stride. He had always told Merkel that he had no problem with being openly contradicted. His falling out with Gerhard Schröder over the war in Iraq, Bush said, only came about because Schröder had lied to him – which Schröder denies. And Merkel did contradict him openly. + +The chancellor had her doubts about Ukraine's democratic maturity. She was also concerned about Russia's Black Sea fleet, the contractually agreed headquarters of which was on the Crimean Peninsula, which would become NATO territory if Ukraine were to accede. She pointed to the North Atlantic Treaty, which founded the NATO alliance and limits membership to countries that can "contribute to the security of the North Atlantic area." Nobody, Merkel felt, could seriously claim that the clause applied to Ukraine and Georgia. Furthermore, countries involved in regional conflicts should not be allowed to join, she emphasized – and Georgia was involved in a spat with Moscow over two provinces that wanted to escape the clutches of Tbilisi. + + ![Russian Navy ships with the Black Sea fleet at the Crimean Peninsula port of Sevastopol in 2008](https://cdn.prod.www.spiegel.de/images/f8bc9353-9d35-4efa-a1b7-72f548bbd92f_w520_r1.7836691410392365_fpx37.55_fpy44.97.jpg "Russian Navy ships with the Black Sea fleet at the Crimean Peninsula port of Sevastopol in 2008") + +Russian Navy ships with the Black Sea fleet at the Crimean Peninsula port of Sevastopol in 2008 + +Foto: picture alliance + +When Bush called, the Germans got the impression that the chancellor's arguments were having an effect on the American president. + +It was also true that Merkel, head of the center-right Christian Democratic Union, would be facing a re-election campaign one year down the road and had very little room for maneuver. Following a visit to Berlin, a senior U.S. diplomat reported that among leading members of German parliament, he was unable to find anybody who shared Washington's position on Ukraine. George W. Bush's America was seen by many in Berlin as violence prone and unpredictable – and many members of the center-left Social Democrats (SPD) hadn't forgotten that when it came to efforts aimed at preventing the U.S. invasion of Iraq in 2003, Putin had stood by Germany's side. In 2007, SPD parliamentary group leader Peter Struck said that Germany should maintain the "same proximity" to Washington and Moscow. Or the same distance, depending on your interpretation. + +### Bucharest, Palace of Parliament, April 2, 2008 + +### **"This Is Getting Ugly"** + +On the German delegation's outbound flight to the NATO summit in Bucharest, many conversations centered on the French. Steinmeier was apparently concerned. Would Sarkozy cave to pressure from the Americans? If he did, it would be difficult for the Germans to prevent NATO's eastward expansion. + +The summit began with a number of dinners. NATO heads of state and government convened at Cotroceni Palace, the official residence of the Romanian president, while the defense ministers and the foreign ministers, including Steinmeier, attended separate dinners at the Palace of Parliament. The foreign ministers had been charged with discussing eastward enlargement – and, of course, with working on the Germans, who were seeking to block it. Steinmeier would later say that it was the worst evening of his tenure at the Foreign Ministry. + +There are no minutes available from the meetings, and events can only be reconstructed through the memories of attendees. According to those recollections, Rice asked her German colleague to speak first, then the Central and Eastern Europeans. She wanted to have the last word. + +The heads of state from Central and Eastern Europe had already taken a close look at how West Germany joined NATO in 1955. When Steinmeier said that Georgia could not become a NATO member as long as the "frozen conflict" with its two provinces remained unresolved, things started "getting ugly," according to Rice. The foreign ministers of Poland and the Czech Republic along with Rice attacked Steinmeier sharply. Divided Germany had itself been a "frozen conflict," they said, and the Germans should be happy that no one back then had the mindset that Berlin has now. + +The strongest attack on Steinmeier came from Polish Foreign Minister Sikorski, a former journalist who had lived in the U.S. for years, where he had worked for the neoconservative think tank American Enterprise Institute. Sikorski's office says he spoke spontaneously and kept no notes of his remarks. Several witnesses recall him, at least indirectly, comparing Merkel's and Steinmeier's Russia policies with the Hitler-Stalin Pact of 1939. He said the Poles owed it to the Germans that they had to live under the Soviet yoke for several decades after 1945. If Paris and Berlin disregarded Poland's strategic interests, there would be consequences, he grumbled according to accounts of the meeting, adding that Poland has a long memory. + +Merkel and Steinmeier were staying at the Hilton Hotel in Bucharest. That night, they sought to ensure that support from other delegations had not wavered. And by the next morning, it was clear: Merkel would not be on her own. Members of the German delegation say that Sarkozy's position was that if the chancellor was sticking to her guns, then he would too. + +### **Tears of Anger** + +### **Bucharest, Palace of Parliament, April 3, 2008** + +The working session of the North Atlantic Council began at 8:55 a.m. in a vast hall with a dove-blue carpet, marble columns and crystal chandeliers. Merkel vs. Bush, it was like "High Noon," recounts Volker Stanzel, who was director of the Political Affairs Division at the German Foreign Ministry at the time. + +Heads of state and government were sitting at the circular table, with Steinmeier next to Merkel. Behind them were the delegations, comprised of more than 100 politicians, military officers, diplomats and advisers. As the leaders gave their speeches up front, handwritten proposals were being passed around in the background, airing ideas on the search for a way out of the impasse. + +It is frequently the case at such conferences that there are as many versions of what happened as there are participants, and none of them can claim to be perfectly accurate. But it is clear from accounts that organizers had used a curtain to delineate the conference zone in the expansive hall, and behind the curtain, it was almost dark, with furniture scattered about. Secretary of State Rice, Merkel's security adviser Heusgen and others stood at a bar table. Russia by itself is just one country, the American argued, according to participants, whereas Russia plus Ukraine and Belarus is an empire. She stressed that such an empire, once established, would once again seek to dominate Europe, and that the Kremlin would again pursue an aggressive foreign policy. + + ![French President Nicolas Sarkozy, Merkel and German Foreign Minister Frank-Walter Steinmeier in Bucharest in 2008: Setting a fatal course](https://cdn.prod.www.spiegel.de/images/eff59d6d-94fc-4d4f-ada2-14b7f82be9a2_w520_r1.502824858757062_fpx69.86_fpy54.98.jpg "French President Nicolas Sarkozy, Merkel and German Foreign Minister Frank-Walter Steinmeier in Bucharest in 2008: Setting a fatal course") + +French President Nicolas Sarkozy, Merkel and German Foreign Minister Frank-Walter Steinmeier in Bucharest in 2008: Setting a fatal course + +Foto: Gamma-Rapho / Getty Images + +It sounded like the Cheney line: Keep Russia down. Heusgen is said to have countered with the legal situation in NATO. Rice reportedly then countered: It's not for you Germans, of all people, to deprive the Ukrainians and Georgians of a development that you yourselves have gone through and from which you have benefited. + +According to Heusgen's account, Rice even broke down in tears because the Germans were being so tough. Another witness says they were tears of anger. Speaking to the press later, the U.S. secretary of state praised the Central and Eastern European allies as welcome "new blood" in NATO. She described them as "people who understand what it was to live under tyranny" – clearly a barb against the West Germans. + +It was an unusual situation. Normally, staffers prepare summit agreements, leaving it to their bosses to resolve the final points of disagreement. In Bucharest, though, Merkel and the others had to do the groundwork themselves. But they made no progress. It was Bush with the Canadians and the Central and Eastern Europeans on one side, and Merkel with most Western and Southern Europeans on the other. There was talk of a serious historical mistake by the Germans, of ingratitude, of emboldening Russia. Bush let the Germans know that he had already promised everything to the Ukrainians and the Georgians and couldn't back out now. That, at least, was the version propagated by the Germans. + +Draft talking points for Merkel, in turn, proposed that her main argument should be that "every step this alliance takes should mean more security and stability," which is "very much in the common interest." Countries involved in regional or internal conflicts, the draft read, could not become members of the alliance. + +Around noon, everyone had to leave the hall except for the heads of state and government, the foreign ministers and the closest staff members. The sound in the side rooms, where some diplomats sat, was turned off. + +It was the last round in Bucharest. + +Merkel and Bush agreed that the Russians could be given no veto power over NATO matters. When Merkel said that Ukraine and Georgia could certainly become NATO members, just not now, Bush saw it as a possible compromise formulation. But Poland's Kaczyński intervened: "We want MAP now." + + ![Anti-NATO demonstrators in Kyiv in 2008](https://cdn.prod.www.spiegel.de/images/70199959-11fd-44aa-a579-3785279c6181_w520_r1.6736401673640167_fpx40.63_fpy50.jpg "Anti-NATO demonstrators in Kyiv in 2008") + +Anti-NATO demonstrators in Kyiv in 2008 + +Foto: Sergey Dolzhenko / picture alliance + +The meeting was adjourned, at first for only 30 minutes, but then for an hour. Confusion spread through the room. Many noticed Bush slouching at the conference table – and his reticence. As the Central and Eastern Europeans gathered in the corner of the hall, the U.S. president remained seated, leaving the initiative to Merkel. The situation left one member of the German delegation later wondering: When the leader of the Western world really wants something, after all, he usually gets it. + +The chancellor finally joined the Central and Eastern European leaders. By all accounts, she showed understanding. She was a skilled mediator and she knew the region from her travels as a student during East German times. Her paternal grandfather was also originally from Poland. Then-Latvian President Zatlers recalls appreciatively that the chancellor was the only one who wanted to know why MAP was so important to them. + +Merkel, for her part, now claims to have recognized the danger posed by Putin. "I was very sure that Putin would not let this (*Ed's: NATO membership*) just happen." She also apparently didn't believe that Putin could be deterred. + +A crowd quickly formed, one that grew larger and larger. Rice also joined in. Proposed formulations were passed from the outside to the inside, and Merkel was at the center with a draft text. Zatlers was there, as was Poland's Kaczyński and Lithuanian President Valdas Adamkus. He had fought in a volunteer unit against the advancing Red Army at the end of the war before later emigrating to the U.S. and pursuing a career in the civil service. He then returned to Lithuania as a retiree. Some also remember the Romanian host Traian Băsescu being part of the group, a former communist and informant to the feared Securitate secret service prior to the fall of the Iron Curtain in 1989. + + ![Merkel opponent Lech Kaczyński, the president of Poland, and Lithuanian President Valdas Adamkus in 2007: a shared dark past](https://cdn.prod.www.spiegel.de/images/85c5ad9c-d8a5-4db9-ab59-615f9819eee8_w488_r1.4910096818810512_fpx67.72_fpy44.96.jpg "Merkel opponent Lech Kaczyński, the president of Poland, and Lithuanian President Valdas Adamkus in 2007: a shared dark past") + +Merkel opponent Lech Kaczyński, the president of Poland, and Lithuanian President Valdas Adamkus in 2007: a shared dark past + +Foto: Valda Kalnina / picture alliance + +Kaczyński, Adamkus and Băsescu shared a dark past with Bush. The U.S. had used prisons for torture interrogations of terrorism suspects in their countries. Now, they were arguing that the future of Georgia and Ukraine was a "vital security interest" to their countries. + +At times, the discussion switched to Russian; Merkel and the others had, after all, all lived under Soviet rule. That, at least, is how some witnesses who were present tell it, but others contradict that version of events. + +With the situation growing heated, the German side would say afterwards, the impulsive Polish leader Kaczyński even sought to intimidate the German chancellor, despite her larger stature. + +But Merkel was already prepared to make compromises. A German draft explicitly stated that Ukraine and Georgia would "one day become members of NATO." Germany was not fundamentally opposed, but wanted the MAP process to be slowed down. Rice walked over to Bush. The president said he could live with that. + +But the Central and Eastern Europeans countered that "one day" actually meant never, and Merkel ultimately deleted the two words, though she also refrained from making any concrete promises. The Germans, after all, had plenty of experience with non-binding membership promises, having held Turkey's European Union bid at arm's length for decades. And thus, the upshot from Bucharest was that NATO would, at some point, welcome two new members. The foreign ministers were to deliberate again in December 2008. For the time being, the subject was closed. + +At 2:04 p.m., Merkel and Sarkozy appeared together before the press. + +Bush, together with the Central and Eastern Europeans, was able to claim that they had achieved more than expected. Normally, a commitment to allow a country to join NATO came at the end of the accession process – and not at the beginning. Rice and others later gave the impression that Merkel, as a German, had probably not properly understood what she had written in English, namely: a clear commitment. The Germans, in turn, could claim that they had prevented the immediate accession of Ukraine and Georgia. + +From the internal policy perspective of the West, Bucharest was a reasonable compromise, for which Merkel received praise from German media, from the mass-circulation *Bild* newspaper, the *Frankfurter Allgemeine*, the *Süddeutsche Zeitung* and also DER SPIEGEL. + +### **Putin's Appearance** + +### **Bucharest, Palace of Parliament** + +### **April 4, 2008** + +The Russian president is notoriously late, and in Bucharest, he kept the assembled heads of state and government waiting for 40 minutes. NATO leaders should not have accepted the delay, Zatlers says today. And they certainly should not have accepted the speech Putin delivered, he adds. Bucharest, the Latvian says, "was a low point in the history of NATO." + +Putin described Ukraine as a "very complicated state," stitched together from Polish, Czechoslovak, Romanian and, particularly, Russian territory. A state with a Russian minority, the size of which he greatly exaggerated. Above all, though, he took aim at Crimea. He said it had wound up in the hands of the Ukrainian Soviet Republic through an arbitrary act by the Soviet Politburo which, although true, sounded disturbing in the context. Although Russia has no right to veto NATO membership, Putin noted, the Russian leader threatened that if Ukraine joined the alliance, it could jeopardize the existence of the state. + +The Poles were alarmed. The speech was "absolutely outrageous," Polish Foreign Minister Sikorski fulminated. While still in the hall he had, seemingly innocently, sent someone to ask the Russian delegation for a copy of the remarks and, to his astonishment, actually received one. He later gave it to the Ukrainian defense minister in the hope that he could use the text to push through a higher defense budget in Kyiv. It wasn't until weeks later that news emerged publicly of Putin's speech. + +Zatlers was also concerned. He viewed the speech through the lens of information he had received prior to the summit. The Russian national railway had announced an investment plan for its rail network. The history of two world wars had taught Zatlers to consider troop movements when examining Russian railroad construction. + +Bush, though, remained silent, which Zatlers still believes was a mistake. The leader of the free world, he says, failed to stand up to Putin. Bush continued onward to Sochi following the Bucharest summit for his last state visit to Russia, clearly eager to avoid controversy. In Sochi, Putin went even further in his talks with the American than he had at the NATO summit. "You don't understand, George, that Ukraine isn't even a state," he told Bush. + + ![George W. Bush and Vladimir Putin in Sochi in 2008](https://cdn.prod.www.spiegel.de/images/eeaad844-0466-4314-b06c-cf11c60f5b36_w488_r0.6786666666666666_fpx52.95_fpy41.37.jpg "George W. Bush and Vladimir Putin in Sochi in 2008") + +George W. Bush and Vladimir Putin in Sochi in 2008 + +Foto: UPI Photo / IMAGO + +Speaking to the press, the U.S. President said: "The Cold War is over." Some of the Texan's staffers had the feeling that his efforts before and in Bucharest had only served to allow the president to say afterwards that he had tried everything to get Ukraine into NATO. + +And how did the Germans react? "Putin's speech was largely brushed off," says one participant, adding that many seemed to think it was just talk. "Plus, everyone was looking at their watches because they wanted to get home." It was Friday, after all. + +Merkel told journalists that she had been unable to detect "any kind of aggression" in Putin's words and that the focus should be on the "constructive elements." It was a position that Berlin adhered to for far too long. + +Today, when the failure of Germany's relations with Russia over the past several decades is discussed, comments to the German public downplaying the Russian threat are already very much a part of it. + +The chancellor chose appeasement over deterrence. As ex-security adviser Heusgen writes in his bestselling book "Leadership and Responsibility," Merkel sought to reassure Putin after the summit by saying that Bucharest had prevented Ukraine's accession and that it was inconceivable that such a fundamental decision would be overturned. Another version holds that she referred to NATO's principle of unanimity and assured Putin that Germany would always vote against Ukraine's accession. + +One can interpret Merkel's statement as merely an expression of a German attitude of which everyone was already fully aware. But it can also be read as Merkel's betrayal of Germany's allies in Central and Eastern Europe, who had been promised that Georgia and Ukraine would join NATO sooner or later. + +Either way, it was most certainly a case of hubris – because Putin would not be appeased. Merkel, he is said to have argued, would not remain chancellor forever. + +### ** +Steinmeier's Visit to Poland** + +### **Bydgoszcz, April 6, 2008** + +Steinmeier had long been scheduled to pay a private visit to his Polish counterpart Sikorski at his country estate in Bydgoszcz in northern Poland. The German foreign minister was keen to maintain good relations with his eastern neighbor and his staff said he was looking forward to the trip. Sikorski, on the other hand, seemed to have been hoping to score points domestically, according to media speculation. + +The German foreign minister traveled to Poland with his wife Elke Büdenbender. They enjoyed dinner together that evening, with Sikorski's American wife Anne Applebaum, a journalist, Pulitzer Prize winner and ardent Iraq war supporter, cooking a mushroom soup in front of the cameras. The German guests stayed the night. + + ![Steinmeier (eft) at his wife Elke Büdenbender (right) during their visit to Sikorski, his wife Anne Applebaum (second from left) and their children in Bydgoszcz, Poland](https://cdn.prod.www.spiegel.de/images/af5d22e8-306f-4d81-b9a6-830262c32b44_w520_r1.3903526550466154_fpx63.27_fpy49.98.jpg "Steinmeier (eft) at his wife Elke Büdenbender (right) during their visit to Sikorski, his wife Anne Applebaum (second from left) and their children in Bydgoszcz, Poland") + +Steinmeier (eft) at his wife Elke Büdenbender (right) during their visit to Sikorski, his wife Anne Applebaum (second from left) and their children in Bydgoszcz, Poland + +Foto: Piotr Ulanowski / picture alliance + +But the niceties proved deceptive: The relationship had soured following Sikorski's harsh criticism in Bucharest. To the outside world, the host tried to give the impression that everything was just fine. "In Bucharest, there was an honest discussion behind closed doors," he told waiting journalists. That's the nature of negotiations, he said. Afterwards, they "return to good relations." Steinmeier also made an effort and signaled that he intended to pay more attention to the concerns of Eastern European EU members in the future. The next day, they both traveled to Warsaw for a joint appearance at a university. + +But as U.S. documents show, around two weeks later, Sikorski described the Germans to the Bush administration as a "Trojan horse" inside NATO. + +### Being Right + +### Brussels, NATO Headquarters, August 14, 2008 + +The crisis in Georgia had escalated. Tbilisi had responded to Putin's provocations and attacked the breakaway province of South Ossetia. The Russians were quick to take advantage of the situation by occupying one-third of Georgia's territory. In the North Atlantic Council back in Brussels, alliance diplomats were left to bicker about who was responsible. The Americans and Central Europeans argued that if Georgia had been granted MAP status, the situation never would have escalated. They insisted on immediately correcting what they saw as past mistakes. The German side countered that it was actually the promise of NATO membership delivered to Georgia in Bucharest that had led to the Russian invasion. Only Putin knows which side was correct. + +Quite a few NATO member states began looking at Crimea with a certain amount of trepidation. When NATO foreign ministers gathered for a crisis summit to discuss the situation on August 19, the representative from Prague, Karel Schwarzenberg, warned of a "potentially looming Crimean conflict on the horizon." Because the Siberian wolf "will not be satisfied with vegetarian nourishment forever." + +The war in Georgia, though, demonstrated that the West could do very little in the immediate vicinity of Russia to stop a determined Putin. Unless NATO was ready to go to the extreme. During a meeting with Bush in the White House, a staff member asked advisers and cabinet members present if there was anyone in favor of sending U.S. troops to Georgia to stand up to the Russians. Not even Vice President Cheney was in favor of the idea. Burns, the U.S. ambassador in Moscow, had apparently been right all along and could feel vindicated. Long before, he had warned his government not to overestimate the influence the West had when it came to Ukraine and Georgia. + + ![Victims of the war in Irpin, Ukraine, in March 2022](https://cdn.prod.www.spiegel.de/images/47937107-a601-4e8f-9a5b-213bc54ca865_w520_r1.5_fpx62.66_fpy50.jpg "Victims of the war in Irpin, Ukraine, in March 2022") + +Victims of the war in Irpin, Ukraine, in March 2022 + +Foto: Aris Messinis / AFP + +And the Ukrainians? After Bucharest, President Yushchenko tried to change public opinion in his country in order to address the concerns held by Berlin. The cabinet in Kyiv allotted additional funding to public relations work and established an inter-ministerial working group. And Yushchenko's party launched a campaign promoting NATO membership. The plan had been for the share of Ukrainians supporting NATO accession to rise – to 43 percent in 2009, then 50 percent in 2010, and finally 55 percent in 2011. U.S. Ambassador Nuland was ecstatic, and many member states said they would offer their support to the government in Kyiv, with Germany apparently among them. + +But the efforts fizzled out. In 2010, reformer Yushchenko failed badly in his re-election bid and Yanukovych, the Russian ally, beat out Tymoshenko in a run-off election – bringing the NATO accession project to an end. Latvian ex-president Zatlers nonetheless sees Bucharest as a "missed chance." He believes that Ukrainian attitudes toward NATO would have slowly shifted had the alliance sent a positive signal to Kyiv during the summit. + +The path laid in Bucharest in 2008 didn't necessarily lead to today's war in Ukraine. And yet the summit in Bucharest resulted in the worst of two worlds, Ambassador Burns believes. The Ukrainians and Georgians had been indulged in hopes of NATO membership, which the West was unlikely to deliver. And the summit also reinforced Putin's sense that the West was pursuing a course he saw as an existential threat. + +As such, Merkel, Steinmeier and their allies must live under a cloud of suspicion that despite their good intentions, they ultimately sacrificed both Georgia and Ukraine. Putin, at least, hasn't yet dared to attack a NATO member. + +When Yanukovych was officially inaugurated as the president of Ukraine in 2010, there was a delay and Zatlers had to wait with the other guests. By chance, he found himself standing next to members of the Russian delegation, who apparently either didn't recognize him or didn't realize that he spoke Russian. The delegates from Moscow openly congratulated each other on Yanukovych's success in Kyiv. "Everything is going according to plan," one said. For Zatlers, it is proof that Putin's so-called "special operation" against Ukraine had already begun. It just hadn't yet reached the battlefield. + +Collage: \[M\]: Ryan Olbrysh / DER SPIEGEL; Fotos: Thomas Imo / photothek / IMAGO, Gavriil Grigorov / Kremlin Pool / ZUMA Wire / IMAGO, Russian Defence Ministry / ITAR-TASS / IMAGO, Fabian Bimmer / AP / picture alliance, Russian Defence Ministry / TASS / dpa / picture alliance, Yevhen Zinchenko / Global Images Ukraine via Getty Images, Beata Zawrzel / NurPhoto via Getty Images, Jeff Overs / BBC News & Current Affairs via Getty Images, Win McNamee / Getty Images, Sergei Supinsky / AFP + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims.md b/00.03 News/The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims.md index da25cb1c..32fb9658 100644 --- a/00.03 News/The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims.md +++ b/00.03 News/The Damning Details That Led JPMorgan Chase to Settle With Epstein’s Victims.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- diff --git a/00.03 News/The Greatest Scam Ever Written.md b/00.03 News/The Greatest Scam Ever Written.md index dcd915ac..04719ff7 100644 --- a/00.03 News/The Greatest Scam Ever Written.md +++ b/00.03 News/The Greatest Scam Ever Written.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-27]] --- diff --git a/00.03 News/The Inheritance Case That Could Unravel an Art Dynasty.md b/00.03 News/The Inheritance Case That Could Unravel an Art Dynasty.md index 202b3182..c02b3066 100644 --- a/00.03 News/The Inheritance Case That Could Unravel an Art Dynasty.md +++ b/00.03 News/The Inheritance Case That Could Unravel an Art Dynasty.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- diff --git a/00.03 News/The Serial Killer Hiding in Plain Sight.md b/00.03 News/The Serial Killer Hiding in Plain Sight.md index c867a4f5..5e4ffe5d 100644 --- a/00.03 News/The Serial Killer Hiding in Plain Sight.md +++ b/00.03 News/The Serial Killer Hiding in Plain Sight.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- diff --git a/00.03 News/The Source Years.md b/00.03 News/The Source Years.md index 3017c8fc..fc0c3db5 100644 --- a/00.03 News/The Source Years.md +++ b/00.03 News/The Source Years.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- @@ -52,12 +52,8 @@ While I had interviewed rappers before, none of my previous stories had taken me My decade at *The Source* was an adventure—from interviewing Cypress Hill, the blunt-wielding subjects of my first cover story, at a Philadelphia tattoo parlor, to meeting actor Robert De Niro while shadowing Lauryn Hill (who was meeting with director Joel Schumacher at the Tribeca Film Center about a starring role in *Dreamgirls*), to chasing down producer Pete Rock, who kept ducking me out until me the A&R dude from Loud Records tracked him down at producer Marley Marl’s house in Spring Valley. -[ - ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc61ccfcc-1211-4854-aada-c611dcea51c5_564x755.jpeg) -](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc61ccfcc-1211-4854-aada-c611dcea51c5_564x755.jpeg) - Gonzales’s cover story for The Source, profiling Lauryn Hill. The editors, though young and new to publishing, were serious folks. Writers were encouraged to dive deep, spend hours (sometimes days) with our subjects, and compose longer (hopefully more complex and nuanced) stories than what was published in *Word Up* and *Right On*. For those of us with a little gonzo in our style ([Ronin Ro,](https://ifihavent.wordpress.com/category/ronin-ro/) Bonz Malone and [Ghetto Communicator)](https://ifihavent.wordpress.com/2007/02/19/classic-review-enter-the-wu-tang-in-the-source/), it was a luxury to have 3,000 words to spend on one subject. Having wanted to be a writer since I was a boy, my goal was to create the kind of longform journalism published in the *New Yorker* and *Esquire*, except make it Blackadelic as hell. @@ -72,12 +68,8 @@ I relished the opportunity to interview Lyte when she was promoting her fourth a Like Lyte, there were many in hip-hop who “represented for Brooklyn,” but in the ‘90s the most popular were the Notorious B.I.G. and Jay-Z. Biggie Smalls (as he was first called) was discovered through a Source column called “[Unsigned Hype](https://medium.com/@syreetagates/the-mvps-of-unsigned-hype-46f8cd04c5f8).” Designed to bring unknown rappers to the attention of record companies, other “unsigned” winners included Mobb Deep, Common, DMX and Eminem. Still, as both a rapper and lyricist, I preferred Big’s two studio albums (*[Ready to Die/1994](https://ifihavent.wordpress.com/2007/05/15/the-mayor-of-st-james-notorious-big-in-the-source-1994/)* and *Life [After Death/1997](https://thimk.wordpress.com/2009/11/01/life-before-death-the-source-april-1997-issue-featuring-the-notorious-b-i-g/)*) over the others. -[ - ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb03fd545-6c60-4e23-acf1-b6be42a23a6b_1488x1965.jpeg) -](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb03fd545-6c60-4e23-acf1-b6be42a23a6b_1488x1965.jpeg) - Gonzales’s review of Biggie Smalls’ eerily prescient record, *Life After Death…Till Death Do Us Part*, released shortly the rapper was killed in a 1997 drive-by shooting. Though I never interviewed Big for the magazine, in March, 1997 I was assigned a review of the second album. Spookily, when I was in the middle of listening to it, Havelock called to tell me Biggie had been killed in Los Angeles. Most believed the murder was tied to the infamous East Coast/West Coast war between Big (and Bad Boy Records) and former friend Tupac Shakur (and Death Row Records), who himself had been killed six months before. While processing my sadness about Big’s death, I wrote my review, finishing it days later. @@ -86,17 +78,13 @@ Though I never interviewed Big for the magazine, in March, 1997 I was assigned a Eight months after Big’s death, Jay-Z released his second album *In My Lifetime*, *Vol. 1*. He’d been in the middle of recording it when his friend and fellow Brooklyn ambassador was slain. “You know, in this business it’s really hard to click with other rappers,” Jay told me in 1997, “because it’s so hard to trust people. But, Big was different. He was one of few people I wanted to hang around and develop a relationship with, because he was a funny dude.” -[ - ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60cc7d0-c95d-4be7-89e0-cb23100954dd_1664x1046.png) -](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60cc7d0-c95d-4be7-89e0-cb23100954dd_1664x1046.png) - Ads from The Source for, left, Biggie Smalls’ 1997 record “Life After Death,” and, right, MC Lyte’s 1993 , “Ain’t No Other” After Jay’s record company Roc-A-Fella partnered with Def Jam, business partner/manager Dame Dash decided to have a listening session for *In My Lifetime*, *Vol. 1* at an all-inclusive resort in the Bahamas, and I got to go. On our second evening on the island, the publicist arranged for Jay and me to sneak off to another hotel where we played blackjack together. I’m a bad card player, but Jay, who later confessed he used to hang-out in gambling spots in Brooklyn, played like a professional. “You know playing cards is a lot like life,” Jay said after I lost $100 in minutes. “Sometimes you might have to double your bets, while other times it's best just to walk away.” -\*\*\* +--- As beneficial as *The Source* was to many artists’ careers, there was always a rapper, producer or record executive who had beef with it. Either they felt they didn’t receive the number of mics they deserved, or were mad that a journalist wrote something they didn’t like. The only time I felt unsafe was when *The Source* considered pulling Jay’s cover in favor of Dr. Dre’s supergroup The Firm. @@ -108,7 +96,7 @@ He smiled. “Just get in the car.” “I’ve seen that movie, it never ends well,” I replied and walked away. When I returned a half-hour later, publisher Dave Mays and editor-in-chief Selwyn Hinds were in Dame’s back seat. In the end it was decided that Jay and The Firm would split the covers. -\*\*\* +--- At *The Source* I also wrote book reviews, articles on filmmakers, and a 1994 profile on bass player [Bootsy Collins,](https://www.theguardian.com/music/2020/jun/15/bootsy-collins-were-all-funky-just-not-all-of-us-know-it) known for his work with James Brown and George Clinton’s bands, as well as top drawer solo albums (*Stretchin' Out in Bootsy's Rubber Band*, *Bootsy? Player of the Year*) from the ‘70s. "The rappers of today remind me of the way we were back then, creating new forms of Blackness,” Bootsy said. “Whatever people told us not to do, we did more of. Rap music kept the funk alive…The same way I play bass, Dre plays his sampler." @@ -116,21 +104,17 @@ At *The Source* I also wrote book reviews, articles on filmmakers, and a 1994 pr In 1998 the lines between soul music and rap blurred with the [Lauryn Hill](https://longreads.com/2018/08/30/lyrical-ladies-writing-women-and-the-legend-of-lauryn-hill/)’s solo masterwork *The Miseducation of Lauryn Hill*. We already knew how dope she was as a member of the Fugees, and *Miseducation* proved her passion and ambition. "Being successful has always been more pressing to them (fellow group members Wyclef and Pras), while I was more about making music for love and joy,” she told me “When Marvin (Gaye) created *What's Going On*, even Berry Gordy thought he was crazy. It's that kind of risk-taking that is sorely lacking in music, be it rap or rhythm & blues.” -\*\*\* - -[ +--- ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F131e6f33-6243-4576-bd8e-737f66d56629_500x639.jpeg) -](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F131e6f33-6243-4576-bd8e-737f66d56629_500x639.jpeg) - The cover of the issue of The Source in which Gonzales profiled Trick Daddy. My *Source* swan song was a Trick Daddy cover story, which involved me chasing the rapper around Miami for a few days while he went to strip clubs, gulped Hennessy, and smoked cocaine-laced blunts. “Trick is a wild boy and I needed a wild boy like you to do the story,” my editor told me. When I finally got to talk to Trick, I realized how much pain he was in from being raised in poverty, battles with neighborhood outlaws, and days in prison, hence the distractions and self-medication. “Where I grew up, half my graduating class is now dead, a couple are in wheelchairs attached to shit bags, others are doing life sentences,” he said. “That shit was no fairy tale.” Two weeks later, I delivered an intense story, but it damn near killed me. During that time the magazine was also going through their third editorial shake-up in a decade, and it seemed the perfect time to step away. -Most of the #Hip-Hop50 celebrations and tributes have been geared toward folks who rocked the mic or produced the tracks. However, let’s take a moment to salute the writers and editors at *The Source* who contributed important work throughout the 1990s and early aughts. For many *The Source* was their bible and we writers were simply spreading the hip-hop gospel.  +Most of the `#Hip-Hop50` celebrations and tributes have been geared toward folks who rocked the mic or produced the tracks. However, let’s take a moment to salute the writers and editors at *The Source* who contributed important work throughout the 1990s and early aughts. For many *The Source* was their bible and we writers were simply spreading the hip-hop gospel.  ##### *Previously [Michael A. Gonzales](https://oldster.substack.com/t/by-michael-a-gonzales) has written three essays for Oldster Magazine: “[Too Cool for Prom](https://oldster.substack.com/p/too-cool-for-prom),” “[Supper at Scribner](https://oldster.substack.com/p/supper-at-scribners)’s,” and “[Coffee Shop Days](https://oldster.substack.com/p/coffee-shop-days).” In September, 2021, [he was one of the earlier respondents to The Oldster Magazine Questionnaire™](https://oldster.substack.com/p/this-is-58).* diff --git a/00.03 News/The inequality of heat.md b/00.03 News/The inequality of heat.md new file mode 100644 index 00000000..78a1ac4d --- /dev/null +++ b/00.03 News/The inequality of heat.md @@ -0,0 +1,317 @@ +--- + +Tag: ["🏕️", "🇮🇳", "☀️"] +Date: 2023-10-01 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2023-10-01 +Link: https://www.washingtonpost.com/climate-environment/interactive/2023/india-deadly-extreme-heat-poverty/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-TheinequalityofheatNSave + +  + +# The inequality of heat + +A poor community in India lost power during a heat wave, unlike the luxury mall next door. What happened next exposed extreme heat’s unequal toll. + +Stark differences within a city help predict who will get sick and even die from the heat, and who will be safe. + +Annie Gowen, Niko Kommenda, Anant Gupta and Atul Loke traversed Kolkata to document the unequal impacts of heat. Simon Ducroquet, in Washington, created a visualization of how heat exposes people to dangerous conditions in crowded urban homes. + +Published Sept. 22 at 6:00 a.m. + +*Kolkata* + +After the third day without power, the residents of Kasia Bagan had had enough. + +Their city of Kolkata was in the midst of a blistering heat wave, with temperatures rising to 105 degrees, making life in the narrow lanes and in their tiny one-room homes nearly unbearable. It was Ramadan as well, and many in the predominantly Muslim enclave were fasting. About 6:30 p.m., word spread that an elder in the community had died of heat stroke. + +Angry residents gathered in the dark lane, their voices rising, faces illuminated only by their cellphone screens. Even after the sun had gone down, they were still sweating through their clothes. When would the lights come back on? How could they live like this, let alone bury their dead? Why did the luxury shopping mall at the end of the block still have power, while they did not? + +Sana Mumtaz, a divorced mother of three who lives on the lane with eight relatives in one room, felt her neighbors’ anger growing out of control. + +“It is so hot that people are dying here,” she said. “People were putting up with power cuts and making adjustments for several days. But the death in the neighborhood triggered them.” + +Mumtaz’s neighborhood, her city, her country — her very life as a poor Indian woman — reflect one of the world’s greatest emerging disparities in the era of extreme heat. + +![](https://img.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/QE3HW6M5T5NRBBXEHLIPXU7N4Y_size-normalized.jpg&high_res=true&w=2048) + +Sana Mumtaz carries water from the taps, where water flows to the public twice a day — once in the morning, and once in the evening. + +India already faces dire heat risks and is likely to be the most-threatened country in the world by 2030, according to [an analysis of climate data by The Washington Post](https://www.washingtonpost.com/climate-environment/interactive/2023/extreme-heat-wet-bulb-globe-temperature/?itid=lk_inline_enhanced-template) and the nonprofit modeling group [CarbonPlan](https://carbonplan.org/research/extreme-heat-explainer?itid=lk_inline_enhanced-template), with more than 770 million people living in highly dangerous conditions at least two weeks a year. + +Because of its growing wealth and increasingly prosperous middle class, India will have the resources to protect many of its residents from the worst effects of rising temperatures, unlike many poorer nations. + +But Kolkata, a city of more than 4.5 million in eastern India, is a microcosm of who will benefit from that protection and who won’t. A vast population will face risks of heat-related sickness and death, according to a Post examination that included interviews with residents and experts, as well as data analysis, the use of advanced sensor technology to measure neighborhood exposures, drone footage and public records research. + +Since 1950, the average temperature in Kolkata has risen more than for any megacity studied — by 4.7 degrees Fahrenheit, according to the U.N. Intergovernmental Panel on Climate Change. It’s expected to keep soaring, along with more-intense cyclones, monsoon rainfalls and flooding. + +The analysis by The Post and CarbonPlan, published this month, showed how cities worldwide are seeing a soaring number of hot days so dangerous that spending a short amount of time outside — even in the shade — could threaten someone’s health. Kolkata had 11 such days in 2000 — a number that is projected to jump to 25 days by 2030. That would make it the fifth-worst-affected megacity in the world. + +As life gets hotter, residents who are crowded into slums or unauthorized colonies — one-third of the city’s population — will be the most at risk for health problems, heat stroke and death, experts say, while wealthier neighbors who live in air-conditioned homes on leaf-shaded streets will fare better. + +In Kasia Bagan, the fancy shopping mall with high-end stores had for a decade provided jobs and a bit of civic pride, though few living nearby could afford to actually shop there. But now the Quest Mall became a symbol of something else — the injustice in their lives. + +That night in April, an idea took root and rippled through the restive crowd. The owner of the mall was a billionaire who also owned Kolkata’s electric company, so they made plans to go to the mall and demand that their electricity be fixed. A man had died — surely they would be heard now. “We can’t sleep at night!” said one woman. “We are being ignored, we won’t tolerate this!” a man shouted. + +The small mob began moving up the lane, past lines of scooters and water jugs, an alleyway cow, clothes drying on a line, and the butcher shop where flies still circled although the day’s cutting was long done. They crossed the street and paused before the mall’s Gate No. 3. The building jutted like a giant cruise ship above their heads, its edifice a patchwork of blue glass. Every floor glowed with light. + +After some shouting, the security guards let them in. The air inside the mall was cool. It smelled of sandalwood, lilies and imported chocolates chilled to a perfect 60 degrees. The fountain splashed outside Gucci and the Rolex store, where you could buy a watch for $91,000, both shut tight for the night. The men sat on the marble floor, unsure what would happen next. + +## Nine people and one bed + +Mumtaz’s neighborhood is home to about 7,000 working-class people who live in concrete apartment blocks so crowded that life spills out into its narrow lanes, where residents gossip, wash clothes and set out plates of mango to be dried and pickled. She grew up in the windowless room she lives in today with daughters Zariyat, 9, and Alina, 4, and six other relatives, separated from the lane by only a flowered cloth. There is only one bed. + +The Quest Mall — at the end of Mumtaz’s lane — opened in 2013 with the promise of bringing the finest designer brands to the city’s affluent, built on land that was once a tram depot in the middle of Kasia Bagan, where many residents do not have running water or their own bathrooms. Its developer, Sanjiv Goenka, is a Kolkata billionaire who owns a soccer club, the power utility and a cricket franchise. + +Mumtaz’s neighborhood is a product of the city’s unregulated housing-construction boom, which contributes to its climate vulnerability. The city, part of a larger metropolis of over 14 million, was once the capital of British India, which left behind stately homes following the country’s independence in 1947. + +Decades of rampant urbanization followed, leaving the city without a proper storm-water or sewage drainage system and straining its fragile electrical grid, experts say. Developers razed blocks of graceful neem, banyan and peepal trees, leaving Kolkata with the least shading tree cover of any Indian megacity, according to India’s State of the Forest report from 2021. Slums proliferated. + +“What you see in India is that there is an inbuilt inequality at all levels,” said Ashish Avikunthak, a University of Rhode Island professor who grew up in Kolkata. With these new upscale developments such as the mall, he added, “a new kind of class inequality is inflicted.” + +Twice a day, water flows to the public taps in Mumtaz’s neighborhood, once in the early morning and once in the evening. One recent summer evening, a crowd of women gathered to wait for the water, gossiping and jostling for their place in line. The sun was setting, but it was still oppressively hot, well over 100 degrees. When the water began trickling from the tap, they pressed forward, filling their water bottles, buckets and pots for the day’s cooking and washing. + +Mumtaz, 28, let several women jump her spot while she waited, fanning herself with the thin cotton veil that’s traditional in this conservative neighborhood. Every day, she is responsible for securing water for her household of nine and is often called out for taking too much. + +She hung back a little, partly as an act of goodwill, partly to avoid conflict. Disputes at a water pump in a nearby neighborhood led to a deadly fight, and that hung heavily on her mind: “Imagine people are killing each other for water in this city,” she said. + +Mumtaz rolled up her sleeves and had just begun filling her bottles when two men on a motorcycle whizzed past them, honking vigorously. She threw a bottle and rushed to confront them. + +“Can you not see that we are trying to fill water here? It is already so hot, why do you have to keep honking like that and irritate us?” she asked one of the riders, an elderly gentleman who looked taken aback. “Had you not been this old, I would have hit you.” + +Mumtaz turned back, still angry, but a young man bathing at an adjacent pump joked, “You are right, Sana. Why don’t you go ahead and give him a whack?” The women erupted into laughter. The elderly man smiled. Mumtaz’s anger evaporated. + +Mumtaz had to take several trips back and forth from the tap to her flat before she ferried enough water to keep her family — her two daughters, three siblings, aunt, uncle and grandmother — supplied for the next 12 hours. + +At home, she opened their small refrigerator and began stacking it with water bottles as her younger daughter hung by her elbow and soaked up the refreshing cool gust of the open door. They keep the refrigerator turned on and stocked with cool water to offer neighbors at all times, she said. + +![](https://img.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PJU7BHNMTQIEPVSZCAQ3PG2DR4_size-normalized.jpg&high_res=true&w=2048) + +Mumtaz fills water from the taps. She's responsible for getting it for her whole family. + +“This way, we get blessings from everyone,” Mumtaz said. “We never say no to anybody who asks for cold water.” + +It’s not easy to live as a single woman in a society that frowns upon divorce, and she tries to get by with her cheeky smile and offers of help to neighbors in need. But sometimes, like today when the bikers came honking down the lane, the stressors of daily life become too much. “All the goddesses and demons reside in me,” she told one of her sisters. + +Although the mall’s blue glass exterior is visible from many vantage points in the neighborhood, Mumtaz has gone inside only once in the last year, to celebrate her friend’s wedding anniversary. She dressed in her finest sari and bought the only snacks in the food court they could afford — pav bhaji, a mix of dinner rolls and spicy vegetable curry. Mumtaz’s daughter said the mall was so pretty she wanted to build a home there. + +But for nearly a year, Mumtaz’s brother, Ehteshamul Haque, 20, has been working as a trainee in counter sales at the Nautica store inside the mall. + +Each morning before work, he rises from the family’s bed — where he has been given sleeping rights — splashes cold water on his face at the communal bathroom and eats a quick breakfast of toast and tea before walking to work. + +After working inside all day, Haque said that when he emerges outside to furnace-like temperatures, he often feels dizzy and sick to his stomach. “It’s a heaven-and-hell difference,” he said. + +From his post behind the counter, he watches with envy as prosperous families browse Nautica’s racks. “You can always tell who has AC and who doesn’t,” he said. + +## ‘Humiliated in our homes’ + +The April 16 sit-in at the Quest Mall came at the beginning of a deadly spring heat wave that spread across Asia and set temperature records in Thailand, Indonesia and China. That same day in Mumbai, 13 people had died of heat stroke during an outdoor government awards ceremony. In Kolkata, schools were closed, and buses reduced service. Newspapers reported people passing out along the side of the road. Officials begged people to stay indoors. + +Then, Sheikh Janu died. + +Janu, a patrician gentleman who was a landlord to many in the neighborhood, had recently had a stroke and was partly paralyzed. Now the heat proved too much. News of his death spread quickly through the community. + +Already Janu’s Muslim neighbors had been forced to search fruitlessly for candles and use phone flashlights to read their daily prayers, Mumtaz said. How, she now wondered, would they be able to prepare and preserve his body for burial with no electricity? + +Her neighbor, Ambiay Qureshi, 25, had come home that day after a long shift at his butcher shop. To escape the complaints of women in his extended family and the wailing of nieces and nephews, he recalled, he went to the grassy playground behind Kasia Bagan’s community center. But he grew ever more irritated. + +![](https://img.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/JK3CQHD6ONVBFGYNUFFCQLBYL4_size-normalized.jpg&high_res=true&w=2048) + +People pass by Quest Mall, the site of a recent heat-related protest. + +“We felt humiliated in our homes. Anybody who runs a business just wants to come back home after a long day at work and breathe in peace,” he said. + +A few hours later, while Mumtaz stayed behind, Qureshi joined the throng of protesters who entered the mall. They knew that Goenka, the mall’s owner, also ran the electric company, so their idea was to ask him for help, they said. Goenka did not return The Post’s requests for comment. + +Inside, the air was like a balm. Qureshi sat down on the floor. Another protester curled up for a nap. Others played games on their phones. + +“Nothing untoward happened,” he said. “The only thing we were asking them is why our complaints were not being heard.” + +Maroofa Nawaz Ahmed/YouTube + +The police arrived, and security guards escorted the protesters out about an hour and a half into the demonstration. The electric company — whose officials did not comment — then fixed the problem with what seemed to Qureshi like amazing speed. In a few hours, an industrial-size generator appeared in the neighborhood. A few days later, long-term repairs were complete. “We got results,” he said. + +But videos of the protest had gone viral across India, triggering online posts tinged with religious intolerance. Hindu nationalists on Twitter falsely claimed the Muslim protesters had demanded gifts from the luxury stores for the Eid holiday. Mall officials tamped down the rumors with a Facebook post, urging patrons to “ignore these exaggerated and motivated narratives.” + +The criticism stung. + +“People told me, ‘You are wrong, you should have not have entered another person’s property like that,’” Qureshi said. “People need to understand why this happened.” + +The terrible heat drove them to extremes, he said: “What never happened in 10 years suddenly took place that day.” + +## ‘Death in my building’ + +It was still dangerously hot in Kasia Bagan one day in June — the temperature topped 100 degrees, the sun beat down and people vanished from the streets, stray dogs sleeping in whatever shade they could find. + +Patients packed the free health clinic in the neighborhood’s community center. They were mostly women, of all ages, waiting to see a doctor who comes twice weekly. Mumtaz was among them, having broken out in an itchy heat rash that covered her arms and face. She was so uncomfortable she was finding it more difficult than usual to sit still. + +As patients were weighed and checked in, they catalogued a variety of heat-related complaints — skin rashes, insomnia, dizziness, dehydration — then sat down to wait for the doctor, who was half an hour late. + +During this time of the day, when the women have just finished preparing lunch and the afternoon sun is at its cruelest, the center serves as a cooling refuge. Unlike their unventilated rooms, the center is right next to a pond and a playground shaded by a few trees. Windows and fans provide cross ventilation. + +“You have gained some weight after your trip to the beach. You must have enjoyed yourself too much!” Rani Sheikh, the center’s director, teased Mumtaz when she joined the line. + +“Hardly. I burned my skin and now I have these itchy rashes all over my hands and legs,” Mumtaz said. “I could not sleep at all last night because of the death in my building.” + +News of this tragedy elicited murmurs of surprise and sympathy in the room. + +Nazra Begum, 51, was a homemaker and mother of four grown children who lived in Mumtaz’s building. She was one of the few women who joined protesters outside the mall and spoke to local reporters. + +On May 31, Begum had become sick to her stomach and began vomiting. Her husband took her to the local hospital, where doctors said she had passed out because of complications related to heat exposure. Begum died later that evening, one of four people in Kasia Bagan known to have died this year from the heat, according to Javed Rahman, a social worker in the neighborhood. + +“She was a very brave woman,” Mumtaz said. “We were all suffering, but no other woman had the guts to protest in front of the media houses, but she did.” + +Mumtaz had to wait nearly two hours to be seen by the doctor, who prescribed an ointment for the rash. It was now almost time to repeat her twice-daily journey to the water taps to fill bottles. She was exhausted and grieving the loss of her friend. + +![](https://img.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/OLB2HUC4PIGS74NCO7NKS3O2XU_size-normalized.jpg&high_res=true&w=2048) + +Rani Sheikh watches as her husband is examined by the doctor in their community health clinic. + +“We ate almost all our meals together. Now I don’t feel like eating at all,” she said tearfully. + +At home, she snapped at her two daughters, who kept opening the refrigerator door to enjoy the cool air. “Can’t you see I’m not well?” she said, exasperated. + +Arup Halder, a climate advocate and pulmonologist at Calcutta Medical Research Institute, said cases of heat stroke and heat deaths in the city are “creeping up every summer” and will only get worse. Cataloguing heat-related deaths is difficult, Halder said, because medical professionals still list the immediate cause of death, such as stroke or cardiac arrest, without listing heat as factor. + +“Awareness is low,” Halder said. “We know on the whole heat kills, but how much it kills is a present problem.” + +Princeton University’s Ramanan Laxminarayan, an epidemiologist and economist, said the rising temperatures will cause far more cases of heat stress and death while fostering the spread of cholera and dengue fever. + +“Indians are disproportionately exposed to these effects, and it’s a huge risk that India is totally unprepared for,” Laxminarayan said. + +While the Indian government periodically publishes death counts related to extreme heat, global health experts say that the country has significantly understated its impact. According to India’s National Crime Records Bureau, annual heat deaths over the past decade have ranged from several hundred to around 2,000. + +[Recent peer-reviewed studies](https://journals.plos.org/plosmedicine/article?id=10.1371%2Fjournal.pmed.1002619&itid=lk_inline_enhanced-template) estimate that heat causes closer to 90,000 excess deaths a year in India. + +“That government statistic is just not serious,” said Prabhat Jha, author of a University of Toronto study that cross-referenced daily death counts from 8,000 locations across India with local climate data. + +Jha said the problem in India is that only 7 in 10 deaths are registered, and certain groups — women and residents of poorer states, for example — are being systematically undercounted. + +Later that day, after the health clinic closed, Rahman sat inside the community center, still worrying that Qureshi and the others could be charged with criminal trespassing. A tall standing fan whirred in the corner. + +Rahman, 42, called “elder brother” by everyone in this neighborhood, has long volunteered for Kasia Bagan’s social committee, founded during his grandparents’ day. The group helps run social programs funded by the Quest Mall, whose officials did not return requests for comment. He had an air of exhaustion, not just from the heat but from juggling his social work, his job as a construction contractor and his wife’s treatment for a brain aneurysm. Rising temperatures and changing weather patterns have profoundly changed life in Kasia Bagan, he said. + +“The winter has shrunk to just one month now. March used to be the month of spring when I was growing up. This year it was extremely hot,” he said. “We are already reeling under the effect of climate change in Kolkata and West Bengal.” + +Rahman and other community workers had been warning residents to avoid being outdoors, part of outreach that includes passing out packets of rehydration powder and holding nutrition camps. + +He had already written an apology letter to the mall, hoping it would keep the protesters out of legal trouble. Now he wanted to dictate something else. + +For months, Rahman had been urging the city to replace the broken and burned-out lights around the playground behind the center so children could play there in the evening. Maybe now the city would fix them, given how the mall protest had gone viral. + +He summoned an English-speaking colleague and asked her to take out pen and paper. When she was settled, he started dictating the letter to the Kolkata Municipal Corporation. + +“*Subject. Regarding the lights at Kasia Bagan*,” he began. + +## No relief from the heat + +The next day, Mumtaz’s condition worsened. Her throat hurt. Her joints hurt. She could barely summon the energy to speak to anybody at the morning taps. She couldn’t find the ointment for her rash the doctor prescribed in the market. + +“Sometimes it feels like the skin is going to come off. It is not actually coming off. But it feels like that,” she said. + +Unable to tackle her household duties, Mumtaz sought refuge in her uncle’s air-conditioned home nearby to get a bit of rest. + +She and her family have thought about getting an air conditioner — the cheapest ones cost about $200 — but aren’t sure whether they can afford it, as the family largely depends on Haque’s income of about $96 a month and a bit more family support. Also, the appliances tend to cause trouble in packed-in urban settings. Her aunt had one installed, she recalled, but it blew hot air into a neighbor’s home, triggering complaints. + +Air conditioning “gives you peace but it causes problems to others,” she said. “If you don’t have one, there is no relief from the heat.” + +Running the appliance can cost a third of a worker’s monthly salary, which ranges from $120 to $144 a month, Rahman said. + +The Climate Impact Lab, a group of economists and scientists, estimates that without measures like [widespread air conditioning](https://www.washingtonpost.com/style/of-interest/interactive/2023/air-conditioning-climate-change/?itid=lk_inline_enhanced-template), higher temperatures would lead to several hundred thousand added deaths by 2040. + +In 2020, just 12 percent of Indians had air conditioning in their homes, a number that will rise to 50 percent by 2050 — along with the country’s energy consumption, according to [a 2021 study](https://www.sciencedirect.com/science/article/pii/S0959378021000789?itid=lk_inline_enhanced-template) from scientists at the University of California at Berkeley. + +But only those who make $10,000 a year or more typically install air conditioning, according to Lucas Davis, one of the study’s co-authors. + +“So we expect to see a divergence of our kind, where the rich adopt air conditioning and the poor do not,” Davis said. He added that research has shown that, during extreme heat waves, air conditioning “literally makes the difference between life and death.” + +Ronita Bardhan, a Kolkata native who is an expert in sustainable architecture and an associate professor at the University of Cambridge, said that Kasia Bagan’s built environment — excessive concrete, packed buildings and metal roofs that trap heat — adds to the misery residents face. After reviewing aerial drone footage filmed by The Post, she noted that the towering mall blocks ventilation and its glass facade reflects heat back into the neighborhood. + +Using data from a sophisticated heat sensor mounted on a backpack, The Post found that Kasia Bagan’s sunny lanes were 10 degrees hotter than a shady park nearby. + +Overall, there was a big temperature gap between the city’s lower-income neighborhoods and more affluent and suburban locales. + +The air temperature in Salt Lake, a planned suburban community that sits about seven miles northeast of Mumtaz’s neighborhood and was built in the 1960s, was about 5 degrees Fahrenheit lower than in was about 5 degrees Fahrenheit lower than in Kasia Bagan. The community is heavily shaded, with tree cover exceeding 30 percent in some areas, according to The Post’s analysis. By contrast, the area around Kasia Bagan has just 14 percent tree cover, extremely low for a tropical climate. + +According to the Intergovernmental Panel on Climate Change, a lack of investment in Kolkata’s segregated, poor neighborhoods leaves them highly vulnerable to the city’s expected climate catastrophes, including high-intensity cyclones. The Bay of Bengal is warming, and the Sunderbans — the fragile mangrove ecosystem that long protected the city — are being lost to sea-level rise, which in turn propels hundreds of climate migrants a year to Kolkata’s slums. + +“The government does not have a vision or climate action plan that we can see at the moment,” Ajay Mittal, 32, an activist and the director for India and South Asia for Earth Day. + +Across India, only 37 cities and states have heat emergency plans, according to a recent study by the Center for Policy Research, a Delhi-based think tank. Kolkata is not among them. + +The city’s mayor, Firhad Hakim, announced with some fanfare in June that the city was developing a climate action plan, focused on preventing flooding and expanding green energy. + +The plan would expand the city’s efforts to plant more trees and reduce its dependence on fossil fuels, notes Debasish Kumar, the city’s director of parks and gardens. Kolkata’s parks are now illuminated by solar lights, and the city is phasing in a plan for 1,200 electric buses. + +“There are no short-term methods,” Kumar said. “We destroyed the environment over a long time — you can’t expect it to be fixed overnight. We are just starting the process.” + +Map showing tree cover in Kolkata, India + +Mittal criticized the city for doing little to protect residents in extreme heat “other than issuing alerts from time to time” and shuttering schools. The government and civil society must take better care of the elderly and vulnerable, he said, by creating shaded structures on the street, distributing umbrellas and ordering work times be shifted to cooler parts of the day. + +“The government should look at the Quest Mall incident with alarm, for how the law and its institutions can be challenged in future because of heat,” Mittal said. “Today they went inside the mall, tomorrow they could go inside a clinic, a showroom or a shop … Why should they not? They are desperate and they need relief.” + +Some Indian cities are taking action. After a heat wave killed more than 1,300 people in 2010, Ahmedabad developed one of the country’s first heat emergency plans, which stresses an early warning system and community outreach — and recommends using malls as cooling centers. + +This plan has been a success and is being modeled elsewhere in the country, officials say. A study led by University of Washington professor Jeremy Hess estimated that the plan helped prevent 2,380 deaths in the two years after its launch in 2013. + +## ‘Can’t be satisfied with so little’ + +The city finally fixed the lights at Kasia Bagan’s playground, and the neighborhood held a cricket tournament to celebrate. Dozens came to see the finale and the playground’s opening ceremony one June evening. Politicians gave speeches. A DJ blasted Bollywood music. Two cheerleaders — wearing dark leggings — climbed on a small stage and waved silver pompoms in the air. + +Rahman watched the games from atop the roof of the center, but he rejected the idea that he had won some small victories, even though he had persuaded authorities to avoid charging the protesters and got the lights back on after the playground had been dark for months. + +“Everything takes an extra push here,” he said. “I have to run behind so many people who are indifferent to people’s problems. I have to remind them of their duties. We can’t be satisfied with so little.” + +Mumtaz, not a fan of cricket, stayed away. In her tiny room, she read Chapter 18 of the Quran to calm her stress, made a dinner of rice and vegetables, and got her girls ready for bed. After the children and elders fell asleep, she and her sisters changed into flowy nightgowns for their nightly session of gossip and checking phones to see what their cousins were posting online. + +![](https://img.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/HAFAV6ZESK5M7W6ONEQU7DXYEY_size-normalized.jpg&high_res=true&w=2048) + +Javed Rahman plays cricket with the neighborhood children. He urged the city to fix broken and burned-out lights there. + +In the end, Mumtaz said she had doubts about what the protest achieved. She felt the protesters had not shown enough decorum inside the mall, wearing their nightclothes and playing on their phones. + +Mumtaz is left to wonder what will become of her family in this neighborhood, with temperatures rising and rising and an air conditioner out of reach. + +“It is so hot,” she said, “we cannot survive this way.” + +*Kalpana Pradhan contributed to this report.* + +##### About this story + +Additional photography by Ronny Sen. Design and development by [Hailey Haymond](https://www.washingtonpost.com/people/hailey-haymond/?itid=lk_inline_enhanced-template) and [Emily Sabens](https://www.washingtonpost.com/people/emily-sabens/?itid=lk_inline_enhanced-template). Additional development by [Yutao Chen](https://www.washingtonpost.com/people/yutao-chen/?itid=lk_inline_enhanced-template). Editing by [Monica Ulmanu](https://www.washingtonpost.com/people/monica-ulmanu/?itid=lk_inline_enhanced-template), [Stuart Leavenworth](https://www.washingtonpost.com/people/stuart-leavenworth/?itid=lk_inline_enhanced-template), [Juliet Eilperin](https://www.washingtonpost.com/people/juliet-eilperin/?itid=lk_inline_enhanced-template), [Olivier Laurent](https://www.washingtonpost.com/people/olivier-laurent/?itid=lk_inline_enhanced-template), Amanda Voisard, [Joe Moore](https://www.washingtonpost.com/people/joe-moore/?itid=lk_inline_enhanced-template), [John Farrell](https://www.washingtonpost.com/people/john-farrell/?itid=lk_inline_enhanced-template), Mina Haq, Tom Justice and Jay Wang. + +##### Sources + +To recreate the lane in Kasia Bagan in 3D, The Post used drone footage, photos and reporting on the ground. Experts [Ronita Bardhan](https://www.arct.cam.ac.uk/people/dr-ronita-bardhan?itid=lk_inline_enhanced-template), associate professor of Cambridge University and [Holly Samuelson](https://www.gsd.harvard.edu/person/holly-samuelson/?itid=lk_inline_enhanced-template), associate professor of Harvard University, were consulted to evaluate the heat dynamics in the area. + +The Post measured air temperature, humidity, wind and solar radiation across Kolkata using a set of portable climate sensors provided by [Climateflux](https://www.climateflux.com/?itid=lk_inline_enhanced-template). Local readings were compared to hourly reanalysis data from ERA5 to account for hourly or daily weather fluctuations. + +Past and future projected days of highly dangerous heat are based on a Washington Post and CarbonPlan [analysis](https://www.washingtonpost.com/climate-environment/interactive/2023/extreme-heat-wet-bulb-globe-temperature/?itid=lk_inline_enhanced-template), which modeled wet-bulb globe temperatures around the world. + +The vegetation map shows the normalized difference vegetation index (NDVI), a widely used indicator of healthy vegetation. The map shows the mean NDVI across the time period from March to May 2023. Tree cover percentages for selected locations were calculated using the [i-Tree canopy tool](https://canopy.itreetools.org/survey?itid=lk_inline_enhanced-template) developed by the United States Forest Service. + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Three days inside the sparkly, extremely hard-core world of Canadian cheerleading.md b/00.03 News/Three days inside the sparkly, extremely hard-core world of Canadian cheerleading.md index fcd7e56b..bc6b1999 100644 --- a/00.03 News/Three days inside the sparkly, extremely hard-core world of Canadian cheerleading.md +++ b/00.03 News/Three days inside the sparkly, extremely hard-core world of Canadian cheerleading.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-27]] --- diff --git a/00.03 News/True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him.md b/00.03 News/True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him.md index b81bd255..a2f7b66a 100644 --- a/00.03 News/True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him.md +++ b/00.03 News/True Crime, True Faith The Serial Killer and the Texas Mom Who Stopped Him.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2023-09-26]] --- diff --git a/01.01 Life Orga/@Lifestyle.md b/01.01 Life Orga/@Lifestyle.md index a36739bc..e28326c4 100644 --- a/01.01 Life Orga/@Lifestyle.md +++ b/01.01 Life Orga/@Lifestyle.md @@ -9,7 +9,7 @@ Priority: "Low" Status: "In-progress" StartDate: 2021-08-12 DueDate: 2022-12-31 -NextReviewDate: &RD 2023-09-30 +NextReviewDate: &RD 2024-01-30 TimeStamp: 2023-01-23 locations: CollapseMetaTable: true @@ -78,7 +78,7 @@ style: numbe #### Résolutions 2023 - [f] 🤵🏻 [[@Lifestyle|Lifestyle]]: Etre plus social 📅 2023-12-31 -- [f] 🏃🏻‍♂️ [[@Lifestyle|Lifestyle]]: Etre plus actif & plus sain 📅 2023-12-31 +- [x] 🏃🏻‍♂️ [[@Lifestyle|Lifestyle]]: Etre plus actif & plus sain 📅 2023-12-31 ✅ 2023-09-30   diff --git a/01.02 Home/Bandes Dessinées.md b/01.02 Home/Bandes Dessinées.md index 32bcb7f0..0bbe6cfe 100644 --- a/01.02 Home/Bandes Dessinées.md +++ b/01.02 Home/Bandes Dessinées.md @@ -114,6 +114,9 @@ style: number 1. L’Héritier 2. Le Groupe W 3. O.P.A. +4. Business Blues +5. H +6. Dutch Connection   @@ -128,6 +131,8 @@ style: number 1. Passé Décomposé 2. Cette Vie derrière nous 3. Sains et Saufs? +4. Amour et Mort +5. Monstrueux   diff --git a/01.02 Home/Household.md b/01.02 Home/Household.md index a237bbab..01a9ef78 100644 --- a/01.02 Home/Household.md +++ b/01.02 Home/Household.md @@ -73,78 +73,16 @@ style: number #### 🚮 Garbage collection -- [ ] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-09-26 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-09-12 ✅ 2023-09-11 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-08-29 ✅ 2023-08-29 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-08-15 ✅ 2023-08-14 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-08-01 ✅ 2023-07-31 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-07-18 ✅ 2023-07-17 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-07-04 ✅ 2023-07-04 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-06-20 ✅ 2023-06-19 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-06-06 ✅ 2023-06-05 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-05-23 ✅ 2023-05-22 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-05-09 ✅ 2023-05-08 -- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-04-25 ✅ 2023-04-24 +- [ ] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-10-10 - [ ] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-10-03 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-09-19 ✅ 2023-09-18 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-09-05 ✅ 2023-09-04 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-08-22 ✅ 2023-08-22 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-08-08 ✅ 2023-08-07 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-07-25 ✅ 2023-07-25 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-07-11 ✅ 2023-07-10 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-06-27 ✅ 2023-06-26 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-06-13 ✅ 2023-06-12 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-05-30 ✅ 2023-05-30 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-05-16 ✅ 2023-05-15 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-05-02 ✅ 2023-05-01 -- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2023-04-18 ✅ 2023-04-17   #### 🏠 House chores -- [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-09-30 -- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-08-31 ✅ 2023-08-26 -- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-07-31 ✅ 2023-07-26 -- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-06-30 ✅ 2023-06-25 -- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-05-31 ✅ 2023-05-30 -- [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-04-30 ✅ 2023-04-26 -- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-10-02 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-09-25 ✅ 2023-09-21 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-09-18 ✅ 2023-09-15 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-09-11 ✅ 2023-09-11 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-09-04 ✅ 2023-09-04 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-08-28 ✅ 2023-08-26 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-08-21 ✅ 2023-08-21 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-08-14 ✅ 2023-08-12 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-08-07 ✅ 2023-08-07 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-07-31 ✅ 2023-07-26 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-07-24 ✅ 2023-07-17 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-07-17 ✅ 2023-07-14 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-07-10 ✅ 2023-07-10 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-07-03 ✅ 2023-07-03 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-06-26 ✅ 2023-06-25 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-06-19 ✅ 2023-06-19 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-06-12 ✅ 2023-06-12 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-06-05 ✅ 2023-06-03 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-05-29 ✅ 2023-05-29 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-05-22 ✅ 2023-05-22 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-05-15 ✅ 2023-05-22 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-05-08 ✅ 2023-05-06 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-05-01 ✅ 2023-05-01 -- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-04-24 ✅ 2023-04-21 -- [ ] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-09-30 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-09-16 ✅ 2023-09-11 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-09-02 ✅ 2023-09-01 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-08-19 ✅ 2023-08-20 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-08-05 ✅ 2023-08-05 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-07-22 ✅ 2023-07-17 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-07-08 ✅ 2023-07-09 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-06-24 ✅ 2023-06-24 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-06-10 ✅ 2023-06-12 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-05-27 ✅ 2023-05-25 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-05-13 ✅ 2023-05-13 -- [x] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-04-29 ✅ 2023-04-26 +- [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2023-10-31 +- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every week 📅 2023-10-09 +- [ ] :bed: [[Household]] Change bedsheets %%done_del%% 🔁 every 2 weeks on Saturday 📅 2023-10-14   diff --git a/01.02 Home/League Tables.md b/01.02 Home/League Tables.md index 228ad210..eaae2f13 100644 --- a/01.02 Home/League Tables.md +++ b/01.02 Home/League Tables.md @@ -52,7 +52,7 @@ style: number ### 🥐 Croissants -1. {1} [[Café Hugo]], [[@@Paris|Paris]] +1. [[Café Hugo]], [[@@Paris|Paris]] 2. Buchmann Seefeld, [[@@Zürich|Zürich]] 3. [[Toto]], [[@@Zürich|Zürich]] 4. [[Monocle]], [[@@Zürich|Zürich]] @@ -65,7 +65,7 @@ style: number ### ☕ Coffee -1. {1} [[Café Hugo]], [[@@Paris|Paris]] +1. [[Café Hugo]], [[@@Paris|Paris]] 2. [[Monocle]], [[@@Zürich|Zürich]] 3. [[La Stanza]], [[@@Zürich|Zürich]] 4. [[Toto]], [[@@Zürich|Zürich]] @@ -81,7 +81,7 @@ style: number ### 🥮 Tiramisu -1. {1} [[Amalfi]], [[@@Zürich|Zürich]] +1. [[Amalfi]], [[@@Zürich|Zürich]] 2. [[Toto]], [[@@Zürich|Zürich]]   diff --git a/01.03 Family/Auguste Bédier.md b/01.03 Family/Auguste Bédier.md index 3828d5bd..1b4f3bbb 100644 --- a/01.03 Family/Auguste Bédier.md +++ b/01.03 Family/Auguste Bédier.md @@ -103,7 +103,8 @@ style: number   -- [w] :birthday: **[[Auguste Bédier|Auguste]]** %%done_del%% 🔁 every year 📅 2023-09-30 +- [ ] :birthday: **[[Auguste Bédier|Auguste]]** %%done_del%% 🔁 every year 📅 2024-09-30 +- [x] :birthday: **[[Auguste Bédier|Auguste]]** %%done_del%% 🔁 every year 📅 2023-09-30 ✅ 2023-09-30 - [x] :birthday: **[[Auguste Bédier|Auguste]]** 🔁 every year 📅 2022-09-30 ✅ 2022-09-30 - [x] :birthday: **Auguste** 🔁 every year 📅 2021-09-30 ✅ 2021-10-01 diff --git a/01.07 Animals/2023-07-13 Health check.md b/01.07 Animals/2023-07-13 Health check.md index 95092019..736218d4 100644 --- a/01.07 Animals/2023-07-13 Health check.md +++ b/01.07 Animals/2023-07-13 Health check.md @@ -51,7 +51,8 @@ style: number [[2023-07-13|This day]], ripped hoof (front right) is healing well –> On track to heal fully by the end of the Summer season -- [ ] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-09-26 +- [ ] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-10-10 +- [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-09-26 ✅ 2023-09-25 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-09-12 ✅ 2023-09-12 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-08-29 ✅ 2023-09-01 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing 🔁 every 2 weeks 📅 2023-08-15 ✅ 2023-08-15 diff --git a/01.07 Animals/@Sally.md b/01.07 Animals/@Sally.md index 4415ae06..0c06099c 100644 --- a/01.07 Animals/@Sally.md +++ b/01.07 Animals/@Sally.md @@ -6,7 +6,7 @@ Date: 2023-04-12 DocType: "Animal" Hierarchy: "NonRoot" TimeStamp: -location: [47.53507105,8.707479726475132] +location: [48.3459316,8.689291406216846] CollapseMetaTable: true cssclass: recipeTable Animal: @@ -125,7 +125,8 @@ divWidth=100   -- [ ] :racehorse: [[@Sally|Sally]]: Vet check %%done_del%% 🔁 every 6 months 📅 2023-09-30 +- [ ] :racehorse: [[@Sally|Sally]]: Vet check %%done_del%% 🔁 every 6 months 📅 2024-03-30 +- [x] :racehorse: [[@Sally|Sally]]: Vet check %%done_del%% 🔁 every 6 months 📅 2023-09-30 ✅ 2023-09-28 - [ ] :racehorse: [[@Sally|Sally]]: EHV-1 vaccination dose %%done_del%% 🔁 every year 📅 2024-01-31 - [ ] :racehorse: [[@Sally|Sally]]: Influenza vaccination dose %%done_del%% 🔁 every year 📅 2024-01-31 - [ ] :racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2023-10-10 diff --git a/02.02 Paris/@Restaurants Paris.md b/02.02 Paris/@Restaurants Paris.md index 96f8f58c..b1226d66 100644 --- a/02.02 Paris/@Restaurants Paris.md +++ b/02.02 Paris/@Restaurants Paris.md @@ -57,7 +57,6 @@ style: number   #### French -[[#^Top|TOP]] ```dataviewjs dv.view("00.01 Admin/dv-views/query_place", {country: "France", placetype: "Restaurant", style: "French"}) ``` diff --git a/02.03 Zürich/William's Butcherstable.md b/02.03 Zürich/William's ButchersTable.md similarity index 85% rename from 02.03 Zürich/William's Butcherstable.md rename to 02.03 Zürich/William's ButchersTable.md index 06d24d7b..1c23d6c9 100644 --- a/02.03 Zürich/William's Butcherstable.md +++ b/02.03 Zürich/William's ButchersTable.md @@ -1,19 +1,19 @@ --- Alias: [""] -Tag: ["🍴", "🥩"] -Date: 2023-03-11 +Tag: ["🍴", "🥩", "🇺🇸"] +Date: 2023-09-30 DocType: "Place" Hierarchy: "NonRoot" TimeStamp: -location: [47.3616108,8.5602858] +location: [47.3615981,8.5602927] Place: Type: Restaurant SubType: Meat - Style: UK + Style: USA Location: Seefeld Country: CH - Status: Spotted + Status: Tested CollapseMetaTable: true Phone: "+41 44 577 56 88" Email: "hegibachplatz@williamsbutcherstable.ch" @@ -42,11 +42,11 @@ type command action Save current file id Save ``` -^button-WilliamsButcherstableSave +^button-WilliamsButchersTableSave   -# William's Butcherstable +# William's ButchersTable   @@ -105,7 +105,7 @@ Loret ipsum   ```dataview -Table DocType as "Doc type" from [[William's Butcherstable]] +Table DocType as "Doc type" from [[William's ButchersTable]] where !contains(file.name, "@@Travel") sort DocType asc ``` diff --git a/03.01 Reading list/@Reading master.md b/03.01 Reading list/@Reading master.md index cca2101f..839a7501 100644 --- a/03.01 Reading list/@Reading master.md +++ b/03.01 Reading list/@Reading master.md @@ -103,7 +103,7 @@ dv.view("00.01 Admin/dv-views/book_query", {sourcetype: "Book", dateadded: dv.cu   ### Unread books -[[#^Top|TOP]] +   ```dataviewjs @@ -117,7 +117,7 @@ dv.view("00.01 Admin/dv-views/book_query", {sourcetype: "Book", readingd: false}   ### Read books -[[#^Top|TOP]] +   ```dataviewjs diff --git a/00.02 Inbox/Le Temps gagné.md b/03.01 Reading list/Le Temps gagné.md similarity index 94% rename from 00.02 Inbox/Le Temps gagné.md rename to 03.01 Reading list/Le Temps gagné.md index 2b08076a..685266fc 100644 --- a/00.02 Inbox/Le Temps gagné.md +++ b/03.01 Reading list/Le Temps gagné.md @@ -12,14 +12,14 @@ Source: Language: FR Published: 2020-08-19 Link: "https://www.lemonde.fr/livres/article/2020/09/10/le-temps-gagne-de-raphael-enthoven-le-feuilleton-litteraire-de-camille-laurens_6051671_3260.html" - Read: + Read: 2023-09-27 Cover: https://img.livraddict.com/covers/394/394214/couv16094849.jpg CollapseMetaTable: true --- Parent:: [[@Reading master|Reading list]] -ReadingState:: 🟧 +ReadingState:: [[2023-09-27]] --- diff --git a/03.01 Reading list/On the Road.md b/03.01 Reading list/On the Road.md index 53267c52..ee921ba5 100644 --- a/03.01 Reading list/On the Road.md +++ b/03.01 Reading list/On the Road.md @@ -1,6 +1,6 @@ --- -Tag: ["Novel", "🇺🇸", "Beat", "💀", "🍺", "💊"] +Tag: ["Novel", "🇺🇸", "👟", "💀", "🍺", "💊"] Date: 2022-02-27 DocType: "Source" Hierarchy: "NonRoot" diff --git a/03.04 Cinematheque/John Wick (2014).md b/03.04 Cinematheque/John Wick (2014).md index 8d4b4b06..a25de0a0 100644 --- a/03.04 Cinematheque/John Wick (2014).md +++ b/03.04 Cinematheque/John Wick (2014).md @@ -30,7 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] -Related:: [[John Wick - Chapter 2 (2017)]], [[John Wick - Chapter 3 - Parabellum (2019)]] +Related:: [[John Wick - Chapter 2 (2017)]], [[John Wick - Chapter 3 - Parabellum (2019)]], [[John Wick - Chapter 4 (2023)]] --- diff --git a/03.04 Cinematheque/John Wick - Chapter 2 (2017).md b/03.04 Cinematheque/John Wick - Chapter 2 (2017).md index c5910c29..ce573fc7 100644 --- a/03.04 Cinematheque/John Wick - Chapter 2 (2017).md +++ b/03.04 Cinematheque/John Wick - Chapter 2 (2017).md @@ -30,7 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] -Related:: [[John Wick (2014)]], [[John Wick - Chapter 3 - Parabellum (2019)]] +Related:: [[John Wick (2014)]], [[John Wick - Chapter 3 - Parabellum (2019)]], [[John Wick - Chapter 4 (2023)]] --- diff --git a/03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md b/03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md index b68b51bf..50e648b0 100644 --- a/03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md +++ b/03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md @@ -30,7 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] -Related:: [[John Wick (2014)]], [[John Wick - Chapter 2 (2017)]] +Related:: [[John Wick (2014)]], [[John Wick - Chapter 2 (2017)]], [[John Wick - Chapter 4 (2023)]] --- diff --git a/03.04 Cinematheque/John Wick - Chapter 4 (2023).md b/03.04 Cinematheque/John Wick - Chapter 4 (2023).md index 063e5e64..5f14ae07 100644 --- a/03.04 Cinematheque/John Wick - Chapter 4 (2023).md +++ b/03.04 Cinematheque/John Wick - Chapter 4 (2023).md @@ -24,12 +24,13 @@ streamingServices: premiere: "24/03/2023" watched: true lastWatched: "[[2023-07-05]]" -personalRating: 0 +personalRating: 7 CollapseMetaTable: true --- Parent:: [[@Cinematheque]] +Related:: [[John Wick (2014)]], [[John Wick - Chapter 2 (2017)]], [[John Wick - Chapter 3 - Parabellum (2019)]] --- diff --git a/03.04 Cinematheque/The Hunger Games (2012).md b/03.04 Cinematheque/The Hunger Games (2012).md index 7c81561e..9e8f2254 100644 --- a/03.04 Cinematheque/The Hunger Games (2012).md +++ b/03.04 Cinematheque/The Hunger Games (2012).md @@ -30,6 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] +Related:: [[The Hunger Games - Catching Fire (2013)]], [[The Hunger Games - Mockingjay - Part 1 (2014)]], [[The Hunger Games - Mockingjay - Part 2 (2015)]] --- diff --git a/03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md b/03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md index 8ef61912..ee874b0a 100644 --- a/03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md +++ b/03.04 Cinematheque/The Hunger Games - Catching Fire (2013).md @@ -30,6 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] +Related:: [[The Hunger Games (2012)]], [[The Hunger Games - Mockingjay - Part 1 (2014)]], [[The Hunger Games - Mockingjay - Part 2 (2015)]] --- diff --git a/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md b/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md index f3a4307c..5054042c 100644 --- a/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md +++ b/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 1 (2014).md @@ -30,6 +30,7 @@ CollapseMetaTable: true --- Parent:: [[@Cinematheque]] +Related:: [[The Hunger Games (2012)]], [[The Hunger Games - Catching Fire (2013)]], [[The Hunger Games - Mockingjay - Part 2 (2015)]] --- diff --git a/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md b/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md index 5226e759..0e00aafd 100644 --- a/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md +++ b/03.04 Cinematheque/The Hunger Games - Mockingjay - Part 2 (2015).md @@ -24,12 +24,13 @@ streamingServices: premiere: "20/11/2015" watched: true lastWatched: "[[2023-08-23]]" -personalRating: 0 +personalRating: 5 CollapseMetaTable: true --- Parent:: [[@Cinematheque]] +Related:: [[The Hunger Games (2012)]], [[The Hunger Games - Catching Fire (2013)]], [[The Hunger Games - Mockingjay - Part 1 (2014)]] --- diff --git a/05.02 Networks/Configuring UFW.md b/05.02 Networks/Configuring UFW.md index 5de69089..052aacfd 100644 --- a/05.02 Networks/Configuring UFW.md +++ b/05.02 Networks/Configuring UFW.md @@ -237,7 +237,8 @@ sudo bash /etc/addip4ban/addip4ban.sh #### Ban List Tasks -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-09-30 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-10-07 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-09-30 ✅ 2023-09-29 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-09-23 ✅ 2023-09-23 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-09-16 ✅ 2023-09-15 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-09-09 ✅ 2023-09-08 @@ -274,7 +275,8 @@ sudo bash /etc/addip4ban/addip4ban.sh - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-08-12 ✅ 2023-08-07 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-08-05 ✅ 2023-08-05 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2023-07-29 ✅ 2023-08-04 -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-09-30 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-10-07 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-09-30 ✅ 2023-09-29 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-09-23 ✅ 2023-09-23 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-09-16 ✅ 2023-09-15 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2023-09-09 ✅ 2023-09-08