226 lines
428 KiB
JavaScript
226 lines
428 KiB
JavaScript
/*
|
||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||
if you want to view the source visit the plugins github repository
|
||
*/
|
||
|
||
/*
|
||
License obsidian-tasks:
|
||
MIT License
|
||
|
||
Copyright (c) 2021 Martin Schenck and Clare Macrae
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
of this software and associated documentation files (the "Software"), to deal
|
||
in the Software without restriction, including without limitation the rights
|
||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
copies of the Software, and to permit persons to whom the Software is
|
||
furnished to do so, subject to the following conditions:
|
||
|
||
The above copyright notice and this permission notice shall be included in all
|
||
copies or substantial portions of the Software.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
SOFTWARE.
|
||
*/
|
||
|
||
/*
|
||
License rrule (included library):
|
||
rrule.js: Library for working with recurrence rules for calendar dates.
|
||
=======================================================================
|
||
|
||
Copyright 2010, Jakub Roztocil <jakub@roztocil.name> and Lars Schöning
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are met:
|
||
|
||
1. Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
|
||
2. Redistributions in binary form must reproduce the above copyright
|
||
notice, this list of conditions and the following disclaimer in the
|
||
documentation and/or other materials provided with the distribution.
|
||
|
||
3. Neither the name of The author nor the names of its contributors may
|
||
be used to endorse or promote products derived from this software
|
||
without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
|
||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
|
||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
||
|
||
|
||
./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE:
|
||
|
||
python-dateutil - Extensions to the standard Python datetime module.
|
||
====================================================================
|
||
|
||
Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
|
||
Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
|
||
|
||
All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are met:
|
||
|
||
* Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
* Redistributions in binary form must reproduce the above copyright notice,
|
||
this list of conditions and the following disclaimer in the documentation
|
||
and/or other materials provided with the distribution.
|
||
* Neither the name of the copyright holder nor the names of its
|
||
contributors may be used to endorse or promote products derived from
|
||
this software without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
|
||
/*
|
||
License chrono-node (included library):
|
||
The MIT License
|
||
|
||
Copyright (c) 2014, Wanasit Tanakitrungruang
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
of this software and associated documentation files (the "Software"), to deal
|
||
in the Software without restriction, including without limitation the rights
|
||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
copies of the Software, and to permit persons to whom the Software is
|
||
furnished to do so, subject to the following conditions:
|
||
|
||
The above copyright notice and this permission notice shall be included in
|
||
all copies or substantial portions of the Software.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||
THE SOFTWARE.
|
||
*/
|
||
|
||
"use strict";var mE=Object.create;var Li=Object.defineProperty,yE=Object.defineProperties,gE=Object.getOwnPropertyDescriptor,_E=Object.getOwnPropertyDescriptors,TE=Object.getOwnPropertyNames,Gp=Object.getOwnPropertySymbols,bE=Object.getPrototypeOf,zp=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable;var Hp=(r,e,t)=>e in r?Li(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qe=(r,e)=>{for(var t in e||(e={}))zp.call(e,t)&&Hp(r,t,e[t]);if(Gp)for(var t of Gp(e))vE.call(e,t)&&Hp(r,t,e[t]);return r},tr=(r,e)=>yE(r,_E(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),wE=(r,e)=>{for(var t in e)Li(r,t,{get:e[t],enumerable:!0})},Vp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of TE(e))!zp.call(r,s)&&s!==t&&Li(r,s,{get:()=>e[s],enumerable:!(n=gE(e,s))||n.enumerable});return r};var ns=(r,e,t)=>(t=r!=null?mE(bE(r)):{},Vp(e||!r||!r.__esModule?Li(t,"default",{value:r,enumerable:!0}):t,r)),EE=r=>Vp(Li({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(h){s(h)}},o=c=>{try{l(t.throw(c))}catch(h){s(h)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Tm=O((DF,So)=>{var Qp,Jp,em,tm,rm,nm,sm,im,am,ko,Ml,om,um,lm,js,cm,dm,fm,hm,pm,mm,ym,gm,_m,Do;(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 So=="object"&&typeof So.exports=="object"?r(t(e,t(So.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};Qp=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},Jp=Object.assign||function(n){for(var s,a=1,o=arguments.length;a<o;a++){s=arguments[a];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(n[l]=s[l])}return n},em=function(n,s){var a={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.indexOf(o)<0&&(a[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(n);l<o.length;l++)s.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(n,o[l])&&(a[o[l]]=n[o[l]]);return a},tm=function(n,s,a,o){var l=arguments.length,c=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,a):o,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,a,o);else for(var m=n.length-1;m>=0;m--)(h=n[m])&&(c=(l<3?h(c):l>3?h(s,a,c):h(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},rm=function(n,s){return function(a,o){s(a,o,n)}},nm=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},sm=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(h){h(c)})}return new(a||(a=Promise))(function(c,h){function m(D){try{T(o.next(D))}catch(v){h(v)}}function _(D){try{T(o.throw(D))}catch(v){h(v)}}function T(D){D.done?c(D.value):l(D.value).then(m,_)}T((o=o.apply(n,s||[])).next())})},im=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,h;return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(T){return function(D){return _([T,D])}}function _(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]<c[3])){a.label=T[1];break}if(T[0]===6&&a.label<c[1]){a.label=c[1],c=T;break}if(c&&a.label<c[2]){a.label=c[2],a.ops.push(T);break}c[2]&&a.ops.pop(),a.trys.pop();continue}T=s.call(n,a)}catch(D){T=[6,D],l=0}finally{o=c=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},am=function(n,s){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&Do(s,n,a)},Do=Object.create?function(n,s,a,o){o===void 0&&(o=a);var l=Object.getOwnPropertyDescriptor(s,a);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(n,o,l)}:function(n,s,a,o){o===void 0&&(o=a),n[o]=s[a]},ko=function(n){var s=typeof Symbol=="function"&&Symbol.iterator,a=s&&n[s],o=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Ml=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],h;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(m){h={error:m}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(h)throw h.error}}return c},om=function(){for(var n=[],s=0;s<arguments.length;s++)n=n.concat(Ml(arguments[s]));return n},um=function(){for(var n=0,s=0,a=arguments.length;s<a;s++)n+=arguments[s].length;for(var o=Array(n),l=0,s=0;s<a;s++)for(var c=arguments[s],h=0,m=c.length;h<m;h++,l++)o[l]=c[h];return o},lm=function(n,s,a){if(a||arguments.length===2)for(var o=0,l=s.length,c;o<l;o++)(c||!(o in s))&&(c||(c=Array.prototype.slice.call(s,0,o)),c[o]=s[o]);return n.concat(c||Array.prototype.slice.call(s))},js=function(n){return this instanceof js?(this.v=n,this):new js(n)},cm=function(n,s,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=a.apply(n,s||[]),l,c=[];return l={},h("next"),h("throw"),h("return"),l[Symbol.asyncIterator]=function(){return this},l;function h(R){o[R]&&(l[R]=function(I){return new Promise(function(q,$){c.push([R,I,q,$])>1||m(R,I)})})}function m(R,I){try{_(o[R](I))}catch(q){v(c[0][3],q)}}function _(R){R.value instanceof js?Promise.resolve(R.value.v).then(T,D):v(c[0][2],R)}function T(R){m("next",R)}function D(R){m("throw",R)}function v(R,I){R(I),c.shift(),c.length&&m(c[0][0],c[0][1])}},dm=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(h){return(a=!a)?{value:js(n[l](h)),done:l==="return"}:c?c(h):h}:c}},fm=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof ko=="function"?ko(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(h){return new Promise(function(m,_){h=n[c](h),l(m,_,h.done,h.value)})}}function l(c,h,m,_){Promise.resolve(_).then(function(T){c({value:T,done:m})},h)}},hm=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};pm=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&Do(s,n,a);return t(s,n),s},mm=function(n){return n&&n.__esModule?n:{default:n}},ym=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},gm=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},_m=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",Qp),r("__assign",Jp),r("__rest",em),r("__decorate",tm),r("__param",rm),r("__metadata",nm),r("__awaiter",sm),r("__generator",im),r("__exportStar",am),r("__createBinding",Do),r("__values",ko),r("__read",Ml),r("__spread",om),r("__spreadArrays",um),r("__spreadArray",lm),r("__await",js),r("__asyncGenerator",cm),r("__asyncDelegator",dm),r("__asyncValues",fm),r("__makeTemplateObject",hm),r("__importStar",pm),r("__importDefault",mm),r("__classPrivateFieldGet",ym),r("__classPrivateFieldSet",gm),r("__classPrivateFieldIn",_m)})});var Fl=O((Il,Hs)=>{(function(r,e){typeof Il=="object"&&typeof Hs!="undefined"?Hs.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(Il,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function h(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,u){var d=[],f,p=i.length;for(f=0;f<p;++f)d.push(u(i[f],f));return d}function _(i,u){for(var d in u)a(u,d)&&(i[d]=u[d]);return a(u,"toString")&&(i.toString=u.toString),a(u,"valueOf")&&(i.valueOf=u.valueOf),i}function T(i,u,d,f){return Ep(i,u,d,f,!0).utc()}function D(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(i){return i._pf==null&&(i._pf=D()),i._pf}var R;Array.prototype.some?R=Array.prototype.some:R=function(i){var u=Object(this),d=u.length>>>0,f;for(f=0;f<d;f++)if(f in u&&i.call(this,u[f],f,u))return!0;return!1};function I(i){if(i._isValid==null){var u=v(i),d=R.call(u.parsedDateParts,function(p){return p!=null}),f=!isNaN(i._d.getTime())&&u.overflow<0&&!u.empty&&!u.invalidEra&&!u.invalidMonth&&!u.invalidWeekday&&!u.weekdayMismatch&&!u.nullInput&&!u.invalidFormat&&!u.userInvalidated&&(!u.meridiem||u.meridiem&&d);if(i._strict&&(f=f&&u.charsLeftOver===0&&u.unusedTokens.length===0&&u.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=f;else return f}return i._isValid}function q(i){var u=T(NaN);return i!=null?_(v(u),i):v(u).userInvalidated=!0,u}var $=e.momentProperties=[],B=!1;function me(i,u){var d,f,p,b=$.length;if(l(u._isAMomentObject)||(i._isAMomentObject=u._isAMomentObject),l(u._i)||(i._i=u._i),l(u._f)||(i._f=u._f),l(u._l)||(i._l=u._l),l(u._strict)||(i._strict=u._strict),l(u._tzm)||(i._tzm=u._tzm),l(u._isUTC)||(i._isUTC=u._isUTC),l(u._offset)||(i._offset=u._offset),l(u._pf)||(i._pf=v(u)),l(u._locale)||(i._locale=u._locale),b>0)for(d=0;d<b;d++)f=$[d],p=u[f],l(p)||(i[f]=p);return i}function fe(i){me(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),B===!1&&(B=!0,e.updateOffset(this),B=!1)}function ve(i){return i instanceof fe||i!=null&&i._isAMomentObject!=null}function ee(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function te(i,u){var d=!0;return _(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),d){var f=[],p,b,x,re=arguments.length;for(b=0;b<re;b++){if(p="",typeof arguments[b]=="object"){p+=`
|
||
[`+b+"] ";for(x in arguments[0])a(arguments[0],x)&&(p+=x+": "+arguments[0][x]+", ");p=p.slice(0,-2)}else p=arguments[b];f.push(p)}ee(i+`
|
||
Arguments: `+Array.prototype.slice.call(f).join("")+`
|
||
`+new Error().stack),d=!1}return u.apply(this,arguments)},u)}var It={};function yt(i,u){e.deprecationHandler!=null&&e.deprecationHandler(i,u),It[i]||(ee(u),It[i]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function V(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function W(i){var u,d;for(d in i)a(i,d)&&(u=i[d],V(u)?this[d]=u:this["_"+d]=u);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(i,u){var d=_({},i),f;for(f in u)a(u,f)&&(s(i[f])&&s(u[f])?(d[f]={},_(d[f],i[f]),_(d[f],u[f])):u[f]!=null?d[f]=u[f]:delete d[f]);for(f in i)a(i,f)&&!a(u,f)&&s(i[f])&&(d[f]=_({},d[f]));return d}function Q(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var u,d=[];for(u in i)a(i,u)&&d.push(u);return d};var ue={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(i,u,d){var f=this._calendar[i]||this._calendar.sameElse;return V(f)?f.call(u,d):f}function g(i,u,d){var f=""+Math.abs(i),p=u-f.length,b=i>=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,S={},M={};function k(i,u,d,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(M[i]=p),u&&(M[u[0]]=function(){return g(p.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)})}function C(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function A(i){var u=i.match(w),d,f;for(d=0,f=u.length;d<f;d++)M[u[d]]?u[d]=M[u[d]]:u[d]=C(u[d]);return function(p){var b="",x;for(x=0;x<f;x++)b+=V(u[x])?u[x].call(p,i):u[x];return b}}function N(i,u){return i.isValid()?(u=j(u,i.localeData()),S[u]=S[u]||A(u),S[u](i)):i.localeData().invalidDate()}function j(i,u){var d=5;function f(p){return u.longDateFormat(p)||p}for(E.lastIndex=0;d>=0&&E.test(i);)i=i.replace(E,f),E.lastIndex=0,d-=1;return i}var ke={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ye(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ce="Invalid date";function Ie(){return this._invalidDate}var K="%d",We=/\d{1,2}/;function Je(i){return this._ordinal.replace("%d",i)}var Ke={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Dr(i,u,d,f){var p=this._relativeTime[d];return V(p)?p(i,u,d,f):p.replace(/%d/i,i)}function Mt(i,u){var d=this._relativeTime[i>0?"future":"past"];return V(d)?d(u):d.replace(/%s/i,u)}var Ae={};function st(i,u){var d=i.toLowerCase();Ae[d]=Ae[d+"s"]=Ae[u]=i}function gt(i){return typeof i=="string"?Ae[i]||Ae[i.toLowerCase()]:void 0}function kn(i){var u={},d,f;for(f in i)a(i,f)&&(d=gt(f),d&&(u[d]=i[f]));return u}var Ri={};function qe(i,u){Ri[i]=u}function Ns(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Ri[d]});return u.sort(function(f,p){return f.priority-p.priority}),u}function Kn(i){return i%4===0&&i%100!==0||i%400===0}function ft(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function de(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=ft(u)),d}function Vr(i,u){return function(d){return d!=null?(Zn(this,i,d),e.updateOffset(this,u),this):Rt(this,i)}}function Rt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function Zn(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&Kn(i.year())&&i.month()===1&&i.date()===29?(d=de(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),uo(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function so(i){return i=gt(i),V(this[i])?this[i]():this}function Lr(i,u){if(typeof i=="object"){i=kn(i);var d=Ns(i),f,p=d.length;for(f=0;f<p;f++)this[d[f].unit](i[d[f].unit])}else if(i=gt(i),V(this[i]))return this[i](u);return this}var Dn=/\d/,_t=/\d\d/,xi=/\d{3}/,cr=/\d{4}/,Kr=/[+-]?\d{6}/,Le=/\d\d?/,Sn=/\d\d\d\d?/,Cs=/\d\d\d\d\d\d?/,Xn=/\d{1,3}/,On=/\d{1,4}/,Qn=/[+-]?\d{1,6}/,dr=/\d+/,Mn=/[+-]?\d+/,io=/Z|[+-]\d\d:?\d\d/gi,Zr=/Z|[+-]\d\d(?::?\d\d)?/gi,ao=/[+-]?\d+(\.\d{1,3})?/,fr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,hr;hr={};function H(i,u,d){hr[i]=V(u)?u:function(f,p){return f&&d?d:u}}function Is(i,u){return a(hr,i)?hr[i](u._strict,u._locale):new RegExp(oo(i))}function oo(i){return ht(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,f,p,b){return d||f||p||b}))}function ht(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Jn={};function Ne(i,u){var d,f=u,p;for(typeof i=="string"&&(i=[i]),c(u)&&(f=function(b,x){x[u]=de(b)}),p=i.length,d=0;d<p;d++)Jn[i[d]]=f}function pr(i,u){Ne(i,function(d,f,p,b){p._w=p._w||{},u(d,p._w,p,b)})}function Ft(i,u,d){u!=null&&a(Jn,i)&&Jn[i](u,d._a,d,i)}var et=0,Ze=1,G=2,ne=3,le=4,jt=5,es=6,Wv=7,qv=8;function jv(i,u){return(i%u+u)%u}var it;Array.prototype.indexOf?it=Array.prototype.indexOf:it=function(i){var u;for(u=0;u<this.length;++u)if(this[u]===i)return u;return-1};function uo(i,u){if(isNaN(i)||isNaN(u))return NaN;var d=jv(u,12);return i+=(u-d)/12,d===1?Kn(i)?29:28:31-d%7%2}k("M",["MM",2],"Mo",function(){return this.month()+1}),k("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),k("MMMM",0,0,function(i){return this.localeData().months(this,i)}),st("month","M"),qe("month",8),H("M",Le),H("MM",Le,_t),H("MMM",function(i,u){return u.monthsShortRegex(i)}),H("MMMM",function(i,u){return u.monthsRegex(i)}),Ne(["M","MM"],function(i,u){u[Ze]=de(i)-1}),Ne(["MMM","MMMM"],function(i,u,d,f){var p=d._locale.monthsParse(i,f,d._strict);p!=null?u[Ze]=p:v(d).invalidMonth=i});var $v="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),up="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),lp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Bv=fr,Gv=fr;function Hv(i,u){return i?n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||lp).test(u)?"format":"standalone"][i.month()]:n(this._months)?this._months:this._months.standalone}function zv(i,u){return i?n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[lp.test(u)?"format":"standalone"][i.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Vv(i,u,d){var f,p,b,x=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],f=0;f<12;++f)b=T([2e3,f]),this._shortMonthsParse[f]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(b,"").toLocaleLowerCase();return d?u==="MMM"?(p=it.call(this._shortMonthsParse,x),p!==-1?p:null):(p=it.call(this._longMonthsParse,x),p!==-1?p:null):u==="MMM"?(p=it.call(this._shortMonthsParse,x),p!==-1?p:(p=it.call(this._longMonthsParse,x),p!==-1?p:null)):(p=it.call(this._longMonthsParse,x),p!==-1?p:(p=it.call(this._shortMonthsParse,x),p!==-1?p:null))}function Kv(i,u,d){var f,p,b;if(this._monthsParseExact)return Vv.call(this,i,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),f=0;f<12;f++){if(p=T([2e3,f]),d&&!this._longMonthsParse[f]&&(this._longMonthsParse[f]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i")),!d&&!this._monthsParse[f]&&(b="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[f]=new RegExp(b.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[f].test(i))return f;if(d&&u==="MMM"&&this._shortMonthsParse[f].test(i))return f;if(!d&&this._monthsParse[f].test(i))return f}}function cp(i,u){var d;if(!i.isValid())return i;if(typeof u=="string"){if(/^\d+$/.test(u))u=de(u);else if(u=i.localeData().monthsParse(u),!c(u))return i}return d=Math.min(i.date(),uo(i.year(),u)),i._d["set"+(i._isUTC?"UTC":"")+"Month"](u,d),i}function dp(i){return i!=null?(cp(this,i),e.updateOffset(this,!0),this):Rt(this,"Month")}function Zv(){return uo(this.year(),this.month())}function Xv(i){return this._monthsParseExact?(a(this,"_monthsRegex")||fp.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Bv),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function Qv(i){return this._monthsParseExact?(a(this,"_monthsRegex")||fp.call(this),i?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Gv),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function fp(){function i(x,re){return re.length-x.length}var u=[],d=[],f=[],p,b;for(p=0;p<12;p++)b=T([2e3,p]),u.push(this.monthsShort(b,"")),d.push(this.months(b,"")),f.push(this.months(b,"")),f.push(this.monthsShort(b,""));for(u.sort(i),d.sort(i),f.sort(i),p=0;p<12;p++)u[p]=ht(u[p]),d[p]=ht(d[p]);for(p=0;p<24;p++)f[p]=ht(f[p]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}k("Y",0,0,function(){var i=this.year();return i<=9999?g(i,4):"+"+i}),k(0,["YY",2],0,function(){return this.year()%100}),k(0,["YYYY",4],0,"year"),k(0,["YYYYY",5],0,"year"),k(0,["YYYYYY",6,!0],0,"year"),st("year","y"),qe("year",1),H("Y",Mn),H("YY",Le,_t),H("YYYY",On,cr),H("YYYYY",Qn,Kr),H("YYYYYY",Qn,Kr),Ne(["YYYYY","YYYYYY"],et),Ne("YYYY",function(i,u){u[et]=i.length===2?e.parseTwoDigitYear(i):de(i)}),Ne("YY",function(i,u){u[et]=e.parseTwoDigitYear(i)}),Ne("Y",function(i,u){u[et]=parseInt(i,10)});function Pi(i){return Kn(i)?366:365}e.parseTwoDigitYear=function(i){return de(i)+(de(i)>68?1900:2e3)};var hp=Vr("FullYear",!0);function Jv(){return Kn(this.year())}function ew(i,u,d,f,p,b,x){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,f,p,b,x),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,f,p,b,x),re}function Ai(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function lo(i,u,d){var f=7+u-d,p=(7+Ai(i,0,f).getUTCDay()-u)%7;return-p+f-1}function pp(i,u,d,f,p){var b=(7+d-f)%7,x=lo(i,f,p),re=1+7*(u-1)+b+x,ge,Ye;return re<=0?(ge=i-1,Ye=Pi(ge)+re):re>Pi(i)?(ge=i+1,Ye=re-Pi(i)):(ge=i,Ye=re),{year:ge,dayOfYear:Ye}}function Ni(i,u,d){var f=lo(i.year(),u,d),p=Math.floor((i.dayOfYear()-f-1)/7)+1,b,x;return p<1?(x=i.year()-1,b=p+Xr(x,u,d)):p>Xr(i.year(),u,d)?(b=p-Xr(i.year(),u,d),x=i.year()+1):(x=i.year(),b=p),{week:b,year:x}}function Xr(i,u,d){var f=lo(i,u,d),p=lo(i+1,u,d);return(Pi(i)-f+p)/7}k("w",["ww",2],"wo","week"),k("W",["WW",2],"Wo","isoWeek"),st("week","w"),st("isoWeek","W"),qe("week",5),qe("isoWeek",5),H("w",Le),H("ww",Le,_t),H("W",Le),H("WW",Le,_t),pr(["w","ww","W","WW"],function(i,u,d,f){u[f.substr(0,1)]=de(i)});function tw(i){return Ni(i,this._week.dow,this._week.doy).week}var rw={dow:0,doy:6};function nw(){return this._week.dow}function sw(){return this._week.doy}function iw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function aw(i){var u=Ni(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}k("d",0,"do","day"),k("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),k("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),k("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),k("e",0,0,"weekday"),k("E",0,0,"isoWeekday"),st("day","d"),st("weekday","e"),st("isoWeekday","E"),qe("day",11),qe("weekday",11),qe("isoWeekday",11),H("d",Le),H("e",Le),H("E",Le),H("dd",function(i,u){return u.weekdaysMinRegex(i)}),H("ddd",function(i,u){return u.weekdaysShortRegex(i)}),H("dddd",function(i,u){return u.weekdaysRegex(i)}),pr(["dd","ddd","dddd"],function(i,u,d,f){var p=d._locale.weekdaysParse(i,f,d._strict);p!=null?u.d=p:v(d).invalidWeekday=i}),pr(["d","e","E"],function(i,u,d,f){u[f]=de(i)});function ow(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function uw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function ll(i,u){return i.slice(u,7).concat(i.slice(0,u))}var lw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dw=fr,fw=fr,hw=fr;function pw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?ll(d,this._week.dow):i?d[i.day()]:d}function mw(i){return i===!0?ll(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function yw(i){return i===!0?ll(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function gw(i,u,d){var f,p,b,x=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=T([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(p=it.call(this._weekdaysParse,x),p!==-1?p:null):u==="ddd"?(p=it.call(this._shortWeekdaysParse,x),p!==-1?p:null):(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null):u==="dddd"?(p=it.call(this._weekdaysParse,x),p!==-1||(p=it.call(this._shortWeekdaysParse,x),p!==-1)?p:(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null)):u==="ddd"?(p=it.call(this._shortWeekdaysParse,x),p!==-1||(p=it.call(this._weekdaysParse,x),p!==-1)?p:(p=it.call(this._minWeekdaysParse,x),p!==-1?p:null)):(p=it.call(this._minWeekdaysParse,x),p!==-1||(p=it.call(this._weekdaysParse,x),p!==-1)?p:(p=it.call(this._shortWeekdaysParse,x),p!==-1?p:null))}function _w(i,u,d){var f,p,b;if(this._weekdaysParseExact)return gw.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=T([2e3,1]).day(f),d&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(d&&u==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(d&&u==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!d&&this._weekdaysParse[f].test(i))return f}}function Tw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=ow(i,this.localeData()),this.add(i-u,"d")):u}function bw(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function vw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=uw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function ww(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=dw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ew(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function kw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||cl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function cl(){function i($t,rn){return rn.length-$t.length}var u=[],d=[],f=[],p=[],b,x,re,ge,Ye;for(b=0;b<7;b++)x=T([2e3,1]).day(b),re=ht(this.weekdaysMin(x,"")),ge=ht(this.weekdaysShort(x,"")),Ye=ht(this.weekdays(x,"")),u.push(re),d.push(ge),f.push(Ye),p.push(re),p.push(ge),p.push(Ye);u.sort(i),d.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function dl(){return this.hours()%12||12}function Dw(){return this.hours()||24}k("H",["HH",2],0,"hour"),k("h",["hh",2],0,dl),k("k",["kk",2],0,Dw),k("hmm",0,0,function(){return""+dl.apply(this)+g(this.minutes(),2)}),k("hmmss",0,0,function(){return""+dl.apply(this)+g(this.minutes(),2)+g(this.seconds(),2)}),k("Hmm",0,0,function(){return""+this.hours()+g(this.minutes(),2)}),k("Hmmss",0,0,function(){return""+this.hours()+g(this.minutes(),2)+g(this.seconds(),2)});function yp(i,u){k(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}yp("a",!0),yp("A",!1),st("hour","h"),qe("hour",13);function gp(i,u){return u._meridiemParse}H("a",gp),H("A",gp),H("H",Le),H("h",Le),H("k",Le),H("HH",Le,_t),H("hh",Le,_t),H("kk",Le,_t),H("hmm",Sn),H("hmmss",Cs),H("Hmm",Sn),H("Hmmss",Cs),Ne(["H","HH"],ne),Ne(["k","kk"],function(i,u,d){var f=de(i);u[ne]=f===24?0:f}),Ne(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Ne(["h","hh"],function(i,u,d){u[ne]=de(i),v(d).bigHour=!0}),Ne("hmm",function(i,u,d){var f=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f)),v(d).bigHour=!0}),Ne("hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f,2)),u[jt]=de(i.substr(p)),v(d).bigHour=!0}),Ne("Hmm",function(i,u,d){var f=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f))}),Ne("Hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,f)),u[le]=de(i.substr(f,2)),u[jt]=de(i.substr(p))});function Sw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Ow=/[ap]\.?m?\.?/i,Mw=Vr("Hours",!0);function Rw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var _p={calendar:ue,longDateFormat:ke,invalidDate:ce,ordinal:K,dayOfMonthOrdinalParse:We,relativeTime:Ke,months:$v,monthsShort:up,week:rw,weekdays:lw,weekdaysMin:cw,weekdaysShort:mp,meridiemParse:Ow},Xe={},Ci={},Ii;function xw(i,u){var d,f=Math.min(i.length,u.length);for(d=0;d<f;d+=1)if(i[d]!==u[d])return d;return f}function Tp(i){return i&&i.toLowerCase().replace("_","-")}function Pw(i){for(var u=0,d,f,p,b;u<i.length;){for(b=Tp(i[u]).split("-"),d=b.length,f=Tp(i[u+1]),f=f?f.split("-"):null;d>0;){if(p=co(b.slice(0,d).join("-")),p)return p;if(f&&f.length>=d&&xw(b,f)>=d-1)break;d--}u++}return Ii}function Aw(i){return i.match("^[^/\\\\]*$")!=null}function co(i){var u=null,d;if(Xe[i]===void 0&&typeof Hs!="undefined"&&Hs&&Hs.exports&&Aw(i))try{u=Ii._abbr,d=require,d("./locale/"+i),Rn(u)}catch(f){Xe[i]=null}return Xe[i]}function Rn(i,u){var d;return i&&(l(u)?d=Qr(i):d=fl(i,u),d?Ii=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Ii._abbr}function fl(i,u){if(u!==null){var d,f=_p;if(u.abbr=i,Xe[i]!=null)yt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Xe[i]._config;else if(u.parentLocale!=null)if(Xe[u.parentLocale]!=null)f=Xe[u.parentLocale]._config;else if(d=co(u.parentLocale),d!=null)f=d._config;else return Ci[u.parentLocale]||(Ci[u.parentLocale]=[]),Ci[u.parentLocale].push({name:i,config:u}),null;return Xe[i]=new Q(P(f,u)),Ci[i]&&Ci[i].forEach(function(p){fl(p.name,p.config)}),Rn(i),Xe[i]}else return delete Xe[i],null}function Nw(i,u){if(u!=null){var d,f,p=_p;Xe[i]!=null&&Xe[i].parentLocale!=null?Xe[i].set(P(Xe[i]._config,u)):(f=co(i),f!=null&&(p=f._config),u=P(p,u),f==null&&(u.abbr=i),d=new Q(u),d.parentLocale=Xe[i],Xe[i]=d),Rn(i)}else Xe[i]!=null&&(Xe[i].parentLocale!=null?(Xe[i]=Xe[i].parentLocale,i===Rn()&&Rn(i)):Xe[i]!=null&&delete Xe[i]);return Xe[i]}function Qr(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Ii;if(!n(i)){if(u=co(i),u)return u;i=[i]}return Pw(i)}function Cw(){return Y(Xe)}function hl(i){var u,d=i._a;return d&&v(i).overflow===-2&&(u=d[Ze]<0||d[Ze]>11?Ze:d[G]<1||d[G]>uo(d[et],d[Ze])?G:d[ne]<0||d[ne]>24||d[ne]===24&&(d[le]!==0||d[jt]!==0||d[es]!==0)?ne:d[le]<0||d[le]>59?le:d[jt]<0||d[jt]>59?jt:d[es]<0||d[es]>999?es:-1,v(i)._overflowDayOfYear&&(u<et||u>G)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=Wv),v(i)._overflowWeekday&&u===-1&&(u=qv),v(i).overflow=u),i}var Iw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lw=/Z|[+-]\d\d(?::?\d\d)?/,fo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Yw=/^\/?Date\((-?\d+)/i,Uw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ww={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function bp(i){var u,d,f=i._i,p=Iw.exec(f)||Fw.exec(f),b,x,re,ge,Ye=fo.length,$t=pl.length;if(p){for(v(i).iso=!0,u=0,d=Ye;u<d;u++)if(fo[u][1].exec(p[1])){x=fo[u][0],b=fo[u][2]!==!1;break}if(x==null){i._isValid=!1;return}if(p[3]){for(u=0,d=$t;u<d;u++)if(pl[u][1].exec(p[3])){re=(p[2]||" ")+pl[u][0];break}if(re==null){i._isValid=!1;return}}if(!b&&re!=null){i._isValid=!1;return}if(p[4])if(Lw.exec(p[4]))ge="Z";else{i._isValid=!1;return}i._f=x+(re||"")+(ge||""),yl(i)}else i._isValid=!1}function qw(i,u,d,f,p,b){var x=[jw(i),up.indexOf(u),parseInt(d,10),parseInt(f,10),parseInt(p,10)];return b&&x.push(parseInt(b,10)),x}function jw(i){var u=parseInt(i,10);return u<=49?2e3+u:u<=999?1900+u:u}function $w(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bw(i,u,d){if(i){var f=mp.indexOf(i),p=new Date(u[0],u[1],u[2]).getDay();if(f!==p)return v(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function Gw(i,u,d){if(i)return Ww[i];if(u)return 0;var f=parseInt(d,10),p=f%100,b=(f-p)/100;return b*60+p}function vp(i){var u=Uw.exec($w(i._i)),d;if(u){if(d=qw(u[4],u[3],u[2],u[5],u[6],u[7]),!Bw(u[1],d,i))return;i._a=d,i._tzm=Gw(u[8],u[9],u[10]),i._d=Ai.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),v(i).rfc2822=!0}else i._isValid=!1}function Hw(i){var u=Yw.exec(i._i);if(u!==null){i._d=new Date(+u[1]);return}if(bp(i),i._isValid===!1)delete i._isValid;else return;if(vp(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:e.createFromInputFallback(i)}e.createFromInputFallback=te("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Fs(i,u,d){return i!=null?i:u!=null?u:d}function zw(i){var u=new Date(e.now());return i._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function ml(i){var u,d,f=[],p,b,x;if(!i._d){for(p=zw(i),i._w&&i._a[G]==null&&i._a[Ze]==null&&Vw(i),i._dayOfYear!=null&&(x=Fs(i._a[et],p[et]),(i._dayOfYear>Pi(x)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Ai(x,0,i._dayOfYear),i._a[Ze]=d.getUTCMonth(),i._a[G]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=f[u]=p[u];for(;u<7;u++)i._a[u]=f[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[le]===0&&i._a[jt]===0&&i._a[es]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?Ai:ew).apply(null,f),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function Vw(i){var u,d,f,p,b,x,re,ge,Ye;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,x=4,d=Fs(u.GG,i._a[et],Ni(He(),1,4).year),f=Fs(u.W,1),p=Fs(u.E,1),(p<1||p>7)&&(ge=!0)):(b=i._locale._week.dow,x=i._locale._week.doy,Ye=Ni(He(),b,x),d=Fs(u.gg,i._a[et],Ye.year),f=Fs(u.w,Ye.week),u.d!=null?(p=u.d,(p<0||p>6)&&(ge=!0)):u.e!=null?(p=u.e+b,(u.e<0||u.e>6)&&(ge=!0)):p=b),f<1||f>Xr(d,b,x)?v(i)._overflowWeeks=!0:ge!=null?v(i)._overflowWeekday=!0:(re=pp(d,f,p,b,x),i._a[et]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function yl(i){if(i._f===e.ISO_8601){bp(i);return}if(i._f===e.RFC_2822){vp(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,f,p,b,x,re=u.length,ge=0,Ye,$t;for(p=j(i._f,i._locale).match(w)||[],$t=p.length,d=0;d<$t;d++)b=p[d],f=(u.match(Is(b,i))||[])[0],f&&(x=u.substr(0,u.indexOf(f)),x.length>0&&v(i).unusedInput.push(x),u=u.slice(u.indexOf(f)+f.length),ge+=f.length),M[b]?(f?v(i).empty=!1:v(i).unusedTokens.push(b),Ft(b,f,i)):i._strict&&!f&&v(i).unusedTokens.push(b);v(i).charsLeftOver=re-ge,u.length>0&&v(i).unusedInput.push(u),i._a[ne]<=12&&v(i).bigHour===!0&&i._a[ne]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[ne]=Kw(i._locale,i._a[ne],i._meridiem),Ye=v(i).era,Ye!==null&&(i._a[et]=i._locale.erasConvertYear(Ye,i._a[et])),ml(i),hl(i)}function Kw(i,u,d){var f;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(f=i.isPM(d),f&&u<12&&(u+=12),!f&&u===12&&(u=0)),u)}function Zw(i){var u,d,f,p,b,x,re=!1,ge=i._f.length;if(ge===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;p<ge;p++)b=0,x=!1,u=me({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[p],yl(u),I(u)&&(x=!0),b+=v(u).charsLeftOver,b+=v(u).unusedTokens.length*10,v(u).score=b,re?b<f&&(f=b,d=u):(f==null||b<f||x)&&(f=b,d=u,x&&(re=!0));_(i,d||u)}function Xw(i){if(!i._d){var u=kn(i._i),d=u.day===void 0?u.date:u.day;i._a=m([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(f){return f&&parseInt(f,10)}),ml(i)}}function Qw(i){var u=new fe(hl(wp(i)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function wp(i){var u=i._i,d=i._f;return i._locale=i._locale||Qr(i._l),u===null||d===void 0&&u===""?q({nullInput:!0}):(typeof u=="string"&&(i._i=u=i._locale.preparse(u)),ve(u)?new fe(hl(u)):(h(u)?i._d=u:n(d)?Zw(i):d?yl(i):Jw(i),I(i)||(i._d=null),i))}function Jw(i){var u=i._i;l(u)?i._d=new Date(e.now()):h(u)?i._d=new Date(u.valueOf()):typeof u=="string"?Hw(i):n(u)?(i._a=m(u.slice(0),function(d){return parseInt(d,10)}),ml(i)):s(u)?Xw(i):c(u)?i._d=new Date(u):e.createFromInputFallback(i)}function Ep(i,u,d,f,p){var b={};return(u===!0||u===!1)&&(f=u,u=void 0),(d===!0||d===!1)&&(f=d,d=void 0),(s(i)&&o(i)||n(i)&&i.length===0)&&(i=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=p,b._l=d,b._i=i,b._f=u,b._strict=f,Qw(b)}function He(i,u,d,f){return Ep(i,u,d,f,!1)}var e0=te("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=He.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:q()}),t0=te("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=He.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:q()});function kp(i,u){var d,f;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return He();for(d=u[0],f=1;f<u.length;++f)(!u[f].isValid()||u[f][i](d))&&(d=u[f]);return d}function r0(){var i=[].slice.call(arguments,0);return kp("isBefore",i)}function n0(){var i=[].slice.call(arguments,0);return kp("isAfter",i)}var s0=function(){return Date.now?Date.now():+new Date},Fi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function i0(i){var u,d=!1,f,p=Fi.length;for(u in i)if(a(i,u)&&!(it.call(Fi,u)!==-1&&(i[u]==null||!isNaN(i[u]))))return!1;for(f=0;f<p;++f)if(i[Fi[f]]){if(d)return!1;parseFloat(i[Fi[f]])!==de(i[Fi[f]])&&(d=!0)}return!0}function a0(){return this._isValid}function o0(){return Sr(NaN)}function ho(i){var u=kn(i),d=u.year||0,f=u.quarter||0,p=u.month||0,b=u.week||u.isoWeek||0,x=u.day||0,re=u.hour||0,ge=u.minute||0,Ye=u.second||0,$t=u.millisecond||0;this._isValid=i0(u),this._milliseconds=+$t+Ye*1e3+ge*6e4+re*1e3*60*60,this._days=+x+b*7,this._months=+p+f*3+d*12,this._data={},this._locale=Qr(),this._bubble()}function po(i){return i instanceof ho}function gl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function u0(i,u,d){var f=Math.min(i.length,u.length),p=Math.abs(i.length-u.length),b=0,x;for(x=0;x<f;x++)(d&&i[x]!==u[x]||!d&&de(i[x])!==de(u[x]))&&b++;return b+p}function Dp(i,u){k(i,0,0,function(){var d=this.utcOffset(),f="+";return d<0&&(d=-d,f="-"),f+g(~~(d/60),2)+u+g(~~d%60,2)})}Dp("Z",":"),Dp("ZZ",""),H("Z",Zr),H("ZZ",Zr),Ne(["Z","ZZ"],function(i,u,d){d._useUTC=!0,d._tzm=_l(Zr,i)});var l0=/([\+\-]|\d\d)/gi;function _l(i,u){var d=(u||"").match(i),f,p,b;return d===null?null:(f=d[d.length-1]||[],p=(f+"").match(l0)||["-",0,0],b=+(p[1]*60)+de(p[2]),b===0?0:p[0]==="+"?b:-b)}function Tl(i,u){var d,f;return u._isUTC?(d=u.clone(),f=(ve(i)||h(i)?i.valueOf():He(i).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+f),e.updateOffset(d,!1),d):He(i).local()}function bl(i){return-Math.round(i._d.getTimezoneOffset())}e.updateOffset=function(){};function c0(i,u,d){var f=this._offset||0,p;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=_l(Zr,i),i===null)return this}else Math.abs(i)<16&&!d&&(i=i*60);return!this._isUTC&&u&&(p=bl(this)),this._offset=i,this._isUTC=!0,p!=null&&this.add(p,"m"),f!==i&&(!u||this._changeInProgress?Rp(this,Sr(i-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?f:bl(this)}function d0(i,u){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,u),this):-this.utcOffset()}function f0(i){return this.utcOffset(0,i)}function h0(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(bl(this),"m")),this}function p0(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=_l(io,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function m0(i){return this.isValid()?(i=i?He(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function y0(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function g0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return me(i,this),i=wp(i),i._a?(u=i._isUTC?T(i._a):He(i._a),this._isDSTShifted=this.isValid()&&u0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function _0(){return this.isValid()?!this._isUTC:!1}function T0(){return this.isValid()?this._isUTC:!1}function Sp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var b0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,v0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Sr(i,u){var d=i,f=null,p,b,x;return po(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(f=b0.exec(i))?(p=f[1]==="-"?-1:1,d={y:0,d:de(f[G])*p,h:de(f[ne])*p,m:de(f[le])*p,s:de(f[jt])*p,ms:de(gl(f[es]*1e3))*p}):(f=v0.exec(i))?(p=f[1]==="-"?-1:1,d={y:ts(f[2],p),M:ts(f[3],p),w:ts(f[4],p),d:ts(f[5],p),h:ts(f[6],p),m:ts(f[7],p),s:ts(f[8],p)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=w0(He(d.from),He(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),b=new ho(d),po(i)&&a(i,"_locale")&&(b._locale=i._locale),po(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Sr.fn=ho.prototype,Sr.invalid=o0;function ts(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Op(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function w0(i,u){var d;return i.isValid()&&u.isValid()?(u=Tl(u,i),i.isBefore(u)?d=Op(i,u):(d=Op(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Mp(i,u){return function(d,f){var p,b;return f!==null&&!isNaN(+f)&&(yt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=d,d=f,f=b),p=Sr(d,f),Rp(this,p,i),this}}function Rp(i,u,d,f){var p=u._milliseconds,b=gl(u._days),x=gl(u._months);!i.isValid()||(f=f==null?!0:f,x&&cp(i,Rt(i,"Month")+x*d),b&&Zn(i,"Date",Rt(i,"Date")+b*d),p&&i._d.setTime(i._d.valueOf()+p*d),f&&e.updateOffset(i,b||x))}var E0=Mp(1,"add"),k0=Mp(-1,"subtract");function xp(i){return typeof i=="string"||i instanceof String}function D0(i){return ve(i)||h(i)||xp(i)||c(i)||O0(i)||S0(i)||i===null||i===void 0}function S0(i){var u=s(i)&&!o(i),d=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,x=f.length;for(p=0;p<x;p+=1)b=f[p],d=d||a(i,b);return u&&d}function O0(i){var u=n(i),d=!1;return u&&(d=i.filter(function(f){return!c(f)&&xp(i)}).length===0),u&&d}function M0(i){var u=s(i)&&!o(i),d=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,b;for(p=0;p<f.length;p+=1)b=f[p],d=d||a(i,b);return u&&d}function R0(i,u){var d=i.diff(u,"days",!0);return d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse"}function x0(i,u){arguments.length===1&&(arguments[0]?D0(arguments[0])?(i=arguments[0],u=void 0):M0(arguments[0])&&(u=arguments[0],i=void 0):(i=void 0,u=void 0));var d=i||He(),f=Tl(d,this).startOf("day"),p=e.calendarFormat(this,f)||"sameElse",b=u&&(V(u[p])?u[p].call(this,d):u[p]);return this.format(b||this.localeData().calendar(p,this,He(d)))}function P0(){return new fe(this)}function A0(i,u){var d=ve(i)?i:He(i);return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()>d.valueOf():d.valueOf()<this.clone().startOf(u).valueOf()):!1}function N0(i,u){var d=ve(i)?i:He(i);return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()<d.valueOf():this.clone().endOf(u).valueOf()<d.valueOf()):!1}function C0(i,u,d,f){var p=ve(i)?i:He(i),b=ve(u)?u:He(u);return this.isValid()&&p.isValid()&&b.isValid()?(f=f||"()",(f[0]==="("?this.isAfter(p,d):!this.isBefore(p,d))&&(f[1]===")"?this.isBefore(b,d):!this.isAfter(b,d))):!1}function I0(i,u){var d=ve(i)?i:He(i),f;return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(f=d.valueOf(),this.clone().startOf(u).valueOf()<=f&&f<=this.clone().endOf(u).valueOf())):!1}function F0(i,u){return this.isSame(i,u)||this.isAfter(i,u)}function L0(i,u){return this.isSame(i,u)||this.isBefore(i,u)}function Y0(i,u,d){var f,p,b;if(!this.isValid())return NaN;if(f=Tl(i,this),!f.isValid())return NaN;switch(p=(f.utcOffset()-this.utcOffset())*6e4,u=gt(u),u){case"year":b=mo(this,f)/12;break;case"month":b=mo(this,f);break;case"quarter":b=mo(this,f)/3;break;case"second":b=(this-f)/1e3;break;case"minute":b=(this-f)/6e4;break;case"hour":b=(this-f)/36e5;break;case"day":b=(this-f-p)/864e5;break;case"week":b=(this-f-p)/6048e5;break;default:b=this-f}return d?b:ft(b)}function mo(i,u){if(i.date()<u.date())return-mo(u,i);var d=(u.year()-i.year())*12+(u.month()-i.month()),f=i.clone().add(d,"months"),p,b;return u-f<0?(p=i.clone().add(d-1,"months"),b=(u-f)/(f-p)):(p=i.clone().add(d+1,"months"),b=(u-f)/(p-f)),-(d+b)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function U0(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function W0(i){if(!this.isValid())return null;var u=i!==!0,d=u?this.clone().utc():this;return d.year()<0||d.year()>9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):V(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function q0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,f,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+f+p+b)}function j0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function $0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||He(i).isValid())?Sr({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function B0(i){return this.from(He(),i)}function G0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||He(i).isValid())?Sr({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function H0(i){return this.to(He(),i)}function Pp(i){var u;return i===void 0?this._locale._abbr:(u=Qr(i),u!=null&&(this._locale=u),this)}var Ap=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Np(){return this._locale}var yo=1e3,Ls=60*yo,go=60*Ls,Cp=(365*400+97)*24*go;function Ys(i,u){return(i%u+u)%u}function Ip(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Cp:new Date(i,u,d).valueOf()}function Fp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Cp:Date.UTC(i,u,d)}function z0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Fp:Ip,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=Ys(u+(this._isUTC?0:this.utcOffset()*Ls),go);break;case"minute":u=this._d.valueOf(),u-=Ys(u,Ls);break;case"second":u=this._d.valueOf(),u-=Ys(u,yo);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function V0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Fp:Ip,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=go-Ys(u+(this._isUTC?0:this.utcOffset()*Ls),go)-1;break;case"minute":u=this._d.valueOf(),u+=Ls-Ys(u,Ls)-1;break;case"second":u=this._d.valueOf(),u+=yo-Ys(u,yo)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function K0(){return this._d.valueOf()-(this._offset||0)*6e4}function Z0(){return Math.floor(this.valueOf()/1e3)}function X0(){return new Date(this.valueOf())}function Q0(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function J0(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function e1(){return this.isValid()?this.toISOString():null}function t1(){return I(this)}function r1(){return _({},v(this))}function n1(){return v(this).overflow}function s1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}k("N",0,0,"eraAbbr"),k("NN",0,0,"eraAbbr"),k("NNN",0,0,"eraAbbr"),k("NNNN",0,0,"eraName"),k("NNNNN",0,0,"eraNarrow"),k("y",["y",1],"yo","eraYear"),k("y",["yy",2],0,"eraYear"),k("y",["yyy",3],0,"eraYear"),k("y",["yyyy",4],0,"eraYear"),H("N",vl),H("NN",vl),H("NNN",vl),H("NNNN",m1),H("NNNNN",y1),Ne(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,f){var p=d._locale.erasParse(i,f,d._strict);p?v(d).era=p:v(d).invalidEra=i}),H("y",dr),H("yy",dr),H("yyy",dr),H("yyyy",dr),H("yo",g1),Ne(["y","yy","yyy","yyyy"],et),Ne(["yo"],function(i,u,d,f){var p;d._locale._eraYearOrdinalRegex&&(p=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[et]=d._locale.eraYearOrdinalParse(i,p):u[et]=parseInt(i,10)});function i1(i,u){var d,f,p,b=this._eras||Qr("en")._eras;for(d=0,f=b.length;d<f;++d){switch(typeof b[d].since){case"string":p=e(b[d].since).startOf("day"),b[d].since=p.valueOf();break}switch(typeof b[d].until){case"undefined":b[d].until=1/0;break;case"string":p=e(b[d].until).startOf("day").valueOf(),b[d].until=p.valueOf();break}}return b}function a1(i,u,d){var f,p,b=this.eras(),x,re,ge;for(i=i.toUpperCase(),f=0,p=b.length;f<p;++f)if(x=b[f].name.toUpperCase(),re=b[f].abbr.toUpperCase(),ge=b[f].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(re===i)return b[f];break;case"NNNN":if(x===i)return b[f];break;case"NNNNN":if(ge===i)return b[f];break}else if([x,re,ge].indexOf(i)>=0)return b[f]}function o1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function u1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].name;return""}function l1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].narrow;return""}function c1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].abbr;return""}function d1(){var i,u,d,f,p=this.localeData().eras();for(i=0,u=p.length;i<u;++i)if(d=p[i].since<=p[i].until?1:-1,f=this.clone().startOf("day").valueOf(),p[i].since<=f&&f<=p[i].until||p[i].until<=f&&f<=p[i].since)return(this.year()-e(p[i].since).year())*d+p[i].offset;return this.year()}function f1(i){return a(this,"_erasNameRegex")||wl.call(this),i?this._erasNameRegex:this._erasRegex}function h1(i){return a(this,"_erasAbbrRegex")||wl.call(this),i?this._erasAbbrRegex:this._erasRegex}function p1(i){return a(this,"_erasNarrowRegex")||wl.call(this),i?this._erasNarrowRegex:this._erasRegex}function vl(i,u){return u.erasAbbrRegex(i)}function m1(i,u){return u.erasNameRegex(i)}function y1(i,u){return u.erasNarrowRegex(i)}function g1(i,u){return u._eraYearOrdinalRegex||dr}function wl(){var i=[],u=[],d=[],f=[],p,b,x=this.eras();for(p=0,b=x.length;p<b;++p)u.push(ht(x[p].name)),i.push(ht(x[p].abbr)),d.push(ht(x[p].narrow)),f.push(ht(x[p].name)),f.push(ht(x[p].abbr)),f.push(ht(x[p].narrow));this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}k(0,["gg",2],0,function(){return this.weekYear()%100}),k(0,["GG",2],0,function(){return this.isoWeekYear()%100});function _o(i,u){k(0,[i,i.length],0,u)}_o("gggg","weekYear"),_o("ggggg","weekYear"),_o("GGGG","isoWeekYear"),_o("GGGGG","isoWeekYear"),st("weekYear","gg"),st("isoWeekYear","GG"),qe("weekYear",1),qe("isoWeekYear",1),H("G",Mn),H("g",Mn),H("GG",Le,_t),H("gg",Le,_t),H("GGGG",On,cr),H("gggg",On,cr),H("GGGGG",Qn,Kr),H("ggggg",Qn,Kr),pr(["gggg","ggggg","GGGG","GGGGG"],function(i,u,d,f){u[f.substr(0,2)]=de(i)}),pr(["gg","GG"],function(i,u,d,f){u[f]=e.parseTwoDigitYear(i)});function _1(i){return Lp.call(this,i,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function T1(i){return Lp.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function b1(){return Xr(this.year(),1,4)}function v1(){return Xr(this.isoWeekYear(),1,4)}function w1(){var i=this.localeData()._week;return Xr(this.year(),i.dow,i.doy)}function E1(){var i=this.localeData()._week;return Xr(this.weekYear(),i.dow,i.doy)}function Lp(i,u,d,f,p){var b;return i==null?Ni(this,f,p).year:(b=Xr(i,f,p),u>b&&(u=b),k1.call(this,i,u,d,f,p))}function k1(i,u,d,f,p){var b=pp(i,u,d,f,p),x=Ai(b.year,0,b.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}k("Q",0,"Qo","quarter"),st("quarter","Q"),qe("quarter",7),H("Q",Dn),Ne("Q",function(i,u){u[Ze]=(de(i)-1)*3});function D1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}k("D",["DD",2],"Do","date"),st("date","D"),qe("date",9),H("D",Le),H("DD",Le,_t),H("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Ne(["D","DD"],G),Ne("Do",function(i,u){u[G]=de(i.match(Le)[0])});var Yp=Vr("Date",!0);k("DDD",["DDDD",3],"DDDo","dayOfYear"),st("dayOfYear","DDD"),qe("dayOfYear",4),H("DDD",Xn),H("DDDD",xi),Ne(["DDD","DDDD"],function(i,u,d){d._dayOfYear=de(i)});function S1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}k("m",["mm",2],0,"minute"),st("minute","m"),qe("minute",14),H("m",Le),H("mm",Le,_t),Ne(["m","mm"],le);var O1=Vr("Minutes",!1);k("s",["ss",2],0,"second"),st("second","s"),qe("second",15),H("s",Le),H("ss",Le,_t),Ne(["s","ss"],jt);var M1=Vr("Seconds",!1);k("S",0,0,function(){return~~(this.millisecond()/100)}),k(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),k(0,["SSS",3],0,"millisecond"),k(0,["SSSS",4],0,function(){return this.millisecond()*10}),k(0,["SSSSS",5],0,function(){return this.millisecond()*100}),k(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),k(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),k(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),k(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),st("millisecond","ms"),qe("millisecond",16),H("S",Xn,Dn),H("SS",Xn,_t),H("SSS",Xn,xi);var xn,Up;for(xn="SSSS";xn.length<=9;xn+="S")H(xn,dr);function R1(i,u){u[es]=de(("0."+i)*1e3)}for(xn="S";xn.length<=9;xn+="S")Ne(xn,R1);Up=Vr("Milliseconds",!1),k("z",0,0,"zoneAbbr"),k("zz",0,0,"zoneName");function x1(){return this._isUTC?"UTC":""}function P1(){return this._isUTC?"Coordinated Universal Time":""}var F=fe.prototype;F.add=E0,F.calendar=x0,F.clone=P0,F.diff=Y0,F.endOf=V0,F.format=j0,F.from=$0,F.fromNow=B0,F.to=G0,F.toNow=H0,F.get=so,F.invalidAt=n1,F.isAfter=A0,F.isBefore=N0,F.isBetween=C0,F.isSame=I0,F.isSameOrAfter=F0,F.isSameOrBefore=L0,F.isValid=t1,F.lang=Ap,F.locale=Pp,F.localeData=Np,F.max=t0,F.min=e0,F.parsingFlags=r1,F.set=Lr,F.startOf=z0,F.subtract=k0,F.toArray=Q0,F.toObject=J0,F.toDate=X0,F.toISOString=W0,F.inspect=q0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=e1,F.toString=U0,F.unix=Z0,F.valueOf=K0,F.creationData=s1,F.eraName=u1,F.eraNarrow=l1,F.eraAbbr=c1,F.eraYear=d1,F.year=hp,F.isLeapYear=Jv,F.weekYear=_1,F.isoWeekYear=T1,F.quarter=F.quarters=D1,F.month=dp,F.daysInMonth=Zv,F.week=F.weeks=iw,F.isoWeek=F.isoWeeks=aw,F.weeksInYear=w1,F.weeksInWeekYear=E1,F.isoWeeksInYear=b1,F.isoWeeksInISOWeekYear=v1,F.date=Yp,F.day=F.days=Tw,F.weekday=bw,F.isoWeekday=vw,F.dayOfYear=S1,F.hour=F.hours=Mw,F.minute=F.minutes=O1,F.second=F.seconds=M1,F.millisecond=F.milliseconds=Up,F.utcOffset=c0,F.utc=f0,F.local=h0,F.parseZone=p0,F.hasAlignedHourOffset=m0,F.isDST=y0,F.isLocal=_0,F.isUtcOffset=T0,F.isUtc=Sp,F.isUTC=Sp,F.zoneAbbr=x1,F.zoneName=P1,F.dates=te("dates accessor is deprecated. Use date instead.",Yp),F.months=te("months accessor is deprecated. Use month instead",dp),F.years=te("years accessor is deprecated. Use year instead",hp),F.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",d0),F.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",g0);function A1(i){return He(i*1e3)}function N1(){return He.apply(null,arguments).parseZone()}function Wp(i){return i}var Re=Q.prototype;Re.calendar=y,Re.longDateFormat=ye,Re.invalidDate=Ie,Re.ordinal=Je,Re.preparse=Wp,Re.postformat=Wp,Re.relativeTime=Dr,Re.pastFuture=Mt,Re.set=W,Re.eras=i1,Re.erasParse=a1,Re.erasConvertYear=o1,Re.erasAbbrRegex=h1,Re.erasNameRegex=f1,Re.erasNarrowRegex=p1,Re.months=Hv,Re.monthsShort=zv,Re.monthsParse=Kv,Re.monthsRegex=Qv,Re.monthsShortRegex=Xv,Re.week=tw,Re.firstDayOfYear=sw,Re.firstDayOfWeek=nw,Re.weekdays=pw,Re.weekdaysMin=yw,Re.weekdaysShort=mw,Re.weekdaysParse=_w,Re.weekdaysRegex=ww,Re.weekdaysShortRegex=Ew,Re.weekdaysMinRegex=kw,Re.isPM=Sw,Re.meridiem=Rw;function To(i,u,d,f){var p=Qr(),b=T().set(f,u);return p[d](b,i)}function qp(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return To(i,u,d,"month");var f,p=[];for(f=0;f<12;f++)p[f]=To(i,f,d,"month");return p}function El(i,u,d,f){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var p=Qr(),b=i?p._week.dow:0,x,re=[];if(d!=null)return To(u,(d+b)%7,f,"day");for(x=0;x<7;x++)re[x]=To(u,(x+b)%7,f,"day");return re}function C1(i,u){return qp(i,u,"months")}function I1(i,u){return qp(i,u,"monthsShort")}function F1(i,u,d){return El(i,u,d,"weekdays")}function L1(i,u,d){return El(i,u,d,"weekdaysShort")}function Y1(i,u,d){return El(i,u,d,"weekdaysMin")}Rn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=de(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=te("moment.lang is deprecated. Use moment.locale instead.",Rn),e.langData=te("moment.langData is deprecated. Use moment.localeData instead.",Qr);var Jr=Math.abs;function U1(){var i=this._data;return this._milliseconds=Jr(this._milliseconds),this._days=Jr(this._days),this._months=Jr(this._months),i.milliseconds=Jr(i.milliseconds),i.seconds=Jr(i.seconds),i.minutes=Jr(i.minutes),i.hours=Jr(i.hours),i.months=Jr(i.months),i.years=Jr(i.years),this}function jp(i,u,d,f){var p=Sr(u,d);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function W1(i,u){return jp(this,i,u,1)}function q1(i,u){return jp(this,i,u,-1)}function $p(i){return i<0?Math.floor(i):Math.ceil(i)}function j1(){var i=this._milliseconds,u=this._days,d=this._months,f=this._data,p,b,x,re,ge;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=$p(kl(d)+u)*864e5,u=0,d=0),f.milliseconds=i%1e3,p=ft(i/1e3),f.seconds=p%60,b=ft(p/60),f.minutes=b%60,x=ft(b/60),f.hours=x%24,u+=ft(x/24),ge=ft(Bp(u)),d+=ge,u-=$p(kl(ge)),re=ft(d/12),d%=12,f.days=u,f.months=d,f.years=re,this}function Bp(i){return i*4800/146097}function kl(i){return i*146097/4800}function $1(i){if(!this.isValid())return NaN;var u,d,f=this._milliseconds;if(i=gt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+f/864e5,d=this._months+Bp(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(kl(this._months)),i){case"week":return u/7+f/6048e5;case"day":return u+f/864e5;case"hour":return u*24+f/36e5;case"minute":return u*1440+f/6e4;case"second":return u*86400+f/1e3;case"millisecond":return Math.floor(u*864e5)+f;default:throw new Error("Unknown unit "+i)}}function B1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+de(this._months/12)*31536e6:NaN}function en(i){return function(){return this.as(i)}}var G1=en("ms"),H1=en("s"),z1=en("m"),V1=en("h"),K1=en("d"),Z1=en("w"),X1=en("M"),Q1=en("Q"),J1=en("y");function eE(){return Sr(this)}function tE(i){return i=gt(i),this.isValid()?this[i+"s"]():NaN}function rs(i){return function(){return this.isValid()?this._data[i]:NaN}}var rE=rs("milliseconds"),nE=rs("seconds"),sE=rs("minutes"),iE=rs("hours"),aE=rs("days"),oE=rs("months"),uE=rs("years");function lE(){return ft(this.days()/7)}var tn=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cE(i,u,d,f,p){return p.relativeTime(u||1,!!d,i,f)}function dE(i,u,d,f){var p=Sr(i).abs(),b=tn(p.as("s")),x=tn(p.as("m")),re=tn(p.as("h")),ge=tn(p.as("d")),Ye=tn(p.as("M")),$t=tn(p.as("w")),rn=tn(p.as("y")),Pn=b<=d.ss&&["s",b]||b<d.s&&["ss",b]||x<=1&&["m"]||x<d.m&&["mm",x]||re<=1&&["h"]||re<d.h&&["hh",re]||ge<=1&&["d"]||ge<d.d&&["dd",ge];return d.w!=null&&(Pn=Pn||$t<=1&&["w"]||$t<d.w&&["ww",$t]),Pn=Pn||Ye<=1&&["M"]||Ye<d.M&&["MM",Ye]||rn<=1&&["y"]||["yy",rn],Pn[2]=u,Pn[3]=+i>0,Pn[4]=f,cE.apply(null,Pn)}function fE(i){return i===void 0?tn:typeof i=="function"?(tn=i,!0):!1}function hE(i,u){return Us[i]===void 0?!1:u===void 0?Us[i]:(Us[i]=u,i==="s"&&(Us.ss=u-1),!0)}function pE(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,f=Us,p,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(f=Object.assign({},Us,u),u.s!=null&&u.ss==null&&(f.ss=u.s-1)),p=this.localeData(),b=dE(this,!d,f,p),d&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Dl=Math.abs;function Ws(i){return(i>0)-(i<0)||+i}function bo(){if(!this.isValid())return this.localeData().invalidDate();var i=Dl(this._milliseconds)/1e3,u=Dl(this._days),d=Dl(this._months),f,p,b,x,re=this.asSeconds(),ge,Ye,$t,rn;return re?(f=ft(i/60),p=ft(f/60),i%=60,f%=60,b=ft(d/12),d%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",ge=re<0?"-":"",Ye=Ws(this._months)!==Ws(re)?"-":"",$t=Ws(this._days)!==Ws(re)?"-":"",rn=Ws(this._milliseconds)!==Ws(re)?"-":"",ge+"P"+(b?Ye+b+"Y":"")+(d?Ye+d+"M":"")+(u?$t+u+"D":"")+(p||f||i?"T":"")+(p?rn+p+"H":"")+(f?rn+f+"M":"")+(i?rn+x+"S":"")):"P0D"}var Oe=ho.prototype;Oe.isValid=a0,Oe.abs=U1,Oe.add=W1,Oe.subtract=q1,Oe.as=$1,Oe.asMilliseconds=G1,Oe.asSeconds=H1,Oe.asMinutes=z1,Oe.asHours=V1,Oe.asDays=K1,Oe.asWeeks=Z1,Oe.asMonths=X1,Oe.asQuarters=Q1,Oe.asYears=J1,Oe.valueOf=B1,Oe._bubble=j1,Oe.clone=eE,Oe.get=tE,Oe.milliseconds=rE,Oe.seconds=nE,Oe.minutes=sE,Oe.hours=iE,Oe.days=aE,Oe.weeks=lE,Oe.months=oE,Oe.years=uE,Oe.humanize=pE,Oe.toISOString=bo,Oe.toString=bo,Oe.toJSON=bo,Oe.locale=Pp,Oe.localeData=Np,Oe.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bo),Oe.lang=Ap,k("X",0,0,"unix"),k("x",0,0,"valueOf"),H("x",Mn),H("X",ao),Ne("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Ne("x",function(i,u,d){d._d=new Date(de(i))});return e.version="2.29.4",t(He),e.fn=F,e.min=r0,e.max=n0,e.now=s0,e.utc=T,e.unix=A1,e.months=C1,e.isDate=h,e.locale=Rn,e.invalid=q,e.duration=Sr,e.isMoment=ve,e.weekdays=F1,e.parseZone=N1,e.localeData=Qr,e.isDuration=po,e.monthsShort=I1,e.weekdaysMin=Y1,e.defineLocale=fl,e.updateLocale=Nw,e.locales=Cw,e.weekdaysShort=L1,e.normalizeUnits=gt,e.relativeTimeRounding=fE,e.relativeTimeThreshold=hE,e.calendarFormat=R0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var sy=O((ry,ny)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(g){return Object.prototype.toString.call(g)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,h=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var g=Object.getOwnPropertyNames(y);return g.push.apply(g,Object.getOwnPropertySymbols(y)),g}:Object.keys;function m(){this._events={},this._conf&&_.call(this,this._conf)}function _(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,g){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+g+"."),typeof process!="undefined"&&process.emitWarning){var E=new Error(w);E.name="MaxListenersExceededWarning",E.emitter=this,E.count=y,process.emitWarning(E)}else console.error(w),console.trace&&console.trace()}var D=function(y,g,w){var E=arguments.length;switch(E){case 0:return[];case 1:return[y];case 2:return[y,g];case 3:return[y,g,w];default:for(var S=new Array(E);E--;)S[E]=arguments[E];return S}};function v(y,g){for(var w={},E,S=y.length,M=g?g.length:0,k=0;k<S;k++)E=y[k],w[E]=k<M?g[k]:r;return w}function R(y,g,w){this._emitter=y,this._target=g,this._listeners={},this._listenersCount=0;var E,S;if((w.on||w.off)&&(E=w.on,S=w.off),g.addEventListener?(E=g.addEventListener,S=g.removeEventListener):g.addListener?(E=g.addListener,S=g.removeListener):g.on&&(E=g.on,S=g.off),!E&&!S)throw Error("target does not implement any known event API");if(typeof E!="function")throw TypeError("on method must be a function");if(typeof S!="function")throw TypeError("off method must be a function");this._on=E,this._off=S;var M=y._observers;M?M.push(this):y._observers=[this]}Object.assign(R.prototype,{subscribe:function(y,g,w){var E=this,S=this._target,M=this._emitter,k=this._listeners,C=function(){var A=D.apply(null,arguments),N={data:A,name:g,original:y};if(w){var j=w.call(S,N);j!==!1&&M.emit.apply(M,[N.name].concat(A));return}M.emit.apply(M,[g].concat(A))};if(k[y])throw Error("Event '"+y+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!E._onNewListener?(this._onNewListener=function(A){A===g&&k[y]===null&&(k[y]=C,E._on.call(S,y,C))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(A){A===g&&!M.hasListeners(A)&&k[y]&&(k[y]=null,E._off.call(S,y,C))},k[y]=null,M.on("removeListener",this._onRemoveListener)):(k[y]=C,E._on.call(S,y,C))},unsubscribe:function(y){var g=this,w=this._listeners,E=this._emitter,S,M,k=this._off,C=this._target,A;if(y&&typeof y!="string")throw TypeError("event must be a string");function N(){g._onNewListener&&(E.off("newListener",g._onNewListener),E.off("removeListener",g._onRemoveListener),g._onNewListener=null,g._onRemoveListener=null);var j=ve.call(E,g);E._observers.splice(j,1)}if(y){if(S=w[y],!S)return;k.call(C,y,S),delete w[y],--this._listenersCount||N()}else{for(M=h(w),A=M.length;A-- >0;)y=M[A],k.call(C,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function I(y,g,w,E){var S=Object.assign({},g);if(!y)return S;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),k=M.length,C,A,N;function j(ye){throw Error('Invalid "'+C+'" option value'+(ye?". Reason: "+ye:""))}for(var ke=0;ke<k;ke++){if(C=M[ke],!E&&!e.call(g,C))throw Error('Unknown "'+C+'" option');A=y[C],A!==r&&(N=w[C],S[C]=N?N(A,j):A)}return S}function q(y,g){return(typeof y!="function"||!y.hasOwnProperty("prototype"))&&g("value must be a constructor"),y}function $(y){var g="value must be type of "+y.join("|"),w=y.length,E=y[0],S=y[1];return w===1?function(M,k){if(typeof M===E)return M;k(g)}:w===2?function(M,k){var C=typeof M;if(C===E||C===S)return M;k(g)}:function(M,k){for(var C=typeof M,A=w;A-- >0;)if(C===y[A])return M;k(g)}}var B=$(["function"]),me=$(["object","function"]);function fe(y,g,w){var E,S,M=0,k,C=new y(function(A,N,j){w=I(w,{timeout:0,overload:!1},{timeout:function(Ie,K){return Ie*=1,(typeof Ie!="number"||Ie<0||!Number.isFinite(Ie))&&K("timeout must be a positive number"),Ie}}),E=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function ke(){S&&(S=null),M&&(clearTimeout(M),M=0)}var ye=function(Ie){ke(),A(Ie)},ce=function(Ie){ke(),N(Ie)};E?g(ye,ce,j):(S=[function(Ie){ce(Ie||Error("canceled"))}],g(ye,ce,function(Ie){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ie!="function")throw TypeError("onCancel callback must be a function");S.push(Ie)}),k=!0),w.timeout>0&&(M=setTimeout(function(){var Ie=Error("timeout");Ie.code="ETIMEDOUT",M=0,C.cancel(Ie),N(Ie)},w.timeout))});return E||(C.cancel=function(A){if(!!S){for(var N=S.length,j=1;j<N;j++)S[j](A);S[0](A),S=null}}),C}function ve(y){var g=this._observers;if(!g)return-1;for(var w=g.length,E=0;E<w;E++)if(g[E]._target===y)return E;return-1}function ee(y,g,w,E,S){if(!w)return null;if(E===0){var M=typeof g;if(M==="string"){var k,C,A=0,N=0,j=this.delimiter,ke=j.length;if((C=g.indexOf(j))!==-1){k=new Array(5);do k[A++]=g.slice(N,C),N=C+ke;while((C=g.indexOf(j,N))!==-1);k[A++]=g.slice(N),g=k,S=A}else g=[g],S=1}else M==="object"?S=g.length:(g=[g],S=1)}var ye=null,ce,Ie,K,We,Je,Ke=g[E],Dr=g[E+1],Mt,Ae;if(E===S)w._listeners&&(typeof w._listeners=="function"?(y&&y.push(w._listeners),ye=[w]):(y&&y.push.apply(y,w._listeners),ye=[w]));else if(Ke==="*"){for(Mt=h(w),C=Mt.length;C-- >0;)ce=Mt[C],ce!=="_listeners"&&(Ae=ee(y,g,w[ce],E+1,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else if(Ke==="**"){for(Je=E+1===S||E+2===S&&Dr==="*",Je&&w._listeners&&(ye=ee(y,g,w,S,S)),Mt=h(w),C=Mt.length;C-- >0;)ce=Mt[C],ce!=="_listeners"&&(ce==="*"||ce==="**"?(w[ce]._listeners&&!Je&&(Ae=ee(y,g,w[ce],S,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae)),Ae=ee(y,g,w[ce],E,S)):ce===Dr?Ae=ee(y,g,w[ce],E+2,S):Ae=ee(y,g,w[ce],E,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else w[Ke]&&(ye=ee(y,g,w[Ke],E+1,S));if(Ie=w["*"],Ie&&ee(y,g,Ie,E+1,S),K=w["**"],K)if(E<S)for(K._listeners&&ee(y,g,K,S,S),Mt=h(K),C=Mt.length;C-- >0;)ce=Mt[C],ce!=="_listeners"&&(ce===Dr?ee(y,g,K[ce],E+2,S):ce===Ke?ee(y,g,K[ce],E+1,S):(We={},We[ce]=K[ce],ee(y,g,{"**":We},E+1,S)));else K._listeners?ee(y,g,K,S,S):K["*"]&&K["*"]._listeners&&ee(y,g,K["*"],S,S);return ye}function te(y,g,w){var E=0,S=0,M,k=this.delimiter,C=k.length,A;if(typeof y=="string")if((M=y.indexOf(k))!==-1){A=new Array(5);do A[E++]=y.slice(S,M),S=M+C;while((M=y.indexOf(k,S))!==-1);A[E++]=y.slice(S)}else A=[y],E=1;else A=y,E=y.length;if(E>1){for(M=0;M+1<E;M++)if(A[M]==="**"&&A[M+1]==="**")return}var N=this.listenerTree,j;for(M=0;M<E;M++)if(j=A[M],N=N[j]||(N[j]={}),M===E-1)return N._listeners?(typeof N._listeners=="function"&&(N._listeners=[N._listeners]),w?N._listeners.unshift(g):N._listeners.push(g),!N._listeners.warned&&this._maxListeners>0&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,j))):N._listeners=g,!0;return!0}function It(y,g,w,E){for(var S=h(y),M=S.length,k,C,A,N=y._listeners,j;M-- >0;)C=S[M],k=y[C],C==="_listeners"?A=w:A=w?w.concat(C):[C],j=E||typeof C=="symbol",N&&g.push(j?A:A.join(this.delimiter)),typeof k=="object"&&It.call(this,k,g,A,j);return g}function yt(y){for(var g=h(y),w=g.length,E,S,M;w-- >0;)S=g[w],E=y[S],E&&(M=!0,S!=="_listeners"&&!yt(E)&&delete y[S]);return M}function V(y,g,w){this.emitter=y,this.event=g,this.listener=w}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function W(y,g,w){if(w===!0)S=!0;else if(w===!1)E=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var E=w.async,S=w.promisify,M=w.nextTick,k=w.objectify}if(E||M||S){var C=g,A=g._origin||g;if(M&&!s)throw Error("process.nextTick is not supported");S===r&&(S=g.constructor.name==="AsyncFunction"),g=function(){var N=arguments,j=this,ke=this.event;return S?M?Promise.resolve():new Promise(function(ye){c(ye)}).then(function(){return j.event=ke,C.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=ke,C.apply(j,N)})},g._async=!0,g._origin=A}return[g,k?new V(this,y,g):this]}function P(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,_.call(this,y)}P.EventEmitter2=P,P.prototype.listenTo=function(y,g,w){if(typeof y!="object")throw TypeError("target musts be an object");var E=this;w=I(w,{on:r,off:r,reducers:r},{on:B,off:B,reducers:me});function S(M){if(typeof M!="object")throw TypeError("events must be an object");var k=w.reducers,C=ve.call(E,y),A;C===-1?A=new R(E,y,w):A=E._observers[C];for(var N=h(M),j=N.length,ke,ye=typeof k=="function",ce=0;ce<j;ce++)ke=N[ce],A.subscribe(ke,M[ke]||ke,ye?k:k&&k[ke])}return t(g)?S(v(g)):S(typeof g=="string"?v(g.split(/\s+/)):g),this},P.prototype.stopListeningTo=function(y,g){var w=this._observers;if(!w)return!1;var E=w.length,S,M=!1;if(y&&typeof y!="object")throw TypeError("target should be an object");for(;E-- >0;)S=w[E],(!y||S._target===y)&&(S.unsubscribe(g),M=!0);return M},P.prototype.delimiter=".",P.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},P.prototype.getMaxListeners=function(){return this._maxListeners},P.prototype.event="",P.prototype.once=function(y,g,w){return this._once(y,g,!1,w)},P.prototype.prependOnceListener=function(y,g,w){return this._once(y,g,!0,w)},P.prototype._once=function(y,g,w,E){return this._many(y,1,g,w,E)},P.prototype.many=function(y,g,w,E){return this._many(y,g,w,!1,E)},P.prototype.prependMany=function(y,g,w,E){return this._many(y,g,w,!0,E)},P.prototype._many=function(y,g,w,E,S){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function k(){return--g===0&&M.off(y,k),w.apply(this,arguments)}return k._origin=w,this._on(y,k,E,S)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],g,w=this.wildcard,E,S,M,k,C;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(g=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(S=y.length,a){for(M=0;M<S;M++)if(typeof y[M]=="symbol"){C=!0;break}}C||(y=y.join(this.delimiter))}var A=arguments.length,N;if(this._all&&this._all.length)for(N=this._all.slice(),M=0,S=N.length;M<S;M++)switch(this.event=y,A){case 1:N[M].call(this,y);break;case 2:N[M].call(this,y,arguments[1]);break;case 3:N[M].call(this,y,arguments[1],arguments[2]);break;default:N[M].apply(this,arguments)}if(w)N=[],ee.call(this,N,g,this.listenerTree,0,S);else if(N=this._events[y],typeof N=="function"){switch(this.event=y,A){case 1:N.call(this);break;case 2:N.call(this,arguments[1]);break;case 3:N.call(this,arguments[1],arguments[2]);break;default:for(E=new Array(A-1),k=1;k<A;k++)E[k-1]=arguments[k];N.apply(this,E)}return!0}else N&&(N=N.slice());if(N&&N.length){if(A>3)for(E=new Array(A-1),k=1;k<A;k++)E[k-1]=arguments[k];for(M=0,S=N.length;M<S;M++)switch(this.event=y,A){case 1:N[M].call(this);break;case 2:N[M].call(this,arguments[1]);break;case 3:N[M].call(this,arguments[1],arguments[2]);break;default:N[M].apply(this,E)}return!0}else if(!this.ignoreErrors&&!this._all&&y==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},P.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],g=this.wildcard,w,E,S,M,k,C;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(g&&(w=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(M=y.length,a){for(k=0;k<M;k++)if(typeof y[k]=="symbol"){E=!0;break}}E||(y=y.join(this.delimiter))}var A=[],N=arguments.length,j;if(this._all)for(k=0,M=this._all.length;k<M;k++)switch(this.event=y,N){case 1:A.push(this._all[k].call(this,y));break;case 2:A.push(this._all[k].call(this,y,arguments[1]));break;case 3:A.push(this._all[k].call(this,y,arguments[1],arguments[2]));break;default:A.push(this._all[k].apply(this,arguments))}if(g?(j=[],ee.call(this,j,w,this.listenerTree,0)):j=this._events[y],typeof j=="function")switch(this.event=y,N){case 1:A.push(j.call(this));break;case 2:A.push(j.call(this,arguments[1]));break;case 3:A.push(j.call(this,arguments[1],arguments[2]));break;default:for(S=new Array(N-1),C=1;C<N;C++)S[C-1]=arguments[C];A.push(j.apply(this,S))}else if(j&&j.length){if(j=j.slice(),N>3)for(S=new Array(N-1),C=1;C<N;C++)S[C-1]=arguments[C];for(k=0,M=j.length;k<M;k++)switch(this.event=y,N){case 1:A.push(j[k].call(this));break;case 2:A.push(j[k].call(this,arguments[1]));break;case 3:A.push(j[k].call(this,arguments[1],arguments[2]));break;default:A.push(j[k].apply(this,S))}}else if(!this.ignoreErrors&&!this._all&&y==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(A)},P.prototype.on=function(y,g,w){return this._on(y,g,!1,w)},P.prototype.prependListener=function(y,g,w){return this._on(y,g,!0,w)},P.prototype.onAny=function(y){return this._onAny(y,!1)},P.prototype.prependAny=function(y){return this._onAny(y,!0)},P.prototype.addListener=P.prototype.on,P.prototype._onAny=function(y,g){if(typeof y!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),g?this._all.unshift(y):this._all.push(y),this},P.prototype._on=function(y,g,w,E){if(typeof y=="function")return this._onAny(y,g),this;if(typeof g!="function")throw new Error("on only accepts instances of Function");this._events||m.call(this);var S=this,M;return E!==r&&(M=W.call(this,y,g,E),g=M[0],S=M[1]),this._newListener&&this.emit("newListener",y,g),this.wildcard?(te.call(this,y,g,w),S):(this._events[y]?(typeof this._events[y]=="function"&&(this._events[y]=[this._events[y]]),w?this._events[y].unshift(g):this._events[y].push(g),!this._events[y].warned&&this._maxListeners>0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=g,S)},P.prototype.off=function(y,g){if(typeof g!="function")throw new Error("removeListener only takes instances of Function");var w,E=[];if(this.wildcard){var S=typeof y=="string"?y.split(this.delimiter):y.slice();if(E=ee.call(this,null,S,this.listenerTree,0),!E)return this}else{if(!this._events[y])return this;w=this._events[y],E.push({_listeners:w})}for(var M=0;M<E.length;M++){var k=E[M];if(w=k._listeners,t(w)){for(var C=-1,A=0,N=w.length;A<N;A++)if(w[A]===g||w[A].listener&&w[A].listener===g||w[A]._origin&&w[A]._origin===g){C=A;break}if(C<0)continue;return this.wildcard?k._listeners.splice(C,1):this._events[y].splice(C,1),w.length===0&&(this.wildcard?delete k._listeners:delete this._events[y]),this._removeListener&&this.emit("removeListener",y,g),this}else(w===g||w.listener&&w.listener===g||w._origin&&w._origin===g)&&(this.wildcard?delete k._listeners:delete this._events[y],this._removeListener&&this.emit("removeListener",y,g))}return this.listenerTree&&yt(this.listenerTree),this},P.prototype.offAny=function(y){var g=0,w=0,E;if(y&&this._all&&this._all.length>0){for(E=this._all,g=0,w=E.length;g<w;g++)if(y===E[g])return E.splice(g,1),this._removeListener&&this.emit("removeListenerAny",y),this}else{if(E=this._all,this._removeListener)for(g=0,w=E.length;g<w;g++)this.emit("removeListenerAny",E[g]);this._all=[]}return this},P.prototype.removeListener=P.prototype.off,P.prototype.removeAllListeners=function(y){if(y===r)return!this._events||m.call(this),this;if(this.wildcard){var g=ee.call(this,null,y,this.listenerTree,0),w,E;if(!g)return this;for(E=0;E<g.length;E++)w=g[E],w._listeners=null;this.listenerTree&&yt(this.listenerTree)}else this._events&&(this._events[y]=null);return this},P.prototype.listeners=function(y){var g=this._events,w,E,S,M,k;if(y===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!g)return[];for(w=h(g),M=w.length,S=[];M-- >0;)E=g[w[M]],typeof E=="function"?S.push(E):S.push.apply(S,E);return S}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var C=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,C,A,k,0),C}return g?(E=g[y],E?typeof E=="function"?[E]:E:[]):[]}},P.prototype.eventNames=function(y){var g=this._events;return this.wildcard?It.call(this,this.listenerTree,[],null,y):g?h(g):[]},P.prototype.listenerCount=function(y){return this.listeners(y).length},P.prototype.hasListeners=function(y){if(this.wildcard){var g=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,g,w,this.listenerTree,0),g.length>0}var E=this._events,S=this._all;return!!(S&&S.length||E&&(y===r?h(E).length:E[y]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(y,g){var w=this,E=typeof g;return E==="number"?g={timeout:g}:E==="function"&&(g={filter:g}),g=I(g,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:B,Promise:q}),fe(g.Promise,function(S,M,k){function C(){var A=g.filter;if(!(A&&!A.apply(w,arguments)))if(w.off(y,C),g.handleError){var N=arguments[0];N?M(N):S(D.apply(null,arguments).slice(1))}else S(D.apply(null,arguments))}k(function(){w.off(y,C)}),w._on(y,C,!1)},{timeout:g.timeout,overload:g.overload})};function Q(y,g,w){w=I(w,{Promise,timeout:0,overload:!1},{Promise:q});var E=w.Promise;return fe(E,function(S,M,k){var C;if(typeof y.addEventListener=="function"){C=function(){S(D.apply(null,arguments))},k(function(){y.removeEventListener(g,C)}),y.addEventListener(g,C,{once:!0});return}var A=function(){N&&y.removeListener("error",N),S(D.apply(null,arguments))},N;g!=="error"&&(N=function(j){y.removeListener(g,A),M(j)},y.once("error",N)),k(function(){N&&y.removeListener("error",N),y.removeListener(g,A)}),y.once(g,A)},{timeout:w.timeout,overload:w.overload})}var Y=P.prototype;if(Object.defineProperties(P,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:Q,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return P});else if(typeof ry=="object")ny.exports=P;else{var ue=new Function("","return this")();ue.EventEmitter2=P}})()});var Fe=O(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.matchAnyPattern=Ln.extractTerms=Ln.repeatedTimeunitPattern=void 0;function Ok(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ln.repeatedTimeunitPattern=Ok;function Dy(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ln.extractTerms=Dy;function Mk(r){return`(?:${Dy(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ln.matchAnyPattern=Mk});var xe=O((Xl,Ql)=>{(function(r,e){typeof Xl=="object"&&typeof Ql!="undefined"?Ql.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Xl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",h="month",m="quarter",_="year",T="date",D="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,I={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("_")},q=function(V,W,P){var Q=String(V);return!Q||Q.length>=W?V:""+Array(W+1-Q.length).join(P)+V},$={s:q,z:function(V){var W=-V.utcOffset(),P=Math.abs(W),Q=Math.floor(P/60),Y=P%60;return(W<=0?"+":"-")+q(Q,2,"0")+":"+q(Y,2,"0")},m:function V(W,P){if(W.date()<P.date())return-V(P,W);var Q=12*(P.year()-W.year())+(P.month()-W.month()),Y=W.clone().add(Q,h),ue=P-Y<0,y=W.clone().add(Q+(ue?-1:1),h);return+(-(Q+(P-Y)/(ue?Y-y:y-Y))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:h,y:_,w:c,d:l,D:T,h:o,m:a,s,ms:n,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},B="en",me={};me[B]=I;var fe=function(V){return V instanceof It},ve=function(V,W,P){var Q;if(!V)return B;if(typeof V=="string")me[V]&&(Q=V),W&&(me[V]=W,Q=V);else{var Y=V.name;me[Y]=V,Q=Y}return!P&&Q&&(B=Q),Q||!P&&B},ee=function(V,W){if(fe(V))return V.clone();var P=typeof W=="object"?W:{};return P.date=V,P.args=arguments,new It(P)},te=$;te.l=ve,te.i=fe,te.w=function(V,W){return ee(V,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var It=function(){function V(P){this.$L=ve(P.locale,null,!0),this.parse(P)}var W=V.prototype;return W.parse=function(P){this.$d=function(Q){var Y=Q.date,ue=Q.utc;if(Y===null)return new Date(NaN);if(te.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var y=Y.match(v);if(y){var g=y[2]-1||0,w=(y[7]||"0").substring(0,3);return ue?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)}}return new Date(Y)}(P),this.$x=P.x||{},this.init()},W.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},W.$utils=function(){return te},W.isValid=function(){return this.$d.toString()!==D},W.isSame=function(P,Q){var Y=ee(P);return this.startOf(Q)<=Y&&Y<=this.endOf(Q)},W.isAfter=function(P,Q){return ee(P)<this.startOf(Q)},W.isBefore=function(P,Q){return this.endOf(Q)<ee(P)},W.$g=function(P,Q,Y){return te.u(P)?this[Q]:this.set(Y,P)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(P,Q){var Y=this,ue=!!te.u(Q)||Q,y=te.p(P),g=function(N,j){var ke=te.w(Y.$u?Date.UTC(Y.$y,j,N):new Date(Y.$y,j,N),Y);return ue?ke:ke.endOf(l)},w=function(N,j){return te.w(Y.toDate()[N].apply(Y.toDate("s"),(ue?[0,0,0,0]:[23,59,59,999]).slice(j)),Y)},E=this.$W,S=this.$M,M=this.$D,k="set"+(this.$u?"UTC":"");switch(y){case _:return ue?g(1,0):g(31,11);case h:return ue?g(1,S):g(0,S+1);case c:var C=this.$locale().weekStart||0,A=(E<C?E+7:E)-C;return g(ue?M-A:M+(6-A),S);case l:case T:return w(k+"Hours",0);case o:return w(k+"Minutes",1);case a:return w(k+"Seconds",2);case s:return w(k+"Milliseconds",3);default:return this.clone()}},W.endOf=function(P){return this.startOf(P,!1)},W.$set=function(P,Q){var Y,ue=te.p(P),y="set"+(this.$u?"UTC":""),g=(Y={},Y[l]=y+"Date",Y[T]=y+"Date",Y[h]=y+"Month",Y[_]=y+"FullYear",Y[o]=y+"Hours",Y[a]=y+"Minutes",Y[s]=y+"Seconds",Y[n]=y+"Milliseconds",Y)[ue],w=ue===l?this.$D+(Q-this.$W):Q;if(ue===h||ue===_){var E=this.clone().set(T,1);E.$d[g](w),E.init(),this.$d=E.set(T,Math.min(this.$D,E.daysInMonth())).$d}else g&&this.$d[g](w);return this.init(),this},W.set=function(P,Q){return this.clone().$set(P,Q)},W.get=function(P){return this[te.p(P)]()},W.add=function(P,Q){var Y,ue=this;P=Number(P);var y=te.p(Q),g=function(S){var M=ee(ue);return te.w(M.date(M.date()+Math.round(S*P)),ue)};if(y===h)return this.set(h,this.$M+P);if(y===_)return this.set(_,this.$y+P);if(y===l)return g(1);if(y===c)return g(7);var w=(Y={},Y[a]=e,Y[o]=t,Y[s]=r,Y)[y]||1,E=this.$d.getTime()+P*w;return te.w(E,this)},W.subtract=function(P,Q){return this.add(-1*P,Q)},W.format=function(P){var Q=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||D;var ue=P||"YYYY-MM-DDTHH:mm:ssZ",y=te.z(this),g=this.$H,w=this.$m,E=this.$M,S=Y.weekdays,M=Y.months,k=function(j,ke,ye,ce){return j&&(j[ke]||j(Q,ue))||ye[ke].substr(0,ce)},C=function(j){return te.s(g%12||12,j,"0")},A=Y.meridiem||function(j,ke,ye){var ce=j<12?"AM":"PM";return ye?ce.toLowerCase():ce},N={YY:String(this.$y).slice(-2),YYYY:this.$y,M:E+1,MM:te.s(E+1,2,"0"),MMM:k(Y.monthsShort,E,M,3),MMMM:k(M,E),D:this.$D,DD:te.s(this.$D,2,"0"),d:String(this.$W),dd:k(Y.weekdaysMin,this.$W,S,2),ddd:k(Y.weekdaysShort,this.$W,S,3),dddd:S[this.$W],H:String(g),HH:te.s(g,2,"0"),h:C(1),hh:C(2),a:A(g,w,!0),A:A(g,w,!1),m:String(w),mm:te.s(w,2,"0"),s:String(this.$s),ss:te.s(this.$s,2,"0"),SSS:te.s(this.$ms,3,"0"),Z:y};return ue.replace(R,function(j,ke){return ke||N[j]||y.replace(":","")})},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(P,Q,Y){var ue,y=te.p(Q),g=ee(P),w=(g.utcOffset()-this.utcOffset())*e,E=this-g,S=te.m(this,g);return S=(ue={},ue[_]=S/12,ue[h]=S,ue[m]=S/3,ue[c]=(E-w)/6048e5,ue[l]=(E-w)/864e5,ue[o]=E/t,ue[a]=E/e,ue[s]=E/r,ue)[y]||E,Y?S:te.a(S)},W.daysInMonth=function(){return this.endOf(h).$D},W.$locale=function(){return me[this.$L]},W.locale=function(P,Q){if(!P)return this.$L;var Y=this.clone(),ue=ve(P,Q,!0);return ue&&(Y.$L=ue),Y},W.clone=function(){return te.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},V}(),yt=It.prototype;return ee.prototype=yt,[["$ms",n],["$s",s],["$m",a],["$H",o],["$W",l],["$M",h],["$y",_],["$D",T]].forEach(function(V){yt[V[1]]=function(W){return this.$g(W,V[0],V[1])}}),ee.extend=function(V,W){return V.$i||(V(W,It,ee),V.$i=!0),ee},ee.locale=ve,ee.isDayjs=fe,ee.unix=function(V){return ee(1e3*V)},ee.en=me[B],ee.Ls=me,ee.p={},ee})});var At=O(Yn=>{"use strict";var Rk=Yn&&Yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.findYearClosestToRef=Yn.findMostLikelyADYear=void 0;var xk=Rk(xe());function Pk(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Yn.findMostLikelyADYear=Pk;function Ak(r,e,t){let n=xk.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n))<Math.abs(s.diff(n))?s=a:Math.abs(o.diff(n))<Math.abs(s.diff(n))&&(s=o),s.year()}Yn.findYearClosestToRef=Ak});var Nt=O(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.parseTimeUnits=_e.TIME_UNITS_PATTERN=_e.parseYear=_e.YEAR_PATTERN=_e.parseOrdinalNumberPattern=_e.ORDINAL_NUMBER_PATTERN=_e.parseNumberPattern=_e.NUMBER_PATTERN=_e.TIME_UNIT_DICTIONARY=_e.ORDINAL_WORD_DICTIONARY=_e.INTEGER_WORD_DICTIONARY=_e.MONTH_DICTIONARY=_e.FULL_MONTH_NAME_DICTIONARY=_e.WEEKDAY_DICTIONARY=void 0;var Yo=Fe(),Nk=At();_e.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};_e.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};_e.MONTH_DICTIONARY=Object.assign(Object.assign({},_e.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});_e.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};_e.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};_e.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"};_e.NUMBER_PATTERN=`(?:${Yo.matchAnyPattern(_e.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 Oy(r){let e=r.toLowerCase();return _e.INTEGER_WORD_DICTIONARY[e]!==void 0?_e.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)}_e.parseNumberPattern=Oy;_e.ORDINAL_NUMBER_PATTERN=`(?:${Yo.matchAnyPattern(_e.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Ck(r){let e=r.toLowerCase();return _e.ORDINAL_WORD_DICTIONARY[e]!==void 0?_e.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}_e.parseOrdinalNumberPattern=Ck;_e.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 Ik(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 Nk.findMostLikelyADYear(e)}_e.parseYear=Ik;var My=`(${_e.NUMBER_PATTERN})\\s{0,3}(${Yo.matchAnyPattern(_e.TIME_UNIT_DICTIONARY)})`,Sy=new RegExp(My,"i");_e.TIME_UNITS_PATTERN=Yo.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",My);function Fk(r){let e={},t=r,n=Sy.exec(t);for(;n;)Lk(e,n),t=t.substring(n[0].length).trim(),n=Sy.exec(t);return e}_e.parseTimeUnits=Fk;function Lk(r,e){let t=Oy(e[1]),n=_e.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ry=O((Jl,ec)=>{(function(r,e){typeof Jl=="object"&&typeof ec!="undefined"?ec.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Jl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var h=this.$utils(),m=!!h.u(c)||c;if(h.p(l)===e){var _=this.quarter()-1;return m?this.month(3*_).startOf(r).startOf("day"):this.month(3*_+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var _r=O(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.implySimilarTime=qr.assignSimilarTime=qr.assignSimilarDate=qr.assignTheNextDay=void 0;var xy=mt();function Yk(r,e){e=e.add(1,"day"),Py(r,e),Ay(r,e)}qr.assignTheNextDay=Yk;function Py(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}qr.assignSimilarDate=Py;function Uk(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",xy.Meridiem.AM):r.assign("meridiem",xy.Meridiem.PM)}qr.assignSimilarTime=Uk;function Ay(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}qr.implySimilarTime=Ay});var Ny=O(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.toTimezoneOffset=hs.TIMEZONE_ABBR_MAP=void 0;hs.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 Wk(r){var e;return r==null?null:typeof r=="number"?r:(e=hs.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}hs.toTimezoneOffset=Wk});var rt=O(jr=>{"use strict";var Cy=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var qk=Cy(Ry()),Uo=Cy(xe()),tc=_r(),jk=Ny();Uo.default.extend(qk.default);var rc=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=jk.toTimezoneOffset(e.timezone))}};jr.ReferenceWithTimezone=rc;var ps=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=Uo.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 ps(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 Uo.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 s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Uo.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new ps(e);return t.hour||t.minute||t.second?(tc.assignSimilarTime(s,n),tc.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(tc.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};jr.ParsingComponents=ps;var ea=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new ps(e),this.end=a}clone(){let e=new ea(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}', ...}]`}};jr.ParsingResult=ea});var Z=O(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.AbstractParserWithWordBoundaryChecking=void 0;var nc=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 s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a<t.length;a++)t[a-1]=t[a];return this.innerExtract(e,t)}};Wo.AbstractParserWithWordBoundaryChecking=nc});var Iy=O(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var ic=Nt(),$k=rt(),Bk=Z(),Gk=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Hk=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),sc=class extends Bk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Hk:Gk}innerExtract(e,t){let n=ic.parseTimeUnits(t[1]);return $k.ParsingComponents.createRelativeFromReference(e.reference,n)}};ac.default=sc});var qy=O(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var zk=At(),Uy=Nt(),Wy=Nt(),qo=Nt(),Vk=Fe(),Kk=Z(),Zk=new RegExp(`(?:on\\s{0,3})?(${qo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${qo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Vk.matchAnyPattern(Uy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Wy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Fy=1,Ly=2,Xk=3,Yy=4,oc=class extends Kk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Uy.MONTH_DICTIONARY[t[Xk].toLowerCase()],a=qo.parseOrdinalNumberPattern(t[Fy]);if(a>31)return t.index=t.index+t[Fy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Yy]){let o=Wy.parseYear(t[Yy]);n.start.assign("year",o)}else{let o=zk.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Ly]){let o=qo.parseOrdinalNumberPattern(t[Ly]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};uc.default=oc});var Hy=O(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var Qk=At(),By=Nt(),jo=Nt(),Gy=Nt(),Jk=Fe(),eD=Z(),tD=new RegExp(`(${Jk.matchAnyPattern(By.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${jo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${jo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Gy.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),rD=1,nD=2,jy=3,$y=4,lc=class extends eD.AbstractParserWithWordBoundaryChecking{innerPattern(){return tD}innerExtract(e,t){let n=By.MONTH_DICTIONARY[t[rD].toLowerCase()],s=jo.parseOrdinalNumberPattern(t[nD]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[$y]){let c=Gy.parseYear(t[$y]);a.assign("year",c)}else{let c=Qk.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[jy])return a;let o=jo.parseOrdinalNumberPattern(t[jy]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};cc.default=lc});var Ky=O(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var dc=Nt(),sD=At(),iD=Fe(),Vy=Nt(),aD=Z(),oD=new RegExp(`((?:in)\\s*)?(${iD.matchAnyPattern(dc.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Vy.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),uD=1,lD=2,zy=3,fc=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return oD}innerExtract(e,t){let n=t[lD].toLowerCase();if(t[0].length<=3&&!dc.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[uD]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=dc.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[zy]){let o=Vy.parseYear(t[zy]);s.start.assign("year",o)}else{let o=sD.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};hc.default=fc});var Qy=O(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var Xy=Nt(),cD=Fe(),dD=Z(),fD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${cD.matchAnyPattern(Xy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),hD=1,pD=2,Zy=3,mD=4,pc=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return fD}innerExtract(e,t){let n=t[Zy]?parseInt(t[Zy]):Xy.MONTH_DICTIONARY[t[pD].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[hD]);return{day:parseInt(t[mD]),month:n,year:s}}};mc.default=pc});var Jy=O(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var yD=Z(),gD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),_D=1,TD=2,yc=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return gD}innerExtract(e,t){let n=parseInt(t[TD]),s=parseInt(t[_D]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};gc.default=yc});var ms=O(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.AbstractTimeExpressionParser=void 0;var zt=mt();function bD(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 vD(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 eg=2,Ks=3,$o=4,Bo=5,ta=6,_c=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 s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),h=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&h&&h[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!h||h[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,h,o),o.end&&(o.text+=h[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[eg]);if(l>100){if(this.strictMode||t[Ks]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Ks]!=null){if(t[Ks].length==1&&!t[ta])return null;a=parseInt(t[Ks])}if(a>=60)return null;if(l>12&&(o=zt.Meridiem.PM),t[ta]!=null){if(l>12)return null;let c=t[ta][0].toLowerCase();c=="a"&&(o=zt.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=zt.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",zt.Meridiem.AM):s.imply("meridiem",zt.Meridiem.PM),t[Bo]!=null){let c=parseInt(t[Bo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[$o]!=null){let c=parseInt(t[$o]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Bo]!=null){let c=parseInt(t[Bo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[$o]!=null){let c=parseInt(t[$o]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[eg]),o=0,l=-1;if(t[Ks]!=null?o=parseInt(t[Ks]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=zt.Meridiem.PM),t[ta]!=null){if(a>12)return null;let c=t[ta][0].toLowerCase();c=="a"&&(l=zt.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=zt.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==zt.Meridiem.AM?(n.start.imply("meridiem",zt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",zt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",zt.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",zt.Meridiem.PM)):a>12?s.imply("meridiem",zt.Meridiem.PM):a<=12&&s.imply("meridiem",zt.Meridiem.AM),s.date().getTime()<n.start.date().getTime()&&s.imply("day",s.get("day")+1),s}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let n=t[1];if(this.strictMode||n.includes(".")&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>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],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=bD(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=vD(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Go.AbstractTimeExpressionParser=_c});var tg=O(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Ho=mt(),wD=ms(),Tc=class extends wD.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ho.Meridiem.PM)):s<6&&n.assign("meridiem",Ho.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Ho.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Ho.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};bc.default=Tc});var Tr=O(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.addImpliedTimeUnits=Zs.reverseTimeUnits=void 0;function ED(r){let e={};for(let t in r)e[t]=-r[t];return e}Zs.reverseTimeUnits=ED;function kD(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);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}Zs.addImpliedTimeUnits=kD});var rg=O(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var wc=Nt(),DD=rt(),SD=Z(),OD=Tr(),MD=new RegExp(`(${wc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),RD=new RegExp(`(${wc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),vc=class extends SD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?RD:MD}innerExtract(e,t){let n=wc.parseTimeUnits(t[1]),s=OD.reverseTimeUnits(n);return DD.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ec.default=vc});var ng=O(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var Dc=Nt(),xD=rt(),PD=Z(),AD=new RegExp(`(${Dc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),ND=new RegExp("("+Dc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),CD=1,kc=class extends PD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ND:AD}innerExtract(e,t){let n=Dc.parseTimeUnits(t[CD]);return xD.ParsingComponents.createRelativeFromReference(e.reference,n)}};Sc.default=kc});var Qs=O(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.MergingRefiner=Xs.Filter=void 0;var Oc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Xs.Filter=Oc;var Mc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o<t.length;o++){a=t[o];let l=e.text.substring(s.index+s.text.length,a.index);if(!this.shouldMergeResults(l,s,a,e))n.push(s),s=a;else{let c=s,h=a,m=this.mergeResults(l,c,h,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${c} and ${h} into ${m}`)}),s=m}}return s!=null&&n.push(s),n}};Xs.MergingRefiner=Mc});var $r=O(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var ID=Qs(),Rc=class extends ID.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(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index<n.index?s.text=t.text+e+n.text:s.text=n.text+e+t.text,s}};xc.default=Rc});var sg=O(ra=>{"use strict";var FD=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var LD=FD($r()),Pc=class extends LD.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ra.default=Pc});var ig=O(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.mergeDateTimeComponent=Js.mergeDateTimeResult=void 0;var YD=mt();function UD(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=Ac(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=Ac(a,o);r.end==null&&l.date().getTime()<t.start.date().getTime()&&(l.isCertain("day")?l.assign("day",l.get("day")+1):l.imply("day",l.get("day")+1)),t.end=l}return t}Js.mergeDateTimeResult=UD;function Ac(r,e){let t=r.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==YD.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Js.mergeDateTimeComponent=Ac});var un=O(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var WD=Qs(),ag=ig(),Nc=class extends WD.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 s=t.start.isOnlyDate()?ag.mergeDateTimeResult(t,n):ag.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};Cc.default=Nc});var og=O(na=>{"use strict";var qD=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var jD=qD(un()),Ic=class extends jD.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};na.default=Ic});var ug=O(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var $D=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),BD={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},Fc=class{constructor(e){this.timezone=Object.assign(Object.assign({},BD),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),h=$D.exec(c);if(!h)return;let m=h[1].toUpperCase(),_=(l=(o=s[m])!==null&&o!==void 0?o:this.timezone[m])!==null&&l!==void 0?l:null;if(_===null)return;e.debug(()=>{console.log(`Extracting timezone: '${m}' into: ${_} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&_!=T&&(a.start.isCertain("timezoneOffset")||m!=h[1])||a.start.isOnlyDate()&&m!=h[1]||(a.text+=h[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",_),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",_))}),t}};Lc.default=Fc});var zo=O(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var GD=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),HD=1,zD=2,VD=3,Yc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=GD.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[zD]),l=parseInt(a[VD]||"0"),c=o*60+l;c>14*60||(a[HD]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};Uc.default=Yc});var lg=O(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var Wc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;a<t.length;a++){let o=t[a];o.index<s.index+s.text.length?o.text.length>s.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};qc.default=Wc});var cg=O(sa=>{"use strict";var KD=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var ZD=KD(xe()),jc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=ZD.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)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()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};sa.default=jc});var dg=O(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var XD=Qs(),$c=class extends XD.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}};Bc.default=$c});var zc=O(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var QD=Z(),JD=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"),eS=1,tS=2,rS=3,fg=4,nS=5,hg=6,pg=7,mg=8,yg=9,Gc=class extends QD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){let n={};if(n.year=parseInt(t[eS]),n.month=parseInt(t[tS]),n.day=parseInt(t[rS]),t[fg]!=null)if(n.hour=parseInt(t[fg]),n.minute=parseInt(t[nS]),t[hg]!=null&&(n.second=parseInt(t[hg])),t[pg]!=null&&(n.millisecond=parseInt(t[pg])),t[mg]==null)n.timezoneOffset=0;else{let s=parseInt(t[mg]),a=0;t[yg]!=null&&(a=parseInt(t[yg]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};Hc.default=Gc});var gg=O(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var sS=Qs(),Vc=class extends sS.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Kc.default=Vc});var ln=O(ei=>{"use strict";var ys=ei&&ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ei,"__esModule",{value:!0});ei.includeCommonConfiguration=void 0;var iS=ys(ug()),aS=ys(zo()),_g=ys(lg()),oS=ys(cg()),uS=ys(dg()),lS=ys(zc()),cS=ys(gg());function dS(r,e=!1){return r.parsers.unshift(new lS.default),r.refiners.unshift(new cS.default),r.refiners.unshift(new iS.default),r.refiners.unshift(new aS.default),r.refiners.unshift(new _g.default),r.refiners.push(new _g.default),r.refiners.push(new oS.default),r.refiners.push(new uS.default(e)),r}ei.includeCommonConfiguration=dS});var dn=O(Ce=>{"use strict";var fS=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.noon=Ce.morning=Ce.midnight=Ce.yesterdayEvening=Ce.evening=Ce.lastNight=Ce.tonight=Ce.theDayAfter=Ce.tomorrow=Ce.theDayBefore=Ce.yesterday=Ce.today=Ce.now=void 0;var Br=rt(),ti=fS(xe()),cn=_r(),ia=mt();function hS(r){let e=ti.default(r.instant),t=new Br.ParsingComponents(r,{});return cn.assignSimilarDate(t,e),cn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ce.now=hS;function pS(r){let e=ti.default(r.instant),t=new Br.ParsingComponents(r,{});return cn.assignSimilarDate(t,e),cn.implySimilarTime(t,e),t}Ce.today=pS;function mS(r){return Tg(r,1)}Ce.yesterday=mS;function Tg(r,e){return Zc(r,-e)}Ce.theDayBefore=Tg;function yS(r){return Zc(r,1)}Ce.tomorrow=yS;function Zc(r,e){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t=t.add(e,"day"),cn.assignSimilarDate(n,t),cn.implySimilarTime(n,t),n}Ce.theDayAfter=Zc;function gS(r,e=22){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ia.Meridiem.PM),cn.assignSimilarDate(n,t),n}Ce.tonight=gS;function _S(r,e=0){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),cn.assignSimilarDate(n,t),n.imply("hour",e),n}Ce.lastNight=_S;function TS(r,e=20){let t=new Br.ParsingComponents(r,{});return t.imply("meridiem",ia.Meridiem.PM),t.imply("hour",e),t}Ce.evening=TS;function bS(r,e=20){let t=ti.default(r.instant),n=new Br.ParsingComponents(r,{});return t=t.add(-1,"day"),cn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ia.Meridiem.PM),n}Ce.yesterdayEvening=bS;function vS(r){let e=new Br.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ce.midnight=vS;function wS(r,e=6){let t=new Br.ParsingComponents(r,{});return t.imply("meridiem",ia.Meridiem.AM),t.imply("hour",e),t}Ce.morning=wS;function ES(r){let e=new Br.ParsingComponents(r,{});return e.imply("meridiem",ia.Meridiem.AM),e.imply("hour",12),e}Ce.noon=ES});var bg=O(Rr=>{"use strict";var kS=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]}),DS=Rr&&Rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SS=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)&&kS(e,r,t);return DS(e,r),e},OS=Rr&&Rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rr,"__esModule",{value:!0});var MS=OS(xe()),RS=Z(),xS=_r(),aa=SS(dn()),PS=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Xc=class extends RS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return PS}innerExtract(e,t){let n=MS.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return aa.now(e.reference);case"today":return aa.today(e.reference);case"yesterday":return aa.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return aa.tomorrow(e.reference);case"tonight":return aa.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),xS.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Rr.default=Xc});var vg=O(oa=>{"use strict";var AS=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var Vo=mt(),NS=Z(),CS=AS(xe()),IS=_r(),FS=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Qc=class extends NS.AbstractParserWithWordBoundaryChecking{innerPattern(){return FS}innerExtract(e,t){let n=CS.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",Vo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",Vo.Meridiem.PM),s.imply("hour",20);break;case"midnight":IS.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",Vo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",Vo.Meridiem.AM),s.imply("hour",12);break}return s}};oa.default=Qc});var gs=O(Un=>{"use strict";var LS=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.toDayJSClosestWeekday=Un.toDayJSWeekday=void 0;var wg=LS(xe());function YS(r,e,t){if(!t)return Eg(r,e);let n=wg.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Un.toDayJSWeekday=YS;function Eg(r,e){let t=wg.default(r),n=t.day();return Math.abs(e-7-n)<Math.abs(e-n)?t=t.day(e-7):Math.abs(e+7-n)<Math.abs(e-n)?t=t.day(e+7):t=t.day(e),t}Un.toDayJSClosestWeekday=Eg});var Dg=O(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var kg=Nt(),US=Fe(),WS=Z(),qS=gs(),jS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${US.matchAnyPattern(kg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),$S=1,BS=2,GS=3,Jc=class extends WS.AbstractParserWithWordBoundaryChecking{innerPattern(){return jS}innerExtract(e,t){let n=t[BS].toLowerCase(),s=kg.WEEKDAY_DICTIONARY[n],a=t[$S],o=t[GS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let h=qS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};ed.default=Jc});var Mg=O(ua=>{"use strict";var HS=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var Og=Nt(),Sg=rt(),zS=HS(xe()),VS=Z(),KS=Fe(),ZS=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${KS.matchAnyPattern(Og.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),XS=1,QS=2,td=class extends VS.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZS}innerExtract(e,t){let n=t[XS].toLowerCase(),s=t[QS].toLowerCase(),a=Og.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,Sg.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,Sg.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=zS.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ua.default=td});var xr=O(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ParsingContext=si.Chrono=void 0;var ri=rt(),JS=rd(),ni=class{constructor(e){e=e||JS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new ni({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new Ko(e,t,n),a=[];return this.parsers.forEach(o=>{let l=ni.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let h=t.extract(e,l);if(!h){o=a.substring(l.index+1),l=s.exec(o);continue}let m=null;h instanceof ri.ParsingResult?m=h:h instanceof ri.ParsingComponents?(m=e.createParsingResult(l.index,l[0]),m.start=h):m=e.createParsingResult(l.index,l[0],h),e.debug(()=>console.log(`${t.constructor.name} extracted result ${m}`)),n.push(m),o=a.substring(c+m.text.length),l=s.exec(o)}return n}};si.Chrono=ni;var Ko=class{constructor(e,t,n){this.text=e,this.reference=new ri.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ri.ParsingComponents?e:new ri.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new ri.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};si.ParsingContext=Ko});var _s=O(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var Rg=At(),eO=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"),Zo=1,xg=5,Pg=2,Ag=3,nd=4,sd=class{constructor(e){this.groupNumberMonth=e?Ag:Pg,this.groupNumberDay=e?Pg:Ag}pattern(){return eO}extract(e,t){if(t[Zo]=="/"||t[xg]=="/"){t.index+=t[0].length;return}let n=t.index+t[Zo].length,s=t[0].substr(t[Zo].length,t[0].length-t[Zo].length-t[xg].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[nd]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[nd]){let c=parseInt(t[nd]),h=Rg.findMostLikelyADYear(c);a.start.assign("year",h)}else{let c=Rg.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};id.default=sd});var Cg=O(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Ng=Nt(),tO=rt(),rO=Z(),nO=Tr(),sO=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Ng.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ad=class extends rO.AbstractParserWithWordBoundaryChecking{innerPattern(){return sO}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ng.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=nO.reverseTimeUnits(s);break}return tO.ParsingComponents.createRelativeFromReference(e.reference,s)}};od.default=ad});var Fg=O(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var iO=Qs(),ud=rt(),aO=Nt(),oO=Tr();function Ig(r){return r.text.match(/\s+(before|from)$/i)!=null}function uO(r){return r.text.match(/\s+(after|since)$/i)!=null}var ld=class extends iO.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Ig(t)&&!uO(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=aO.parseTimeUnits(t.text);Ig(t)&&(s=oO.reverseTimeUnits(s));let a=ud.ParsingComponents.createRelativeFromReference(new ud.ReferenceWithTimezone(n.start.date()),s);return new ud.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};cd.default=ld});var rd=O(lt=>{"use strict";var vt=lt&<.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lt,"__esModule",{value:!0});lt.createConfiguration=lt.createCasualConfiguration=lt.parseDate=lt.parse=lt.GB=lt.strict=lt.casual=void 0;var lO=vt(Iy()),cO=vt(qy()),dO=vt(Hy()),fO=vt(Ky()),hO=vt(Qy()),pO=vt(Jy()),mO=vt(tg()),yO=vt(rg()),gO=vt(ng()),_O=vt(sg()),TO=vt(og()),bO=ln(),vO=vt(bg()),wO=vt(vg()),EO=vt(Dg()),kO=vt(Mg()),dd=xr(),DO=vt(_s()),SO=vt(Cg()),OO=vt(Fg());lt.casual=new dd.Chrono(Lg(!1));lt.strict=new dd.Chrono(Xo(!0,!1));lt.GB=new dd.Chrono(Xo(!1,!0));function MO(r,e,t){return lt.casual.parse(r,e,t)}lt.parse=MO;function RO(r,e,t){return lt.casual.parseDate(r,e,t)}lt.parseDate=RO;function Lg(r=!1){let e=Xo(!1,r);return e.parsers.unshift(new vO.default),e.parsers.unshift(new wO.default),e.parsers.unshift(new fO.default),e.parsers.unshift(new kO.default),e.parsers.unshift(new SO.default),e}lt.createCasualConfiguration=Lg;function Xo(r=!0,e=!1){return bO.includeCommonConfiguration({parsers:[new DO.default(e),new lO.default,new cO.default,new dO.default,new EO.default,new hO.default,new pO.default,new mO.default(r),new yO.default(r),new gO.default(r)],refiners:[new OO.default,new TO.default,new _O.default]},r)}lt.createConfiguration=Xo});var Yg=O(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var xO=ms(),fd=class extends xO.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)}};hd.default=fd});var la=O(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parseTimeUnits=Ue.TIME_UNITS_PATTERN=Ue.parseYear=Ue.YEAR_PATTERN=Ue.parseNumberPattern=Ue.NUMBER_PATTERN=Ue.TIME_UNIT_DICTIONARY=Ue.INTEGER_WORD_DICTIONARY=Ue.MONTH_DICTIONARY=Ue.WEEKDAY_DICTIONARY=void 0;var pd=Fe(),PO=At();Ue.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};Ue.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};Ue.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};Ue.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"};Ue.NUMBER_PATTERN=`(?:${pd.matchAnyPattern(Ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Wg(r){let e=r.toLowerCase();return Ue.INTEGER_WORD_DICTIONARY[e]!==void 0?Ue.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)}Ue.parseNumberPattern=Wg;Ue.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 AO(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 PO.findMostLikelyADYear(e)}Ue.parseYear=AO;var qg=`(${Ue.NUMBER_PATTERN})\\s{0,5}(${pd.matchAnyPattern(Ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ug=new RegExp(qg,"i");Ue.TIME_UNITS_PATTERN=pd.repeatedTimeunitPattern("",qg);function NO(r){let e={},t=r,n=Ug.exec(t);for(;n;)CO(e,n),t=t.substring(n[0].length),n=Ug.exec(t);return e}Ue.parseTimeUnits=NO;function CO(r,e){let t=Wg(e[1]),n=Ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var $g=O(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var jg=la(),IO=Fe(),FO=Z(),LO=gs(),YO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${IO.matchAnyPattern(jg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),UO=1,WO=3,qO=2,md=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return YO}innerExtract(e,t){let n=t[qO].toLowerCase(),s=jg.WEEKDAY_DICTIONARY[n],a=t[UO],o=t[WO],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let h=LO.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};yd.default=md});var zg=O(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var Wn=mt(),jO=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"),$O=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"),BO=2,Bg=3,Gg=4,Hg=5,ii=class{pattern(e){return jO}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 s=e.text.substring(t.index+t[0].length),a=$O.exec(s);return a&&(n.end=ii.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[BO]),t[Bg]!=null&&(s=parseInt(t[Bg])),s>=60||n>24)return null;if(n>=12&&(a=Wn.Meridiem.PM),t[Hg]!=null){if(n>12)return null;let o=t[Hg].toLowerCase();o.match(/morgen|vormittag/)&&(a=Wn.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Wn.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Wn.Meridiem.AM,n=0):n<6?a=Wn.Meridiem.AM:(a=Wn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Wn.Meridiem.AM):e.imply("meridiem",Wn.Meridiem.PM),t[Gg]!=null){let o=parseInt(t[Gg]);if(o>=60)return null;e.assign("second",o)}return e}};gd.default=ii});var Vg=O(ca=>{"use strict";var GO=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var HO=GO($r()),_d=class extends HO.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ca.default=_d});var Kg=O(da=>{"use strict";var zO=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var VO=zO(un()),Td=class extends VO.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};da.default=Td});var bd=O(ha=>{"use strict";var KO=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var ZO=KO(xe()),Ts=mt(),XO=Z(),QO=_r(),JO=Tr(),fa=class extends XO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=ZO.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return QO.implySimilarTime(a,n),fa.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=JO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Ts.Meridiem.AM);break}return e}};ha.default=fa});var Qg=O(Pr=>{"use strict";var eM=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]}),tM=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rM=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)&&eM(e,r,t);return tM(e,r),e},Xg=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var nM=Xg(xe()),sM=Z(),bs=_r(),iM=Xg(bd()),Zg=rM(dn()),aM=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),oM=1,uM=2,vd=class extends sM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return aM}innerExtract(e,t){let n=nM.default(e.refDate),s=(t[oM]||"").toLowerCase(),a=(t[uM]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=Zg.now(e.reference);break;case"heute":o=Zg.today(e.reference);break;case"morgen":bs.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),bs.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),bs.assignSimilarDate(o,n),bs.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),bs.assignSimilarDate(o,n),bs.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),bs.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=iM.default.extractTimeComponents(o,a)),o}};Pr.default=vd});var s_=O(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var lM=At(),r_=la(),n_=la(),cM=Fe(),dM=Z(),fM=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${cM.matchAnyPattern(r_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${n_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Jg=1,e_=2,hM=3,t_=4,wd=class extends dM.AbstractParserWithWordBoundaryChecking{innerPattern(){return fM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=r_.MONTH_DICTIONARY[t[hM].toLowerCase()],a=parseInt(t[Jg]);if(a>31)return t.index=t.index+t[Jg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[t_]){let o=n_.parseYear(t[t_]);n.start.assign("year",o)}else{let o=lM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[e_]){let o=parseInt(t[e_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ed.default=wd});var i_=O(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var Qo=la(),pM=rt(),mM=Z(),yM=Tr(),gM=Fe(),kd=class extends mM.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*)?(${Qo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${gM.matchAnyPattern(Qo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Qo.parseNumberPattern(t[2]):1,s=Qo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=yM.reverseTimeUnits(a)),pM.ParsingComponents.createRelativeFromReference(e.reference,a)}};Dd.default=kd});var u_=O(wt=>{"use strict";var Ar=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var _M=ln(),a_=xr(),TM=Ar(_s()),bM=Ar(zc()),vM=Ar(Yg()),wM=Ar($g()),EM=Ar(zg()),kM=Ar(Vg()),DM=Ar(Kg()),SM=Ar(Qg()),OM=Ar(bd()),MM=Ar(s_()),RM=Ar(i_());wt.casual=new a_.Chrono(o_());wt.strict=new a_.Chrono(Sd(!0));function xM(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=xM;function PM(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=PM;function o_(r=!0){let e=Sd(!1,r);return e.parsers.unshift(new OM.default),e.parsers.unshift(new SM.default),e.parsers.unshift(new RM.default),e}wt.createCasualConfiguration=o_;function Sd(r=!0,e=!0){return _M.includeCommonConfiguration({parsers:[new bM.default,new TM.default(e),new vM.default,new EM.default,new MM.default,new wM.default],refiners:[new kM.default,new DM.default]},r)}wt.createConfiguration=Sd});var c_=O(Nr=>{"use strict";var AM=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]}),NM=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)&&AM(e,r,t);return NM(e,r),e},IM=Nr&&Nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nr,"__esModule",{value:!0});var FM=IM(xe()),LM=mt(),YM=Z(),l_=_r(),Jo=CM(dn()),Od=class extends YM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=FM.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Jo.now(e.reference);case"aujourd'hui":return Jo.today(e.reference);case"hier":return Jo.yesterday(e.reference);case"demain":return Jo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(l_.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",LM.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),l_.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Nr.default=Od});var d_=O(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var pa=mt(),UM=Z(),Md=class extends UM.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(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",pa.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",pa.Meridiem.AM);break}return s}};Rd.default=Md});var f_=O(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});var WM=ms(),xd=class extends WM.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)}};Pd.default=xd});var h_=O(ma=>{"use strict";var qM=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var jM=qM(un()),Ad=class extends jM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ma.default=Ad});var p_=O(ya=>{"use strict";var $M=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var BM=$M($r()),Nd=class extends BM.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ya.default=Nd});var qn=O(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.parseTimeUnits=Pe.TIME_UNITS_PATTERN=Pe.parseYear=Pe.YEAR_PATTERN=Pe.parseOrdinalNumberPattern=Pe.ORDINAL_NUMBER_PATTERN=Pe.parseNumberPattern=Pe.NUMBER_PATTERN=Pe.TIME_UNIT_DICTIONARY=Pe.INTEGER_WORD_DICTIONARY=Pe.MONTH_DICTIONARY=Pe.WEEKDAY_DICTIONARY=void 0;var Cd=Fe();Pe.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};Pe.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};Pe.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};Pe.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"};Pe.NUMBER_PATTERN=`(?:${Cd.matchAnyPattern(Pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function y_(r){let e=r.toLowerCase();return Pe.INTEGER_WORD_DICTIONARY[e]!==void 0?Pe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Pe.parseNumberPattern=y_;Pe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function GM(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Pe.parseOrdinalNumberPattern=GM;Pe.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 HM(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}Pe.parseYear=HM;var g_=`(${Pe.NUMBER_PATTERN})\\s{0,5}(${Cd.matchAnyPattern(Pe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,m_=new RegExp(g_,"i");Pe.TIME_UNITS_PATTERN=Cd.repeatedTimeunitPattern("",g_);function zM(r){let e={},t=r,n=m_.exec(t);for(;n;)VM(e,n),t=t.substring(n[0].length),n=m_.exec(t);return e}Pe.parseTimeUnits=zM;function VM(r,e){let t=y_(e[1]),n=Pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var T_=O(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var __=qn(),KM=Fe(),ZM=Z(),XM=gs(),QM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${KM.matchAnyPattern(__.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),JM=1,eR=2,Id=class extends ZM.AbstractParserWithWordBoundaryChecking{innerPattern(){return QM}innerExtract(e,t){let n=t[JM].toLowerCase(),s=__.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[eR];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=XM.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Fd.default=Id});var E_=O(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var ga=mt(),tR=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"),rR=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"),nR=2,b_=3,v_=4,w_=5,ai=class{pattern(e){return tR}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=ai.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=rR.exec(s);return a&&(n.end=ai.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[nR]),t[b_]!=null&&(s=parseInt(t[b_])),s>=60||n>24)return null;if(n>=12&&(a=ga.Meridiem.PM),t[w_]!=null){if(n>12)return null;let o=t[w_][0].toLowerCase();o=="a"&&(a=ga.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=ga.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",ga.Meridiem.AM):e.imply("meridiem",ga.Meridiem.PM),t[v_]!=null){let o=parseInt(t[v_]);if(o>=60)return null;e.assign("second",o)}return e}};Ld.default=ai});var R_=O(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var sR=At(),O_=qn(),M_=qn(),eu=qn(),iR=Fe(),aR=Z(),oR=new RegExp(`(?:on\\s*?)?(${eu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${eu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${iR.matchAnyPattern(O_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${M_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),k_=1,D_=2,uR=3,S_=4,Yd=class extends aR.AbstractParserWithWordBoundaryChecking{innerPattern(){return oR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=O_.MONTH_DICTIONARY[t[uR].toLowerCase()],a=eu.parseOrdinalNumberPattern(t[k_]);if(a>31)return t.index=t.index+t[k_].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[S_]){let o=M_.parseYear(t[S_]);n.start.assign("year",o)}else{let o=sR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[D_]){let o=eu.parseOrdinalNumberPattern(t[D_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ud.default=Yd});var P_=O(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var x_=qn(),lR=rt(),cR=Z(),dR=Tr(),Wd=class extends cR.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${x_.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=x_.parseTimeUnits(t[1]),s=dR.reverseTimeUnits(n);return lR.ParsingComponents.createRelativeFromReference(e.reference,s)}};qd.default=Wd});var N_=O($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});var A_=qn(),fR=rt(),hR=Z(),jd=class extends hR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${A_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=A_.parseTimeUnits(t[1]);return fR.ParsingComponents.createRelativeFromReference(e.reference,n)}};$d.default=jd});var C_=O(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var tu=qn(),pR=rt(),mR=Z(),yR=Tr(),gR=Fe(),Bd=class extends mR.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${tu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${gR.matchAnyPattern(tu.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]?tu.parseNumberPattern(t[1]):1,s=tu.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=yR.reverseTimeUnits(a)),pR.ParsingComponents.createRelativeFromReference(e.reference,a)}};Gd.default=Bd});var L_=O(Et=>{"use strict";var br=Et&&Et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConfiguration=Et.createCasualConfiguration=Et.parseDate=Et.parse=Et.strict=Et.casual=void 0;var _R=ln(),I_=xr(),TR=br(c_()),bR=br(d_()),vR=br(_s()),wR=br(f_()),ER=br(h_()),kR=br(p_()),DR=br(T_()),SR=br(E_()),OR=br(R_()),MR=br(P_()),RR=br(N_()),xR=br(C_());Et.casual=new I_.Chrono(F_());Et.strict=new I_.Chrono(Hd(!0));function PR(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=PR;function AR(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=AR;function F_(r=!0){let e=Hd(!1,r);return e.parsers.unshift(new TR.default),e.parsers.unshift(new bR.default),e.parsers.unshift(new xR.default),e}Et.createCasualConfiguration=F_;function Hd(r=!0,e=!0){return _R.includeCommonConfiguration({parsers:[new vR.default(e),new OR.default,new wR.default,new SR.default,new MR.default,new RR.default,new DR.default],refiners:[new ER.default,new kR.default]},r)}Et.createConfiguration=Hd});var Y_=O(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.toHankaku=void 0;function NR(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,CR)}ru.toHankaku=NR;function CR(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var W_=O(_a=>{"use strict";var IR=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var zd=Y_(),FR=At(),LR=IR(xe()),YR=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,U_=1,UR=2,Vd=3,WR=4,qR=5,jR=6,Kd=class{pattern(){return YR}extract(e,t){let n=parseInt(zd.toHankaku(t[qR])),s=parseInt(zd.toHankaku(t[jR])),a=e.createParsingComponents({day:s,month:n});if(t[U_]&&t[U_].match("\u540C|\u4ECA|\u672C")){let o=LR.default(e.refDate);a.assign("year",o.year())}if(t[UR]){let o=t[WR],l=o=="\u5143"?1:parseInt(zd.toHankaku(o));t[Vd]=="\u4EE4\u548C"?l+=2018:t[Vd]=="\u5E73\u6210"?l+=1988:t[Vd]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=FR.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};_a.default=Kd});var q_=O(Ta=>{"use strict";var $R=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var BR=$R($r()),Zd=class extends BR.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ta.default=Zd});var $_=O(Cr=>{"use strict";var GR=Cr&&Cr.__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]}),HR=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zR=Cr&&Cr.__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)&&GR(e,r,t);return HR(e,r),e},VR=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var KR=VR(xe()),j_=mt(),Xd=zR(dn()),ZR=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Qd=class{pattern(){return ZR}extract(e,t){let n=t[0],s=KR.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Xd.yesterday(e.reference);case"\u660E\u65E5":return Xd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Xd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",j_.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",j_.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Cr.default=Qd});var H_=O(kt=>{"use strict";var Jd=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var XR=Jd(W_()),QR=Jd(q_()),JR=Jd($_()),B_=xr();kt.casual=new B_.Chrono(G_());kt.strict=new B_.Chrono(ef());function ex(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=ex;function tx(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=tx;function G_(){let r=ef();return r.parsers.unshift(new JR.default),r}kt.createCasualConfiguration=G_;function ef(){return{parsers:[new XR.default],refiners:[new QR.default]}}kt.createConfiguration=ef});var nu=O(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.parseYear=Gr.YEAR_PATTERN=Gr.MONTH_DICTIONARY=Gr.WEEKDAY_DICTIONARY=void 0;Gr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};Gr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};Gr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function rx(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Gr.parseYear=rx});var V_=O(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var z_=nu(),nx=Fe(),sx=Z(),ix=gs(),ax=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${nx.matchAnyPattern(z_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),ox=1,ux=2,lx=3,tf=class extends sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return ax}innerExtract(e,t){let n=t[ux].toLowerCase(),s=z_.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[ox],o=t[lx],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let h=ix.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};rf.default=tf});var K_=O(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var cx=ms(),nf=class extends cx.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};sf.default=nf});var Z_=O(ba=>{"use strict";var dx=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var fx=dx(un()),af=class extends fx.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ba.default=af});var X_=O(va=>{"use strict";var hx=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var px=hx($r()),of=class extends px.default{patternBetween(){return/^\s*(?:-)\s*$/i}};va.default=of});var nT=O(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var mx=At(),tT=nu(),rT=nu(),yx=Fe(),gx=Z(),_x=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*)(${yx.matchAnyPattern(tT.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${rT.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Q_=1,J_=2,Tx=3,eT=4,uf=class extends gx.AbstractParserWithWordBoundaryChecking{innerPattern(){return _x}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=tT.MONTH_DICTIONARY[t[Tx].toLowerCase()],a=parseInt(t[Q_]);if(a>31)return t.index=t.index+t[Q_].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[eT]){let o=rT.parseYear(t[eT]);n.start.assign("year",o)}else{let o=mx.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[J_]){let o=parseInt(t[J_]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};lf.default=uf});var sT=O(fn=>{"use strict";var bx=fn&&fn.__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]}),vx=fn&&fn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wx=fn&&fn.__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)&&bx(e,r,t);return vx(e,r),e};Object.defineProperty(fn,"__esModule",{value:!0});var Ex=Z(),su=wx(dn()),cf=class extends Ex.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return su.now(e.reference);case"hoje":return su.today(e.reference);case"amanha":case"amanh\xE3":return su.tomorrow(e.reference);case"ontem":return su.yesterday(e.reference)}return s}};fn.default=cf});var iT=O(wa=>{"use strict";var kx=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var iu=mt(),Dx=Z(),Sx=_r(),Ox=kx(xe()),df=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=Ox.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",iu.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",iu.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",iu.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":Sx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",iu.Meridiem.AM),s.imply("hour",12);break}return s}};wa.default=df});var uT=O(Dt=>{"use strict";var jn=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var Mx=ln(),aT=xr(),Rx=jn(_s()),xx=jn(V_()),Px=jn(K_()),Ax=jn(Z_()),Nx=jn(X_()),Cx=jn(nT()),Ix=jn(sT()),Fx=jn(iT());Dt.casual=new aT.Chrono(oT());Dt.strict=new aT.Chrono(ff(!0));function Lx(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=Lx;function Yx(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=Yx;function oT(r=!0){let e=ff(!1,r);return e.parsers.push(new Ix.default),e.parsers.push(new Fx.default),e}Dt.createCasualConfiguration=oT;function ff(r=!0,e=!0){return Mx.includeCommonConfiguration({parsers:[new Rx.default(e),new xx.default,new Px.default,new Cx.default],refiners:[new Ax.default,new Nx.default]},r)}Dt.createConfiguration=ff});var lT=O(Ea=>{"use strict";var Ux=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var Wx=Ux($r()),hf=class extends Wx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ea.default=hf});var cT=O(ka=>{"use strict";var qx=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var jx=qx(un()),pf=class extends jx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ka.default=pf});var dT=O(hn=>{"use strict";var $x=hn&&hn.__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]}),Bx=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gx=hn&&hn.__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)&&$x(e,r,t);return Bx(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var Hx=Z(),au=Gx(dn()),mf=class extends Hx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return au.now(e.reference);case"vandaag":return au.today(e.reference);case"morgen":case"morgend":return au.tomorrow(e.reference);case"gisteren":return au.yesterday(e.reference)}return s}};hn.default=mf});var fT=O(Da=>{"use strict";var zx=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var ou=mt(),Vx=Z(),Kx=zx(xe()),Zx=_r(),Xx=1,Qx=2,yf=class extends Vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Kx.default(e.refDate),s=e.createParsingComponents();switch(t[Xx]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[Qx].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",ou.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",ou.Meridiem.PM),s.imply("hour",20);break;case"middernacht":Zx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",ou.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",ou.Meridiem.AM),s.imply("hour",12);break}return s}};Da.default=yf});var ir=O(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.parseTimeUnits=we.TIME_UNITS_PATTERN=we.parseYear=we.YEAR_PATTERN=we.parseOrdinalNumberPattern=we.ORDINAL_NUMBER_PATTERN=we.parseNumberPattern=we.NUMBER_PATTERN=we.TIME_UNIT_DICTIONARY=we.ORDINAL_WORD_DICTIONARY=we.INTEGER_WORD_DICTIONARY=we.MONTH_DICTIONARY=we.WEEKDAY_DICTIONARY=void 0;var uu=Fe(),Jx=At();we.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};we.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};we.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};we.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};we.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"};we.NUMBER_PATTERN=`(?:${uu.matchAnyPattern(we.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function pT(r){let e=r.toLowerCase();return we.INTEGER_WORD_DICTIONARY[e]!==void 0?we.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}we.parseNumberPattern=pT;we.ORDINAL_NUMBER_PATTERN=`(?:${uu.matchAnyPattern(we.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function eP(r){let e=r.toLowerCase();return we.ORDINAL_WORD_DICTIONARY[e]!==void 0?we.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}we.parseOrdinalNumberPattern=eP;we.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function tP(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 Jx.findMostLikelyADYear(e)}we.parseYear=tP;var mT=`(${we.NUMBER_PATTERN})\\s{0,5}(${uu.matchAnyPattern(we.TIME_UNIT_DICTIONARY)})\\s{0,5}`,hT=new RegExp(mT,"i");we.TIME_UNITS_PATTERN=uu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",mT);function rP(r){let e={},t=r,n=hT.exec(t);for(;n;)nP(e,n),t=t.substring(n[0].length),n=hT.exec(t);return e}we.parseTimeUnits=rP;function nP(r,e){let t=pT(e[1]),n=we.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gT=O(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var yT=ir(),sP=rt(),iP=Z(),gf=class extends iP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+yT.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=yT.parseTimeUnits(t[1]);return sP.ParsingComponents.createRelativeFromReference(e.reference,n)}};_f.default=gf});var TT=O(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var _T=ir(),aP=Fe(),oP=Z(),uP=gs(),lP=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${aP.matchAnyPattern(_T.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),cP=1,dP=2,fP=3,Tf=class extends oP.AbstractParserWithWordBoundaryChecking{innerPattern(){return lP}innerExtract(e,t){let n=t[dP].toLowerCase(),s=_T.WEEKDAY_DICTIONARY[n],a=t[cP],o=t[fP],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let h=uP.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};bf.default=Tf});var DT=O(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var hP=At(),ET=ir(),lu=ir(),kT=ir(),pP=Fe(),mP=Z(),yP=new RegExp(`(?:on\\s*?)?(${lu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${lu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+pP.matchAnyPattern(ET.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${kT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gP=3,bT=1,vT=2,wT=4,vf=class extends mP.AbstractParserWithWordBoundaryChecking{innerPattern(){return yP}innerExtract(e,t){let n=ET.MONTH_DICTIONARY[t[gP].toLowerCase()],s=lu.parseOrdinalNumberPattern(t[bT]);if(s>31)return t.index=t.index+t[bT].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[wT]){let c=kT.parseYear(t[wT]);a.assign("year",c)}else{let c=hP.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[vT])return a;let o=lu.parseOrdinalNumberPattern(t[vT]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};wf.default=vf});var RT=O(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var OT=ir(),_P=At(),TP=Fe(),MT=ir(),bP=Z(),vP=new RegExp(`(${TP.matchAnyPattern(OT.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${MT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),wP=1,ST=2,Ef=class extends bP.AbstractParserWithWordBoundaryChecking{innerPattern(){return vP}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[wP],a=OT.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[ST]){let o=MT.parseYear(t[ST]);n.assign("year",o)}else{let o=_P.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};kf.default=Ef});var xT=O(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var EP=Z(),kP=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),DP=1,SP=2,Df=class extends EP.AbstractParserWithWordBoundaryChecking{innerPattern(){return kP}innerExtract(e,t){let n=parseInt(t[SP]),s=parseInt(t[DP]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Sf.default=Df});var PT=O(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var OP=ms(),Of=class extends OP.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)}};Mf.default=Of});var CT=O(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var NT=ir(),MP=Fe(),RP=Z(),xP=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${MP.matchAnyPattern(NT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),PP=1,AP=2,AT=3,NP=4,Rf=class extends RP.AbstractParserWithWordBoundaryChecking{innerPattern(){return xP}innerExtract(e,t){let n=t[AT]?parseInt(t[AT]):NT.MONTH_DICTIONARY[t[AP].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[PP]);return{day:parseInt(t[NP]),month:n,year:s}}};xf.default=Rf});var IT=O(Sa=>{"use strict";var CP=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var IP=Z(),cu=mt(),Pf=_r(),FP=CP(xe()),LP=1,YP=2,Af=class extends IP.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[LP].toLowerCase(),s=t[YP].toLowerCase(),a=e.createParsingComponents(),o=FP.default(e.refDate);switch(n){case"gisteren":Pf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":Pf.assignSimilarDate(a,o);break;case"morgen":Pf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",cu.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",cu.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",cu.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",cu.Meridiem.PM),a.imply("hour",20);break}return a}};Sa.default=Af});var LT=O(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var FT=ir(),UP=rt(),WP=Z(),qP=Tr(),jP=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${FT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Nf=class extends WP.AbstractParserWithWordBoundaryChecking{innerPattern(){return jP}innerExtract(e,t){let n=t[1].toLowerCase(),s=FT.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=qP.reverseTimeUnits(s);break}return UP.ParsingComponents.createRelativeFromReference(e.reference,s)}};Cf.default=Nf});var WT=O(Oa=>{"use strict";var $P=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var UT=ir(),YT=rt(),BP=$P(xe()),GP=Z(),HP=Fe(),zP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${HP.matchAnyPattern(UT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),VP=1,KP=2,If=class extends GP.AbstractParserWithWordBoundaryChecking{innerPattern(){return zP}innerExtract(e,t){let n=t[VP].toLowerCase(),s=t[KP].toLowerCase(),a=UT.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,YT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,YT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=BP.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Oa.default=If});var qT=O(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var Lf=ir(),ZP=rt(),XP=Z(),QP=Tr(),JP=new RegExp("("+Lf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),eA=new RegExp("("+Lf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Ff=class extends XP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?eA:JP}innerExtract(e,t){let n=Lf.parseTimeUnits(t[1]),s=QP.reverseTimeUnits(n);return ZP.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yf.default=Ff});var jT=O(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Wf=ir(),tA=rt(),rA=Z(),nA=new RegExp("("+Wf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),sA=new RegExp("("+Wf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),iA=1,Uf=class extends rA.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sA:nA}innerExtract(e,t){let n=Wf.parseTimeUnits(t[iA]);return tA.ParsingComponents.createRelativeFromReference(e.reference,n)}};qf.default=Uf});var HT=O(St=>{"use strict";var Ct=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var aA=ln(),$T=xr(),oA=Ct(lT()),uA=Ct(cT()),lA=Ct(dT()),cA=Ct(fT()),dA=Ct(_s()),fA=Ct(gT()),hA=Ct(TT()),pA=Ct(DT()),BT=Ct(RT()),mA=Ct(xT()),yA=Ct(PT()),gA=Ct(CT()),_A=Ct(IT()),TA=Ct(LT()),bA=Ct(WT()),vA=Ct(qT()),wA=Ct(jT());St.casual=new $T.Chrono(GT());St.strict=new $T.Chrono(jf(!0));function EA(r,e,t){return St.casual.parse(r,e,t)}St.parse=EA;function kA(r,e,t){return St.casual.parseDate(r,e,t)}St.parseDate=kA;function GT(r=!0){let e=jf(!1,r);return e.parsers.unshift(new lA.default),e.parsers.unshift(new cA.default),e.parsers.unshift(new _A.default),e.parsers.unshift(new BT.default),e.parsers.unshift(new bA.default),e.parsers.unshift(new TA.default),e}St.createCasualConfiguration=GT;function jf(r=!0,e=!0){return aA.includeCommonConfiguration({parsers:[new dA.default(e),new fA.default,new pA.default,new BT.default,new hA.default,new gA.default,new mA.default,new yA.default(r),new vA.default(r),new wA.default(r)],refiners:[new uA.default,new oA.default]},r)}St.createConfiguration=jf});var ZT=O(Ma=>{"use strict";var DA=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var SA=DA(xe()),OA=Z(),MA=1,zT=2,RA=3,VT=4,KT=5,xA=6,$f=class extends OA.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,s=e.createParsingResult(n,t[0]),a=SA.default(e.refDate),o=a;if(t[MA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[zT]){let l=t[zT],c=t[RA];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[VT]){let c=t[VT][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[KT]){let l=t[KT];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[xA];if(c){let h=c[0];h=="\u65E9"||h=="\u671D"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"||h=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Ma.default=$f});var oi=O(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.zhStringToYear=Xt.zhStringToNumber=Xt.WEEKDAY_OFFSET=Xt.NUMBER=void 0;Xt.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};Xt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function PA(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Xt.NUMBER[n]:e*Xt.NUMBER[n]:e+=Xt.NUMBER[n]}return e}Xt.zhStringToNumber=PA;function AA(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Xt.NUMBER[n]}return parseInt(e)}Xt.zhStringToYear=AA});var QT=O(Ra=>{"use strict";var NA=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var CA=NA(xe()),IA=Z(),vs=oi(),Bf=1,XT=2,Gf=3,Hf=class extends IA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(vs.NUMBER).join("")+"]{4}|["+Object.keys(vs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(vs.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(vs.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=CA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[XT]);if(isNaN(a)&&(a=vs.zhStringToNumber(t[XT])),s.start.assign("month",a),t[Gf]){let o=parseInt(t[Gf]);isNaN(o)&&(o=vs.zhStringToNumber(t[Gf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Bf]){let o=parseInt(t[Bf]);isNaN(o)&&(o=vs.zhStringToYear(t[Bf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Ra.default=Hf});var eb=O(xa=>{"use strict";var FA=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var LA=FA(xe()),YA=Z(),JT=oi(),UA=new RegExp("(\\d+|["+Object.keys(JT.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"),zf=1,WA=2,Vf=class extends YA.AbstractParserWithWordBoundaryChecking{innerPattern(){return UA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[zf]);if(isNaN(s)&&(s=JT.zhStringToNumber(t[zf])),isNaN(s)){let c=t[zf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=LA.default(e.refDate),l=t[WA][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};xa.default=Vf});var rb=O(Pa=>{"use strict";var qA=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var jA=qA(xe()),$A=Z(),tb=oi(),BA=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(tb.WEEKDAY_OFFSET).join("|")+")"),Kf=class extends $A.AbstractParserWithWordBoundaryChecking{innerPattern(){return BA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=tb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=jA.default(e.refDate),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),h?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};Pa.default=Kf});var nb=O(Aa=>{"use strict";var GA=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var HA=GA(xe()),zA=Z(),wr=oi(),VA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),KA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),du=1,fu=2,hu=3,pu=4,mu=5,yu=6,vr=7,ui=8,gu=9,Zf=class extends zA.AbstractParserWithWordBoundaryChecking{innerPattern(){return VA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=HA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[du]){var o=t[du];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[pu]){var l=t[pu];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,h=0,m=-1;if(t[ui]){var _=parseInt(t[ui]);if(isNaN(_)&&(_=wr.zhStringToNumber(t[ui])),_>=60)return null;s.start.assign("second",_)}if(c=parseInt(t[yu]),isNaN(c)&&(c=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?h=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?h=0:(h=parseInt(t[vr]),isNaN(h)&&(h=wr.zhStringToNumber(t[vr]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[gu]){if(c>12)return null;var T=t[gu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12))}else if(t[fu]){var D=t[fu],v=D[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[hu]){var R=t[hu],I=R[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(m=0,c==12&&(c=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[mu]){var q=t[mu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",h),m>=0?s.start.assign("meridiem",m):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=KA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let B=a.clone();if(s.end=e.createParsingComponents(),t[du]){var o=t[du];o=="\u660E"||o=="\u807D"?n.hour()>1&&B.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?B.add(-1,"day"):o=="\u524D"?B.add(-2,"day"):o=="\u5927\u524D"?B.add(-3,"day"):o=="\u5F8C"?B.add(2,"day"):o=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else if(t[pu]){var l=t[pu];l=="\u660E"||l=="\u807D"?B.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?B.add(-1,"day"):l=="\u524D"?B.add(-2,"day"):l=="\u5927\u524D"?B.add(-3,"day"):l=="\u5F8C"?B.add(2,"day"):l=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else s.end.imply("day",B.date()),s.end.imply("month",B.month()+1),s.end.imply("year",B.year());if(c=0,h=0,m=-1,t[ui]){var _=parseInt(t[ui]);if(isNaN(_)&&(_=wr.zhStringToNumber(t[ui])),_>=60)return null;s.end.assign("second",_)}if(c=parseInt(t[yu]),isNaN(c)&&(c=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?h=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?h=0:(h=parseInt(t[vr]),isNaN(h)&&(h=wr.zhStringToNumber(t[vr]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[gu]){if(c>12)return null;var T=t[gu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(m==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[fu]){var D=t[fu],v=D[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[hu]){var R=t[hu],I=R[0];I=="\u4E0A"||I=="\u671D"||I=="\u65E9"||I=="\u51CC"?(m=0,c==12&&(c=0)):(I=="\u4E0B"||I=="\u664F"||I=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[mu]){var q=t[mu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",h),m>=0?s.end.assign("meridiem",m):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Aa.default=Zf});var ib=O(Na=>{"use strict";var ZA=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var XA=ZA(xe()),QA=Z(),sb=oi(),JA=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(sb.WEEKDAY_OFFSET).join("|")+")"),Xf=class extends QA.AbstractParserWithWordBoundaryChecking{innerPattern(){return JA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=sb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=XA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Na.default=Xf});var ab=O(Ca=>{"use strict";var eN=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var tN=eN($r()),Qf=class extends tN.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ca.default=Qf});var ob=O(Ia=>{"use strict";var rN=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var nN=rN(un()),Jf=class extends nN.default{patternBetween(){return/^\s*$/i}};Ia.default=Jf});var ub=O(ct=>{"use strict";var pn=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ct,"__esModule",{value:!0});ct.createConfiguration=ct.createCasualConfiguration=ct.parseDate=ct.parse=ct.strict=ct.casual=ct.hant=void 0;var eh=xr(),sN=pn(zo()),iN=ln(),aN=pn(ZT()),oN=pn(QT()),uN=pn(eb()),lN=pn(rb()),cN=pn(nb()),dN=pn(ib()),fN=pn(ab()),hN=pn(ob());ct.hant=new eh.Chrono(th());ct.casual=new eh.Chrono(th());ct.strict=new eh.Chrono(rh());function pN(r,e,t){return ct.casual.parse(r,e,t)}ct.parse=pN;function mN(r,e,t){return ct.casual.parseDate(r,e,t)}ct.parseDate=mN;function th(){let r=rh();return r.parsers.unshift(new aN.default),r}ct.createCasualConfiguration=th;function rh(){let r=iN.includeCommonConfiguration({parsers:[new oN.default,new lN.default,new dN.default,new cN.default,new uN.default],refiners:[new fN.default,new hN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof sN.default)),r}ct.createConfiguration=rh});var fb=O(Fa=>{"use strict";var yN=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var gN=yN(xe()),_N=Z(),TN=1,lb=2,bN=3,cb=4,db=5,vN=6,nh=class extends _N.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,s=e.createParsingResult(n,t[0]),a=gN.default(e.refDate),o=a;if(t[TN])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[lb]){let l=t[lb],c=t[bN];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[cb]){let c=t[cb][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[db]){let l=t[db];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[vN];if(c){let h=c[0];h=="\u65E9"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Fa.default=nh});var li=O(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.zhStringToYear=Qt.zhStringToNumber=Qt.WEEKDAY_OFFSET=Qt.NUMBER=void 0;Qt.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};Qt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function wN(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Qt.NUMBER[n]:e*Qt.NUMBER[n]:e+=Qt.NUMBER[n]}return e}Qt.zhStringToNumber=wN;function EN(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Qt.NUMBER[n]}return parseInt(e)}Qt.zhStringToYear=EN});var pb=O(La=>{"use strict";var kN=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var DN=kN(xe()),SN=Z(),ws=li(),sh=1,hb=2,ih=3,ah=class extends SN.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ws.NUMBER).join("")+"]{4}|["+Object.keys(ws.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ws.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ws.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=DN.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[hb]);if(isNaN(a)&&(a=ws.zhStringToNumber(t[hb])),s.start.assign("month",a),t[ih]){let o=parseInt(t[ih]);isNaN(o)&&(o=ws.zhStringToNumber(t[ih])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[sh]){let o=parseInt(t[sh]);isNaN(o)&&(o=ws.zhStringToYear(t[sh])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};La.default=ah});var yb=O(Ya=>{"use strict";var ON=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var MN=ON(xe()),RN=Z(),mb=li(),xN=new RegExp("(\\d+|["+Object.keys(mb.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"),oh=1,PN=2,uh=class extends RN.AbstractParserWithWordBoundaryChecking{innerPattern(){return xN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[oh]);if(isNaN(s)&&(s=mb.zhStringToNumber(t[oh])),isNaN(s)){let c=t[oh];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=MN.default(e.refDate),l=t[PN][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};Ya.default=uh});var _b=O(Ua=>{"use strict";var AN=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var NN=AN(xe()),CN=Z(),gb=li(),IN=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(gb.WEEKDAY_OFFSET).join("|")+")"),lh=class extends CN.AbstractParserWithWordBoundaryChecking{innerPattern(){return IN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=gb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=NN.default(e.refDate),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),h?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};Ua.default=lh});var Tb=O(Wa=>{"use strict";var FN=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var LN=FN(xe()),YN=Z(),kr=li(),UN=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(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),WN=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(kr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(kr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),_u=1,Tu=2,bu=3,vu=4,wu=5,Eu=6,Er=7,ci=8,ku=9,ch=class extends YN.AbstractParserWithWordBoundaryChecking{innerPattern(){return UN}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=LN.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[_u]){let m=t[_u];m=="\u660E"?n.hour()>1&&a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[vu]){let m=t[vu];m=="\u660E"?a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[ci]){let m=parseInt(t[ci]);if(isNaN(m)&&(m=kr.zhStringToNumber(t[ci])),m>=60)return null;s.start.assign("second",m)}if(o=parseInt(t[Eu]),isNaN(o)&&(o=kr.zhStringToNumber(t[Eu])),t[Er]?t[Er]=="\u534A"?l=30:t[Er]=="\u6B63"||t[Er]=="\u6574"?l=0:(l=parseInt(t[Er]),isNaN(l)&&(l=kr.zhStringToNumber(t[Er]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[ku]){if(o>12)return null;let m=t[ku][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12))}else if(t[Tu]){let _=t[Tu][0];_=="\u65E9"?(c=0,o==12&&(o=0)):_=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[bu]){let _=t[bu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[wu]){let _=t[wu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=WN.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let h=a.clone();if(s.end=e.createParsingComponents(),t[_u]){let m=t[_u];m=="\u660E"?n.hour()>1&&h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else if(t[vu]){let m=t[vu];m=="\u660E"?h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else s.end.imply("day",h.date()),s.end.imply("month",h.month()+1),s.end.imply("year",h.year());if(o=0,l=0,c=-1,t[ci]){let m=parseInt(t[ci]);if(isNaN(m)&&(m=kr.zhStringToNumber(t[ci])),m>=60)return null;s.end.assign("second",m)}if(o=parseInt(t[Eu]),isNaN(o)&&(o=kr.zhStringToNumber(t[Eu])),t[Er]?t[Er]=="\u534A"?l=30:t[Er]=="\u6B63"||t[Er]=="\u6574"?l=0:(l=parseInt(t[Er]),isNaN(l)&&(l=kr.zhStringToNumber(t[Er]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[ku]){if(o>12)return null;let m=t[ku][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Tu]){let _=t[Tu][0];_=="\u65E9"?(c=0,o==12&&(o=0)):_=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[bu]){let _=t[bu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[wu]){let _=t[wu][0];_=="\u4E0A"||_=="\u65E9"||_=="\u51CC"?(c=0,o==12&&(o=0)):(_=="\u4E0B"||_=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Wa.default=ch});var vb=O(qa=>{"use strict";var qN=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var jN=qN(xe()),$N=Z(),bb=li(),BN=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(bb.WEEKDAY_OFFSET).join("|")+")"),dh=class extends $N.AbstractParserWithWordBoundaryChecking{innerPattern(){return BN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=bb.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=jN.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};qa.default=dh});var wb=O(ja=>{"use strict";var GN=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var HN=GN($r()),fh=class extends HN.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};ja.default=fh});var Eb=O($a=>{"use strict";var zN=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var VN=zN(un()),hh=class extends VN.default{patternBetween(){return/^\s*$/i}};$a.default=hh});var kb=O(dt=>{"use strict";var mn=dt&&dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dt,"__esModule",{value:!0});dt.createConfiguration=dt.createCasualConfiguration=dt.parseDate=dt.parse=dt.strict=dt.casual=dt.hans=void 0;var ph=xr(),KN=mn(zo()),ZN=ln(),XN=mn(fb()),QN=mn(pb()),JN=mn(yb()),eC=mn(_b()),tC=mn(Tb()),rC=mn(vb()),nC=mn(wb()),sC=mn(Eb());dt.hans=new ph.Chrono(mh());dt.casual=new ph.Chrono(mh());dt.strict=new ph.Chrono(yh());function iC(r,e,t){return dt.casual.parse(r,e,t)}dt.parse=iC;function aC(r,e,t){return dt.casual.parseDate(r,e,t)}dt.parseDate=aC;function mh(){let r=yh();return r.parsers.unshift(new XN.default),r}dt.createCasualConfiguration=mh;function yh(){let r=ZN.includeCommonConfiguration({parsers:[new QN.default,new eC.default,new rC.default,new tC.default,new JN.default],refiners:[new nC.default,new sC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof KN.default)),r}dt.createConfiguration=yh});var Sb=O(ar=>{"use strict";var Db=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]}),oC=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),uC=ar&&ar.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Db(e,r,t)},lC=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)&&Db(e,r,t);return oC(e,r),e};Object.defineProperty(ar,"__esModule",{value:!0});ar.hans=void 0;uC(ub(),ar);ar.hans=lC(kb())});var Jt=O(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.parseTimeUnits=pe.TIME_UNITS_PATTERN=pe.parseYear=pe.YEAR_PATTERN=pe.parseOrdinalNumberPattern=pe.ORDINAL_NUMBER_PATTERN=pe.parseNumberPattern=pe.NUMBER_PATTERN=pe.TIME_UNIT_DICTIONARY=pe.ORDINAL_WORD_DICTIONARY=pe.INTEGER_WORD_DICTIONARY=pe.MONTH_DICTIONARY=pe.FULL_MONTH_NAME_DICTIONARY=pe.WEEKDAY_DICTIONARY=pe.REGEX_PARTS=void 0;var Du=Fe(),cC=At();pe.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};pe.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};pe.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};pe.MONTH_DICTIONARY=Object.assign(Object.assign({},pe.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});pe.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};pe.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};pe.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"};pe.NUMBER_PATTERN=`(?:${Du.matchAnyPattern(pe.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 Mb(r){let e=r.toLowerCase();return pe.INTEGER_WORD_DICTIONARY[e]!==void 0?pe.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}pe.parseNumberPattern=Mb;pe.ORDINAL_NUMBER_PATTERN=`(?:${Du.matchAnyPattern(pe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function dC(r){let e=r.toLowerCase();return pe.ORDINAL_WORD_DICTIONARY[e]!==void 0?pe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}pe.parseOrdinalNumberPattern=dC;var gh="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";pe.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${gh}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${gh}|[5-9][0-9]${gh})`;function fC(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 cC.findMostLikelyADYear(e)}pe.parseYear=fC;var Rb=`(${pe.NUMBER_PATTERN})\\s{0,3}(${Du.matchAnyPattern(pe.TIME_UNIT_DICTIONARY)})`,Ob=new RegExp(Rb,"i");pe.TIME_UNITS_PATTERN=Du.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Rb);function hC(r){let e={},t=r,n=Ob.exec(t);for(;n;)pC(e,n),t=t.substring(n[0].length).trim(),n=Ob.exec(t);return e}pe.parseTimeUnits=hC;function pC(r,e){let t=Mb(e[1]),n=pe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Pb=O(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var Ba=Jt(),mC=rt(),yC=Z(),xb=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ba.TIME_UNITS_PATTERN})${Ba.REGEX_PARTS.rightBoundary}`,gC=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${xb}`,Ba.REGEX_PARTS.flags),_C=new RegExp(xb,"i"),_h=class extends yC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ba.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?_C:gC}innerExtract(e,t){let n=Ba.parseTimeUnits(t[1]);return mC.ParsingComponents.createRelativeFromReference(e.reference,n)}};Th.default=_h});var Fb=O(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var TC=At(),Ga=Jt(),Ib=Jt(),Su=Jt(),bC=Fe(),vC=Z(),wC=new RegExp(`(?:\u0441)?\\s*(${Su.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Su.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${bC.matchAnyPattern(Ga.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Ib.YEAR_PATTERN}(?![^\\s]\\d)))?${Ga.REGEX_PARTS.rightBoundary}`,Ga.REGEX_PARTS.flags),Ab=1,Nb=2,EC=3,Cb=4,bh=class extends vC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ga.REGEX_PARTS.leftBoundary}innerPattern(){return wC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ga.MONTH_DICTIONARY[t[EC].toLowerCase()],a=Su.parseOrdinalNumberPattern(t[Ab]);if(a>31)return t.index=t.index+t[Ab].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Cb]){let o=Ib.parseYear(t[Cb]);n.start.assign("year",o)}else{let o=TC.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Nb]){let o=Su.parseOrdinalNumberPattern(t[Nb]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};vh.default=bh});var Ub=O(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var Ha=Jt(),kC=At(),DC=Fe(),Yb=Jt(),SC=Z(),OC=new RegExp(`((?:\u0432)\\s*)?(${DC.matchAnyPattern(Ha.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Yb.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ha.REGEX_PARTS.flags),MC=2,Lb=3,wh=class extends SC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ha.REGEX_PARTS.leftBoundary}innerPattern(){return OC}innerExtract(e,t){let n=t[MC].toLowerCase();if(t[0].length<=3&&!Ha.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Ha.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Lb]){let o=Yb.parseYear(t[Lb]);s.start.assign("year",o)}else{let o=kC.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Eh.default=wh});var qb=O(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var Ou=mt(),RC=ms(),Wb=Jt(),kh=class extends RC.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Wb.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))?(?!\\/)${Wb.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ou.Meridiem.PM)):s<6&&n.assign("meridiem",Ou.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Ou.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Ou.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Dh.default=kh});var jb=O(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Mu=Jt(),xC=rt(),PC=Z(),AC=Tr(),NC=new RegExp(`(${Mu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Mu.REGEX_PARTS.flags),Sh=class extends PC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Mu.REGEX_PARTS.leftBoundary}innerPattern(){return NC}innerExtract(e,t){let n=Mu.parseTimeUnits(t[1]),s=AC.reverseTimeUnits(n);return xC.ParsingComponents.createRelativeFromReference(e.reference,s)}};Oh.default=Sh});var $b=O(za=>{"use strict";var CC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var IC=CC($r()),Mh=class extends IC.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};za.default=Mh});var Bb=O(Va=>{"use strict";var FC=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var LC=FC(un()),Rh=class extends LC.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Va.default=Rh});var Gb=O(yn=>{"use strict";var YC=yn&&yn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),UC=yn&&yn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),WC=yn&&yn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&YC(e,r,t);return UC(e,r),e};Object.defineProperty(yn,"__esModule",{value:!0});var qC=Z(),Ka=WC(dn()),xh=Jt(),jC=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)${xh.REGEX_PARTS.rightBoundary}`,xh.REGEX_PARTS.flags),Ph=class extends qC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return xh.REGEX_PARTS.leftBoundary}innerPattern(e){return jC}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Ka.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ka.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ka.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ka.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ka.theDayBefore(e.reference,2)}return s}};yn.default=Ph});var Hb=O(Ir=>{"use strict";var $C=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]}),BC=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),GC=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)&&$C(e,r,t);return BC(e,r),e},HC=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var zC=Z(),Es=GC(dn()),VC=_r(),KC=HC(xe()),Ah=Jt(),ZC=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)${Ah.REGEX_PARTS.rightBoundary}`,Ah.REGEX_PARTS.flags),Nh=class extends zC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ah.REGEX_PARTS.leftBoundary}innerPattern(){return ZC}innerExtract(e,t){let n=KC.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Es.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Es.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Es.morning(e.reference);if(s.match(/в\s*полдень/))return Es.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Es.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Es.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),VC.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Es.midnight(e.reference):a}};Ir.default=Nh});var zb=O(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var Za=Jt(),XC=Fe(),QC=Z(),JC=gs(),eI=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*)?(${XC.matchAnyPattern(Za.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)?${Za.REGEX_PARTS.rightBoundary}`,Za.REGEX_PARTS.flags),tI=1,rI=2,nI=3,Ch=class extends QC.AbstractParserWithWordBoundaryChecking{innerPattern(){return eI}patternLeftBoundary(){return Za.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[rI].toLowerCase(),s=Za.WEEKDAY_DICTIONARY[n],a=t[tI],o=t[nI],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let h=JC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};Ih.default=Ch});var Kb=O(Qa=>{"use strict";var sI=Qa&&Qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qa,"__esModule",{value:!0});var Xa=Jt(),Vb=rt(),iI=sI(xe()),aI=Z(),oI=Fe(),uI=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*(${oI.matchAnyPattern(Xa.TIME_UNIT_DICTIONARY)})(?=\\s*)${Xa.REGEX_PARTS.rightBoundary}`,Xa.REGEX_PARTS.flags),lI=1,cI=2,Fh=class extends aI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Xa.REGEX_PARTS.leftBoundary}innerPattern(){return uI}innerExtract(e,t){let n=t[lI].toLowerCase(),s=t[cI].toLowerCase(),a=Xa.TIME_UNIT_DICTIONARY[s];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 c={};return c[a]=1,Vb.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,Vb.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=iI.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Qa.default=Fh});var Zb=O(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var Ja=Jt(),dI=rt(),fI=Z(),hI=Tr(),pI=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*(${Ja.TIME_UNITS_PATTERN})${Ja.REGEX_PARTS.rightBoundary}`,Ja.REGEX_PARTS.flags),Lh=class extends fI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ja.REGEX_PARTS.leftBoundary}innerPattern(){return pI}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ja.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=hI.reverseTimeUnits(s);break}return dI.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yh.default=Lh});var Jb=O(Ot=>{"use strict";var or=Ot&&Ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createConfiguration=Ot.createCasualConfiguration=Ot.parseDate=Ot.parse=Ot.strict=Ot.casual=void 0;var mI=or(Pb()),yI=or(Fb()),gI=or(Ub()),_I=or(qb()),TI=or(jb()),bI=or($b()),vI=or(Bb()),wI=ln(),EI=or(Gb()),kI=or(Hb()),DI=or(zb()),SI=or(Kb()),Xb=xr(),OI=or(_s()),MI=or(Zb());Ot.casual=new Xb.Chrono(Qb());Ot.strict=new Xb.Chrono(Uh(!0));function RI(r,e,t){return Ot.casual.parse(r,e,t)}Ot.parse=RI;function xI(r,e,t){return Ot.casual.parseDate(r,e,t)}Ot.parseDate=xI;function Qb(){let r=Uh(!1);return r.parsers.unshift(new EI.default),r.parsers.unshift(new kI.default),r.parsers.unshift(new gI.default),r.parsers.unshift(new SI.default),r.parsers.unshift(new MI.default),r}Ot.createCasualConfiguration=Qb;function Uh(r=!0){return wI.includeCommonConfiguration({parsers:[new OI.default(!0),new mI.default,new yI.default,new DI.default,new _I.default(r),new TI.default],refiners:[new vI.default,new bI.default]},r)}Ot.createConfiguration=Uh});var mt=O(Te=>{"use strict";var PI=Te&&Te.__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]}),AI=Te&&Te.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$n=Te&&Te.__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)&&PI(e,r,t);return AI(e,r),e};Object.defineProperty(Te,"__esModule",{value:!0});Te.parseDate=Te.parse=Te.casual=Te.strict=Te.ru=Te.zh=Te.nl=Te.pt=Te.ja=Te.fr=Te.de=Te.Meridiem=Te.Chrono=Te.en=void 0;var Wh=$n(rd());Te.en=Wh;var NI=xr();Object.defineProperty(Te,"Chrono",{enumerable:!0,get:function(){return NI.Chrono}});var CI;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(CI=Te.Meridiem||(Te.Meridiem={}));var II=$n(u_());Te.de=II;var FI=$n(L_());Te.fr=FI;var LI=$n(H_());Te.ja=LI;var YI=$n(uT());Te.pt=YI;var UI=$n(HT());Te.nl=UI;var WI=$n(Sb());Te.zh=WI;var qI=$n(Jb());Te.ru=qI;Te.strict=Wh.strict;Te.casual=Wh.casual;function jI(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=jI;function $I(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=$I});var zr=O(zn=>{"use strict";zn.__esModule=!0;var ZI;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(ZI=zn.Operators||(zn.Operators={}));var XI;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(XI=zn.StructuralCharacters||(zn.StructuralCharacters={}));var QI;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(QI=zn.Tokens||(zn.Tokens={}))});var Vh=O($u=>{"use strict";$u.__esModule=!0;var nt=zr();$u.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};$u.VALID_TOKENS={identifierOnly:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:nt.Tokens.IDENTIFIER},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.OPEN_PARENTHESIS},{name:nt.Tokens.OPERATOR,value:nt.Operators.NOT}],binaryOperator:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR}],binaryOperatorOrClose:[{name:nt.Tokens.OPERATOR,value:nt.Operators.AND},{name:nt.Tokens.OPERATOR,value:nt.Operators.OR},{name:nt.Tokens.OPERATOR,value:nt.Operators.XOR},{name:nt.Tokens.STRUCTURAL_CHARACTER,value:nt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Kh=O(Tn=>{"use strict";Tn.__esModule=!0;var vi=zr();Tn.STRUCTURAL_CHARACTERS={"(":vi.StructuralCharacters.OPEN_PARENTHESIS,")":vi.StructuralCharacters.CLOSE_PARENTHESIS};Tn.OPERATORS={AND:vi.Operators.AND,OR:vi.Operators.OR,XOR:vi.Operators.XOR,NOT:vi.Operators.NOT};Tn.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tn.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tn.COMMENT_DELIMITER=String.fromCodePoint(35);Tn.EOL=String.fromCodePoint(10);Tn.ESCAPE_CHARACTER=String.fromCodePoint(92)});var fv=O(bn=>{"use strict";var Zh=bn&&bn.__assign||function(){return Zh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}return r},Zh.apply(this,arguments)};bn.__esModule=!0;var dv=zr(),Ms=Kh();bn.createResult=function(r,e,t){return{token:Zh({name:r},e!==null?{value:e}:{}),remainingString:t}};bn.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Ms.EOL){e=t;break}}return bn.createResult(dv.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};bn.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,s=0;s<r.length;s+=1){var a=r[s];if(n===null)a===Ms.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Ms.QUOTED_IDENTIFIER_DELIMITER:n=s:(a===Ms.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=a);else{if(!Ms.SEPARATORS.has(a)&&!Ms.STRUCTURAL_CHARACTERS[a])throw new Error("Unexpected character: "+a+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+Ms.QUOTED_IDENTIFIER_DELIMITER+" character");return bn.createResult(dv.Tokens.IDENTIFIER,t,r.slice(n+1))}});var hv=O(Xh=>{"use strict";Xh.__esModule=!0;var wi=zr(),ur=Kh(),Ei=fv();Xh.lex=function(r){for(var e=null,t=null,n=null,s=0;s<r.length;s+=1){var a=r[s];if(e===null){if(!ur.SEPARATORS.has(a)){var o=ur.STRUCTURAL_CHARACTERS[a];if(o){var l=r[s+1];if(o===wi.StructuralCharacters.CLOSE_PARENTHESIS&&l&&!ur.SEPARATORS.has(l)&&l!==wi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+l+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return Ei.createResult(wi.Tokens.STRUCTURAL_CHARACTER,ur.STRUCTURAL_CHARACTERS[a],r.slice(s+1))}if(a===ur.QUOTED_IDENTIFIER_DELIMITER)return Ei.getQuotedIdentifier(r.slice(s+1));if(a===ur.COMMENT_DELIMITER)return Ei.getComment(r.slice(s+1));e=s}}else if(ur.SEPARATORS.has(a)||ur.STRUCTURAL_CHARACTERS[a]){t=s,n=a;break}else if(a===ur.QUOTED_IDENTIFIER_DELIMITER||a===ur.COMMENT_DELIMITER)throw new Error("Unexpected character: "+a)}if(e!==null){t=t!=null?t:r.length;var c=r.slice(e,t),h=r.slice(t);if(ur.OPERATORS[c]){if(n&&!ur.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return Ei.createResult(wi.Tokens.OPERATOR,ur.OPERATORS[c],h)}else return Ei.createResult(wi.Tokens.IDENTIFIER,c,h)}return Ei.createResult(wi.Tokens.EOF,null,"")}});var pv=O(vn=>{"use strict";var JI=vn&&vn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};vn.__esModule=!0;var eF=hv(),ki=zr(),Bu=Vh();vn.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var s=eF.lex(e),a=s.token,o=s.remainingString;if(e=o,a.name!==ki.Tokens.COMMENT)return vn.validateToken(a,t,n),a}}};vn.getValue=function(r,e){var t=r(Bu.VALID_TOKENS.identifierOrNot),n=t.value===ki.Operators.NOT;n&&(t=r(Bu.VALID_TOKENS.identifierOnly));var s=t.name===ki.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?JI(s,[{name:ki.Tokens.OPERATOR,value:ki.Operators.NOT}]):s};vn.previousOperatorTakesPrecedent=function(r,e){return Bu.OPERATOR_PRECEDENCE[r]<=Bu.OPERATOR_PRECEDENCE[e]};vn.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===ki.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,s=e;n<s.length;n++){var a=s[n];if(a.name===r.name&&(!a.value||a.value===r.value))return}throw new TypeError("Invalid token")}});var Jh=O(eo=>{"use strict";var Di=eo&&eo.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};eo.__esModule=!0;var mv=zr(),yv=Vh(),Gu=pv();eo.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=Gu.newTokenGenerator(r);return Qh(e)};var Qh=function(r,e){e===void 0&&(e=!1);for(var t=Di(Gu.getValue(r,Qh)),n=[];;){var s=e?yv.VALID_TOKENS.binaryOperatorOrClose:yv.VALID_TOKENS.binaryOperator,a=r(s,!e);if(a.name===mv.Tokens.EOF||a.name===mv.Tokens.STRUCTURAL_CHARACTER)return Di(t,Di(n).reverse());for(;n.length;){var o=n[n.length-1]||null;if(o&&Gu.previousOperatorTakesPrecedent(o.value,a.value))t=Di(t,[o]),n=n.slice(0,-1);else break}n=Di(n,[a]),t=Di(t,Gu.getValue(r,Qh))}}});var ep=O(wn=>{"use strict";wn.__esModule=!0;var gv=zr();wn.andUtil=function(r,e){return r&&e};wn.orUtil=function(r,e){return r||e};wn.xorUtil=function(r,e){return r!==e};wn.notUtil=function(r){return!r};wn.isIdentifier=function(r){var e=r.name,t=r.value;return e===gv.Tokens.IDENTIFIER&&typeof t=="string"};wn.isOperator=function(r){var e=r.name,t=r.value;return e===gv.Tokens.OPERATOR&&typeof t=="string"};wn.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var _v=O(np=>{"use strict";var to;np.__esModule=!0;var tp=zr(),rp=ep();np.OPERATOR_MAP=(to={},to[tp.Operators.AND]=rp.andUtil,to[tp.Operators.OR]=rp.orUtil,to[tp.Operators.XOR]=rp.xorUtil,to)});var bv=O(xs=>{"use strict";var sp=xs&&xs.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};xs.__esModule=!0;var tF=Jh(),Tv=zr(),rF=_v(),Rs=ep();xs.getEvaluator=function(r){var e=tF.parse(r);return function(t){return xs.evaluate(e,t)}};xs.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(r+" should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator");var t=r.reduce(function(n,s,a){if(!(s&&(Rs.isIdentifier(s)||Rs.isOperator(s))))throw new Error("Invalid token: "+s+". Found in parsed expression at index "+a);if(s.name===Tv.Tokens.IDENTIFIER)return sp(n,[Boolean(e[s.value])]);var o=n[n.length-2],l=n[n.length-1];if(s.value===Tv.Operators.NOT)return l===void 0&&Rs.throwInvalidExpression("missing identifier"),sp(n.slice(0,-1),[Rs.notUtil(l)]);(l===void 0||o===void 0)&&Rs.throwInvalidExpression("missing identifier");var c=rF.OPERATOR_MAP[s.value];return c||Rs.throwInvalidExpression("unknown operator"),sp(n.slice(0,-2),[c(o,l)])},[]);return t.length!==1&&Rs.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var wv=O(ro=>{"use strict";ro.__esModule=!0;var vv=bv();ro.getEvaluator=vv.getEvaluator;ro.evaluate=vv.evaluate;var nF=Jh();ro.parse=nF.parse});var hF={};wE(hF,{default:()=>ul});module.exports=EE(hF);var Uv=require("obsidian");var zs=require("obsidian");var mF=new Error("timeout while waiting for mutex to become available"),yF=new Error("mutex already locked"),kE=new Error("request for lock canceled"),Kp=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{h(n.next(m))}catch(_){o(_)}}function c(m){try{h(n.throw(m))}catch(_){o(_)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},Sl=class{constructor(e,t=kE){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,s)=>this._queue.push({resolve:n,reject:s}));return e||this._dispatch(),t}runExclusive(e){return Kp(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return Kp(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},DE=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{h(n.next(m))}catch(_){o(_)}}function c(m){try{h(n.throw(m))}catch(_){o(_)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},vo=class{constructor(e){this._semaphore=new Sl(1,e)}acquire(){return DE(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.release()}cancel(){return this._semaphore.cancel()}};var Yi=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.shortMode=!1;this.explainQuery=!1}},qs=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];e?this.options=e:this.options=new Yi,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?s.filter(l=>l!=o):s,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideCreatedDate,"createdDate"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),n}};var wo=["MO","TU","WE","TH","FR","SA","SU"],ut=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(wo.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=wo[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 Ge=function(r){return r!=null},rr=function(r){return typeof r=="number"},Ol=function(r){return typeof r=="string"&&wo.includes(r)},xt=Array.isArray,mr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n<e;n++)t.push(n);return t};var Ee=function(r,e){var t=0,n=[];if(xt(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},Zp=function(r){return xt(r)?r:[r]};function ss(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=Ee(t,e/t.length)),t.slice(0,e)+String(n))}var Xp=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Lt=function(r,e){var t=r%e;return t*e<0?t+e:t},Eo=function(r,e){return{div:Math.floor(r/e),mod:Lt(r,e)}},nr=function(r){return!Ge(r)||r.length===0},at=function(r){return!nr(r)},De=function(r,e){return at(r)&&r.indexOf(e)!==-1};var An;(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),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/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;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[ss(n.getUTCFullYear().toString(),4,"0"),ss(n.getUTCMonth()+1,2,"0"),ss(n.getUTCDate(),2,"0"),"T",ss(n.getUTCHours(),2,"0"),ss(n.getUTCMinutes(),2,"0"),ss(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(An||(An={}));var ie=An;var SE=function(){function r(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return r.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.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}(),nn=SE;var bm=ns(Tm(),1),{__extends:$s,__assign:Bt,__rest:SF,__decorate:OF,__param:MF,__metadata:RF,__awaiter:xF,__generator:PF,__exportStar:AF,__createBinding:NF,__values:CF,__read:IF,__spread:FF,__spreadArrays:LF,__spreadArray:U,__await:YF,__asyncGenerator:UF,__asyncDelegator:WF,__asyncValues:qF,__makeTemplateObject:jF,__importStar:$F,__importDefault:BF,__classPrivateFieldGet:GF,__classPrivateFieldSet:HF,__classPrivateFieldIn:zF}=bm.default;var OE=function(r){$s(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(nn),Rl=OE;var ME={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}},is=ME;var vm=function(r,e){return r.indexOf(e)!==-1},RE=function(r){return r.toString()},xE=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},PE=function(){function r(e,t,n,s){if(t===void 0&&(t=RE),n===void 0&&(n=is),s===void 0&&(s=xE),this.text=[],this.language=n||is,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(m,_){return m-_}),o.sort(function(m,_){return _-m}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(Ge(this.origOptions.byweekday)){var l=xt(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(m){return!m.n}),someWeeks:l.filter(function(m){return Boolean(m.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var h=function(m,_){return m.weekday-_.weekday};this.byweekday.allWeeks.sort(h),this.byweekday.someWeeks.sort(h),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(vm(["dtstart","wkst","freq"],n))return!0;if(!vm(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[X.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 s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+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=rr(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,s){var a=this;s===void 0&&(s=","),xt(e)||(e=[e]);var o=function(c,h,m){for(var _="",T=0;T<c.length;T++)T!==0&&(T===c.length-1?_+=" "+m+" ":_+=h+" "),_+=c[T];return _};t=t||function(c){return c.toString()};var l=function(c){return t&&t.call(a,c)};return n?o(e.map(l),s,n):e.map(l).join(s+" ")},r}(),Yr=PE;var AE=function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var s in this.rules){n=this.rules[s];var a=n.exec(this.text);a&&(e===null||a[0].length>e[0].length)&&(e=a,t=s)}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 Ui(r,e){e===void 0&&(e=is);var t={},n=new AE(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),_());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),_();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),_());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),_());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),_());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),_());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),_());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var D=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[D]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var v=c();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[v]),n.nextSymbol()}m(),_();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=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var R=l();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(R),n.nextSymbol()}a(),_();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),D=n.accept("the");if(!!(T||D))do{var v=h(),R=c(),I=l();if(v)R?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),n.accept("day(s)"));else if(R)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var q=n.acceptNumber();if(!q)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(q[0],10)];n.accept("comma");){if(q=n.acceptNumber(),!q)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(q[0],10))}}else if(I)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(I);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var D=n.acceptNumber();if(!D)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(D[0],10)];n.accept("comma");){if(D=n.acceptNumber(),!D)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(D[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){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 c(){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 h(){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 T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function m(){n.accept("on"),n.accept("the");var T=h();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=h(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function _(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var be;(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"})(be||(be={}));function Wi(r){return r<be.HOURLY}var wm=function(r,e){return e===void 0&&(e=is),new X(Ui(r,e)||void 0)},Bs=["count","until","interval","byweekday","bymonthday","bymonth"];Yr.IMPLEMENTED=[];Yr.IMPLEMENTED[be.HOURLY]=Bs;Yr.IMPLEMENTED[be.MINUTELY]=Bs;Yr.IMPLEMENTED[be.DAILY]=["byhour"].concat(Bs);Yr.IMPLEMENTED[be.WEEKLY]=Bs;Yr.IMPLEMENTED[be.MONTHLY]=Bs;Yr.IMPLEMENTED[be.YEARLY]=["byweekno","byyearday"].concat(Bs);var Em=function(r,e,t,n){return new Yr(r,e,t,n).toString()},km=Yr.isFullyConvertible;var Gs=function(){function r(e,t,n,s){this.hour=e,this.minute=t,this.second=n,this.millisecond=s||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var Dm=function(r){$s(e,r);function e(t,n,s,a,o,l,c){var h=r.call(this,a,o,l,c)||this;return h.year=t,h.month=n,h.day=s,h}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return An.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),s=Lt(this.month,12);this.month=s,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,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Eo(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),nr(s)||De(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=Eo(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(nr(s)||De(s,this.hour))&&(nr(a)||De(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=Eo(this.second,60),c=l.div,h=l.mod;if(c&&(this.second=h,this.addMinutes(c,!1,s,a)),(nr(s)||De(s,this.hour))&&(nr(a)||De(a,this.minute))&&(nr(o)||De(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=An.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>An.MAXYEAR))return;t=An.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,h=t.bysecond;switch(s){case be.YEARLY:return this.addYears(a);case be.MONTHLY:return this.addMonths(a);case be.WEEKLY:return this.addWeekly(a,o);case be.DAILY:return this.addDaily(a);case be.HOURLY:return this.addHours(a,n,l);case be.MINUTELY:return this.addMinutes(a,n,l,c);case be.SECONDLY:return this.addSeconds(a,n,l,c,h)}},e}(Gs);function xl(r){for(var e=[],t=Object.keys(r),n=0,s=t;n<s.length;n++){var a=s[n];De(Mm,a)||e.push(a),ie.isDate(r[a])&&!ie.isValidDate(r[a])&&e.push(a)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Bt({},r)}function Sm(r){var e=Bt(Bt({},qi),xl(r));if(Ge(e.byeaster)&&(e.freq=X.YEARLY),!(Ge(e.freq)&&X.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(r.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Ge(e.wkst)?rr(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=X.MO.weekday,Ge(e.bysetpos)){rr(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var n=e.bysetpos[t];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||at(e.byweekno)||at(e.byyearday)||Boolean(e.bymonthday)||at(e.bymonthday)||Ge(e.byweekday)||Ge(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[ie.getWeekday(e.dtstart)];break}if(Ge(e.bymonth)&&!xt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ge(e.byyearday)&&!xt(e.byyearday)&&rr(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ge(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(xt(e.bymonthday)){for(var s=[],a=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ge(e.byweekno)&&!xt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ge(e.byweekday))e.bynweekday=null;else if(rr(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Ol(e.byweekday))e.byweekday=[ut.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof ut)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;t<e.byweekday.length;t++){var c=e.byweekday[t];if(rr(c)){o.push(c);continue}else if(Ol(c)){o.push(ut.fromStr(c).weekday);continue}!c.n||e.freq>X.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=at(o)?o:null,e.bynweekday=at(l)?l:null}return Ge(e.byhour)?rr(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<X.HOURLY?[e.dtstart.getUTCHours()]:null,Ge(e.byminute)?rr(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<X.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Ge(e.bysecond)?rr(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<X.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Om(r){var e=r.dtstart.getTime()%1e3;if(!Wi(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(s){r.bysecond.forEach(function(a){t.push(new Gs(n,s,a,e))})})}),t}function $i(r){var e=r.split(`
|
||
`).map(NE).filter(function(t){return t!==null});return Bt(Bt({},e[0]),e[1])}function ji(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],s=t[2];return n&&(e.tzid=n),e.dtstart=ie.untilStringToDate(s),e}function NE(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return Rm(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return Rm(r);case"DTSTART":return ji(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function Rm(r){var e=r.replace(/^RRULE:/i,""),t=ji(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(s){var a=s.split("="),o=a[0],l=a[1];switch(o.toUpperCase()){case"FREQ":t.freq=be[l.toUpperCase()];break;case"WKST":t.wkst=yr[l.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var c=CE(l),h=o.toLowerCase();t[h]=c;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=IE(l);break;case"DTSTART":case"TZID":var m=ji(r);t.tzid=m.tzid,t.dtstart=m.dtstart;break;case"UNTIL":t.until=ie.untilStringToDate(l);break;case"BYEASTER":t.byeaster=Number(l);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),t}function CE(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(xm)}return xm(r)}function xm(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function IE(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return yr[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var s=Number(n[1]),a=n[2],o=yr[a].weekday;return new ut(o,s)})}var as=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=ie.timeToUntilString(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(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),s=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),a=s.getTime()-n.getTime();return new Date(this.date.getTime()-a)},r}();function Bi(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(qi),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!De(s,n[a])){var o=n[a].toUpperCase(),l=r[n[a]],c="";if(!(!Ge(l)||xt(l)&&!l.length)){switch(o){case"FREQ":c=X.FREQUENCIES[r.freq];break;case"WKST":rr(l)?c=new ut(l).toString():c=l.toString();break;case"BYWEEKDAY":o="BYDAY",c=Zp(l).map(function(D){return D instanceof ut?D:xt(D)?new ut(D[0],D[1]):new ut(D)}).toString();break;case"DTSTART":t=FE(l,r.tzid);break;case"UNTIL":c=ie.timeToUntilString(l,!r.tzid);break;default:if(xt(l)){for(var h=[],m=0;m<l.length;m++)h[m]=String(l[m]);c=h.toString()}else c=String(l)}c&&e.push([o,c])}}var _=e.map(function(D){var v=D[0],R=D[1];return"".concat(v,"=").concat(R.toString())}).join(";"),T="";return _!==""&&(T="RRULE:".concat(_)),[t,T].filter(function(D){return!!D}).join(`
|
||
`)}function FE(r,e){return r?"DTSTART"+new as(new Date(r),e).toString():""}function LE(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var Pm=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?ie.clone(t):ie.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,s=t?Object.keys(t):[],a=function(m){for(var _=0;_<s.length;_++){var T=s[_];if(!LE(t[T],m[T]))return!0}return!1},o=this[e];if(e==="all")n=this.all;else if(xt(o))for(var l=0;l<o.length;l++){var c=o[l];if(!(s.length&&a(c))){n=c._value;break}}if(!n&&this.all){for(var h=new nn(e,t),l=0;l<this.all.length&&h.accept(this.all[l]);l++);n=h.getValue(),this._cacheAdd(e,n,t)}return xt(n)?ie.cloneDates(n):n instanceof Date?ie.clone(n):n},r}();var Am=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ee(1,31),!0),Ee(2,28),!0),Ee(3,31),!0),Ee(4,30),!0),Ee(5,31),!0),Ee(6,30),!0),Ee(7,31),!0),Ee(8,31),!0),Ee(9,30),!0),Ee(10,31),!0),Ee(11,30),!0),Ee(12,31),!0),Ee(1,7),!0),Nm=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ee(1,31),!0),Ee(2,29),!0),Ee(3,31),!0),Ee(4,30),!0),Ee(5,31),!0),Ee(6,30),!0),Ee(7,31),!0),Ee(8,31),!0),Ee(9,30),!0),Ee(10,31),!0),Ee(11,30),!0),Ee(12,31),!0),Ee(1,7),!0),YE=mr(1,29),UE=mr(1,30),Nn=mr(1,31),Yt=mr(1,32),Cm=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),UE,!0),Yt,!0),Nn,!0),Yt,!0),Nn,!0),Yt,!0),Yt,!0),Nn,!0),Yt,!0),Nn,!0),Yt,!0),Yt.slice(0,7),!0),Im=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),YE,!0),Yt,!0),Nn,!0),Yt,!0),Nn,!0),Yt,!0),Yt,!0),Nn,!0),Yt,!0),Nn,!0),Yt,!0),Yt.slice(0,7),!0),WE=mr(-28,0),qE=mr(-29,0),Cn=mr(-30,0),Ut=mr(-31,0),Fm=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),qE,!0),Ut,!0),Cn,!0),Ut,!0),Cn,!0),Ut,!0),Ut,!0),Cn,!0),Ut,!0),Cn,!0),Ut,!0),Ut.slice(0,7),!0),Lm=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),WE,!0),Ut,!0),Cn,!0),Ut,!0),Cn,!0),Ut,!0),Ut,!0),Cn,!0),Ut,!0),Cn,!0),Ut,!0),Ut.slice(0,7),!0),Ym=[0,31,60,91,121,152,182,213,244,274,305,335,366],Um=[0,31,59,90,120,151,181,212,243,273,304,334,365],Pl=function(){for(var r=[],e=0;e<55;e++)r=r.concat(mr(7));return r}();function Wm(r,e){var t=new Date(Date.UTC(r,0,1)),n=ie.isLeapYear(r)?366:365,s=ie.isLeapYear(r+1)?366:365,a=ie.toOrdinal(t),o=ie.getWeekday(t),l=Bt(Bt({yearlen:n,nextyearlen:s,yearordinal:a,yearweekday:o},jE(r)),{wnomask:null});if(nr(e.byweekno))return l;l.wnomask=Ee(0,n+7);var c,h,m=c=Lt(7-o+e.wkst,7);m>=4?(m=0,h=l.yearlen+Lt(o-e.wkst,7)):h=n-m;for(var _=Math.floor(h/7),T=Lt(h,7),D=Math.floor(_+T/4),v=0;v<e.byweekno.length;v++){var R=e.byweekno[v];if(R<0&&(R+=D+1),R>0&&R<=D){var I=void 0;R>1?(I=m+(R-1)*7,m!==c&&(I-=7-c)):I=m;for(var q=0;q<7&&(l.wnomask[I]=1,I++,l.wdaymask[I]!==e.wkst);q++);}}if(De(e.byweekno,1)){var I=m+D*7;if(m!==c&&(I-=7-c),I<n)for(var v=0;v<7&&(l.wnomask[I]=1,I+=1,l.wdaymask[I]!==e.wkst);v++);}if(m){var $=void 0;if(De(e.byweekno,-1))$=-1;else{var B=ie.getWeekday(new Date(Date.UTC(r-1,0,1))),me=Lt(7-B.valueOf()+e.wkst,7),fe=ie.isLeapYear(r-1)?366:365,ve=void 0;me>=4?(me=0,ve=fe+Lt(B-e.wkst,7)):ve=n-m,$=Math.floor(52+Lt(ve,7)/4)}if(De(e.byweekno,$))for(var I=0;I<m;I++)l.wnomask[I]=1}return l}function jE(r){var e=ie.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=ie.getWeekday(t);return e===365?{mmask:Am,mdaymask:Im,nmdaymask:Lm,wdaymask:Pl.slice(n),mrange:Um}:{mmask:Nm,mdaymask:Cm,nmdaymask:Fm,wdaymask:Pl.slice(n),mrange:Ym}}function qm(r,e,t,n,s,a){var o={lastyear:r,lastmonth:e,nwdaymask:[]},l=[];if(a.freq===X.YEARLY)if(nr(a.bymonth))l=[[0,t]];else for(var c=0;c<a.bymonth.length;c++)e=a.bymonth[c],l.push(n.slice(e-1,e+1));else a.freq===X.MONTHLY&&(l=[n.slice(e-1,e+1)]);if(nr(l))return o;o.nwdaymask=Ee(0,t);for(var c=0;c<l.length;c++)for(var h=l[c],m=h[0],_=h[1]-1,T=0;T<a.bynweekday.length;T++){var D=void 0,v=a.bynweekday[T],R=v[0],I=v[1];I<0?(D=_+(I+1)*7,D-=Lt(s[D]-R,7)):(D=m+(I-1)*7,D+=Lt(7-s[D]+R,7)),m<=D&&D<=_&&(o.nwdaymask[D]=1)}return o}function jm(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),s=r%100,a=Math.floor(n/4),o=n%4,l=Math.floor((n+8)/25),c=Math.floor((n-l+1)/3),h=Math.floor(19*t+n-a-c+15)%30,m=Math.floor(s/4),_=s%4,T=Math.floor(32+2*o+2*m-h-_)%7,D=Math.floor((t+11*h+22*T)/451),v=Math.floor((h+T-7*D+114)/31),R=(h+T-7*D+114)%31+1,I=Date.UTC(r,v-1,R+e),q=Date.UTC(r,0,1);return[Math.ceil((I-q)/(1e3*60*60*24))]}var $E=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Wm(e,n)),at(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var s=this.yearinfo,a=s.yearlen,o=s.mrange,l=s.wdaymask;this.monthinfo=qm(e,t,a,o,l,n)}Ge(n.byeaster)&&(this.eastermask=jm(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[mr(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],s=this.mrange[t],a=Ee(null,this.yearlen),o=n;o<s;o++)a[o]=o;return[a,n,s]},r.prototype.wdayset=function(e,t,n){for(var s=Ee(null,this.yearlen+7),a=ie.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,o=a,l=0;l<7&&(s[a]=a,++a,this.wdaymask[a]!==this.options.wkst);l++);return[s,o,a]},r.prototype.ddayset=function(e,t,n){var s=Ee(null,this.yearlen),a=ie.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return s[a]=a,[s,a,a+1]},r.prototype.htimeset=function(e,t,n,s){var a=this,o=[];return this.options.byminute.forEach(function(l){o=o.concat(a.mtimeset(e,l,n,s))}),ie.sort(o),o},r.prototype.mtimeset=function(e,t,n,s){var a=this.options.bysecond.map(function(o){return new Gs(e,t,o,s)});return ie.sort(a),a},r.prototype.stimeset=function(e,t,n,s){return[new Gs(e,t,n,s)]},r.prototype.getdayset=function(e){switch(e){case be.YEARLY:return this.ydayset.bind(this);case be.MONTHLY:return this.mdayset.bind(this);case be.WEEKLY:return this.wdayset.bind(this);case be.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case be.HOURLY:return this.htimeset.bind(this);case be.MINUTELY:return this.mtimeset.bind(this);case be.SECONDLY:return this.stimeset.bind(this)}},r}(),$m=$E;function Bm(r,e,t,n,s,a){for(var o=[],l=0;l<r.length;l++){var c=void 0,h=void 0,m=r[l];m<0?(c=Math.floor(m/e.length),h=Lt(m,e.length)):(c=Math.floor((m-1)/e.length),h=Lt(m-1,e.length));for(var _=[],T=t;T<n;T++){var D=a[T];!Ge(D)||_.push(D)}var v=void 0;c<0?v=_.slice(c)[0]:v=_[c];var R=e[h],I=ie.fromOrdinal(s.yearordinal+v),q=ie.combine(I,R);De(o,q)||o.push(q)}return ie.sort(o),o}function Oo(r,e){var t=e.dtstart,n=e.freq,s=e.interval,a=e.until,o=e.bysetpos,l=e.count;if(l===0||s===0)return sn(r);var c=Dm.fromDate(t),h=new $m(e);h.rebuild(c.year,c.month);for(var m=HE(h,c,e);;){var _=h.getdayset(n)(c.year,c.month,c.day),T=_[0],D=_[1],v=_[2],R=GE(T,D,v,h,e);if(at(o))for(var I=Bm(o,m,D,v,h,T),q=0;q<I.length;q++){var $=I[q];if(a&&$>a)return sn(r);if($>=t){var B=Gm($,e);if(!r.accept(B)||l&&(--l,!l))return sn(r)}}else for(var q=D;q<v;q++){var me=T[q];if(!!Ge(me))for(var fe=ie.fromOrdinal(h.yearordinal+me),ve=0;ve<m.length;ve++){var ee=m[ve],$=ie.combine(fe,ee);if(a&&$>a)return sn(r);if($>=t){var B=Gm($,e);if(!r.accept(B)||l&&(--l,!l))return sn(r)}}}if(e.interval===0||(c.add(e,R),c.year>ie.MAXYEAR))return sn(r);Wi(n)||(m=h.gettimeset(n)(c.hour,c.minute,c.second,0)),h.rebuild(c.year,c.month)}}function BE(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,h=t.byyearday;return at(n)&&!De(n,r.mmask[e])||at(s)&&!r.wnomask[e]||at(a)&&!De(a,r.wdaymask[e])||at(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!De(r.eastermask,e)||(at(l)||at(c))&&!De(l,r.mdaymask[e])&&!De(c,r.nmdaymask[e])||at(h)&&(e<r.yearlen&&!De(h,e+1)&&!De(h,-r.yearlen+e)||e>=r.yearlen&&!De(h,e+1-r.yearlen)&&!De(h,-r.nextyearlen+e-r.yearlen))}function Gm(r,e){return new as(r,e.tzid).rezonedDate()}function sn(r){return r.getValue()}function GE(r,e,t,n,s){for(var a=!1,o=e;o<t;o++){var l=r[o];a=BE(n,l,s),a&&(r[l]=null)}return a}function HE(r,e,t){var n=t.freq,s=t.byhour,a=t.byminute,o=t.bysecond;return Wi(n)?Om(t):n>=X.HOURLY&&at(s)&&!De(s,e.hour)||n>=X.MINUTELY&&at(a)&&!De(a,e.minute)||n>=X.SECONDLY&&at(o)&&!De(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var yr={MO:new ut(0),TU:new ut(1),WE:new ut(2),TH:new ut(3),FR:new ut(4),SA:new ut(5),SU:new ut(6)},qi={freq:be.YEARLY,dtstart:null,interval:1,wkst:yr.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},Mm=Object.keys(qi),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Pm,this.origOptions=xl(e);var n=Sm(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ui(e,t)},r.fromText=function(e,t){return wm(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Oo(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 Rl("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new nn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!ie.isValidDate(e)||!ie.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new Rl("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new nn("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new nn("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new nn("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Bi(this.origOptions)},r.prototype.toText=function(e,t,n){return Em(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return km(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=be.YEARLY,r.MONTHLY=be.MONTHLY,r.WEEKLY=be.WEEKLY,r.DAILY=be.DAILY,r.HOURLY=be.HOURLY,r.MINUTELY=be.MINUTELY,r.SECONDLY=be.SECONDLY,r.MO=yr.MO,r.TU=yr.TU,r.WE=yr.WE,r.TH=yr.TH,r.FR=yr.FR,r.SA=yr.SA,r.SU=yr.SU,r.parseString=$i,r.optionsToString=Bi,r}();function Hm(r,e,t,n,s,a){var o={},l=r.accept;function c(T,D){t.forEach(function(v){v.between(T,D,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var D=new as(T,a).rezonedDate();o[Number(D)]=!0}),r.accept=function(T){var D=Number(T);return isNaN(D)?l.call(this,T):!o[D]&&(c(new Date(D-1),new Date(D+1)),!o[D])?(o[D]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var D=Number(T);return o[D]?!0:(o[D]=!0,l.call(this,T))});for(var h=0;h<n.length;h++){var m=new as(n[h],a).rezonedDate();if(!r.accept(new Date(m.getTime())))break}e.forEach(function(T){Oo(r,T.options)});var _=r._result;switch(ie.sort(_),r.method){case"all":case"between":return _;case"before":return _.length&&_[_.length-1]||null;case"after":default:return _.length&&_[0]||null}}var zm={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function zE(r,e){var t=[],n=[],s=[],a=[],o=ji(r),l=o.dtstart,c=o.tzid,h=QE(r,e.unfold);return h.forEach(function(m){var _;if(!!m){var T=XE(m),D=T.name,v=T.parms,R=T.value;switch(D.toUpperCase()){case"RRULE":if(v.length)throw new Error("unsupported RRULE parm: ".concat(v.join(",")));t.push($i(m));break;case"RDATE":var I=(_=/RDATE(?:;TZID=([^:=]+))?/i.exec(m))!==null&&_!==void 0?_:[],q=I[1];q&&!c&&(c=q),n=n.concat(Vm(R,v));break;case"EXRULE":if(v.length)throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));s.push($i(R));break;case"EXDATE":a=a.concat(Vm(R,v));break;case"DTSTART":break;default:throw new Error("unsupported property: "+D)}}}),{dtstart:l,tzid:c,rrulevals:t,rdatevals:n,exrulevals:s,exdatevals:a}}function VE(r,e){var t=zE(r,e),n=t.rrulevals,s=t.rdatevals,a=t.exrulevals,o=t.exdatevals,l=t.dtstart,c=t.tzid,h=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||s.length||a.length||o.length){var m=new Nl(h);return m.dtstart(l),m.tzid(c||void 0),n.forEach(function(T){m.rrule(new X(Al(T,l,c),h))}),s.forEach(function(T){m.rdate(T)}),a.forEach(function(T){m.exrule(new X(Al(T,l,c),h))}),o.forEach(function(T){m.exdate(T)}),e.compatible&&e.dtstart&&m.rdate(l),m}var _=n[0]||{};return new X(Al(_,_.dtstart||e.dtstart||l,_.tzid||e.tzid||c),h)}function Mo(r,e){return e===void 0&&(e={}),VE(r,KE(e))}function Al(r,e,t){return Bt(Bt({},r),{dtstart:e,tzid:t})}function KE(r){var e=[],t=Object.keys(r),n=Object.keys(zm);if(t.forEach(function(s){De(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Bt(Bt({},zm),r)}function ZE(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=Xp(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function XE(r){var e=ZE(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function QE(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;n<t.length;){var s=t[n]=t[n].replace(/\s+$/g,"");s?n>0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function JE(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Vm(r,e){return JE(e),r.split(",").map(function(t){return ie.untilStringToDate(t)})}function Km(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var s=e._rrule[n].origOptions[r];if(s)return s}}}var Nl=function(r){$s(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Km.apply(n,["dtstart"]),n.tzid=Km.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return Hm(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Zm(t,this._rrule)},e.prototype.exrule=function(t){Zm(t,this._exrule)},e.prototype.rdate=function(t){Xm(t,this._rdate)},e.prototype.exdate=function(t){Xm(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Mo(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Mo(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(Bi({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
|
||
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
|
||
`).map(function(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(Qm("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Qm("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
|
||
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(X);function Zm(r,e){if(!(r instanceof X))throw new TypeError(String(r)+" is not RRule instance");De(e.map(String),String(r))||e.push(r)}function Xm(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");De(e.map(Number),Number(r))||(e.push(r),ie.sort(e))}function Qm(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),a=e.map(function(o){return ie.timeToUntilString(o.valueOf(),n)}).join(",");return"".concat(s).concat(a)}function Ur(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var Tt=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:a,dueDate:o}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=a,this.dueDate=o}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let a=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(a==null)return null;let o=a[1].trim(),l=a[2]!==void 0,c=X.parseText(o);if(c!==null){let h=null;s?h=window.moment(s):n?h=window.moment(n):t&&(h=window.moment(t)),!l&&h!==null?c.dtstart=window.moment(h).startOf("day").utc(!0).toDate():c.dtstart=window.moment().startOf("day").utc(!0).toDate();let m=new X(c);return new Tt({rrule:m,baseOnToday:l,referenceDate:h,startDate:t,scheduledDate:n,dueDate:s})}}catch(a){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),s=new X(tr(Qe({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),s)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,s=null,a=null;if(this.referenceDate){if(this.startDate){let o=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(o.asDays()),"days")}if(this.scheduledDate){let o=window.moment.duration(this.scheduledDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(o.asDays()),"days")}if(this.dueDate){let o=window.moment.duration(this.dueDate.diff(this.referenceDate));a=window.moment(e),a.add(Math.round(o.asDays()),"days")}}return{startDate:n,scheduledDate:s,dueDate:a}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Ur(this.startDate,e.startDate)!==0||Ur(this.scheduledDate,e.scheduledDate)!==0||Ur(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),a=s.match(/every( \d+)? month(s)?(.*)?/);a!==null&&(s.includes(" on ")||(n=Tt.nextAfterMonths(e,n,t,a[1])));let o=s.match(/every( \d+)? year(s)?(.*)?/);return o!==null&&(n=Tt.nextAfterYears(e,n,t,o[1])),Tt.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Tt.isSkippingTooManyMonths(e,t,a);)t=Tt.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Tt.isSkippingTooManyYears(e,t,a);)t=Tt.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 X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var Jm={prioritySymbols:{High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",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}},Gi=class{constructor(e){this.symbols=e}serialize(e){let t=new qs,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var _;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:h,dueDateSymbol:m}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"&&(T=" "+s.Low),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ae.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ae.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ae.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ae.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+m:` ${m} ${e.dueDate.format(ae.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+h:` ${h} ${e.recurrence.toText()}`:"";case"blockLink":return(_=e.blockLink)!=null?_:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}deserialize(e){let{prioritySymbols:t,TaskFormatRegularExpressions:n}=this.symbols,s,a="3",o=null,l=null,c=null,h=null,m=null,_="",T=null,D="",v=20,R=0;do{s=!1;let I=e.match(n.priorityRegex);if(I!==null){switch(I[1]){case t.Low:a="4";break;case t.Medium:a="2";break;case t.High:a="1";break}e=e.replace(n.priorityRegex,"").trim(),s=!0}let q=e.match(n.doneDateRegex);q!==null&&(h=window.moment(q[1],ae.dateFormat),e=e.replace(n.doneDateRegex,"").trim(),s=!0);let $=e.match(n.dueDateRegex);$!==null&&(c=window.moment($[1],ae.dateFormat),e=e.replace(n.dueDateRegex,"").trim(),s=!0);let B=e.match(n.scheduledDateRegex);B!==null&&(l=window.moment(B[1],ae.dateFormat),e=e.replace(n.scheduledDateRegex,"").trim(),s=!0);let me=e.match(n.startDateRegex);me!==null&&(o=window.moment(me[1],ae.dateFormat),e=e.replace(n.startDateRegex,"").trim(),s=!0);let fe=e.match(n.createdDateRegex);fe!==null&&(m=window.moment(fe[1],ae.dateFormat),e=e.replace(n.createdDateRegex,"").trim(),s=!0);let ve=e.match(n.recurrenceRegex);ve!==null&&(_=ve[1].trim(),e=e.replace(n.recurrenceRegex,"").trim(),s=!0);let ee=e.match(ae.hashTagsFromEnd);if(ee!=null){e=e.replace(ae.hashTagsFromEnd,"").trim(),s=!0;let te=ee[0].trim();D=D.length>0?[te,D].join(" "):te}R++}while(s&&R<=v);return _.length>0&&(T=Tt.fromText({recurrenceRuleText:_,startDate:o,scheduledDate:l,dueDate:c})),D.length>0&&(e+=" "+D),{description:e,priority:a,startDate:o,createdDate:m,scheduledDate:l,dueDate:c,doneDate:h,recurrence:T,tags:je.extractHashtags(e)}}};var gr=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(gr||{}),bt=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Vt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){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 Vt(new bt("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Vt(new bt("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Vt(new bt(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Vt(new bt("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Vt(new bt("/","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 gr[e]||"TODO"}static createUnknownStatus(e){return new Vt(new bt(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Vt.getTypeFromStatusTypeString(e[3]);return new Vt(new bt(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Vt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},he=Vt;he.DONE=Vt.makeDone(),he.EMPTY=Vt.makeEmpty(),he.TODO=Vt.makeTodo();var xo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var pt=class{constructor(){this.coreStatuses=[he.makeTodo().configuration,he.makeDone().configuration],this.customStatuses=[he.makeInProgress().configuration,he.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new he(e);return t.findIndex(s=>new he(s).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){pt.deleteAllCustomStatuses(e),new pt().customStatuses.forEach(n=>{pt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):pt.addStatus(e.customStatuses,he.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var ey=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Wr=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return ey.forEach(t=>{e=[...e,new Wr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Wr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Wr.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 Fn={tasksPluginEmoji:{displayName:"Default",taskSerializer:new Gi(Jm)}},tk={globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new pt,features:Wr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new xo},In=Qe({},tk),se=()=>{for(let r in Wr.settingsFlags)In.features[r]===void 0&&(In.features[r]=Wr.settingsFlags[r]);return In.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=he.getTypeFromStatusTypeString(r.type);t[e]=new bt((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Qe({},In)},Gt=r=>(In=Qe(Qe({},In),r),se());var os=(r,e)=>(In.generalSettings[r]=e,se()),ty=r=>{var e;return(e=In.features[r])!=null?e:!1};function Cl(){return Fn[se().taskFormat]}var $e=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==he.EMPTY.symbol)}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof he?this._registeredStatuses.push(e):this._registeredStatuses.push(new he(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):he.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):he.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:he.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 he.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:he.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new $e,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=$e.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new bt(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new he(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(){[he.makeTodo(),he.makeInProgress(),he.makeDone(),he.makeCancelled()].forEach(t=>{this.add(t)})}};var on=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/on.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*on.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*on.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*on.startedCoefficient),e.priority){case"1":t+=1*on.priorityCoefficient;break;case"2":t+=.65*on.priorityCoefficient;break;case"3":t+=.325*on.priorityCoefficient;break}return t}},an=on;an.dueCoefficient=12,an.scheduledCoefficient=5,an.startedCoefficient=-3,an.priorityCoefficient=6,an.milliSecondsPerDay=1e3*60*60*24;var cy=require("obsidian");var zi=require("obsidian");var iy=ns(Fl()),rk=require("obsidian"),ay=ns(sy());var Ll=class extends ay.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new Yl(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,iy.default)().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)}},Po=new Ll,Yl=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e)<this.minLevel)return;let a={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",a)}trace(e,t){this.log("trace",e,t)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}logWithId(e,t,n,s){if(this.levelToInt(e)<this.minLevel)return;let o={level:e,module:this.module,message:n,objects:s,traceId:t};this.logManager.emit("log",o)}traceWithId(e,t,n){this.logWithId("trace",e,t,n)}debugWithId(e,t,n){this.logWithId("debug",e,t,n)}infoWithId(e,t,n){this.logWithId("info",e,t,n)}warnWithId(e,t,n){this.logWithId("warn",e,t,n)}errorWithId(e,t,n){this.logWithId("error",e,t,n)}};var Wl,ql,jl,nk=["md"],Hi=Po.getLogger("tasks"),oy=({metadataCache:r,vault:e,workspace:t})=>{Wl=r,ql=e,jl=t},Ao=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(ql===void 0||Wl===void 0||jl===void 0){$l("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Hi.debug(`replaceTaskWithTasks entered. ${r.path}`),uy({originalTask:r,newTasks:e,vault:ql,metadataCache:Wl,workspace:jl,previousTries:0})});function $l(r){console.error(r),new zi.Notice(r,15e3)}function Ul(r){console.warn(r),new zi.Notice(r,1e4)}function sk(r){Hi.debug(r)}var uy=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){Hi.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>10){let I=`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.
|
||
`;$l(I);return}let R=Math.min(Math.pow(10,a),100);Hi.debug(`timeout = ${R}`),setTimeout(()=>{uy({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof zi.TFile))return Ul(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!nk.includes(c.extension)){$l(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let h=n.getFileCache(c);if(h==null||h===null)return Ul(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let m=h.listItems;if(m===void 0||m.length===0)return Ul(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(`
|
||
`),D=ik(r,T,m,sk);if(D===void 0)return l();let v=[...T.slice(0,D),...e.map(R=>R.toFileLineString()),...T.slice(D+1)];yield t.modify(c,v.join(`
|
||
`))});function ly(r,e){return r<e.length}function ik(r,e,t,n){let s=ak(r,e);return s!==void 0||(s=ok(r,e),s!==void 0)?s:uk(r,e,t,n)}function ak(r,e){let t=r.taskLocation.lineNumber;if(ly(t,e)&&e[t]===r.originalMarkdown)return Hi.debug(`Found original markdown at original line number ${t}`),t}function ok(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function uk(r,e,t,n){let{globalFilter:s}=se(),a,o=0;for(let l of t){let c=l.position.start.line;if(!ly(c,e))return;if(c<r.taskLocation.sectionStart||l.task===void 0)continue;let h=e[c];if(h.includes(s)){if(o===r.taskLocation.sectionIndex){if(h===r.originalMarkdown)a=c;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
|
||
Expected task:
|
||
${r.originalMarkdown}
|
||
Found task:
|
||
${h}`);return}break}o++}}return a}function lk(r,e,t){return J(this,null,function*(){yield cy.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function dy(r,e,t=null){return J(this,null,function*(){var o;t||(t=lk);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");n.appendChild(s),s.classList.add("tasks-list-text"),yield ck(r,e,s,t);let a=document.createElement("input");return n.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",r.status.symbol!==" "&&(a.checked=!0,n.classList.add("is-checked")),a.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),a.disabled=!0;let c=r.toggle();Ao({originalTask:r,newTasks:c})}),n.prepend(a),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),a.setAttribute("data-line",e.listIndex.toString()),(o=e.layoutOptions)!=null&&o.shortMode&&fk({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function ck(r,e,t,n){return J(this,null,function*(){let s="",a=new qs(e.layoutOptions),o=Fn.tasksPluginEmoji.taskSerializer;for(let c of a.layoutComponents){let h=o.componentToString(r,a,c);h&&(c==="description"&&(h=hk(h)),s+=h)}let{debugSettings:l}=se();l.showTaskHiddenData&&(s+=`<br>\u{1F41B} <b>${r.lineNumber}</b> . ${r.sectionStart} . ${r.sectionIndex} . '<code>${r.originalMarkdown}</code>'<br>'<code>${r.path}</code>' > '<code>${r.precedingHeader}</code>'<br>`),yield dk(t,s,"description",r,n)})}function dk(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){yield s(e,r,n.path);let a=r.querySelector("blockquote"),o=a!=null?a:r,l=o.querySelector("p");if(l!==null){for(;l.firstChild;)o.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 fk({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=Fn.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let h=e.createDiv();h.addClasses(["tooltip","pop-up"]),r.recurrence&&h.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&h.createDiv().setText(Vi({signifier:a,date:r.createdDate})),r.startDate&&h.createDiv().setText(Vi({signifier:s,date:r.startDate})),r.scheduledDate&&h.createDiv().setText(Vi({signifier:o,date:r.scheduledDate})),r.dueDate&&h.createDiv().setText(Vi({signifier:l,date:r.dueDate})),r.doneDate&&h.createDiv().setText(Vi({signifier:c,date:r.doneDate}));let m=r.getLinkText({isFilenameUnique:t});m&&h.createDiv().setText(`\u{1F517} ${m}`),e.addEventListener("mouseleave",()=>{h.remove()})})}function Vi({signifier:r,date:e}){return`${r} ${e.format(ae.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function hk(r){let{globalFilter:e,removeGlobalFilter:t}=se();return t?r.replace(e,"").trim():r}var Kt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=se();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("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new je(tr(Qe({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new je(tr(Qe({},s),{scheduledDateIsInferred:!1}))),s))}};function No(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var sr=class{},ae=sr;ae.dateFormat="YYYY-MM-DD",ae.indentationRegex=/^([\s\t>]*)/,ae.listMarkerRegex=/([-*]|[0-9]+\.)/,ae.checkboxRegex=/\[(.)\]/u,ae.afterCheckboxRegex=/ *(.*)/u,ae.taskRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source+" +"+sr.checkboxRegex.source+sr.afterCheckboxRegex.source,"u"),ae.nonTaskRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source+"? *("+sr.checkboxRegex.source+")?"+sr.afterCheckboxRegex.source,"u"),ae.listItemRegex=new RegExp(sr.indentationRegex.source+sr.listMarkerRegex.source),ae.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ae.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ae.hashTagsFromEnd=new RegExp(sr.hashTags.source+"$");var je=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:h,dueDate:m,doneDate:_,recurrence:T,blockLink:D,tags:v,originalMarkdown:R,scheduledDateIsInferred:I}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=v,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=h,this.dueDate=m,this.doneDate=_,this.recurrence=T,this.blockLink=D,this.originalMarkdown=R,this.scheduledDateIsInferred=I}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ae.taskRegex);if(s===null)return null;let a=s[4].trim(),{globalFilter:o}=se();if(!a.includes(o))return null;let l=a,c=s[1],h=s[2],m=s[3],_=$e.getInstance().bySymbolOrCreate(m),T=l.match(ae.blockLinkRegex),D=T!==null?T[0]:"";D!==""&&(l=l.replace(ae.blockLinkRegex,"").trim());let{taskSerializer:v}=Cl(),R=v.deserialize(l),I=!1;return Kt.canApplyFallback(R)&&n!==null&&(R.scheduledDate=n,I=!0),R.tags=R.tags.map(q=>q.trim()),o&&(R.tags=R.tags.filter(q=>q!==o)),new je(tr(Qe({},R),{status:_,indentation:c,listMarker:h,taskLocation:t,blockLink:D,originalMarkdown:e,scheduledDateIsInferred:I}))}toLi(e){return J(this,null,function*(){return dy(this,e)})}toString(){return Cl().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=$e.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=se();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new je(tr(Qe({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=se(),l=null;o&&(l=window.moment());let c=$e.getInstance().getNextStatusOrCreate(e),h=new je(tr(Qe(Qe({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(h)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=an.calculate(this)),this._urgency}get path(){return this.taskLocation.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,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if(Ur(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ae.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=se(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+No(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var Ki=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Pt=class{constructor(e,t,n,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}static fromUnknownPosition(e){return new Pt(e,0,0,0,null)}fromRenamedFile(e){return new Pt(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 us=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 vo,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",()=>J(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}=se(),t=this.vault.on("create",a=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof zs.TFile&&this.tasksMutex.runExclusive(()=>{let l=new Ki(()=>Kt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Kt.updateTaskPath(c,a.path,l.value):new je(tr(Qe({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(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 J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}je.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(`
|
||
`),l=o.length,c=new Ki(()=>Kt.fromPath(s.path)),h=null,m=0;for(let _ of t)if(_.task!==void 0){let T=_.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((h===null||h.position.end.line<T)&&(h=us.getSection(T,n.sections),m=0),h===null)continue;let D=o[T];if(D===void 0){console.log(`${s.path}: line ${T} - ignoring 'undefined' line.`);continue}let v;try{v=je.fromLine({line:D,taskLocation:new Pt(s.path,T,h.position.start.line,m,us.getPrecedingHeader(T,n.headings)),fallbackDate:c.value})}catch(R){this.reportTaskParsingErrorToUser(R,s,_,D);continue}v!==null&&(m++,a.push(v))}return a}reportTaskParsingErrorToUser(e,t,n,s){let a=`There was an error reading one of the tasks in this vault.
|
||
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
|
||
Error: ${e}
|
||
File: ${t.path}
|
||
Line number: ${n.position.start.line}
|
||
Task line: ${s}
|
||
|
||
Please create a bug report for this message at
|
||
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose
|
||
to help us find and fix the underlying issue.
|
||
|
||
Include:
|
||
- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine.
|
||
- the output from running the Obsidian command 'Show debug info'
|
||
|
||
The error popup will only be shown when Tasks is starting up, but if the error persists,
|
||
it will be shown in the console every time this file is edited during the Obsidian
|
||
session.
|
||
`;console.error(a),e instanceof Error&&console.error(e.stack),this.state==="Initializing"&&new zs.Notice(a,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var Bh=require("obsidian");var iv=require("obsidian");function cs(){}function Hl(r){return r()}function py(){return Object.create(null)}function ds(r){r.forEach(Hl)}function yy(r){return typeof r=="function"}function gy(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function _y(r){return Object.keys(r).length===0}var Ty=!1;function pk(){Ty=!0}function mk(){Ty=!1}function L(r,e){r.appendChild(e)}function Vs(r,e,t){r.insertBefore(e,t||null)}function fs(r){r.parentNode.removeChild(r)}function zl(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function oe(r){return document.createElement(r)}function yk(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Zt(r){return document.createTextNode(r)}function Se(){return Zt(" ")}function Ht(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function by(r){return function(e){return e.preventDefault(),r.call(this,e)}}function z(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function gk(r){return Array.from(r.childNodes)}function Vl(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Or(r,e){r.value=e==null?"":e}function Kl(r,e){for(let t=0;t<r.options.length;t+=1){let n=r.options[t];if(n.__value===e){n.selected=!0;return}}r.selectedIndex=-1}function vy(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}function Mr(r,e,t){r.classList[t?"add":"remove"](e)}var ls=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=yk(t.nodeName):this.e=oe(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Vs(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(fs)}};var Qi;function Xi(r){Qi=r}function _k(){if(!Qi)throw new Error("Function called outside component initialization");return Qi}function Zl(r){_k().$$.on_mount.push(r)}var Zi=[];var Fo=[],Io=[],my=[],Tk=Promise.resolve(),Gl=!1;function bk(){Gl||(Gl=!0,Tk.then(wy))}function Ji(r){Io.push(r)}var Bl=new Set,Co=0;function wy(){let r=Qi;do{for(;Co<Zi.length;){let e=Zi[Co];Co++,Xi(e),vk(e.$$)}for(Xi(null),Zi.length=0,Co=0;Fo.length;)Fo.pop()();for(let e=0;e<Io.length;e+=1){let t=Io[e];Bl.has(t)||(Bl.add(t),t())}Io.length=0}while(Zi.length);for(;my.length;)my.pop()();Gl=!1,Bl.clear(),Xi(r)}function vk(r){if(r.fragment!==null){r.update(),ds(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Ji)}}var wk=new Set;function Ek(r,e){r&&r.i&&(wk.delete(r),r.i(e))}var bU=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function kk(r,e,t,n){let{fragment:s,on_mount:a,on_destroy:o,after_update:l}=r.$$;s&&s.m(e,t),n||Ji(()=>{let c=a.map(Hl).filter(yy);o?o.push(...c):ds(c),r.$$.on_mount=[]}),l.forEach(Ji)}function Ey(r,e){let t=r.$$;t.fragment!==null&&(ds(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Dk(r,e){r.$$.dirty[0]===-1&&(Zi.push(r),bk(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function ky(r,e,t,n,s,a,o,l=[-1]){let c=Qi;Xi(r);let h=r.$$={fragment:null,ctx:null,props:a,update:cs,not_equal:s,bound:py(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:py(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};o&&o(h.root);let m=!1;if(h.ctx=t?t(r,e.props||{},(_,T,...D)=>{let v=D.length?D[0]:T;return h.ctx&&s(h.ctx[_],h.ctx[_]=v)&&(!h.skip_bound&&h.bound[_]&&h.bound[_](v),m&&Dk(r,_)),T}):[],h.update(),m=!0,ds(h.before_update),h.fragment=n?n(h.ctx):!1,e.target){if(e.hydrate){pk();let _=gk(e.target);h.fragment&&h.fragment.l(_),_.forEach(fs)}else h.fragment&&h.fragment.c();e.intro&&Ek(r.$$.fragment),kk(r,e.target,e.anchor,e.customElement),mk(),wy()}Xi(c)}var Sk;typeof HTMLElement=="function"&&(Sk=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Hl).filter(yy);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){ds(this.$$.on_disconnect)}$destroy(){Ey(this,1),this.$destroy=cs}$on(r,e){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&&!_y(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Lo=class{$destroy(){Ey(this,1),this.$destroy=cs}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!_y(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var jh=ns(mt());var BI={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function di(r){for(let[e,t]of Object.entries(BI))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function ev(r,e,t){let n=r.slice();return n[45]=e[t],n}function tv(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n}function GI(r){let e,t=r[50]+"",n;return{c(){e=oe("span"),n=Zt(t)},m(s,a){Vs(s,e,a),L(e,n)},p:cs,d(s){s&&fs(e)}}}function rv(r){let e,t,n,s,a,o,l,c,h=r[49]+"",m,_,T=r[50]&&r[50].charCodeAt(0)>=256,D,v,R,I,q=T&&GI(r);return{c(){e=oe("span"),t=oe("input"),o=Se(),l=oe("label"),c=oe("span"),m=Zt(h),_=Se(),q&&q.c(),v=Se(),z(t,"type","radio"),z(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,z(t,"accesskey",a=r[15](r[49].charAt(0).toLowerCase())),r[33][0].push(t),z(c,"class","accesskey-first"),z(l,"for",D="priority-"+r[48])},m($,B){Vs($,e,B),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,m),L(l,_),q&&q.m(l,null),L(e,v),R||(I=Ht(t,"change",r[32]),R=!0)},p($,B){B[0]&32768&&a!==(a=$[15]($[49].charAt(0).toLowerCase()))&&z(t,"accesskey",a),B[0]&3&&(t.checked=t.__value===$[1].priority),T&&q.p($,B)},d($){$&&fs(e),r[33][0].splice(r[33][0].indexOf(t),1),q&&q.d(),R=!1,I()}}}function nv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=oe("option"),n=Zt(t),s=Zt(" ["),o=Zt(a),l=Zt("]"),e.__value=c=r[45],e.value=e.__value},m(h,m){Vs(h,e,m),L(e,n),L(e,s),L(e,o),L(e,l)},p(h,m){m[0]&1&&t!==(t=h[45].name+"")&&Vl(n,t),m[0]&1&&a!==(a=h[45].symbol+"")&&Vl(o,a),m[0]&1&&c!==(c=h[45])&&(e.__value=c,e.value=e.__value)},d(h){h&&fs(e)}}}function HI(r){let e,t,n,s,a,o,l,c,h,m,_,T,D,v,R,I,q,$,B,me,fe,ve,ee,te,It,yt,V,W,P,Q,Y,ue,y,g,w,E,S,M,k,C,A,N,j,ke,ye,ce,Ie,K,We,Je,Ke,Dr,Mt,Ae,st,gt,kn,Ri,qe,Ns,Kn,ft,de,Vr,Rt,Zn,so,Lr,Dn,_t,xi,cr,Kr,Le,Sn,Cs,Xn,On,Qn,dr,Mn,io,Zr,ao,fr,hr,H,Is,oo,ht,Jn,Ne,pr=r[20],Ft=[];for(let G=0;G<pr.length;G+=1)Ft[G]=rv(tv(r,pr,G));let et=r[0],Ze=[];for(let G=0;G<et.length;G+=1)Ze[G]=nv(ev(r,et,G));return{c(){e=oe("div"),t=oe("form"),n=oe("div"),s=oe("label"),s.innerHTML='Descrip<span class="accesskey">t</span>ion',a=Se(),o=oe("textarea"),c=Se(),h=oe("div"),m=oe("label"),_=Zt("Priority"),D=Se();for(let G=0;G<Ft.length;G+=1)Ft[G].c();v=Se(),R=oe("div"),I=oe("label"),I.textContent="Recurs",q=Se(),$=oe("input"),me=Se(),fe=oe("code"),ve=Zt(r[16]),ee=Se(),te=new ls(!1),It=Se(),yt=oe("label"),yt.textContent="Due",V=Se(),W=oe("input"),Q=Se(),Y=oe("code"),ue=Zt(r[19]),y=Se(),g=new ls(!1),w=Se(),E=oe("label"),E.textContent="Scheduled",S=Se(),M=oe("input"),C=Se(),A=oe("code"),N=Zt(r[18]),j=Se(),ke=new ls(!1),ye=Se(),ce=oe("label"),ce.innerHTML='St<span class="accesskey">a</span>rt',Ie=Se(),K=oe("input"),Je=Se(),Ke=oe("code"),Dr=Zt(r[17]),Mt=Se(),Ae=new ls(!1),st=Se(),gt=oe("div"),kn=oe("label"),kn.innerHTML=`Only
|
||
<span class="accesskey-first">future</span> dates:`,Ri=Se(),qe=oe("input"),Kn=Se(),ft=oe("div"),de=oe("label"),de.innerHTML='Stat<span class="accesskey">u</span>s',Vr=Se(),Rt=oe("select");for(let G=0;G<Ze.length;G+=1)Ze[G].c();so=Se(),Lr=oe("div"),Dn=oe("div"),_t=oe("label"),_t.textContent="Completed:",xi=Se(),cr=oe("input"),Le=Se(),Sn=oe("div"),Cs=oe("span"),Cs.textContent="Created on:",Xn=Se(),On=oe("code"),Qn=Se(),dr=oe("div"),Mn=oe("span"),Mn.textContent="Done on:",io=Se(),Zr=oe("code"),ao=Se(),fr=oe("div"),hr=oe("button"),H=Zt("Apply"),oo=Se(),ht=oe("button"),ht.textContent="Cancel",z(s,"for","description"),z(o,"id","description"),z(o,"type","text"),z(o,"class","tasks-modal-description"),z(o,"placeholder","Take out the trash"),z(o,"accesskey",l=r[15]("t")),z(n,"class","tasks-modal-section"),z(m,"for",T="priority-"+r[1].priority),z(h,"class","tasks-modal-section tasks-modal-priorities"),z(I,"for","recurrence"),z(I,"class","accesskey-first"),z($,"id","recurrence"),z($,"type","text"),z($,"placeholder","Try 'every 2 weeks on Thursday'."),z($,"accesskey",B=r[15]("r")),Mr($,"tasks-modal-error",!r[8]),te.a=null,z(yt,"for","due"),z(yt,"class","accesskey-first"),z(W,"id","due"),z(W,"type","text"),z(W,"placeholder",qh),z(W,"accesskey",P=r[15]("d")),Mr(W,"tasks-modal-error",!r[7]),g.a=null,z(E,"for","scheduled"),z(E,"class","accesskey-first"),z(M,"id","scheduled"),z(M,"type","text"),z(M,"placeholder",qh),z(M,"accesskey",k=r[15]("s")),Mr(M,"tasks-modal-error",!r[5]),ke.a=null,z(ce,"for","start"),z(K,"id","start"),z(K,"type","text"),z(K,"placeholder",qh),z(K,"accesskey",We=r[15]("a")),Mr(K,"tasks-modal-error",!r[3]),Ae.a=null,z(kn,"for","forwardOnly"),z(qe,"id","forwardOnly"),z(qe,"type","checkbox"),z(qe,"class","task-list-item-checkbox tasks-modal-checkbox"),z(qe,"accesskey",Ns=r[15]("f")),z(R,"class","tasks-modal-section tasks-modal-dates"),z(de,"for","status"),z(Rt,"id","status-type"),z(Rt,"class","dropdown"),z(Rt,"accesskey",Zn=r[15]("u")),r[1].status===void 0&&Ji(()=>r[39].call(Rt)),z(ft,"class","tasks-modal-section"),z(_t,"for","status"),z(cr,"id","status"),z(cr,"type","checkbox"),z(cr,"class","task-list-item-checkbox tasks-modal-checkbox"),cr.checked=Kr=r[1].status.isCompleted(),cr.disabled=!0,z(Lr,"class","tasks-modal-section tasks-modal-status"),hr.disabled=Is=!r[14],z(hr,"type","submit"),z(hr,"class","mod-cta"),z(ht,"type","button"),z(fr,"class","tasks-modal-section tasks-modal-buttons"),Mr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,ne){Vs(G,e,ne),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Or(o,r[1].description),r[31](o),L(t,c),L(t,h),L(h,m),L(m,_),L(h,D);for(let le=0;le<Ft.length;le+=1)Ft[le].m(h,null);L(t,v),L(t,R),L(R,I),L(R,q),L(R,$),Or($,r[1].recurrenceRule),L(R,me),L(R,fe),L(fe,ve),L(fe,ee),te.m(r[12],fe),L(R,It),L(R,yt),L(R,V),L(R,W),Or(W,r[1].dueDate),L(R,Q),L(R,Y),L(Y,ue),L(Y,y),g.m(r[6],Y),L(R,w),L(R,E),L(R,S),L(R,M),Or(M,r[1].scheduledDate),L(R,C),L(R,A),L(A,N),L(A,j),ke.m(r[4],A),L(R,ye),L(R,ce),L(R,Ie),L(R,K),Or(K,r[1].startDate),L(R,Je),L(R,Ke),L(Ke,Dr),L(Ke,Mt),Ae.m(r[2],Ke),L(R,st),L(R,gt),L(gt,kn),L(gt,Ri),L(gt,qe),qe.checked=r[1].forwardOnly,L(t,Kn),L(t,ft),L(ft,de),L(ft,Vr),L(ft,Rt);for(let le=0;le<Ze.length;le+=1)Ze[le].m(Rt,null);Kl(Rt,r[1].status),L(t,so),L(t,Lr),L(Lr,Dn),L(Dn,_t),L(Dn,xi),L(Dn,cr),L(Lr,Le),L(Lr,Sn),L(Sn,Cs),L(Sn,Xn),L(Sn,On),On.innerHTML=r[11],L(Lr,Qn),L(Lr,dr),L(dr,Mn),L(dr,io),L(dr,Zr),Zr.innerHTML=r[13],L(t,ao),L(t,fr),L(fr,hr),L(hr,H),L(fr,oo),L(fr,ht),Jn||(Ne=[Ht(o,"input",r[30]),Ht(o,"keydown",r[23]),Ht(o,"paste",r[24]),Ht(o,"drop",r[24]),Ht(h,"keyup",r[21]),Ht($,"input",r[34]),Ht(W,"input",r[35]),Ht(M,"input",r[36]),Ht(K,"input",r[37]),Ht(qe,"change",r[38]),Ht(Rt,"change",r[39]),Ht(ht,"click",r[22]),Ht(t,"submit",by(r[25]))],Jn=!0)},p(G,ne){if(ne[0]&32768&&l!==(l=G[15]("t"))&&z(o,"accesskey",l),ne[0]&3&&Or(o,G[1].description),ne[0]&3&&T!==(T="priority-"+G[1].priority)&&z(m,"for",T),ne[0]&1081346){pr=G[20];let le;for(le=0;le<pr.length;le+=1){let jt=tv(G,pr,le);Ft[le]?Ft[le].p(jt,ne):(Ft[le]=rv(jt),Ft[le].c(),Ft[le].m(h,null))}for(;le<Ft.length;le+=1)Ft[le].d(1);Ft.length=pr.length}if(ne[0]&32768&&B!==(B=G[15]("r"))&&z($,"accesskey",B),ne[0]&3&&$.value!==G[1].recurrenceRule&&Or($,G[1].recurrenceRule),ne[0]&256&&Mr($,"tasks-modal-error",!G[8]),ne[0]&4096&&te.p(G[12]),ne[0]&32768&&P!==(P=G[15]("d"))&&z(W,"accesskey",P),ne[0]&3&&W.value!==G[1].dueDate&&Or(W,G[1].dueDate),ne[0]&128&&Mr(W,"tasks-modal-error",!G[7]),ne[0]&64&&g.p(G[6]),ne[0]&32768&&k!==(k=G[15]("s"))&&z(M,"accesskey",k),ne[0]&3&&M.value!==G[1].scheduledDate&&Or(M,G[1].scheduledDate),ne[0]&32&&Mr(M,"tasks-modal-error",!G[5]),ne[0]&16&&ke.p(G[4]),ne[0]&32768&&We!==(We=G[15]("a"))&&z(K,"accesskey",We),ne[0]&3&&K.value!==G[1].startDate&&Or(K,G[1].startDate),ne[0]&8&&Mr(K,"tasks-modal-error",!G[3]),ne[0]&4&&Ae.p(G[2]),ne[0]&32768&&Ns!==(Ns=G[15]("f"))&&z(qe,"accesskey",Ns),ne[0]&3&&(qe.checked=G[1].forwardOnly),ne[0]&1){et=G[0];let le;for(le=0;le<et.length;le+=1){let jt=ev(G,et,le);Ze[le]?Ze[le].p(jt,ne):(Ze[le]=nv(jt),Ze[le].c(),Ze[le].m(Rt,null))}for(;le<Ze.length;le+=1)Ze[le].d(1);Ze.length=et.length}ne[0]&32768&&Zn!==(Zn=G[15]("u"))&&z(Rt,"accesskey",Zn),ne[0]&3&&Kl(Rt,G[1].status),ne[0]&3&&Kr!==(Kr=G[1].status.isCompleted())&&(cr.checked=Kr),ne[0]&2048&&(On.innerHTML=G[11]),ne[0]&8192&&(Zr.innerHTML=G[13]),ne[0]&16384&&Is!==(Is=!G[14])&&(hr.disabled=Is),ne[0]&512&&Mr(t,"with-accesskeys",G[9])},i:cs,o:cs,d(G){G&&fs(e),r[31](null),zl(Ft,G),zl(Ze,G),Jn=!1,ds(Ne)}}}var qh="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function zI(r,e,t){let n;var s;let{task:a}=e,{onSubmit:o}=e,{statusOptions:l}=e,{prioritySymbols:c,recurrenceSymbol:h,startDateSymbol:m,scheduledDateSymbol:_,dueDateSymbol:T}=Fn.tasksPluginEmoji.taskSerializer.symbols,D,v={description:"",status:he.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},R=!0,I="",q="",$=!0,B="",me=!0,fe="",ve=!0,ee="",te=!0,It="",yt=!1,V=!0,W=!0,P=[{value:"low",label:"Low",symbol:c.Low},{value:"none",label:"Normal",symbol:c.None},{value:"medium",label:"Medium",symbol:c.Medium},{value:"high",label:"High",symbol:c.High}];function Q(K,We,Je=void 0){if(!We)return`<i>no ${K} date</i>`;let Ke=jh.parseDate(We,Je,{forwardDate:Je!=null});return Ke!==null?window.moment(Ke).format("YYYY-MM-DD"):`<i>invalid ${K} date</i>`}function Y(K,We){return Q(K,We,v.forwardOnly?new Date:void 0)}function ue(K){let We=null,Je=jh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Je!==null&&(We=window.moment(Je)),We}Zl(()=>{let{globalFilter:K,provideAccessKeys:We}=se();t(9,V=We);let Je=a.getDescriptionWithoutGlobalFilter();(Je!=a.description||Je.indexOf(K)==-1)&&(yt=!0);let Ke="none";a.priority==="4"?Ke="low":a.priority==="2"?Ke="medium":a.priority==="1"&&(Ke="high"),t(1,v={description:Je,status:a.status,priority:Ke,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{D.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let We=P.find(Je=>Je.label.charAt(0).toLowerCase()==K.key);We&&t(1,v.priority=We.value,v)}},g=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),W&&S())},E=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},S=()=>{let{globalFilter:K}=se(),We=v.description.trim();yt&&(We=K+" "+We);let Je=ue(v.startDate),Ke=ue(v.scheduledDate),Dr=ue(v.dueDate),Mt=null;v.recurrenceRule&&(Mt=Tt.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Je,scheduledDate:Ke,dueDate:Dr}));let Ae;switch(v.priority){case"low":Ae="4";break;case"medium":Ae="2";break;case"high":Ae="1";break;default:Ae="3"}let st=new je(Object.assign(Object.assign({},a),{description:We,status:v.status,priority:Ae,recurrence:Mt,startDate:Je,scheduledDate:Ke,dueDate:Dr,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([st])},M=[[]];function k(){v.description=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function C(K){Fo[K?"unshift":"push"](()=>{D=K,t(10,D)})}function A(){v.priority=this.__value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function N(){v.recurrenceRule=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function j(){v.dueDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ke(){v.scheduledDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ye(){v.startDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ce(){v.forwardOnly=this.checked,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function Ie(){v.status=vy(this),t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}return r.$$set=K=>{"task"in K&&t(26,a=K.task),"onSubmit"in K&&t(27,o=K.onSubmit),"statusOptions"in K&&t(0,l=K.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=K=>V?K:null)}if(r.$$.dirty[0]&66){e:t(1,v.dueDate=di(v.dueDate),v),t(6,fe=Y("due",v.dueDate)),t(7,ve=!fe.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.startDate=di(v.startDate),v),t(2,q=Y("start",v.startDate)),t(3,$=!q.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=di(v.scheduledDate),v),t(4,B=Y("scheduled",v.scheduledDate)),t(5,me=!B.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,te=!0),!v.recurrenceRule)t(12,ee="<i>not recurring</>");else{let K=t(28,s=Tt.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();K?t(12,ee=K):(t(12,ee="<i>invalid recurrence rule</i>"),t(8,te=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,W=ve&&te&&me&&$&&R)}if(r.$$.dirty[0]&2){e:t(11,I=Q("created",v.createdDate)),t(13,It=Q("done",v.doneDate))}},[l,v,q,$,B,me,fe,ve,te,V,D,I,ee,It,W,n,h,m,_,T,P,y,g,w,E,S,a,o,s,R,k,C,A,M,N,j,ke,ye,ce,Ie]}var $h=class extends Lo{constructor(e){super(),ky(this,e,zI,HI,gy,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},sv=$h;var Bn=class extends iv.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new sv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=$e.getInstance().registeredStatuses;return $e.getInstance().bySymbol(this.task.status.symbol)===he.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Ru=({line:r,path:e})=>{var v,R;let t=Kt.fromPath(e),n=je.fromLine({line:r,taskLocation:Pt.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=se(),a=null;s&&(a=window.moment());let o=r.match(ae.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new je({status:he.TODO,description:"",taskLocation:Pt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(v=o[2])!=null?v:"-",h=(R=o[4])!=null?R:" ",m=$e.getInstance().bySymbolOrCreate(h),_=o[5],T=r.match(ae.blockLinkRegex),D=T!==null?T[0]:"";return D!==""&&(_=_.replace(ae.blockLinkRegex,"")),new je({status:m,description:_,taskLocation:Pt.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:D,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var av=(r,e,t,n)=>{var _;if(r)return t instanceof Bh.MarkdownView;if(!(t instanceof Bh.MarkdownView))return;let s=(_=t.file)==null?void 0:_.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=Ru({line:l,path:s}),h=T=>{let D=Kt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(`
|
||
`);e.setLine(o,D)};new Bn({app:n,task:c,onSubmit:h}).open()};var Gh=require("obsidian");var ov=(r,e,t)=>{var c;if(r)return t instanceof Gh.MarkdownView;if(!(t instanceof Gh.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=VI(o,n);e.setLine(a,l.text),e.setCursor(KI(s,l))},VI=(r,e)=>{let t=je.fromLine({line:r,taskLocation:Pt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggle().map(s=>s.toFileLineString());return{text:n.join(`
|
||
`),moveTo:{line:n.length-1}}}else{let n=r.match(ae.taskRegex);if(n!==null){let s=n[3],o=$e.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ae.taskRegex,`$1- [${o}] $4`)}}else if(ae.listItemRegex.test(r)){let s=r.replace(ae.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ae.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},KI=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Qe(Qe({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(`
|
||
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var xu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,s)=>av(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:ov})}};var Pu=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 Au=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var m;let{globalFilter:n}=se(),s=e.findAll(".task-list-item").filter(_=>{var v;let T=(v=_.textContent)==null?void 0:v.split(`
|
||
`);if(T===void 0)return!1;let D=null;for(let R=0;R<T.length;R=R+1)if(T[R]!==""){D=T[R];break}return D===null?!1:D.includes(n)});if(s.length===0)return;let a=t.sourcePath,o=t.getSectionInfo(e);if(o===null)return;let l=o.text.split(`
|
||
`),c=0,h=[];for(let _=o.lineStart;_<=o.lineEnd;_++){let T=l[_];if(T===void 0)continue;let D=null,v=je.fromLine({line:T,taskLocation:new Pt(a,_,o.lineStart,c,D),fallbackDate:null});v!==null&&(h.push(v),c++)}for(let _=0;_<s.length;_++){let T=h[_],D=s[_];if(T===void 0||D===void 0)continue;let v=(m=D.getAttr("data-line"))!=null?m:"0",R=Number.parseInt(v,10),I=yield T.toLi({parentUlElement:e,listIndex:R}),q=D.childNodes;for(let me=0;me<q.length;me=me+1){let fe=q[me];fe.nodeName.toLowerCase()==="div"?I.prepend(fe):fe.nodeName.toLowerCase()==="ul"&&I.append(fe)}let $=D.querySelectorAll("[data-footnote-id]"),B=I.querySelectorAll("[data-footnote-id]");if($.length===B.length)for(let me=0;me<$.length;me++)B[me].replaceWith($[me]);D.replaceWith(I)}})}};var uv=require("@codemirror/view"),lv=require("obsidian");var cv=()=>uv.ViewPlugin.fromClass(Hh),Hh=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 T=`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(T),new lv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=je.fromLine({line:o.text,taskLocation:Pt.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let h=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),m=s.update({changes:{from:o.from,to:o.to,insert:h}});this.view.dispatch(m);let _=t.checked;return setTimeout(()=>{t.checked=_},1),!0}};var al=require("obsidian");var gn=class{constructor(e,t,n){this.property=e,this.comparator=gn.maybeReverse(n,t)}static maybeReverse(e,t){return e?gn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var fi=class{constructor(e,t){this.property=e,this.grouper=t}};var ze=class{canCreateFilterForLine(e){return ze.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 No(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?ze.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ze.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 gn(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new fi(this.fieldNameSingular(),this.grouper())}};var ot=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 ot("None of",e,"NOT")}static booleanXor(e){return new ot("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let s=0;s<this.children.length;s++)t+=`
|
||
${this.children[s].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let s=t[0],a=t[1];if(s.symbol===n&&a.symbol==="")return s.children.push(a),s}return new ot(e,t,n)}};var er=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
|
||
`:`${e}${this.instruction} =>
|
||
${t.asString(" ")}
|
||
`}},Ve=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Ve(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Ve(e);return n.error=t,n}};var Nu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Ve(e);return e===this._instruction?(t.filter=new er(e,this._filter,new ot(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Hr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Nu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Ve(e);return t.error=`do not understand filter: ${e}`,t}};var Gn=class extends ze{constructor(){super(...arguments);this._filters=new Hr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var _n=class extends Gn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=_n.oldStatusName(e),s=_n.oldStatusName(t);return n<s?1:n>s?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}};var Cu=ns(mt()),hi=ns(Fl()),ks=class{static parseDate(e,t=!1){return window.moment(Cu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e){let t=Cu.parse(e,void 0,{forwardDate:!0});if(t.length===0)return[hi.default.invalid(),hi.default.invalid()];let n=t[0].start,s=t[1]&&t[1].start?t[1].start:n,a=window.moment(n.date()),o=window.moment(s.date()),l=[a,o];o.isBefore(a)&&(l=[o,a]);let c=/(last|this|next) (week|month|quarter|year)/,h=e.match(c);if(h&&h.length===3){let m=h[1],_=hi.default.duration(),T=h[2];switch(T){case"month":case"quarter":case"year":case"week":_.add(1,T)}switch(l=[(0,hi.default)(),(0,hi.default)()],m){case"last":l.forEach(D=>D.subtract(_));break;case"next":l.forEach(D=>D.add(_));break}switch(T){case"month":case"quarter":case"year":l=[l[0].startOf(T),l[1].endOf(T)];break;case"week":l=[l[0].startOf("isoWeek"),l[1].endOf("isoWeek")];break}}return l.forEach(m=>m.startOf("day")),l}};var Wt=class extends ze{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Hr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Ve(t),a=ze.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=ks.parseDateRange(l);if(!c[0].isValid()||!c[1].isValid())s.error="do not understand "+this.fieldName()+" date";else{let h=this.buildFilterFunction(o,c),m=Wt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),c);s.filter=new er(t,h,new ot(m))}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n[0]):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n[1]):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n[0])&&a.isSameOrBefore(n[1]):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (before|after|on|in)? ?(.*)`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a[0].format(l);break;case"after":o=n,c=a[1].format(l);break;default:a[0].isSame(a[1])?(o="on",c=a[0].format(l)):(o="between",c=`${a[0].format(l)} and ${a[1].format(l)} inclusive`);break}let h=`${t} date is ${o} ${c}`;return s&&(h+=` OR no ${t} date`),h}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Ur(this.date(t),this.date(n))}};var pi=class extends Wt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var zh=class extends ze{createFilterOrErrorMessage(e){let t=new Ve(e),n=ze.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new er(e,l,new ot(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return zh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},Ds=zh;Ds.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var mi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var yi=class extends mi{constructor(t){super();this.stringToFind=t}matches(t){return yi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var gi=class extends mi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new gi(a)}else return null}matches(t){return t.match(this.regex)!==null}};var qt=class extends ze{createFilterOrErrorMessage(e){let t=ze.getMatch(this.filterRegExp(),e);if(t===null)return Ve.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new yi(a);else if(s.includes("regex")&&(o=gi.validateAndConstruct(a),o===null))return Ve.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Ve.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new er(e,this.getFilter(o,l),new ot(e));return Ve.fromFilter(c)}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 s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var _i=class extends qt{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var Ti=class extends ze{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Ve.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}};var bi=class{static by(e,t){let n=[new Ti().comparator(),new _n().comparator(),new pi().comparator(),new Ds().comparator(),new _i().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(bi.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Ss=class extends qt{fieldName(){return"description"}value(e){let t=se().globalFilter;return e.description.replace(t,"").trim()}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ss.cleanDescription(e.description),s=Ss.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){let t=se().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)]]?/,s=e.match(n);if(s!==null){let a=s[1];e=a.substring(a.indexOf("|")+1)+e.replace(n,"")}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 Iu=class extends Wt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Fu=class extends Wt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Lu=class extends Gn{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 Yu=class extends qt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var Uu=class extends Wt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Wu=class extends Wt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Hn=class extends Wt{constructor(){let e=new Hr;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 Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new Hn().dates(e).sort(Ur)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var qu=class extends Gn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var ju=class extends qt{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 s=e.matchesAnyOf(this.values(n));return t?!s:s}}};var Os=class extends ju{constructor(){super();this.filterInstructions=new Hr,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 s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=Os.makeCompareByTagComparator(a);return new gn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Os.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length<t&&s.tags.length>=t)return 1;if(s.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&s.tags.length<t)return 0;let o=n.tags[a],l=s.tags[a];return o.localeCompare(l,void 0,{numeric:!0})}}};var Ev=ns(wv());var Hu=class extends ze{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){let n=new Ve(t);if(t.length===0)return n.error="empty line",n;let s=this.preprocessExpression(t);try{let a=(0,Ev.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let h=c.value.trim();if(!(h in this.subFields)){let m=zu(h);if(m===null)return n.error=`couldn't parse sub-expression '${h}'`,n;if(m.error)return n.error=`couldn't parse sub-expression '${h}': ${m.error}`,n;m.filter&&(this.subFields[h]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(c.value))return n.error=`unknown boolean operator '${c.value}'`,n}let o=c=>this.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new er(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let h=this.subFields[l.value.trim()].filterFunction(t);o.push(a(h))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),h=s(o.pop());o.push(a(c||h))}else if(l.value==="AND"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&h))}else if(l.value==="XOR"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&!h||!c&&h))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(ot.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(ot.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(ot.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(ot.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var Vu=class extends qt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var Ku=class extends qt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Vn=class extends ze{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return ze.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ze.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=gr[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Ve.fromFilter(new er(e,l,new ot(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(gr).filter(s=>s!=="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 Ve.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Vn.groupName(e),s=Vn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Vn.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 Zu=class extends qt{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var ip=[()=>new Ku,()=>new Vn,()=>new _n,()=>new qu,()=>new Ds,()=>new Hn,()=>new Iu,()=>new Wu,()=>new Uu,()=>new pi,()=>new Fu,()=>new _i,()=>new Ss,()=>new Os,()=>new Yu,()=>new Lu,()=>new Hu,()=>new Vu,()=>new Ti,()=>new Zu];function zu(r){for(let e of ip){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function kv(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of ip){let s=t().parseSortLine(r);if(s)return s}return null}function Dv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of ip){let n=t(),s=n.fieldNameSingular();if(r===`group by ${s}`&&n.supportsGrouping())return n.createGrouper()}return null}var Xu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Qu=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let s=0;s<n;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let s=e[n];if(s!=this.lastHeadingAtLevel[n]){t.push(new Xu(n,s));for(let a=n;a<e.length;a++)this.lastHeadingAtLevel[a]="";this.lastHeadingAtLevel[n]=s}}return t}};var Ju=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,s]of this.children)e.push(n),s.generateAllPaths(e).forEach((o,l)=>t.set(l,o)),e.pop();return t}};var el=class extends Map{},tl=class extends Ju{},rl=class{constructor(e,t){this.groups=new el;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new tl(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let h=En.getGroupNamesForTask(a,c);for(let m of h){let _=l.children.get(m);_===void 0&&(_=new tl([]),l.children.set(m,_),o.push(_)),_.values.push(c)}}s=o}return n}getSortedGroups(){return new el([...this.groups.entries()].sort())}};var nl=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}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.name}
|
||
`;return e+=this.tasksAsStringOfLines(),e}};var sl=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new rl(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=`
|
||
---
|
||
`;return e+=`
|
||
${this.totalTasksCount()} tasks
|
||
`,e}addTasks(e){let t=new Qu(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new nl(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var Me=class{static fromGroupingProperty(e){return new fi(e,Me.grouperForProperty(e))}static by(e,t){return new sl(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return Me.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByCreatedDate(e){return[Me.stringFromDate(e.createdDate,"created")]}static groupByStartDate(e){return[Me.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[Me.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[Me.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[Me.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new Hn().earliestDate(e);return[Me.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(Me.groupDateFormat)}static groupByPath(e){return[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?["/"]:[Me.escapeMarkdownCharacters(s)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+Me.escapeMarkdownCharacters(t)+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[Me.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=Me.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let s=Me.groupByHeading(e)[0];return n===s?[n]:[`${n} > ${s}`]}static groupByStatus(e){return e.status.symbol===" "?["Todo"]:["Done"]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},En=Me;En.groupDateFormat="YYYY-MM-DD dddd",En.groupers={backlink:Me.groupByBacklink,created:Me.groupByCreatedDate,done:Me.groupByDoneDate,due:Me.groupByDueDate,filename:Me.groupByFileName,folder:Me.groupByFolder,happens:Me.groupByHappensDate,heading:Me.groupByHeading,path:Me.groupByPath,priority:Me.groupByPriority,recurrence:Me.groupByRecurrence,recurring:Me.groupByRecurring,root:Me.groupByRoot,scheduled:Me.groupByScheduledDate,start:Me.groupByStartDate,status:Me.groupByStatus,tags:Me.groupByTags};var Si=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Yi;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|created|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
|
||
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy2({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query:
|
||
|
||
`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="",{globalFilter:t}=se();t.length!==0&&(e+=`Only tasks containing the global filter '${t}'.
|
||
|
||
`);let n=this.filters.length;if(n===0)e+="No filters supplied. All tasks will match the query.";else for(let a=0;a<n;a++)a>0&&(e+=`
|
||
`),e+=this.filters[a].explainFilterIndented("");this._limit!==void 0&&(e+=`
|
||
|
||
At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`.
|
||
`);let{debugSettings:s}=se();return s.ignoreSortInstructions&&(e+=`
|
||
|
||
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),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}applyQueryToTasks(e){this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=se(),s=(t.ignoreSortInstructions?e:bi.by(this.sorting,e)).slice(0,this.limit);return En.by(this.grouping,s)}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;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=zu(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=kv(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(En.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=Dv(e);return t?(this._grouping.push(t),!0):!1}};var il=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 J(this,null,function*(){n.addChild(new ap({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},ap=class extends al.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=new Si({source:a}),this.queryType="tasks";break;default:this.query=new Si({source:a}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Si({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return J(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let h of l.groups){this.addGroupHeadings(a,h.groupHeadings);let{taskList:m}=yield this.createTasksList({tasks:h.tasks,content:a});a.appendChild(m)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`<pre>Tasks query: ${this.query.error.replace(/\n/g,"<br>")}</pre>`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=this.query.explainQuery(),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return J(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=n.createEl("ul");o.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let l=0;l<a;l++){let c=t[l],h=this.isFilenameUnique({task:c}),m=yield c.toLi({parentUlElement:o,listIndex:l,layoutOptions:this.query.layoutOptions,isFilenameUnique:h});m.querySelectorAll("[data-footnote-id]").forEach(D=>D.remove());let T=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(m,c),this.query.layoutOptions.hideBacklinks||this.addBacklinks(m,c,T,h),this.query.layoutOptions.hideEditButton||this.addEditButton(m,c),o.appendChild(m)}return{taskList:o,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Ao({originalTask:n,newTasks:Kt.removeInferredStatusIfNeeded(n,c)})};new Bn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return J(this,null,function*(){let s;n.nestingLevel===0?s=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?s=t.createEl("h5",{cls:"tasks-group-heading"}):s=t.createEl("h6",{cls:"tasks-group-heading"}),yield al.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var h;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");if(l.href=n.path,l.setAttribute("data-href",n.path),l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode"),n.precedingHeader!==null){let m=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+m,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+m)}let c;s?c=" \u{1F517}":c=(h=n.getLinkText({isFilenameUnique:a}))!=null?h:"",l.setText(c),s||o.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 s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}};var Be=require("obsidian");function Sv(){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 Ov(){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 Mv(){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 Rv(){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 xv(){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 Pv(){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 Av=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.</p><p>You can add edit and add your own custom statuses in the section below.</p>"},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:`<p>You should first <b>select and install a CSS Snippet or Theme</b> to style custom checkboxes.</p><p>Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.</p><p><b>Note</b> Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.</p><p></p><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/statuses/">documentation</a> to get started!</p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Fr=require("obsidian");var Ps=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,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=he.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Ps.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Ps.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=gr[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,s=new $e,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.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 As=new Ps,lr=class extends Fr.Modal{constructor(t,n,s){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=s}statusConfiguration(){return new bt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return J(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Fr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(h=>{s=h,h.setValue(this.statusSymbol).onChange(m=>{this.statusSymbol=m,lr.setValid(h,As.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(h=>{lr.setValid(s,As.validateSymbol(this.statusConfiguration()))});let a;new Fr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(h=>{a=h,h.setValue(this.statusName).onChange(m=>{this.statusName=m,lr.setValid(h,As.validateName(this.statusConfiguration()))})}).then(h=>{lr.setValid(a,As.validateName(this.statusConfiguration()))});let o;new Fr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(h=>{o=h,h.setValue(this.statusNextSymbol).onChange(m=>{this.statusNextSymbol=m,lr.setValid(h,As.validateNextSymbol(this.statusConfiguration()))})}).then(h=>{lr.setValid(o,As.validateNextSymbol(this.statusConfiguration()))}),new Fr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(h=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(_=>{h.addOption(_,_)}),h.setValue(this.type).onChange(_=>{this.type=he.getTypeFromStatusTypeString(_)})}),he.tasksPluginCanCreateCommandsForStatuses()&&new Fr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(h=>{h.setValue(this.statusAvailableAsCommand).onChange(m=>J(this,null,function*(){this.statusAvailableAsCommand=m}))});let l=t.createDiv(),c=new Fr.Setting(l);c.addButton(h=>(h.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let m=As.validate(this.statusConfiguration());if(m.length>0){let _=m.join(`
|
||
`)+`
|
||
|
||
Fix errors before saving.`;new Fr.Notice(_);return}this.saved=!0,this.close()})),h)),c.addExtraButton(h=>(h.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),h))})}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?lr.removeValidationError(t):lr.setValidationError(t)}};var Oi=class extends Be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return J(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:"Global filter Settings"}),new Be.Setting(t).setName("Global task filter").setDesc(Oi.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/">documentation</a>.</p>')).addText(s=>{let a=se();s.setPlaceholder("e.g. #task or TODO").setValue(a.globalFilter).onChange(o=>J(this,null,function*(){Gt({globalFilter:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(s=>{let a=se();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Gt({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=se();Av.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Be.Setting(t).setName("Set created date on every added task").setDesc("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.").addToggle(s=>{let a=se();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Gt({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.").addToggle(s=>{let a=se();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Gt({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Oi.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/use-filename-as-default-date/">documentation</a>.</p>')).addToggle(s=>{let a=se();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Gt({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(s=>J(this,null,function*(){let a=se();yield this.plugin.saveSettings(),s.setValue(Oi.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Oi.parseCommaSeparatedFolders(o);Gt({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Be.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(s=>{let a=se();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Gt({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let a=se();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let a=se();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Be.Setting(t).setName("Provide access keys in dialogs").setDesc("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.").addToggle(s=>{let a=se();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Gt({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Qe({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,Gt({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new Be.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!ty(l.featureFlag))&&(l.type==="checkbox"?new Be.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue),c.setValue(h.generalSettings[l.settingName]).onChange(m=>J(this,null,function*(){os(l.settingName,m),yield this.plugin.saveSettings()}))}):l.type==="text"?new Be.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue);let m=_=>J(this,null,function*(){os(l.settingName,_),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,500,!0))}):l.type==="textarea"?new Be.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let h=se();h.generalSettings[l.settingName]||os(l.settingName,l.initialValue);let m=_=>J(this,null,function*(){os(l.settingName,_),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.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:s}=se();s.coreStatuses.forEach(a=>{Nv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=se();s.customStatuses.forEach(h=>{Nv(t,h,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new Be.Setting(t).addButton(h=>{h.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){pt.addStatus(s.customStatuses,new bt("","","",!1,"TODO")),yield Mi(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Sv()],["Ebullientworks Theme",Mv()],["ITS Theme & SlRvb Checkboxes",Rv()],["Minimal Theme",xv()],["Things Theme",Pv()],["Aura Theme (Dark mode only)",Ov()]];for(let[h,m]of o)new Be.Setting(t).addButton(T=>{let D=`${h}: Add ${m.length} supported Statuses`;T.setButtonText(D).onClick(()=>J(this,null,function*(){yield oF(m,s,n)}))}).infoEl.remove();new Be.Setting(t).addButton(h=>{h.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let _=this.plugin.getTasks().map(D=>D.status),T=$e.getInstance().findUnknownStatuses(_);T.length!==0&&(T.forEach(D=>{pt.addStatus(s.customStatuses,D)}),yield Mi(s,n))}))}).infoEl.remove(),new Be.Setting(t).addButton(h=>{h.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){pt.resetAllCustomStatuses(s),yield Mi(s,n)}))}).infoEl.remove()}},no=Oi;no.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Nv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new he(e).previewText();let c=new Be.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(h=>{h.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){pt.deleteStatus(t,e)&&(yield Mi(n,s))}))}),c.addExtraButton(h=>{h.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let m=new lr(a,e,o);m.onClose=()=>J(this,null,function*(){m.saved&&pt.replaceStatus(t,e,m.statusConfiguration())&&(yield Mi(n,s))}),m.open()}))}),c.infoEl.remove()}function oF(r,e,t){return J(this,null,function*(){pt.bulkAddStatusCollection(e,r).forEach(s=>{new Be.Notice(s)}),yield Mi(e,t)})}function Mi(r,e){return J(this,null,function*(){Gt({statusSettings:r}),pt.applyToStatusRegistry(r,$e.getInstance()),yield e.saveSettings(!0)})}var Iv=require("obsidian");var{symbols:tt}=Fn.tasksPluginEmoji.taskSerializer,uF=`${tt.startDateSymbol}${tt.scheduledDateSymbol}${tt.dueDateSymbol}`;function Cv(r,e,t){let n=[];n=n.concat(dF(r,e,t)),n=n.concat(fF(r,e,t));let s=cF(r,t),a=op(r,/([a-zA-Z'_-]*)/g,e),o=!1;if(a&&a.length>0){let l=a[0];if(l.length>=Math.max(1,t.autoSuggestMinMatch)){let c=s.filter(h=>h.displayText.toLowerCase().includes(l.toLowerCase()));for(let h of c)n.push({suggestionType:"match",displayText:h.displayText,appendText:h.appendText,insertAt:a.index,insertSkip:l.length}),o=!0}}return!o&&t.autoSuggestMinMatch===0&&(n=n.concat(s)),n.length>0&&!n.some(l=>l.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
|
||
`}),n=n.slice(0,t.autoSuggestMaxItems),n}function lF(r){if(Object.values(tt.prioritySymbols).some(e=>e.length>0&&r.includes(e)))return!0}function cF(r,e){let t=[];return r.includes(tt.dueDateSymbol)||t.push({displayText:`${tt.dueDateSymbol} due date`,appendText:`${tt.dueDateSymbol} `}),r.includes(tt.startDateSymbol)||t.push({displayText:`${tt.startDateSymbol} start date`,appendText:`${tt.startDateSymbol} `}),r.includes(tt.scheduledDateSymbol)||t.push({displayText:`${tt.scheduledDateSymbol} scheduled date`,appendText:`${tt.scheduledDateSymbol} `}),lF(r)||(t.push({displayText:`${tt.prioritySymbols.High} high priority`,appendText:`${tt.prioritySymbols.High} `}),t.push({displayText:`${tt.prioritySymbols.Medium} medium priority`,appendText:`${tt.prioritySymbols.Medium} `}),t.push({displayText:`${tt.prioritySymbols.Low} low priority`,appendText:`${tt.prioritySymbols.Low} `})),r.includes(tt.recurrenceSymbol)||t.push({displayText:`${tt.recurrenceSymbol} recurring (repeat)`,appendText:`${tt.recurrenceSymbol} `}),t}function dF(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],s=[],a=new RegExp(`([${uF}])\\s*([0-9a-zA-Z ]*)`,"ug"),o=op(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length<t.autoSuggestMinMatch)return[];let h=c&&c.length>1?ks.parseDate(di(c),!0):null;h&&h.isValid()&&s.push({displayText:`${h.format(ae.dateFormat)}`,appendText:`${l} ${h.format(ae.dateFormat)} `,insertAt:o.index,insertSkip:o[0].length});let m=1,_=5,T=n.filter(D=>c&&c.length>=m&&D.toLowerCase().includes(c.toLowerCase())).slice(0,_);T.length===0&&(T=n.slice(0,_));for(let D of T){let R=`${ks.parseDate(D,!0).format(ae.dateFormat)}`;s.push({suggestionType:"match",displayText:`${D} (${R})`,appendText:`${l} ${R} `,insertAt:o.index,insertSkip:o[0].length})}}return s}function fF(r,e,t){var l;let n=["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(`(${tt.recurrenceSymbol})\\s*([0-9a-zA-Z ]*)`,"ug"),o=op(r,a,e);if(o&&o.length>=2){let c=o[1],h=o[2];if(h.length<t.autoSuggestMinMatch)return[];if(h.length>0){let D=(l=Tt.fromText({recurrenceRuleText:h,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:l.toText();if(D){let v=`${c} ${D} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${D}`,appendText:v,insertAt:o.index,insertSkip:o[0].length}),o[0]==v)return[]}}let m=1,_=t.autoSuggestMaxItems/2,T=n.filter(D=>h&&h.length>=m&&D.toLowerCase().includes(h.toLowerCase())).slice(0,_);T.length===0&&h.trim().length===0&&(T=n.slice(0,_));for(let D of T)s.push({suggestionType:"match",displayText:`${D}`,appendText:`${c} ${D} `,insertAt:o.index,insertSkip:o[0].length})}return s}function op(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s;return[]}var ol=class extends Iv.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return a.contains(this.settings.globalFilter)&&a.match(ae.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){let n=t.query,s=t.editor.getCursor(),a=Cv(n,s.ch,this.settings),o=[];for(let l of a)o.push(tr(Qe({},l),{context:t}));return o}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,h,m;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let _=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(h=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||h.dispatchEvent(_);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(m=t.insertAt)!=null?m:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var Fv=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(`
|
||
`);t(l)}).open(),n};var Lv=(r,e)=>{let t=Ru({line:"",path:""});return new Bn({app:r,task:t,onSubmit:e})};var Yv=r=>({createTaskLineModal:()=>Fv(r,Lv)});var ul=class extends Uv.Plugin{get apiV1(){return Yv(app)}onload(){return J(this,null,function*(){Po.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new no({plugin:this})),oy({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Pu({obsidianEvents:this.app.workspace});this.cache=new us({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Au({plugin:this}),this.queryRenderer=new il({plugin:this,events:t}),this.registerEditorExtension(cv()),this.registerEditorSuggest(new ol(this.app,se())),new xu({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=se();pt.applyToStatusRegistry(t,$e.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();Gt(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(se())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}};
|
||
/*!
|
||
* EventEmitter2
|
||
* https://github.com/hij1nx/EventEmitter2
|
||
*
|
||
* Copyright (c) 2013 hij1nx
|
||
* Licensed under the MIT license.
|
||
*/
|
||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||
//! license : MIT
|
||
//! moment.js
|
||
//! momentjs.com
|
||
//! version : 2.29.4
|