/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var dS=Object.create;var no=Object.defineProperty;var fS=Object.getOwnPropertyDescriptor;var cS=Object.getOwnPropertyNames;var mS=Object.getPrototypeOf,pS=Object.prototype.hasOwnProperty;var hS=(e,t,a)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var St=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gS=(e,t)=>{for(var a in t)no(e,a,{get:t[a],enumerable:!0})},nc=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cS(t))!pS.call(e,o)&&o!==a&&no(e,o,{get:()=>t[o],enumerable:!(l=fS(t,o))||l.enumerable});return e};var q=(e,t,a)=>(a=e!=null?dS(mS(e)):{},nc(t||!e||!e.__esModule?no(a,"default",{value:e,enumerable:!0}):a,e)),yS=e=>nc(no({},"__esModule",{value:!0}),e);var x=(e,t,a)=>hS(e,typeof t!="symbol"?t+"":t,a);var sm=St(Q=>{"use strict";function Ds(e,t){var a=e.length;e.push(t);e:for(;0>>1,o=e[l];if(0>>1;lCi(i,a))nCi(s,i)?(e[l]=s,e[n]=a,l=n):(e[l]=i,e[u]=a,l=u);else if(nCi(s,a))e[l]=s,e[n]=a,l=n;else break e}}return t}function Ci(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}Q.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(em=performance,Q.unstable_now=function(){return em.now()}):(Is=Date,tm=Is.now(),Q.unstable_now=function(){return Is.now()-tm});var em,Is,tm,xt=[],ea=[],Lx=1,je=null,De=3,Ii=!1,Aa=!1,po=!1,om=typeof setTimeout=="function"?setTimeout:null,rm=typeof clearTimeout=="function"?clearTimeout:null,am=typeof setImmediate!="undefined"?setImmediate:null;function vi(e){for(var t=ct(ea);t!==null;){if(t.callback===null)wi(ea);else if(t.startTime<=e)wi(ea),t.sortIndex=t.expirationTime,Ds(xt,t);else break;t=ct(ea)}}function Ts(e){if(po=!1,vi(e),!Aa)if(ct(xt)!==null)Aa=!0,Ps();else{var t=ct(ea);t!==null&&Ns(Ts,t.startTime-e)}}var bi=!1,ho=-1,um=5,im=-1;function nm(){return!(Q.unstable_now()-ime&&nm());){var l=je.callback;if(typeof l=="function"){je.callback=null,De=je.priorityLevel;var o=l(je.expirationTime<=e);if(e=Q.unstable_now(),typeof o=="function"){je.callback=o,vi(e),t=!0;break t}je===ct(xt)&&wi(xt),vi(e)}else wi(xt);je=ct(xt)}if(je!==null)t=!0;else{var r=ct(ea);r!==null&&Ns(Ts,r.startTime-e),t=!1}}break e}finally{je=null,De=a,Ii=!1}t=void 0}}finally{t?mo():bi=!1}}}var mo;typeof am=="function"?mo=function(){am(bs)}:typeof MessageChannel!="undefined"?(Ms=new MessageChannel,lm=Ms.port2,Ms.port1.onmessage=bs,mo=function(){lm.postMessage(null)}):mo=function(){om(bs,0)};var Ms,lm;function Ps(){bi||(bi=!0,mo())}function Ns(e,t){ho=om(function(){e(Q.unstable_now())},t)}Q.unstable_IdlePriority=5;Q.unstable_ImmediatePriority=1;Q.unstable_LowPriority=4;Q.unstable_NormalPriority=3;Q.unstable_Profiling=null;Q.unstable_UserBlockingPriority=2;Q.unstable_cancelCallback=function(e){e.callback=null};Q.unstable_continueExecution=function(){Aa||Ii||(Aa=!0,Ps())};Q.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=a,Ds(ea,e),ct(xt)===null&&e===ct(ea)&&(po?(rm(ho),ho=-1):po=!0,Ns(Ts,a-l))):(e.sortIndex=o,Ds(xt,e),Aa||Ii||(Aa=!0,Ps())),e};Q.unstable_shouldYield=nm;Q.unstable_wrapCallback=function(e){var t=De;return function(){var a=De;De=t;try{return e.apply(this,arguments)}finally{De=a}}}});var fm=St((YN,dm)=>{"use strict";dm.exports=sm()});var wm=St(k=>{"use strict";var ks=Symbol.for("react.transitional.element"),Cx=Symbol.for("react.portal"),vx=Symbol.for("react.fragment"),wx=Symbol.for("react.strict_mode"),Ix=Symbol.for("react.profiler"),bx=Symbol.for("react.consumer"),Mx=Symbol.for("react.context"),Dx=Symbol.for("react.forward_ref"),Tx=Symbol.for("react.suspense"),Px=Symbol.for("react.memo"),ym=Symbol.for("react.lazy"),cm=Symbol.iterator;function Nx(e){return e===null||typeof e!="object"?null:(e=cm&&e[cm]||e["@@iterator"],typeof e=="function"?e:null)}var Sm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xm=Object.assign,Lm={};function Ll(e,t,a){this.props=e,this.context=t,this.refs=Lm,this.updater=a||Sm}Ll.prototype.isReactComponent={};Ll.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cm(){}Cm.prototype=Ll.prototype;function Rs(e,t,a){this.props=e,this.context=t,this.refs=Lm,this.updater=a||Sm}var Os=Rs.prototype=new Cm;Os.constructor=Rs;xm(Os,Ll.prototype);Os.isPureReactComponent=!0;var mm=Array.isArray,le={H:null,A:null,T:null,S:null},vm=Object.prototype.hasOwnProperty;function Fs(e,t,a,l,o,r){return a=r.ref,{$$typeof:ks,type:e,key:t,ref:a!==void 0?a:null,props:r}}function Ax(e,t){return Fs(e.type,t,void 0,void 0,void 0,e.props)}function Es(e){return typeof e=="object"&&e!==null&&e.$$typeof===ks}function kx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var pm=/\/+/g;function As(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kx(""+e.key):t.toString(36)}function hm(){}function Rx(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(hm,hm):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function xl(e,t,a,l,o){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(r){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case ks:case Cx:u=!0;break;case ym:return u=e._init,xl(u(e._payload),t,a,l,o)}}if(u)return o=o(e),u=l===""?"."+As(e,0):l,mm(o)?(a="",u!=null&&(a=u.replace(pm,"$&/")+"/"),xl(o,t,a,"",function(s){return s})):o!=null&&(Es(o)&&(o=Ax(o,a+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(pm,"$&/")+"/")+u)),t.push(o)),1;u=0;var i=l===""?".":l+":";if(mm(e))for(var n=0;n{"use strict";Im.exports=wm()});var Mm=St(ke=>{"use strict";var Ex=Ne();function bm(e){var t="https://react.dev/errors/"+e;if(1{"use strict";function Dm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dm)}catch(e){console.error(e)}}Dm(),Tm.exports=Mm()});var Iy=St(Xn=>{"use strict";var ge=fm(),Qp=Ne(),Ux=Pm();function S(e){var t="https://react.dev/errors/"+e;if(1)":-1o||n[l]!==s[o]){var p=` `+n[l].replace(" at new "," at ");return e.displayName&&p.includes("")&&(p=p.replace("",e.displayName)),p}while(1<=l&&0<=o);break}}}finally{Hs=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Mo(a):""}function Gx(e){switch(e.tag){case 26:case 27:case 5:return Mo(e.type);case 16:return Mo("Lazy");case 13:return Mo("Suspense");case 19:return Mo("SuspenseList");case 0:case 15:return e=Us(e.type,!1),e;case 11:return e=Us(e.type.render,!1),e;case 1:return e=Us(e.type,!0),e;default:return""}}function km(e){try{var t="";do t+=Gx(e),e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}function to(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function $p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Rm(e){if(to(e)!==e)throw Error(S(188))}function Wx(e){var t=e.alternate;if(!t){if(t=to(e),t===null)throw Error(S(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var r=o.alternate;if(r===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===r.child){for(r=o.child;r;){if(r===a)return Rm(o),e;if(r===l)return Rm(o),t;r=r.sibling}throw Error(S(188))}if(a.return!==l.return)a=o,l=r;else{for(var u=!1,i=o.child;i;){if(i===a){u=!0,a=o,l=r;break}if(i===l){u=!0,l=o,a=r;break}i=i.sibling}if(!u){for(i=r.child;i;){if(i===a){u=!0,a=r,l=o;break}if(i===l){u=!0,l=r,a=o;break}i=i.sibling}if(!u)throw Error(S(189))}}if(a.alternate!==l)throw Error(S(190))}if(a.tag!==3)throw Error(S(188));return a.stateNode.current===a?e:t}function eh(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=eh(e),t!==null)return t;e=e.sibling}return null}var Do=Array.isArray,ee=Ux.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ha={pending:!1,data:null,method:null,action:null},Sd=[],Tl=-1;function Mt(e){return{current:e}}function Ce(e){0>Tl||(e.current=Sd[Tl],Sd[Tl]=null,Tl--)}function ae(e,t){Tl++,Sd[Tl]=e.current,e.current=t}var vt=Mt(null),Wo=Mt(null),ca=Mt(null),on=Mt(null);function rn(e,t){switch(ae(ca,t),ae(Wo,e),ae(vt,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Fp(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=Fp(e),t=cy(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ce(vt),ae(vt,t)}function Yl(){Ce(vt),Ce(Wo),Ce(ca)}function xd(e){e.memoizedState!==null&&ae(on,e);var t=vt.current,a=cy(t,e.type);t!==a&&(ae(Wo,e),ae(vt,a))}function un(e){Wo.current===e&&(Ce(vt),Ce(Wo)),on.current===e&&(Ce(on),ar._currentValue=Ha)}var Ld=Object.prototype.hasOwnProperty,df=ge.unstable_scheduleCallback,qs=ge.unstable_cancelCallback,Yx=ge.unstable_shouldYield,Xx=ge.unstable_requestPaint,wt=ge.unstable_now,Qx=ge.unstable_getCurrentPriorityLevel,th=ge.unstable_ImmediatePriority,ah=ge.unstable_UserBlockingPriority,nn=ge.unstable_NormalPriority,Zx=ge.unstable_LowPriority,lh=ge.unstable_IdlePriority,Kx=ge.log,jx=ge.unstable_setDisableYieldValue,ur=null,_e=null;function Jx(e){if(_e&&typeof _e.onCommitFiberRoot=="function")try{_e.onCommitFiberRoot(ur,e,void 0,(e.current.flags&128)===128)}catch(t){}}function da(e){if(typeof Kx=="function"&&jx(e),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(ur,e)}catch(t){}}var Ge=Math.clz32?Math.clz32:tL,$x=Math.log,eL=Math.LN2;function tL(e){return e>>>=0,e===0?32:31-($x(e)/eL|0)|0}var Pi=128,Ni=4194304;function Ra(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rn(e,t){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,r=e.pingedLanes,u=e.warmLanes;e=e.finishedLanes!==0;var i=a&134217727;return i!==0?(a=i&~o,a!==0?l=Ra(a):(r&=i,r!==0?l=Ra(r):e||(u=i&~u,u!==0&&(l=Ra(u))))):(i=a&~o,i!==0?l=Ra(i):r!==0?l=Ra(r):e||(u=a&~u,u!==0&&(l=Ra(u)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,u=t&-t,o>=u||o===32&&(u&4194176)!==0)?t:l}function ir(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function aL(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oh(){var e=Pi;return Pi<<=1,(Pi&4194176)===0&&(Pi=128),e}function rh(){var e=Ni;return Ni<<=1,(Ni&62914560)===0&&(Ni=4194304),e}function Vs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function nr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lL(e,t,a,l,o,r){var u=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,n=e.expirationTimes,s=e.hiddenUpdates;for(a=u&~a;0=No),_m=" ",Gm=!1;function Ch(e,t){switch(e){case"keyup":return HL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nl=!1;function qL(e,t){switch(e){case"compositionend":return vh(t);case"keypress":return t.which!==32?null:(Gm=!0,_m);case"textInput":return e=t.data,e===_m&&Gm?null:e;default:return null}}function VL(e,t){if(Nl)return e==="compositionend"||!gf&&Ch(e,t)?(e=xh(),Qi=pf=fa=null,Nl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qm(a)}}function Mh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=dn(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch(l){a=!1}if(a)e=t.contentWindow;else break;t=dn(e.document)}return t}function yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ZL(e,t){var a=Dh(t);t=e.focusedElem;var l=e.selectionRange;if(a!==t&&t&&t.ownerDocument&&Mh(t.ownerDocument.documentElement,t)){if(l!==null&&yf(t)){if(e=l.start,a=l.end,a===void 0&&(a=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(a,t.value.length);else if(a=(e=t.ownerDocument||document)&&e.defaultView||window,a.getSelection){a=a.getSelection();var o=t.textContent.length,r=Math.min(l.start,o);l=l.end===void 0?r:Math.min(l.end,o),!a.extend&&r>l&&(o=l,l=r,r=o),o=Zm(t,r);var u=Zm(t,l);o&&u&&(a.rangeCount!==1||a.anchorNode!==o.node||a.anchorOffset!==o.offset||a.focusNode!==u.node||a.focusOffset!==u.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),a.removeAllRanges(),r>l?(a.addRange(e),a.extend(u.node,u.offset)):(e.setEnd(u.node,u.offset),a.addRange(e)))}}for(e=[],a=t;a=a.parentNode;)a.nodeType===1&&e.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Al=null,Md=null,ko=null,Dd=!1;function Km(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Dd||Al==null||Al!==dn(l)||(l=Al,"selectionStart"in l&&yf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ko&&Zo(ko,l)||(ko=l,l=Mn(Md,"onSelect"),0>=u,o-=u,Vt=1<<32-Ge(t)+o|a<b?(j=v,v=null):j=v.sibling;var A=f(c,v,m[b],y);if(A===null){v===null&&(v=j);break}e&&v&&A.alternate===null&&t(c,v),d=r(A,d,b),D===null?C=A:D.sibling=A,D=A,v=j}if(b===m.length)return a(c,v),z&&Oa(c,b),C;if(v===null){for(;bb?(j=v,v=null):j=v.sibling;var Fe=f(c,v,A.value,y);if(Fe===null){v===null&&(v=j);break}e&&v&&Fe.alternate===null&&t(c,v),d=r(Fe,d,b),D===null?C=Fe:D.sibling=Fe,D=Fe,v=j}if(A.done)return a(c,v),z&&Oa(c,b),C;if(v===null){for(;!A.done;b++,A=m.next())A=g(c,A.value,y),A!==null&&(d=r(A,d,b),D===null?C=A:D.sibling=A,D=A);return z&&Oa(c,b),C}for(v=l(v);!A.done;b++,A=m.next())A=h(v,c,b,A.value,y),A!==null&&(e&&A.alternate!==null&&v.delete(A.key===null?b:A.key),d=r(A,d,b),D===null?C=A:D.sibling=A,D=A);return e&&v.forEach(function(ye){return t(c,ye)}),z&&Oa(c,b),C}function N(c,d,m,y){if(typeof m=="object"&&m!==null&&m.type===Dl&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ti:e:{for(var C=m.key;d!==null;){if(d.key===C){if(C=m.type,C===Dl){if(d.tag===7){a(c,d.sibling),y=o(d,m.props.children),y.return=c,c=y;break e}}else if(d.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===oa&&lp(C)===d.type){a(c,d.sibling),y=o(d,m.props),Lo(y,m),y.return=c,c=y;break e}a(c,d);break}else t(c,d);d=d.sibling}m.type===Dl?(y=Va(m.props.children,c.mode,y,m.key),y.return=c,c=y):(y=en(m.type,m.key,m.props,null,c.mode,y),Lo(y,m),y.return=c,c=y)}return u(c);case bo:e:{for(C=m.key;d!==null;){if(d.key===C)if(d.tag===4&&d.stateNode.containerInfo===m.containerInfo&&d.stateNode.implementation===m.implementation){a(c,d.sibling),y=o(d,m.children||[]),y.return=c,c=y;break e}else{a(c,d);break}else t(c,d);d=d.sibling}y=ud(m,c.mode,y),y.return=c,c=y}return u(c);case oa:return C=m._init,m=C(m._payload),N(c,d,m,y)}if(Do(m))return L(c,d,m,y);if(yo(m)){if(C=yo(m),typeof C!="function")throw Error(S(150));return m=C.call(m),I(c,d,m,y)}if(typeof m.then=="function")return N(c,d,Ei(m),y);if(m.$$typeof===qt)return N(c,d,Hi(c,m),y);Bi(c,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,d!==null&&d.tag===6?(a(c,d.sibling),y=o(d,m),y.return=c,c=y):(a(c,d),y=rd(m,c.mode,y),y.return=c,c=y),u(c)):a(c,d)}return function(c,d,m,y){try{jo=0;var C=N(c,d,m,y);return Vl=null,C}catch(v){if(v===Ro)throw v;var D=ut(29,v,null,c.mode);return D.lanes=y,D.return=c,D}finally{}}}var Wa=Hh(!0),Uh=Hh(!1),Zl=Mt(null),pn=Mt(0);function op(e,t){e=Zt,ae(pn,e),ae(Zl,t),Zt=e|t.baseLanes}function Nd(){ae(pn,Zt),ae(Zl,Zl.current)}function vf(){Zt=pn.current,Ce(Zl),Ce(pn)}var nt=Mt(null),It=null;function ua(e){var t=e.alternate;ae(he,he.current&1),ae(nt,e),It===null&&(t===null||Zl.current!==null||t.memoizedState!==null)&&(It=e)}function qh(e){if(e.tag===22){if(ae(he,he.current),ae(nt,e),It===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(It=e)}}else ia(e)}function ia(){ae(he,he.current),ae(nt,nt.current)}function _t(e){Ce(nt),It===e&&(It=null),Ce(he)}var he=Mt(0);function hn(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eC=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},tC=ge.unstable_scheduleCallback,aC=ge.unstable_NormalPriority,pe={$$typeof:qt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wf(){return{controller:new eC,data:new Map,refCount:0}}function fr(e){e.refCount--,e.refCount===0&&tC(aC,function(){e.controller.abort()})}var Fo=null,Ad=0,Kl=0,zl=null;function lC(e,t){if(Fo===null){var a=Fo=[];Ad=0,Kl=Yf(),zl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ad++,t.then(rp,rp),t}function rp(){if(--Ad===0&&Fo!==null){zl!==null&&(zl.status="fulfilled");var e=Fo;Fo=null,Kl=0,zl=null;for(var t=0;tr?r:8;var u=P.T,i={};P.T=i,Ef(e,!1,t,a);try{var n=o(),s=P.S;if(s!==null&&s(i,n),n!==null&&typeof n=="object"&&typeof n.then=="function"){var p=oC(n,l);Eo(e,t,p,We(e))}else Eo(e,t,l,We(e))}catch(g){Eo(e,t,{then:function(){},status:"rejected",reason:g},We())}finally{ee.p=r,P.T=u}}function sC(){}function Od(e,t,a,l){if(e.tag!==5)throw Error(S(476));var o=mg(e).queue;cg(e,o,t,Ha,a===null?sC:function(){return pg(e),a(l)})}function mg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ha,baseState:Ha,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:Ha},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pg(e){var t=mg(e).next.queue;Eo(e,t,{},We())}function Ff(){return Pe(ar)}function hg(){return me().memoizedState}function gg(){return me().memoizedState}function dC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=We();e=ma(a);var l=pa(t,e,a);l!==null&&(Oe(l,t,a),Ho(l,t,a)),t={cache:wf()},e.payload=t;return}t=t.return}}function fC(e,t,a){var l=We();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},zn(e)?Sg(t,a):(a=xf(e,t,a,l),a!==null&&(Oe(a,e,l),xg(a,t,l)))}function yg(e,t,a){var l=We();Eo(e,t,a,l)}function Eo(e,t,a,l){var o={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(zn(e))Sg(t,o);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var u=t.lastRenderedState,i=r(u,a);if(o.hasEagerState=!0,o.eagerState=i,Ye(i,u))return Hn(e,t,o,0),$===null&&Bn(),!1}catch(n){}finally{}if(a=xf(e,t,o,l),a!==null)return Oe(a,e,l),xg(a,t,l),!0}return!1}function Ef(e,t,a,l){if(l={lane:2,revertLane:Yf(),action:l,hasEagerState:!1,eagerState:null,next:null},zn(e)){if(t)throw Error(S(479))}else t=xf(e,a,l,2),t!==null&&Oe(t,e,2)}function zn(e){var t=e.alternate;return e===R||t!==null&&t===R}function Sg(e,t){_l=gn=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function xg(e,t,a){if((a&4194176)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ih(e,a)}}var bt={readContext:Pe,use:qn,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useLayoutEffect:se,useInsertionEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useSyncExternalStore:se,useId:se};bt.useCacheRefresh=se;bt.useMemoCache=se;bt.useHostTransitionStatus=se;bt.useFormState=se;bt.useActionState=se;bt.useOptimistic=se;var Ja={readContext:Pe,use:qn,useCallback:function(e,t){return Be().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:sp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ji(4194308,4,ig.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ji(4194308,4,e,t)},useInsertionEffect:function(e,t){Ji(4,2,e,t)},useMemo:function(e,t){var a=Be();t=t===void 0?null:t;var l=e();if(Ya){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Be();if(a!==void 0){var o=a(t);if(Ya){da(!0);try{a(t)}finally{da(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=fC.bind(null,R,e),[l.memoizedState,e]},useRef:function(e){var t=Be();return e={current:e},t.memoizedState=e},useState:function(e){e=kd(e);var t=e.queue,a=yg.bind(null,R,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Rf,useDeferredValue:function(e,t){var a=Be();return Of(a,e,t)},useTransition:function(){var e=kd(!1);return e=cg.bind(null,R,e.queue,!0,!1),Be().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=R,o=Be();if(z){if(a===void 0)throw Error(S(407));a=a()}else{if(a=t(),$===null)throw Error(S(349));(U&60)!==0||Wh(l,t,a)}o.memoizedState=a;var r={value:a,getSnapshot:t};return o.queue=r,sp(Xh.bind(null,l,r,e),[e]),l.flags|=2048,jl(9,Yh.bind(null,l,r,a,t),{destroy:void 0},null),a},useId:function(){var e=Be(),t=$.identifierPrefix;if(z){var a=zt,l=Vt;a=(l&~(1<<32-Ge(l)-1)).toString(32)+a,t=":"+t+"R"+a,a=yn++,0 title"))),Me(r,l,a),r[Te]=e,xe(r),l=r;break e;case"link":var u=Vp("link","href",o).get(l+(a.href||""));if(u){for(var i=0;i<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}e[Te]=t,e[He]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(Me(e,a,l),a){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Et(t)}}return oe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Et(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(S(166));if(e=ca.current,xo(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Re,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[Te]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||fy(e.nodeValue,a)),e||Ga(t)}else e=Dn(e).createTextNode(l),e[Te]=t,t.stateNode=e}return oe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=xo(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(S(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(S(317));o[Te]=t}else dr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;oe(t),o=!1}else pt!==null&&(Kd(pt),pt=null),o=!0;if(!o)return t.flags&256?(_t(t),t):(_t(t),null)}if(_t(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=l!==null,e=e!==null&&e.memoizedState!==null,a){l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool);var r=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==o&&(l.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Ui(t,t.updateQueue),oe(t),null;case 4:return Yl(),e===null&&Xf(t.stateNode.containerInfo),oe(t),null;case 10:return Wt(t.type),oe(t),null;case 19:if(Ce(he),o=t.memoizedState,o===null)return oe(t),null;if(l=(t.flags&128)!==0,r=o.rendering,r===null)if(l)vo(o,!1);else{if(ne!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=hn(e),r!==null){for(t.flags|=128,vo(o,!1),e=r.updateQueue,t.updateQueue=e,Ui(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Zg(a,e),a=a.sibling;return ae(he,he.current&1|2),t.child}e=e.sibling}o.tail!==null&&wt()>vn&&(t.flags|=128,l=!0,vo(o,!1),t.lanes=4194304)}else{if(!l)if(e=hn(r),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Ui(t,e),vo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!r.alternate&&!z)return oe(t),null}else 2*wt()-o.renderingStartTime>vn&&a!==536870912&&(t.flags|=128,l=!0,vo(o,!1),t.lanes=4194304);o.isBackwards?(r.sibling=t.child,t.child=r):(e=o.last,e!==null?e.sibling=r:t.child=r,o.last=r)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=wt(),t.sibling=null,e=he.current,ae(he,l?e&1|2:e&1),t):(oe(t),null);case 22:case 23:return _t(t),vf(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(oe(t),t.subtreeFlags&6&&(t.flags|=8192)):oe(t),a=t.updateQueue,a!==null&&Ui(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Ce(qa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(pe),oe(t),null;case 25:return null}throw Error(S(156,t.tag))}function SC(e,t){switch(Cf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(pe),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return un(t),null;case 13:if(_t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));dr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(he),null;case 4:return Yl(),null;case 10:return Wt(t.type),null;case 22:case 23:return _t(t),vf(),e!==null&&Ce(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(pe),null;case 25:return null;default:return null}}function jg(e,t){switch(Cf(t),t.tag){case 3:Wt(pe),Yl();break;case 26:case 27:case 5:un(t);break;case 4:Yl();break;case 13:_t(t);break;case 19:Ce(he);break;case 10:Wt(t.type);break;case 22:case 23:_t(t),vf(),e!==null&&Ce(qa);break;case 24:Wt(pe)}}var xC={getCacheForType:function(e){var t=Pe(pe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},LC=typeof WeakMap=="function"?WeakMap:Map,re=0,$=null,F=null,U=0,J=0,Ve=null,Ht=!1,oo=!1,zf=!1,Zt=0,ne=0,wa=0,za=0,_f=0,it=0,Jl=0,zo=null,Ct=null,Yd=!1,Gf=0,vn=1/0,wn=null,ga=null,qi=!1,Fa=null,_o=0,Xd=0,Qd=null,Go=0,Zd=null;function We(){if((re&2)!==0&&U!==0)return U&-U;if(P.T!==null){var e=Kl;return e!==0?e:Yf()}return sh()}function Jg(){it===0&&(it=(U&536870912)===0||z?oh():536870912);var e=nt.current;return e!==null&&(e.flags|=32),it}function Oe(e,t,a){(e===$&&J===2||e.cancelPendingCommit!==null)&&($l(e,0),Ut(e,U,it,!1)),nr(e,a),((re&2)===0||e!==$)&&(e===$&&((re&2)===0&&(za|=a),ne===4&&Ut(e,U,it,!1)),Dt(e))}function $g(e,t,a){if((re&6)!==0)throw Error(S(327));var l=!a&&(t&60)===0&&(t&e.expiredLanes)===0||ir(e,t),o=l?wC(e,t):id(e,t,!0),r=l;do{if(o===0){oo&&!l&&Ut(e,t,0,!1);break}else if(o===6)Ut(e,t,0,!Ht);else{if(a=e.current.alternate,r&&!CC(a)){o=id(e,t,!1),r=!1;continue}if(o===2){if(r=t,e.errorRecoveryDisabledLanes&r)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var i=e;o=zo;var n=i.current.memoizedState.isDehydrated;if(n&&($l(i,u).flags|=256),u=id(i,u,!1),u!==2){if(zf&&!n){i.errorRecoveryDisabledLanes|=r,za|=r,o=4;break e}r=Ct,Ct=o,r!==null&&Kd(r)}o=u}if(r=!1,o!==2)continue}}if(o===1){$l(e,0),Ut(e,t,0,!0);break}e:{switch(l=e,o){case 0:case 1:throw Error(S(345));case 4:if((t&4194176)===t){Ut(l,t,it,!Ht);break e}break;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(S(329))}if(l.finishedWork=a,l.finishedLanes=t,(t&62914560)===t&&(r=Gf+300-wt(),10a?32:a,P.T=null,Fa===null)var r=!1;else{a=Qd,Qd=null;var u=Fa,i=_o;if(Fa=null,_o=0,(re&6)!==0)throw Error(S(331));var n=re;if(re|=4,Xg(u.current),Gg(u,u.current,i,a),re=n,hr(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(ur,u)}catch(s){}r=!0}return r}finally{ee.p=o,P.T=l,ry(e,t)}}return!1}function Dp(e,t,a){t=rt(a,t),t=Ed(e.stateNode,t,2),e=pa(e,t,2),e!==null&&(nr(e,2),Dt(e))}function Z(e,t,a){if(e.tag===3)Dp(e,e,a);else for(;t!==null;){if(t.tag===3){Dp(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ga===null||!ga.has(l))){e=rt(a,e),a=wg(2),l=pa(t,a,2),l!==null&&(Ig(a,l,t,e),nr(l,2),Dt(l));break}}t=t.return}}function nd(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new LC;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(zf=!0,o.add(a),e=MC.bind(null,e,t,a),t.then(e,e))}function MC(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,$===e&&(U&a)===a&&(ne===4||ne===3&&(U&62914560)===U&&300>wt()-Gf?(re&2)===0&&$l(e,0):_f|=a,Jl===U&&(Jl=0)),Dt(e)}function uy(e,t){t===0&&(t=rh()),e=La(e,t),e!==null&&(nr(e,t),Dt(e))}function DC(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),uy(e,a)}function TC(e,t){var a=0;switch(e.tag){case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(S(314))}l!==null&&l.delete(t),uy(e,a)}function PC(e,t){return df(e,t)}var In=null,Ml=null,Jd=!1,bn=!1,sd=!1,_a=0;function Dt(e){e!==Ml&&e.next===null&&(Ml===null?In=Ml=e:Ml=Ml.next=e),bn=!0,Jd||(Jd=!0,AC(NC))}function hr(e,t){if(!sd&&bn){sd=!0;do for(var a=!1,l=In;l!==null;){if(!t)if(e!==0){var o=l.pendingLanes;if(o===0)var r=0;else{var u=l.suspendedLanes,i=l.pingedLanes;r=(1<<31-Ge(42|e)+1)-1,r&=o&~(u&~i),r=r&201326677?r&201326677|1:r?r|2:0}r!==0&&(a=!0,Tp(l,r))}else r=U,r=Rn(l,l===$?r:0),(r&3)===0||ir(l,r)||(a=!0,Tp(l,r));l=l.next}while(a);sd=!1}}function NC(){bn=Jd=!1;var e=0;_a!==0&&(BC()&&(e=_a),_a=0);for(var t=wt(),a=null,l=In;l!==null;){var o=l.next,r=iy(l,t);r===0?(l.next=null,a===null?In=o:a.next=o,o===null&&(Ml=a)):(a=l,(e!==0||(r&3)!==0)&&(bn=!0)),l=o}hr(e,!1)}function iy(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,r=e.pendingLanes&-62914561;0 title"):null)}function $C(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function yy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var tr=null;function ev(){}function tv(e,t,a){if(tr===null)throw Error(S(475));var l=tr;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=eo(a.href),r=e.querySelector(gr(o));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Pn.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=r,xe(r);return}r=e.ownerDocument||e,a=gy(a),(o=st.get(o))&&Qf(a,o),r=r.createElement("link"),xe(r);var u=r;u._p=new Promise(function(i,n){u.onload=i,u.onerror=n}),Me(r,"link",a),t.instance=r}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Pn.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function av(){if(tr===null)throw Error(S(475));var e=tr;return e.stylesheets&&e.count===0&&of(e,e.stylesheets),0{"use strict";function by(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(by)}catch(e){console.error(e)}}by(),My.exports=Iy()});var Uy=St(Jn=>{"use strict";var fv=Symbol.for("react.transitional.element"),cv=Symbol.for("react.fragment");function Hy(e,t,a){var l=null;if(a!==void 0&&(l=""+a),t.key!==void 0&&(l=""+t.key),"key"in t){a={};for(var o in t)o!=="key"&&(a[o]=t[o])}else a=t;return t=a.ref,{$$typeof:fv,type:e,key:l,ref:t!==void 0?t:null,props:a}}Jn.Fragment=cv;Jn.jsx=Hy;Jn.jsxs=Hy});var de=St((MA,qy)=>{"use strict";qy.exports=Uy()});var mv={};gS(mv,{default:()=>Ss});module.exports=yS(mv);var sS=require("obsidian");var br=class{constructor(t){this.plugin=t}async getSettings(t){let a=await this.plugin.loadData();return{...t,...a}}async storeSettings(t){await this.plugin.saveData(t)}};var Mr={displayDateTemplate:"HH:mm",useCreatedOnDateFromProperties:!1,createdOnDatePropertyName:"created_on",createdOnPropertyFormat:"yyyy/MM/dd HH:mm",sortNotes:"ascending"};var Dr={displayNotesCreatedOnDate:!1,displayNoteIndicator:!0,useModifierKeyToCreateNote:!1,firstDayOfWeek:1,weekNumberStandard:0};var ol={nameTemplate:"yyyy-MM-dd",folder:"Daily notes",templateFile:"Templates/Daily note"},rl={nameTemplate:"yyyy-ww",folder:"Weekly notes",templateFile:"Templates/Weekly note"},ul={nameTemplate:"yyyy-MM",folder:"Monthly notes",templateFile:"Templates/Monthly note"},il={nameTemplate:"yyyy-qqq",folder:"Quarterly notes",templateFile:"Templates/Quarterly note"},nl={nameTemplate:"yyyy",folder:"Yearly notes",templateFile:"Templates/Yearly note"};var _={generalSettings:Dr,notesSettings:Mr,dailyNotes:ol,weeklyNotes:rl,monthlyNotes:ul,quarterlyNotes:il,yearlyNotes:nl};var Tr=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),dailyNotes:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...ol,...t.dailyNotes}}};var Pr=class{constructor(t){this.adapter=t}async store(t){await this.adapter.storeSettings(t)}async get(){return await this.adapter.getSettings(_)}};var Nr=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),generalSettings:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...Dr,...t.generalSettings}}};var Ar=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),weeklyNotes:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...rl,...t.weeklyNotes}}};var kr=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),monthlyNotes:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...ul,...t.monthlyNotes}}};var Rr=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),quarterlyNotes:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...il,...t.quarterlyNotes}}};var Or=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),yearlyNotes:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...nl,...t.yearlyNotes}}};var Fr=class{constructor(t){this.adapter=t}async store(t){let l={...await this.adapter.getSettings(_),notesSettings:t};await this.adapter.storeSettings(l)}async get(){let t=await this.adapter.getSettings(_);return{...Mr,...t.notesSettings}}};var Er=class{constructor(t){this.adapter=t}getRepository(t){switch(t){case"plugin":return new Pr(this.adapter);case"displayNotes":return new Fr(this.adapter);case"general":return new Nr(this.adapter);case"dailyNote":return new Tr(this.adapter);case"weeklyNote":return new Ar(this.adapter);case"monthlyNote":return new kr(this.adapter);case"quarterlyNote":return new Rr(this.adapter);case"yearlyNote":return new Or(this.adapter)}}};String.prototype.appendMarkdownExtension=function(){let e=".md";return this.endsWith(e)?this:this+e};String.prototype.removeMarkdownExtension=function(){let e=".md";return this.endsWith(e)?this.replace(e,""):this};Date.prototype.isSameMonth=function(e){return e?this.getMonth()===e.date.getMonth()&&this.getFullYear()===e.date.getFullYear():!1};Date.prototype.calculate=function(e){if(!e)return this;let t=new Date(this);switch(e.operator){case"+":switch(e.unit){case"d":t.setDate(t.getDate()+e.value);break;case"w":t.setDate(t.getDate()+e.value*7);break;case"m":t.setMonth(t.getMonth()+e.value);break;case"y":t.setFullYear(t.getFullYear()+e.value);break}break;case"-":switch(e.unit){case"d":t.setDate(t.getDate()-e.value);break;case"w":t.setDate(t.getDate()-e.value*7);break;case"m":t.setMonth(t.getMonth()-e.value);break;case"y":t.setFullYear(t.getFullYear()-e.value);break}break}return t};var Br=class{constructor(t){this.dateParser=t.getParser()}withPath(t){return this.pathTemplate=t,this}withName(t){return this.nameTemplate=t,this}withValue(t){return this.period=t,this}build(){var l;if(this.period){if(!this.nameTemplate)throw Error("Name template is required!")}else throw Error("Period is required!");let t=this.dateParser.fromDate(this.period.date,(l=this.pathTemplate)!=null?l:""),a=this.dateParser.fromDate(this.period.date,this.nameTemplate).appendMarkdownExtension();return t.length===0?a:[t,a].join("/")}};var Hr=class{constructor(t){this.dateParserFactory=t}getNameBuilder(t){switch(t){case"periodicNote":return new Br(this.dateParserFactory)}}};var qr=class qr{parseVariables(t,a){return t.replace(qr.variablePattern,a)}};qr.variablePattern=/{{title}}/g;var Ur=qr;var zr=class zr{constructor(t,a){this.variableFactory=t;this.dateParserFactory=a}parseVariables(t,a){let l=this.dateParserFactory.getParser();return t.replace(zr.variablePattern,(o,r)=>{let u=this.variableFactory.getVariable(o);return l.fromDate(a.date.calculate(u.calculus),u.template)})}};zr.variablePattern=/{{date.*?}}/g;var Vr=zr;var Gr=class Gr{constructor(t,a){this.variableFactory=t;this.dateParserFactory=a}parseVariables(t,a){let l=this.dateParserFactory.getParser();return t.replace(Gr.variablePattern,(o,r)=>{let u=this.variableFactory.getVariable(o);return l.fromDate(a.calculate(u.calculus),u.template)})}};Gr.variablePattern=/{{today.*?}}/g;var _r=Gr;var Wr=class{constructor(t,a){this.variableFactory=t;this.dateParserFactory=a}getVariableParser(t){switch(t){case 2:return new Ur;case 0:return new Vr(this.variableFactory,this.dateParserFactory);case 1:return new _r(this.variableFactory,this.dateParserFactory)}}};var CS=Math.pow(10,8)*24*60*60*1e3,Uw=-CS,Yr=6048e5,cc=864e5,mc=6e4,pc=36e5,hc=1e3;var vS=3600;var gc=vS*24,qw=gc*7,wS=gc*365.2425,IS=wS/12,Vw=IS*3,Ls=Symbol.for("constructDateFrom");function O(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ls in e?e[Ls](t):e instanceof Date?new e.constructor(t):new Date(t)}function M(e,t){return O(t||e,e)}function sl(e,t,a){let l=M(e,a==null?void 0:a.in);return isNaN(t)?O((a==null?void 0:a.in)||e,NaN):(t&&l.setDate(l.getDate()+t),l)}function Xr(e,t,a){let l=M(e,a==null?void 0:a.in);if(isNaN(t))return O((a==null?void 0:a.in)||e,NaN);if(!t)return l;let o=l.getDate(),r=O((a==null?void 0:a.in)||e,l.getTime());r.setMonth(l.getMonth()+t+1,0);let u=r.getDate();return o>=u?r:(l.setFullYear(r.getFullYear(),r.getMonth(),o),l)}var bS={};function Ee(){return bS}function we(e,t){var i,n,s,p,g,f,h,L;let a=Ee(),l=(L=(h=(p=(s=t==null?void 0:t.weekStartsOn)!=null?s:(n=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:n.weekStartsOn)!=null?p:a.weekStartsOn)!=null?h:(f=(g=a.locale)==null?void 0:g.options)==null?void 0:f.weekStartsOn)!=null?L:0,o=M(e,t==null?void 0:t.in),r=o.getDay(),u=(r=r.getTime()?l+1:a.getTime()>=i.getTime()?l:l-1}function Pa(e){let t=M(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Zr(e,...t){let a=O.bind(null,e||t.find(l=>typeof l=="object"));return t.map(a)}function Cs(e,t){let a=M(e,t==null?void 0:t.in);return a.setHours(0,0,0,0),a}function yc(e,t,a){let[l,o]=Zr(a==null?void 0:a.in,e,t),r=Cs(l),u=Cs(o),i=+r-Pa(r),n=+u-Pa(u);return Math.round((i-n)/cc)}function Sc(e,t){let a=Qr(e,t),l=O((t==null?void 0:t.in)||e,0);return l.setFullYear(a,0,4),l.setHours(0,0,0,0),ft(l)}function Kr(e,t,a){return sl(e,t*7,a)}function xc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lc(e){return!(!xc(e)&&typeof e!="number"||isNaN(+M(e)))}function Cc(e,t){let a=M(e,t==null?void 0:t.in);return Math.trunc(a.getMonth()/3)+1}function vc(e,t){let[a,l]=Zr(e,t.start,t.end);return{start:a,end:l}}function wc(e,t){var s;let{start:a,end:l}=vc(t==null?void 0:t.in,e),o=+a>+l,r=o?+a:+l,u=o?l:a;u.setHours(0,0,0,0);let i=(s=t==null?void 0:t.step)!=null?s:1;if(!i)return[];i<0&&(i=-i,o=!o);let n=[];for(;+u<=r;)n.push(O(a,u)),u.setDate(u.getDate()+i),u.setHours(0,0,0,0);return o?n.reverse():n}function Ic(e,t){let a=M(e,t==null?void 0:t.in),l=a.getMonth(),o=l-l%3;return a.setMonth(o,1),a.setHours(0,0,0,0),a}function vs(e,t){let a=M(e,t==null?void 0:t.in);return a.setDate(1),a.setHours(0,0,0,0),a}function bc(e,t){let a=M(e,t==null?void 0:t.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}function Mc(e,t){var i,n,s,p,g,f,h,L;let a=Ee(),l=(L=(h=(p=(s=t==null?void 0:t.weekStartsOn)!=null?s:(n=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:n.weekStartsOn)!=null?p:a.weekStartsOn)!=null?h:(f=(g=a.locale)==null?void 0:g.options)==null?void 0:f.weekStartsOn)!=null?L:0,o=M(e,t==null?void 0:t.in),r=o.getDay(),u=(r{let l,o=MS[e];return typeof o=="string"?l=o:t===1?l=o.one:l=o.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+l:l+" ago":l};function jr(e){return(t={})=>{let a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}var DS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},TS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tc={date:jr({formats:DS,defaultWidth:"full"}),time:jr({formats:TS,defaultWidth:"full"}),dateTime:jr({formats:PS,defaultWidth:"full"})};var NS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pc=(e,t,a,l)=>NS[e];function dl(e){return(t,a)=>{let l=a!=null&&a.context?String(a.context):"standalone",o;if(l==="formatting"&&e.formattingValues){let u=e.defaultFormattingWidth||e.defaultWidth,i=a!=null&&a.width?String(a.width):u;o=e.formattingValues[i]||e.formattingValues[u]}else{let u=e.defaultWidth,i=a!=null&&a.width?String(a.width):e.defaultWidth;o=e.values[i]||e.values[u]}let r=e.argumentCallback?e.argumentCallback(t):t;return o[r]}}var AS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},FS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ES={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},BS=(e,t)=>{let a=Number(e),l=a%100;if(l>20||l<10)switch(l%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Nc={ordinalNumber:BS,era:dl({values:AS,defaultWidth:"wide"}),quarter:dl({values:kS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:dl({values:RS,defaultWidth:"wide"}),day:dl({values:OS,defaultWidth:"wide"}),dayPeriod:dl({values:FS,defaultWidth:"wide",formattingValues:ES,defaultFormattingWidth:"wide"})};function fl(e){return(t,a={})=>{let l=a.width,o=l&&e.matchPatterns[l]||e.matchPatterns[e.defaultMatchWidth],r=t.match(o);if(!r)return null;let u=r[0],i=l&&e.parsePatterns[l]||e.parsePatterns[e.defaultParseWidth],n=Array.isArray(i)?US(i,g=>g.test(u)):HS(i,g=>g.test(u)),s;s=e.valueCallback?e.valueCallback(n):n,s=a.valueCallback?a.valueCallback(s):s;let p=t.slice(u.length);return{value:s,rest:p}}}function HS(e,t){for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function US(e,t){for(let a=0;a{let l=t.match(e.matchPattern);if(!l)return null;let o=l[0],r=t.match(e.parsePattern);if(!r)return null;let u=e.valueCallback?e.valueCallback(r[0]):r[0];u=a.valueCallback?a.valueCallback(u):u;let i=t.slice(o.length);return{value:u,rest:i}}}var qS=/^(\d+)(th|st|nd|rd)?/i,VS=/\d+/i,zS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},_S={any:[/^b/i,/^(a|c)/i]},GS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WS={any:[/1/i,/2/i,/3/i,/4/i]},YS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},XS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ZS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},KS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},jS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kc={ordinalNumber:Ac({matchPattern:qS,parsePattern:VS,valueCallback:e=>parseInt(e,10)}),era:fl({matchPatterns:zS,defaultMatchWidth:"wide",parsePatterns:_S,defaultParseWidth:"any"}),quarter:fl({matchPatterns:GS,defaultMatchWidth:"wide",parsePatterns:WS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:fl({matchPatterns:YS,defaultMatchWidth:"wide",parsePatterns:XS,defaultParseWidth:"any"}),day:fl({matchPatterns:QS,defaultMatchWidth:"wide",parsePatterns:ZS,defaultParseWidth:"any"}),dayPeriod:fl({matchPatterns:KS,defaultMatchWidth:"any",parsePatterns:jS,defaultParseWidth:"any"})};var so={code:"en-US",formatDistance:Dc,formatLong:Tc,formatRelative:Pc,localize:Nc,match:kc,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rc(e,t){let a=M(e,t==null?void 0:t.in);return yc(a,bc(a))+1}function cl(e,t){let a=M(e,t==null?void 0:t.in),l=+ft(a)-+Sc(a);return Math.round(l/Yr)+1}function ml(e,t){var p,g,f,h,L,I,N,c;let a=M(e,t==null?void 0:t.in),l=a.getFullYear(),o=Ee(),r=(c=(N=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(g=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)!=null?h:o.firstWeekContainsDate)!=null?N:(I=(L=o.locale)==null?void 0:L.options)==null?void 0:I.firstWeekContainsDate)!=null?c:1,u=O((t==null?void 0:t.in)||e,0);u.setFullYear(l+1,0,r),u.setHours(0,0,0,0);let i=we(u,t),n=O((t==null?void 0:t.in)||e,0);n.setFullYear(l,0,r),n.setHours(0,0,0,0);let s=we(n,t);return+a>=+i?l+1:+a>=+s?l:l-1}function Oc(e,t){var i,n,s,p,g,f,h,L;let a=Ee(),l=(L=(h=(p=(s=t==null?void 0:t.firstWeekContainsDate)!=null?s:(n=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:n.firstWeekContainsDate)!=null?p:a.firstWeekContainsDate)!=null?h:(f=(g=a.locale)==null?void 0:g.options)==null?void 0:f.firstWeekContainsDate)!=null?L:1,o=ml(e,t),r=O((t==null?void 0:t.in)||e,0);return r.setFullYear(o,0,l),r.setHours(0,0,0,0),we(r,t)}function pl(e,t){let a=M(e,t==null?void 0:t.in),l=+we(a,t)-+Oc(a,t);return Math.round(l/Yr)+1}function G(e,t){let a=e<0?"-":"",l=Math.abs(e).toString().padStart(t,"0");return a+l}var At={y(e,t){let a=e.getFullYear(),l=a>0?a:1-a;return G(t==="yy"?l%100:l,t.length)},M(e,t){let a=e.getMonth();return t==="M"?String(a+1):G(a+1,2)},d(e,t){return G(e.getDate(),t.length)},a(e,t){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return G(e.getHours()%12||12,t.length)},H(e,t){return G(e.getHours(),t.length)},m(e,t){return G(e.getMinutes(),t.length)},s(e,t){return G(e.getSeconds(),t.length)},S(e,t){let a=t.length,l=e.getMilliseconds(),o=Math.trunc(l*Math.pow(10,a-3));return G(o,t.length)}};var hl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ws={G:function(e,t,a){let l=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(l,{width:"abbreviated"});case"GGGGG":return a.era(l,{width:"narrow"});case"GGGG":default:return a.era(l,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){let l=e.getFullYear(),o=l>0?l:1-l;return a.ordinalNumber(o,{unit:"year"})}return At.y(e,t)},Y:function(e,t,a,l){let o=ml(e,l),r=o>0?o:1-o;if(t==="YY"){let u=r%100;return G(u,2)}return t==="Yo"?a.ordinalNumber(r,{unit:"year"}):G(r,t.length)},R:function(e,t){let a=Qr(e);return G(a,t.length)},u:function(e,t){let a=e.getFullYear();return G(a,t.length)},Q:function(e,t,a){let l=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(l);case"QQ":return G(l,2);case"Qo":return a.ordinalNumber(l,{unit:"quarter"});case"QQQ":return a.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(l,{width:"wide",context:"formatting"})}},q:function(e,t,a){let l=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(l);case"qq":return G(l,2);case"qo":return a.ordinalNumber(l,{unit:"quarter"});case"qqq":return a.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(l,{width:"wide",context:"standalone"})}},M:function(e,t,a){let l=e.getMonth();switch(t){case"M":case"MM":return At.M(e,t);case"Mo":return a.ordinalNumber(l+1,{unit:"month"});case"MMM":return a.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(l,{width:"wide",context:"formatting"})}},L:function(e,t,a){let l=e.getMonth();switch(t){case"L":return String(l+1);case"LL":return G(l+1,2);case"Lo":return a.ordinalNumber(l+1,{unit:"month"});case"LLL":return a.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(l,{width:"wide",context:"standalone"})}},w:function(e,t,a,l){let o=pl(e,l);return t==="wo"?a.ordinalNumber(o,{unit:"week"}):G(o,t.length)},I:function(e,t,a){let l=cl(e);return t==="Io"?a.ordinalNumber(l,{unit:"week"}):G(l,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):At.d(e,t)},D:function(e,t,a){let l=Rc(e);return t==="Do"?a.ordinalNumber(l,{unit:"dayOfYear"}):G(l,t.length)},E:function(e,t,a){let l=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(l,{width:"short",context:"formatting"});case"EEEE":default:return a.day(l,{width:"wide",context:"formatting"})}},e:function(e,t,a,l){let o=e.getDay(),r=(o-l.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return G(r,2);case"eo":return a.ordinalNumber(r,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,a,l){let o=e.getDay(),r=(o-l.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return G(r,t.length);case"co":return a.ordinalNumber(r,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,a){let l=e.getDay(),o=l===0?7:l;switch(t){case"i":return String(o);case"ii":return G(o,t.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(l,{width:"short",context:"formatting"});case"iiii":default:return a.day(l,{width:"wide",context:"formatting"})}},a:function(e,t,a){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,a){let l=e.getHours(),o;switch(l===12?o=hl.noon:l===0?o=hl.midnight:o=l/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,a){let l=e.getHours(),o;switch(l>=17?o=hl.evening:l>=12?o=hl.afternoon:l>=4?o=hl.morning:o=hl.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let l=e.getHours()%12;return l===0&&(l=12),a.ordinalNumber(l,{unit:"hour"})}return At.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):At.H(e,t)},K:function(e,t,a){let l=e.getHours()%12;return t==="Ko"?a.ordinalNumber(l,{unit:"hour"}):G(l,t.length)},k:function(e,t,a){let l=e.getHours();return l===0&&(l=24),t==="ko"?a.ordinalNumber(l,{unit:"hour"}):G(l,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):At.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):At.s(e,t)},S:function(e,t){return At.S(e,t)},X:function(e,t,a){let l=e.getTimezoneOffset();if(l===0)return"Z";switch(t){case"X":return Ec(l);case"XXXX":case"XX":return Na(l);case"XXXXX":case"XXX":default:return Na(l,":")}},x:function(e,t,a){let l=e.getTimezoneOffset();switch(t){case"x":return Ec(l);case"xxxx":case"xx":return Na(l);case"xxxxx":case"xxx":default:return Na(l,":")}},O:function(e,t,a){let l=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Fc(l,":");case"OOOO":default:return"GMT"+Na(l,":")}},z:function(e,t,a){let l=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Fc(l,":");case"zzzz":default:return"GMT"+Na(l,":")}},t:function(e,t,a){let l=Math.trunc(+e/1e3);return G(l,t.length)},T:function(e,t,a){return G(+e,t.length)}};function Fc(e,t=""){let a=e>0?"-":"+",l=Math.abs(e),o=Math.trunc(l/60),r=l%60;return r===0?a+String(o):a+String(o)+t+G(r,2)}function Ec(e,t){return e%60===0?(e>0?"-":"+")+G(Math.abs(e)/60,2):Na(e,t)}function Na(e,t=""){let a=e>0?"-":"+",l=Math.abs(e),o=G(Math.trunc(l/60),2),r=G(l%60,2);return a+o+t+r}var Bc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Hc=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},JS=(e,t)=>{let a=e.match(/(P+)(p+)?/)||[],l=a[1],o=a[2];if(!o)return Bc(e,t);let r;switch(l){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"});break}return r.replace("{{date}}",Bc(l,t)).replace("{{time}}",Hc(o,t))},fo={p:Hc,P:JS};var $S=/^D+$/,ex=/^Y+$/,tx=["D","DD","YY","YYYY"];function Jr(e){return $S.test(e)}function $r(e){return ex.test(e)}function co(e,t,a){let l=ax(e,t,a);if(console.warn(l),tx.includes(e))throw new RangeError(l)}function ax(e,t,a){let l=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${l} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var lx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ox=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rx=/^'([^]*?)'?$/,ux=/''/g,ix=/[a-zA-Z]/;function Uc(e,t,a){var p,g,f,h,L,I,N,c,d,m,y,C,D,v,b,j,A,Fe;let l=Ee(),o=(g=(p=a==null?void 0:a.locale)!=null?p:l.locale)!=null?g:so,r=(m=(d=(I=(L=a==null?void 0:a.firstWeekContainsDate)!=null?L:(h=(f=a==null?void 0:a.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)!=null?I:l.firstWeekContainsDate)!=null?d:(c=(N=l.locale)==null?void 0:N.options)==null?void 0:c.firstWeekContainsDate)!=null?m:1,u=(Fe=(A=(v=(D=a==null?void 0:a.weekStartsOn)!=null?D:(C=(y=a==null?void 0:a.locale)==null?void 0:y.options)==null?void 0:C.weekStartsOn)!=null?v:l.weekStartsOn)!=null?A:(j=(b=l.locale)==null?void 0:b.options)==null?void 0:j.weekStartsOn)!=null?Fe:0,i=M(e,a==null?void 0:a.in);if(!Lc(i))throw new RangeError("Invalid time value");let n=t.match(ox).map(ye=>{let ve=ye[0];if(ve==="p"||ve==="P"){let ll=fo[ve];return ll(ye,o.formatLong)}return ye}).join("").match(lx).map(ye=>{if(ye==="''")return{isToken:!1,value:"'"};let ve=ye[0];if(ve==="'")return{isToken:!1,value:nx(ye)};if(ws[ve])return{isToken:!0,value:ye};if(ve.match(ix))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ve+"`");return{isToken:!1,value:ye}});o.localize.preprocessor&&(n=o.localize.preprocessor(i,n));let s={firstWeekContainsDate:r,weekStartsOn:u,locale:o};return n.map(ye=>{if(!ye.isToken)return ye.value;let ve=ye.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&$r(ve)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&Jr(ve))&&co(ve,t,String(e));let ll=ws[ve[0]];return ll(i,ve,o.localize,s)}).join("")}function nx(e){let t=e.match(rx);return t?t[1].replace(ux,"'"):e}function qc(){return Object.assign({},Ee())}function Vc(e,t){let a=M(e,t==null?void 0:t.in).getDay();return a===0?7:a}function zc(e,t){let a=sx(t)?new t(0):O(t,0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}function sx(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}var dx=10,eu=class{constructor(){x(this,"subPriority",0)}validate(t,a){return!0}},tu=class extends eu{constructor(t,a,l,o,r){super(),this.value=t,this.validateValue=a,this.setValue=l,this.priority=o,r&&(this.subPriority=r)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,l){return this.setValue(t,a,this.value,l)}},au=class extends eu{constructor(a,l){super();x(this,"priority",dx);x(this,"subPriority",-1);this.context=a||(o=>O(l,o))}set(a,l){return l.timestampIsSet?a:O(a,zc(a,this.context))}};var w=class{run(t,a,l,o){let r=this.parse(t,a,l,o);return r?{setter:new tu(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,a,l){return!0}};var lu=class extends w{constructor(){super(...arguments);x(this,"priority",140);x(this,"incompatibleTokens",["R","u","t","T"])}parse(a,l,o){switch(l){case"G":case"GG":case"GGG":return o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"});case"GGGGG":return o.era(a,{width:"narrow"});case"GGGG":default:return o.era(a,{width:"wide"})||o.era(a,{width:"abbreviated"})||o.era(a,{width:"narrow"})}}set(a,l,o){return l.era=o,a.setFullYear(o,0,1),a.setHours(0,0,0,0),a}};var H={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Qe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function W(e,t){return e&&{value:t(e.value),rest:e.rest}}function E(e,t){let a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function Ze(e,t){let a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};let l=a[1]==="+"?1:-1,o=a[2]?parseInt(a[2],10):0,r=a[3]?parseInt(a[3],10):0,u=a[5]?parseInt(a[5],10):0;return{value:l*(o*pc+r*mc+u*hc),rest:t.slice(a[0].length)}}function ou(e){return E(H.anyDigitsSigned,e)}function T(e,t){switch(e){case 1:return E(H.singleDigit,t);case 2:return E(H.twoDigits,t);case 3:return E(H.threeDigits,t);case 4:return E(H.fourDigits,t);default:return E(new RegExp("^\\d{1,"+e+"}"),t)}}function gl(e,t){switch(e){case 1:return E(H.singleDigitSigned,t);case 2:return E(H.twoDigitsSigned,t);case 3:return E(H.threeDigitsSigned,t);case 4:return E(H.fourDigitsSigned,t);default:return E(new RegExp("^-?\\d{1,"+e+"}"),t)}}function yl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ru(e,t){let a=t>0,l=a?t:1-t,o;if(l<=50)o=e||100;else{let r=l+50,u=Math.trunc(r/100)*100,i=e>=r%100;o=e+u-(i?100:0)}return a?o:1-o}function uu(e){return e%400===0||e%4===0&&e%100!==0}var iu=class extends w{constructor(){super(...arguments);x(this,"priority",130);x(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,l,o){let r=u=>({year:u,isTwoDigitYear:l==="yy"});switch(l){case"y":return W(T(4,a),r);case"yo":return W(o.ordinalNumber(a,{unit:"year"}),r);default:return W(T(l.length,a),r)}}validate(a,l){return l.isTwoDigitYear||l.year>0}set(a,l,o){let r=a.getFullYear();if(o.isTwoDigitYear){let i=ru(o.year,r);return a.setFullYear(i,0,1),a.setHours(0,0,0,0),a}let u=!("era"in l)||l.era===1?o.year:1-o.year;return a.setFullYear(u,0,1),a.setHours(0,0,0,0),a}};var nu=class extends w{constructor(){super(...arguments);x(this,"priority",130);x(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,l,o){let r=u=>({year:u,isTwoDigitYear:l==="YY"});switch(l){case"Y":return W(T(4,a),r);case"Yo":return W(o.ordinalNumber(a,{unit:"year"}),r);default:return W(T(l.length,a),r)}}validate(a,l){return l.isTwoDigitYear||l.year>0}set(a,l,o,r){let u=ml(a,r);if(o.isTwoDigitYear){let n=ru(o.year,u);return a.setFullYear(n,0,r.firstWeekContainsDate),a.setHours(0,0,0,0),we(a,r)}let i=!("era"in l)||l.era===1?o.year:1-o.year;return a.setFullYear(i,0,r.firstWeekContainsDate),a.setHours(0,0,0,0),we(a,r)}};var su=class extends w{constructor(){super(...arguments);x(this,"priority",130);x(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,l){return l==="R"?gl(4,a):gl(l.length,a)}set(a,l,o){let r=O(a,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),ft(r)}};var du=class extends w{constructor(){super(...arguments);x(this,"priority",130);x(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,l){return l==="u"?gl(4,a):gl(l.length,a)}set(a,l,o){return a.setFullYear(o,0,1),a.setHours(0,0,0,0),a}};var fu=class extends w{constructor(){super(...arguments);x(this,"priority",120);x(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,l,o){switch(l){case"Q":case"QQ":return T(l.length,a);case"Qo":return o.ordinalNumber(a,{unit:"quarter"});case"QQQ":return o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(a,{width:"wide",context:"formatting"})||o.quarter(a,{width:"abbreviated",context:"formatting"})||o.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,l){return l>=1&&l<=4}set(a,l,o){return a.setMonth((o-1)*3,1),a.setHours(0,0,0,0),a}};var cu=class extends w{constructor(){super(...arguments);x(this,"priority",120);x(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,l,o){switch(l){case"q":case"qq":return T(l.length,a);case"qo":return o.ordinalNumber(a,{unit:"quarter"});case"qqq":return o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(a,{width:"wide",context:"standalone"})||o.quarter(a,{width:"abbreviated",context:"standalone"})||o.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,l){return l>=1&&l<=4}set(a,l,o){return a.setMonth((o-1)*3,1),a.setHours(0,0,0,0),a}};var mu=class extends w{constructor(){super(...arguments);x(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);x(this,"priority",110)}parse(a,l,o){let r=u=>u-1;switch(l){case"M":return W(E(H.month,a),r);case"MM":return W(T(2,a),r);case"Mo":return W(o.ordinalNumber(a,{unit:"month"}),r);case"MMM":return o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(a,{width:"wide",context:"formatting"})||o.month(a,{width:"abbreviated",context:"formatting"})||o.month(a,{width:"narrow",context:"formatting"})}}validate(a,l){return l>=0&&l<=11}set(a,l,o){return a.setMonth(o,1),a.setHours(0,0,0,0),a}};var pu=class extends w{constructor(){super(...arguments);x(this,"priority",110);x(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,l,o){let r=u=>u-1;switch(l){case"L":return W(E(H.month,a),r);case"LL":return W(T(2,a),r);case"Lo":return W(o.ordinalNumber(a,{unit:"month"}),r);case"LLL":return o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(a,{width:"wide",context:"standalone"})||o.month(a,{width:"abbreviated",context:"standalone"})||o.month(a,{width:"narrow",context:"standalone"})}}validate(a,l){return l>=0&&l<=11}set(a,l,o){return a.setMonth(o,1),a.setHours(0,0,0,0),a}};function _c(e,t,a){let l=M(e,a==null?void 0:a.in),o=pl(l,a)-t;return l.setDate(l.getDate()-o*7),M(l,a==null?void 0:a.in)}var hu=class extends w{constructor(){super(...arguments);x(this,"priority",100);x(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,l,o){switch(l){case"w":return E(H.week,a);case"wo":return o.ordinalNumber(a,{unit:"week"});default:return T(l.length,a)}}validate(a,l){return l>=1&&l<=53}set(a,l,o,r){return we(_c(a,o,r),r)}};function Gc(e,t,a){let l=M(e,a==null?void 0:a.in),o=cl(l,a)-t;return l.setDate(l.getDate()-o*7),l}var gu=class extends w{constructor(){super(...arguments);x(this,"priority",100);x(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,l,o){switch(l){case"I":return E(H.week,a);case"Io":return o.ordinalNumber(a,{unit:"week"});default:return T(l.length,a)}}validate(a,l){return l>=1&&l<=53}set(a,l,o){return ft(Gc(a,o))}};var fx=[31,28,31,30,31,30,31,31,30,31,30,31],cx=[31,29,31,30,31,30,31,31,30,31,30,31],yu=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"subPriority",1);x(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,l,o){switch(l){case"d":return E(H.date,a);case"do":return o.ordinalNumber(a,{unit:"date"});default:return T(l.length,a)}}validate(a,l){let o=a.getFullYear(),r=uu(o),u=a.getMonth();return r?l>=1&&l<=cx[u]:l>=1&&l<=fx[u]}set(a,l,o){return a.setDate(o),a.setHours(0,0,0,0),a}};var Su=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"subpriority",1);x(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,l,o){switch(l){case"D":case"DD":return E(H.dayOfYear,a);case"Do":return o.ordinalNumber(a,{unit:"date"});default:return T(l.length,a)}}validate(a,l){let o=a.getFullYear();return uu(o)?l>=1&&l<=366:l>=1&&l<=365}set(a,l,o){return a.setMonth(0,o),a.setHours(0,0,0,0),a}};function Sl(e,t,a){var g,f,h,L,I,N,c,d;let l=Ee(),o=(d=(c=(L=(h=a==null?void 0:a.weekStartsOn)!=null?h:(f=(g=a==null?void 0:a.locale)==null?void 0:g.options)==null?void 0:f.weekStartsOn)!=null?L:l.weekStartsOn)!=null?c:(N=(I=l.locale)==null?void 0:I.options)==null?void 0:N.weekStartsOn)!=null?d:0,r=M(e,a==null?void 0:a.in),u=r.getDay(),n=(t%7+7)%7,s=7-o,p=t<0||t>6?t-(u+s)%7:(n+s)%7-(u+s)%7;return sl(r,p,a)}var xu=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,l,o){switch(l){case"E":case"EE":case"EEE":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}validate(a,l){return l>=0&&l<=6}set(a,l,o,r){return a=Sl(a,o,r),a.setHours(0,0,0,0),a}};var Lu=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,l,o,r){let u=i=>{let n=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+n};switch(l){case"e":case"ee":return W(T(l.length,a),u);case"eo":return W(o.ordinalNumber(a,{unit:"day"}),u);case"eee":return o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"})}}validate(a,l){return l>=0&&l<=6}set(a,l,o,r){return a=Sl(a,o,r),a.setHours(0,0,0,0),a}};var Cu=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,l,o,r){let u=i=>{let n=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+n};switch(l){case"c":case"cc":return W(T(l.length,a),u);case"co":return W(o.ordinalNumber(a,{unit:"day"}),u);case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})||o.day(a,{width:"abbreviated",context:"standalone"})||o.day(a,{width:"short",context:"standalone"})||o.day(a,{width:"narrow",context:"standalone"})}}validate(a,l){return l>=0&&l<=6}set(a,l,o,r){return a=Sl(a,o,r),a.setHours(0,0,0,0),a}};function Wc(e,t,a){let l=M(e,a==null?void 0:a.in),o=Vc(l,a),r=t-o;return sl(l,r,a)}var vu=class extends w{constructor(){super(...arguments);x(this,"priority",90);x(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,l,o){let r=u=>u===0?7:u;switch(l){case"i":case"ii":return T(l.length,a);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return W(o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),r);case"iiiii":return W(o.day(a,{width:"narrow",context:"formatting"}),r);case"iiiiii":return W(o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),r);case"iiii":default:return W(o.day(a,{width:"wide",context:"formatting"})||o.day(a,{width:"abbreviated",context:"formatting"})||o.day(a,{width:"short",context:"formatting"})||o.day(a,{width:"narrow",context:"formatting"}),r)}}validate(a,l){return l>=1&&l<=7}set(a,l,o){return a=Wc(a,o),a.setHours(0,0,0,0),a}};var wu=class extends w{constructor(){super(...arguments);x(this,"priority",80);x(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,l,o){switch(l){case"a":case"aa":case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,l,o){return a.setHours(yl(o),0,0,0),a}};var Iu=class extends w{constructor(){super(...arguments);x(this,"priority",80);x(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,l,o){switch(l){case"b":case"bb":case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,l,o){return a.setHours(yl(o),0,0,0),a}};var bu=class extends w{constructor(){super(...arguments);x(this,"priority",80);x(this,"incompatibleTokens",["a","b","t","T"])}parse(a,l,o){switch(l){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})||o.dayPeriod(a,{width:"abbreviated",context:"formatting"})||o.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,l,o){return a.setHours(yl(o),0,0,0),a}};var Mu=class extends w{constructor(){super(...arguments);x(this,"priority",70);x(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,l,o){switch(l){case"h":return E(H.hour12h,a);case"ho":return o.ordinalNumber(a,{unit:"hour"});default:return T(l.length,a)}}validate(a,l){return l>=1&&l<=12}set(a,l,o){let r=a.getHours()>=12;return r&&o<12?a.setHours(o+12,0,0,0):!r&&o===12?a.setHours(0,0,0,0):a.setHours(o,0,0,0),a}};var Du=class extends w{constructor(){super(...arguments);x(this,"priority",70);x(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,l,o){switch(l){case"H":return E(H.hour23h,a);case"Ho":return o.ordinalNumber(a,{unit:"hour"});default:return T(l.length,a)}}validate(a,l){return l>=0&&l<=23}set(a,l,o){return a.setHours(o,0,0,0),a}};var Tu=class extends w{constructor(){super(...arguments);x(this,"priority",70);x(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,l,o){switch(l){case"K":return E(H.hour11h,a);case"Ko":return o.ordinalNumber(a,{unit:"hour"});default:return T(l.length,a)}}validate(a,l){return l>=0&&l<=11}set(a,l,o){return a.getHours()>=12&&o<12?a.setHours(o+12,0,0,0):a.setHours(o,0,0,0),a}};var Pu=class extends w{constructor(){super(...arguments);x(this,"priority",70);x(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,l,o){switch(l){case"k":return E(H.hour24h,a);case"ko":return o.ordinalNumber(a,{unit:"hour"});default:return T(l.length,a)}}validate(a,l){return l>=1&&l<=24}set(a,l,o){let r=o<=24?o%24:o;return a.setHours(r,0,0,0),a}};var Nu=class extends w{constructor(){super(...arguments);x(this,"priority",60);x(this,"incompatibleTokens",["t","T"])}parse(a,l,o){switch(l){case"m":return E(H.minute,a);case"mo":return o.ordinalNumber(a,{unit:"minute"});default:return T(l.length,a)}}validate(a,l){return l>=0&&l<=59}set(a,l,o){return a.setMinutes(o,0,0),a}};var Au=class extends w{constructor(){super(...arguments);x(this,"priority",50);x(this,"incompatibleTokens",["t","T"])}parse(a,l,o){switch(l){case"s":return E(H.second,a);case"so":return o.ordinalNumber(a,{unit:"second"});default:return T(l.length,a)}}validate(a,l){return l>=0&&l<=59}set(a,l,o){return a.setSeconds(o,0),a}};var ku=class extends w{constructor(){super(...arguments);x(this,"priority",30);x(this,"incompatibleTokens",["t","T"])}parse(a,l){let o=r=>Math.trunc(r*Math.pow(10,-l.length+3));return W(T(l.length,a),o)}set(a,l,o){return a.setMilliseconds(o),a}};var Ru=class extends w{constructor(){super(...arguments);x(this,"priority",10);x(this,"incompatibleTokens",["t","T","x"])}parse(a,l){switch(l){case"X":return Ze(Qe.basicOptionalMinutes,a);case"XX":return Ze(Qe.basic,a);case"XXXX":return Ze(Qe.basicOptionalSeconds,a);case"XXXXX":return Ze(Qe.extendedOptionalSeconds,a);case"XXX":default:return Ze(Qe.extended,a)}}set(a,l,o){return l.timestampIsSet?a:O(a,a.getTime()-Pa(a)-o)}};var Ou=class extends w{constructor(){super(...arguments);x(this,"priority",10);x(this,"incompatibleTokens",["t","T","X"])}parse(a,l){switch(l){case"x":return Ze(Qe.basicOptionalMinutes,a);case"xx":return Ze(Qe.basic,a);case"xxxx":return Ze(Qe.basicOptionalSeconds,a);case"xxxxx":return Ze(Qe.extendedOptionalSeconds,a);case"xxx":default:return Ze(Qe.extended,a)}}set(a,l,o){return l.timestampIsSet?a:O(a,a.getTime()-Pa(a)-o)}};var Fu=class extends w{constructor(){super(...arguments);x(this,"priority",40);x(this,"incompatibleTokens","*")}parse(a){return ou(a)}set(a,l,o){return[O(a,o*1e3),{timestampIsSet:!0}]}};var Eu=class extends w{constructor(){super(...arguments);x(this,"priority",20);x(this,"incompatibleTokens","*")}parse(a){return ou(a)}set(a,l,o){return[O(a,o),{timestampIsSet:!0}]}};var Yc={G:new lu,y:new iu,Y:new nu,R:new su,u:new du,Q:new fu,q:new cu,M:new mu,L:new pu,w:new hu,I:new gu,d:new yu,D:new Su,E:new xu,e:new Lu,c:new Cu,i:new vu,a:new wu,b:new Iu,B:new bu,h:new Mu,H:new Du,K:new Tu,k:new Pu,m:new Nu,s:new Au,S:new ku,X:new Ru,x:new Ou,t:new Fu,T:new Eu};var mx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,px=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hx=/^'([^]*?)'?$/,gx=/''/g,yx=/\S/,Sx=/[a-zA-Z]/;function Xc(e,t,a,l){var N,c,d,m,y,C,D,v,b,j,A,Fe,ye,ve,ll,ac,lc,oc;let o=()=>O((l==null?void 0:l.in)||a,NaN),r=qc(),u=(c=(N=l==null?void 0:l.locale)!=null?N:r.locale)!=null?c:so,i=(j=(b=(C=(y=l==null?void 0:l.firstWeekContainsDate)!=null?y:(m=(d=l==null?void 0:l.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)!=null?C:r.firstWeekContainsDate)!=null?b:(v=(D=r.locale)==null?void 0:D.options)==null?void 0:v.firstWeekContainsDate)!=null?j:1,n=(oc=(lc=(ve=(ye=l==null?void 0:l.weekStartsOn)!=null?ye:(Fe=(A=l==null?void 0:l.locale)==null?void 0:A.options)==null?void 0:Fe.weekStartsOn)!=null?ve:r.weekStartsOn)!=null?lc:(ac=(ll=r.locale)==null?void 0:ll.options)==null?void 0:ac.weekStartsOn)!=null?oc:0;if(!t)return e?o():M(a,l==null?void 0:l.in);let s={firstWeekContainsDate:i,weekStartsOn:n,locale:u},p=[new au(l==null?void 0:l.in,a)],g=t.match(px).map(V=>{let ue=V[0];if(ue in fo){let yt=fo[ue];return yt(V,u.formatLong)}return V}).join("").match(mx),f=[];for(let V of g){!(l!=null&&l.useAdditionalWeekYearTokens)&&$r(V)&&co(V,t,e),!(l!=null&&l.useAdditionalDayOfYearTokens)&&Jr(V)&&co(V,t,e);let ue=V[0],yt=Yc[ue];if(yt){let{incompatibleTokens:rc}=yt;if(Array.isArray(rc)){let uc=f.find(ic=>rc.includes(ic.token)||ic.token===ue);if(uc)throw new RangeError(`The format string mustn't contain \`${uc.fullToken}\` and \`${V}\` at the same time`)}else if(yt.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${V}\` and any other token at the same time`);f.push({token:ue,fullToken:V});let xs=yt.run(e,V,u.match,s);if(!xs)return o();p.push(xs.setter),e=xs.rest}else{if(ue.match(Sx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ue+"`");if(V==="''"?V="'":ue==="'"&&(V=xx(V)),e.indexOf(V)===0)e=e.slice(V.length);else return o()}}if(e.length>0&&yx.test(e))return o();let h=p.map(V=>V.priority).sort((V,ue)=>ue-V).filter((V,ue,yt)=>yt.indexOf(V)===ue).map(V=>p.filter(ue=>ue.priority===V).sort((ue,yt)=>yt.subPriority-ue.subPriority)).map(V=>V[0]),L=M(a,l==null?void 0:l.in);if(isNaN(+L))return o();let I={};for(let V of h){if(!V.validate(L,s))return o();let ue=V.set(L,I,s);Array.isArray(ue)?(L=ue[0],Object.assign(I,ue[1])):L=ue}return L}function xx(e){return e.match(hx)[1].replace(gx,"'")}function Qc(e,t,a){return Xr(e,-t,a)}function Zc(e,t,a){return Kr(e,-t,a)}var Bu=class{fromDate(t,a){try{return Uc(t,a)}catch(l){return a}}fromString(t,a){try{let l=Xc(t,a,new Date);return isNaN(l.getDate())?null:l}catch(l){return null}}};var Hu=class{getParser(){return new Bu}};var Jt=require("obsidian"),Uu=class{constructor(t){this.plugin=t}async exists(t){let a=this.normalizePath(t);return this.plugin.app.vault.getAbstractFileByPath(a)instanceof Jt.TFile}async createFileFromTemplate(t,a){let l=this.normalizePath(t),o=this.normalizePath(a!=null?a:""),r=await this.readContents(o);return(await this.plugin.app.vault.create(l,r)).path}async createFile(t){let a=this.normalizePath(t);return(await this.plugin.app.vault.create(a,"")).path}async createFolder(t){let a=this.plugin.app.vault.getAbstractFileByPath(t);a&&a instanceof Jt.TFolder||await this.plugin.app.vault.createFolder(t)}async readContents(t){let a=this.normalizePath(t),l=this.plugin.app.vault.getAbstractFileByPath(a);return l instanceof Jt.TFile?await this.plugin.app.vault.cachedRead(l):""}async writeContents(t,a){let l=this.normalizePath(t);await this.plugin.app.vault.adapter.write(l,a)}async openInCurrentTab(t){let a=this.getFile(t);await this.plugin.app.workspace.getLeaf().openFile(a,{active:!0})}async openInHorizontalSplitView(t){let a=this.getFile(t);await this.plugin.app.workspace.getLeaf("split","horizontal").openFile(a,{active:!0})}async openInVerticalSplitView(t){let a=this.getFile(t);await this.plugin.app.workspace.getLeaf("split","vertical").openFile(a,{active:!0})}async delete(t){let a=this.normalizePath(t),l=this.plugin.app.vault.getAbstractFileByPath(a);l instanceof Jt.TFile&&this.plugin.app.fileManager.promptForFileDeletion(l)}getFile(t){let a=this.normalizePath(t),l=this.plugin.app.vault.getFileByPath(a);if(!l)throw new Error(`File does not exist: ${a}.`);return l}normalizePath(t){return(0,Jt.normalizePath)(t).appendMarkdownExtension().toString()}};var qu=class{constructor(){this.typesThatRequireTemplate=[0,1];this.typesThatSupportCalculus=[0,1];this.types=new Map().set("date",0).set("today",1).set("title",2)}getVariable(t){let a=/{{([a-z]+)([+-][0-9].)?:?(.*)?}}/,[l,o,r,u]=a.exec(t)||[],i=this.types.get(o.toLowerCase()),n=null;if(i===void 0)throw Error("Could not create a variable because the type is unknown");if(this.typesThatRequireTemplate.includes(i)&&!u)throw Error("Could not create a variable because the template is unknown");return this.typesThatSupportCalculus.includes(i)&&(n=this.getCalculusFromRegex(r)),{template:u!=null?u:null,calculus:n!=null?n:null,type:i}}getCalculusFromRegex(t){let a=/([+-])([0-9]+)([a-z])/,[l,o,r,u]=a.exec(t)||[],i=parseInt(r);if(!o||!r||!u||isNaN(i))return null;let n="+";return o==="-".valueOf()&&(n="-"),{unit:u,operator:n,value:i}}};var Vu=class{constructor(t,a){this.plugin=t;this.dateRepositoryFactory=a}async getActiveNote(){let t=this.plugin.app.workspace.getActiveFile();return t?await this.asNote(t):null}async getNotes(){return await Promise.all(this.plugin.app.vault.getMarkdownFiles().map(t=>this.asNote(t)))}async asNote(t){let a=this.dateRepositoryFactory.getRepository().getDayFromDate(new Date(t.stat.ctime)),l=this.readFrontMatter(t);return{path:t.path,name:t.name.removeMarkdownExtension(),createdOn:a,properties:l}}readFrontMatter(t){var l;let a=new Map;try{let o=(l=this.plugin.app.metadataCache.getFileCache(t))==null?void 0:l.frontmatter;o&&(a=new Map(Object.entries(o)))}catch(o){console.error(`Error processing front matter for file: ${t.path}. Error: ${o}`)}return a}};var zu=class{constructor(t){this.calendarService=t;this.settings=_;this.today=null}initialize(t,a){this.settings=t,this.today=a,this.calendarService.initialize(t)}initializeCallbacks(t,a,l,o,r,u){this.setSelectedPeriod=t,this.navigateToNextWeek=a,this.navigateToPreviousWeek=l,this.navigateToCurrentWeek=o,this.navigateToNextMonth=r,this.navigateToPreviousMonth=u}getCurrentWeek(){let t=this.calendarService.getCurrentWeek();return this.buildCalendar(t)}getPreviousWeek(t){let a=this.calendarService.getPreviousWeek(t.weeks);return this.buildCalendar(a)}getNextWeek(t){let a=this.calendarService.getNextWeek(t.weeks);return this.buildCalendar(a)}getPreviousMonth(t){let a=this.calendarService.getPreviousMonth(t.weeks);return this.buildCalendar(a)}getNextMonth(t){let a=this.calendarService.getNextMonth(t.weeks);return this.buildCalendar(a)}buildCalendar(t){let a=this.buildWeekDays(this.settings.generalSettings.firstDayOfWeek),l=this.calendarService.getMonthForWeeks(t),o=this.calendarService.getQuarterForWeeks(t),r=this.calendarService.getYearForWeeks(t);return{weekDays:a,month:l,quarter:o,year:r,weeks:t,today:this.today}}buildWeekDays(t){let a=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],l=(t-1+7)%7;return[...a.slice(l),...a.slice(0,l)]}};var _u=class{constructor(t){this.dateManagerFactory=t;this.settings=_;this.dateManager=this.dateManagerFactory.getManager()}initialize(t){this.settings=t}getCurrentWeek(){let t=this.settings.generalSettings.firstDayOfWeek,a=this.settings.generalSettings.weekNumberStandard,l=this.dateManager.getCurrentWeek(t,a);return this.loadWeeks(l,2,3)}getPreviousWeek(t){let a=this.getMiddleWeek(t);return this.loadWeeks(a,4,1)}getNextWeek(t){let a=this.getMiddleWeek(t);return this.loadWeeks(a,2,3)}getPreviousMonth(t){let a=this.getMiddleWeek(t),l=this.settings.generalSettings.firstDayOfWeek,o=this.settings.generalSettings.weekNumberStandard,r=this.dateManager.getPreviousMonth(a,l,o);return this.sortWeeks(r)}getNextMonth(t){let a=this.getMiddleWeek(t),l=this.settings.generalSettings.firstDayOfWeek,o=this.settings.generalSettings.weekNumberStandard,r=this.dateManager.getNextMonth(a,l,o);return this.sortWeeks(r)}getMonthForWeeks(t){return this.getMiddleWeek(t).month}getQuarterForWeeks(t){return this.getMiddleWeek(t).quarter}getYearForWeeks(t){return this.getMiddleWeek(t).year}getMiddleWeek(t){return t[Math.floor(t.length/2)]}loadWeeks(t,a,l){let o=this.settings.generalSettings.firstDayOfWeek,r=this.settings.generalSettings.weekNumberStandard,u=this.dateManager.getPreviousWeeks(t,o,r,a),i=this.dateManager.getNextWeeks(t,o,r,l),n=[...u,t,...i];return this.sortWeeks(n)}sortWeeks(t){return t.sort((a,l)=>a.date.getTime()-l.date.getTime())}};var Gu=class{constructor(t,a,l,o){this.nameBuilderFactory=t;this.variableParserFactory=a;this.fileRepositoryFactory=l;this.noteRepositoryFactory=o}async doesNoteExist(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);return await l.exists(o)}async createNote(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);if(!await this.doesNoteExist(t,a)){let u=await l.create(o,t.templateFile),i=await l.readContents(u),n=await this.parseVariables(i,a);await l.writeContents(u,n)}}async openNote(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);if(!await this.doesNoteExist(t,a))throw new Error("File does not exist");await l.openInCurrentTab(o)}async openNoteInHorizontalSplitView(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);if(!await this.doesNoteExist(t,a))throw new Error("File does not exist");await l.openInHorizontalSplitView(o)}async openNoteInVerticalSplitView(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);if(!await this.doesNoteExist(t,a))throw new Error("File does not exist");await l.openInVerticalSplitView(o)}async deleteNote(t,a){let l=this.fileRepositoryFactory.getRepository(),o=this.getFilePath(a,t);if(!await this.doesNoteExist(t,a))throw new Error("File does not exist");await l.delete(o)}getFilePath(t,a){return this.nameBuilderFactory.getNameBuilder("periodicNote").withPath(a.folder).withName(a.nameTemplate).withValue(t).build()}async parseVariables(t,a){let l=await this.noteRepositoryFactory.getRepository().getActiveNote(),o=this.variableParserFactory.getVariableParser(2),r=this.variableParserFactory.getVariableParser(0),u=this.variableParserFactory.getVariableParser(1),i=t;return i=o.parseVariables(i,l==null?void 0:l.name),i=r.parseVariables(i,a),i=u.parseVariables(i,new Date),i}};function $t(e,t){if(!e||!t)return!1;let a=e.date.toDateString()===t.date.toDateString(),l=e.type===t.type;return a&&l}var Wu=class{constructor(t){this.dateParserFactory=t;this.monthFormat="long";this.dayFormat="2-digit";this.yearFormat="numeric"}getDayFromDate(t){return{name:new Intl.DateTimeFormat(void 0,{day:this.dayFormat}).format(t),date:t,type:0}}getDayFromDateString(t,a){let l=this.dateParserFactory.getParser().fromString(t,a);return l?this.getDayFromDate(l):null}getWeekFromDate(t,a,l){let o=we(l,{weekStartsOn:t}),r=cl(o);a===1&&(r=pl(o,{weekStartsOn:t}));let u=this.getMonth(o.getFullYear(),o.getMonth()),i=this.getQuarter(u),n=this.getYear(o.getFullYear()),s=this.getDaysOfWeek(t,o);return{date:o,name:r.toString().padStart(2,"0"),weekNumber:r,year:n,quarter:i,month:u,days:s,type:1}}getNextWeek(t,a,l){let o=Kr(l.date,1);return this.getWeekFromDate(t,a,o)}getPreviousWeek(t,a,l){let o=Zc(l.date,1);return this.getWeekFromDate(t,a,o)}getMonthFromDate(t){return this.getMonth(t.getFullYear(),t.getMonth())}getNextMonth(t){let a=vs(t.date),l=Xr(a,1);return this.getMonthFromDate(l)}getPreviousMonth(t){let a=vs(t.date),l=Qc(a,1);return this.getMonthFromDate(l)}getQuarter(t){let a=Ic(t.date);return{name:`Q${Cc(a)}`,date:a,type:3}}getYear(t){let a=new Intl.DateTimeFormat(void 0,{year:this.yearFormat}),l=new Date(t,0);return{name:a.format(l),date:l,type:4}}getMonth(t,a){let l=new Intl.DateTimeFormat(void 0,{month:this.monthFormat}),o=new Date(t,a);return{name:l.format(o),date:o,type:2}}getDaysOfWeek(t,a){let l=we(a,{weekStartsOn:t}),o=Mc(a,{weekStartsOn:t});return wc({start:l,end:o}).map(u=>this.getDayFromDate(u))}};var Yu=class{constructor(t){this.dateParserFactory=t}getRepository(){return new Wu(this.dateParserFactory)}};var Xu=class{constructor(t){this.adapter=t}async exists(t){return await this.adapter.exists(t)}async create(t,a){let l=t.split("/").slice(0,-1).join("/"),o=a?await this.adapter.exists(a):!1;await this.adapter.createFolder(l);let r="";return o&&a?r=await this.adapter.createFileFromTemplate(t,a):r=await this.adapter.createFile(t),r}async readContents(t){return await this.exists(t)?await this.adapter.readContents(t):""}async writeContents(t,a){await this.exists(t)&&await this.adapter.writeContents(t,a)}async openInCurrentTab(t){await this.exists(t)&&await this.adapter.openInCurrentTab(t)}async openInHorizontalSplitView(t){await this.exists(t)&&await this.adapter.openInHorizontalSplitView(t)}async openInVerticalSplitView(t){await this.exists(t)&&await this.adapter.openInVerticalSplitView(t)}async delete(t){await this.exists(t)&&await this.adapter.delete(t)}};var Qu=class{constructor(t){this.adapter=t}getRepository(){return new Xu(this.adapter)}};var Zu=class{constructor(t,a,l,o){this.adapter=t;this.dateRepositoryFactory=a;this.dateParserFactory=l;this.settingsRepositoryFactory=o}async getActiveNote(){let t=await this.settingsRepositoryFactory.getRepository("displayNotes").get(),a=await this.adapter.getActiveNote();return a?this.setDateProperty(a,t):null}async getNotes(t){let a=await this.adapter.getNotes();return(await this.setDateProperties(a)).filter(t)}async setDateProperties(t){let a=await this.settingsRepositoryFactory.getRepository("displayNotes").get();return t.map(l=>this.setDateProperty(l,a))}setDateProperty(t,a){let l=this.setCreatedOnProperty(t,a),o=l.createdOn.date;return l.createdOnProperty&&a.useCreatedOnDateFromProperties&&(o=l.createdOnProperty.date),{...l,displayDate:this.dateParserFactory.getParser().fromDate(o,a.displayDateTemplate)}}setCreatedOnProperty(t,a){let l=t.properties.get(a.createdOnDatePropertyName);if(!l)return t;let o=this.dateRepositoryFactory.getRepository().getDayFromDateString(l,a.createdOnPropertyFormat);return o&&o.date.getHours()===0&&o.date.getMinutes()===0&&o.date.setHours(t.createdOn.date.getHours(),t.createdOn.date.getMinutes(),t.createdOn.date.getSeconds(),t.createdOn.date.getMilliseconds()),{...t,createdOnProperty:o}}};var Ku=class{constructor(t,a,l,o){this.adapter=t;this.dateRepositoryFactory=a;this.dateParserFactory=l;this.settingsRepositoryFactory=o}getRepository(){return new Zu(this.adapter,this.dateRepositoryFactory,this.dateParserFactory,this.settingsRepositoryFactory)}};var ju=class{constructor(t){this.dateRepositoryFactory=t;this.today=new Date}getCurrentDay(){return this.dateRepositoryFactory.getRepository().getDayFromDate(this.today)}getTomorrow(){let t=this.today;return t.setDate(t.getDate()+1),this.dateRepositoryFactory.getRepository().getDayFromDate(t)}getYesterday(){let t=this.today;return t.setDate(t.getDate()-1),this.dateRepositoryFactory.getRepository().getDayFromDate(t)}getCurrentWeek(t,a){return this.dateRepositoryFactory.getRepository().getWeekFromDate(t,a,this.today)}getWeek(t,a,l){return this.dateRepositoryFactory.getRepository().getWeekFromDate(a,l,t.date)}getPreviousWeeks(t,a,l,o){return this.getWeeks(t,o,r=>this.dateRepositoryFactory.getRepository().getPreviousWeek(a,l,r))}getNextWeeks(t,a,l,o){return this.getWeeks(t,o,r=>this.dateRepositoryFactory.getRepository().getNextWeek(a,l,r))}getPreviousMonth(t,a,l){let o=this.dateRepositoryFactory.getRepository().getPreviousMonth(t);return this.getWeeksForMonth(o,a,l)}getNextMonth(t,a,l){let o=this.dateRepositoryFactory.getRepository().getNextMonth(t);return this.getWeeksForMonth(o,a,l)}getQuarter(t){return this.dateRepositoryFactory.getRepository().getQuarter(t)}getWeeksForMonth(t,a,l){let o=new Date(t.date.getFullYear(),t.date.getMonth(),1),r=new Date(t.date.getFullYear(),t.date.getMonth()+1,0),u=new Date((o.getTime()+r.getTime())/2),i=this.dateRepositoryFactory.getRepository().getWeekFromDate(a,l,u),n=this.getPreviousWeeks(i,a,l,2),s=this.getNextWeeks(i,a,l,3);return this.sortWeeks([...n,i,...s])}getWeeks(t,a,l){let o=t,r=[];for(let u=0;ua.date.getTime()-l.date.getTime())}};var Ju=class{constructor(t){this.dateRepositoryFactory=t}getManager(){return new ju(this.dateRepositoryFactory)}};var $u=class{constructor(t,a,l){this.noteManagerFactory=t;this.settingssRepositoryFactory=a;this.viewModel=l}async execute(){var l,o;let t=await this.noteManagerFactory.getManager().getActiveNote(),a=await this.settingssRepositoryFactory.getRepository("displayNotes").get();t&&(a.useCreatedOnDateFromProperties&&t.createdOnProperty?(l=this.viewModel.setSelectedPeriod)==null||l.call(this,t.createdOnProperty):a.useCreatedOnDateFromProperties||(o=this.viewModel.setSelectedPeriod)==null||o.call(this,t.createdOn))}};var ei=class{constructor(t){this.viewModel=t}async execute(){var t;(t=this.viewModel.navigateToCurrentWeek)==null||t.call(this)}};var ti=class{constructor(t){this.viewModel=t}async execute(){var t;(t=this.viewModel.navigateToPreviousWeek)==null||t.call(this)}};var ai=class{constructor(t){this.viewModel=t}async execute(){var t;(t=this.viewModel.navigateToNextWeek)==null||t.call(this)}};function Kc(e){return e===1||e===3}function jc(e){return e===2}var li=class{constructor(t,a,l){this.dateManagerFactory=t;this.viewModel=a;this.calendarViewModel=l}async execute(){var a;let t=this.dateManagerFactory.getManager().getYesterday();(a=this.calendarViewModel.setSelectedPeriod)==null||a.call(this,t),await this.viewModel.openNote(0,t)}};var ri=class{constructor(t,a,l){this.dateManagerFactory=t;this.viewModel=a;this.calendarViewModel=l}async execute(){var a;let t=this.dateManagerFactory.getManager().getTomorrow();(a=this.calendarViewModel.setSelectedPeriod)==null||a.call(this,t),await this.viewModel.openNote(0,t)}};var ui=class{constructor(t,a,l,o){this.dateManagerFactory=t;this.settingsRepositoryFactory=a;this.viewModel=l;this.calendarViewModel=o}async execute(){var o;let t=await this.settingsRepositoryFactory.getRepository("general").get(),a=this.dateManagerFactory.getManager().getCurrentDay(),l=this.dateManagerFactory.getManager().getWeek(a,t.firstDayOfWeek,t.weekNumberStandard);(o=this.calendarViewModel.setSelectedPeriod)==null||o.call(this,l),await this.viewModel.openNote(0,l)}};var ii=class{constructor(t){this.viewModel=t}async execute(){var t;(t=this.viewModel.navigateToPreviousMonth)==null||t.call(this)}};var ni=class{constructor(t){this.viewModel=t}async execute(){var t;(t=this.viewModel.navigateToNextMonth)==null||t.call(this)}};var si=class{constructor(t,a,l,o,r,u){this.noteManagerFactory=t;this.settingsRepositoryFactory=a;this.dateManagerFactory=l;this.calendarViewModel=o;this.weekNoteViewModel=r;this.dayNoteViewModel=u}getHandler(t){switch(t){case 0:return new $u(this.noteManagerFactory,this.settingsRepositoryFactory,this.calendarViewModel);case 1:return new ei(this.calendarViewModel);case 3:return new ti(this.calendarViewModel);case 2:return new ai(this.calendarViewModel);case 5:return new ii(this.calendarViewModel);case 4:return new ni(this.calendarViewModel);case 6:return new li(this.dateManagerFactory,this.dayNoteViewModel,this.calendarViewModel);case 7:return new ri(this.dateManagerFactory,this.dayNoteViewModel,this.calendarViewModel);case 8:return new ui(this.dateManagerFactory,this.settingsRepositoryFactory,this.weekNoteViewModel,this.calendarViewModel)}}};var di=class{constructor(t,a,l){this.fileRepositoryFactory=t;this.noteRepositoryFactory=a;this.settingsRepositoryFactory=l}async openNote(t){await this.fileRepositoryFactory.getRepository().exists(t.path)&&await this.fileRepositoryFactory.getRepository().openInCurrentTab(t.path)}async openNoteInHorizontalSplitView(t){await this.fileRepositoryFactory.getRepository().exists(t.path)&&await this.fileRepositoryFactory.getRepository().openInHorizontalSplitView(t.path)}async openNoteInVerticalSplitView(t){await this.fileRepositoryFactory.getRepository().exists(t.path)&&await this.fileRepositoryFactory.getRepository().openInVerticalSplitView(t.path)}async getNotesForPeriod(t){if(!(await this.settingsRepositoryFactory.getRepository("general").get()).displayNotesCreatedOnDate)return[];let l=await this.settingsRepositoryFactory.getRepository("displayNotes").get(),r=await this.noteRepositoryFactory.getRepository().getNotes(u=>l.useCreatedOnDateFromProperties?$t(u.createdOnProperty,t):$t(u.createdOn,t));return l.sortNotes==="ascending"?r.sort((u,i)=>l.useCreatedOnDateFromProperties&&u.createdOnProperty&&i.createdOnProperty?u.createdOnProperty.date.getTime()-i.createdOnProperty.date.getTime():u.createdOn.date.getTime()-i.createdOn.date.getTime()):r.sort((u,i)=>l.useCreatedOnDateFromProperties&&u.createdOnProperty&&i.createdOnProperty?i.createdOnProperty.date.getTime()-u.createdOnProperty.date.getTime():i.createdOn.date.getTime()-u.createdOn.date.getTime())}async deleteNote(t){await this.fileRepositoryFactory.getRepository().exists(t.path)&&await this.fileRepositoryFactory.getRepository().delete(t.path)}async getActiveNote(){return await this.noteRepositoryFactory.getRepository().getActiveNote()}};var fi=class{constructor(t,a,l){this.fileRepositoryFactory=t;this.noteRepositoryFactory=a;this.settingsRepositoryFactory=l}getManager(){return new di(this.fileRepositoryFactory,this.noteRepositoryFactory,this.settingsRepositoryFactory)}};var ci=class{constructor(t){this.noteService=t}initializeCallbacks(t){this.updateNotes=t}async loadNotes(t){return await this.noteService.getNotesForPeriod(t)}async openNoteInHorizontalSplitView(t){await this.noteService.openNoteInHorizontalSplitView(t)}async openNoteInVerticalSplitView(t){await this.noteService.openNoteInVerticalSplitView(t)}async openNote(t){await this.noteService.openNote(t)}async deleteNote(t){await this.noteService.deleteNote(t)}};var Jc=require("obsidian"),mi=class{show(t,a,l){this.contextMenu=new Jc.Menu,this.addOpenInHorizontalSplitViewMenuItem(this.contextMenu,l.openInHorizontalSplitView).addOpenInVerticalSplitViewMenuItem(this.contextMenu,l.openInVerticalSplitView).addDeleteNoteMenuItem(this.contextMenu,l.onDelete).build(this.contextMenu).showAtPosition({x:t,y:a})}hide(){var t;(t=this.contextMenu)==null||t.hide(),delete this.contextMenu}addOpenInHorizontalSplitViewMenuItem(t,a){return t.addItem(l=>l.setIcon("rows-2").setTitle("Open in horizontal split view").onClick(a)),this}addOpenInVerticalSplitViewMenuItem(t,a){return t.addItem(l=>l.setIcon("columns-2").setTitle("Open in vertical split view").onClick(a)),this}addDeleteNoteMenuItem(t,a){return t.addItem(l=>l.setIcon("trash").setTitle("Delete").onClick(a)),this}build(t){return t}};var pi=class{constructor(t){this.periodicNoteManager=t;this.settings=_}async initialize(t){this.settings=t}async openNoteInCurrentTab(t,a,l){await this.openNote(t,a,l,async(o,r)=>this.periodicNoteManager.openNote(o,r))}async openNoteInHorizontalSplitView(t,a,l){await this.openNote(t,a,l,async(o,r)=>this.periodicNoteManager.openNoteInHorizontalSplitView(o,r))}async openNoteInVerticalSplitView(t,a,l){await this.openNote(t,a,l,async(o,r)=>this.periodicNoteManager.openNoteInVerticalSplitView(o,r))}async deleteNote(t,a){await this.periodicNoteManager.deleteNote(a,t)}async hasPeriodicNote(t,a){return await this.periodicNoteManager.doesNoteExist(a,t)}async openNote(t,a,l,o){let r=this.settings.generalSettings.useModifierKeyToCreateNote,u=r&&Kc(t);!r||u?(await this.periodicNoteManager.createNote(l,a),await o(l,a)):await o(l,a)}};var Ke=class{constructor(t,a){this.periodService=a;this.pluginSettings=_;this.settings=t}updateSettings(t){this.pluginSettings=t,this.periodService.initialize(t)}async hasPeriodicNote(t){let a=this.pluginSettings.generalSettings.displayNoteIndicator,l=await this.periodService.hasPeriodicNote(t,this.settings);return a&&l}async openNote(t,a){t===4?await this.periodService.openNoteInHorizontalSplitView(t,a,this.settings):await this.periodService.openNoteInCurrentTab(t,a,this.settings)}async openNoteInHorizontalSplitView(t,a){await this.periodService.openNoteInHorizontalSplitView(t,a,this.settings)}async openNoteInVerticalSplitView(t,a){await this.periodService.openNoteInVerticalSplitView(t,a,this.settings)}async deleteNote(t){await this.periodService.deleteNote(t,this.settings)}};var hi=class extends Ke{constructor(t){super(ol,t)}updateSettings(t){super.updateSettings(t),this.settings=t.dailyNotes}};var gi=class extends Ke{constructor(t){super(rl,t)}updateSettings(t){super.updateSettings(t),this.settings=t.weeklyNotes}};var yi=class extends Ke{constructor(t){super(ul,t)}updateSettings(t){super.updateSettings(t),this.settings=t.monthlyNotes}};var Si=class extends Ke{constructor(t){super(il,t)}updateSettings(t){super.updateSettings(t),this.settings=t.quarterlyNotes}};var xi=class extends Ke{constructor(t){super(nl,t)}updateSettings(t){super.updateSettings(t),this.settings=t.yearlyNotes}};var Li=class{constructor(t){this.noteManagerFactory=t}async getNotesForPeriod(t){return await this.noteManagerFactory.getManager().getNotesForPeriod(t)}async openNote(t){await this.noteManagerFactory.getManager().openNote(t)}async openNoteInHorizontalSplitView(t){await this.noteManagerFactory.getManager().openNoteInHorizontalSplitView(t)}async openNoteInVerticalSplitView(t){await this.noteManagerFactory.getManager().openNoteInVerticalSplitView(t)}async deleteNote(t){await this.noteManagerFactory.getManager().deleteNote(t)}};function $c(e){let t=new Hu,a=new Yu(t),l=new br(e),o=new Uu(e),r=new Vu(e,a),u=new Er(l),i=new Qu(o),n=new Ku(r,a,t,u),s=new Hr(t),p=new qu,g=new Wr(p,t),f=new Ju(a),h=new fi(i,n,u),L=new Gu(s,g,i,n),I=new _u(f),N=new pi(L),c=new Li(h),d=new zu(I),m=new hi(N),y=new gi(N),C=new yi(N),D=new Si(N),v=new xi(N),b=new ci(c),j=new si(h,u,f,d,y,m),A=new mi;return{calendarViewModel:d,dailyNoteViewModel:m,weeklyNoteViewModel:y,monthlyNoteViewModel:C,quarterlyNoteViewModel:D,yearlyNoteViewModel:v,notesViewModel:b,dateManagerFactory:f,dateParserFactory:t,settingsRepositoryFactory:u,commandHandlerFactory:j,contextMenuAdapter:A}}var rS=require("obsidian"),uS=q(Dy()),iS=q(Ne());var es=q(Ne());var Zn=q(Ne());var Ty=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Qn=(...e)=>e.filter((t,a,l)=>!!t&&t.trim()!==""&&l.indexOf(t)===a).join(" ").trim();var Sr=q(Ne());var Py={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Ny=(0,Sr.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:r,iconNode:u,...i},n)=>(0,Sr.createElement)("svg",{ref:n,...Py,width:t,height:t,stroke:e,strokeWidth:l?Number(a)*24/Number(t):a,className:Qn("lucide",o),...i},[...u.map(([s,p])=>(0,Sr.createElement)(s,p)),...Array.isArray(r)?r:[r]]));var Tt=(e,t)=>{let a=(0,Zn.forwardRef)(({className:l,...o},r)=>(0,Zn.createElement)(Ny,{ref:r,iconNode:t,className:Qn(`lucide-${Ty(e)}`,l),...o}));return a.displayName=`${e}`,a};var xr=Tt("CalendarHeart",[["path",{d:"M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7",key:"136lmk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21.29 14.7a2.43 2.43 0 0 0-2.65-.52c-.3.12-.57.3-.8.53l-.34.34-.35-.34a2.43 2.43 0 0 0-2.65-.53c-.3.12-.56.3-.79.53-.95.94-1 2.53.2 3.74L17.5 22l3.6-3.55c1.2-1.21 1.14-2.8.19-3.74Z",key:"1t7hil"}]]);var Lr=Tt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var Cr=Tt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var vr=Tt("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);var wr=Tt("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var Pt=q(Ne()),jt=(0,Pt.createContext)(null),Ay=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.calendarViewModel)!=null?t:null},ky=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.dailyNoteViewModel)!=null?t:null},Ry=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.weeklyNoteViewModel)!=null?t:null},Oy=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.monthlyNoteViewModel)!=null?t:null},Fy=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.quarterlyNoteViewModel)!=null?t:null},Ey=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.yearlyNoteViewModel)!=null?t:null},By=()=>{var e,t;return(t=(e=(0,Pt.useContext)(jt))==null?void 0:e.notesViewModel)!=null?t:null};var tc=q(Ne());var Kn=q(Ne()),ec=(0,Kn.createContext)(null),jn=()=>(0,Kn.useContext)(ec);var Ma=q(de()),Vy=e=>{let t=jn(),a={openInHorizontalSplitView:()=>e.onOpenInHorizontalSplitView(e.note),openInVerticalSplitView:()=>e.onOpenInVerticalSplitView(e.note),onDelete:()=>e.onDelete(e.note)};return(0,Ma.jsxs)("li",{onContextMenu:l=>{t==null||t.show(l.clientX,l.clientY,a),l.preventDefault()},onClick:l=>{e.onClick(e.note),l.preventDefault()},children:[(0,Ma.jsx)("span",{className:"note-title",children:e.note.name}),(0,Ma.jsx)("br",{}),(0,Ma.jsxs)("span",{className:"note-date",children:["Created at ",e.note.displayDate]}),(0,Ma.jsx)("br",{}),(0,Ma.jsx)("span",{className:"note-path",children:e.note.path})]},e.note.path)};var $n=q(de()),zy=e=>{let t=By(),[a,l]=tc.default.useState([]),o=()=>{e.period&&(t==null||t.loadNotes(e.period).then(l))};return tc.default.useEffect(()=>{o()},[t,l,e.period]),t==null||t.initializeCallbacks(o),(0,$n.jsx)("div",{className:"dnc",children:(0,$n.jsx)("ul",{children:a.map(r=>(0,$n.jsx)(Vy,{note:r,onOpenInHorizontalSplitView:u=>t==null?void 0:t.openNoteInHorizontalSplitView(u),onOpenInVerticalSplitView:u=>t==null?void 0:t.openNoteInVerticalSplitView(u),onClick:u=>t==null?void 0:t.openNote(u),onDelete:u=>t==null?void 0:t.deleteNote(u)},r.path))})})};var Gy=q(Ne());var _y=q(de()),Nt=e=>{var r;let t=jn(),a=u=>({openInHorizontalSplitView:()=>e.onOpenInHorizontalSplitViewClick(u),openInVerticalSplitView:()=>e.onOpenInVerticalSplitViewClick(u),onDelete:()=>e.onDelete()}),l=u=>(u.metaKey||u.ctrlKey)&&u.altKey?4:u.metaKey?3:u.altKey?1:u.shiftKey?2:0,o=(r=e.classNames)!=null?r:[];return e.isSelected&&o.push("selected-day"),e.hasPeriodNote&&o.push("has-note"),(0,_y.jsx)("div",{id:e.isToday?"today":"",className:o.join(" "),onContextMenu:u=>{let i=a(l(u));t==null||t.show(u.clientX,u.clientY,i),u.preventDefault()},onClick:u=>{e.onClick(l(u)),u.preventDefault()},children:e.name})};var Yy=q(de()),Wy=e=>{let t=Oy(),[a,l]=Gy.default.useState(!1);return t==null||t.hasPeriodicNote(e.month).then(l.bind(void 0)),(0,Yy.jsx)(Nt,{name:e.month.name,isSelected:!1,isToday:!1,hasPeriodNote:a,onClick:o=>t==null?void 0:t.openNote(o,e.month),onOpenInHorizontalSplitViewClick:o=>t==null?void 0:t.openNoteInHorizontalSplitView(o,e.month),onOpenInVerticalSplitViewClick:o=>t==null?void 0:t.openNoteInVerticalSplitView(o,e.month),onDelete:()=>t==null?void 0:t.deleteNote(e.month)})};var Xy=q(Ne());var Zy=q(de()),Qy=e=>{let t=Fy(),[a,l]=Xy.default.useState(!1);return t==null||t.hasPeriodicNote(e.quarter).then(l.bind(void 0)),(0,Zy.jsx)(Nt,{name:e.quarter.name,isSelected:!1,isToday:!1,hasPeriodNote:a,onClick:o=>t==null?void 0:t.openNote(o,e.quarter),onOpenInHorizontalSplitViewClick:o=>t==null?void 0:t.openNoteInHorizontalSplitView(o,e.quarter),onOpenInVerticalSplitViewClick:o=>t==null?void 0:t.openNoteInVerticalSplitView(o,e.quarter),onDelete:()=>t==null?void 0:t.deleteNote(e.quarter)})};var Ky=q(Ne());var Jy=q(de()),jy=e=>{let t=Ey(),[a,l]=Ky.default.useState(!1);return t==null||t.hasPeriodicNote(e.year).then(l.bind(void 0)),(0,Jy.jsx)(Nt,{name:e.year.name,isSelected:!1,isToday:!1,hasPeriodNote:a,onClick:o=>t==null?void 0:t.openNote(o,e.year),onOpenInHorizontalSplitViewClick:o=>t==null?void 0:t.openNoteInHorizontalSplitView(o,e.year),onOpenInVerticalSplitViewClick:o=>t==null?void 0:t.openNoteInVerticalSplitView(o,e.year),onDelete:()=>t==null?void 0:t.deleteNote(e.year)})};var aS=q(Ne());var $y=q(Ne());var tS=q(de()),eS=e=>{let t=ky(),[a,l]=$y.default.useState(!1),o=$t(e.day,e.selectedPeriod),r=$t(e.day,e.today);return t==null||t.hasPeriodicNote(e.day).then(l.bind(void 0)),(0,tS.jsx)(Nt,{name:e.day.name,classNames:e.isSameMonth?[]:["other-month"],isSelected:o,isToday:r,hasPeriodNote:a,onClick:u=>{e.onSelect(e.day),jc(u)||t==null||t.openNote(u,e.day)},onOpenInHorizontalSplitViewClick:u=>{e.onSelect(e.day),t==null||t.openNoteInHorizontalSplitView(u,e.day)},onOpenInVerticalSplitViewClick:u=>{e.onSelect(e.day),t==null||t.openNoteInVerticalSplitView(u,e.day)},onDelete:()=>t==null?void 0:t.deleteNote(e.day)})};var tl=q(de()),lS=e=>{let t=Ry(),[a,l]=aS.default.useState(!1),o=$t(e.selectedPeriod,e.week);return t==null||t.hasPeriodicNote(e.week).then(l.bind(void 0)),(0,tl.jsxs)("tr",{children:[(0,tl.jsx)("td",{height:"35",className:"weekNumber",children:(0,tl.jsx)(Nt,{name:e.week.name,isSelected:o,isToday:!1,hasPeriodNote:a,onClick:r=>{e.onSelect(e.week),t==null||t.openNote(r,e.week)},onOpenInHorizontalSplitViewClick:r=>{e.onSelect(e.week),t==null||t.openNoteInHorizontalSplitView(r,e.week)},onOpenInVerticalSplitViewClick:r=>{e.onSelect(e.week),t==null||t.openNoteInVerticalSplitView(r,e.week)},onDelete:()=>t==null?void 0:t.deleteNote(e.week)})}),e.days.map((r,u)=>(0,tl.jsx)("td",{height:"35",children:(0,tl.jsx)(eS,{day:r,selectedPeriod:e.selectedPeriod,today:e.today,isSameMonth:r.date.isSameMonth(e.currentMonth),onSelect:()=>e.onSelect(r)})},u))]})};var K=q(de()),oS=e=>{var g;let t=Ay(),[a,l]=es.default.useState((g=e.initialCalendar)!=null?g:null),[o,r]=es.default.useState(null);if(es.default.useEffect(()=>{var f;l((f=t==null?void 0:t.getCurrentWeek())!=null?f:null)},[t,l]),!a)return(0,K.jsx)(K.Fragment,{});let u=()=>{var f;return l((f=t==null?void 0:t.getNextWeek(a))!=null?f:null)},i=()=>{var f;return l((f=t==null?void 0:t.getPreviousWeek(a))!=null?f:null)},n=()=>{var f;return l((f=t==null?void 0:t.getCurrentWeek())!=null?f:null)},s=()=>{var f;return l((f=t==null?void 0:t.getNextMonth(a))!=null?f:null)},p=()=>{var f;return l((f=t==null?void 0:t.getPreviousMonth(a))!=null?f:null)};return t==null||t.initializeCallbacks(r,u,i,n,s,p),(0,K.jsxs)("div",{className:"dnc",children:[(0,K.jsxs)("div",{className:"header",children:[(0,K.jsxs)("span",{className:"title",children:[(0,K.jsx)("h1",{children:(0,K.jsx)(Wy,{month:a.month})}),(0,K.jsx)("h1",{children:(0,K.jsx)(jy,{year:a.year})})]}),(0,K.jsxs)("div",{className:"buttons",children:[(0,K.jsx)(vr,{size:18,strokeWidth:1,onClick:()=>p()}),(0,K.jsx)(Lr,{size:18,strokeWidth:1,onClick:()=>i()}),(0,K.jsx)(xr,{size:18,strokeWidth:1,onClick:()=>n()}),(0,K.jsx)(Cr,{size:18,strokeWidth:1,onClick:()=>u()}),(0,K.jsx)(wr,{size:18,strokeWidth:1,onClick:()=>s()})]})]}),(0,K.jsxs)("table",{children:[(0,K.jsx)("thead",{children:(0,K.jsxs)("tr",{children:[(0,K.jsx)("th",{className:"quarter",children:(0,K.jsx)(Qy,{quarter:a.quarter})}),a.weekDays.map((f,h)=>(0,K.jsx)("th",{children:f},h))]})}),(0,K.jsx)("tbody",{children:a.weeks.map((f,h)=>(0,K.jsx)(lS,{week:f,days:f.days,selectedPeriod:o,today:a.today,currentMonth:a.month,onSelect:r},h))})]}),(0,K.jsx)(zy,{period:o})]})};var Ir=q(de()),Da=class Da extends rS.ItemView{constructor(a,l,o,r,u,i,n,s,p){super(a);this.contextMenuAdapter=l;this.calendarViewModel=o;this.dailyNoteViewModel=r;this.weeklyNoteViewModel=u;this.monthlyNoteViewModel=i;this.quarterlyNoteViewModel=n;this.yearlyNoteViewModel=s;this.notesViewModel=p}getViewType(){return Da.VIEW_TYPE}getDisplayText(){return Da.DISPLAY_TEXT}getIcon(){return Da.ICON_NAME}async onOpen(){let a={calendarViewModel:this.calendarViewModel,dailyNoteViewModel:this.dailyNoteViewModel,weeklyNoteViewModel:this.weeklyNoteViewModel,monthlyNoteViewModel:this.monthlyNoteViewModel,quarterlyNoteViewModel:this.quarterlyNoteViewModel,yearlyNoteViewModel:this.yearlyNoteViewModel,notesViewModel:this.notesViewModel};(0,uS.createRoot)(this.containerEl.children[1]).render((0,Ir.jsx)(iS.StrictMode,{children:(0,Ir.jsx)(ec.Provider,{value:this.contextMenuAdapter,children:(0,Ir.jsx)(jt,{value:a,children:(0,Ir.jsx)(oS,{})})})}))}};Da.VIEW_TYPE="daily-note-calendar",Da.DISPLAY_TEXT="Daily note calendar",Da.ICON_NAME="calendar";var al=Da;var ts=class{constructor(t){this.id="dnc-display-in-calendar";this.name="Display the current note in the calendar";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(0)}};var as=class{constructor(t){this.id="dnc-navigate-to-current-week";this.name="Navigate to current week";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(1)}};var ls=class{constructor(t){this.id="dnc-navigate-to-next-week";this.name="Navigate to the next week";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(2)}};var os=class{constructor(t){this.id="dnc-navigate-to-previous-week";this.name="Navigate to the previous week";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(3)}};var rs=class{constructor(t){this.id="dnc-open-yesterdays-note";this.name="Open yesterday's note";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(6)}};var us=class{constructor(t){this.id="dnc-open-tomorrows-note";this.name="Open Tomorrow's note";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(7)}};var is=class{constructor(t){this.id="dnc-open-weekly-note";this.name="Open weekly note";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(8)}};var ns=class{constructor(t){this.id="dnc-navigate-to-next-month";this.name="Navigate to the next month";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(4)}};var ss=class{constructor(t){this.id="dnc-navigate-to-previous-month";this.name="Navigate to the previous month";this.callback=()=>{this.commandHandler.execute().catch()};this.commandHandler=t.getHandler(5)}};var nS=require("obsidian");var io=require("obsidian"),Ta=class{constructor(t,a){this.settingsTab=t;this.onSettingsChange=a;this.today=new Date}async displaySettings(){this.addHeading(this.title,this.description),await this.addSettings()}addHeading(t,a){new io.Setting(this.settingsTab.containerEl).setHeading().setName(t).setDesc(a)}addBooleanSetting(t,a){new io.Setting(this.settingsTab.containerEl).setName(t.name).setDesc(t.description).addToggle(l=>l.setValue(t.value).onChange(o=>a(o).then(this.onSettingsChange)))}addTextSetting(t,a){new io.Setting(this.settingsTab.containerEl).setName(t.name).setDesc(t.description).addText(l=>l.setPlaceholder(t.placeholder).setValue(t.value).onChange(o=>a(o).then(this.onSettingsChange)))}addDropdownSetting(t,a,l,o,r){new io.Setting(this.settingsTab.containerEl).setName(t).setDesc(a).addDropdown(u=>u.addOptions(Object.fromEntries(l)).setValue(o).onChange(i=>r(i).then(this.onSettingsChange)))}addDateParseSetting(t,a,l){let o=document.createElement("span");o.className="dnc-setting-example",o.setText(a.fromDate(this.today,t.value));let r=new DocumentFragment;r.appendText(t.description),r.append(new DocumentFragment().createEl("br")),r.append("Format example: "),r.append(o),new io.Setting(this.settingsTab.containerEl).setName(t.name).setDesc(r).addText(u=>u.setPlaceholder(t.placeholder).setValue(t.value).onChange(async i=>{o.setText(a.fromDate(this.today,i)),l(i).then(this.onSettingsChange)}))}};var dt=class extends Ta{constructor(a,l,o,r){super(a,l);this.settingsRepository=o;this.dateParser=r}async addSettings(){let a=await this.settingsRepository.get();this.addDateParseSetting(this.getNameTemplateSetting(a.nameTemplate),this.dateParser,async l=>{a.nameTemplate=l,await this.settingsRepository.store(a)}),this.addDateParseSetting(this.getFolderSetting(a.folder),this.dateParser,async l=>{a.folder=l,await this.settingsRepository.store(a)}),this.addTextSetting(this.getTemplateFileSetting(a.templateFile),async l=>{a.templateFile=l,await this.settingsRepository.store(a)})}};var ds=class extends dt{constructor(a,l,o,r){let u=r.getRepository("dailyNote");super(a,l,u,o.getParser());this.title="Daily notes";this.description="Daily notes are created or opened by clicking on any date in the calendar."}getNameTemplateSetting(a){return{name:"Daily note name template",description:"The template used to create the daily note name.",placeholder:"yyyy-MM-dd - eeee",value:a}}getFolderSetting(a){return{name:"Daily notes folder",description:"The folder where you store your daily notes.",placeholder:"yyyy-'Daily notes'",value:a}}getTemplateFileSetting(a){return{name:"Daily note template",description:"The template used to create the daily note.",placeholder:"Templates/daily-note",value:a}}};var fs=class extends dt{constructor(a,l,o,r){let u=r.getRepository("weeklyNote");super(a,l,u,o.getParser());this.title="Weekly notes";this.description="Weekly notes are created or opened by clicking on the week number in the calendar."}getNameTemplateSetting(a){return{name:"Weekly note name template",description:"The template used to create the weekly note name.",placeholder:"yyyy - ww",value:a}}getFolderSetting(a){return{name:"Weekly notes folder",description:"The folder where you store your weekly notes.",placeholder:"Weekly notes",value:a}}getTemplateFileSetting(a){return{name:"Weekly note template",description:"The template used to create the weekly note.",placeholder:"Templates/weekly-note",value:a}}};var cs=class extends dt{constructor(a,l,o,r){let u=r.getRepository("monthlyNote");super(a,l,u,o.getParser());this.title="Monthly notes";this.description="Monthly notes are created or opened by clicking on any month name in the calendar."}getNameTemplateSetting(a){return{name:"Monthly note name template",description:"The template used to create the monthly note name.",placeholder:"yyyy - MM",value:a}}getFolderSetting(a){return{name:"Monthly notes folder",description:"The folder where you store your monthly notes.",placeholder:"Monthly notes",value:a}}getTemplateFileSetting(a){return{name:"Monthly note template",description:"The template used to create the monthly note.",placeholder:"Templates/monthly-note",value:a}}};var ms=class extends dt{constructor(a,l,o,r){let u=r.getRepository("quarterlyNote");super(a,l,u,o.getParser());this.title="Quarterly notes";this.description="Quarterly notes are created or opened by clicking on a quarter in the upper-left corner of the calendar."}getNameTemplateSetting(a){return{name:"Quarterly note name template",description:"The template used to create the quarterly note name.",placeholder:"yyyy - qqq",value:a}}getFolderSetting(a){return{name:"Quarterly notes folder",description:"The folder where you store your quarterly notes.",placeholder:"Quarterly notes",value:a}}getTemplateFileSetting(a){return{name:"Quarterly note template",description:"The template used to create the quarterly note.",placeholder:"Templates/quarterly-note",value:a}}};var ps=class extends dt{constructor(a,l,o,r){let u=r.getRepository("yearlyNote");super(a,l,u,o.getParser());this.title="Yearly notes";this.description="Yearly notes are created or opened by clicking on the week number in the calendar."}getNameTemplateSetting(a){return{name:"Yearly note name template",description:"The template used to create the yearly note name.",placeholder:"yyyy",value:a}}getFolderSetting(a){return{name:"Yearly notes folder",description:"The folder where you store your yearly notes.",placeholder:"Yearly notes",value:a}}getTemplateFileSetting(a){return{name:"Yearly note template",description:"The template used to create the yearly note.",placeholder:"Templates/yearly-note",value:a}}};var hs=class extends Ta{constructor(a,l,o,r){super(a,l);this.dateParserFactory=o;this.settingsRepositoryFactory=r;this.title="Notes settings";this.description="Settings for the notes that are displayed below the calendar."}async addSettings(){let a=this.dateParserFactory.getParser(),l=this.settingsRepositoryFactory.getRepository("displayNotes"),o=await l.get();this.addSortOrderSetting(o.sortNotes,async r=>{o.sortNotes=r,await l.store(o)}),this.addDateParseSetting(this.getDisplayDateTemplateSetting(o.displayDateTemplate),a,async r=>{o.displayDateTemplate=r,await l.store(o)}),this.addBooleanSetting(this.getUseCreatedOnDateFromPropertiesSetting(o.useCreatedOnDateFromProperties),async r=>{o.useCreatedOnDateFromProperties=r,await l.store(o)}),this.addTextSetting(this.getCreatedOnDatePropertyNameSetting(o.createdOnDatePropertyName),async r=>{o.createdOnDatePropertyName=r,await l.store(o)}),this.addDateParseSetting(this.getCreatedOnPropertyFormatSetting(o.createdOnPropertyFormat),a,async r=>{o.createdOnPropertyFormat=r,await l.store(o)})}getDisplayDateTemplateSetting(a){return{name:"Display date template",description:"The template to use when displaying the date of the note.",placeholder:"HH:mm",value:a}}getUseCreatedOnDateFromPropertiesSetting(a){return{name:"Use property for the created date of a note",description:"Use the property to determine the created date of the note.",placeholder:"",value:a}}getCreatedOnDatePropertyNameSetting(a){return{name:"Property name for created date",description:'The property to use to determine the created date of the note. This is only applicable if the "Use property for created date" setting is enabled.',placeholder:"",value:a}}getCreatedOnPropertyFormatSetting(a){return{name:"Created date format",description:"The format to use when parsing the created date from the property.",placeholder:"yyyy/MM/dd HH:mm",value:a}}addSortOrderSetting(a,l){let o=new Map;o.set("ascending","Ascending"),o.set("descending","Descending"),this.addDropdownSetting("Display order for the notes","The order in which the notes will be ordered based on the created date.",o,a.toLowerCase(),async r=>r.toLowerCase()==="ascending"?await l("ascending"):await l("descending"))}};var gs=class extends Ta{constructor(a,l,o){super(a,l);this.settingsTab=a;this.settingsRepositoryFactory=o;this.title="General";this.description="General settings for the Daily Note Calendar plugin."}async addSettings(){let a=this.settingsRepositoryFactory.getRepository("general"),l=await a.get();this.addBooleanSetting(this.getNotesCreatedOnDateSetting(l.displayNotesCreatedOnDate),async o=>{l.displayNotesCreatedOnDate=o,await a.store(l)}),this.addBooleanSetting(this.getDisplayNoteIndicatorSetting(l.displayNoteIndicator),async o=>{l.displayNoteIndicator=o,await a.store(l)}),this.addStartDayOfWeekSetting(l.firstDayOfWeek,async o=>{l.firstDayOfWeek=o,await a.store(l)}),this.addWeekNumberStandardSetting(l.weekNumberStandard,async o=>{l.weekNumberStandard=o,await a.store(l)}),this.addBooleanSetting(this.getUseModifierKeyToCreateNoteSetting(l.useModifierKeyToCreateNote),async o=>{l.useModifierKeyToCreateNote=o,await a.store(l)})}getNotesCreatedOnDateSetting(a){return{name:"Display notes created on selected date",description:"When selecting a specific date in the calender, display all the notes created on that date below the calendar.",placeholder:"",value:a}}getDisplayNoteIndicatorSetting(a){return{name:"Display an indicator on each date that has a note",description:"Display an indicator below the date or week number if the date has a note.",placeholder:"",value:a}}addStartDayOfWeekSetting(a,l){let o=new Map;o.set("monday",this.dayOfWeekName(1)),o.set("tuesday",this.dayOfWeekName(2)),o.set("wednesday",this.dayOfWeekName(3)),o.set("thursday",this.dayOfWeekName(4)),o.set("friday",this.dayOfWeekName(5)),o.set("saturday",this.dayOfWeekName(6)),o.set("sunday",this.dayOfWeekName(0)),this.addDropdownSetting("First day of the week","Set the first day of the week for the calendar.",o,this.dayOfWeekName(a).toLowerCase(),async r=>await l(this.dayOfWeek(r)))}addWeekNumberStandardSetting(a,l){let o=new Map;o.set("iso",this.weekNumberStandardName(0)),o.set("us",this.weekNumberStandardName(1));let r=o.keys().next(this.weekNumberStandardName(a)).value;this.addDropdownSetting("Week number standard","Set the week number standard for the calendar.",o,r,async u=>u.toLowerCase()==="iso"?await l(0):await l(1))}getUseModifierKeyToCreateNoteSetting(a){return{name:"Use modifier key to create a note",description:"Use a modifier key to create a note instead of clicking on the date.",placeholder:"",value:a}}dayOfWeekName(a){switch(a){case 1:return"Monday";case 2:return"Tuesday";case 3:return"Wednesday";case 4:return"Thursday";case 5:return"Friday";case 6:return"Saturday";case 0:return"Sunday"}}dayOfWeek(a){switch(a.toLowerCase()){case"monday":return 1;case"tuesday":return 2;case"wednesday":return 3;case"thursday":return 4;case"friday":return 5;case"saturday":return 6;default:return 0}}weekNumberStandardName(a){switch(a){case 0:return"ISO 8601";case 1:return"US"}}};var ys=class extends nS.PluginSettingTab{constructor(a,l,o,r){super(a.app,a);this.settings=[];this.settings.push(new gs(this,r,o)),this.settings.push(new hs(this,r,l,o)),this.settings.push(new ds(this,r,l,o)),this.settings.push(new fs(this,r,l,o)),this.settings.push(new cs(this,r,l,o)),this.settings.push(new ms(this,r,l,o)),this.settings.push(new ps(this,r,l,o))}async display(){this.containerEl.empty();for(let a=0;anew al(l,this.dependencies.contextMenuAdapter,this.dependencies.calendarViewModel,this.dependencies.dailyNoteViewModel,this.dependencies.weeklyNoteViewModel,this.dependencies.monthlyNoteViewModel,this.dependencies.quarterlyNoteViewModel,this.dependencies.yearlyNoteViewModel,this.dependencies.notesViewModel);await this.initializePlugin(),this.registerView(al.VIEW_TYPE,l=>a(l)),this.registerSettings(),this.registerCommands(),this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this))}async initializePlugin(){let a=this.dependencies.dateManagerFactory.getManager().getCurrentDay(),l=await this.dependencies.settingsRepositoryFactory.getRepository("plugin").get();this.dependencies.calendarViewModel.initialize(l,a),this.dependencies.dailyNoteViewModel.updateSettings(l),this.dependencies.weeklyNoteViewModel.updateSettings(l),this.dependencies.monthlyNoteViewModel.updateSettings(l),this.dependencies.quarterlyNoteViewModel.updateSettings(l),this.dependencies.yearlyNoteViewModel.updateSettings(l)}onLayoutReady(){this.registerPlugin(),this.app.vault.on("create",()=>{var a;return(a=this.dependencies.notesViewModel.updateNotes)==null?void 0:a.call(this)}),this.app.vault.on("delete",()=>{var a;return(a=this.dependencies.notesViewModel.updateNotes)==null?void 0:a.call(this)}),this.app.vault.on("rename",()=>{var a;return(a=this.dependencies.notesViewModel.updateNotes)==null?void 0:a.call(this)})}registerPlugin(){var a;this.app.workspace.getLeavesOfType(al.VIEW_TYPE).length<=0&&((a=this.app.workspace.getRightLeaf(!1))==null||a.setViewState({type:al.VIEW_TYPE}))}registerSettings(){let a=new ys(this,this.dependencies.dateParserFactory,this.dependencies.settingsRepositoryFactory,()=>{});this.addSettingTab(a)}registerCommands(){this.addCommand(new ts(this.dependencies.commandHandlerFactory)),this.addCommand(new as(this.dependencies.commandHandlerFactory)),this.addCommand(new ls(this.dependencies.commandHandlerFactory)),this.addCommand(new os(this.dependencies.commandHandlerFactory)),this.addCommand(new ns(this.dependencies.commandHandlerFactory)),this.addCommand(new ss(this.dependencies.commandHandlerFactory)),this.addCommand(new rs(this.dependencies.commandHandlerFactory)),this.addCommand(new us(this.dependencies.commandHandlerFactory)),this.addCommand(new is(this.dependencies.commandHandlerFactory))}}; /*! Bundled license information: scheduler/cjs/scheduler.production.js: (** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) react/cjs/react.production.js: (** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) react-dom/cjs/react-dom.production.js: (** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) react-dom/cjs/react-dom-client.production.js: (** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) react/cjs/react-jsx-runtime.production.js: (** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/shared/src/utils.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/defaultAttributes.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/Icon.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/createLucideIcon.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/icons/calendar-heart.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/icons/chevron-left.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/icons/chevron-right.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/icons/chevrons-left.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/icons/chevrons-right.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) lucide-react/dist/esm/lucide-react.js: (** * @license lucide-react v0.469.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. *) */ /* nosourcemap */