diff --git a/.obsidian/app.json b/.obsidian/app.json index ee5b51c..85d301a 100644 --- a/.obsidian/app.json +++ b/.obsidian/app.json @@ -7,5 +7,6 @@ "showFrontmatter": false, "defaultViewMode": "preview", "showLineNumber": true, - "spellcheck": true + "spellcheck": true, + "attachmentFolderPath": "Private/Attachments" } \ No newline at end of file diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index cbbce72..3c68287 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -27,5 +27,6 @@ "obsidian-timestamper", "obsidian-hotkeys-for-templates", "settings-search", - "recent-files-obsidian" + "recent-files-obsidian", + "obsidian-plugin-update-tracker" ] \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-plugin-update-tracker/data.json b/.obsidian/plugins/obsidian-plugin-update-tracker/data.json new file mode 100644 index 0000000..f5b85f9 --- /dev/null +++ b/.obsidian/plugins/obsidian-plugin-update-tracker/data.json @@ -0,0 +1,8 @@ +{ + "daysToSuppressNewUpdates": 0, + "dismissedVersionsByPluginId": {}, + "showIconOnMobile": true, + "excludeBetaVersions": true, + "excludeDisabledPlugins": false, + "hideIconIfNoUpdatesAvailable": false +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-plugin-update-tracker/main.js b/.obsidian/plugins/obsidian-plugin-update-tracker/main.js new file mode 100644 index 0000000..9c1867a --- /dev/null +++ b/.obsidian/plugins/obsidian-plugin-update-tracker/main.js @@ -0,0 +1,1180 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var wA=Object.create;var B8=Object.defineProperty;var bA=Object.getOwnPropertyDescriptor;var kA=Object.getOwnPropertyNames;var _A=Object.getPrototypeOf,PA=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),U8=(e,t)=>{for(var n in t)B8(e,n,{get:t[n],enumerable:!0})},Mu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of kA(t))!PA.call(e,c)&&c!==n&&B8(e,c,{get:()=>t[c],enumerable:!(r=bA(t,c))||r.enumerable});return e};var e1=(e,t,n)=>(n=e!=null?wA(_A(e)):{},Mu(t||!e||!e.__esModule?B8(n,"default",{value:e,enumerable:!0}):n,e)),OA=e=>Mu(B8({},"__esModule",{value:!0}),e);var wu=E(L1=>{"use strict";var xt=Symbol.for("react.element"),RA=Symbol.for("react.portal"),IA=Symbol.for("react.fragment"),DA=Symbol.for("react.strict_mode"),FA=Symbol.for("react.profiler"),BA=Symbol.for("react.provider"),UA=Symbol.for("react.context"),jA=Symbol.for("react.forward_ref"),GA=Symbol.for("react.suspense"),qA=Symbol.for("react.memo"),WA=Symbol.for("react.lazy"),zu=Symbol.iterator;function KA(e){return e===null||typeof e!="object"?null:(e=zu&&e[zu]||e["@@iterator"],typeof e=="function"?e:null)}var Vu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Su=Object.assign,Lu={};function r0(e,t,n){this.props=e,this.context=t,this.refs=Lu,this.updater=n||Vu}r0.prototype.isReactComponent={};r0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};r0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Eu(){}Eu.prototype=r0.prototype;function g7(e,t,n){this.props=e,this.context=t,this.refs=Lu,this.updater=n||Vu}var C7=g7.prototype=new Eu;C7.constructor=g7;Su(C7,r0.prototype);C7.isPureReactComponent=!0;var yu=Array.isArray,xu=Object.prototype.hasOwnProperty,H7={current:null},Nu={key:!0,ref:!0,__self:!0,__source:!0};function Au(e,t,n){var r,c={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)xu.call(t,r)&&!Nu.hasOwnProperty(r)&&(c[r]=t[r]);var s=arguments.length-2;if(s===1)c.children=n;else if(1{"use strict";bu.exports=wu()});var Uu=E(J1=>{"use strict";function V7(e,t){var n=e.length;e.push(t);e:for(;0>>1,c=e[r];if(0>>1;rW8(s,n))oW8(l,s)?(e[r]=l,e[o]=n,r=o):(e[r]=s,e[i]=n,r=i);else if(oW8(l,n))e[r]=l,e[o]=n,r=o;else break e}}return t}function W8(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(ku=performance,J1.unstable_now=function(){return ku.now()}):(z7=Date,_u=z7.now(),J1.unstable_now=function(){return z7.now()-_u});var ku,z7,_u,S3=[],ze=[],JA=1,U4=null,B2=3,Y8=!1,m6=!1,At=!1,Ru=typeof setTimeout=="function"?setTimeout:null,Iu=typeof clearTimeout=="function"?clearTimeout:null,Pu=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S7(e){for(var t=a3(ze);t!==null;){if(t.callback===null)$8(ze);else if(t.startTime<=e)$8(ze),t.sortIndex=t.expirationTime,V7(S3,t);else break;t=a3(ze)}}function L7(e){if(At=!1,S7(e),!m6)if(a3(S3)!==null)m6=!0,x7(E7);else{var t=a3(ze);t!==null&&N7(L7,t.startTime-e)}}function E7(e,t){m6=!1,At&&(At=!1,Iu(wt),wt=-1),Y8=!0;var n=B2;try{for(S7(t),U4=a3(S3);U4!==null&&(!(U4.expirationTime>t)||e&&!Bu());){var r=U4.callback;if(typeof r=="function"){U4.callback=null,B2=U4.priorityLevel;var c=r(U4.expirationTime<=t);t=J1.unstable_now(),typeof c=="function"?U4.callback=c:U4===a3(S3)&&$8(S3),S7(t)}else $8(S3);U4=a3(S3)}if(U4!==null)var a=!0;else{var i=a3(ze);i!==null&&N7(L7,i.startTime-t),a=!1}return a}finally{U4=null,B2=n,Y8=!1}}var Q8=!1,K8=null,wt=-1,Du=5,Fu=-1;function Bu(){return!(J1.unstable_now()-Fue||125r?(e.sortIndex=n,V7(ze,e),a3(S3)===null&&e===a3(ze)&&(At?(Iu(wt),wt=-1):At=!0,N7(L7,n-r))):(e.sortIndex=c,V7(S3,e),m6||Y8||(m6=!0,x7(E7))),e};J1.unstable_shouldYield=Bu;J1.unstable_wrapCallback=function(e){var t=B2;return function(){var n=B2;B2=t;try{return e.apply(this,arguments)}finally{B2=n}}}});var Gu=E((_Z,ju)=>{"use strict";ju.exports=Uu()});var Qd=E(L4=>{"use strict";var Xm=X1(),V4=Gu();function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}function t4(e,t,n,r,c,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=c,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var R2={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R2[e]=new t4(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];R2[t]=new t4(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){R2[e]=new t4(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R2[e]=new t4(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){R2[e]=new t4(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){R2[e]=new t4(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){R2[e]=new t4(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){R2[e]=new t4(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){R2[e]=new t4(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gi=/[\-:]([a-z])/g;function qi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Gi,qi);R2[t]=new t4(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Gi,qi);R2[t]=new t4(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Gi,qi);R2[t]=new t4(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){R2[e]=new t4(e,1,!1,e.toLowerCase(),null,!1,!1)});R2.xlinkHref=new t4("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){R2[e]=new t4(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wi(e,t,n,r){var c=R2.hasOwnProperty(t)?R2[t]:null;(c!==null?c.type!==0:r||!(2s||c[i]!==a[s]){var o=` +`+c[i].replace(" at new "," at ");return e.displayName&&o.includes("")&&(o=o.replace("",e.displayName)),o}while(1<=i&&0<=s);break}}}finally{w7=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ft(e):""}function rw(e){switch(e.tag){case 5:return Ft(e.type);case 16:return Ft("Lazy");case 13:return Ft("Suspense");case 19:return Ft("SuspenseList");case 0:case 2:case 15:return e=b7(e.type,!1),e;case 11:return e=b7(e.type.render,!1),e;case 1:return e=b7(e.type,!0),e;default:return""}}function ni(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case s0:return"Fragment";case i0:return"Portal";case Z7:return"Profiler";case Ki:return"StrictMode";case ei:return"Suspense";case ti:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ep:return(e.displayName||"Context")+".Consumer";case Zm:return(e._context.displayName||"Context")+".Provider";case $i:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yi:return t=e.displayName||null,t!==null?t:ni(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return ni(e(t))}catch(n){}}return null}function cw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ni(t);case 8:return t===Ki?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function np(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aw(e){var t=np(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function J8(e){e._valueTracker||(e._valueTracker=aw(e))}function rp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=np(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lr(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ri(e,t){var n=t.checked;return m2({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function $u(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Re(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cp(e,t){t=t.checked,t!=null&&Wi(e,"checked",t,!1)}function ci(e,t){cp(e,t);var n=Re(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ai(e,t.type,n):t.hasOwnProperty("defaultValue")&&ai(e,t.type,Re(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ai(e,t,n){(t!=="number"||Lr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bt=Array.isArray;function C0(e,t,n,r){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=Z8.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},iw=["Webkit","ms","Moz","O"];Object.keys(Gt).forEach(function(e){iw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gt[t]=Gt[e]})});function op(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gt.hasOwnProperty(e)&&Gt[e]?(""+t).trim():t+"px"}function lp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,c=op(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,c):e[n]=c}}var sw=m2({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function oi(e,t){if(t){if(sw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function li(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fi=null;function Qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,H0=null,M0=null;function Ju(e){if(e=Hn(e)){if(typeof ui!="function")throw Error(q(280));var t=e.stateNode;t&&(t=e5(t),ui(e.stateNode,e.type,t))}}function fp(e){H0?M0?M0.push(e):M0=[e]:H0=e}function up(){if(H0){var e=H0,t=M0;if(M0=H0=null,Ju(e),t)for(e=0;e>>=0,e===0?32:31-(Cw(e)/Hw|0)|0}var er=64,tr=4194304;function Ut(e){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ar(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,c=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~c;s!==0?r=Ut(s):(a&=i,a!==0&&(r=Ut(a)))}else i=n&~c,i!==0?r=Ut(i):a!==0&&(r=Ut(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&c)===0&&(c=r&-r,a=t&-t,c>=a||c===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-f3(t),e[t]=n}function Tw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Wt),sm=String.fromCharCode(32),om=!1;function wp(e,t){switch(e){case"keyup":return Xw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var o0=!1;function Zw(e,t){switch(e){case"compositionend":return bp(t);case"keypress":return t.which!==32?null:(om=!0,sm);case"textInput":return e=t.data,e===sm&&om?null:e;default:return null}}function eb(e,t){if(o0)return e==="compositionend"||!cs&&wp(e,t)?(e=Np(),gr=ts=Ee=null,o0=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=um(n)}}function Op(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Op(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rp(){for(var e=window,t=Lr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function as(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 lb(e){var t=Rp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Op(n.ownerDocument.documentElement,n)){if(r!==null&&as(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=n.textContent.length,a=Math.min(r.start,c);r=r.end===void 0?a:Math.min(r.end,c),!e.extend&&a>r&&(c=r,r=a,a=c),c=mm(n,a);var i=mm(n,r);c&&i&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,l0=null,gi=null,$t=null,Ci=!1;function pm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ci||l0==null||l0!==Lr(r)||(r=l0,"selectionStart"in r&&as(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$t&&sn($t,r)||($t=r,r=kr(gi,"onSelect"),0m0||(e.current=Vi[m0],Vi[m0]=null,m0--)}function Z1(e,t){m0++,Vi[m0]=e.current,e.current=t}var Ie={},q2=Fe(Ie),f4=Fe(!1),M6=Ie;function S0(e,t){var n=e.type.contextTypes;if(!n)return Ie;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var c={},a;for(a in n)c[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function u4(e){return e=e.childContextTypes,e!=null}function Pr(){n2(f4),n2(q2)}function ym(e,t,n){if(q2.current!==Ie)throw Error(q(168));Z1(q2,t),Z1(f4,n)}function Wp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var c in r)if(!(c in t))throw Error(q(108,cw(e)||"Unknown",c));return m2({},n,r)}function Or(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ie,M6=q2.current,Z1(q2,e),Z1(f4,f4.current),!0}function Tm(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=Wp(e,t,M6),r.__reactInternalMemoizedMergedChildContext=e,n2(f4),n2(q2),Z1(q2,e)):n2(f4),Z1(f4,n)}var G3=null,t5=!1,j7=!1;function Kp(e){G3===null?G3=[e]:G3.push(e)}function Hb(e){t5=!0,Kp(e)}function Be(){if(!j7&&G3!==null){j7=!0;var e=0,t=O1;try{var n=G3;for(O1=1;e>=i,c-=i,q3=1<<32-f3(t)+c|n<k?(W=N,N=null):W=N.sibling;var J=p(d,N,z[k],S);if(J===null){N===null&&(N=W);break}e&&N&&J.alternate===null&&t(d,N),g=a(J,g,k),L===null?w=J:L.sibling=J,L=J,N=W}if(k===z.length)return n(d,N),s2&&p6(d,k),w;if(N===null){for(;kk?(W=N,N=null):W=N.sibling;var U=p(d,N,J.value,S);if(U===null){N===null&&(N=W);break}e&&N&&U.alternate===null&&t(d,N),g=a(U,g,k),L===null?w=U:L.sibling=U,L=U,N=W}if(J.done)return n(d,N),s2&&p6(d,k),w;if(N===null){for(;!J.done;k++,J=z.next())J=m(d,J.value,S),J!==null&&(g=a(J,g,k),L===null?w=J:L.sibling=J,L=J);return s2&&p6(d,k),w}for(N=r(d,N);!J.done;k++,J=z.next())J=h(N,d,k,J.value,S),J!==null&&(e&&J.alternate!==null&&N.delete(J.key===null?k:J.key),g=a(J,g,k),L===null?w=J:L.sibling=J,L=J);return e&&N.forEach(function(D){return t(d,D)}),s2&&p6(d,k),w}function y(d,g,z,S){if(typeof z=="object"&&z!==null&&z.type===s0&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case X8:e:{for(var w=z.key,L=g;L!==null;){if(L.key===w){if(w=z.type,w===s0){if(L.tag===7){n(d,L.sibling),g=c(L,z.props.children),g.return=d,d=g;break e}}else if(L.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Te&&Am(w)===L.type){n(d,L.sibling),g=c(L,z.props),g.ref=Ot(d,L,z),g.return=d,d=g;break e}n(d,L);break}else t(d,L);L=L.sibling}z.type===s0?(g=H6(z.props.children,d.mode,S,z.key),g.return=d,d=g):(S=Sr(z.type,z.key,z.props,null,d.mode,S),S.ref=Ot(d,g,z),S.return=d,d=S)}return i(d);case i0:e:{for(L=z.key;g!==null;){if(g.key===L)if(g.tag===4&&g.stateNode.containerInfo===z.containerInfo&&g.stateNode.implementation===z.implementation){n(d,g.sibling),g=c(g,z.children||[]),g.return=d,d=g;break e}else{n(d,g);break}else t(d,g);g=g.sibling}g=X7(z,d.mode,S),g.return=d,d=g}return i(d);case Te:return L=z._init,y(d,g,L(z._payload),S)}if(Bt(z))return v(d,g,z,S);if(bt(z))return H(d,g,z,S);mr(d,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,g!==null&&g.tag===6?(n(d,g.sibling),g=c(g,z),g.return=d,d=g):(n(d,g),g=Q7(z,d.mode,S),g.return=d,d=g),i(d)):n(d,g)}return y}var E0=td(!0),nd=td(!1),Mn={},A3=Fe(Mn),un=Fe(Mn),mn=Fe(Mn);function g6(e){if(e===Mn)throw Error(q(174));return e}function ds(e,t){switch(Z1(mn,t),Z1(un,e),Z1(A3,Mn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:si(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=si(t,e)}n2(A3),Z1(A3,t)}function x0(){n2(A3),n2(un),n2(mn)}function rd(e){g6(mn.current);var t=g6(A3.current),n=si(t,e.type);t!==n&&(Z1(un,e),Z1(A3,n))}function hs(e){un.current===e&&(n2(A3),n2(un))}var f2=Fe(0);function Ur(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 G7=[];function vs(){for(var e=0;en?n:4,e(!0);var r=q7.transition;q7.transition={};try{e(!1),t()}finally{O1=n,q7.transition=r}}function Hd(){return $4().memoizedState}function Tb(e,t,n){var r=Pe(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Md(e))zd(t,n);else if(n=Xp(e,t,n,r),n!==null){var c=e4();u3(n,e,r,c),yd(n,t,r)}}function Vb(e,t,n){var r=Pe(e),c={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Md(e))zd(t,c);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,n);if(c.hasEagerState=!0,c.eagerState=s,m3(s,i)){var o=t.interleaved;o===null?(c.next=c,ms(t)):(c.next=o.next,o.next=c),t.interleaved=c;return}}catch(l){}finally{}n=Xp(e,t,c,r),n!==null&&(c=e4(),u3(n,e,r,c),yd(n,t,r))}}function Md(e){var t=e.alternate;return e===u2||t!==null&&t===u2}function zd(e,t){Yt=jr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yd(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ji(e,n)}}var Gr={readContext:K4,useCallback:U2,useContext:U2,useEffect:U2,useImperativeHandle:U2,useInsertionEffect:U2,useLayoutEffect:U2,useMemo:U2,useReducer:U2,useRef:U2,useState:U2,useDebugValue:U2,useDeferredValue:U2,useTransition:U2,useMutableSource:U2,useSyncExternalStore:U2,useId:U2,unstable_isNewReconciler:!1},Sb={readContext:K4,useCallback:function(e,t){return E3().memoizedState=[e,t===void 0?null:t],e},useContext:K4,useEffect:bm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zr(4194308,4,dd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zr(4194308,4,e,t)},useInsertionEffect:function(e,t){return zr(4,2,e,t)},useMemo:function(e,t){var n=E3();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=E3();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Tb.bind(null,u2,e),[r.memoizedState,e]},useRef:function(e){var t=E3();return e={current:e},t.memoizedState=e},useState:wm,useDebugValue:zs,useDeferredValue:function(e){return E3().memoizedState=e},useTransition:function(){var e=wm(!1),t=e[0];return e=yb.bind(null,e[1]),E3().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=u2,c=E3();if(s2){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),N2===null)throw Error(q(349));(y6&30)!==0||id(r,t,n)}c.memoizedState=n;var a={value:n,getSnapshot:t};return c.queue=a,bm(od.bind(null,r,a,e),[e]),r.flags|=2048,hn(9,sd.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=E3(),t=N2.identifierPrefix;if(s2){var n=W3,r=q3;n=(r&~(1<<32-f3(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[x3]=t,e[fn]=r,wd(e,t,!1,!1),t.stateNode=e;e:{switch(i=li(n,r),n){case"dialog":t2("cancel",e),t2("close",e),c=r;break;case"iframe":case"object":case"embed":t2("load",e),c=r;break;case"video":case"audio":for(c=0;cA0&&(t.flags|=128,r=!0,Rt(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ur(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rt(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!s2)return j2(t),null}else 2*H2()-a.renderingStartTime>A0&&n!==1073741824&&(t.flags|=128,r=!0,Rt(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=H2(),t.sibling=null,n=f2.current,Z1(f2,r?n&1|2:n&1),t):(j2(t),null);case 22:case 23:return Es(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(z4&1073741824)!==0&&(j2(t),t.subtreeFlags&6&&(t.flags|=8192)):j2(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function kb(e,t){switch(ss(t),t.tag){case 1:return u4(t.type)&&Pr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return x0(),n2(f4),n2(q2),vs(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return hs(t),null;case 13:if(n2(f2),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));L0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return n2(f2),null;case 4:return x0(),null;case 10:return us(t.type._context),null;case 22:case 23:return Es(),null;case 24:return null;default:return null}}var dr=!1,G2=!1,_b=typeof WeakSet=="function"?WeakSet:Set,c1=null;function v0(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){p2(e,t,r)}else n.current=null}function Oi(e,t,n){try{n()}catch(r){p2(e,t,r)}}var Bm=!1;function Pb(e,t){if(Hi=wr,e=Rp(),as(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var c=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(S){n=null;break e}var i=0,s=-1,o=-1,l=0,f=0,m=e,p=null;t:for(;;){for(var h;m!==n||c!==0&&m.nodeType!==3||(s=i+c),m!==a||r!==0&&m.nodeType!==3||(o=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(h=m.firstChild)!==null;)p=m,m=h;for(;;){if(m===e)break t;if(p===n&&++l===c&&(s=i),p===a&&++f===r&&(o=i),(h=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=h}n=s===-1||o===-1?null:{start:s,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mi={focusedElem:e,selectionRange:n},wr=!1,c1=t;c1!==null;)if(t=c1,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,c1=e;else for(;c1!==null;){t=c1;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var H=v.memoizedProps,y=v.memoizedState,d=t.stateNode,g=d.getSnapshotBeforeUpdate(t.elementType===t.type?H:s3(t.type,H),y);d.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var z=t.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(S){p2(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,c1=e;break}c1=t.return}return v=Bm,Bm=!1,v}function Qt(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var c=r=r.next;do{if((c.tag&e)===e){var a=c.destroy;c.destroy=void 0,a!==void 0&&Oi(t,n,a)}c=c.next}while(c!==r)}}function c5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ri(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _d(e){var t=e.alternate;t!==null&&(e.alternate=null,_d(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[x3],delete t[fn],delete t[Ti],delete t[gb],delete t[Cb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pd(e){return e.tag===5||e.tag===3||e.tag===4}function Um(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ii(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_r));else if(r!==4&&(e=e.child,e!==null))for(Ii(e,t,n),e=e.sibling;e!==null;)Ii(e,t,n),e=e.sibling}function Di(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Di(e,t,n),e=e.sibling;e!==null;)Di(e,t,n),e=e.sibling}var P2=null,o3=!1;function ye(e,t,n){for(n=n.child;n!==null;)Od(e,t,n),n=n.sibling}function Od(e,t,n){if(N3&&typeof N3.onCommitFiberUnmount=="function")try{N3.onCommitFiberUnmount(Qr,n)}catch(s){}switch(n.tag){case 5:G2||v0(n,t);case 6:var r=P2,c=o3;P2=null,ye(e,t,n),P2=r,o3=c,P2!==null&&(o3?(e=P2,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):P2.removeChild(n.stateNode));break;case 18:P2!==null&&(o3?(e=P2,n=n.stateNode,e.nodeType===8?U7(e.parentNode,n):e.nodeType===1&&U7(e,n),cn(e)):U7(P2,n.stateNode));break;case 4:r=P2,c=o3,P2=n.stateNode.containerInfo,o3=!0,ye(e,t,n),P2=r,o3=c;break;case 0:case 11:case 14:case 15:if(!G2&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){c=r=r.next;do{var a=c,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&Oi(n,t,i),c=c.next}while(c!==r)}ye(e,t,n);break;case 1:if(!G2&&(v0(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){p2(n,t,s)}ye(e,t,n);break;case 21:ye(e,t,n);break;case 22:n.mode&1?(G2=(r=G2)||n.memoizedState!==null,ye(e,t,n),G2=r):ye(e,t,n);break;default:ye(e,t,n)}}function jm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _b),t.forEach(function(r){var c=Gb.bind(null,e,r);n.has(r)||(n.add(r),r.then(c,c))})}}function i3(e,t){var n=t.deletions;if(n!==null)for(var r=0;rc&&(c=i),r&=~a}if(r=c,r=H2()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rb(r/1960))-r,10e?16:e,xe===null)var r=!1;else{if(e=xe,xe=null,Kr=0,(N1&6)!==0)throw Error(q(331));var c=N1;for(N1|=4,c1=e.current;c1!==null;){var a=c1,i=a.child;if((c1.flags&16)!==0){var s=a.deletions;if(s!==null){for(var o=0;oH2()-Ss?C6(e,0):Vs|=n),m4(e,t)}function Gd(e,t){t===0&&((e.mode&1)===0?t=1:(t=tr,tr<<=1,(tr&130023424)===0&&(tr=4194304)));var n=e4();e=Q3(e,t),e!==null&&(gn(e,t,n),m4(e,n))}function jb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gd(e,n)}function Gb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),Gd(e,n)}var qd;qd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||f4.current)l4=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return l4=!1,wb(e,t,n);l4=(e.flags&131072)!==0}else l4=!1,s2&&(t.flags&1048576)!==0&&$p(t,Ir,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yr(e,t),e=t.pendingProps;var c=S0(t,q2.current);y0(t,n),c=Cs(null,t,r,e,c,n);var a=Hs();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,u4(r)?(a=!0,Or(t)):a=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ps(t),c.updater=n5,t.stateNode=c,c._reactInternals=t,Ni(t,r,e,n),t=bi(null,t,r,!0,a,n)):(t.tag=0,s2&&a&&is(t),Z2(null,t,c,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yr(e,t),e=t.pendingProps,c=r._init,r=c(r._payload),t.type=r,c=t.tag=Wb(r),e=s3(r,e),c){case 0:t=wi(null,t,r,e,n);break e;case 1:t=Im(null,t,r,e,n);break e;case 11:t=Om(null,t,r,e,n);break e;case 14:t=Rm(null,t,r,s3(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,c=t.pendingProps,c=t.elementType===r?c:s3(r,c),wi(e,t,r,c,n);case 1:return r=t.type,c=t.pendingProps,c=t.elementType===r?c:s3(r,c),Im(e,t,r,c,n);case 3:e:{if(xd(t),e===null)throw Error(q(387));r=t.pendingProps,a=t.memoizedState,c=a.element,Jp(e,t),Br(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){c=N0(Error(q(423)),t),t=Dm(e,t,r,n,c);break e}else if(r!==c){c=N0(Error(q(424)),t),t=Dm(e,t,r,n,c);break e}else for(y4=be(t.stateNode.containerInfo.firstChild),T4=t,s2=!0,l3=null,n=nd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(L0(),r===c){t=X3(e,t,n);break e}Z2(e,t,r,n)}t=t.child}return t;case 5:return rd(t),e===null&&Li(t),r=t.type,c=t.pendingProps,a=e!==null?e.memoizedProps:null,i=c.children,zi(r,c)?i=null:a!==null&&zi(r,a)&&(t.flags|=32),Ed(e,t),Z2(e,t,i,n),t.child;case 6:return e===null&&Li(t),null;case 13:return Nd(e,t,n);case 4:return ds(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=E0(t,null,r,n):Z2(e,t,r,n),t.child;case 11:return r=t.type,c=t.pendingProps,c=t.elementType===r?c:s3(r,c),Om(e,t,r,c,n);case 7:return Z2(e,t,t.pendingProps,n),t.child;case 8:return Z2(e,t,t.pendingProps.children,n),t.child;case 12:return Z2(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,c=t.pendingProps,a=t.memoizedProps,i=c.value,Z1(Dr,r._currentValue),r._currentValue=i,a!==null)if(m3(a.value,i)){if(a.children===c.children&&!f4.current){t=X3(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var o=s.firstContext;o!==null;){if(o.context===r){if(a.tag===1){o=K3(-1,n&-n),o.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var f=l.pending;f===null?o.next=o:(o.next=f.next,f.next=o),l.pending=o}}a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Ei(a.return,n,t),s.lanes|=n;break}o=o.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(q(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ei(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Z2(e,t,c.children,n),t=t.child}return t;case 9:return c=t.type,r=t.pendingProps.children,y0(t,n),c=K4(c),r=r(c),t.flags|=1,Z2(e,t,r,n),t.child;case 14:return r=t.type,c=s3(r,t.pendingProps),c=s3(r.type,c),Rm(e,t,r,c,n);case 15:return Sd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,c=t.pendingProps,c=t.elementType===r?c:s3(r,c),yr(e,t),t.tag=1,u4(r)?(e=!0,Or(t)):e=!1,y0(t,n),ed(t,r,c),Ni(t,r,c,n),bi(null,t,r,!0,e,n);case 19:return Ad(e,t,n);case 22:return Ld(e,t,n)}throw Error(q(156,t.tag))};function Wd(e,t){return Cp(e,t)}function qb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function q4(e,t,n,r){return new qb(e,t,n,r)}function Ns(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wb(e){if(typeof e=="function")return Ns(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$i)return 11;if(e===Yi)return 14}return 2}function Oe(e,t){var n=e.alternate;return n===null?(n=q4(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sr(e,t,n,r,c,a){var i=2;if(r=e,typeof e=="function")Ns(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case s0:return H6(n.children,c,a,t);case Ki:i=8,c|=8;break;case Z7:return e=q4(12,n,t,c|2),e.elementType=Z7,e.lanes=a,e;case ei:return e=q4(13,n,t,c),e.elementType=ei,e.lanes=a,e;case ti:return e=q4(19,n,t,c),e.elementType=ti,e.lanes=a,e;case tp:return i5(n,c,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zm:i=10;break e;case ep:i=9;break e;case $i:i=11;break e;case Yi:i=14;break e;case Te:i=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=q4(i,n,t,c),t.elementType=e,t.type=r,t.lanes=a,t}function H6(e,t,n,r){return e=q4(7,e,r,t),e.lanes=n,e}function i5(e,t,n,r){return e=q4(22,e,r,t),e.elementType=tp,e.lanes=n,e.stateNode={isHidden:!1},e}function Q7(e,t,n){return e=q4(6,e,null,t),e.lanes=n,e}function X7(e,t,n){return t=q4(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kb(e,t,n,r,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_7(0),this.expirationTimes=_7(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_7(0),this.identifierPrefix=r,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function As(e,t,n,r,c,a,i,s,o){return e=new Kb(e,t,n,s,o),t===1?(t=1,a===!0&&(t|=8)):t=0,a=q4(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ps(a),e}function $b(e,t,n){var r=3{"use strict";function Xd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xd)}catch(e){console.error(e)}}Xd(),Jd.exports=Qd()});var eh=E(Ps=>{"use strict";var Zd=_s();Ps.createRoot=Zd.createRoot,Ps.hydrateRoot=Zd.hydrateRoot;var RZ});var nh=E(th=>{"use strict";var k0=X1();function Zb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ek=typeof Object.is=="function"?Object.is:Zb,tk=k0.useState,nk=k0.useEffect,rk=k0.useLayoutEffect,ck=k0.useDebugValue;function ak(e,t){var n=t(),r=tk({inst:{value:n,getSnapshot:t}}),c=r[0].inst,a=r[1];return rk(function(){c.value=n,c.getSnapshot=t,Os(c)&&a({inst:c})},[e,n,t]),nk(function(){return Os(c)&&a({inst:c}),e(function(){Os(c)&&a({inst:c})})},[e]),ck(n),n}function Os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ek(e,n)}catch(r){return!0}}function ik(e,t){return t()}var sk=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?ik:ak;th.useSyncExternalStore=k0.useSyncExternalStore!==void 0?k0.useSyncExternalStore:sk});var Rs=E((FZ,rh)=>{"use strict";rh.exports=nh()});var ah=E(ch=>{"use strict";var u5=X1(),ok=Rs();function lk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fk=typeof Object.is=="function"?Object.is:lk,uk=ok.useSyncExternalStore,mk=u5.useRef,pk=u5.useEffect,dk=u5.useMemo,hk=u5.useDebugValue;ch.useSyncExternalStoreWithSelector=function(e,t,n,r,c){var a=mk(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=dk(function(){function o(h){if(!l){if(l=!0,f=h,h=r(h),c!==void 0&&i.hasValue){var v=i.value;if(c(v,h))return m=v}return m=h}if(v=m,fk(f,h))return v;var H=r(h);return c!==void 0&&c(v,H)?v:(f=h,m=H)}var l=!1,f,m,p=n===void 0?null:n;return[function(){return o(t())},p===null?void 0:function(){return o(p())}]},[t,n,r,c]);var s=uk(e,a[0],a[1]);return pk(function(){i.hasValue=!0,i.value=s},[s]),hk(s),s}});var sh=E((UZ,ih)=>{"use strict";ih.exports=ah()});var gh=E(R1=>{"use strict";var A2=typeof Symbol=="function"&&Symbol.for,Fs=A2?Symbol.for("react.element"):60103,Bs=A2?Symbol.for("react.portal"):60106,h5=A2?Symbol.for("react.fragment"):60107,v5=A2?Symbol.for("react.strict_mode"):60108,g5=A2?Symbol.for("react.profiler"):60114,C5=A2?Symbol.for("react.provider"):60109,H5=A2?Symbol.for("react.context"):60110,Us=A2?Symbol.for("react.async_mode"):60111,M5=A2?Symbol.for("react.concurrent_mode"):60111,z5=A2?Symbol.for("react.forward_ref"):60112,y5=A2?Symbol.for("react.suspense"):60113,Ck=A2?Symbol.for("react.suspense_list"):60120,T5=A2?Symbol.for("react.memo"):60115,V5=A2?Symbol.for("react.lazy"):60116,Hk=A2?Symbol.for("react.block"):60121,Mk=A2?Symbol.for("react.fundamental"):60117,zk=A2?Symbol.for("react.responder"):60118,yk=A2?Symbol.for("react.scope"):60119;function E4(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fs:switch(e=e.type,e){case Us:case M5:case h5:case g5:case v5:case y5:return e;default:switch(e=e&&e.$$typeof,e){case H5:case z5:case V5:case T5:case C5:return e;default:return t}}case Bs:return t}}}function vh(e){return E4(e)===M5}R1.AsyncMode=Us;R1.ConcurrentMode=M5;R1.ContextConsumer=H5;R1.ContextProvider=C5;R1.Element=Fs;R1.ForwardRef=z5;R1.Fragment=h5;R1.Lazy=V5;R1.Memo=T5;R1.Portal=Bs;R1.Profiler=g5;R1.StrictMode=v5;R1.Suspense=y5;R1.isAsyncMode=function(e){return vh(e)||E4(e)===Us};R1.isConcurrentMode=vh;R1.isContextConsumer=function(e){return E4(e)===H5};R1.isContextProvider=function(e){return E4(e)===C5};R1.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fs};R1.isForwardRef=function(e){return E4(e)===z5};R1.isFragment=function(e){return E4(e)===h5};R1.isLazy=function(e){return E4(e)===V5};R1.isMemo=function(e){return E4(e)===T5};R1.isPortal=function(e){return E4(e)===Bs};R1.isProfiler=function(e){return E4(e)===g5};R1.isStrictMode=function(e){return E4(e)===v5};R1.isSuspense=function(e){return E4(e)===y5};R1.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===h5||e===M5||e===g5||e===v5||e===y5||e===Ck||typeof e=="object"&&e!==null&&(e.$$typeof===V5||e.$$typeof===T5||e.$$typeof===C5||e.$$typeof===H5||e.$$typeof===z5||e.$$typeof===Mk||e.$$typeof===zk||e.$$typeof===yk||e.$$typeof===Hk)};R1.typeOf=E4});var Hh=E((n11,Ch)=>{"use strict";Ch.exports=gh()});var qs=E((r11,Sh)=>{"use strict";var js=Hh(),Tk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Vk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Sk={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Th={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Gs={};Gs[js.ForwardRef]=Sk;Gs[js.Memo]=Th;function Mh(e){return js.isMemo(e)?Th:Gs[e.$$typeof]||Tk}var Lk=Object.defineProperty,Ek=Object.getOwnPropertyNames,zh=Object.getOwnPropertySymbols,xk=Object.getOwnPropertyDescriptor,Nk=Object.getPrototypeOf,yh=Object.prototype;function Vh(e,t,n){if(typeof t!="string"){if(yh){var r=Nk(t);r&&r!==yh&&Vh(e,r,n)}var c=Ek(t);zh&&(c=c.concat(zh(t)));for(var a=Mh(e),i=Mh(t),s=0;s{"use strict";var Ws=Symbol.for("react.element"),Ks=Symbol.for("react.portal"),S5=Symbol.for("react.fragment"),L5=Symbol.for("react.strict_mode"),E5=Symbol.for("react.profiler"),x5=Symbol.for("react.provider"),N5=Symbol.for("react.context"),Ak=Symbol.for("react.server_context"),A5=Symbol.for("react.forward_ref"),w5=Symbol.for("react.suspense"),b5=Symbol.for("react.suspense_list"),k5=Symbol.for("react.memo"),_5=Symbol.for("react.lazy"),wk=Symbol.for("react.offscreen"),Lh;Lh=Symbol.for("react.module.reference");function Y4(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ws:switch(e=e.type,e){case S5:case E5:case L5:case w5:case b5:return e;default:switch(e=e&&e.$$typeof,e){case Ak:case N5:case A5:case _5:case k5:case x5:return e;default:return t}}case Ks:return t}}}I1.ContextConsumer=N5;I1.ContextProvider=x5;I1.Element=Ws;I1.ForwardRef=A5;I1.Fragment=S5;I1.Lazy=_5;I1.Memo=k5;I1.Portal=Ks;I1.Profiler=E5;I1.StrictMode=L5;I1.Suspense=w5;I1.SuspenseList=b5;I1.isAsyncMode=function(){return!1};I1.isConcurrentMode=function(){return!1};I1.isContextConsumer=function(e){return Y4(e)===N5};I1.isContextProvider=function(e){return Y4(e)===x5};I1.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ws};I1.isForwardRef=function(e){return Y4(e)===A5};I1.isFragment=function(e){return Y4(e)===S5};I1.isLazy=function(e){return Y4(e)===_5};I1.isMemo=function(e){return Y4(e)===k5};I1.isPortal=function(e){return Y4(e)===Ks};I1.isProfiler=function(e){return Y4(e)===E5};I1.isStrictMode=function(e){return Y4(e)===L5};I1.isSuspense=function(e){return Y4(e)===w5};I1.isSuspenseList=function(e){return Y4(e)===b5};I1.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===S5||e===E5||e===L5||e===w5||e===b5||e===wk||typeof e=="object"&&e!==null&&(e.$$typeof===_5||e.$$typeof===k5||e.$$typeof===x5||e.$$typeof===N5||e.$$typeof===A5||e.$$typeof===Lh||e.getModuleId!==void 0)};I1.typeOf=Y4});var Nh=E((a11,xh)=>{"use strict";xh.exports=Eh()});var jh=E(x4=>{"use strict";Object.defineProperty(x4,"__esModule",{value:!0});var Rh="fas",Ih="rotate-left",Dh=512,Fh=512,Zs=["rotate-back","rotate-backward","undo-alt"],Bh="f2ea",Uh="M48.5 224H40c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H48.5z";x4.definition={prefix:Rh,iconName:Ih,icon:[Dh,Fh,Zs,Bh,Uh]};x4.faRotateLeft=x4.definition;x4.prefix=Rh;x4.iconName=Ih;x4.width=Dh;x4.height=Fh;x4.ligatures=Zs;x4.unicode=Bh;x4.svgPathData=Uh;x4.aliases=Zs});var qv=E((j21,Gv)=>{"use strict";var zP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Gv.exports=zP});var Yv=E((G21,$v)=>{"use strict";var yP=qv();function Wv(){}function Kv(){}Kv.resetWarningCache=Wv;$v.exports=function(){function e(r,c,a,i,s,o){if(o!==yP){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kv,resetWarningCache:Wv};return n.PropTypes=n,n}});var No=E((K21,Qv)=>{Qv.exports=Yv()();var q21,W21});var sg=E($1=>{"use strict";var cc=60103,ac=60106,kn=60107,_n=60108,Pn=60114,On=60109,Rn=60110,In=60112,Dn=60113,_o=60120,Fn=60115,Bn=60116,ng=60121,rg=60122,cg=60117,ag=60129,ig=60131;typeof Symbol=="function"&&Symbol.for&&(w2=Symbol.for,cc=w2("react.element"),ac=w2("react.portal"),kn=w2("react.fragment"),_n=w2("react.strict_mode"),Pn=w2("react.profiler"),On=w2("react.provider"),Rn=w2("react.context"),In=w2("react.forward_ref"),Dn=w2("react.suspense"),_o=w2("react.suspense_list"),Fn=w2("react.memo"),Bn=w2("react.lazy"),ng=w2("react.block"),rg=w2("react.server.block"),cg=w2("react.fundamental"),ag=w2("react.debug_trace_mode"),ig=w2("react.legacy_hidden"));var w2;function d3(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case cc:switch(e=e.type,e){case kn:case Pn:case _n:case Dn:case _o:return e;default:switch(e=e&&e.$$typeof,e){case Rn:case In:case Bn:case Fn:case On:return e;default:return t}}case ac:return t}}}var OP=On,RP=cc,IP=In,DP=kn,FP=Bn,BP=Fn,UP=ac,jP=Pn,GP=_n,qP=Dn;$1.ContextConsumer=Rn;$1.ContextProvider=OP;$1.Element=RP;$1.ForwardRef=IP;$1.Fragment=DP;$1.Lazy=FP;$1.Memo=BP;$1.Portal=UP;$1.Profiler=jP;$1.StrictMode=GP;$1.Suspense=qP;$1.isAsyncMode=function(){return!1};$1.isConcurrentMode=function(){return!1};$1.isContextConsumer=function(e){return d3(e)===Rn};$1.isContextProvider=function(e){return d3(e)===On};$1.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===cc};$1.isForwardRef=function(e){return d3(e)===In};$1.isFragment=function(e){return d3(e)===kn};$1.isLazy=function(e){return d3(e)===Bn};$1.isMemo=function(e){return d3(e)===Fn};$1.isPortal=function(e){return d3(e)===ac};$1.isProfiler=function(e){return d3(e)===Pn};$1.isStrictMode=function(e){return d3(e)===_n};$1.isSuspense=function(e){return d3(e)===Dn};$1.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kn||e===Pn||e===ag||e===_n||e===Dn||e===_o||e===ig||typeof e=="object"&&e!==null&&(e.$$typeof===Bn||e.$$typeof===Fn||e.$$typeof===On||e.$$typeof===Rn||e.$$typeof===In||e.$$typeof===cg||e.$$typeof===ng||e[0]===rg)};$1.typeOf=d3});var lg=E((X21,og)=>{"use strict";og.exports=sg()});var ug=E((J21,fg)=>{fg.exports=function(t,n,r,c){var a=r?r.call(c,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(n),l=0;l{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});function $P(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}Po.default=$P});var vg=E((n41,hg)=>{"use strict";hg.exports=dg()});var gg=E(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var YP=vg();function QP(e){return e&&e.__esModule?e:{default:e}}var XP=QP(YP),JP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ZP=XP.default(function(e){return JP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});Oo.default=ZP});var Hg=E((c41,Cg)=>{"use strict";Cg.exports=gg()});var Qo=E((d41,Rg)=>{var bO=typeof global=="object"&&global&&global.Object===Object&&global;Rg.exports=bO});var k3=E((h41,Ig)=>{var kO=Qo(),_O=typeof self=="object"&&self&&self.Object===Object&&self,PO=kO||_O||Function("return this")();Ig.exports=PO});var qn=E((v41,Dg)=>{var OO=k3(),RO=OO.Symbol;Dg.exports=RO});var jg=E((g41,Ug)=>{var Fg=qn(),Bg=Object.prototype,IO=Bg.hasOwnProperty,DO=Bg.toString,Wn=Fg?Fg.toStringTag:void 0;function FO(e){var t=IO.call(e,Wn),n=e[Wn];try{e[Wn]=void 0;var r=!0}catch(a){}var c=DO.call(e);return r&&(t?e[Wn]=n:delete e[Wn]),c}Ug.exports=FO});var qg=E((C41,Gg)=>{var BO=Object.prototype,UO=BO.toString;function jO(e){return UO.call(e)}Gg.exports=jO});var B0=E((H41,$g)=>{var Wg=qn(),GO=jg(),qO=qg(),WO="[object Null]",KO="[object Undefined]",Kg=Wg?Wg.toStringTag:void 0;function $O(e){return e==null?e===void 0?KO:WO:Kg&&Kg in Object(e)?GO(e):qO(e)}$g.exports=$O});var Kn=E((M41,Yg)=>{function YO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}Yg.exports=YO});var mc=E((z41,Qg)=>{var QO=B0(),XO=Kn(),JO="[object AsyncFunction]",ZO="[object Function]",eR="[object GeneratorFunction]",tR="[object Proxy]";function nR(e){if(!XO(e))return!1;var t=QO(e);return t==ZO||t==eR||t==JO||t==tR}Qg.exports=nR});var VC=E((yc,TC)=>{(function(e,t){typeof yc=="object"&&typeof TC!="undefined"?t(yc):typeof define=="function"&&define.amd?define(["exports"],t):t(e.reduxLogger=e.reduxLogger||{})})(yc,function(e){"use strict";function t(x,b){x.super_=b,x.prototype=Object.create(b.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}})}function n(x,b){Object.defineProperty(this,"kind",{value:x,enumerable:!0}),b&&b.length&&Object.defineProperty(this,"path",{value:b,enumerable:!0})}function r(x,b,C){r.super_.call(this,"E",x),Object.defineProperty(this,"lhs",{value:b,enumerable:!0}),Object.defineProperty(this,"rhs",{value:C,enumerable:!0})}function c(x,b){c.super_.call(this,"N",x),Object.defineProperty(this,"rhs",{value:b,enumerable:!0})}function a(x,b){a.super_.call(this,"D",x),Object.defineProperty(this,"lhs",{value:b,enumerable:!0})}function i(x,b,C){i.super_.call(this,"A",x),Object.defineProperty(this,"index",{value:b,enumerable:!0}),Object.defineProperty(this,"item",{value:C,enumerable:!0})}function s(x,b,C){var M=x.slice((C||b)+1||x.length);return x.length=b<0?x.length+b:b,x.push.apply(x,M),x}function o(x){var b=typeof x=="undefined"?"undefined":_(x);return b!=="object"?b:x===Math?"math":x===null?"null":Array.isArray(x)?"array":Object.prototype.toString.call(x)==="[object Date]"?"date":typeof x.toString=="function"&&/^\/.*\//.test(x.toString())?"regexp":"object"}function l(x,b,C,M,O,F,K){O=O||[],K=K||[];var A=O.slice(0);if(typeof F!="undefined"){if(M){if(typeof M=="function"&&M(A,F))return;if((typeof M=="undefined"?"undefined":_(M))==="object"){if(M.prefilter&&M.prefilter(A,F))return;if(M.normalize){var n1=M.normalize(A,F,x,b);n1&&(x=n1[0],b=n1[1])}}}A.push(F)}o(x)==="regexp"&&o(b)==="regexp"&&(x=x.toString(),b=b.toString());var R=typeof x=="undefined"?"undefined":_(x),v1=typeof b=="undefined"?"undefined":_(b),l1=R!=="undefined"||K&&K[K.length-1].lhs&&K[K.length-1].lhs.hasOwnProperty(F),h1=v1!=="undefined"||K&&K[K.length-1].rhs&&K[K.length-1].rhs.hasOwnProperty(F);if(!l1&&h1)C(new c(A,b));else if(!h1&&l1)C(new a(A,x));else if(o(x)!==o(b))C(new r(A,x,b));else if(o(x)==="date"&&x-b!==0)C(new r(A,x,b));else if(R==="object"&&x!==null&&b!==null)if(K.filter(function(u1){return u1.lhs===x}).length)x!==b&&C(new r(A,x,b));else{if(K.push({lhs:x,rhs:b}),Array.isArray(x)){var Z;for(x.length,Z=0;Z=b.length?C(new i(A,Z,new a(void 0,x[Z]))):l(x[Z],b[Z],C,M,A,Z,K);for(;Z=0?(l(x[u1],b[u1],C,M,A,u1,K),Q1=s(Q1,T1)):l(x[u1],void 0,C,M,A,u1,K)}),Q1.forEach(function(u1){l(void 0,b[u1],C,M,A,u1,K)})}K.length=K.length-1}else x!==b&&(R==="number"&&isNaN(x)&&isNaN(b)||C(new r(A,x,b)))}function f(x,b,C,M){return M=M||[],l(x,b,function(O){O&&M.push(O)},C),M.length?M:void 0}function m(x,b,C){if(C.path&&C.path.length){var M,O=x[b],F=C.path.length-1;for(M=0;M0&&arguments[0]!==void 0?arguments[0]:{},b=Object.assign({},t1,x),C=b.logger,M=b.stateTransformer,O=b.errorTransformer,F=b.predicate,K=b.logErrors,A=b.diffPredicate;if(typeof C=="undefined")return function(){return function(R){return function(v1){return R(v1)}}};if(x.getState&&x.dispatch)return console.error(`[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware: +// Logger with default options +import { logger } from 'redux-logger' +const store = createStore( + reducer, + applyMiddleware(logger) +) +// Or you can create your own logger with custom options http://bit.ly/redux-logger-options +import createLogger from 'redux-logger' +const logger = createLogger({ + // ...options +}); +const store = createStore( + reducer, + applyMiddleware(logger) +) +`),function(){return function(R){return function(v1){return R(v1)}}};var n1=[];return function(R){var v1=R.getState;return function(l1){return function(h1){if(typeof F=="function"&&!F(v1,h1))return l1(h1);var Z={};n1.push(Z),Z.started=D.now(),Z.startedTime=new Date,Z.prevState=M(v1()),Z.action=h1;var w1=void 0;if(K)try{w1=l1(h1)}catch(u1){Z.error=O(u1)}else w1=l1(h1);Z.took=D.now()-Z.started,Z.nextState=M(v1());var Q1=b.diff&&typeof A=="function"?A(v1,h1):b.diff;if(w(n1,Object.assign({},b,{diff:Q1})),n1.length=0,Z.error)throw Z.error;return w1}}}}var N,k,W=function(x,b){return new Array(b+1).join(x)},J=function(x,b){return W("0",b-x.toString().length)+x},U=function(x){return J(x.getHours(),2)+":"+J(x.getMinutes(),2)+":"+J(x.getSeconds(),2)+"."+J(x.getMilliseconds(),3)},D=typeof performance!="undefined"&&performance!==null&&typeof performance.now=="function"?performance:Date,_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},$=function(x){if(Array.isArray(x)){for(var b=0,C=Array(x.length);b0&&arguments[0]!==void 0?arguments[0]:{},b=x.dispatch,C=x.getState;return typeof b=="function"||typeof C=="function"?L()({dispatch:b,getState:C}):void console.error(` +[redux-logger v3] BREAKING CHANGE +[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings. +[redux-logger v3] Change +[redux-logger v3] import createLogger from 'redux-logger' +[redux-logger v3] to +[redux-logger v3] import { createLogger } from 'redux-logger' +`)};e.defaults=t1,e.createLogger=L,e.logger=o1,e.default=o1,Object.defineProperty(e,"__esModule",{value:!0})})});var LC=E((e31,SC)=>{function DR(){this.__data__=[],this.size=0}SC.exports=DR});var z9=E((t31,EC)=>{function FR(e,t){return e===t||e!==e&&t!==t}EC.exports=FR});var Xn=E((n31,xC)=>{var BR=z9();function UR(e,t){for(var n=e.length;n--;)if(BR(e[n][0],t))return n;return-1}xC.exports=UR});var AC=E((r31,NC)=>{var jR=Xn(),GR=Array.prototype,qR=GR.splice;function WR(e){var t=this.__data__,n=jR(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():qR.call(t,n,1),--this.size,!0}NC.exports=WR});var bC=E((c31,wC)=>{var KR=Xn();function $R(e){var t=this.__data__,n=KR(t,e);return n<0?void 0:t[n][1]}wC.exports=$R});var _C=E((a31,kC)=>{var YR=Xn();function QR(e){return YR(this.__data__,e)>-1}kC.exports=QR});var OC=E((i31,PC)=>{var XR=Xn();function JR(e,t){var n=this.__data__,r=XR(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}PC.exports=JR});var Jn=E((s31,RC)=>{var ZR=LC(),eI=AC(),tI=bC(),nI=_C(),rI=OC();function K0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{var cI=Jn();function aI(){this.__data__=new cI,this.size=0}IC.exports=aI});var BC=E((l31,FC)=>{function iI(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}FC.exports=iI});var jC=E((f31,UC)=>{function sI(e){return this.__data__.get(e)}UC.exports=sI});var qC=E((u31,GC)=>{function oI(e){return this.__data__.has(e)}GC.exports=oI});var KC=E((m31,WC)=>{var lI=k3(),fI=lI["__core-js_shared__"];WC.exports=fI});var QC=E((p31,YC)=>{var y9=KC(),$C=function(){var e=/[^.]+$/.exec(y9&&y9.keys&&y9.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uI(e){return!!$C&&$C in e}YC.exports=uI});var T9=E((d31,XC)=>{var mI=Function.prototype,pI=mI.toString;function dI(e){if(e!=null){try{return pI.call(e)}catch(t){}try{return e+""}catch(t){}}return""}XC.exports=dI});var ZC=E((h31,JC)=>{var hI=mc(),vI=QC(),gI=Kn(),CI=T9(),HI=/[\\^$.*+?()[\]{}|]/g,MI=/^\[object .+?Constructor\]$/,zI=Function.prototype,yI=Object.prototype,TI=zI.toString,VI=yI.hasOwnProperty,SI=RegExp("^"+TI.call(VI).replace(HI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function LI(e){if(!gI(e)||vI(e))return!1;var t=hI(e)?SI:MI;return t.test(CI(e))}JC.exports=LI});var tH=E((v31,eH)=>{function EI(e,t){return e==null?void 0:e[t]}eH.exports=EI});var k6=E((g31,nH)=>{var xI=ZC(),NI=tH();function AI(e,t){var n=NI(e,t);return xI(n)?n:void 0}nH.exports=AI});var Tc=E((C31,rH)=>{var wI=k6(),bI=k3(),kI=wI(bI,"Map");rH.exports=kI});var Zn=E((H31,cH)=>{var _I=k6(),PI=_I(Object,"create");cH.exports=PI});var sH=E((M31,iH)=>{var aH=Zn();function OI(){this.__data__=aH?aH(null):{},this.size=0}iH.exports=OI});var lH=E((z31,oH)=>{function RI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}oH.exports=RI});var uH=E((y31,fH)=>{var II=Zn(),DI="__lodash_hash_undefined__",FI=Object.prototype,BI=FI.hasOwnProperty;function UI(e){var t=this.__data__;if(II){var n=t[e];return n===DI?void 0:n}return BI.call(t,e)?t[e]:void 0}fH.exports=UI});var pH=E((T31,mH)=>{var jI=Zn(),GI=Object.prototype,qI=GI.hasOwnProperty;function WI(e){var t=this.__data__;return jI?t[e]!==void 0:qI.call(t,e)}mH.exports=WI});var hH=E((V31,dH)=>{var KI=Zn(),$I="__lodash_hash_undefined__";function YI(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=KI&&t===void 0?$I:t,this}dH.exports=YI});var gH=E((S31,vH)=>{var QI=sH(),XI=lH(),JI=uH(),ZI=pH(),eD=hH();function $0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{var CH=gH(),tD=Jn(),nD=Tc();function rD(){this.size=0,this.__data__={hash:new CH,map:new(nD||tD),string:new CH}}HH.exports=rD});var yH=E((E31,zH)=>{function cD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}zH.exports=cD});var e8=E((x31,TH)=>{var aD=yH();function iD(e,t){var n=e.__data__;return aD(t)?n[typeof t=="string"?"string":"hash"]:n.map}TH.exports=iD});var SH=E((N31,VH)=>{var sD=e8();function oD(e){var t=sD(this,e).delete(e);return this.size-=t?1:0,t}VH.exports=oD});var EH=E((A31,LH)=>{var lD=e8();function fD(e){return lD(this,e).get(e)}LH.exports=fD});var NH=E((w31,xH)=>{var uD=e8();function mD(e){return uD(this,e).has(e)}xH.exports=mD});var wH=E((b31,AH)=>{var pD=e8();function dD(e,t){var n=pD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}AH.exports=dD});var Vc=E((k31,bH)=>{var hD=MH(),vD=SH(),gD=EH(),CD=NH(),HD=wH();function Y0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{var MD=Jn(),zD=Tc(),yD=Vc(),TD=200;function VD(e,t){var n=this.__data__;if(n instanceof MD){var r=n.__data__;if(!zD||r.length{var SD=Jn(),LD=DC(),ED=BC(),xD=jC(),ND=qC(),AD=_H();function Q0(e){var t=this.__data__=new SD(e);this.size=t.size}Q0.prototype.clear=LD;Q0.prototype.delete=ED;Q0.prototype.get=xD;Q0.prototype.has=ND;Q0.prototype.set=AD;PH.exports=Q0});var RH=E((O31,OH)=>{var wD="__lodash_hash_undefined__";function bD(e){return this.__data__.set(e,wD),this}OH.exports=bD});var DH=E((R31,IH)=>{function kD(e){return this.__data__.has(e)}IH.exports=kD});var BH=E((I31,FH)=>{var _D=Vc(),PD=RH(),OD=DH();function Sc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _D;++t{function RD(e,t){for(var n=-1,r=e==null?0:e.length;++n{function ID(e,t){return e.has(t)}GH.exports=ID});var S9=E((B31,WH)=>{var DD=BH(),FD=jH(),BD=qH(),UD=1,jD=2;function GD(e,t,n,r,c,a){var i=n&UD,s=e.length,o=t.length;if(s!=o&&!(i&&o>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var m=-1,p=!0,h=n&jD?new DD:void 0;for(a.set(e,t),a.set(t,e);++m{var qD=k3(),WD=qD.Uint8Array;KH.exports=WD});var QH=E((j31,YH)=>{function KD(e){var t=-1,n=Array(e.size);return e.forEach(function(r,c){n[++t]=[c,r]}),n}YH.exports=KD});var JH=E((G31,XH)=>{function $D(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}XH.exports=$D});var rM=E((q31,nM)=>{var ZH=qn(),eM=$H(),YD=z9(),QD=S9(),XD=QH(),JD=JH(),ZD=1,eF=2,tF="[object Boolean]",nF="[object Date]",rF="[object Error]",cF="[object Map]",aF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",lF="[object Symbol]",fF="[object ArrayBuffer]",uF="[object DataView]",tM=ZH?ZH.prototype:void 0,L9=tM?tM.valueOf:void 0;function mF(e,t,n,r,c,a,i){switch(n){case uF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fF:return!(e.byteLength!=t.byteLength||!a(new eM(e),new eM(t)));case tF:case nF:case aF:return YD(+e,+t);case rF:return e.name==t.name&&e.message==t.message;case iF:case oF:return e==t+"";case cF:var s=XD;case sF:var o=r&ZD;if(s||(s=JD),e.size!=t.size&&!o)return!1;var l=i.get(e);if(l)return l==t;r|=eF,i.set(e,t);var f=QD(s(e),s(t),r,c,a,i);return i.delete(e),f;case lF:if(L9)return L9.call(e)==L9.call(t)}return!1}nM.exports=mF});var aM=E((W31,cM)=>{function pF(e,t){for(var n=-1,r=t.length,c=e.length;++n{var dF=Array.isArray;iM.exports=dF});var oM=E(($31,sM)=>{var hF=aM(),vF=p4();function gF(e,t,n){var r=t(e);return vF(e)?r:hF(r,n(e))}sM.exports=gF});var E9=E((Y31,lM)=>{function CF(e,t){for(var n=-1,r=e==null?0:e.length,c=0,a=[];++n{function HF(){return[]}fM.exports=HF});var dM=E((X31,pM)=>{var MF=E9(),zF=uM(),yF=Object.prototype,TF=yF.propertyIsEnumerable,mM=Object.getOwnPropertySymbols,VF=mM?function(e){return e==null?[]:(e=Object(e),MF(mM(e),function(t){return TF.call(e,t)}))}:zF;pM.exports=VF});var vM=E((J31,hM)=>{function SF(e,t){for(var n=-1,r=Array(e);++n{function LF(e){return e!=null&&typeof e=="object"}gM.exports=LF});var HM=E((ee1,CM)=>{var EF=B0(),xF=X0(),NF="[object Arguments]";function AF(e){return xF(e)&&EF(e)==NF}CM.exports=AF});var Lc=E((te1,yM)=>{var MM=HM(),wF=X0(),zM=Object.prototype,bF=zM.hasOwnProperty,kF=zM.propertyIsEnumerable,_F=MM(function(){return arguments}())?MM:function(e){return wF(e)&&bF.call(e,"callee")&&!kF.call(e,"callee")};yM.exports=_F});var VM=E((ne1,TM)=>{function PF(){return!1}TM.exports=PF});var Ec=E((t8,J0)=>{var OF=k3(),RF=VM(),EM=typeof t8=="object"&&t8&&!t8.nodeType&&t8,SM=EM&&typeof J0=="object"&&J0&&!J0.nodeType&&J0,IF=SM&&SM.exports===EM,LM=IF?OF.Buffer:void 0,DF=LM?LM.isBuffer:void 0,FF=DF||RF;J0.exports=FF});var x9=E((re1,xM)=>{var BF=9007199254740991,UF=/^(?:0|[1-9]\d*)$/;function jF(e,t){var n=typeof e;return t=t==null?BF:t,!!t&&(n=="number"||n!="symbol"&&UF.test(e))&&e>-1&&e%1==0&&e{var GF=9007199254740991;function qF(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=GF}NM.exports=qF});var wM=E((ae1,AM)=>{var WF=B0(),KF=xc(),$F=X0(),YF="[object Arguments]",QF="[object Array]",XF="[object Boolean]",JF="[object Date]",ZF="[object Error]",eB="[object Function]",tB="[object Map]",nB="[object Number]",rB="[object Object]",cB="[object RegExp]",aB="[object Set]",iB="[object String]",sB="[object WeakMap]",oB="[object ArrayBuffer]",lB="[object DataView]",fB="[object Float32Array]",uB="[object Float64Array]",mB="[object Int8Array]",pB="[object Int16Array]",dB="[object Int32Array]",hB="[object Uint8Array]",vB="[object Uint8ClampedArray]",gB="[object Uint16Array]",CB="[object Uint32Array]",a2={};a2[fB]=a2[uB]=a2[mB]=a2[pB]=a2[dB]=a2[hB]=a2[vB]=a2[gB]=a2[CB]=!0;a2[YF]=a2[QF]=a2[oB]=a2[XF]=a2[lB]=a2[JF]=a2[ZF]=a2[eB]=a2[tB]=a2[nB]=a2[rB]=a2[cB]=a2[aB]=a2[iB]=a2[sB]=!1;function HB(e){return $F(e)&&KF(e.length)&&!!a2[WF(e)]}AM.exports=HB});var N9=E((ie1,bM)=>{function MB(e){return function(t){return e(t)}}bM.exports=MB});var _M=E((n8,Z0)=>{var zB=Qo(),kM=typeof n8=="object"&&n8&&!n8.nodeType&&n8,r8=kM&&typeof Z0=="object"&&Z0&&!Z0.nodeType&&Z0,yB=r8&&r8.exports===kM,A9=yB&&zB.process,TB=function(){try{var e=r8&&r8.require&&r8.require("util").types;return e||A9&&A9.binding&&A9.binding("util")}catch(t){}}();Z0.exports=TB});var Nc=E((se1,RM)=>{var VB=wM(),SB=N9(),PM=_M(),OM=PM&&PM.isTypedArray,LB=OM?SB(OM):VB;RM.exports=LB});var DM=E((oe1,IM)=>{var EB=vM(),xB=Lc(),NB=p4(),AB=Ec(),wB=x9(),bB=Nc(),kB=Object.prototype,_B=kB.hasOwnProperty;function PB(e,t){var n=NB(e),r=!n&&xB(e),c=!n&&!r&&AB(e),a=!n&&!r&&!c&&bB(e),i=n||r||c||a,s=i?EB(e.length,String):[],o=s.length;for(var l in e)(t||_B.call(e,l))&&!(i&&(l=="length"||c&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||wB(l,o)))&&s.push(l);return s}IM.exports=PB});var w9=E((le1,FM)=>{var OB=Object.prototype;function RB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||OB;return e===n}FM.exports=RB});var UM=E((fe1,BM)=>{function IB(e,t){return function(n){return e(t(n))}}BM.exports=IB});var GM=E((ue1,jM)=>{var DB=UM(),FB=DB(Object.keys,Object);jM.exports=FB});var b9=E((me1,qM)=>{var BB=w9(),UB=GM(),jB=Object.prototype,GB=jB.hasOwnProperty;function qB(e){if(!BB(e))return UB(e);var t=[];for(var n in Object(e))GB.call(e,n)&&n!="constructor"&&t.push(n);return t}qM.exports=qB});var et=E((pe1,WM)=>{var WB=mc(),KB=xc();function $B(e){return e!=null&&KB(e.length)&&!WB(e)}WM.exports=$B});var tt=E((de1,KM)=>{var YB=DM(),QB=b9(),XB=et();function JB(e){return XB(e)?YB(e):QB(e)}KM.exports=JB});var YM=E((he1,$M)=>{var ZB=oM(),eU=dM(),tU=tt();function nU(e){return ZB(e,tU,eU)}$M.exports=nU});var JM=E((ve1,XM)=>{var QM=YM(),rU=1,cU=Object.prototype,aU=cU.hasOwnProperty;function iU(e,t,n,r,c,a){var i=n&rU,s=QM(e),o=s.length,l=QM(t),f=l.length;if(o!=f&&!i)return!1;for(var m=o;m--;){var p=s[m];if(!(i?p in t:aU.call(t,p)))return!1}var h=a.get(e),v=a.get(t);if(h&&v)return h==t&&v==e;var H=!0;a.set(e,t),a.set(t,e);for(var y=i;++m{var sU=k6(),oU=k3(),lU=sU(oU,"DataView");ZM.exports=lU});var nz=E((Ce1,tz)=>{var fU=k6(),uU=k3(),mU=fU(uU,"Promise");tz.exports=mU});var cz=E((He1,rz)=>{var pU=k6(),dU=k3(),hU=pU(dU,"Set");rz.exports=hU});var iz=E((Me1,az)=>{var vU=k6(),gU=k3(),CU=vU(gU,"WeakMap");az.exports=CU});var I9=E((ze1,pz)=>{var k9=ez(),_9=Tc(),P9=nz(),O9=cz(),R9=iz(),mz=B0(),nt=T9(),sz="[object Map]",HU="[object Object]",oz="[object Promise]",lz="[object Set]",fz="[object WeakMap]",uz="[object DataView]",MU=nt(k9),zU=nt(_9),yU=nt(P9),TU=nt(O9),VU=nt(R9),_6=mz;(k9&&_6(new k9(new ArrayBuffer(1)))!=uz||_9&&_6(new _9)!=sz||P9&&_6(P9.resolve())!=oz||O9&&_6(new O9)!=lz||R9&&_6(new R9)!=fz)&&(_6=function(e){var t=mz(e),n=t==HU?e.constructor:void 0,r=n?nt(n):"";if(r)switch(r){case MU:return uz;case zU:return sz;case yU:return oz;case TU:return lz;case VU:return fz}return t});pz.exports=_6});var zz=E((ye1,Mz)=>{var D9=V9(),SU=S9(),LU=rM(),EU=JM(),dz=I9(),hz=p4(),vz=Ec(),xU=Nc(),NU=1,gz="[object Arguments]",Cz="[object Array]",Ac="[object Object]",AU=Object.prototype,Hz=AU.hasOwnProperty;function wU(e,t,n,r,c,a){var i=hz(e),s=hz(t),o=i?Cz:dz(e),l=s?Cz:dz(t);o=o==gz?Ac:o,l=l==gz?Ac:l;var f=o==Ac,m=l==Ac,p=o==l;if(p&&vz(e)){if(!vz(t))return!1;i=!0,f=!1}if(p&&!f)return a||(a=new D9),i||xU(e)?SU(e,t,n,r,c,a):LU(e,t,o,n,r,c,a);if(!(n&NU)){var h=f&&Hz.call(e,"__wrapped__"),v=m&&Hz.call(t,"__wrapped__");if(h||v){var H=h?e.value():e,y=v?t.value():t;return a||(a=new D9),c(H,y,n,r,a)}}return p?(a||(a=new D9),EU(e,t,n,r,c,a)):!1}Mz.exports=wU});var F9=E((Te1,Vz)=>{var bU=zz(),yz=X0();function Tz(e,t,n,r,c){return e===t?!0:e==null||t==null||!yz(e)&&!yz(t)?e!==e&&t!==t:bU(e,t,n,r,Tz,c)}Vz.exports=Tz});var Lz=E((Ve1,Sz)=>{var kU=V9(),_U=F9(),PU=1,OU=2;function RU(e,t,n,r){var c=n.length,a=c,i=!r;if(e==null)return!a;for(e=Object(e);c--;){var s=n[c];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++c{var IU=Kn();function DU(e){return e===e&&!IU(e)}Ez.exports=DU});var Nz=E((Le1,xz)=>{var FU=B9(),BU=tt();function UU(e){for(var t=BU(e),n=t.length;n--;){var r=t[n],c=e[r];t[n]=[r,c,FU(c)]}return t}xz.exports=UU});var U9=E((Ee1,Az)=>{function jU(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}Az.exports=jU});var bz=E((xe1,wz)=>{var GU=Lz(),qU=Nz(),WU=U9();function KU(e){var t=qU(e);return t.length==1&&t[0][2]?WU(t[0][0],t[0][1]):function(n){return n===e||GU(n,e,t)}}wz.exports=KU});var rt=E((Ne1,kz)=>{var $U=B0(),YU=X0(),QU="[object Symbol]";function XU(e){return typeof e=="symbol"||YU(e)&&$U(e)==QU}kz.exports=XU});var wc=E((Ae1,_z)=>{var JU=p4(),ZU=rt(),ej=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tj=/^\w*$/;function nj(e,t){if(JU(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ZU(e)?!0:tj.test(e)||!ej.test(e)||t!=null&&e in Object(t)}_z.exports=nj});var Rz=E((we1,Oz)=>{var Pz=Vc(),rj="Expected a function";function j9(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rj);var n=function(){var r=arguments,c=t?t.apply(this,r):r[0],a=n.cache;if(a.has(c))return a.get(c);var i=e.apply(this,r);return n.cache=a.set(c,i)||a,i};return n.cache=new(j9.Cache||Pz),n}j9.Cache=Pz;Oz.exports=j9});var Dz=E((be1,Iz)=>{var cj=Rz(),aj=500;function ij(e){var t=cj(e,function(r){return n.size===aj&&n.clear(),r}),n=t.cache;return t}Iz.exports=ij});var Bz=E((ke1,Fz)=>{var sj=Dz(),oj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lj=/\\(\\)?/g,fj=sj(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(oj,function(n,r,c,a){t.push(c?a.replace(lj,"$1"):r||n)}),t});Fz.exports=fj});var c8=E((_e1,Uz)=>{function uj(e,t){for(var n=-1,r=e==null?0:e.length,c=Array(r);++n{var jz=qn(),mj=c8(),pj=p4(),dj=rt(),hj=1/0,Gz=jz?jz.prototype:void 0,qz=Gz?Gz.toString:void 0;function Wz(e){if(typeof e=="string")return e;if(pj(e))return mj(e,Wz)+"";if(dj(e))return qz?qz.call(e):"";var t=e+"";return t=="0"&&1/e==-hj?"-0":t}Kz.exports=Wz});var Qz=E((Oe1,Yz)=>{var vj=$z();function gj(e){return e==null?"":vj(e)}Yz.exports=gj});var G9=E((Re1,Xz)=>{var Cj=p4(),Hj=wc(),Mj=Bz(),zj=Qz();function yj(e,t){return Cj(e)?e:Hj(e,t)?[e]:Mj(zj(e))}Xz.exports=yj});var a8=E((Ie1,Jz)=>{var Tj=rt(),Vj=1/0;function Sj(e){if(typeof e=="string"||Tj(e))return e;var t=e+"";return t=="0"&&1/e==-Vj?"-0":t}Jz.exports=Sj});var bc=E((De1,Zz)=>{var Lj=G9(),Ej=a8();function xj(e,t){t=Lj(t,e);for(var n=0,r=t.length;e!=null&&n{var Nj=bc();function Aj(e,t,n){var r=e==null?void 0:Nj(e,t);return r===void 0?n:r}ey.exports=Aj});var ry=E((Be1,ny)=>{function wj(e,t){return e!=null&&t in Object(e)}ny.exports=wj});var ay=E((Ue1,cy)=>{var bj=G9(),kj=Lc(),_j=p4(),Pj=x9(),Oj=xc(),Rj=a8();function Ij(e,t,n){t=bj(t,e);for(var r=-1,c=t.length,a=!1;++r{var Dj=ry(),Fj=ay();function Bj(e,t){return e!=null&&Fj(e,t,Dj)}iy.exports=Bj});var ly=E((Ge1,oy)=>{var Uj=F9(),jj=ty(),Gj=sy(),qj=wc(),Wj=B9(),Kj=U9(),$j=a8(),Yj=1,Qj=2;function Xj(e,t){return qj(e)&&Wj(t)?Kj($j(e),t):function(n){var r=jj(n,e);return r===void 0&&r===t?Gj(n,e):Uj(t,r,Yj|Qj)}}oy.exports=Xj});var q9=E((qe1,fy)=>{function Jj(e){return e}fy.exports=Jj});var my=E((We1,uy)=>{function Zj(e){return function(t){return t==null?void 0:t[e]}}uy.exports=Zj});var dy=E((Ke1,py)=>{var eG=bc();function tG(e){return function(t){return eG(t,e)}}py.exports=tG});var vy=E(($e1,hy)=>{var nG=my(),rG=dy(),cG=wc(),aG=a8();function iG(e){return cG(e)?nG(aG(e)):rG(e)}hy.exports=iG});var ct=E((Ye1,gy)=>{var sG=bz(),oG=ly(),lG=q9(),fG=p4(),uG=vy();function mG(e){return typeof e=="function"?e:e==null?lG:typeof e=="object"?fG(e)?oG(e[0],e[1]):sG(e):uG(e)}gy.exports=mG});var Hy=E((Qe1,Cy)=>{var pG=ct(),dG=et(),hG=tt();function vG(e){return function(t,n,r){var c=Object(t);if(!dG(t)){var a=pG(n,3);t=hG(t),n=function(s){return a(c[s],s,c)}}var i=e(t,n,r);return i>-1?c[a?t[i]:i]:void 0}}Cy.exports=vG});var zy=E((Xe1,My)=>{function gG(e,t,n,r){for(var c=e.length,a=n+(r?1:-1);r?a--:++a{var CG=/\s/;function HG(e){for(var t=e.length;t--&&CG.test(e.charAt(t)););return t}yy.exports=HG});var Sy=E((Ze1,Vy)=>{var MG=Ty(),zG=/^\s+/;function yG(e){return e&&e.slice(0,MG(e)+1).replace(zG,"")}Vy.exports=yG});var Ny=E((e61,xy)=>{var TG=Sy(),Ly=Kn(),VG=rt(),Ey=0/0,SG=/^[-+]0x[0-9a-f]+$/i,LG=/^0b[01]+$/i,EG=/^0o[0-7]+$/i,xG=parseInt;function NG(e){if(typeof e=="number")return e;if(VG(e))return Ey;if(Ly(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ly(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=TG(e);var n=LG.test(e);return n||EG.test(e)?xG(e.slice(2),n?2:8):SG.test(e)?Ey:+e}xy.exports=NG});var by=E((t61,wy)=>{var AG=Ny(),Ay=1/0,wG=17976931348623157e292;function bG(e){if(!e)return e===0?e:0;if(e=AG(e),e===Ay||e===-Ay){var t=e<0?-1:1;return t*wG}return e===e?e:0}wy.exports=bG});var _y=E((n61,ky)=>{var kG=by();function _G(e){var t=kG(e),n=t%1;return t===t?n?t-n:t:0}ky.exports=_G});var Oy=E((r61,Py)=>{var PG=zy(),OG=ct(),RG=_y(),IG=Math.max;function DG(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var c=n==null?0:RG(n);return c<0&&(c=IG(r+c,0)),PG(e,OG(t,3),c)}Py.exports=DG});var i8=E((c61,Ry)=>{var FG=Hy(),BG=Oy(),UG=FG(BG);Ry.exports=UG});var at=E((W9,K9)=>{(function(e,t){typeof W9=="object"&&typeof K9!="undefined"?K9.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self).dayjs=t()})(W9,function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",c="second",a="minute",i="hour",s="day",o="week",l="month",f="quarter",m="year",p="date",h="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},d=function(U,D,_){var $=String(U);return!$||$.length>=D?U:""+Array(D+1-$.length).join(_)+U},g={s:d,z:function(U){var D=-U.utcOffset(),_=Math.abs(D),$=Math.floor(_/60),B=_%60;return(D<=0?"+":"-")+d($,2,"0")+":"+d(B,2,"0")},m:function U(D,_){if(D.date()<_.date())return-U(_,D);var $=12*(_.year()-D.year())+(_.month()-D.month()),B=D.clone().add($,l),i1=_-B<0,t1=D.clone().add($+(i1?-1:1),l);return+(-($+(_-B)/(i1?B-t1:t1-B))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:l,y:m,w:o,d:s,D:p,h:i,m:a,s:c,ms:r,Q:f}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},z="en",S={};S[z]=y;var w=function(U){return U instanceof W},L=function U(D,_,$){var B;if(!D)return z;if(typeof D=="string"){var i1=D.toLowerCase();S[i1]&&(B=i1),_&&(S[i1]=_,B=i1);var t1=D.split("-");if(!B&&t1.length>1)return U(t1[0])}else{var o1=D.name;S[o1]=D,B=o1}return!$&&B&&(z=B),B||!$&&z},N=function(U,D){if(w(U))return U.clone();var _=typeof D=="object"?D:{};return _.date=U,_.args=arguments,new W(_)},k=g;k.l=L,k.i=w,k.w=function(U,D){return N(U,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var W=function(){function U(_){this.$L=L(_.locale,null,!0),this.parse(_)}var D=U.prototype;return D.parse=function(_){this.$d=function($){var B=$.date,i1=$.utc;if(B===null)return new Date(NaN);if(k.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var t1=B.match(v);if(t1){var o1=t1[2]-1||0,x=(t1[7]||"0").substring(0,3);return i1?new Date(Date.UTC(t1[1],o1,t1[3]||1,t1[4]||0,t1[5]||0,t1[6]||0,x)):new Date(t1[1],o1,t1[3]||1,t1[4]||0,t1[5]||0,t1[6]||0,x)}}return new Date(B)}(_),this.$x=_.x||{},this.init()},D.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},D.$utils=function(){return k},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(_,$){var B=N(_);return this.startOf($)<=B&&B<=this.endOf($)},D.isAfter=function(_,$){return N(_){function jG(e){return function(t,n,r){for(var c=-1,a=Object(t),i=r(t),s=i.length;s--;){var o=i[e?s:++c];if(n(a[o],o,a)===!1)break}return t}}Iy.exports=jG});var By=E((s61,Fy)=>{var GG=Dy(),qG=GG();Fy.exports=qG});var jy=E((o61,Uy)=>{var WG=By(),KG=tt();function $G(e,t){return e&&WG(e,t,KG)}Uy.exports=$G});var qy=E((l61,Gy)=>{var YG=et();function QG(e,t){return function(n,r){if(n==null)return n;if(!YG(n))return e(n,r);for(var c=n.length,a=t?c:-1,i=Object(n);(t?a--:++a{var XG=jy(),JG=qy(),ZG=JG(XG);Wy.exports=ZG});var $y=E((u61,Ky)=>{var eq=$9();function tq(e,t){var n=[];return eq(e,function(r,c,a){t(r,c,a)&&n.push(r)}),n}Ky.exports=tq});var _c=E((m61,Yy)=>{var nq=E9(),rq=$y(),cq=ct(),aq=p4();function iq(e,t){var n=aq(e)?nq:rq;return n(e,cq(t,3))}Yy.exports=iq});var Y9=E((g61,tT)=>{var oq=$9(),lq=et();function fq(e,t){var n=-1,r=lq(e)?Array(e.length):[];return oq(e,function(c,a,i){r[++n]=t(c,a,i)}),r}tT.exports=fq});var rT=E((C61,nT)=>{var uq=c8(),mq=ct(),pq=Y9(),dq=p4();function hq(e,t){var n=dq(e)?uq:pq;return n(e,mq(t,3))}nT.exports=hq});var aT=E((H61,cT)=>{function vq(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}cT.exports=vq});var oT=E((M61,sT)=>{var iT=rt();function gq(e,t){if(e!==t){var n=e!==void 0,r=e===null,c=e===e,a=iT(e),i=t!==void 0,s=t===null,o=t===t,l=iT(t);if(!s&&!l&&!a&&e>t||a&&i&&o&&!s&&!l||r&&i&&o||!n&&o||!c)return 1;if(!r&&!a&&!l&&e{var Cq=oT();function Hq(e,t,n){for(var r=-1,c=e.criteria,a=t.criteria,i=c.length,s=n.length;++r=s)return o;var l=n[r];return o*(l=="desc"?-1:1)}}return e.index-t.index}lT.exports=Hq});var mT=E((y61,uT)=>{var Q9=c8(),Mq=bc(),zq=ct(),yq=Y9(),Tq=aT(),Vq=N9(),Sq=fT(),Lq=q9(),Eq=p4();function xq(e,t,n){t.length?t=Q9(t,function(a){return Eq(a)?function(i){return Mq(i,a.length===1?a[0]:a)}:a}):t=[Lq];var r=-1;t=Q9(t,Vq(zq));var c=yq(e,function(a,i,s){var o=Q9(t,function(l){return l(a)});return{criteria:o,index:++r,value:a}});return Tq(c,function(a,i){return Sq(a,i,n)})}uT.exports=xq});var hT=E((T61,dT)=>{var Nq=mT(),pT=p4();function Aq(e,t,n,r){return e==null?[]:(pT(t)||(t=t==null?[]:[t]),n=r?void 0:n,pT(n)||(n=n==null?[]:[n]),Nq(e,t,n))}dT.exports=Aq});var yT=E((E61,zT)=>{var wq=c8();function bq(e,t){return wq(t,function(n){return e[n]})}zT.exports=bq});var VT=E((x61,TT)=>{var kq=yT(),_q=tt();function Pq(e){return e==null?[]:kq(e,_q(e))}TT.exports=Pq});var KT=E(w4=>{"use strict";Object.defineProperty(w4,"__esModule",{value:!0});var BT="far",UT="clock",jT=512,GT=512,nl=[128339,"clock-four"],qT="f017",WT="M232 120C232 106.7 242.7 96 256 96C269.3 96 280 106.7 280 120V243.2L365.3 300C376.3 307.4 379.3 322.3 371.1 333.3C364.6 344.3 349.7 347.3 338.7 339.1L242.7 275.1C236 271.5 232 264 232 255.1L232 120zM256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48C141.1 48 48 141.1 48 256z";w4.definition={prefix:BT,iconName:UT,icon:[jT,GT,nl,qT,WT]};w4.faClock=w4.definition;w4.prefix=BT;w4.iconName=UT;w4.width=jT;w4.height=GT;w4.ligatures=nl;w4.unicode=qT;w4.svgPathData=WT;w4.aliases=nl});var tV=E(b4=>{"use strict";Object.defineProperty(b4,"__esModule",{value:!0});var YT="fas",QT="caret-down",XT=320,JT=512,rl=[],ZT="f0d7",eV="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z";b4.definition={prefix:YT,iconName:QT,icon:[XT,JT,rl,ZT,eV]};b4.faCaretDown=b4.definition;b4.prefix=YT;b4.iconName=QT;b4.width=XT;b4.height=JT;b4.ligatures=rl;b4.unicode=ZT;b4.svgPathData=eV;b4.aliases=rl});var oV=E(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});var nV="fas",rV="caret-right",cV=256,aV=512,cl=[],iV="f0da",sV="M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z";k4.definition={prefix:nV,iconName:rV,icon:[cV,aV,cl,iV,sV]};k4.faCaretRight=k4.definition;k4.prefix=nV;k4.iconName=rV;k4.width=cV;k4.height=aV;k4.ligatures=cl;k4.unicode=iV;k4.svgPathData=sV;k4.aliases=cl});var hV=E(_4=>{"use strict";Object.defineProperty(_4,"__esModule",{value:!0});var lV="fas",fV="download",uV=512,mV=512,al=[],pV="f019",dV="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zM432 456c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24z";_4.definition={prefix:lV,iconName:fV,icon:[uV,mV,al,pV,dV]};_4.faDownload=_4.definition;_4.prefix=lV;_4.iconName=fV;_4.width=uV;_4.height=mV;_4.ligatures=al;_4.unicode=pV;_4.svgPathData=dV;_4.aliases=al});var vV=E((il,sl)=>{(function(e,t){typeof il=="object"&&typeof sl!="undefined"?sl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self).dayjs_plugin_relativeTime=t()})(il,function(){"use strict";return function(e,t,n){e=e||{};var r=t.prototype,c={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(s,o,l,f){return r.fromToBase(s,o,l,f)}n.en.relativeTime=c,r.fromToBase=function(s,o,l,f,m){for(var p,h,v,H=l.$locale().relativeTime||c,y=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],d=y.length,g=0;g0,S<=z.r||!z.r){S<=1&&g>0&&(z=y[g-1]);var w=H[z.l];m&&(S=m(""+S)),h=typeof w=="string"?w.replace("%d",S):w(S,o,z.l,v);break}}if(o)return h;var L=v?H.future:H.past;return typeof L=="function"?L(h):L.replace("%s",h)},r.to=function(s,o){return a(s,o,this,!0)},r.from=function(s,o){return a(s,o,this)};var i=function(s){return s.$u?n.utc():n()};r.toNow=function(s){return this.to(i(this),s)},r.fromNow=function(s){return this.from(i(this),s)}}})});var CV=E((_01,gV)=>{var Kq=b9(),$q=I9(),Yq=Lc(),Qq=p4(),Xq=et(),Jq=Ec(),Zq=w9(),eW=Nc(),tW="[object Map]",nW="[object Set]",rW=Object.prototype,cW=rW.hasOwnProperty;function aW(e){if(e==null)return!0;if(Xq(e)&&(Qq(e)||typeof e=="string"||typeof e.splice=="function"||Jq(e)||eW(e)||Yq(e)))return!e.length;var t=$q(e);if(t==tW||t==nW)return!e.size;if(Zq(e))return!Kq(e).length;for(var n in e)if(cW.call(e,n))return!1;return!0}gV.exports=aW});var ol=E((O01,zV)=>{zV.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var RV=E((et1,OV)=>{"use strict";var Ic=Object.prototype.hasOwnProperty,PV=Object.prototype.toString,NV=Object.defineProperty,AV=Object.getOwnPropertyDescriptor,wV=function(t){return typeof Array.isArray=="function"?Array.isArray(t):PV.call(t)==="[object Array]"},bV=function(t){if(!t||PV.call(t)!=="[object Object]")return!1;var n=Ic.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ic.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var c;for(c in t);return typeof c=="undefined"||Ic.call(t,c)},kV=function(t,n){NV&&n.name==="__proto__"?NV(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},_V=function(t,n){if(n==="__proto__")if(Ic.call(t,n)){if(AV)return AV(t,n).value}else return;return t[n]};OV.exports=function e(){var t,n,r,c,a,i,s=arguments[0],o=1,l=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});o{"use strict";var BS={};function XK(e){var t,n,r=BS[e];if(r)return r;for(r=BS[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&a<=57343){if(a>=55296&&a<=56319&&r+1=56320&&i<=57343)){o+=encodeURIComponent(e[r]+e[r+1]),r++;continue}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[r])}return o}na.defaultChars=";/?:@&=+$,-_.!~*'()#";na.componentChars="-_.!~*'()";US.exports=na});var HL=E(F1=>{"use strict";var Xl=Symbol.for("react.element"),Jl=Symbol.for("react.portal"),fa=Symbol.for("react.fragment"),ua=Symbol.for("react.strict_mode"),ma=Symbol.for("react.profiler"),pa=Symbol.for("react.provider"),da=Symbol.for("react.context"),g$=Symbol.for("react.server_context"),ha=Symbol.for("react.forward_ref"),va=Symbol.for("react.suspense"),ga=Symbol.for("react.suspense_list"),Ca=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy"),C$=Symbol.for("react.offscreen"),CL;CL=Symbol.for("react.module.reference");function Z4(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xl:switch(e=e.type,e){case fa:case ma:case ua:case va:case ga:return e;default:switch(e=e&&e.$$typeof,e){case g$:case da:case ha:case Ha:case Ca:case pa:return e;default:return t}}case Jl:return t}}}F1.ContextConsumer=da;F1.ContextProvider=pa;F1.Element=Xl;F1.ForwardRef=ha;F1.Fragment=fa;F1.Lazy=Ha;F1.Memo=Ca;F1.Portal=Jl;F1.Profiler=ma;F1.StrictMode=ua;F1.Suspense=va;F1.SuspenseList=ga;F1.isAsyncMode=function(){return!1};F1.isConcurrentMode=function(){return!1};F1.isContextConsumer=function(e){return Z4(e)===da};F1.isContextProvider=function(e){return Z4(e)===pa};F1.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xl};F1.isForwardRef=function(e){return Z4(e)===ha};F1.isFragment=function(e){return Z4(e)===fa};F1.isLazy=function(e){return Z4(e)===Ha};F1.isMemo=function(e){return Z4(e)===Ca};F1.isPortal=function(e){return Z4(e)===Jl};F1.isProfiler=function(e){return Z4(e)===ma};F1.isStrictMode=function(e){return Z4(e)===ua};F1.isSuspense=function(e){return Z4(e)===va};F1.isSuspenseList=function(e){return Z4(e)===ga};F1.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fa||e===ma||e===ua||e===va||e===ga||e===C$||typeof e=="object"&&e!==null&&(e.$$typeof===Ha||e.$$typeof===Ca||e.$$typeof===pa||e.$$typeof===da||e.$$typeof===ha||e.$$typeof===CL||e.getModuleId!==void 0)};F1.typeOf=Z4});var zL=E((ka1,ML)=>{"use strict";ML.exports=HL()});var AL=E((Ra1,NL)=>{var SL=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H$=/\n/g,M$=/^\s*/,z$=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,y$=/^:\s*/,T$=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V$=/^[;\s]*/,S$=/^\s+|\s+$/g,L$=` +`,LL="/",EL="*",U6="",E$="comment",x$="declaration";NL.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function c(H){var y=H.match(H$);y&&(n+=y.length);var d=H.lastIndexOf(L$);r=~d?H.length-d:r+H.length}function a(){var H={line:n,column:r};return function(y){return y.position=new i(H),f(),y}}function i(H){this.start=H,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var s=[];function o(H){var y=new Error(t.source+":"+n+":"+r+": "+H);if(y.reason=H,y.filename=t.source,y.line=n,y.column=r,y.source=e,t.silent)s.push(y);else throw y}function l(H){var y=H.exec(e);if(!!y){var d=y[0];return c(d),e=e.slice(d.length),y}}function f(){l(M$)}function m(H){var y;for(H=H||[];y=p();)y!==!1&&H.push(y);return H}function p(){var H=a();if(!(LL!=e.charAt(0)||EL!=e.charAt(1))){for(var y=2;U6!=e.charAt(y)&&(EL!=e.charAt(y)||LL!=e.charAt(y+1));)++y;if(y+=2,U6===e.charAt(y-1))return o("End of comment missing");var d=e.slice(2,y-2);return r+=2,c(d),e=e.slice(y),r+=2,H({type:E$,comment:d})}}function h(){var H=a(),y=l(z$);if(!!y){if(p(),!l(y$))return o("property missing ':'");var d=l(T$),g=H({type:x$,property:xL(y[0].replace(SL,U6)),value:d?xL(d[0].replace(SL,U6)):U6});return l(V$),g}}function v(){var H=[];m(H);for(var y;y=h();)y!==!1&&(H.push(y),m(H));return H}return f(),v()};function xL(e){return e?e.replace(S$,U6):U6}});var Zl=E((Ia1,wL)=>{var N$=AL();function A$(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,c=N$(e),a=typeof t=="function",i,s,o=0,l=c.length;o{"use strict";var D$=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];le.REPLACEMENT_CHARACTER="\uFFFD";le.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};le.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};le.isSurrogate=function(e){return e>=55296&&e<=57343};le.isSurrogatePair=function(e){return e>=56320&&e<=57343};le.getSurrogatePairCodePoint=function(e,t){return(e-55296)*1024+9216+t};le.isControlCodePoint=function(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159};le.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||D$.indexOf(e)>-1}});var Va=E((n71,PL)=>{"use strict";PL.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var RL=E((r71,OL)=>{"use strict";var pt=Ta(),rf=Va(),j6=pt.CODE_POINTS,F$=1<<16,cf=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=F$}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.lastCharPos){let n=this.html.charCodeAt(this.pos+1);if(pt.isSurrogatePair(n))return this.pos++,this._addGap(),pt.getSurrogatePairCodePoint(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,j6.EOF;return this._err(rf.surrogateInInputStream),t}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(t,n){this.html?this.html+=t:this.html=t,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,j6.EOF;let t=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&t===j6.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):t===j6.CARRIAGE_RETURN?(this.skipNextNewLine=!0,j6.LINE_FEED):(this.skipNextNewLine=!1,pt.isSurrogate(t)&&(t=this._processSurrogate(t)),t>31&&t<127||t===j6.LINE_FEED||t===j6.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){pt.isControlCodePoint(t)?this._err(rf.controlCharacterInInputStream):pt.isUndefinedCodePoint(t)&&this._err(rf.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};OL.exports=cf});var DL=E((c71,IL)=>{"use strict";IL.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var E8=E((a71,RE)=>{"use strict";var B$=RL(),j1=Ta(),W6=DL(),I=Va(),T=j1.CODE_POINTS,G6=j1.CODE_POINT_SEQUENCES,U$={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},wE=1<<0,bE=1<<1,kE=1<<2,j$=wE|bE|kE,S1="DATA_STATE",ht="RCDATA_STATE",S8="RAWTEXT_STATE",me="SCRIPT_DATA_STATE",_E="PLAINTEXT_STATE",FL="TAG_OPEN_STATE",BL="END_TAG_OPEN_STATE",af="TAG_NAME_STATE",UL="RCDATA_LESS_THAN_SIGN_STATE",jL="RCDATA_END_TAG_OPEN_STATE",GL="RCDATA_END_TAG_NAME_STATE",qL="RAWTEXT_LESS_THAN_SIGN_STATE",WL="RAWTEXT_END_TAG_OPEN_STATE",KL="RAWTEXT_END_TAG_NAME_STATE",$L="SCRIPT_DATA_LESS_THAN_SIGN_STATE",YL="SCRIPT_DATA_END_TAG_OPEN_STATE",QL="SCRIPT_DATA_END_TAG_NAME_STATE",XL="SCRIPT_DATA_ESCAPE_START_STATE",JL="SCRIPT_DATA_ESCAPE_START_DASH_STATE",C3="SCRIPT_DATA_ESCAPED_STATE",ZL="SCRIPT_DATA_ESCAPED_DASH_STATE",sf="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",Sa="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",eE="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",tE="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",nE="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",fe="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",rE="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",cE="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",La="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",aE="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",P3="BEFORE_ATTRIBUTE_NAME_STATE",Ea="ATTRIBUTE_NAME_STATE",of="AFTER_ATTRIBUTE_NAME_STATE",lf="BEFORE_ATTRIBUTE_VALUE_STATE",xa="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",Na="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",Aa="ATTRIBUTE_VALUE_UNQUOTED_STATE",ff="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",r6="SELF_CLOSING_START_TAG_STATE",z8="BOGUS_COMMENT_STATE",iE="MARKUP_DECLARATION_OPEN_STATE",sE="COMMENT_START_STATE",oE="COMMENT_START_DASH_STATE",c6="COMMENT_STATE",lE="COMMENT_LESS_THAN_SIGN_STATE",fE="COMMENT_LESS_THAN_SIGN_BANG_STATE",uE="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",mE="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",wa="COMMENT_END_DASH_STATE",ba="COMMENT_END_STATE",pE="COMMENT_END_BANG_STATE",dE="DOCTYPE_STATE",ka="BEFORE_DOCTYPE_NAME_STATE",_a="DOCTYPE_NAME_STATE",hE="AFTER_DOCTYPE_NAME_STATE",vE="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",gE="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",uf="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",mf="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",pf="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",CE="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",HE="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",ME="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",y8="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",T8="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",df="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",ue="BOGUS_DOCTYPE_STATE",Pa="CDATA_SECTION_STATE",zE="CDATA_SECTION_BRACKET_STATE",yE="CDATA_SECTION_END_STATE",dt="CHARACTER_REFERENCE_STATE",TE="NAMED_CHARACTER_REFERENCE_STATE",VE="AMBIGUOS_AMPERSAND_STATE",SE="NUMERIC_CHARACTER_REFERENCE_STATE",LE="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",EE="DECIMAL_CHARACTER_REFERENCE_START_STATE",xE="HEXADEMICAL_CHARACTER_REFERENCE_STATE",NE="DECIMAL_CHARACTER_REFERENCE_STATE",V8="NUMERIC_CHARACTER_REFERENCE_END_STATE";function i2(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function L8(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function H3(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function q6(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function i6(e){return q6(e)||H3(e)}function hf(e){return i6(e)||L8(e)}function PE(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_F}function OE(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_F}function G$(e){return L8(e)||PE(e)||OE(e)}function Oa(e){return e+32}function v2(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|e&1023))}function a6(e){return String.fromCharCode(Oa(e))}function AE(e,t){let n=W6[++e],r=++e,c=r+n-1;for(;r<=c;){let a=r+c>>>1,i=W6[a];if(it)c=a-1;else return W6[a+n]}return-1}var G1=class{constructor(){this.preprocessor=new B$,this.tokenQueue=[],this.allowCDATA=!1,this.state=S1,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(t){this._consume(),this._err(t),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()}write(t,n){this.active=!0,this.preprocessor.write(t,n)}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:G1.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(t){this.state=t,this._unconsume()}_consumeSequenceIfMatch(t,n,r){let c=0,a=!0,i=t.length,s=0,o=n,l;for(;s0&&(o=this._consume(),c++),o===T.EOF){a=!1;break}if(l=t[s],o!==l&&(r||o!==Oa(l))){a=!1;break}}if(!a)for(;c--;)this._unconsume();return a}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==G6.SCRIPT_STRING.length)return!1;for(let t=0;t0&&this._err(I.endTagWithAttributes),t.selfClosing&&this._err(I.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(t,n){this.currentCharacterToken&&this.currentCharacterToken.type!==t&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=n:this._createCharacterToken(t,n)}_emitCodePoint(t){let n=G1.CHARACTER_TOKEN;i2(t)?n=G1.WHITESPACE_CHARACTER_TOKEN:t===T.NULL&&(n=G1.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,v2(t))}_emitSeveralCodePoints(t){for(let n=0;n-1;){let a=W6[c],i=a")):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.state=C3,this._emitChars(j1.REPLACEMENT_CHARACTER)):t===T.EOF?(this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=C3,this._emitCodePoint(t))}[Sa](t){t===T.SOLIDUS?(this.tempBuff=[],this.state=eE):i6(t)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(nE)):(this._emitChars("<"),this._reconsumeInState(C3))}[eE](t){i6(t)?(this._createEndTagToken(),this._reconsumeInState(tE)):(this._emitChars("")):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.state=fe,this._emitChars(j1.REPLACEMENT_CHARACTER)):t===T.EOF?(this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=fe,this._emitCodePoint(t))}[La](t){t===T.SOLIDUS?(this.tempBuff=[],this.state=aE,this._emitChars("/")):this._reconsumeInState(fe)}[aE](t){i2(t)||t===T.SOLIDUS||t===T.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?C3:fe,this._emitCodePoint(t)):H3(t)?(this.tempBuff.push(Oa(t)),this._emitCodePoint(t)):q6(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(fe)}[P3](t){i2(t)||(t===T.SOLIDUS||t===T.GREATER_THAN_SIGN||t===T.EOF?this._reconsumeInState(of):t===T.EQUALS_SIGN?(this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Ea):(this._createAttr(""),this._reconsumeInState(Ea)))}[Ea](t){i2(t)||t===T.SOLIDUS||t===T.GREATER_THAN_SIGN||t===T.EOF?(this._leaveAttrName(of),this._unconsume()):t===T.EQUALS_SIGN?this._leaveAttrName(lf):H3(t)?this.currentAttr.name+=a6(t):t===T.QUOTATION_MARK||t===T.APOSTROPHE||t===T.LESS_THAN_SIGN?(this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=v2(t)):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentAttr.name+=j1.REPLACEMENT_CHARACTER):this.currentAttr.name+=v2(t)}[of](t){i2(t)||(t===T.SOLIDUS?this.state=r6:t===T.EQUALS_SIGN?this.state=lf:t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(Ea)))}[lf](t){i2(t)||(t===T.QUOTATION_MARK?this.state=xa:t===T.APOSTROPHE?this.state=Na:t===T.GREATER_THAN_SIGN?(this._err(I.missingAttributeValue),this.state=S1,this._emitCurrentToken()):this._reconsumeInState(Aa))}[xa](t){t===T.QUOTATION_MARK?this.state=ff:t===T.AMPERSAND?(this.returnState=xa,this.state=dt):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentAttr.value+=j1.REPLACEMENT_CHARACTER):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):this.currentAttr.value+=v2(t)}[Na](t){t===T.APOSTROPHE?this.state=ff:t===T.AMPERSAND?(this.returnState=Na,this.state=dt):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentAttr.value+=j1.REPLACEMENT_CHARACTER):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):this.currentAttr.value+=v2(t)}[Aa](t){i2(t)?this._leaveAttrValue(P3):t===T.AMPERSAND?(this.returnState=Aa,this.state=dt):t===T.GREATER_THAN_SIGN?(this._leaveAttrValue(S1),this._emitCurrentToken()):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentAttr.value+=j1.REPLACEMENT_CHARACTER):t===T.QUOTATION_MARK||t===T.APOSTROPHE||t===T.LESS_THAN_SIGN||t===T.EQUALS_SIGN||t===T.GRAVE_ACCENT?(this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=v2(t)):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):this.currentAttr.value+=v2(t)}[ff](t){i2(t)?this._leaveAttrValue(P3):t===T.SOLIDUS?this._leaveAttrValue(r6):t===T.GREATER_THAN_SIGN?(this._leaveAttrValue(S1),this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):(this._err(I.missingWhitespaceBetweenAttributes),this._reconsumeInState(P3))}[r6](t){t===T.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInTag),this._emitEOFToken()):(this._err(I.unexpectedSolidusInTag),this._reconsumeInState(P3))}[z8](t){t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._emitCurrentToken(),this._emitEOFToken()):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.data+=j1.REPLACEMENT_CHARACTER):this.currentToken.data+=v2(t)}[iE](t){this._consumeSequenceIfMatch(G6.DASH_DASH_STRING,t,!0)?(this._createCommentToken(),this.state=sE):this._consumeSequenceIfMatch(G6.DOCTYPE_STRING,t,!1)?this.state=dE:this._consumeSequenceIfMatch(G6.CDATA_START_STRING,t,!0)?this.allowCDATA?this.state=Pa:(this._err(I.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=z8):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(z8))}[sE](t){t===T.HYPHEN_MINUS?this.state=oE:t===T.GREATER_THAN_SIGN?(this._err(I.abruptClosingOfEmptyComment),this.state=S1,this._emitCurrentToken()):this._reconsumeInState(c6)}[oE](t){t===T.HYPHEN_MINUS?this.state=ba:t===T.GREATER_THAN_SIGN?(this._err(I.abruptClosingOfEmptyComment),this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(c6))}[c6](t){t===T.HYPHEN_MINUS?this.state=wa:t===T.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=lE):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.data+=j1.REPLACEMENT_CHARACTER):t===T.EOF?(this._err(I.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=v2(t)}[lE](t){t===T.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=fE):t===T.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(c6)}[fE](t){t===T.HYPHEN_MINUS?this.state=uE:this._reconsumeInState(c6)}[uE](t){t===T.HYPHEN_MINUS?this.state=mE:this._reconsumeInState(wa)}[mE](t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(I.nestedComment),this._reconsumeInState(ba)}[wa](t){t===T.HYPHEN_MINUS?this.state=ba:t===T.EOF?(this._err(I.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(c6))}[ba](t){t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):t===T.EXCLAMATION_MARK?this.state=pE:t===T.HYPHEN_MINUS?this.currentToken.data+="-":t===T.EOF?(this._err(I.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(c6))}[pE](t){t===T.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=wa):t===T.GREATER_THAN_SIGN?(this._err(I.incorrectlyClosedComment),this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(c6))}[dE](t){i2(t)?this.state=ka:t===T.GREATER_THAN_SIGN?this._reconsumeInState(ka):t===T.EOF?(this._err(I.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(ka))}[ka](t){i2(t)||(H3(t)?(this._createDoctypeToken(a6(t)),this.state=_a):t===T.NULL?(this._err(I.unexpectedNullCharacter),this._createDoctypeToken(j1.REPLACEMENT_CHARACTER),this.state=_a):t===T.GREATER_THAN_SIGN?(this._err(I.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(v2(t)),this.state=_a))}[_a](t){i2(t)?this.state=hE:t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):H3(t)?this.currentToken.name+=a6(t):t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.name+=j1.REPLACEMENT_CHARACTER):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=v2(t)}[hE](t){i2(t)||(t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(G6.PUBLIC_STRING,t,!1)?this.state=vE:this._consumeSequenceIfMatch(G6.SYSTEM_STRING,t,!1)?this.state=HE:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue)))}[vE](t){i2(t)?this.state=gE:t===T.QUOTATION_MARK?(this._err(I.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=uf):t===T.APOSTROPHE?(this._err(I.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=mf):t===T.GREATER_THAN_SIGN?(this._err(I.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue))}[gE](t){i2(t)||(t===T.QUOTATION_MARK?(this.currentToken.publicId="",this.state=uf):t===T.APOSTROPHE?(this.currentToken.publicId="",this.state=mf):t===T.GREATER_THAN_SIGN?(this._err(I.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue)))}[uf](t){t===T.QUOTATION_MARK?this.state=pf:t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.publicId+=j1.REPLACEMENT_CHARACTER):t===T.GREATER_THAN_SIGN?(this._err(I.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=v2(t)}[mf](t){t===T.APOSTROPHE?this.state=pf:t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.publicId+=j1.REPLACEMENT_CHARACTER):t===T.GREATER_THAN_SIGN?(this._err(I.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=v2(t)}[pf](t){i2(t)?this.state=CE:t===T.GREATER_THAN_SIGN?(this.state=S1,this._emitCurrentToken()):t===T.QUOTATION_MARK?(this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=y8):t===T.APOSTROPHE?(this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=T8):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue))}[CE](t){i2(t)||(t===T.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=S1):t===T.QUOTATION_MARK?(this.currentToken.systemId="",this.state=y8):t===T.APOSTROPHE?(this.currentToken.systemId="",this.state=T8):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue)))}[HE](t){i2(t)?this.state=ME:t===T.QUOTATION_MARK?(this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=y8):t===T.APOSTROPHE?(this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=T8):t===T.GREATER_THAN_SIGN?(this._err(I.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue))}[ME](t){i2(t)||(t===T.QUOTATION_MARK?(this.currentToken.systemId="",this.state=y8):t===T.APOSTROPHE?(this.currentToken.systemId="",this.state=T8):t===T.GREATER_THAN_SIGN?(this._err(I.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=S1,this._emitCurrentToken()):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(ue)))}[y8](t){t===T.QUOTATION_MARK?this.state=df:t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.systemId+=j1.REPLACEMENT_CHARACTER):t===T.GREATER_THAN_SIGN?(this._err(I.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=v2(t)}[T8](t){t===T.APOSTROPHE?this.state=df:t===T.NULL?(this._err(I.unexpectedNullCharacter),this.currentToken.systemId+=j1.REPLACEMENT_CHARACTER):t===T.GREATER_THAN_SIGN?(this._err(I.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=v2(t)}[df](t){i2(t)||(t===T.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=S1):t===T.EOF?(this._err(I.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(ue)))}[ue](t){t===T.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=S1):t===T.NULL?this._err(I.unexpectedNullCharacter):t===T.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Pa](t){t===T.RIGHT_SQUARE_BRACKET?this.state=zE:t===T.EOF?(this._err(I.eofInCdata),this._emitEOFToken()):this._emitCodePoint(t)}[zE](t){t===T.RIGHT_SQUARE_BRACKET?this.state=yE:(this._emitChars("]"),this._reconsumeInState(Pa))}[yE](t){t===T.GREATER_THAN_SIGN?this.state=S1:t===T.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Pa))}[dt](t){this.tempBuff=[T.AMPERSAND],t===T.NUMBER_SIGN?(this.tempBuff.push(t),this.state=SE):hf(t)?this._reconsumeInState(TE):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[TE](t){let n=this._matchNamedCharacterReference(t);if(this._ensureHibernation())this.tempBuff=[T.AMPERSAND];else if(n){let r=this.tempBuff[this.tempBuff.length-1]===T.SEMICOLON;this._isCharacterReferenceAttributeQuirk(r)||(r||this._errOnNextCodePoint(I.missingSemicolonAfterCharacterReference),this.tempBuff=n),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=VE}[VE](t){hf(t)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=v2(t):this._emitCodePoint(t):(t===T.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[SE](t){this.charRefCode=0,t===T.LATIN_SMALL_X||t===T.LATIN_CAPITAL_X?(this.tempBuff.push(t),this.state=LE):this._reconsumeInState(EE)}[LE](t){G$(t)?this._reconsumeInState(xE):(this._err(I.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[EE](t){L8(t)?this._reconsumeInState(NE):(this._err(I.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[xE](t){PE(t)?this.charRefCode=this.charRefCode*16+t-55:OE(t)?this.charRefCode=this.charRefCode*16+t-87:L8(t)?this.charRefCode=this.charRefCode*16+t-48:t===T.SEMICOLON?this.state=V8:(this._err(I.missingSemicolonAfterCharacterReference),this._reconsumeInState(V8))}[NE](t){L8(t)?this.charRefCode=this.charRefCode*10+t-48:t===T.SEMICOLON?this.state=V8:(this._err(I.missingSemicolonAfterCharacterReference),this._reconsumeInState(V8))}[V8](){if(this.charRefCode===T.NULL)this._err(I.nullCharacterReference),this.charRefCode=T.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(I.characterReferenceOutsideUnicodeRange),this.charRefCode=T.REPLACEMENT_CHARACTER;else if(j1.isSurrogate(this.charRefCode))this._err(I.surrogateCharacterReference),this.charRefCode=T.REPLACEMENT_CHARACTER;else if(j1.isUndefinedCodePoint(this.charRefCode))this._err(I.noncharacterCharacterReference);else if(j1.isControlCodePoint(this.charRefCode)||this.charRefCode===T.CARRIAGE_RETURN){this._err(I.controlCharacterReference);let t=U$[this.charRefCode];t&&(this.charRefCode=t)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};G1.CHARACTER_TOKEN="CHARACTER_TOKEN";G1.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";G1.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";G1.START_TAG_TOKEN="START_TAG_TOKEN";G1.END_TAG_TOKEN="END_TAG_TOKEN";G1.COMMENT_TOKEN="COMMENT_TOKEN";G1.DOCTYPE_TOKEN="DOCTYPE_TOKEN";G1.EOF_TOKEN="EOF_TOKEN";G1.HIBERNATION_TOKEN="HIBERNATION_TOKEN";G1.MODE={DATA:S1,RCDATA:ht,RAWTEXT:S8,SCRIPT_DATA:me,PLAINTEXT:_E};G1.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null};RE.exports=G1});var K6=E(vt=>{"use strict";var vf=vt.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};vt.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};vt.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var Y=vt.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};vt.SPECIAL_ELEMENTS={[vf.HTML]:{[Y.ADDRESS]:!0,[Y.APPLET]:!0,[Y.AREA]:!0,[Y.ARTICLE]:!0,[Y.ASIDE]:!0,[Y.BASE]:!0,[Y.BASEFONT]:!0,[Y.BGSOUND]:!0,[Y.BLOCKQUOTE]:!0,[Y.BODY]:!0,[Y.BR]:!0,[Y.BUTTON]:!0,[Y.CAPTION]:!0,[Y.CENTER]:!0,[Y.COL]:!0,[Y.COLGROUP]:!0,[Y.DD]:!0,[Y.DETAILS]:!0,[Y.DIR]:!0,[Y.DIV]:!0,[Y.DL]:!0,[Y.DT]:!0,[Y.EMBED]:!0,[Y.FIELDSET]:!0,[Y.FIGCAPTION]:!0,[Y.FIGURE]:!0,[Y.FOOTER]:!0,[Y.FORM]:!0,[Y.FRAME]:!0,[Y.FRAMESET]:!0,[Y.H1]:!0,[Y.H2]:!0,[Y.H3]:!0,[Y.H4]:!0,[Y.H5]:!0,[Y.H6]:!0,[Y.HEAD]:!0,[Y.HEADER]:!0,[Y.HGROUP]:!0,[Y.HR]:!0,[Y.HTML]:!0,[Y.IFRAME]:!0,[Y.IMG]:!0,[Y.INPUT]:!0,[Y.LI]:!0,[Y.LINK]:!0,[Y.LISTING]:!0,[Y.MAIN]:!0,[Y.MARQUEE]:!0,[Y.MENU]:!0,[Y.META]:!0,[Y.NAV]:!0,[Y.NOEMBED]:!0,[Y.NOFRAMES]:!0,[Y.NOSCRIPT]:!0,[Y.OBJECT]:!0,[Y.OL]:!0,[Y.P]:!0,[Y.PARAM]:!0,[Y.PLAINTEXT]:!0,[Y.PRE]:!0,[Y.SCRIPT]:!0,[Y.SECTION]:!0,[Y.SELECT]:!0,[Y.SOURCE]:!0,[Y.STYLE]:!0,[Y.SUMMARY]:!0,[Y.TABLE]:!0,[Y.TBODY]:!0,[Y.TD]:!0,[Y.TEMPLATE]:!0,[Y.TEXTAREA]:!0,[Y.TFOOT]:!0,[Y.TH]:!0,[Y.THEAD]:!0,[Y.TITLE]:!0,[Y.TR]:!0,[Y.TRACK]:!0,[Y.UL]:!0,[Y.WBR]:!0,[Y.XMP]:!0},[vf.MATHML]:{[Y.MI]:!0,[Y.MO]:!0,[Y.MN]:!0,[Y.MS]:!0,[Y.MTEXT]:!0,[Y.ANNOTATION_XML]:!0},[vf.SVG]:{[Y.TITLE]:!0,[Y.FOREIGN_OBJECT]:!0,[Y.DESC]:!0}}});var BE=E((s71,FE)=>{"use strict";var DE=K6(),Q=DE.TAG_NAMES,q1=DE.NAMESPACES;function IE(e){switch(e.length){case 1:return e===Q.P;case 2:return e===Q.RB||e===Q.RP||e===Q.RT||e===Q.DD||e===Q.DT||e===Q.LI;case 3:return e===Q.RTC;case 6:return e===Q.OPTION;case 8:return e===Q.OPTGROUP}return!1}function q$(e){switch(e.length){case 1:return e===Q.P;case 2:return e===Q.RB||e===Q.RP||e===Q.RT||e===Q.DD||e===Q.DT||e===Q.LI||e===Q.TD||e===Q.TH||e===Q.TR;case 3:return e===Q.RTC;case 5:return e===Q.TBODY||e===Q.TFOOT||e===Q.THEAD;case 6:return e===Q.OPTION;case 7:return e===Q.CAPTION;case 8:return e===Q.OPTGROUP||e===Q.COLGROUP}return!1}function Ra(e,t){switch(e.length){case 2:if(e===Q.TD||e===Q.TH)return t===q1.HTML;if(e===Q.MI||e===Q.MO||e===Q.MN||e===Q.MS)return t===q1.MATHML;break;case 4:if(e===Q.HTML)return t===q1.HTML;if(e===Q.DESC)return t===q1.SVG;break;case 5:if(e===Q.TABLE)return t===q1.HTML;if(e===Q.MTEXT)return t===q1.MATHML;if(e===Q.TITLE)return t===q1.SVG;break;case 6:return(e===Q.APPLET||e===Q.OBJECT)&&t===q1.HTML;case 7:return(e===Q.CAPTION||e===Q.MARQUEE)&&t===q1.HTML;case 8:return e===Q.TEMPLATE&&t===q1.HTML;case 13:return e===Q.FOREIGN_OBJECT&&t===q1.SVG;case 14:return e===Q.ANNOTATION_XML&&t===q1.MATHML}return!1}var gf=class{constructor(t,n){this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=n}_indexOf(t){let n=-1;for(let r=this.stackTop;r>=0;r--)if(this.items[r]===t){n=r;break}return n}_isInTemplate(){return this.currentTagName===Q.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q1.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(t){this.items[++this.stackTop]=t,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(t,n){let r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&this._updateCurrentElement()}insertAfter(t,n){let r=this._indexOf(t)+1;this.items.splice(r,0,n),r===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(t){for(;this.stackTop>-1;){let n=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),n===t&&r===q1.HTML)break}}popUntilElementPopped(t){for(;this.stackTop>-1;){let n=this.current;if(this.pop(),n===t)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===Q.H1||t===Q.H2||t===Q.H3||t===Q.H4||t===Q.H5||t===Q.H6&&n===q1.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===Q.TD||t===Q.TH&&n===q1.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==Q.TABLE&&this.currentTagName!==Q.TEMPLATE&&this.currentTagName!==Q.HTML||this.treeAdapter.getNamespaceURI(this.current)!==q1.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==Q.TBODY&&this.currentTagName!==Q.TFOOT&&this.currentTagName!==Q.THEAD&&this.currentTagName!==Q.TEMPLATE&&this.currentTagName!==Q.HTML||this.treeAdapter.getNamespaceURI(this.current)!==q1.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==Q.TR&&this.currentTagName!==Q.TEMPLATE&&this.currentTagName!==Q.HTML||this.treeAdapter.getNamespaceURI(this.current)!==q1.HTML;)this.pop()}remove(t){for(let n=this.stackTop;n>=0;n--)if(this.items[n]===t){this.items.splice(n,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let t=this.items[1];return t&&this.treeAdapter.getTagName(t)===Q.BODY?t:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let n=this._indexOf(t);return--n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===Q.HTML}hasInScope(t){for(let n=this.stackTop;n>=0;n--){let r=this.treeAdapter.getTagName(this.items[n]),c=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&c===q1.HTML)return!0;if(Ra(r,c))return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if((n===Q.H1||n===Q.H2||n===Q.H3||n===Q.H4||n===Q.H5||n===Q.H6)&&r===q1.HTML)return!0;if(Ra(n,r))return!1}return!0}hasInListItemScope(t){for(let n=this.stackTop;n>=0;n--){let r=this.treeAdapter.getTagName(this.items[n]),c=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&c===q1.HTML)return!0;if((r===Q.UL||r===Q.OL)&&c===q1.HTML||Ra(r,c))return!1}return!0}hasInButtonScope(t){for(let n=this.stackTop;n>=0;n--){let r=this.treeAdapter.getTagName(this.items[n]),c=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&c===q1.HTML)return!0;if(r===Q.BUTTON&&c===q1.HTML||Ra(r,c))return!1}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--){let r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===q1.HTML){if(r===t)return!0;if(r===Q.TABLE||r===Q.TEMPLATE||r===Q.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===q1.HTML){if(n===Q.TBODY||n===Q.THEAD||n===Q.TFOOT)return!0;if(n===Q.TABLE||n===Q.HTML)return!1}}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--){let r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===q1.HTML){if(r===t)return!0;if(r!==Q.OPTION&&r!==Q.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;IE(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;q$(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;IE(this.currentTagName)&&this.currentTagName!==t;)this.pop()}};FE.exports=gf});var jE=E((o71,UE)=>{"use strict";var O4=class{constructor(t){this.length=0,this.entries=[],this.treeAdapter=t,this.bookmark=null}_getNoahArkConditionCandidates(t){let n=[];if(this.length>=3){let r=this.treeAdapter.getAttrList(t).length,c=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let i=this.length-1;i>=0;i--){let s=this.entries[i];if(s.type===O4.MARKER_ENTRY)break;let o=s.element,l=this.treeAdapter.getAttrList(o);this.treeAdapter.getTagName(o)===c&&this.treeAdapter.getNamespaceURI(o)===a&&l.length===r&&n.push({idx:i,attrs:l})}}return n.length<3?[]:n}_ensureNoahArkCondition(t){let n=this._getNoahArkConditionCandidates(t),r=n.length;if(r){let c=this.treeAdapter.getAttrList(t),a=c.length,i=Object.create(null);for(let s=0;s=3-1;s--)this.entries.splice(n[s].idx,1),this.length--}}insertMarker(){this.entries.push({type:O4.MARKER_ENTRY}),this.length++}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.push({type:O4.ELEMENT_ENTRY,element:t,token:n}),this.length++}insertElementAfterBookmark(t,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:O4.ELEMENT_ENTRY,element:t,token:n}),this.length++}removeEntry(t){for(let n=this.length-1;n>=0;n--)if(this.entries[n]===t){this.entries.splice(n,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let t=this.entries.pop();if(this.length--,t.type===O4.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(t){for(let n=this.length-1;n>=0;n--){let r=this.entries[n];if(r.type===O4.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===t)return r}return null}getElementEntry(t){for(let n=this.length-1;n>=0;n--){let r=this.entries[n];if(r.type===O4.ELEMENT_ENTRY&&r.element===t)return r}return null}};O4.MARKER_ENTRY="MARKER_ENTRY";O4.ELEMENT_ENTRY="ELEMENT_ENTRY";UE.exports=O4});var O3=E((l71,GE)=>{"use strict";var Ia=class{constructor(t){let n={},r=this._getOverriddenMethods(this,n);for(let c of Object.keys(r))typeof r[c]=="function"&&(n[c]=t[c],t[c]=r[c])}_getOverriddenMethods(){throw new Error("Not implemented")}};Ia.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let c=0;c{"use strict";var W$=O3(),Cf=class extends W${constructor(t){super(t),this.preprocessor=t,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(t,n){return{advance(){let r=this.pos+1,c=this.html[r];return t.isEol&&(t.isEol=!1,t.line++,t.lineStartPos=r),(c===` +`||c==="\r"&&this.html[r+1]!==` +`)&&(t.isEol=!0),t.col=r-t.lineStartPos+1,t.offset=t.droppedBufferSize+r,n.advance.call(this)},retreat(){n.retreat.call(this),t.isEol=!1,t.col=this.pos-t.lineStartPos+1},dropParsedChunk(){let r=this.pos;n.dropParsedChunk.call(this);let c=r-this.pos;t.lineStartPos-=c,t.droppedBufferSize+=c,t.offset=t.droppedBufferSize+this.pos}}}};qE.exports=Cf});var yf=E((u71,KE)=>{"use strict";var WE=O3(),Mf=E8(),K$=Hf(),zf=class extends WE{constructor(t){super(t),this.tokenizer=t,this.posTracker=WE.install(t.preprocessor,K$),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;let t=this.tokenizer.currentToken,n=this.tokenizer.currentAttr;t.location.attrs||(t.location.attrs=Object.create(null)),t.location.attrs[n.name]=this.currentAttrLocation}_getOverriddenMethods(t,n){let r={_createStartTagToken(){n._createStartTagToken.call(this),this.currentToken.location=t.ctLoc},_createEndTagToken(){n._createEndTagToken.call(this),this.currentToken.location=t.ctLoc},_createCommentToken(){n._createCommentToken.call(this),this.currentToken.location=t.ctLoc},_createDoctypeToken(c){n._createDoctypeToken.call(this,c),this.currentToken.location=t.ctLoc},_createCharacterToken(c,a){n._createCharacterToken.call(this,c,a),this.currentCharacterToken.location=t.ctLoc},_createEOFToken(){n._createEOFToken.call(this),this.currentToken.location=t._getCurrentLocation()},_createAttr(c){n._createAttr.call(this,c),t.currentAttrLocation=t._getCurrentLocation()},_leaveAttrName(c){n._leaveAttrName.call(this,c),t._attachCurrentAttrLocationInfo()},_leaveAttrValue(c){n._leaveAttrValue.call(this,c),t._attachCurrentAttrLocationInfo()},_emitCurrentToken(){let c=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=c.startLine,this.currentCharacterToken.location.endCol=c.startCol,this.currentCharacterToken.location.endOffset=c.startOffset),this.currentToken.type===Mf.EOF_TOKEN?(c.endLine=c.startLine,c.endCol=c.startCol,c.endOffset=c.startOffset):(c.endLine=t.posTracker.line,c.endCol=t.posTracker.col+1,c.endOffset=t.posTracker.offset+1),n._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){let c=this.currentCharacterToken&&this.currentCharacterToken.location;c&&c.endOffset===-1&&(c.endLine=t.posTracker.line,c.endCol=t.posTracker.col,c.endOffset=t.posTracker.offset),n._emitCurrentCharacterToken.call(this)}};return Object.keys(Mf.MODE).forEach(c=>{let a=Mf.MODE[c];r[a]=function(i){t.ctLoc=t._getCurrentLocation(),n[a].call(this,i)}}),r}};KE.exports=zf});var YE=E((m71,$E)=>{"use strict";var $$=O3(),Tf=class extends $${constructor(t,n){super(t),this.onItemPop=n.onItemPop}_getOverriddenMethods(t,n){return{pop(){t.onItemPop(this.current),n.pop.call(this)},popAllUpToHtmlElement(){for(let r=this.stackTop;r>0;r--)t.onItemPop(this.items[r]);n.popAllUpToHtmlElement.call(this)},remove(r){t.onItemPop(this.current),n.remove.call(this,r)}}}};$E.exports=Tf});var JE=E((p71,XE)=>{"use strict";var Vf=O3(),QE=E8(),Y$=yf(),Q$=YE(),X$=K6(),Sf=X$.TAG_NAMES,Lf=class extends Vf{constructor(t){super(t),this.parser=t,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(t){let n=null;this.lastStartTagToken&&(n=Object.assign({},this.lastStartTagToken.location),n.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(t,n)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){let c=n.location,a=this.treeAdapter.getTagName(t),i=n.type===QE.END_TAG_TOKEN&&a===n.tagName,s={};i?(s.endTag=Object.assign({},c),s.endLine=c.endLine,s.endCol=c.endCol,s.endOffset=c.endOffset):(s.endLine=c.startLine,s.endCol=c.startCol,s.endOffset=c.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}_getOverriddenMethods(t,n){return{_bootstrap(r,c){n._bootstrap.call(this,r,c),t.lastStartTagToken=null,t.lastFosterParentingLocation=null,t.currentToken=null;let a=Vf.install(this.tokenizer,Y$);t.posTracker=a.posTracker,Vf.install(this.openElements,Q$,{onItemPop:function(i){t._setEndLocation(i,t.currentToken)}})},_runParsingLoop(r){n._runParsingLoop.call(this,r);for(let c=this.openElements.stackTop;c>=0;c--)t._setEndLocation(this.openElements.items[c],t.currentToken)},_processTokenInForeignContent(r){t.currentToken=r,n._processTokenInForeignContent.call(this,r)},_processToken(r){if(t.currentToken=r,n._processToken.call(this,r),r.type===QE.END_TAG_TOKEN&&(r.tagName===Sf.HTML||r.tagName===Sf.BODY&&this.openElements.hasInScope(Sf.BODY)))for(let a=this.openElements.stackTop;a>=0;a--){let i=this.openElements.items[a];if(this.treeAdapter.getTagName(i)===r.tagName){t._setEndLocation(i,r);break}}},_setDocumentType(r){n._setDocumentType.call(this,r);let c=this.treeAdapter.getChildNodes(this.document),a=c.length;for(let i=0;i{"use strict";var J$=O3(),Ef=class extends J${constructor(t,n){super(t),this.posTracker=null,this.onParseError=n.onParseError}_setErrorLocation(t){t.startLine=t.endLine=this.posTracker.line,t.startCol=t.endCol=this.posTracker.col,t.startOffset=t.endOffset=this.posTracker.offset}_reportError(t){let n={code:t,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(n),this.onParseError(n)}_getOverriddenMethods(t){return{_err(n){t._reportError(n)}}}};ZE.exports=Ef});var tx=E((h71,ex)=>{"use strict";var Z$=Da(),eY=Hf(),tY=O3(),xf=class extends Z${constructor(t,n){super(t,n),this.posTracker=tY.install(t,eY),this.lastErrOffset=-1}_reportError(t){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(t))}};ex.exports=xf});var rx=E((v71,nx)=>{"use strict";var nY=Da(),rY=tx(),cY=O3(),Nf=class extends nY{constructor(t,n){super(t,n);let r=cY.install(t.preprocessor,rY,n);this.posTracker=r.posTracker}};nx.exports=Nf});var ix=E((g71,ax)=>{"use strict";var aY=Da(),iY=rx(),sY=yf(),cx=O3(),Af=class extends aY{constructor(t,n){super(t,n),this.opts=n,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(t){this.ctLoc&&(t.startLine=this.ctLoc.startLine,t.startCol=this.ctLoc.startCol,t.startOffset=this.ctLoc.startOffset,t.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,t.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,t.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(t,n){return{_bootstrap(r,c){n._bootstrap.call(this,r,c),cx.install(this.tokenizer,iY,t.opts),cx.install(this.tokenizer,sY)},_processInputToken(r){t.ctLoc=r.location,n._processInputToken.call(this,r)},_err(r,c){t.locBeforeToken=c&&c.beforeToken,t._reportError(r)}}}};ax.exports=Af});var lx=E(x1=>{"use strict";var{DOCUMENT_MODE:oY}=K6();x1.createDocument=function(){return{nodeName:"#document",mode:oY.NO_QUIRKS,childNodes:[]}};x1.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};x1.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}};x1.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};var sx=function(e){return{nodeName:"#text",value:e,parentNode:null}},ox=x1.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},lY=x1.insertBefore=function(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};x1.setTemplateContent=function(e,t){e.content=t};x1.getTemplateContent=function(e){return e.content};x1.setDocumentType=function(e,t,n,r){let c=null;for(let a=0;a{"use strict";fx.exports=function(t,n){return n=n||Object.create(null),[t,n].reduce((r,c)=>(Object.keys(c).forEach(a=>{r[a]=c[a]}),r),Object.create(null))}});var gx=E(Fa=>{"use strict";var{DOCUMENT_MODE:gt}=K6(),dx="html",fY="about:legacy-compat",uY="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hx=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],mY=hx.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),pY=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],vx=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],dY=vx.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function mx(e){let t=e.indexOf('"')!==-1?"'":'"';return t+e+t}function px(e,t){for(let n=0;n-1)return gt.QUIRKS;let r=t===null?mY:hx;if(px(n,r))return gt.QUIRKS;if(r=t===null?vx:dY,px(n,r))return gt.LIMITED_QUIRKS}return gt.NO_QUIRKS};Fa.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+mx(t):n&&(r+=" SYSTEM"),n!==null&&(r+=" "+mx(n)),r}});var Hx=E(s6=>{"use strict";var wf=E8(),bf=K6(),m1=bf.TAG_NAMES,D2=bf.NAMESPACES,Ba=bf.ATTRS,Cx={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},hY="definitionurl",vY="definitionURL",gY={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},CY={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:D2.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:D2.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:D2.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:D2.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:D2.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:D2.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:D2.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:D2.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:D2.XML},"xml:space":{prefix:"xml",name:"space",namespace:D2.XML},xmlns:{prefix:"",name:"xmlns",namespace:D2.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:D2.XMLNS}},HY=s6.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},MY={[m1.B]:!0,[m1.BIG]:!0,[m1.BLOCKQUOTE]:!0,[m1.BODY]:!0,[m1.BR]:!0,[m1.CENTER]:!0,[m1.CODE]:!0,[m1.DD]:!0,[m1.DIV]:!0,[m1.DL]:!0,[m1.DT]:!0,[m1.EM]:!0,[m1.EMBED]:!0,[m1.H1]:!0,[m1.H2]:!0,[m1.H3]:!0,[m1.H4]:!0,[m1.H5]:!0,[m1.H6]:!0,[m1.HEAD]:!0,[m1.HR]:!0,[m1.I]:!0,[m1.IMG]:!0,[m1.LI]:!0,[m1.LISTING]:!0,[m1.MENU]:!0,[m1.META]:!0,[m1.NOBR]:!0,[m1.OL]:!0,[m1.P]:!0,[m1.PRE]:!0,[m1.RUBY]:!0,[m1.S]:!0,[m1.SMALL]:!0,[m1.SPAN]:!0,[m1.STRONG]:!0,[m1.STRIKE]:!0,[m1.SUB]:!0,[m1.SUP]:!0,[m1.TABLE]:!0,[m1.TT]:!0,[m1.U]:!0,[m1.UL]:!0,[m1.VAR]:!0};s6.causesExit=function(e){let t=e.tagName;return t===m1.FONT&&(wf.getTokenAttr(e,Ba.COLOR)!==null||wf.getTokenAttr(e,Ba.SIZE)!==null||wf.getTokenAttr(e,Ba.FACE)!==null)?!0:MY[t]};s6.adjustTokenMathMLAttrs=function(e){for(let t=0;t{"use strict";var V=E8(),TY=BE(),Mx=jE(),VY=JE(),SY=ix(),zx=O3(),LY=lx(),EY=ux(),yx=gx(),R3=Hx(),F2=Va(),xY=Ta(),Y6=K6(),u=Y6.TAG_NAMES,a1=Y6.NAMESPACES,bx=Y6.ATTRS,NY={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:LY},kx="hidden",AY=8,wY=3,_x="INITIAL_MODE",_f="BEFORE_HTML_MODE",Ya="BEFORE_HEAD_MODE",Mt="IN_HEAD_MODE",Px="IN_HEAD_NO_SCRIPT_MODE",Qa="AFTER_HEAD_MODE",I3="IN_BODY_MODE",qa="TEXT_MODE",Y2="IN_TABLE_MODE",Ox="IN_TABLE_TEXT_MODE",Xa="IN_CAPTION_MODE",O8="IN_COLUMN_GROUP_MODE",n3="IN_TABLE_BODY_MODE",ve="IN_ROW_MODE",Ja="IN_CELL_MODE",Pf="IN_SELECT_MODE",Of="IN_SELECT_IN_TABLE_MODE",Wa="IN_TEMPLATE_MODE",Rf="AFTER_BODY_MODE",Za="IN_FRAMESET_MODE",Rx="AFTER_FRAMESET_MODE",Ix="AFTER_AFTER_BODY_MODE",Dx="AFTER_AFTER_FRAMESET_MODE",bY={[u.TR]:ve,[u.TBODY]:n3,[u.THEAD]:n3,[u.TFOOT]:n3,[u.CAPTION]:Xa,[u.COLGROUP]:O8,[u.TABLE]:Y2,[u.BODY]:I3,[u.FRAMESET]:Za},kY={[u.CAPTION]:Y2,[u.COLGROUP]:Y2,[u.TBODY]:Y2,[u.TFOOT]:Y2,[u.THEAD]:Y2,[u.COL]:O8,[u.TR]:n3,[u.TD]:ve,[u.TH]:ve},Tx={[_x]:{[V.CHARACTER_TOKEN]:N8,[V.NULL_CHARACTER_TOKEN]:N8,[V.WHITESPACE_CHARACTER_TOKEN]:E1,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:BY,[V.START_TAG_TOKEN]:N8,[V.END_TAG_TOKEN]:N8,[V.EOF_TOKEN]:N8},[_f]:{[V.CHARACTER_TOKEN]:w8,[V.NULL_CHARACTER_TOKEN]:w8,[V.WHITESPACE_CHARACTER_TOKEN]:E1,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:UY,[V.END_TAG_TOKEN]:jY,[V.EOF_TOKEN]:w8},[Ya]:{[V.CHARACTER_TOKEN]:b8,[V.NULL_CHARACTER_TOKEN]:b8,[V.WHITESPACE_CHARACTER_TOKEN]:E1,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:Ua,[V.START_TAG_TOKEN]:GY,[V.END_TAG_TOKEN]:qY,[V.EOF_TOKEN]:b8},[Mt]:{[V.CHARACTER_TOKEN]:k8,[V.NULL_CHARACTER_TOKEN]:k8,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:Ua,[V.START_TAG_TOKEN]:k2,[V.END_TAG_TOKEN]:Q6,[V.EOF_TOKEN]:k8},[Px]:{[V.CHARACTER_TOKEN]:_8,[V.NULL_CHARACTER_TOKEN]:_8,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:Ua,[V.START_TAG_TOKEN]:WY,[V.END_TAG_TOKEN]:KY,[V.EOF_TOKEN]:_8},[Qa]:{[V.CHARACTER_TOKEN]:P8,[V.NULL_CHARACTER_TOKEN]:P8,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:Ua,[V.START_TAG_TOKEN]:$Y,[V.END_TAG_TOKEN]:YY,[V.EOF_TOKEN]:P8},[I3]:{[V.CHARACTER_TOKEN]:ja,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:g4,[V.END_TAG_TOKEN]:If,[V.EOF_TOKEN]:de},[qa]:{[V.CHARACTER_TOKEN]:v4,[V.NULL_CHARACTER_TOKEN]:v4,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E1,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:E1,[V.END_TAG_TOKEN]:LQ,[V.EOF_TOKEN]:EQ},[Y2]:{[V.CHARACTER_TOKEN]:he,[V.NULL_CHARACTER_TOKEN]:he,[V.WHITESPACE_CHARACTER_TOKEN]:he,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:Df,[V.END_TAG_TOKEN]:Ff,[V.EOF_TOKEN]:de},[Ox]:{[V.CHARACTER_TOKEN]:RQ,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:OQ,[V.COMMENT_TOKEN]:A8,[V.DOCTYPE_TOKEN]:A8,[V.START_TAG_TOKEN]:A8,[V.END_TAG_TOKEN]:A8,[V.EOF_TOKEN]:A8},[Xa]:{[V.CHARACTER_TOKEN]:ja,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:IQ,[V.END_TAG_TOKEN]:DQ,[V.EOF_TOKEN]:de},[O8]:{[V.CHARACTER_TOKEN]:Ka,[V.NULL_CHARACTER_TOKEN]:Ka,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:FQ,[V.END_TAG_TOKEN]:BQ,[V.EOF_TOKEN]:de},[n3]:{[V.CHARACTER_TOKEN]:he,[V.NULL_CHARACTER_TOKEN]:he,[V.WHITESPACE_CHARACTER_TOKEN]:he,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:UQ,[V.END_TAG_TOKEN]:jQ,[V.EOF_TOKEN]:de},[ve]:{[V.CHARACTER_TOKEN]:he,[V.NULL_CHARACTER_TOKEN]:he,[V.WHITESPACE_CHARACTER_TOKEN]:he,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:GQ,[V.END_TAG_TOKEN]:qQ,[V.EOF_TOKEN]:de},[Ja]:{[V.CHARACTER_TOKEN]:ja,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:WQ,[V.END_TAG_TOKEN]:KQ,[V.EOF_TOKEN]:de},[Pf]:{[V.CHARACTER_TOKEN]:v4,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:Fx,[V.END_TAG_TOKEN]:Bx,[V.EOF_TOKEN]:de},[Of]:{[V.CHARACTER_TOKEN]:v4,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:$Q,[V.END_TAG_TOKEN]:YQ,[V.EOF_TOKEN]:de},[Wa]:{[V.CHARACTER_TOKEN]:ja,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:QQ,[V.END_TAG_TOKEN]:XQ,[V.EOF_TOKEN]:Ux},[Rf]:{[V.CHARACTER_TOKEN]:$a,[V.NULL_CHARACTER_TOKEN]:$a,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:FY,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:JQ,[V.END_TAG_TOKEN]:ZQ,[V.EOF_TOKEN]:x8},[Za]:{[V.CHARACTER_TOKEN]:E1,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:eX,[V.END_TAG_TOKEN]:tX,[V.EOF_TOKEN]:x8},[Rx]:{[V.CHARACTER_TOKEN]:E1,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:v4,[V.COMMENT_TOKEN]:E2,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:nX,[V.END_TAG_TOKEN]:rX,[V.EOF_TOKEN]:x8},[Ix]:{[V.CHARACTER_TOKEN]:Ga,[V.NULL_CHARACTER_TOKEN]:Ga,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:Vx,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:cX,[V.END_TAG_TOKEN]:Ga,[V.EOF_TOKEN]:x8},[Dx]:{[V.CHARACTER_TOKEN]:E1,[V.NULL_CHARACTER_TOKEN]:E1,[V.WHITESPACE_CHARACTER_TOKEN]:$6,[V.COMMENT_TOKEN]:Vx,[V.DOCTYPE_TOKEN]:E1,[V.START_TAG_TOKEN]:aX,[V.END_TAG_TOKEN]:E1,[V.EOF_TOKEN]:x8}},kf=class{constructor(t){this.options=EY(NY,t),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&zx.install(this,VY),this.options.onParseError&&zx.install(this,SY,{onParseError:this.options.onParseError})}parse(t){let n=this.treeAdapter.createDocument();return this._bootstrap(n,null),this.tokenizer.write(t,!0),this._runParsingLoop(null),n}parseFragment(t,n){n||(n=this.treeAdapter.createElement(u.TEMPLATE,a1.HTML,[]));let r=this.treeAdapter.createElement("documentmock",a1.HTML,[]);this._bootstrap(r,n),this.treeAdapter.getTagName(n)===u.TEMPLATE&&this._pushTmplInsertionMode(Wa),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(t,!0),this._runParsingLoop(null);let c=this.treeAdapter.getFirstChild(r),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(c,a),a}_bootstrap(t,n){this.tokenizer=new V(this.options),this.stopped=!1,this.insertionMode=_x,this.originalInsertionMode="",this.document=t,this.fragmentContext=n,this.headElement=null,this.formElement=null,this.openElements=new TY(this.document,this.treeAdapter),this.activeFormattingElements=new Mx(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(t){for(;!this.stopped;){this._setupTokenizerCDATAMode();let n=this.tokenizer.getNextToken();if(n.type===V.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,n.type===V.WHITESPACE_CHARACTER_TOKEN&&n.chars[0]===` +`)){if(n.chars.length===1)continue;n.chars=n.chars.substr(1)}if(this._processInputToken(n),t&&this.pendingScript)break}}runParsingLoopForCurrentChunk(t,n){if(this._runParsingLoop(n),n&&this.pendingScript){let r=this.pendingScript;this.pendingScript=null,n(r);return}t&&t()}_setupTokenizerCDATAMode(){let t=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=t&&t!==this.document&&this.treeAdapter.getNamespaceURI(t)!==a1.HTML&&!this._isIntegrationPoint(t)}_switchToTextParsing(t,n){this._insertElement(t,a1.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=qa}switchToPlaintextParsing(){this.insertionMode=qa,this.originalInsertionMode=I3,this.tokenizer.state=V.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;do{if(this.treeAdapter.getTagName(t)===u.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}while(t)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===a1.HTML){let t=this.treeAdapter.getTagName(this.fragmentContext);t===u.TITLE||t===u.TEXTAREA?this.tokenizer.state=V.MODE.RCDATA:t===u.STYLE||t===u.XMP||t===u.IFRAME||t===u.NOEMBED||t===u.NOFRAMES||t===u.NOSCRIPT?this.tokenizer.state=V.MODE.RAWTEXT:t===u.SCRIPT?this.tokenizer.state=V.MODE.SCRIPT_DATA:t===u.PLAINTEXT&&(this.tokenizer.state=V.MODE.PLAINTEXT)}}_setDocumentType(t){let n=t.name||"",r=t.publicId||"",c=t.systemId||"";this.treeAdapter.setDocumentType(this.document,n,r,c)}_attachElementToTree(t){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(n,t)}}_appendElement(t,n){let r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r)}_insertElement(t,n){let r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r),this.openElements.push(r)}_insertFakeElement(t){let n=this.treeAdapter.createElement(t,a1.HTML,[]);this._attachElementToTree(n),this.openElements.push(n)}_insertTemplate(t){let n=this.treeAdapter.createElement(t.tagName,a1.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n),this.openElements.push(n)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(u.HTML,a1.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t)}_appendCommentNode(t,n){let r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r)}_insertCharacters(t){if(this._shouldFosterParentOnInsertion())this._fosterParentText(t.chars);else{let n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(n,t.chars)}}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_shouldProcessTokenInForeignContent(t){let n=this._getAdjustedCurrentElement();if(!n||n===this.document)return!1;let r=this.treeAdapter.getNamespaceURI(n);if(r===a1.HTML||this.treeAdapter.getTagName(n)===u.ANNOTATION_XML&&r===a1.MATHML&&t.type===V.START_TAG_TOKEN&&t.tagName===u.SVG)return!1;let c=t.type===V.CHARACTER_TOKEN||t.type===V.NULL_CHARACTER_TOKEN||t.type===V.WHITESPACE_CHARACTER_TOKEN;return(t.type===V.START_TAG_TOKEN&&t.tagName!==u.MGLYPH&&t.tagName!==u.MALIGNMARK||c)&&this._isIntegrationPoint(n,a1.MATHML)||(t.type===V.START_TAG_TOKEN||c)&&this._isIntegrationPoint(n,a1.HTML)?!1:t.type!==V.EOF_TOKEN}_processToken(t){Tx[this.insertionMode][t.type](this,t)}_processTokenInBodyMode(t){Tx[I3][t.type](this,t)}_processTokenInForeignContent(t){t.type===V.CHARACTER_TOKEN?sX(this,t):t.type===V.NULL_CHARACTER_TOKEN?iX(this,t):t.type===V.WHITESPACE_CHARACTER_TOKEN?v4(this,t):t.type===V.COMMENT_TOKEN?E2(this,t):t.type===V.START_TAG_TOKEN?oX(this,t):t.type===V.END_TAG_TOKEN&&lX(this,t)}_processInputToken(t){this._shouldProcessTokenInForeignContent(t)?this._processTokenInForeignContent(t):this._processToken(t),t.type===V.START_TAG_TOKEN&&t.selfClosing&&!t.ackSelfClosing&&this._err(F2.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(t,n){let r=this.treeAdapter.getTagName(t),c=this.treeAdapter.getNamespaceURI(t),a=this.treeAdapter.getAttrList(t);return R3.isIntegrationPoint(r,c,a,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.length;if(t){let n=t,r=null;do if(n--,r=this.activeFormattingElements.entries[n],r.type===Mx.MARKER_ENTRY||this.openElements.contains(r.element)){n++;break}while(n>0);for(let c=n;c=0;t--){let r=this.openElements.items[t];t===0&&(n=!0,this.fragmentContext&&(r=this.fragmentContext));let c=this.treeAdapter.getTagName(r),a=bY[c];if(a){this.insertionMode=a;break}else if(!n&&(c===u.TD||c===u.TH)){this.insertionMode=Ja;break}else if(!n&&c===u.HEAD){this.insertionMode=Mt;break}else if(c===u.SELECT){this._resetInsertionModeForSelect(t);break}else if(c===u.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(c===u.HTML){this.insertionMode=this.headElement?Qa:Ya;break}else if(n){this.insertionMode=I3;break}}}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){let r=this.openElements.items[n],c=this.treeAdapter.getTagName(r);if(c===u.TEMPLATE)break;if(c===u.TABLE){this.insertionMode=Of;return}}this.insertionMode=Pf}_pushTmplInsertionMode(t){this.tmplInsertionModeStack.push(t),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=t}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(t){let n=this.treeAdapter.getTagName(t);return n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){let t={parent:null,beforeElement:null};for(let n=this.openElements.stackTop;n>=0;n--){let r=this.openElements.items[n],c=this.treeAdapter.getTagName(r),a=this.treeAdapter.getNamespaceURI(r);if(c===u.TEMPLATE&&a===a1.HTML){t.parent=this.treeAdapter.getTemplateContent(r);break}else if(c===u.TABLE){t.parent=this.treeAdapter.getParentNode(r),t.parent?t.beforeElement=r:t.parent=this.openElements.items[n-1];break}}return t.parent||(t.parent=this.openElements.items[0]),t}_fosterParentElement(t){let n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_fosterParentText(t){let n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertTextBefore(n.parent,t,n.beforeElement):this.treeAdapter.insertText(n.parent,t)}_isSpecialElement(t){let n=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t);return Y6.SPECIAL_ELEMENTS[r][n]}};jx.exports=kf;function _Y(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):M3(e,t),n}function PY(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){let c=e.openElements.items[r];if(c===t.element)break;e._isSpecialElement(c)&&(n=c)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function OY(e,t,n){let r=t,c=e.openElements.getCommonAncestor(t);for(let a=0,i=c;i!==n;a++,i=c){c=e.openElements.getCommonAncestor(i);let s=e.activeFormattingElements.getElementEntry(i),o=s&&a>=wY;!s||o?(o&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(i)):(i=RY(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function RY(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function IY(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{let r=e.treeAdapter.getTagName(t),c=e.treeAdapter.getNamespaceURI(t);r===u.TEMPLATE&&c===a1.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function DY(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),c=n.token,a=e.treeAdapter.createElement(c.tagName,r,c.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a)}function l6(e,t){let n;for(let r=0;r0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==u.TEMPLATE&&e._err(F2.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(F2.endTagWithoutMatchingOpenElement)}function k8(e,t){e.openElements.pop(),e.insertionMode=Qa,e._processToken(t)}function WY(e,t){let n=t.tagName;n===u.HTML?g4(e,t):n===u.BASEFONT||n===u.BGSOUND||n===u.HEAD||n===u.LINK||n===u.META||n===u.NOFRAMES||n===u.STYLE?k2(e,t):n===u.NOSCRIPT?e._err(F2.nestedNoscriptInHead):_8(e,t)}function KY(e,t){let n=t.tagName;n===u.NOSCRIPT?(e.openElements.pop(),e.insertionMode=Mt):n===u.BR?_8(e,t):e._err(F2.endTagWithoutMatchingOpenElement)}function _8(e,t){let n=t.type===V.EOF_TOKEN?F2.openElementsLeftAfterEof:F2.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=Mt,e._processToken(t)}function $Y(e,t){let n=t.tagName;n===u.HTML?g4(e,t):n===u.BODY?(e._insertElement(t,a1.HTML),e.framesetOk=!1,e.insertionMode=I3):n===u.FRAMESET?(e._insertElement(t,a1.HTML),e.insertionMode=Za):n===u.BASE||n===u.BASEFONT||n===u.BGSOUND||n===u.LINK||n===u.META||n===u.NOFRAMES||n===u.SCRIPT||n===u.STYLE||n===u.TEMPLATE||n===u.TITLE?(e._err(F2.abandonedHeadElementChild),e.openElements.push(e.headElement),k2(e,t),e.openElements.remove(e.headElement)):n===u.HEAD?e._err(F2.misplacedStartTagForHeadElement):P8(e,t)}function YY(e,t){let n=t.tagName;n===u.BODY||n===u.HTML||n===u.BR?P8(e,t):n===u.TEMPLATE?Q6(e,t):e._err(F2.endTagWithoutMatchingOpenElement)}function P8(e,t){e._insertFakeElement(u.BODY),e.insertionMode=I3,e._processToken(t)}function $6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ja(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function QY(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function XY(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function JY(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,a1.HTML),e.insertionMode=Za)}function pe(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML)}function ZY(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement();let n=e.openElements.currentTagName;(n===u.H1||n===u.H2||n===u.H3||n===u.H4||n===u.H5||n===u.H6)&&e.openElements.pop(),e._insertElement(t,a1.HTML)}function Sx(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function eQ(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML),n||(e.formElement=e.openElements.current))}function tQ(e,t){e.framesetOk=!1;let n=t.tagName;for(let r=e.openElements.stackTop;r>=0;r--){let c=e.openElements.items[r],a=e.treeAdapter.getTagName(c),i=null;if(n===u.LI&&a===u.LI?i=u.LI:(n===u.DD||n===u.DT)&&(a===u.DD||a===u.DT)&&(i=a),i){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(a!==u.ADDRESS&&a!==u.DIV&&a!==u.P&&e._isSpecialElement(c))break}e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML)}function nQ(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML),e.tokenizer.state=V.MODE.PLAINTEXT}function rQ(e,t){e.openElements.hasInScope(u.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(u.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML),e.framesetOk=!1}function cQ(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(u.A);n&&(l6(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ct(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function aQ(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(u.NOBR)&&(l6(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,a1.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Lx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function iQ(e,t){e.treeAdapter.getDocumentMode(e.document)!==Y6.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML),e.framesetOk=!1,e.insertionMode=Y2}function Ht(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,a1.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function sQ(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,a1.HTML);let n=V.getTokenAttr(t,bx.TYPE);(!n||n.toLowerCase()!==kx)&&(e.framesetOk=!1),t.ackSelfClosing=!0}function Ex(e,t){e._appendElement(t,a1.HTML),t.ackSelfClosing=!0}function oQ(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._appendElement(t,a1.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function lQ(e,t){t.tagName=u.IMG,Ht(e,t)}function fQ(e,t){e._insertElement(t,a1.HTML),e.skipNextNewLine=!0,e.tokenizer.state=V.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=qa}function uQ(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,V.MODE.RAWTEXT)}function mQ(e,t){e.framesetOk=!1,e._switchToTextParsing(t,V.MODE.RAWTEXT)}function xx(e,t){e._switchToTextParsing(t,V.MODE.RAWTEXT)}function pQ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML),e.framesetOk=!1,e.insertionMode===Y2||e.insertionMode===Xa||e.insertionMode===n3||e.insertionMode===ve||e.insertionMode===Ja?e.insertionMode=Of:e.insertionMode=Pf}function Nx(e,t){e.openElements.currentTagName===u.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML)}function Ax(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,a1.HTML)}function dQ(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(u.RTC),e._insertElement(t,a1.HTML)}function hQ(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,a1.HTML)}function vQ(e,t){e._reconstructActiveFormattingElements(),R3.adjustTokenMathMLAttrs(t),R3.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,a1.MATHML):e._insertElement(t,a1.MATHML),t.ackSelfClosing=!0}function gQ(e,t){e._reconstructActiveFormattingElements(),R3.adjustTokenSVGAttrs(t),R3.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,a1.SVG):e._insertElement(t,a1.SVG),t.ackSelfClosing=!0}function e3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,a1.HTML)}function g4(e,t){let n=t.tagName;switch(n.length){case 1:n===u.I||n===u.S||n===u.B||n===u.U?Ct(e,t):n===u.P?pe(e,t):n===u.A?cQ(e,t):e3(e,t);break;case 2:n===u.DL||n===u.OL||n===u.UL?pe(e,t):n===u.H1||n===u.H2||n===u.H3||n===u.H4||n===u.H5||n===u.H6?ZY(e,t):n===u.LI||n===u.DD||n===u.DT?tQ(e,t):n===u.EM||n===u.TT?Ct(e,t):n===u.BR?Ht(e,t):n===u.HR?oQ(e,t):n===u.RB?Ax(e,t):n===u.RT||n===u.RP?dQ(e,t):n!==u.TH&&n!==u.TD&&n!==u.TR&&e3(e,t);break;case 3:n===u.DIV||n===u.DIR||n===u.NAV?pe(e,t):n===u.PRE?Sx(e,t):n===u.BIG?Ct(e,t):n===u.IMG||n===u.WBR?Ht(e,t):n===u.XMP?uQ(e,t):n===u.SVG?gQ(e,t):n===u.RTC?Ax(e,t):n!==u.COL&&e3(e,t);break;case 4:n===u.HTML?QY(e,t):n===u.BASE||n===u.LINK||n===u.META?k2(e,t):n===u.BODY?XY(e,t):n===u.MAIN||n===u.MENU?pe(e,t):n===u.FORM?eQ(e,t):n===u.CODE||n===u.FONT?Ct(e,t):n===u.NOBR?aQ(e,t):n===u.AREA?Ht(e,t):n===u.MATH?vQ(e,t):n===u.MENU?hQ(e,t):n!==u.HEAD&&e3(e,t);break;case 5:n===u.STYLE||n===u.TITLE?k2(e,t):n===u.ASIDE?pe(e,t):n===u.SMALL?Ct(e,t):n===u.TABLE?iQ(e,t):n===u.EMBED?Ht(e,t):n===u.INPUT?sQ(e,t):n===u.PARAM||n===u.TRACK?Ex(e,t):n===u.IMAGE?lQ(e,t):n!==u.FRAME&&n!==u.TBODY&&n!==u.TFOOT&&n!==u.THEAD&&e3(e,t);break;case 6:n===u.SCRIPT?k2(e,t):n===u.CENTER||n===u.FIGURE||n===u.FOOTER||n===u.HEADER||n===u.HGROUP||n===u.DIALOG?pe(e,t):n===u.BUTTON?rQ(e,t):n===u.STRIKE||n===u.STRONG?Ct(e,t):n===u.APPLET||n===u.OBJECT?Lx(e,t):n===u.KEYGEN?Ht(e,t):n===u.SOURCE?Ex(e,t):n===u.IFRAME?mQ(e,t):n===u.SELECT?pQ(e,t):n===u.OPTION?Nx(e,t):e3(e,t);break;case 7:n===u.BGSOUND?k2(e,t):n===u.DETAILS||n===u.ADDRESS||n===u.ARTICLE||n===u.SECTION||n===u.SUMMARY?pe(e,t):n===u.LISTING?Sx(e,t):n===u.MARQUEE?Lx(e,t):n===u.NOEMBED?xx(e,t):n!==u.CAPTION&&e3(e,t);break;case 8:n===u.BASEFONT?k2(e,t):n===u.FRAMESET?JY(e,t):n===u.FIELDSET?pe(e,t):n===u.TEXTAREA?fQ(e,t):n===u.TEMPLATE?k2(e,t):n===u.NOSCRIPT?e.options.scriptingEnabled?xx(e,t):e3(e,t):n===u.OPTGROUP?Nx(e,t):n!==u.COLGROUP&&e3(e,t);break;case 9:n===u.PLAINTEXT?nQ(e,t):e3(e,t);break;case 10:n===u.BLOCKQUOTE||n===u.FIGCAPTION?pe(e,t):e3(e,t);break;default:e3(e,t)}}function CQ(e){e.openElements.hasInScope(u.BODY)&&(e.insertionMode=Rf)}function HQ(e,t){e.openElements.hasInScope(u.BODY)&&(e.insertionMode=Rf,e._processToken(t))}function o6(e,t){let n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function MQ(e){let t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(u.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(u.FORM):e.openElements.remove(n))}function zQ(e){e.openElements.hasInButtonScope(u.P)||e._insertFakeElement(u.P),e._closePElement()}function yQ(e){e.openElements.hasInListItemScope(u.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(u.LI),e.openElements.popUntilTagNamePopped(u.LI))}function TQ(e,t){let n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function VQ(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function wx(e,t){let n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function SQ(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(u.BR),e.openElements.pop(),e.framesetOk=!1}function M3(e,t){let n=t.tagName;for(let r=e.openElements.stackTop;r>0;r--){let c=e.openElements.items[r];if(e.treeAdapter.getTagName(c)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(c);break}if(e._isSpecialElement(c))break}}function If(e,t){let n=t.tagName;switch(n.length){case 1:n===u.A||n===u.B||n===u.I||n===u.S||n===u.U?l6(e,t):n===u.P?zQ(e,t):M3(e,t);break;case 2:n===u.DL||n===u.UL||n===u.OL?o6(e,t):n===u.LI?yQ(e,t):n===u.DD||n===u.DT?TQ(e,t):n===u.H1||n===u.H2||n===u.H3||n===u.H4||n===u.H5||n===u.H6?VQ(e,t):n===u.BR?SQ(e,t):n===u.EM||n===u.TT?l6(e,t):M3(e,t);break;case 3:n===u.BIG?l6(e,t):n===u.DIR||n===u.DIV||n===u.NAV||n===u.PRE?o6(e,t):M3(e,t);break;case 4:n===u.BODY?CQ(e,t):n===u.HTML?HQ(e,t):n===u.FORM?MQ(e,t):n===u.CODE||n===u.FONT||n===u.NOBR?l6(e,t):n===u.MAIN||n===u.MENU?o6(e,t):M3(e,t);break;case 5:n===u.ASIDE?o6(e,t):n===u.SMALL?l6(e,t):M3(e,t);break;case 6:n===u.CENTER||n===u.FIGURE||n===u.FOOTER||n===u.HEADER||n===u.HGROUP||n===u.DIALOG?o6(e,t):n===u.APPLET||n===u.OBJECT?wx(e,t):n===u.STRIKE||n===u.STRONG?l6(e,t):M3(e,t);break;case 7:n===u.ADDRESS||n===u.ARTICLE||n===u.DETAILS||n===u.SECTION||n===u.SUMMARY||n===u.LISTING?o6(e,t):n===u.MARQUEE?wx(e,t):M3(e,t);break;case 8:n===u.FIELDSET?o6(e,t):n===u.TEMPLATE?Q6(e,t):M3(e,t);break;case 10:n===u.BLOCKQUOTE||n===u.FIGCAPTION?o6(e,t):M3(e,t);break;default:M3(e,t)}}function de(e,t){e.tmplInsertionModeStackTop>-1?Ux(e,t):e.stopped=!0}function LQ(e,t){t.tagName===u.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function EQ(e,t){e._err(F2.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}function he(e,t){let n=e.openElements.currentTagName;n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Ox,e._processToken(t)):t3(e,t)}function xQ(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,a1.HTML),e.insertionMode=Xa}function NQ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,a1.HTML),e.insertionMode=O8}function AQ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(u.COLGROUP),e.insertionMode=O8,e._processToken(t)}function wQ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,a1.HTML),e.insertionMode=n3}function bQ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(u.TBODY),e.insertionMode=n3,e._processToken(t)}function kQ(e,t){e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode(),e._processToken(t))}function _Q(e,t){let n=V.getTokenAttr(t,bx.TYPE);n&&n.toLowerCase()===kx?e._appendElement(t,a1.HTML):t3(e,t),t.ackSelfClosing=!0}function PQ(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,a1.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Df(e,t){let n=t.tagName;switch(n.length){case 2:n===u.TD||n===u.TH||n===u.TR?bQ(e,t):t3(e,t);break;case 3:n===u.COL?AQ(e,t):t3(e,t);break;case 4:n===u.FORM?PQ(e,t):t3(e,t);break;case 5:n===u.TABLE?kQ(e,t):n===u.STYLE?k2(e,t):n===u.TBODY||n===u.TFOOT||n===u.THEAD?wQ(e,t):n===u.INPUT?_Q(e,t):t3(e,t);break;case 6:n===u.SCRIPT?k2(e,t):t3(e,t);break;case 7:n===u.CAPTION?xQ(e,t):t3(e,t);break;case 8:n===u.COLGROUP?NQ(e,t):n===u.TEMPLATE?k2(e,t):t3(e,t);break;default:t3(e,t)}}function Ff(e,t){let n=t.tagName;n===u.TABLE?e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode()):n===u.TEMPLATE?Q6(e,t):n!==u.BODY&&n!==u.CAPTION&&n!==u.COL&&n!==u.COLGROUP&&n!==u.HTML&&n!==u.TBODY&&n!==u.TD&&n!==u.TFOOT&&n!==u.TH&&n!==u.THEAD&&n!==u.TR&&t3(e,t)}function t3(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function OQ(e,t){e.pendingCharacterTokens.push(t)}function RQ(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function A8(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function JQ(e,t){t.tagName===u.HTML?g4(e,t):$a(e,t)}function ZQ(e,t){t.tagName===u.HTML?e.fragmentContext||(e.insertionMode=Ix):$a(e,t)}function $a(e,t){e.insertionMode=I3,e._processToken(t)}function eX(e,t){let n=t.tagName;n===u.HTML?g4(e,t):n===u.FRAMESET?e._insertElement(t,a1.HTML):n===u.FRAME?(e._appendElement(t,a1.HTML),t.ackSelfClosing=!0):n===u.NOFRAMES&&k2(e,t)}function tX(e,t){t.tagName===u.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagName!==u.FRAMESET&&(e.insertionMode=Rx))}function nX(e,t){let n=t.tagName;n===u.HTML?g4(e,t):n===u.NOFRAMES&&k2(e,t)}function rX(e,t){t.tagName===u.HTML&&(e.insertionMode=Dx)}function cX(e,t){t.tagName===u.HTML?g4(e,t):Ga(e,t)}function Ga(e,t){e.insertionMode=I3,e._processToken(t)}function aX(e,t){let n=t.tagName;n===u.HTML?g4(e,t):n===u.NOFRAMES&&k2(e,t)}function iX(e,t){t.chars=xY.REPLACEMENT_CHARACTER,e._insertCharacters(t)}function sX(e,t){e._insertCharacters(t),e.framesetOk=!1}function oX(e,t){if(R3.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==a1.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===a1.MATHML?R3.adjustTokenMathMLAttrs(t):r===a1.SVG&&(R3.adjustTokenSVGTagName(t),R3.adjustTokenSVGAttrs(t)),R3.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function lX(e,t){for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===a1.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}});var SN=E(fu=>{"use strict";fu.__esModule=!0;function VJ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var SJ=typeof Object.is=="function"?Object.is:VJ;fu.default=SJ});var EN=E(Vt=>{"use strict";Vt.__esModule=!0;Vt.useChangeAwareLayoutEffect=Vt.useChangeAwareEffect=void 0;var l7=X1(),LJ=SN();Vt.useChangeAwareEffect=function(e,t){LN(l7.useEffect,e,t)};Vt.useChangeAwareLayoutEffect=function(e,t){LN(l7.useLayoutEffect,e,t)};var LN=function(e,t,n){var r=l7.useRef({}),c=l7.useRef(!0);e(function(){var a=0,i=Object.keys(n||{}).reduce(function(o,l){var f=c.current||!LJ.default(n[l],r.current[l]);return a+=f?1:0,o[l]={change:f,notChange:!f},o},{}),s={did:i,previous:EJ(r.current),changeCount:a,isMount:c.current};return r.current=n,c.current=!1,t(s)},NJ(n))},EJ=typeof Object.assign=="function"?Object.assign:xJ;function xJ(e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},{})}function NJ(e){return e&&Object.keys(e).map(function(t){return e[t]})}});var FN=E(R4=>{"use strict";Object.defineProperty(R4,"__esModule",{value:!0});var _N="fas",PN="check",ON=512,RN=512,mu=[10003,10004],IN="f00c",DN="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z";R4.definition={prefix:_N,iconName:PN,icon:[ON,RN,mu,IN,DN]};R4.faCheck=R4.definition;R4.prefix=_N;R4.iconName=PN;R4.width=ON;R4.height=RN;R4.ligatures=mu;R4.unicode=IN;R4.svgPathData=DN;R4.aliases=mu});var KN=E(I4=>{"use strict";Object.defineProperty(I4,"__esModule",{value:!0});var BN="fas",UN="circle-xmark",jN=512,GN=512,pu=[61532,"times-circle","xmark-circle"],qN="f057",WN="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z";I4.definition={prefix:BN,iconName:UN,icon:[jN,GN,pu,qN,WN]};I4.faCircleXmark=I4.definition;I4.prefix=BN;I4.iconName=UN;I4.width=jN;I4.height=GN;I4.ligatures=pu;I4.unicode=qN;I4.svgPathData=WN;I4.aliases=pu});var eA=E(D4=>{"use strict";Object.defineProperty(D4,"__esModule",{value:!0});var $N="fas",YN="spinner",QN=512,XN=512,du=[],JN="f110",ZN="M304 48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zm0 416c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM48 304c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zm464-48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM142.9 437c18.7-18.7 18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zm0-294.2c18.7-18.7 18.7-49.1 0-67.9S93.7 56.2 75 75s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zM369.1 437c18.7 18.7 49.1 18.7 67.9 0s18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9z";D4.definition={prefix:$N,iconName:YN,icon:[QN,XN,du,JN,ZN]};D4.faSpinner=D4.definition;D4.prefix=$N;D4.iconName=YN;D4.width=QN;D4.height=XN;D4.ligatures=du;D4.unicode=JN;D4.svgPathData=ZN;D4.aliases=du});var EA=E(F4=>{"use strict";Object.defineProperty(F4,"__esModule",{value:!0});var zA="fas",yA="plug",TA=384,VA=512,Cu=[128268],SA="f1e6",LA="M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z";F4.definition={prefix:zA,iconName:yA,icon:[TA,VA,Cu,SA,LA]};F4.faPlug=F4.definition;F4.prefix=zA;F4.iconName=yA;F4.width=TA;F4.height=VA;F4.ligatures=Cu;F4.unicode=SA;F4.svgPathData=LA;F4.aliases=Cu});var NZ={};U8(NZ,{PLUGIN_UPDATES_MANAGER_VIEW_TYPE:()=>c3,default:()=>p7});module.exports=OA(NZ);var T2=require("obsidian"),Lt=e1(X1()),AA=e1(eh());var Ph=e1(Rs()),Oh=e1(sh());var Is=e1(_s());function vk(e){e()}var oh=vk,lh=e=>oh=e,fh=()=>oh;var d5=e1(X1());var mh=e1(X1());var uh=e1(X1()),n4=uh.default.createContext(null);function m5(){return(0,mh.useContext)(n4)}var p5=()=>{throw new Error("uSES not initialized!")};var ph=p5,dh=e=>{ph=e},gk=(e,t)=>e===t;function hh(e=n4){let t=e===n4?m5:()=>(0,d5.useContext)(e);return function(r,c=gk){let{store:a,subscription:i,getServerState:s}=t(),o=ph(i.addNestedSub,a.getState,s||a.getState,r,c);return(0,d5.useDebugValue)(o),o}}var Ds=hh();var Fk=e1(qs()),O5=e1(X1()),Bk=e1(Nh());function Rk(){let e=fh(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],c=t;for(;c;)r.push(c),c=c.next;return r},subscribe(r){let c=!0,a=n={callback:r,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!c||t===null||(c=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var wh={notify(){},get:()=>[]};function $s(e,t){let n,r=wh;function c(m){return o(),r.subscribe(m)}function a(){r.notify()}function i(){f.onStateChange&&f.onStateChange()}function s(){return Boolean(n)}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Rk())}function l(){n&&(n(),n=void 0,r.clear(),r=wh)}let f={addNestedSub:c,notifyNestedSubs:a,handleChangeWrapper:i,isSubscribed:s,trySubscribe:o,tryUnsubscribe:l,getListeners:()=>r};return f}var P5=e1(X1()),Ik=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",Ys=Ik?P5.useLayoutEffect:P5.useEffect;var Uk=p5,bh=e=>{Uk=e};var zn=e1(X1());function jk({store:e,context:t,children:n,serverState:r}){let c=(0,zn.useMemo)(()=>{let s=$s(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),a=(0,zn.useMemo)(()=>e.getState(),[e]);Ys(()=>{let{subscription:s}=c;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[c,a]);let i=t||n4;return zn.default.createElement(i.Provider,{value:c},n)}var Qs=jk;var kh=e1(X1());function R5(e=n4){let t=e===n4?m5:()=>(0,kh.useContext)(e);return function(){let{store:r}=t();return r}}var Xs=R5();function _h(e=n4){let t=e===n4?Xs:R5(e);return function(){return t().dispatch}}var Js=_h();dh(Oh.useSyncExternalStoreWithSelector);bh(Ph.useSyncExternalStore);lh(Is.unstable_batchedUpdates);var DT=e1(jh());function Gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,r)}return n}function r1(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;c--){var a=n[c],i=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=a)}return c2.head.insertBefore(t,r),e}}var p_="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Nn(){for(var e=12,t="";e-- >0;)t+=p_[Math.random()*62|0];return t}function I0(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function zo(e){return e.classList?I0(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Ev(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function d_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Ev(e[n]),'" ')},"").trim()}function J5(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function yo(e){return e.size!==w3.size||e.x!==w3.x||e.y!==w3.y||e.rotate!==w3.rotate||e.flipX||e.flipY}function h_(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,c={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(t.x*32,", ").concat(t.y*32,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),o={transform:"".concat(a," ").concat(i," ").concat(s)},l={transform:"translate(".concat(r/2*-1," -256)")};return{outer:c,inner:o,path:l}}function v_(e){var t=e.transform,n=e.width,r=n===void 0?ao:n,c=e.height,a=c===void 0?ao:c,i=e.startCentered,s=i===void 0?!1:i,o="";return s&&Mv?o+="translate(".concat(t.x/Ue-r/2,"em, ").concat(t.y/Ue-a/2,"em) "):s?o+="translate(calc(-50% + ".concat(t.x/Ue,"em), calc(-50% + ").concat(t.y/Ue,"em)) "):o+="translate(".concat(t.x/Ue,"em, ").concat(t.y/Ue,"em) "),o+="scale(".concat(t.size/Ue*(t.flipX?-1:1),", ").concat(t.size/Ue*(t.flipY?-1:1),") "),o+="rotate(".concat(t.rotate,"deg) "),o}var g_=`:root, :host { + --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; + --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; + --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; + --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; + --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; + --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; + --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; +} + +svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { + overflow: visible; + box-sizing: content-box; +} + +.svg-inline--fa { + display: var(--fa-display, inline-block); + height: 1em; + overflow: visible; + vertical-align: -0.125em; +} +.svg-inline--fa.fa-2xs { + vertical-align: 0.1em; +} +.svg-inline--fa.fa-xs { + vertical-align: 0em; +} +.svg-inline--fa.fa-sm { + vertical-align: -0.0714285705em; +} +.svg-inline--fa.fa-lg { + vertical-align: -0.2em; +} +.svg-inline--fa.fa-xl { + vertical-align: -0.25em; +} +.svg-inline--fa.fa-2xl { + vertical-align: -0.3125em; +} +.svg-inline--fa.fa-pull-left { + margin-right: var(--fa-pull-margin, 0.3em); + width: auto; +} +.svg-inline--fa.fa-pull-right { + margin-left: var(--fa-pull-margin, 0.3em); + width: auto; +} +.svg-inline--fa.fa-li { + width: var(--fa-li-width, 2em); + top: 0.25em; +} +.svg-inline--fa.fa-fw { + width: var(--fa-fw-width, 1.25em); +} + +.fa-layers svg.svg-inline--fa { + bottom: 0; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; +} + +.fa-layers-counter, .fa-layers-text { + display: inline-block; + position: absolute; + text-align: center; +} + +.fa-layers { + display: inline-block; + height: 1em; + position: relative; + text-align: center; + vertical-align: -0.125em; + width: 1em; +} +.fa-layers svg.svg-inline--fa { + -webkit-transform-origin: center center; + transform-origin: center center; +} + +.fa-layers-text { + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + -webkit-transform-origin: center center; + transform-origin: center center; +} + +.fa-layers-counter { + background-color: var(--fa-counter-background-color, #ff253a); + border-radius: var(--fa-counter-border-radius, 1em); + box-sizing: border-box; + color: var(--fa-inverse, #fff); + line-height: var(--fa-counter-line-height, 1); + max-width: var(--fa-counter-max-width, 5em); + min-width: var(--fa-counter-min-width, 1.5em); + overflow: hidden; + padding: var(--fa-counter-padding, 0.25em 0.5em); + right: var(--fa-right, 0); + text-overflow: ellipsis; + top: var(--fa-top, 0); + -webkit-transform: scale(var(--fa-counter-scale, 0.25)); + transform: scale(var(--fa-counter-scale, 0.25)); + -webkit-transform-origin: top right; + transform-origin: top right; +} + +.fa-layers-bottom-right { + bottom: var(--fa-bottom, 0); + right: var(--fa-right, 0); + top: auto; + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: bottom right; + transform-origin: bottom right; +} + +.fa-layers-bottom-left { + bottom: var(--fa-bottom, 0); + left: var(--fa-left, 0); + right: auto; + top: auto; + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: bottom left; + transform-origin: bottom left; +} + +.fa-layers-top-right { + top: var(--fa-top, 0); + right: var(--fa-right, 0); + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: top right; + transform-origin: top right; +} + +.fa-layers-top-left { + left: var(--fa-left, 0); + right: auto; + top: var(--fa-top, 0); + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: top left; + transform-origin: top left; +} + +.fa-1x { + font-size: 1em; +} + +.fa-2x { + font-size: 2em; +} + +.fa-3x { + font-size: 3em; +} + +.fa-4x { + font-size: 4em; +} + +.fa-5x { + font-size: 5em; +} + +.fa-6x { + font-size: 6em; +} + +.fa-7x { + font-size: 7em; +} + +.fa-8x { + font-size: 8em; +} + +.fa-9x { + font-size: 9em; +} + +.fa-10x { + font-size: 10em; +} + +.fa-2xs { + font-size: 0.625em; + line-height: 0.1em; + vertical-align: 0.225em; +} + +.fa-xs { + font-size: 0.75em; + line-height: 0.0833333337em; + vertical-align: 0.125em; +} + +.fa-sm { + font-size: 0.875em; + line-height: 0.0714285718em; + vertical-align: 0.0535714295em; +} + +.fa-lg { + font-size: 1.25em; + line-height: 0.05em; + vertical-align: -0.075em; +} + +.fa-xl { + font-size: 1.5em; + line-height: 0.0416666682em; + vertical-align: -0.125em; +} + +.fa-2xl { + font-size: 2em; + line-height: 0.03125em; + vertical-align: -0.1875em; +} + +.fa-fw { + text-align: center; + width: 1.25em; +} + +.fa-ul { + list-style-type: none; + margin-left: var(--fa-li-margin, 2.5em); + padding-left: 0; +} +.fa-ul > li { + position: relative; +} + +.fa-li { + left: calc(var(--fa-li-width, 2em) * -1); + position: absolute; + text-align: center; + width: var(--fa-li-width, 2em); + line-height: inherit; +} + +.fa-border { + border-color: var(--fa-border-color, #eee); + border-radius: var(--fa-border-radius, 0.1em); + border-style: var(--fa-border-style, solid); + border-width: var(--fa-border-width, 0.08em); + padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); +} + +.fa-pull-left { + float: left; + margin-right: var(--fa-pull-margin, 0.3em); +} + +.fa-pull-right { + float: right; + margin-left: var(--fa-pull-margin, 0.3em); +} + +.fa-beat { + -webkit-animation-name: fa-beat; + animation-name: fa-beat; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); + animation-timing-function: var(--fa-animation-timing, ease-in-out); +} + +.fa-bounce { + -webkit-animation-name: fa-bounce; + animation-name: fa-bounce; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); +} + +.fa-fade { + -webkit-animation-name: fa-fade; + animation-name: fa-fade; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); +} + +.fa-beat-fade { + -webkit-animation-name: fa-beat-fade; + animation-name: fa-beat-fade; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); +} + +.fa-flip { + -webkit-animation-name: fa-flip; + animation-name: fa-flip; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); + animation-timing-function: var(--fa-animation-timing, ease-in-out); +} + +.fa-shake { + -webkit-animation-name: fa-shake; + animation-name: fa-shake; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, linear); + animation-timing-function: var(--fa-animation-timing, linear); +} + +.fa-spin { + -webkit-animation-name: fa-spin; + animation-name: fa-spin; + -webkit-animation-delay: var(--fa-animation-delay, 0s); + animation-delay: var(--fa-animation-delay, 0s); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 2s); + animation-duration: var(--fa-animation-duration, 2s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, linear); + animation-timing-function: var(--fa-animation-timing, linear); +} + +.fa-spin-reverse { + --fa-animation-direction: reverse; +} + +.fa-pulse, +.fa-spin-pulse { + -webkit-animation-name: fa-spin; + animation-name: fa-spin; + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); + animation-timing-function: var(--fa-animation-timing, steps(8)); +} + +@media (prefers-reduced-motion: reduce) { + .fa-beat, +.fa-bounce, +.fa-fade, +.fa-beat-fade, +.fa-flip, +.fa-pulse, +.fa-shake, +.fa-spin, +.fa-spin-pulse { + -webkit-animation-delay: -1ms; + animation-delay: -1ms; + -webkit-animation-duration: 1ms; + animation-duration: 1ms; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; + transition-delay: 0s; + transition-duration: 0s; + } +} +@-webkit-keyframes fa-beat { + 0%, 90% { + -webkit-transform: scale(1); + transform: scale(1); + } + 45% { + -webkit-transform: scale(var(--fa-beat-scale, 1.25)); + transform: scale(var(--fa-beat-scale, 1.25)); + } +} +@keyframes fa-beat { + 0%, 90% { + -webkit-transform: scale(1); + transform: scale(1); + } + 45% { + -webkit-transform: scale(var(--fa-beat-scale, 1.25)); + transform: scale(var(--fa-beat-scale, 1.25)); + } +} +@-webkit-keyframes fa-bounce { + 0% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 10% { + -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + } + 30% { + -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + } + 50% { + -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + } + 57% { + -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + } + 64% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 100% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } +} +@keyframes fa-bounce { + 0% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 10% { + -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + } + 30% { + -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + } + 50% { + -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + } + 57% { + -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + } + 64% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 100% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } +} +@-webkit-keyframes fa-fade { + 50% { + opacity: var(--fa-fade-opacity, 0.4); + } +} +@keyframes fa-fade { + 50% { + opacity: var(--fa-fade-opacity, 0.4); + } +} +@-webkit-keyframes fa-beat-fade { + 0%, 100% { + opacity: var(--fa-beat-fade-opacity, 0.4); + -webkit-transform: scale(1); + transform: scale(1); + } + 50% { + opacity: 1; + -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); + transform: scale(var(--fa-beat-fade-scale, 1.125)); + } +} +@keyframes fa-beat-fade { + 0%, 100% { + opacity: var(--fa-beat-fade-opacity, 0.4); + -webkit-transform: scale(1); + transform: scale(1); + } + 50% { + opacity: 1; + -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); + transform: scale(var(--fa-beat-fade-scale, 1.125)); + } +} +@-webkit-keyframes fa-flip { + 50% { + -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + } +} +@keyframes fa-flip { + 50% { + -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + } +} +@-webkit-keyframes fa-shake { + 0% { + -webkit-transform: rotate(-15deg); + transform: rotate(-15deg); + } + 4% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + 8%, 24% { + -webkit-transform: rotate(-18deg); + transform: rotate(-18deg); + } + 12%, 28% { + -webkit-transform: rotate(18deg); + transform: rotate(18deg); + } + 16% { + -webkit-transform: rotate(-22deg); + transform: rotate(-22deg); + } + 20% { + -webkit-transform: rotate(22deg); + transform: rotate(22deg); + } + 32% { + -webkit-transform: rotate(-12deg); + transform: rotate(-12deg); + } + 36% { + -webkit-transform: rotate(12deg); + transform: rotate(12deg); + } + 40%, 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} +@keyframes fa-shake { + 0% { + -webkit-transform: rotate(-15deg); + transform: rotate(-15deg); + } + 4% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + 8%, 24% { + -webkit-transform: rotate(-18deg); + transform: rotate(-18deg); + } + 12%, 28% { + -webkit-transform: rotate(18deg); + transform: rotate(18deg); + } + 16% { + -webkit-transform: rotate(-22deg); + transform: rotate(-22deg); + } + 20% { + -webkit-transform: rotate(22deg); + transform: rotate(22deg); + } + 32% { + -webkit-transform: rotate(-12deg); + transform: rotate(-12deg); + } + 36% { + -webkit-transform: rotate(12deg); + transform: rotate(12deg); + } + 40%, 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.fa-rotate-90 { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} + +.fa-rotate-180 { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} + +.fa-rotate-270 { + -webkit-transform: rotate(270deg); + transform: rotate(270deg); +} + +.fa-flip-horizontal { + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.fa-flip-vertical { + -webkit-transform: scale(1, -1); + transform: scale(1, -1); +} + +.fa-flip-both, +.fa-flip-horizontal.fa-flip-vertical { + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); +} + +.fa-rotate-by { + -webkit-transform: rotate(var(--fa-rotate-angle, none)); + transform: rotate(var(--fa-rotate-angle, none)); +} + +.fa-stack { + display: inline-block; + vertical-align: middle; + height: 2em; + position: relative; + width: 2.5em; +} + +.fa-stack-1x, +.fa-stack-2x { + bottom: 0; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; + z-index: var(--fa-stack-z-index, auto); +} + +.svg-inline--fa.fa-stack-1x { + height: 1em; + width: 1.25em; +} +.svg-inline--fa.fa-stack-2x { + height: 2em; + width: 2.5em; +} + +.fa-inverse { + color: var(--fa-inverse, #fff); +} + +.sr-only, +.fa-sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.sr-only-focusable:not(:focus), +.fa-sr-only-focusable:not(:focus) { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.svg-inline--fa .fa-primary { + fill: var(--fa-primary-color, currentColor); + opacity: var(--fa-primary-opacity, 1); +} + +.svg-inline--fa .fa-secondary { + fill: var(--fa-secondary-color, currentColor); + opacity: var(--fa-secondary-opacity, 0.4); +} + +.svg-inline--fa.fa-swap-opacity .fa-primary { + opacity: var(--fa-secondary-opacity, 0.4); +} + +.svg-inline--fa.fa-swap-opacity .fa-secondary { + opacity: var(--fa-primary-opacity, 1); +} + +.svg-inline--fa mask .fa-primary, +.svg-inline--fa mask .fa-secondary { + fill: black; +} + +.fad.fa-inverse, +.fa-duotone.fa-inverse { + color: var(--fa-inverse, #fff); +}`;function xv(){var e=zv,t=yv,n=f1.cssPrefix,r=f1.replacementClass,c=g_;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");c=c.replace(a,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(r))}return c}var Jh=!1;function eo(){f1.autoAddCss&&!Jh&&(m_(xv()),Jh=!0)}var C_={mixout:function(){return{dom:{css:xv,insertCss:eo}}},hooks:function(){return{beforeDOMElementCreation:function(){eo()},beforeI2svg:function(){eo()}}}},ee=je||{};ee[Z3]||(ee[Z3]={});ee[Z3].styles||(ee[Z3].styles={});ee[Z3].hooks||(ee[Z3].hooks={});ee[Z3].shims||(ee[Z3].shims=[]);var p3=ee[Z3],Nv=[],H_=function e(){c2.removeEventListener("DOMContentLoaded",e),Q5=1,Nv.map(function(t){return t()})},Q5=!1;ne&&(Q5=(c2.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(c2.readyState),Q5||c2.addEventListener("DOMContentLoaded",H_));function M_(e){!ne||(Q5?setTimeout(e,0):Nv.push(e))}function bn(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,c=e.children,a=c===void 0?[]:c;return typeof e=="string"?Ev(e):"<".concat(t," ").concat(d_(r),">").concat(a.map(bn).join(""),"")}function Zh(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var z_=function(t,n){return function(r,c,a,i){return t.call(n,r,c,a,i)}},to=function(t,n,r,c){var a=Object.keys(t),i=a.length,s=c!==void 0?z_(n,c):n,o,l,f;for(r===void 0?(o=1,f=t[a[0]]):(o=0,f=r);o=55296&&c<=56319&&n=55296&&r<=56319&&n>t+1&&(c=e.charCodeAt(t+1),c>=56320&&c<=57343)?(r-55296)*1024+c-56320+65536:r}function ev(e){return Object.keys(e).reduce(function(t,n){var r=e[n],c=!!r.icon;return c?t[r.iconName]=r.icon:t[n]=r,t},{})}function oo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,c=r===void 0?!1:r,a=ev(t);typeof p3.hooks.addPack=="function"&&!c?p3.hooks.addPack(e,ev(t)):p3.styles[e]=r1(r1({},p3.styles[e]||{}),a),e==="fas"&&oo("fa",t)}var G5,q5,W5,_0=p3.styles,V_=p3.shims,S_=(G5={},L2(G5,r2,Object.values(En[r2])),L2(G5,d2,Object.values(En[d2])),G5),To=null,Av={},wv={},bv={},kv={},_v={},L_=(q5={},L2(q5,r2,Object.keys(Sn[r2])),L2(q5,d2,Object.keys(Sn[d2])),q5);function E_(e){return~o_.indexOf(e)}function x_(e,t){var n=t.split("-"),r=n[0],c=n.slice(1).join("-");return r===e&&c!==""&&!E_(c)?c:null}var Pv=function(){var t=function(a){return to(_0,function(i,s,o){return i[o]=to(s,a,{}),i},{})};Av=t(function(c,a,i){if(a[3]&&(c[a[3]]=i),a[2]){var s=a[2].filter(function(o){return typeof o=="number"});s.forEach(function(o){c[o.toString(16)]=i})}return c}),wv=t(function(c,a,i){if(c[i]=i,a[2]){var s=a[2].filter(function(o){return typeof o=="string"});s.forEach(function(o){c[o]=i})}return c}),_v=t(function(c,a,i){var s=a[2];return c[i]=i,s.forEach(function(o){c[o]=i}),c});var n="far"in _0||f1.autoFetchSvg,r=to(V_,function(c,a){var i=a[0],s=a[1],o=a[2];return s==="far"&&!n&&(s="fas"),typeof i=="string"&&(c.names[i]={prefix:s,iconName:o}),typeof i=="number"&&(c.unicodes[i.toString(16)]={prefix:s,iconName:o}),c},{names:{},unicodes:{}});bv=r.names,kv=r.unicodes,To=Z5(f1.styleDefault,{family:f1.familyDefault})};u_(function(e){To=Z5(e.styleDefault,{family:f1.familyDefault})});Pv();function Vo(e,t){return(Av[e]||{})[t]}function N_(e,t){return(wv[e]||{})[t]}function x6(e,t){return(_v[e]||{})[t]}function Ov(e){return bv[e]||{prefix:null,iconName:null}}function A_(e){var t=kv[e],n=Vo("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ge(){return To}var So=function(){return{prefix:null,iconName:null,rest:[]}};function Z5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?r2:n,c=Sn[r][e],a=Ln[r][e]||Ln[r][c],i=e in p3.styles?e:null;return a||i||null}var tv=(W5={},L2(W5,r2,Object.keys(En[r2])),L2(W5,d2,Object.keys(En[d2])),W5);function ec(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,c=r===void 0?!1:r,a=(t={},L2(t,r2,"".concat(f1.cssPrefix,"-").concat(r2)),L2(t,d2,"".concat(f1.cssPrefix,"-").concat(d2)),t),i=null,s=r2;(e.includes(a[r2])||e.some(function(l){return tv[r2].includes(l)}))&&(s=r2),(e.includes(a[d2])||e.some(function(l){return tv[d2].includes(l)}))&&(s=d2);var o=e.reduce(function(l,f){var m=x_(f1.cssPrefix,f);if(_0[f]?(f=S_[s].includes(f)?n_[s][f]:f,i=f,l.prefix=f):L_[s].indexOf(f)>-1?(i=f,l.prefix=Z5(f,{family:s})):m?l.iconName=m:f!==f1.replacementClass&&f!==a[r2]&&f!==a[d2]&&l.rest.push(f),!c&&l.prefix&&l.iconName){var p=i==="fa"?Ov(l.iconName):{},h=x6(l.prefix,l.iconName);p.prefix&&(i=null),l.iconName=p.iconName||h||l.iconName,l.prefix=p.prefix||l.prefix,l.prefix==="far"&&!_0.far&&_0.fas&&!f1.autoFetchSvg&&(l.prefix="fas")}return l},So());return(e.includes("fa-brands")||e.includes("fab"))&&(o.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(o.prefix="fad"),!o.prefix&&s===d2&&(_0.fass||f1.autoFetchSvg)&&(o.prefix="fass",o.iconName=x6(o.prefix,o.iconName)||o.iconName),(o.prefix==="fa"||i==="fa")&&(o.prefix=Ge()||"fas"),o}var w_=function(){function e(){Gk(this,e),this.definitions={}}return qk(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,c=new Array(r),a=0;a0&&f.forEach(function(m){typeof m=="string"&&(n[s][m]=l)}),n[s][o]=l}),n}}]),e}(),nv=[],P0={},O0={},b_=Object.keys(O0);function k_(e,t){var n=t.mixoutsTo;return nv=e,P0={},Object.keys(O0).forEach(function(r){b_.indexOf(r)===-1&&delete O0[r]}),nv.forEach(function(r){var c=r.mixout?r.mixout():{};if(Object.keys(c).forEach(function(i){typeof c[i]=="function"&&(n[i]=c[i]),Y5(c[i])==="object"&&Object.keys(c[i]).forEach(function(s){n[i]||(n[i]={}),n[i][s]=c[i][s]})}),r.hooks){var a=r.hooks();Object.keys(a).forEach(function(i){P0[i]||(P0[i]=[]),P0[i].push(a[i])})}r.provides&&r.provides(O0)}),n}function lo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),c=2;c1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return ne?(A6("beforeI2svg",t),te("pseudoElements2svg",t),te("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;f1.autoReplaceSvg===!1&&(f1.autoReplaceSvg=!0),f1.observeMutations=!0,M_(function(){R_({autoReplaceSvgRoot:n}),A6("watch",t)})}},O_={icon:function(t){if(t===null)return null;if(Y5(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:x6(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=Z5(t[0]);return{prefix:r,iconName:x6(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(f1.cssPrefix,"-"))>-1||t.match(r_))){var c=ec(t.split(" "),{skipLookups:!0});return{prefix:c.prefix||Ge(),iconName:x6(c.prefix,c.iconName)||c.iconName}}if(typeof t=="string"){var a=Ge();return{prefix:a,iconName:x6(a,t)||t}}}},N4={noAuto:__,config:f1,dom:P_,parse:O_,library:Rv,findIconDefinition:fo,toHtml:bn},R_=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?c2:n;(Object.keys(p3.styles).length>0||f1.autoFetchSvg)&&ne&&f1.autoReplaceSvg&&N4.dom.i2svg({node:r})};function tc(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return bn(r)})}}),Object.defineProperty(e,"node",{get:function(){if(!!ne){var r=c2.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function I_(e){var t=e.children,n=e.main,r=e.mask,c=e.attributes,a=e.styles,i=e.transform;if(yo(i)&&n.found&&!r.found){var s=n.width,o=n.height,l={x:s/o/2,y:.5};c.style=J5(r1(r1({},a),{},{"transform-origin":"".concat(l.x+i.x/16,"em ").concat(l.y+i.y/16,"em")}))}return[{tag:"svg",attributes:c,children:t}]}function D_(e){var t=e.prefix,n=e.iconName,r=e.children,c=e.attributes,a=e.symbol,i=a===!0?"".concat(t,"-").concat(f1.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:r1(r1({},c),{},{id:i}),children:r}]}]}function Lo(e){var t=e.icons,n=t.main,r=t.mask,c=e.prefix,a=e.iconName,i=e.transform,s=e.symbol,o=e.title,l=e.maskId,f=e.titleId,m=e.extra,p=e.watchable,h=p===void 0?!1:p,v=r.found?r:n,H=v.width,y=v.height,d=c==="fak",g=[f1.replacementClass,a?"".concat(f1.cssPrefix,"-").concat(a):""].filter(function(W){return m.classes.indexOf(W)===-1}).filter(function(W){return W!==""||!!W}).concat(m.classes).join(" "),z={children:[],attributes:r1(r1({},m.attributes),{},{"data-prefix":c,"data-icon":a,class:g,role:m.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(H," ").concat(y)})},S=d&&!~m.classes.indexOf("fa-fw")?{width:"".concat(H/y*16*.0625,"em")}:{};h&&(z.attributes[N6]=""),o&&(z.children.push({tag:"title",attributes:{id:z.attributes["aria-labelledby"]||"title-".concat(f||Nn())},children:[o]}),delete z.attributes.title);var w=r1(r1({},z),{},{prefix:c,iconName:a,main:n,mask:r,maskId:l,transform:i,symbol:s,styles:r1(r1({},S),m.styles)}),L=r.found&&n.found?te("generateAbstractMask",w)||{children:[],attributes:{}}:te("generateAbstractIcon",w)||{children:[],attributes:{}},N=L.children,k=L.attributes;return w.children=N,w.attributes=k,s?D_(w):I_(w)}function rv(e){var t=e.content,n=e.width,r=e.height,c=e.transform,a=e.title,i=e.extra,s=e.watchable,o=s===void 0?!1:s,l=r1(r1(r1({},i.attributes),a?{title:a}:{}),{},{class:i.classes.join(" ")});o&&(l[N6]="");var f=r1({},i.styles);yo(c)&&(f.transform=v_({transform:c,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var m=J5(f);m.length>0&&(l.style=m);var p=[];return p.push({tag:"span",attributes:l,children:[t]}),a&&p.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),p}function F_(e){var t=e.content,n=e.title,r=e.extra,c=r1(r1(r1({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),a=J5(r.styles);a.length>0&&(c.style=a);var i=[];return i.push({tag:"span",attributes:c,children:[t]}),n&&i.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),i}var no=p3.styles;function uo(e){var t=e[0],n=e[1],r=e.slice(4),c=vo(r,1),a=c[0],i=null;return Array.isArray(a)?i={tag:"g",attributes:{class:"".concat(f1.cssPrefix,"-").concat(E6.GROUP)},children:[{tag:"path",attributes:{class:"".concat(f1.cssPrefix,"-").concat(E6.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(f1.cssPrefix,"-").concat(E6.PRIMARY),fill:"currentColor",d:a[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:i}}var B_={found:!1,width:512,height:512};function U_(e,t){!Tv&&!f1.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function mo(e,t){var n=t;return t==="fa"&&f1.styleDefault!==null&&(t=Ge()),new Promise(function(r,c){var a={found:!1,width:512,height:512,icon:te("missingIconAbstract")||{}};if(n==="fa"){var i=Ov(e)||{};e=i.iconName||e,t=i.prefix||t}if(e&&t&&no[t]&&no[t][e]){var s=no[t][e];return r(uo(s))}U_(e,t),r(r1(r1({},B_),{},{icon:f1.showMissingIcons&&e?te("missingIconAbstract")||{}:{}}))})}var cv=function(){},po=f1.measurePerformance&&I5&&I5.mark&&I5.measure?I5:{mark:cv,measure:cv},yn='FA "6.2.0"',j_=function(t){return po.mark("".concat(yn," ").concat(t," begins")),function(){return Iv(t)}},Iv=function(t){po.mark("".concat(yn," ").concat(t," ends")),po.measure("".concat(yn," ").concat(t),"".concat(yn," ").concat(t," begins"),"".concat(yn," ").concat(t," ends"))},Eo={begin:j_,end:Iv},K5=function(){};function av(e){var t=e.getAttribute?e.getAttribute(N6):null;return typeof t=="string"}function G_(e){var t=e.getAttribute?e.getAttribute(Co):null,n=e.getAttribute?e.getAttribute(Ho):null;return t&&n}function q_(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(f1.replacementClass)}function W_(){if(f1.autoReplaceSvg===!0)return $5.replace;var e=$5[f1.autoReplaceSvg];return e||$5.replace}function K_(e){return c2.createElementNS("http://www.w3.org/2000/svg",e)}function $_(e){return c2.createElement(e)}function Dv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?K_:$_:n;if(typeof e=="string")return c2.createTextNode(e);var c=r(e.tag);Object.keys(e.attributes||[]).forEach(function(i){c.setAttribute(i,e.attributes[i])});var a=e.children||[];return a.forEach(function(i){c.appendChild(Dv(i,{ceFn:r}))}),c}function Y_(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var $5={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(c){n.parentNode.insertBefore(Dv(c),n)}),n.getAttribute(N6)===null&&f1.keepOriginalSource){var r=c2.createComment(Y_(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~zo(n).indexOf(f1.replacementClass))return $5.replace(t);var c=new RegExp("".concat(f1.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(s,o){return o===f1.replacementClass||o.match(c)?s.toSvg.push(o):s.toNode.push(o),s},{toNode:[],toSvg:[]});r[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",a.toNode.join(" "))}var i=r.map(function(s){return bn(s)}).join(` +`);n.setAttribute(N6,""),n.innerHTML=i}};function iv(e){e()}function Fv(e,t){var n=typeof t=="function"?t:K5;if(e.length===0)n();else{var r=iv;f1.mutateApproach===e_&&(r=je.requestAnimationFrame||iv),r(function(){var c=W_(),a=Eo.begin("mutate");e.map(c),a(),n()})}}var xo=!1;function Bv(){xo=!0}function ho(){xo=!1}var X5=null;function sv(e){if(!!Yh&&!!f1.observeMutations){var t=e.treeCallback,n=t===void 0?K5:t,r=e.nodeCallback,c=r===void 0?K5:r,a=e.pseudoElementsCallback,i=a===void 0?K5:a,s=e.observeMutationsRoot,o=s===void 0?c2:s;X5=new Yh(function(l){if(!xo){var f=Ge();I0(l).forEach(function(m){if(m.type==="childList"&&m.addedNodes.length>0&&!av(m.addedNodes[0])&&(f1.searchPseudoElements&&i(m.target),n(m.target)),m.type==="attributes"&&m.target.parentNode&&f1.searchPseudoElements&&i(m.target.parentNode),m.type==="attributes"&&av(m.target)&&~s_.indexOf(m.attributeName))if(m.attributeName==="class"&&G_(m.target)){var p=ec(zo(m.target)),h=p.prefix,v=p.iconName;m.target.setAttribute(Co,h||f),v&&m.target.setAttribute(Ho,v)}else q_(m.target)&&c(m.target)})}}),ne&&X5.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Q_(){!X5||X5.disconnect()}function X_(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,c){var a=c.split(":"),i=a[0],s=a.slice(1);return i&&s.length>0&&(r[i]=s.join(":").trim()),r},{})),n}function J_(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",c=ec(zo(e));return c.prefix||(c.prefix=Ge()),t&&n&&(c.prefix=t,c.iconName=n),c.iconName&&c.prefix||(c.prefix&&r.length>0&&(c.iconName=N_(c.prefix,e.innerText)||Vo(c.prefix,so(e.innerText))),!c.iconName&&f1.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(c.iconName=e.firstChild.data)),c}function Z_(e){var t=I0(e.attributes).reduce(function(c,a){return c.name!=="class"&&c.name!=="style"&&(c[a.name]=a.value),c},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return f1.autoA11y&&(n?t["aria-labelledby"]="".concat(f1.replacementClass,"-title-").concat(r||Nn()):(t["aria-hidden"]="true",t.focusable="false")),t}function eP(){return{iconName:null,title:null,titleId:null,prefix:null,transform:w3,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function ov(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=J_(e),r=n.iconName,c=n.prefix,a=n.rest,i=Z_(e),s=lo("parseNodeAttributes",{},e),o=t.styleParser?X_(e):[];return r1({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:c,transform:w3,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:o,attributes:i}},s)}var tP=p3.styles;function Uv(e){var t=f1.autoReplaceSvg==="nest"?ov(e,{styleParser:!1}):ov(e);return~t.extra.classes.indexOf(Vv)?te("generateLayersText",e,t):te("generateSvgReplacementMutation",e,t)}var qe=new Set;Mo.map(function(e){qe.add("fa-".concat(e))});Object.keys(Sn[r2]).map(qe.add.bind(qe));Object.keys(Sn[d2]).map(qe.add.bind(qe));qe=An(qe);function lv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ne)return Promise.resolve();var n=c2.documentElement.classList,r=function(m){return n.add("".concat(Qh,"-").concat(m))},c=function(m){return n.remove("".concat(Qh,"-").concat(m))},a=f1.autoFetchSvg?qe:Mo.map(function(f){return"fa-".concat(f)}).concat(Object.keys(tP));a.includes("fa")||a.push("fa");var i=[".".concat(Vv,":not([").concat(N6,"])")].concat(a.map(function(f){return".".concat(f,":not([").concat(N6,"])")})).join(", ");if(i.length===0)return Promise.resolve();var s=[];try{s=I0(e.querySelectorAll(i))}catch(f){}if(s.length>0)r("pending"),c("complete");else return Promise.resolve();var o=Eo.begin("onTree"),l=s.reduce(function(f,m){try{var p=Uv(m);p&&f.push(p)}catch(h){Tv||h.name==="MissingIcon"&&console.error(h)}return f},[]);return new Promise(function(f,m){Promise.all(l).then(function(p){Fv(p,function(){r("active"),r("complete"),c("pending"),typeof t=="function"&&t(),o(),f()})}).catch(function(p){o(),m(p)})})}function nP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Uv(e).then(function(n){n&&Fv([n],t)})}function rP(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:fo(t||{}),c=n.mask;return c&&(c=(c||{}).icon?c:fo(c||{})),e(r,r1(r1({},n),{},{mask:c}))}}var cP=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,c=r===void 0?w3:r,a=n.symbol,i=a===void 0?!1:a,s=n.mask,o=s===void 0?null:s,l=n.maskId,f=l===void 0?null:l,m=n.title,p=m===void 0?null:m,h=n.titleId,v=h===void 0?null:h,H=n.classes,y=H===void 0?[]:H,d=n.attributes,g=d===void 0?{}:d,z=n.styles,S=z===void 0?{}:z;if(!!t){var w=t.prefix,L=t.iconName,N=t.icon;return tc(r1({type:"icon"},t),function(){return A6("beforeDOMElementCreation",{iconDefinition:t,params:n}),f1.autoA11y&&(p?g["aria-labelledby"]="".concat(f1.replacementClass,"-title-").concat(v||Nn()):(g["aria-hidden"]="true",g.focusable="false")),Lo({icons:{main:uo(N),mask:o?uo(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:w,iconName:L,transform:r1(r1({},w3),c),symbol:i,title:p,maskId:f,titleId:v,extra:{attributes:g,styles:S,classes:y}})})}},aP={mixout:function(){return{icon:rP(cP)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=lv,n.nodeCallback=nP,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,c=r===void 0?c2:r,a=n.callback,i=a===void 0?function(){}:a;return lv(c,i)},t.generateSvgReplacementMutation=function(n,r){var c=r.iconName,a=r.title,i=r.titleId,s=r.prefix,o=r.transform,l=r.symbol,f=r.mask,m=r.maskId,p=r.extra;return new Promise(function(h,v){Promise.all([mo(c,s),f.iconName?mo(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(H){var y=vo(H,2),d=y[0],g=y[1];h([n,Lo({icons:{main:d,mask:g},prefix:s,iconName:c,transform:o,symbol:l,maskId:m,title:a,titleId:i,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,c=n.attributes,a=n.main,i=n.transform,s=n.styles,o=J5(s);o.length>0&&(c.style=o);var l;return yo(i)&&(l=te("generateAbstractTransformGrouping",{main:a,transform:i,containerWidth:a.width,iconWidth:a.width})),r.push(l||a.icon),{children:r,attributes:c}}}},iP={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=r.classes,a=c===void 0?[]:c;return tc({type:"layer"},function(){A6("beforeDOMElementCreation",{assembler:n,params:r});var i=[];return n(function(s){Array.isArray(s)?s.map(function(o){i=i.concat(o.abstract)}):i=i.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(f1.cssPrefix,"-layers")].concat(An(a)).join(" ")},children:i}]})}}}},sP={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=r.title,a=c===void 0?null:c,i=r.classes,s=i===void 0?[]:i,o=r.attributes,l=o===void 0?{}:o,f=r.styles,m=f===void 0?{}:f;return tc({type:"counter",content:n},function(){return A6("beforeDOMElementCreation",{content:n,params:r}),F_({content:n.toString(),title:a,extra:{attributes:l,styles:m,classes:["".concat(f1.cssPrefix,"-layers-counter")].concat(An(s))}})})}}}},oP={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=r.transform,a=c===void 0?w3:c,i=r.title,s=i===void 0?null:i,o=r.classes,l=o===void 0?[]:o,f=r.attributes,m=f===void 0?{}:f,p=r.styles,h=p===void 0?{}:p;return tc({type:"text",content:n},function(){return A6("beforeDOMElementCreation",{content:n,params:r}),rv({content:n,transform:r1(r1({},w3),a),title:s,extra:{attributes:m,styles:h,classes:["".concat(f1.cssPrefix,"-layers-text")].concat(An(l))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var c=r.title,a=r.transform,i=r.extra,s=null,o=null;if(Mv){var l=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();s=f.width/l,o=f.height/l}return f1.autoA11y&&!c&&(i.attributes["aria-hidden"]="true"),Promise.resolve([n,rv({content:n.innerHTML,width:s,height:o,transform:a,title:c,extra:i,watchable:!0})])}}},lP=new RegExp('"',"ug"),fv=[1105920,1112319];function fP(e){var t=e.replace(lP,""),n=T_(t,0),r=n>=fv[0]&&n<=fv[1],c=t.length===2?t[0]===t[1]:!1;return{value:so(c?t[0]:t),isSecondary:r||c}}function uv(e,t){var n="".concat(Zk).concat(t.replace(":","-"));return new Promise(function(r,c){if(e.getAttribute(n)!==null)return r();var a=I0(e.children),i=a.filter(function(N){return N.getAttribute(io)===t})[0],s=je.getComputedStyle(e,t),o=s.getPropertyValue("font-family").match(c_),l=s.getPropertyValue("font-weight"),f=s.getPropertyValue("content");if(i&&!o)return e.removeChild(i),r();if(o&&f!=="none"&&f!==""){var m=s.getPropertyValue("content"),p=~["Sharp"].indexOf(o[2])?d2:r2,h=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(o[2])?Ln[p][o[2].toLowerCase()]:a_[p][l],v=fP(m),H=v.value,y=v.isSecondary,d=o[0].startsWith("FontAwesome"),g=Vo(h,H),z=g;if(d){var S=A_(H);S.iconName&&S.prefix&&(g=S.iconName,h=S.prefix)}if(g&&!y&&(!i||i.getAttribute(Co)!==h||i.getAttribute(Ho)!==z)){e.setAttribute(n,z),i&&e.removeChild(i);var w=eP(),L=w.extra;L.attributes[io]=t,mo(g,h).then(function(N){var k=Lo(r1(r1({},w),{},{icons:{main:N,mask:So()},prefix:h,iconName:z,extra:L,watchable:!0})),W=c2.createElement("svg");t==="::before"?e.insertBefore(W,e.firstChild):e.appendChild(W),W.outerHTML=k.map(function(J){return bn(J)}).join(` +`),e.removeAttribute(n),r()}).catch(c)}else r()}else r()})}function uP(e){return Promise.all([uv(e,"::before"),uv(e,"::after")])}function mP(e){return e.parentNode!==document.head&&!~t_.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(io)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function mv(e){if(!!ne)return new Promise(function(t,n){var r=I0(e.querySelectorAll("*")).filter(mP).map(uP),c=Eo.begin("searchPseudoElements");Bv(),Promise.all(r).then(function(){c(),ho(),t()}).catch(function(){c(),ho(),n()})})}var pP={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=mv,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,c=r===void 0?c2:r;f1.searchPseudoElements&&mv(c)}}},pv=!1,dP={mixout:function(){return{dom:{unwatch:function(){Bv(),pv=!0}}}},hooks:function(){return{bootstrap:function(){sv(lo("mutationObserverCallbacks",{}))},noAuto:function(){Q_()},watch:function(n){var r=n.observeMutationsRoot;pv?ho():sv(lo("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},dv=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,c){var a=c.toLowerCase().split("-"),i=a[0],s=a.slice(1).join("-");if(i&&s==="h")return r.flipX=!0,r;if(i&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(i){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},hP={mixout:function(){return{parse:{transform:function(n){return dv(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var c=r.getAttribute("data-fa-transform");return c&&(n.transform=dv(c)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,c=n.transform,a=n.containerWidth,i=n.iconWidth,s={transform:"translate(".concat(a/2," 256)")},o="translate(".concat(c.x*32,", ").concat(c.y*32,") "),l="scale(".concat(c.size/16*(c.flipX?-1:1),", ").concat(c.size/16*(c.flipY?-1:1),") "),f="rotate(".concat(c.rotate," 0 0)"),m={transform:"".concat(o," ").concat(l," ").concat(f)},p={transform:"translate(".concat(i/2*-1," -256)")},h={outer:s,inner:m,path:p};return{tag:"g",attributes:r1({},h.outer),children:[{tag:"g",attributes:r1({},h.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:r1(r1({},r.icon.attributes),h.path)}]}]}}}},ro={x:0,y:0,width:"100%",height:"100%"};function hv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function vP(e){return e.tag==="g"?e.children:[e]}var gP={hooks:function(){return{parseNodeAttributes:function(n,r){var c=r.getAttribute("data-fa-mask"),a=c?ec(c.split(" ").map(function(i){return i.trim()})):So();return a.prefix||(a.prefix=Ge()),n.mask=a,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,c=n.attributes,a=n.main,i=n.mask,s=n.maskId,o=n.transform,l=a.width,f=a.icon,m=i.width,p=i.icon,h=h_({transform:o,containerWidth:m,iconWidth:l}),v={tag:"rect",attributes:r1(r1({},ro),{},{fill:"white"})},H=f.children?{children:f.children.map(hv)}:{},y={tag:"g",attributes:r1({},h.inner),children:[hv(r1({tag:f.tag,attributes:r1(r1({},f.attributes),h.path)},H))]},d={tag:"g",attributes:r1({},h.outer),children:[y]},g="mask-".concat(s||Nn()),z="clip-".concat(s||Nn()),S={tag:"mask",attributes:r1(r1({},ro),{},{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,d]},w={tag:"defs",children:[{tag:"clipPath",attributes:{id:z},children:vP(p)},S]};return r.push(w,{tag:"rect",attributes:r1({fill:"currentColor","clip-path":"url(#".concat(z,")"),mask:"url(#".concat(g,")")},ro)}),{children:r,attributes:c}}}},CP={provides:function(t){var n=!1;je.matchMedia&&(n=je.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],c={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:r1(r1({},c),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=r1(r1({},a),{},{attributeName:"opacity"}),s={tag:"circle",attributes:r1(r1({},c),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:r1(r1({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:r1(r1({},i),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:r1(r1({},c),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:r1(r1({},i),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:r1(r1({},c),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:r1(r1({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},HP={hooks:function(){return{parseNodeAttributes:function(n,r){var c=r.getAttribute("data-fa-symbol"),a=c===null?!1:c===""?!0:c;return n.symbol=a,n}}}},MP=[C_,aP,iP,sP,oP,pP,dP,hP,gP,CP,HP];k_(MP,{mixoutsTo:N4});var k21=N4.noAuto,_21=N4.config,P21=N4.library,O21=N4.dom,nc=N4.parse,R21=N4.findIconDefinition,I21=N4.toHtml,jv=N4.icon,D21=N4.layer,F21=N4.text,B21=N4.counter;var V1=e1(No()),ko=e1(X1());function Xv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,r)}return n}function We(e){for(var t=1;t=0)&&(n[c]=e[c]);return n}function VP(e,t){if(e==null)return{};var n=TP(e,t),r,c;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function wo(e){return SP(e)||LP(e)||EP(e)||xP()}function SP(e){if(Array.isArray(e))return bo(e)}function LP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EP(e,t){if(!!e){if(typeof e=="string")return bo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bo(e,t)}}function bo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(o){return eg(e,o)}),c=Object.keys(t.attributes||{}).reduce(function(o,l){var f=t.attributes[l];switch(l){case"class":o.attrs.className=f,delete t.attributes.class;break;case"style":o.attrs.style=kP(f);break;default:l.indexOf("aria-")===0||l.indexOf("data-")===0?o.attrs[l.toLowerCase()]=f:o.attrs[Zv(l)]=f}return o},{attrs:{}}),a=n.style,i=a===void 0?{}:a,s=VP(n,wP);return c.attrs.style=We(We({},c.attrs.style),i),e.apply(void 0,[t.tag,We(We({},c.attrs),s)].concat(wo(r)))}var tg=!1;try{tg=!0}catch(e){}function _P(){if(!tg&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Jv(e){if(e&&rc(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(nc.icon)return nc.icon(e);if(e===null)return null;if(e&&rc(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function Ao(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?D0({},e,t):{}}var r4=ko.default.forwardRef(function(e,t){var n=e.icon,r=e.mask,c=e.symbol,a=e.className,i=e.title,s=e.titleId,o=e.maskId,l=Jv(n),f=Ao("classes",[].concat(wo(NP(e)),wo(a.split(" ")))),m=Ao("transform",typeof e.transform=="string"?nc.transform(e.transform):e.transform),p=Ao("mask",Jv(r)),h=jv(l,We(We(We(We({},f),m),p),{},{symbol:c,title:i,titleId:s,maskId:o}));if(!h)return _P("Could not find icon",l),null;var v=h.abstract,H={ref:t};return Object.keys(e).forEach(function(y){r4.defaultProps.hasOwnProperty(y)||(H[y]=e[y])}),PP(v[0],H)});r4.displayName="FontAwesomeIcon";r4.propTypes={beat:V1.default.bool,border:V1.default.bool,beatFade:V1.default.bool,bounce:V1.default.bool,className:V1.default.string,fade:V1.default.bool,flash:V1.default.bool,mask:V1.default.oneOfType([V1.default.object,V1.default.array,V1.default.string]),maskId:V1.default.string,fixedWidth:V1.default.bool,inverse:V1.default.bool,flip:V1.default.oneOf([!0,!1,"horizontal","vertical","both"]),icon:V1.default.oneOfType([V1.default.object,V1.default.array,V1.default.string]),listItem:V1.default.bool,pull:V1.default.oneOf(["right","left"]),pulse:V1.default.bool,rotation:V1.default.oneOf([0,90,180,270]),shake:V1.default.bool,size:V1.default.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:V1.default.bool,spinPulse:V1.default.bool,spinReverse:V1.default.bool,symbol:V1.default.oneOfType([V1.default.bool,V1.default.string]),title:V1.default.string,titleId:V1.default.string,transform:V1.default.oneOfType([V1.default.string,V1.default.object]),swapOpacity:V1.default.bool};r4.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var PP=eg.bind(null,ko.default.createElement);var c4=e1(X1());var uc=e1(lg()),o2=e1(X1()),Eg=e1(ug());function WP(e){function t(M,O,F,K,A){for(var n1=0,R=0,v1=0,l1=0,h1,Z,w1=0,Q1=0,u1,e2=u1=h1=0,T1=0,B1=0,B4=0,b1=0,T3=F.length,V3=T3-1,X2,p1="",P1="",F3="",B3="",P;T1h1)&&(b1=(p1=p1.replace(" ",":")).length),0K&&(K=(O=O.trim()).charCodeAt(0)),K){case 38:return O.replace(d,"$1"+M.trim());case 58:return M.trim()+O.replace(d,"$1"+M.trim());default:if(0<1*F&&0R.charCodeAt(8))break;case 115:A=A.replace(R,"-webkit-"+R)+";"+A;break;case 207:case 102:A=A.replace(R,"-webkit-"+(102F.charCodeAt(0)&&(F=F.trim()),C=F,F=[C],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var tO=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,c=0;c=this.groupSizes.length){for(var c=this.groupSizes,a=c.length,i=a;n>=i;)(i<<=1)<0&&re(16,""+n);this.groupSizes=new Uint32Array(i),this.groupSizes.set(c),this.length=i;for(var s=a;s=this.length||this.groupSizes[n]===0)return r;for(var c=this.groupSizes[n],a=this.indexOfGroup(n),i=a+c,s=a;s=Un&&(Un=t+1),oc.set(e,t),fc.set(t,e)},cO="style["+$e+'][data-styled-version="5.3.5"]',aO=new RegExp("^"+$e+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),iO=function(e,t,n){for(var r,c=n.split(","),a=0,i=c.length;a=0;l--){var f=o[l];if(f&&f.nodeType===1&&f.hasAttribute($e))return f}}(n),a=c!==void 0?c.nextSibling:null;r.setAttribute($e,"active"),r.setAttribute("data-styled-version","5.3.5");var i=Bo();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},oO=function(){function e(n){var r=this.element=Ng(n);r.appendChild(document.createTextNode("")),this.sheet=function(c){if(c.sheet)return c.sheet;for(var a=document.styleSheets,i=0,s=a.length;i=0){var c=document.createTextNode(r),a=this.nodes[n];return this.element.insertBefore(c,a||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(m+=p+",")}),a+=""+l+f+'{content:"'+m+`"}/*!sc*/ +`}}}return a}(this)},e}(),mO=/(a)(d)/gi,Tg=function(e){return String.fromCharCode(e+(e>25?39:97))};function Uo(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Tg(t%52)+n;return(Tg(t%52)+n).replace(mO,"$1-$2")}var F0=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ag=function(e){return F0(5381,e)};function wg(e){for(var t=0;t>>0);if(!n.hasNameForId(c,s)){var o=r(i,"."+s,void 0,c);n.insertRules(c,s,o)}a.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,f=F0(this.baseHash,r.hash),m="",p=0;p>>0);if(!n.hasNameForId(c,y)){var d=r(m,"."+y,void 0,c);n.insertRules(c,y,d)}a.push(y)}}return a.join(" ")},e}(),hO=/^\s*\/\/.*$/gm,vO=[":","[",".","#"];function bg(e){var t,n,r,c,a=e===void 0?Ke:e,i=a.options,s=i===void 0?Ke:i,o=a.plugins,l=o===void 0?lc:o,f=new mg(s),m=[],p=function(H){function y(d){if(d)try{H(d+"}")}catch(g){}}return function(d,g,z,S,w,L,N,k,W,J){switch(d){case 1:if(W===0&&g.charCodeAt(0)===64)return H(g+";"),"";break;case 2:if(k===0)return g+"/*|*/";break;case 3:switch(k){case 102:case 112:return H(z[0]+g),"";default:return g+(J===0?"/*|*/":"")}case-2:g.split("/*|*/}").forEach(y)}}}(function(H){m.push(H)}),h=function(H,y,d){return y===0&&vO.indexOf(d[n.length])!==-1||d.match(c)?H:"."+t};function v(H,y,d,g){g===void 0&&(g="&");var z=H.replace(hO,""),S=y&&d?d+" "+y+" { "+z+" }":z;return t=g,n=y,r=new RegExp("\\"+n+"\\b","g"),c=new RegExp("(\\"+n+"\\b){2,}"),f(d||!y?"":y,S)}return f.use([].concat(l,[function(H,y,d){H===2&&d.length&&d[0].lastIndexOf(n)>0&&(d[0]=d[0].replace(r,h))},p,function(H){if(H===-2){var y=m;return m=[],y}}])),v.hash=l.length?l.reduce(function(H,y){return y.name||re(15),F0(H,y.name)},5381).toString():"",v}var $o=o2.default.createContext(),l41=$o.Consumer,Yo=o2.default.createContext(),gO=(Yo.Consumer,new Gn),jo=bg();function kg(){return(0,o2.useContext)($o)||gO}function CO(){return(0,o2.useContext)(Yo)||jo}function HO(e){var t=(0,o2.useState)(e.stylisPlugins),n=t[0],r=t[1],c=kg(),a=(0,o2.useMemo)(function(){var s=c;return e.sheet?s=e.sheet:e.target&&(s=s.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(s=s.reconstructWithOptions({useCSSOMInjection:!1})),s},[e.disableCSSOMInjection,e.sheet,e.target]),i=(0,o2.useMemo)(function(){return bg({options:{prefix:!e.disableVendorPrefixes},plugins:n})},[e.disableVendorPrefixes,n]);return(0,o2.useEffect)(function(){(0,Eg.default)(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),o2.default.createElement($o.Provider,{value:a},o2.default.createElement(Yo.Provider,{value:i},e.children))}var MO=function(){function e(t,n){var r=this;this.inject=function(c,a){a===void 0&&(a=jo);var i=r.name+a.hash;c.hasNameForId(r.id,i)||c.insertRules(r.id,i,a(r.rules,i,"@keyframes"))},this.toString=function(){return re(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=jo),this.name+t.hash},e}(),zO=/([A-Z])/,yO=/([A-Z])/g,TO=/^ms-/,VO=function(e){return"-"+e.toLowerCase()};function Vg(e){return zO.test(e)?e.replace(yO,VO).replace(TO,"-ms-"):e}var Sg=function(e){return e==null||e===!1||e===""};function w6(e,t,n,r){if(Array.isArray(e)){for(var c,a=[],i=0,s=e.length;i1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,xO=/(^-|-$)/g;function Ro(e){return e.replace(EO,"-").replace(xO,"")}var NO=function(e){return Uo(Ag(e)>>>0)};function sc(e){return typeof e=="string"&&!0}var Go=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},AO=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function wO(e,t,n){var r=e[n];Go(t)&&Go(r)?_g(r,t):e[n]=t}function _g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(J[k]=L[k]);return J}(t,["componentId"]),w=z&&z+"-"+(sc(g)?g:Ro(zg(g)));return Og(g,b3({},S,{attrs:p,componentId:w}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(g){this._foldedDefaultProps=r?_g({},e.defaultProps,g):g}}),v.toString=function(){return"."+v.styledComponentId},c&&(0,xg.default)(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var qo=function(e){return function t(n,r,c){if(c===void 0&&(c=Ke),!(0,uc.isValidElementType)(r))return re(1,String(r));var a=function(){return n(r,c,SO.apply(void 0,arguments))};return a.withConfig=function(i){return t(n,r,b3({},c,{},i))},a.attrs=function(i){return t(n,r,b3({},c,{attrs:Array.prototype.concat(c.attrs,i).filter(Boolean)}))},a}(Og,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){qo[e]=qo(e)});var u41=function(){function e(n,r){this.rules=n,this.componentId=r,this.isStatic=wg(n),Gn.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(n,r,c,a){var i=a(w6(this.rules,r,c,a).join(""),""),s=this.componentId+n;c.insertRules(s,s,i)},t.removeStyles=function(n,r){r.clearRules(this.componentId+n)},t.renderStyles=function(n,r,c,a){n>2&&Gn.registerId(this.componentId+n),this.removeStyles(n,c),this.createStyles(n,r,c,a)},e}();var m41=function(){function e(){var n=this;this._emitSheetCSS=function(){var r=n.instance.toString();if(!r)return"";var c=Bo();return""},this.getStyleTags=function(){return n.sealed?re(2):n._emitSheetCSS()},this.getStyleElement=function(){var r;if(n.sealed)return re(2);var c=((r={})[$e]="",r["data-styled-version"]="5.3.5",r.dangerouslySetInnerHTML={__html:n.instance.toString()},r),a=Bo();return a&&(c.nonce=a),[o2.default.createElement("style",b3({},c,{key:"sc-0-0"}))]},this.seal=function(){n.sealed=!0},this.instance=new Gn({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(n){return this.sealed?re(2):o2.default.createElement(HO,{sheet:this.instance},n)},t.interleaveWithNodeStream=function(n){return re(3)},e}();var M1=qo;var Xg=e1(mc());function ce(e,t){return e==null||e.length===0?{}:e.reduce((n,r)=>{let c;return(0,Xg.default)(t)?c=t(r):c=new String(r[t]).toString(),n[c]=r,n},{})}var Jg=/^(\d+)\.(\d+)\.(\d+).*/;function U0(e,t){if(e==t)return 0;if(e==null)return-1;if(t==null)return 1;let n=e.match(Jg),r=t.match(Jg);if(!n&&!r)return 0;if(n){if(!r)return 1}else return-1;let c=1;for(;c<=3;){let a=parseInt(n[c]),i=parseInt(r[c]);if(a!==i)return a-i;c++}return 0}function Q4(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:a9(e)?2:i9(e)?3:0}function j0(e,t){return q0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rR(e,t){return q0(e)===2?e.get(t):e[t]}function iC(e,t,n){var r=q0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function sC(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function a9(e){return oR&&e instanceof Map}function i9(e){return lR&&e instanceof Set}function Ye(e){return e.o||e.t}function s9(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=fC(e);delete t[l2];for(var n=G0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=cR),Object.freeze(e),t&&b6(e,function(n,r){return o9(r,!0)},!0)),e}function cR(){Q4(2)}function l9(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function _3(e){var t=c9[e];return t||Q4(18,e),t}function aR(e,t){c9[e]||(c9[e]=t)}function t9(){return Yn}function Xo(e,t){t&&(_3("Patches"),e.u=[],e.s=[],e.v=t)}function pc(e){n9(e),e.p.forEach(iR),e.p=null}function n9(e){e===Yn&&(Yn=e.l)}function Zg(e){return Yn={p:[],l:Yn,h:e,m:!0,_:0}}function iR(e){var t=e[l2];t.i===0||t.i===1?t.j():t.O=!0}function Jo(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||_3("ES5").S(t,e,r),r?(n[l2].P&&(pc(t),Q4(4)),h3(e)&&(e=dc(t,e),t.l||hc(t,e)),t.u&&_3("Patches").M(n[l2].t,e,t.u,t.s)):e=dc(t,n,[]),pc(t),t.u&&t.v(t.u,t.s),e!==lC?e:void 0}function dc(e,t,n){if(l9(t))return t;var r=t[l2];if(!r)return b6(t,function(a,i){return eC(e,r,t,a,i,n)},!0),t;if(r.A!==e)return t;if(!r.P)return hc(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var c=r.i===4||r.i===5?r.o=s9(r.k):r.o;b6(r.i===3?new Set(c):c,function(a,i){return eC(e,r,c,a,i,n)}),hc(e,c,!1),n&&e.u&&_3("Patches").R(r,n,e.u,e.s)}return r.o}function eC(e,t,n,r,c,a){if(ae(c)){var i=dc(e,c,a&&t&&t.i!==3&&!j0(t.D,r)?a.concat(r):void 0);if(iC(n,r,i),!ae(i))return;e.m=!1}if(h3(c)&&!l9(c)){if(!e.h.F&&e._<1)return;dc(e,c),t&&t.A.l||hc(e,c)}}function hc(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&o9(t,n)}function Zo(e,t){var n=e[l2];return(n?Ye(n):e)[t]}function tC(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Qe(e){e.P||(e.P=!0,e.l&&Qe(e.l))}function e9(e){e.o||(e.o=s9(e.t))}function r9(e,t,n){var r=a9(t)?_3("MapSet").N(t,n):i9(t)?_3("MapSet").T(t,n):e.g?function(c,a){var i=Array.isArray(c),s={i:i?1:0,A:a?a.A:t9(),P:!1,I:!1,D:{},l:a,t:c,k:null,o:null,j:null,C:!1},o=s,l=Qn;i&&(o=[s],l=$n);var f=Proxy.revocable(o,l),m=f.revoke,p=f.proxy;return s.k=p,s.j=m,p}(t,n):_3("ES5").J(t,n);return(n?n.A:t9()).p.push(r),r}function sR(e){return ae(e)||Q4(22,e),function t(n){if(!h3(n))return n;var r,c=n[l2],a=q0(n);if(c){if(!c.P&&(c.i<4||!_3("ES5").K(c)))return c.t;c.I=!0,r=nC(n,a),c.I=!1}else r=nC(n,a);return b6(r,function(i,s){c&&rR(c.t,i)===s||iC(r,i,t(s))}),a===3?new Set(r):r}(e)}function nC(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return s9(e)}function oC(){function e(i,s){var o=a[i];return o?o.enumerable=s:a[i]=o={configurable:!0,enumerable:s,get:function(){var l=this[l2];return Qn.get(l,i)},set:function(l){var f=this[l2];Qn.set(f,i,l)}},o}function t(i){for(var s=i.length-1;s>=0;s--){var o=i[s][l2];if(!o.P)switch(o.i){case 5:r(o)&&Qe(o);break;case 4:n(o)&&Qe(o)}}}function n(i){for(var s=i.t,o=i.k,l=G0(o),f=l.length-1;f>=0;f--){var m=l[f];if(m!==l2){var p=s[m];if(p===void 0&&!j0(s,m))return!0;var h=o[m],v=h&&h[l2];if(v?v.t!==p:!sC(h,p))return!0}}var H=!!s[l2];return l.length!==G0(s).length+(H?0:1)}function r(i){var s=i.k;if(s.length!==i.t.length)return!0;var o=Object.getOwnPropertyDescriptor(s,s.length-1);if(o&&!o.get)return!0;for(var l=0;l1?d-1:0),z=1;z1?f-1:0),p=1;p=0;c--){var a=r[c];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}c>-1&&(r=r.slice(c+1));var i=_3("Patches").$;return ae(n)?i(n,r):this.produce(n,function(s){return i(s,r)})},e}(),A4=new uR,mR=A4.produce,V41=A4.produceWithPatches.bind(A4),S41=A4.setAutoFreeze.bind(A4),L41=A4.setUseProxies.bind(A4),E41=A4.applyPatches.bind(A4),x41=A4.createDraft.bind(A4),N41=A4.finishDraft.bind(A4),vc=mR;function u9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,r)}return n}function gc(e){for(var t=1;t0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]{let n=t.getState(),r=n.obsidian,c=n.releases,a=r.settings,i=ce(c.releases,"obsidianPluginId"),s=ce(e.pluginVersionsToDismiss,"pluginId"),o=Object.keys(s),l={...a.dismissedVersionsByPluginId};for(let m of o){let p=s[m].pluginVersionNumber,h=i[m],v=(0,Jy.default)(h.newVersions,g=>g.versionNumber===p),H=l[m]||{pluginId:m,pluginRepoPath:h.pluginRepoPath,dismissedVersions:[]},y=(0,Xy.default)(H.dismissedVersions,g=>g.versionNumber!==p)||[],d={versionNumber:p,versionName:(v==null?void 0:v.versionName)||p,publishedAt:(v==null?void 0:v.publishedAt)||(0,Qy.default)().format()};l[m]={...H,dismissedVersions:[d,...y]}}let f={...r.settings,dismissedVersionsByPluginId:l};return await e.persistPluginSettings(f),e.pluginVersionsToDismiss});var ET=require("obsidian");var Pc=require("obsidian"),sq="https://jc5gpa3gs7o2uge6iq5mgjd53q0daomi.lambda-url.us-east-1.on.aws/obsidian-plugin-update-tracker",Zy=async e=>{try{let t=await(0,Pc.request)({url:sq,method:"POST",body:JSON.stringify(e),headers:{opuc_request_body_format:"base64Json"}});return JSON.parse(t)}catch(t){throw console.error("Error fetching releases",t),t}},eT=async(e,t)=>{let n=await(0,Pc.requestUrl)({url:`https://api.github.com/repos/${t}/releases/assets/${e}`,method:"GET",headers:{Accept:"application/octet-stream"},throw:!1});if(n.status===200){let r=n.text;return{success:!0,fileContents:r}}else if(n.headers["x-ratelimit-remaining"]==="0"&&n.headers["x-ratelimit-reset"]!=null){let r=parseInt(n.headers["x-ratelimit-reset"])*1e3;return{success:!1,rateLimitResetTimestamp:r}}else throw n};var vT=e1(at()),gT=e1(_c()),CT=e1(rT()),HT=e1(hT()),ie=class{static create(t,n){let r=n.reduce((c,a)=>(c[a.obsidianPluginId]=a,c),{});return(0,CT.default)(t,c=>new ie(c,r[c.id]))}constructor(t,n){this.plugin=t,n!=null&&n.newVersions&&(n={...n,newVersions:(0,HT.default)(n.newVersions,r=>r.publishedAt,"desc")}),this.releases=n}keepReleaseVersions(t){this.releases&&(this.releases.newVersions=(0,gT.default)(this.releases.newVersions,t))}getReleaseVersions(){var t;return((t=this.releases)==null?void 0:t.newVersions)||[]}getPluginId(){return this.plugin.id}getPluginName(){return this.plugin.name}getInstalledVersionNumber(){return this.plugin.version}getLatestVersionNumber(){let t=this.getNewReleaseVersion();return t?t.versionNumber:this.plugin.version}getLatestUpdateTime(){let t=this.getNewReleaseVersion();if(t)return(0,vT.default)(t.updatedAt)}getLatestDownloads(){let t=this.getNewReleaseVersion();return(t==null?void 0:t.downloads)||0}getPluginRepositoryUrl(){var t;return((t=this.releases)==null?void 0:t.pluginRepositoryUrl)||""}getLatestReleaseAssetIds(){let t=this.getNewReleaseVersion();return t==null?void 0:t.fileAssetIds}isLatestVersionABetaVersion(){let t=this.getNewReleaseVersion();return(t==null?void 0:t.isBetaVersion)===!0}getRepoPath(){var t;return(t=this.releases)==null?void 0:t.pluginRepoPath}getNewReleaseVersion(){var t;if((t=this.releases)!=null&&t.newVersions.length)return this.releases.newVersions[0]}};function MT(e){return new Promise(t=>setTimeout(t,e))}function Oc(e){return Object.keys(e.obsidian.selectedPluginsById).filter(t=>e.obsidian.selectedPluginsById[t])}var ST=e1(VT());var s8=e=>{var c,a;let t=e,n=(0,ST.default)((c=t.plugins)==null?void 0:c.manifests)||[],r;if(((a=t.plugins)==null?void 0:a.enabledPlugins)instanceof Set){r={};for(let i of t.plugins.enabledPlugins)r[i]=!0}return LT({manifests:n,enabledPlugins:r})};var Oq=!1,it=X4("obsidian/updatePlugins",async(e,t)=>{var l,f,m,p;let n=t.getState(),r=t.dispatch,c=window.app,i=ie.create(n.obsidian.pluginManifests,n.releases.releases).reduce((h,v)=>(h[v.getPluginId()]=v,h),{}),s=Oc(n),o=!1;for(let h of s){let v=i[h],H=v.getLatestReleaseAssetIds(),y=v.getLatestVersionNumber(),d=v.getRepoPath(),g=n.obsidian.enabledPlugins!=null&&h in n.obsidian.enabledPlugins,z=h===n.obsidian.thisPluginId,S,w=!1;try{if(r(Z9({pluginId:h,pluginName:v.getPluginName(),status:"loading"})),!((l=c.plugins)!=null&&l.disablePlugin)||!((f=c.plugins)!=null&&f.enablePlugin)||!((m=c.plugins)!=null&&m.loadManifests))throw new Error("missing obsidian api");if(!(H!=null&&H.mainJs)||!(H!=null&&H.manifestJson))throw new Error("missing asset ids");if(!d)throw new Error("missing github repository path");if(o)S=!1;else if(Oq)await MT(Math.random()*5e3),S=Math.random()>.2;else{let[L,N,k]=await Promise.all([X9(H.mainJs,d,r),X9(H.manifestJson,d,r),X9(H.styleCss,d,r)]);z||(await c.plugins.disablePlugin(h),w=!0),await Promise.all([J9(h,"main.js",L),Rq(h,"manifest.json",N,y),J9(h,"styles.css",k)]),S=!0}await c.plugins.loadManifests(),g&&w&&await c.plugins.enablePlugin(h)}catch(L){console.error("Error updating "+h,L),S=!1,L instanceof Rc&&(o=!0),g&&w&&((p=c.plugins)==null?void 0:p.enablePlugin)&&await c.plugins.enablePlugin(h)}r(Z9({pluginId:h,pluginName:v.getPluginName(),status:S?"success":"failure"}))}r(s8(c))});async function X9(e,t,n){if(!e)return"";let r=await eT(e,t);if(r.success)return r.fileContents||"";throw r.rateLimitResetTimestamp?(n(xT(r.rateLimitResetTimestamp)),new Rc):new Error("Unexpected error fetching file "+e)}var Rc=class extends Error{};async function Rq(e,t,n,r){let c=JSON.parse(n);c.version=r,await J9(e,t,JSON.stringify(c))}async function J9(e,t,n){let c=`${(0,ET.normalizePath)(app.vault.configDir)}/plugins/${e}/${t}`;await app.vault.adapter.write(c,n)}var Iq={thisPluginId:"",pluginManifests:[],enabledPlugins:void 0,settings:kc,selectedPluginsById:{},isUpdatingPlugins:!1,pluginUpdateProgress:[],isUpdateResultAcknowledged:!0},AT=zc({name:"obsidian",initialState:Iq,reducers:{syncPluginManifests(e,t){e.pluginManifests=t.payload.manifests,e.enabledPlugins=t.payload.enabledPlugins},syncThisPluginId(e,t){e.thisPluginId=t.payload},syncSettings(e,t){e.settings=t.payload},pluginUpdateStatusChange(e,t){let n=t.payload,r=(0,NT.default)(e.pluginUpdateProgress,c=>c.pluginName===n.pluginName);r?r.status=n.status:e.pluginUpdateProgress.push(n)},acknowledgedPluginUpdateResults(e){e.isUpdateResultAcknowledged=!0},togglePluginSelection(e,t){let{pluginId:n,selected:r}=t.payload;e.selectedPluginsById[n]=r},toggleSelectAllPlugins(e,t){let{select:n,pluginIds:r}=t.payload;e.selectedPluginsById={},n&&r.forEach(c=>e.selectedPluginsById[c]=!0)},githubRateLimit(e,t){e.githubRateLimitResetTimestamp=t.payload}},extraReducers:e=>{e.addCase(it.pending,t=>{t.isUpdatingPlugins=!0,t.pluginUpdateProgress=[],t.isUpdateResultAcknowledged=!1,t.githubRateLimitResetTimestamp=void 0}).addCase(it.fulfilled,t=>{t.isUpdatingPlugins=!1,t.selectedPluginsById={}}).addCase(it.rejected,t=>{t.isUpdatingPlugins=!1,t.selectedPluginsById={}}).addCase(Ze.fulfilled,(t,n)=>{for(let r of n.payload)t.selectedPluginsById[r.pluginId]=!r.isLastAvailableVersion})}}),{syncThisPluginId:wT,syncSettings:el,syncPluginManifests:LT,togglePluginSelection:bT,toggleSelectAllPlugins:kT,pluginUpdateStatusChange:Z9,acknowledgedPluginUpdateResults:_T,githubRateLimit:xT}=AT.actions,PT=AT.reducer;var st=X4("releases/cleanupDismissedPluginVersions",async(e,t)=>{try{let n=t.getState(),r=n.obsidian.pluginManifests,c=ce(r,"id"),a=n.obsidian.settings,i={...a,dismissedVersionsByPluginId:Object.keys(a.dismissedVersionsByPluginId).reduce((s,o)=>{let l={...a.dismissedVersionsByPluginId[o],dismissedVersions:a.dismissedVersionsByPluginId[o].dismissedVersions.filter(f=>{let m=c[o].version;return U0(f.versionNumber,m)>0})};return s[o]=l,s},{})};await e.persistPluginSettings(i)}catch(n){console.error("Error cleaning up dismissed plugin versions",n)}});var P6=X4("releases/fetch",async(e,t)=>{let c={currentPluginVersions:t.getState().obsidian.pluginManifests.map(a=>({obsidianPluginId:a.id,version:a.version}))};return await Zy(c)});var OT=e1(_c()),ot=X4("releases/unDismissPluginVersions",async(e,t)=>{let{pluginId:n,versionNumber:r,persistPluginSettings:c}=e,i=t.getState().obsidian.settings,s=i.dismissedVersionsByPluginId;n in s&&(i={...i,dismissedVersionsByPluginId:{...i.dismissedVersionsByPluginId,[n]:{...i.dismissedVersionsByPluginId[n],dismissedVersions:(0,OT.default)(i.dismissedVersionsByPluginId[n].dismissedVersions,o=>o.versionNumber!==r)||[]}}},await c(i))});var Dq={isLoadingReleases:!1,isErrorLoadingReleases:!1,releases:[],isUpdatingDismissedVersions:!1},Fq=zc({name:"release",initialState:Dq,reducers:{},extraReducers:e=>{e.addCase(P6.pending,t=>{t.isLoadingReleases=!0}).addCase(P6.fulfilled,(t,n)=>{t.releases=n.payload,t.isLoadingReleases=!1,t.isErrorLoadingReleases=!1}).addCase(P6.rejected,t=>{t.isLoadingReleases=!1,t.isErrorLoadingReleases=!0}).addCase(Ze.pending,t=>{t.isUpdatingDismissedVersions=!0}).addCase(Ze.fulfilled,t=>{t.isUpdatingDismissedVersions=!1}).addCase(Ze.rejected,t=>{t.isUpdatingDismissedVersions=!1}).addCase(ot.pending,t=>{t.isUpdatingDismissedVersions=!0}).addCase(ot.fulfilled,t=>{t.isUpdatingDismissedVersions=!1}).addCase(ot.rejected,t=>{t.isUpdatingDismissedVersions=!1}).addCase(st.pending,t=>{t.isUpdatingDismissedVersions=!0}).addCase(st.fulfilled,t=>{t.isUpdatingDismissedVersions=!1}).addCase(st.rejected,t=>{t.isUpdatingDismissedVersions=!1})}}),RT=Fq.reducer;var IT=Hc({obsidian:PT,releases:RT}),tl={type:"RESET"},v3=HC({reducer:(e,t)=>(t==null?void 0:t.type)===tl.type?IT(void 0,t):IT(e,t),middleware:e=>e()}),lt=Js,Y1=Ds;var Bq=({persistPluginSettings:e})=>{let t=Y1(i=>i.obsidian.settings.dismissedVersionsByPluginId),n=Y1(i=>i.releases.isUpdatingDismissedVersions),r=Y1(i=>i.obsidian.pluginManifests),c=lt();async function a(i,s){if(!n)return c(ot({pluginId:i,versionNumber:s,persistPluginSettings:e}))}return c4.createElement(Uq,{dismissedVersionsByPluginId:t,pluginManifests:r,onClickUndismissVersion:a})},Uq=({dismissedVersionsByPluginId:e,pluginManifests:t,onClickUndismissVersion:n})=>{let r=c4.useMemo(()=>{let a=[],i=ce(t,"id");return Object.keys(e).filter(o=>o in i).forEach(o=>{let l=e[o];l.dismissedVersions.forEach(f=>a.push({pluginId:o,pluginRepo:l.pluginRepoPath,pluginName:i[o].name,...f}))}),a=a.filter(o=>{let l=i[o.pluginId].version;return U0(o.versionNumber,l)>0}).sort((o,l)=>o.pluginId!==l.pluginId?o.pluginName.localeCompare(l.pluginName):-o.publishedAt.localeCompare(l.publishedAt)),a},[e,t]),c=`You can hide specific plugin versions from appearing in the plugin icon count and plugin update list, and then unhide them below${r.length>0?":":""}`;return c4.createElement("div",null,c4.createElement("hr",null),c4.createElement(Gq,null,c),c4.createElement(jq,null,r.length>0&&r.map(a=>{let i=`https://github.com/${a.pluginRepo}/releases/tag/${a.versionNumber}`;return c4.createElement("div",{key:a.pluginId+a.versionNumber},c4.createElement(Wq,{onClick:()=>n(a.pluginId,a.versionNumber),"aria-label":"Restore","aria-label-position-":"top",className:"clickable-icon"},c4.createElement(r4,{icon:DT.faRotateLeft,size:"sm"})),c4.createElement("span",null,a.pluginName," ("),c4.createElement("a",{href:i},a.versionName),c4.createElement("span",null,")"))}),r.length===0&&c4.createElement(qq,null,"No versions are ignored")))},jq=M1.div` + margin-top: 0.5rem; +`,Gq=M1.p` + margin: 0; +`,qq=M1.p` + font-style: italic; + font-size: var(--font-ui-small); + margin: 0; +`,Wq=M1.span` + color: var(--icon-color); + opacity: var(--icon-opacity); + cursor: var(--cursor); + display: inline; + padding-left: 0.375rem; +`,FT=Bq;var gu=e1(X1());var iA=e1(KT());var $T={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[448,512,["external-link"],"f08e","M288 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h50.7L169.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H288zM80 64C35.8 64 0 99.8 0 144V400c0 44.2 35.8 80 80 80H336c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16h80c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]};var sA=e1(tV()),oA=e1(oV()),lA=e1(hV());var vu=e1(at()),fA=e1(vV()),uA=e1(i8()),mA=e1(CV()),d1=e1(X1());var HV=["http","https","mailto","tel"];function MV(e){let t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;let r=t.indexOf(":");if(r===-1)return t;let c=-1;for(;++cc||(c=t.indexOf("#"),c!==-1&&r>c)?t:"javascript:void(0)"}var ya=e1(X1(),1);var xV=e1(ol(),1);function VV(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yV(e.position):"start"in e||"end"in e?yV(e):"line"in e||"column"in e?ll(e):""}function ll(e){return TV(e&&e.line)+":"+TV(e&&e.column)}function yV(e){return ll(e&&e.start)+"-"+ll(e&&e.end)}function TV(e){return e&&typeof e=="number"?e:1}var a4=class extends Error{constructor(t,n,r){let c=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){let i=r.indexOf(":");i===-1?c[1]=r:(c[0]=r.slice(0,i),c[1]=r.slice(i+1))}n&&("type"in n||"position"in n?n.position&&(a=n.position):"start"in n||"end"in n?a=n:("line"in n||"column"in n)&&(a.start=n)),this.name=VV(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack=typeof t=="object"?t.stack:"",this.reason=this.message,this.fatal,this.line=a.start.line,this.column=a.start.column,this.source=c[0],this.ruleId=c[1],this.position=a,this.actual,this.expected,this.file,this.url,this.note}};a4.prototype.file="";a4.prototype.name="";a4.prototype.reason="";a4.prototype.message="";a4.prototype.stack="";a4.prototype.fatal=null;a4.prototype.column=null;a4.prototype.line=null;a4.prototype.source=null;a4.prototype.ruleId=null;a4.prototype.position=null;var g3={basename:iW,dirname:sW,extname:oW,join:lW,sep:"/"};function iW(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');o8(e);let n=0,r=-1,c=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;c--;)if(e.charCodeAt(c)===47){if(a){n=c+1;break}}else r<0&&(a=!0,r=c+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,s=t.length-1;for(;c--;)if(e.charCodeAt(c)===47){if(a){n=c+1;break}}else i<0&&(a=!0,i=c+1),s>-1&&(e.charCodeAt(c)===t.charCodeAt(s--)?s<0&&(r=c):(s=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function sW(e){if(o8(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function oW(e){o8(e);let t=e.length,n=-1,r=0,c=-1,a=0,i;for(;t--;){let s=e.charCodeAt(t);if(s===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),s===46?c<0?c=t:a!==1&&(a=1):c>-1&&(a=-1)}return c<0||n<0||a===0||a===1&&c===n-1&&c===r+1?"":e.slice(c,n)}function lW(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function uW(e,t){let n="",r=0,c=-1,a=0,i=-1,s,o;for(;++i<=e.length;){if(i2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),c=i,a=0;continue}}else if(n.length>0){n="",r=0,c=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(c+1,i):n=e.slice(c+1,i),r=i-c-1;c=i,a=0}else s===46&&a>-1?a++:a=-1}return n}function o8(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var SV={cwd:mW};function mW(){return"/"}function ft(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function LV(e){if(typeof e=="string")e=new URL(e);else if(!ft(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return pW(e)}function pW(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let t=e.pathname,n=-1;for(;++ni.length,o;s&&i.push(c);try{o=e.apply(this,i)}catch(l){let f=l;if(s&&n)throw f;return c(f)}s||(o instanceof Promise?o.then(a,c):o instanceof Error?c(o):a(o))}function c(i,...s){n||(n=!0,t(i,...s))}function a(i){c(null,i)}}var Cl=GV().freeze(),jV={}.hasOwnProperty;function GV(){let e=IV(),t=[],n={},r,c=-1;return a.data=i,a.Parser=void 0,a.Compiler=void 0,a.freeze=s,a.attachers=t,a.use=o,a.parse=l,a.stringify=f,a.run=m,a.runSync=p,a.process=h,a.processSync=v,a;function a(){let H=GV(),y=-1;for(;++y{if(L||!N||!k)w(L);else{let W=a.stringify(N,k);W==null||(gW(W)?k.value=W:k.result=W),w(L,k)}});function w(L,N){L||!N?z(L):g?g(N):y(null,N)}}}function v(H){let y;a.freeze(),dl("processSync",a.Parser),hl("processSync",a.Compiler);let d=f8(H);return a.process(d,g),BV("processSync","process",y),d;function g(z){y=!0,pl(z)}}}function DV(e,t){return typeof e=="function"&&e.prototype&&(hW(e.prototype)||t in e.prototype)}function hW(e){let t;for(t in e)if(jV.call(e,t))return!0;return!1}function dl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function hl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function vl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function FV(e){if(!l8(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function BV(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function f8(e){return vW(e)?e:new O6(e)}function vW(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gW(e){return typeof e=="string"||(0,UV.default)(e)}function WV(e,t){var{includeImageAlt:n=!0}=t||{};return KV(e,n)}function KV(e,t){return e&&typeof e=="object"&&(e.value||(t?e.alt:"")||"children"in e&&qV(e.children,t)||Array.isArray(e)&&qV(e,t))||""}function qV(e,t){for(var n=[],r=-1;++rc?0:c+t:t=t>c?c:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),[].splice.apply(e,i);else for(n&&[].splice.apply(e,[t,n]);a0?(I2(e,e.length,0,t),e):t}var $V={}.hasOwnProperty;function YV(e){let t={},n=-1;for(;++ni))return;let N=t.events.length,k=N,W,J;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){if(W){J=t.events[k][1].end;break}W=!0}for(d(r),L=N;Lz;){let w=n[S];t.containerState=w[1],w[0].exit.call(t,e)}n.length=z}function g(){c.write([null]),a=void 0,c=void 0,t.containerState._closeFlow=void 0}}function yW(e,t,n){return H1(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ml(e){if(e===null||z2(e)||ZV(e))return 1;if(eS(e))return 2}function ut(e,t,n){let r=[],c=-1;for(;++c1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let m=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);cS(m,-o),cS(p,o),i={type:o>1?"strongSequence":"emphasisSequence",start:m,end:Object.assign({},e[r][1].end)},s={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},c={type:o>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=i4(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=i4(l,[["enter",c,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=i4(l,ut(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=i4(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",c,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,l=i4(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,I2(e,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n=4?i(l):n(l)}function i(l){return l===null?o(l):s1(l)?e.attempt(kW,i,o)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||s1(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),s)}function o(l){return e.exit("codeIndented"),t(l)}}function PW(e,t,n){let r=this;return c;function c(i){return r.parser.lazy[r.now().line]?n(i):s1(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):H1(e,a,"linePrefix",4+1)(i)}function a(i){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):s1(i)?c(i):n(i)}}var yl={name:"codeText",tokenize:IW,resolve:OW,previous:RW};function OW(e){let t=e.length-4,n=3,r,c;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Gc(e,t,n,r,c,a,i,s,o){let l=o||Number.POSITIVE_INFINITY,f=0;return m;function m(d){return d===60?(e.enter(r),e.enter(c),e.enter(a),e.consume(d),e.exit(a),p):d===null||d===41||m8(d)?n(d):(e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),H(d))}function p(d){return d===62?(e.enter(a),e.consume(d),e.exit(a),e.exit(c),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===62?(e.exit("chunkString"),e.exit(s),p(d)):d===null||d===60||s1(d)?n(d):(e.consume(d),d===92?v:h)}function v(d){return d===60||d===62||d===92?(e.consume(d),h):h(d)}function H(d){return d===40?++f>l?n(d):(e.consume(d),H):d===41?f--?(e.consume(d),H):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(d)):d===null||z2(d)?f?n(d):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(d)):m8(d)?n(d):(e.consume(d),d===92?y:H)}function y(d){return d===40||d===41||d===92?(e.consume(d),H):H(d)}}function qc(e,t,n,r,c,a){let i=this,s=0,o;return l;function l(h){return e.enter(r),e.enter(c),e.consume(h),e.exit(c),e.enter(a),f}function f(h){return h===null||h===91||h===93&&!o||h===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs||s>999?n(h):h===93?(e.exit(a),e.enter(c),e.consume(h),e.exit(c),e.exit(r),t):s1(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(h))}function m(h){return h===null||h===91||h===93||s1(h)||s++>999?(e.exit("chunkString"),f(h)):(e.consume(h),o=o||!D1(h),h===92?p:m)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,m):m(h)}}function Wc(e,t,n,r,c,a){let i;return s;function s(p){return e.enter(r),e.enter(c),e.consume(p),e.exit(c),i=p===40?41:p,o}function o(p){return p===i?(e.enter(c),e.consume(p),e.exit(c),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===i?(e.exit(a),o(i)):p===null?n(p):s1(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),H1(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===i||p===null||s1(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?m:f)}function m(p){return p===i||p===92?(e.consume(p),f):f(p)}}function R6(e,t){let n;return r;function r(c){return s1(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),n=!0,r):D1(c)?H1(e,r,n?"linePrefix":"lineSuffix")(c):t(c)}}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Vl={name:"definition",tokenize:qW},GW={tokenize:WW,partial:!0};function qW(e,t,n){let r=this,c;return a;function a(o){return e.enter("definition"),qc.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(o)}function i(o){return c=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),o===58?(e.enter("definitionMarker"),e.consume(o),e.exit("definitionMarker"),R6(e,Gc(e,e.attempt(GW,H1(e,s,"whitespace"),H1(e,s,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(o)}function s(o){return o===null||s1(o)?(e.exit("definition"),r.parser.defined.includes(c)||r.parser.defined.push(c),t(o)):n(o)}}function WW(e,t,n){return r;function r(i){return z2(i)?R6(e,c)(i):n(i)}function c(i){return i===34||i===39||i===40?Wc(e,H1(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(i):n(i)}function a(i){return i===null||s1(i)?t(i):n(i)}}var Sl={name:"hardBreakEscape",tokenize:KW};function KW(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(a),c}function c(a){return s1(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):n(a)}}var Ll={name:"headingAtx",tokenize:YW,resolve:$W};function $W(e,t){let n=e.length-2,r=3,c,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(c={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},I2(e,r,n-r+1,[["enter",c,t],["enter",a,t],["exit",a,t],["exit",c,t]])),e}function YW(e,t,n){let r=this,c=0;return a;function a(f){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),i(f)}function i(f){return f===35&&c++<6?(e.consume(f),i):f===null||z2(f)?(e.exit("atxHeadingSequence"),r.interrupt?t(f):s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||s1(f)?(e.exit("atxHeading"),t(f)):D1(f)?H1(e,s,"whitespace")(f):(e.enter("atxHeadingText"),l(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),s(f))}function l(f){return f===null||f===35||z2(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),l)}}var iS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],El=["pre","script","style","textarea"];var xl={name:"htmlFlow",tokenize:JW,resolveTo:XW,concrete:!0},QW={tokenize:ZW,partial:!0};function XW(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function JW(e,t,n){let r=this,c,a,i,s,o;return l;function l(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),f}function f(M){return M===33?(e.consume(M),m):M===47?(e.consume(M),v):M===63?(e.consume(M),c=3,r.interrupt?t:x):P4(M)?(e.consume(M),i=String.fromCharCode(M),a=!0,H):n(M)}function m(M){return M===45?(e.consume(M),c=2,p):M===91?(e.consume(M),c=5,i="CDATA[",s=0,h):P4(M)?(e.consume(M),c=4,r.interrupt?t:x):n(M)}function p(M){return M===45?(e.consume(M),r.interrupt?t:x):n(M)}function h(M){return M===i.charCodeAt(s++)?(e.consume(M),s===i.length?r.interrupt?t:U:h):n(M)}function v(M){return P4(M)?(e.consume(M),i=String.fromCharCode(M),H):n(M)}function H(M){return M===null||M===47||M===62||z2(M)?M!==47&&a&&El.includes(i.toLowerCase())?(c=1,r.interrupt?t(M):U(M)):iS.includes(i.toLowerCase())?(c=6,M===47?(e.consume(M),y):r.interrupt?t(M):U(M)):(c=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):a?g(M):d(M)):M===45||b2(M)?(e.consume(M),i+=String.fromCharCode(M),H):n(M)}function y(M){return M===62?(e.consume(M),r.interrupt?t:U):n(M)}function d(M){return D1(M)?(e.consume(M),d):W(M)}function g(M){return M===47?(e.consume(M),W):M===58||M===95||P4(M)?(e.consume(M),z):D1(M)?(e.consume(M),g):W(M)}function z(M){return M===45||M===46||M===58||M===95||b2(M)?(e.consume(M),z):S(M)}function S(M){return M===61?(e.consume(M),w):D1(M)?(e.consume(M),S):g(M)}function w(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),o=M,L):D1(M)?(e.consume(M),w):(o=null,N(M))}function L(M){return M===null||s1(M)?n(M):M===o?(e.consume(M),k):(e.consume(M),L)}function N(M){return M===null||M===34||M===39||M===60||M===61||M===62||M===96||z2(M)?S(M):(e.consume(M),N)}function k(M){return M===47||M===62||D1(M)?g(M):n(M)}function W(M){return M===62?(e.consume(M),J):n(M)}function J(M){return D1(M)?(e.consume(M),J):M===null||s1(M)?U(M):n(M)}function U(M){return M===45&&c===2?(e.consume(M),B):M===60&&c===1?(e.consume(M),i1):M===62&&c===4?(e.consume(M),b):M===63&&c===3?(e.consume(M),x):M===93&&c===5?(e.consume(M),o1):s1(M)&&(c===6||c===7)?e.check(QW,b,D)(M):M===null||s1(M)?D(M):(e.consume(M),U)}function D(M){return e.exit("htmlFlowData"),_(M)}function _(M){return M===null?C(M):s1(M)?e.attempt({tokenize:$,partial:!0},_,C)(M):(e.enter("htmlFlowData"),U(M))}function $(M,O,F){return K;function K(n1){return M.enter("lineEnding"),M.consume(n1),M.exit("lineEnding"),A}function A(n1){return r.parser.lazy[r.now().line]?F(n1):O(n1)}}function B(M){return M===45?(e.consume(M),x):U(M)}function i1(M){return M===47?(e.consume(M),i="",t1):U(M)}function t1(M){return M===62&&El.includes(i.toLowerCase())?(e.consume(M),b):P4(M)&&i.length<8?(e.consume(M),i+=String.fromCharCode(M),t1):U(M)}function o1(M){return M===93?(e.consume(M),x):U(M)}function x(M){return M===62?(e.consume(M),b):M===45&&c===2?(e.consume(M),x):U(M)}function b(M){return M===null||s1(M)?(e.exit("htmlFlowData"),C(M)):(e.consume(M),b)}function C(M){return e.exit("htmlFlow"),t(M)}}function ZW(e,t,n){return r;function r(c){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),e.attempt(t6,t,n)}}var Nl={name:"htmlText",tokenize:eK};function eK(e,t,n){let r=this,c,a,i,s;return o;function o(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),N):C===63?(e.consume(C),w):P4(C)?(e.consume(C),J):n(C)}function f(C){return C===45?(e.consume(C),m):C===91?(e.consume(C),a="CDATA[",i=0,y):P4(C)?(e.consume(C),S):n(C)}function m(C){return C===45?(e.consume(C),p):n(C)}function p(C){return C===null||C===62?n(C):C===45?(e.consume(C),h):v(C)}function h(C){return C===null||C===62?n(C):v(C)}function v(C){return C===null?n(C):C===45?(e.consume(C),H):s1(C)?(s=v,o1(C)):(e.consume(C),v)}function H(C){return C===45?(e.consume(C),b):v(C)}function y(C){return C===a.charCodeAt(i++)?(e.consume(C),i===a.length?d:y):n(C)}function d(C){return C===null?n(C):C===93?(e.consume(C),g):s1(C)?(s=d,o1(C)):(e.consume(C),d)}function g(C){return C===93?(e.consume(C),z):d(C)}function z(C){return C===62?b(C):C===93?(e.consume(C),z):d(C)}function S(C){return C===null||C===62?b(C):s1(C)?(s=S,o1(C)):(e.consume(C),S)}function w(C){return C===null?n(C):C===63?(e.consume(C),L):s1(C)?(s=w,o1(C)):(e.consume(C),w)}function L(C){return C===62?b(C):w(C)}function N(C){return P4(C)?(e.consume(C),k):n(C)}function k(C){return C===45||b2(C)?(e.consume(C),k):W(C)}function W(C){return s1(C)?(s=W,o1(C)):D1(C)?(e.consume(C),W):b(C)}function J(C){return C===45||b2(C)?(e.consume(C),J):C===47||C===62||z2(C)?U(C):n(C)}function U(C){return C===47?(e.consume(C),b):C===58||C===95||P4(C)?(e.consume(C),D):s1(C)?(s=U,o1(C)):D1(C)?(e.consume(C),U):b(C)}function D(C){return C===45||C===46||C===58||C===95||b2(C)?(e.consume(C),D):_(C)}function _(C){return C===61?(e.consume(C),$):s1(C)?(s=_,o1(C)):D1(C)?(e.consume(C),_):U(C)}function $(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),c=C,B):s1(C)?(s=$,o1(C)):D1(C)?(e.consume(C),$):(e.consume(C),c=void 0,t1)}function B(C){return C===c?(e.consume(C),i1):C===null?n(C):s1(C)?(s=B,o1(C)):(e.consume(C),B)}function i1(C){return C===62||C===47||z2(C)?U(C):n(C)}function t1(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===62||z2(C)?U(C):(e.consume(C),t1)}function o1(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),H1(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function x(C){return e.enter("htmlTextData"),s(C)}function b(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}}var I6={name:"labelEnd",tokenize:iK,resolveTo:aK,resolveAll:cK},tK={tokenize:sK},nK={tokenize:oK},rK={tokenize:lK};function cK(e){let t=-1,n;for(;++t-1&&(i[0]=i[0].slice(r)),a>0&&i.push(e[c].slice(0,a))),i}function LK(e,t){let n=-1,r=[],c;for(;++n_K,contentInitial:()=>xK,disable:()=>PK,document:()=>EK,flow:()=>AK,flowInitial:()=>NK,insideSpan:()=>kK,string:()=>wK,text:()=>bK});var EK={[42]:K2,[43]:K2,[45]:K2,[48]:K2,[49]:K2,[50]:K2,[51]:K2,[52]:K2,[53]:K2,[54]:K2,[55]:K2,[56]:K2,[57]:K2,[62]:Dc},xK={[91]:Vl},NK={[-2]:d8,[-1]:d8,[32]:d8},AK={[35]:Ll,[42]:D6,[45]:[Kc,D6],[60]:xl,[61]:Kc,[95]:D6,[96]:Uc,[126]:Uc},wK={[38]:Bc,[92]:Fc},bK={[-5]:h8,[-4]:h8,[-3]:h8,[33]:Al,[38]:Bc,[42]:p8,[60]:[zl,Nl],[91]:wl,[92]:[Sl,Fc],[93]:I6,[95]:p8,[96]:yl},kK={null:[p8,oS]},_K={null:[42,95]},PK={null:[]};function dS(e={}){let t=YV([bl].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(tS),document:r(rS),flow:r(sS),string:r(lS),text:r(fS)};return n;function r(c){return a;function a(i){return pS(n,c,i)}}}var hS=/[\0\t\n\r]/g;function vS(){let e=1,t="",n=!0,r;return c;function c(a,i,s){let o=[],l,f,m,p,h;for(a=t+a.toString(i),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}var OK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function CS(e){return e.replace(OK,RK)}function RK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let c=n.charCodeAt(1),a=c===120||c===88;return $c(n.slice(a?2:1),a?16:10)}return mt(n)||e}function v8(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HS(e.position):"start"in e||"end"in e?HS(e):"line"in e||"column"in e?kl(e):""}function kl(e){return MS(e&&e.line)+":"+MS(e&&e.column)}function HS(e){return kl(e&&e.start)+"-"+kl(e&&e.end)}function MS(e){return e&&typeof e=="number"?e:1}var _l={}.hasOwnProperty,Pl=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),IK(n)(gS(dS(n).document().write(vS()(e,t,!0))))};function IK(e={}){let t=yS({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(T3),autolinkProtocol:D,autolinkEmail:D,atxHeading:o(T1),blockQuote:o(Z),characterEscape:D,characterReference:D,codeFenced:o(w1),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(w1,l),codeText:o(Q1,l),codeTextData:D,data:D,codeFlowValue:D,definition:o(u1),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(e2),hardBreakEscape:o(B1),hardBreakTrailing:o(B1),htmlFlow:o(B4,l),htmlFlowData:D,htmlText:o(B4,l),htmlTextData:D,image:o(b1),label:l,link:o(T3),listItem:o(X2),listItemValue:H,listOrdered:o(V3,v),listUnordered:o(V3),paragraph:o(p1),reference:A,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(T1),strong:o(P1),thematicBreak:o(B3)},exit:{atxHeading:m(),atxHeadingSequence:k,autolink:m(),autolinkEmail:h1,autolinkProtocol:l1,blockQuote:m(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:v1,codeFenced:m(z),codeFencedFence:g,codeFencedFenceInfo:y,codeFencedFenceMeta:d,codeFlowValue:_,codeIndented:m(S),codeText:m(o1),codeTextData:_,data:_,definition:m(),definitionDestinationString:N,definitionLabelString:w,definitionTitleString:L,emphasis:m(),hardBreakEscape:m(B),hardBreakTrailing:m(B),htmlFlow:m(i1),htmlFlowData:_,htmlText:m(t1),htmlTextData:_,image:m(b),label:M,labelText:C,lineEnding:$,link:m(x),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:n1,resourceDestinationString:O,resourceTitleString:F,resource:K,setextHeading:m(U),setextHeadingLineSequence:J,setextHeadingText:W,strong:m(),thematicBreak:m()}},e.mdastExtensions||[]),n={};return r;function r(P){let X={type:"root",children:[]},g1=[X],k1=[],s4=[],u6={stack:g1,tokenStack:k1,config:t,enter:f,exit:p,buffer:l,resume:h,setData:a,getData:i},K1=-1;for(;++K10){let _2=k1[k1.length-1];(_2[1]||zS).call(u6,void 0,_2[0])}for(X.position={start:s(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:s(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},K1=-1;++K1{let r=this.data("settings");return Pl(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var TS=Ol;var A1=function(e,t,n){var r={type:String(e)};return n==null&&(typeof t=="string"||Array.isArray(t))?n=t:Object.assign(r,t),Array.isArray(n)?r.children=n:n!=null&&(r.value=String(n)),r};var Yc={}.hasOwnProperty;function FK(e,t){let n=t.data||{};return"value"in t&&!(Yc.call(n,"hName")||Yc.call(n,"hProperties")||Yc.call(n,"hChildren"))?e.augment(t,A1("text",t.value)):e(t,"div",_1(e,t))}function Rl(e,t,n){let r=t&&t.type,c;if(!r)throw new Error("Expected node, got `"+t+"`");return Yc.call(e.handlers,r)?c=e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?c=BK:c=e.unknownHandler,(typeof c=="function"?c:FK)(e,t,n)}function BK(e,t){return"children"in t?{...t,children:_1(e,t)}:t}function _1(e,t){let n=[];if("children"in t){let r=t.children,c=-1;for(;++c":""))+")"})),p;function p(){let h=[],v,H,y;if((!t||c(s,o,l[l.length-1]||null))&&(h=$K(n(s,l)),h[0]===VS))return h;if(s.children&&h[0]!==KK)for(H=(r?s.children.length:-1)+a,y=l.concat(s);H>-1&&H-1?r.offset:null}}}function ES(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}var xS={}.hasOwnProperty;function AS(e){let t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Xc(e,"definition",r=>{let c=NS(r.identifier);c&&!xS.call(t,c)&&(t[c]=r)}),n;function n(r){let c=NS(r);return c&&xS.call(t,c)?t[c]:null}}function NS(e){return String(e||"").toUpperCase()}var YK={'"':"quot","&":"amp","<":"lt",">":"gt"};function wS(e){return e.replace(/["&<>]/g,t);function t(n){return"&"+YK[n]+";"}}function ea(e,t){let n=wS(QK(e||""));if(!t)return n;let r=n.indexOf(":"),c=n.indexOf("?"),a=n.indexOf("#"),i=n.indexOf("/");return r<0||i>-1&&r>i||c>-1&&r>c||a>-1&&r>a||t.test(n.slice(0,r))?n:""}function QK(e){let t=[],n=-1,r=0,c=0;for(;++n55295&&a<57344){let s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),c=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+c+1,i=""),c&&(n+=c,c=0)}return t.join("")+e.slice(r)}function d4(e,t){let n=[],r=-1;for(t&&n.push(A1("text",` +`));++r0&&n.push(A1("text",` +`)),n}function bS(e){let t=-1,n=[];for(;++t1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};s>1&&m.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),o.length>0&&o.push({type:"text",value:" "}),o.push(m)}let l=c[c.length-1];if(l&&l.type==="element"&&l.tagName==="p"){let m=l.children[l.children.length-1];m&&m.type==="text"?m.value+=" ":l.children.push({type:"text",value:" "}),l.children.push(...o)}else c.push(...o);let f={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:d4(c,!0)};r.position&&(f.position=r.position),n.push(f)}return n.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[A1("text",e.footnoteLabel)]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:d4(n,!0)},{type:"text",value:` +`}]}}function kS(e,t){return e(t,"blockquote",d4(_1(e,t),!0))}function _S(e,t){return[e(t,"br"),A1("text",` +`)]}function PS(e,t){let n=t.value?t.value+` +`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),c={};r&&(c.className=["language-"+r]);let a=e(t,"code",c,[A1("text",n)]);return t.meta&&(a.data={meta:t.meta}),e(t.position,"pre",[a])}function OS(e,t){return e(t,"del",_1(e,t))}function RS(e,t){return e(t,"em",_1(e,t))}function ta(e,t){let n=String(t.identifier),r=ea(n.toLowerCase()),c=e.footnoteOrder.indexOf(n),a;c===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,a=e.footnoteOrder.length):(e.footnoteCounts[n]++,a=c+1);let i=e.footnoteCounts[n];return e(t,"sup",[e(t.position,"a",{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[A1("text",String(a))])])}function IS(e,t){let n=e.footnoteById,r=1;for(;r in n;)r++;let c=String(r);return n[c]={type:"footnoteDefinition",identifier:c,children:[{type:"paragraph",children:t.children}],position:t.position},ta(e,{type:"footnoteReference",identifier:c,position:t.position})}function DS(e,t){return e(t,"h"+t.depth,_1(e,t))}function FS(e,t){return e.dangerous?e.augment(t,A1("raw",t.value)):null}var jS=e1(g8(),1);function ra(e,t){let n=t.referenceType,r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return A1("text","!["+t.alt+r);let c=_1(e,t),a=c[0];a&&a.type==="text"?a.value="["+a.value:c.unshift(A1("text","["));let i=c[c.length-1];return i&&i.type==="text"?i.value+=r:c.push(A1("text",r)),c}function GS(e,t){let n=e.definition(t.identifier);if(!n)return ra(e,t);let r={src:(0,jS.default)(n.url||""),alt:t.alt};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)}var qS=e1(g8(),1);function WS(e,t){let n={src:(0,qS.default)(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}function KS(e,t){return e(t,"code",[A1("text",t.value.replace(/\r?\n|\r/g," "))])}var $S=e1(g8(),1);function YS(e,t){let n=e.definition(t.identifier);if(!n)return ra(e,t);let r={href:(0,$S.default)(n.url||"")};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,_1(e,t))}var QS=e1(g8(),1);function XS(e,t){let n={href:(0,QS.default)(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,_1(e,t))}function JS(e,t,n){let r=_1(e,t),c=n?JK(n):ZS(t),a={},i=[];if(typeof t.checked=="boolean"){let l;r[0]&&r[0].type==="element"&&r[0].tagName==="p"?l=r[0]:(l=e(null,"p",[]),r.unshift(l)),l.children.length>0&&l.children.unshift(A1("text"," ")),l.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),a.className=["task-list-item"]}let s=-1;for(;++s1:t}function eL(e,t){let n={},r=t.ordered?"ol":"ul",c=_1(e,t),a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a0,!0),r[0]),c=r.index+r[0].length,r=n.exec(t);return a.push(aL(t.slice(c),c>0,!1)),a.join("")}function aL(e,t,n){let r=0,c=e.length;if(t){let a=e.codePointAt(r);for(;a===9||a===32;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(c-1);for(;a===9||a===32;)c--,a=e.codePointAt(c-1)}return c>r?e.slice(r,c):""}function sL(e,t){return e.augment(t,A1("text",iL(String(t.value))))}function oL(e,t){return e(t,"hr")}var Dl={blockquote:kS,break:_S,code:PS,delete:OS,emphasis:RS,footnoteReference:ta,footnote:IS,heading:DS,html:FS,imageReference:GS,image:WS,inlineCode:KS,linkReference:YS,link:XS,listItem:JS,list:eL,paragraph:tL,root:nL,strong:rL,table:cL,text:sL,thematicBreak:oL,toml:ca,yaml:ca,definition:ca,footnoteDefinition:ca};function ca(){return null}var ZK={}.hasOwnProperty;function e$(e,t){let n=t||{},r=n.allowDangerousHtml||!1,c={};return i.dangerous=r,i.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,i.footnoteLabel=n.footnoteLabel||"Footnotes",i.footnoteLabelTagName=n.footnoteLabelTagName||"h2",i.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},i.footnoteBackLabel=n.footnoteBackLabel||"Back to content",i.definition=AS(e),i.footnoteById=c,i.footnoteOrder=[],i.footnoteCounts={},i.augment=a,i.handlers={...Dl,...n.handlers},i.unknownHandler=n.unknownHandler,i.passThrough=n.passThrough,Xc(e,"footnoteDefinition",s=>{let o=String(s.identifier).toUpperCase();ZK.call(c,o)||(c[o]=s)}),i;function a(s,o){if(s&&"data"in s&&s.data){let l=s.data;l.hName&&(o.type!=="element"&&(o={type:"element",tagName:"",properties:{},children:[]}),o.tagName=l.hName),o.type==="element"&&l.hProperties&&(o.properties={...o.properties,...l.hProperties}),"children"in o&&o.children&&l.hChildren&&(o.children=l.hChildren)}if(s){let l="type"in s?s:{position:s};ES(l)||(o.position={start:Jc(l),end:Zc(l)})}return o}function i(s,o,l,f){return Array.isArray(l)&&(f=l,l={}),a(s,{type:"element",tagName:o,properties:l||{},children:f||[]})}}function aa(e,t){let n=e$(e,t),r=Rl(n,e,null),c=bS(n);return c&&r.children.push(A1("text",` +`),c),Array.isArray(r)?{type:"root",children:r}:r}var t$=function(e,t){return e&&"run"in e?n$(e,t):r$(e||t)},Fl=t$;function n$(e,t){return(n,r,c)=>{e.run(aa(n,t),r,a=>{c(a)})}}function r$(e){return t=>aa(t,e)}var C1=e1(No(),1);var oe=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};oe.prototype.property={};oe.prototype.normal={};oe.prototype.space=null;function Bl(e,t){let n={},r={},c=-1;for(;++cz1,booleanish:()=>h2,commaOrSpaceSeparated:()=>h4,commaSeparated:()=>n6,number:()=>j,overloadedBoolean:()=>Ul,spaceSeparated:()=>U1});var c$=0,z1=F6(),h2=F6(),Ul=F6(),j=F6(),U1=F6(),n6=F6(),h4=F6();function F6(){return 2**++c$}var jl=Object.keys(H8),B6=class extends $2{constructor(t,n,r,c){let a=-1;if(super(t,n),lL(this,"space",c),typeof r=="number")for(;++a4&&n.slice(0,4)==="data"&&i$.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(mL,l$);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!mL.test(a)){let i=a.replace(s$,o$);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}c=B6}return new c(r,t)}function o$(e){return"-"+e.toLowerCase()}function l$(e){return e.charAt(1).toUpperCase()}var oa={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var pL=Bl([ql,Gl,Wl,Kl,fL],"html"),dL=Bl([ql,Gl,Wl,Kl,uL],"svg");var Yl=function(e){if(e==null)return p$;if(typeof e=="string")return m$(e);if(typeof e=="object")return Array.isArray(e)?f$(e):u$(e);if(typeof e=="function")return la(e);throw new Error("Expected function, string, or object as test")};function f$(e){let t=[],n=-1;for(;++n":""))+")"})),p;function p(){let h=[],v,H,y;if((!t||c(s,o,l[l.length-1]||null))&&(h=v$(n(s,l)),h[0]===hL))return h;if(s.children&&h[0]!==h$)for(H=(r?s.children.length:-1)+a,y=l.concat(s);H>-1&&H{gL(t,"element",(n,r,c)=>{let a=c,i;if(e.allowedElements?i=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(i=e.disallowedElements.includes(n.tagName)),!i&&e.allowElement&&typeof r=="number"&&(i=!e.allowElement(n,r,a)),i&&typeof r=="number")return e.unwrapDisallowed&&n.children?a.children.splice(r,1,...n.children):a.children.splice(r,1),r})}}var Ma=e1(X1(),1),bL=e1(zL(),1);function yL(e){var t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function TL(e){return e.join(" ").trim()}function VL(e,t){var n=t||{};return e[e.length-1]===""&&(e=e.concat("")),e.join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var kL=e1(Zl(),1),tf={}.hasOwnProperty,w$=new Set(["table","thead","tbody","tfoot","tr"]);function nf(e,t){let n=[],r=-1,c;for(;++r0?Ma.default.createElement(p,s,f):Ma.default.createElement(p,s)}function k$(e){let t=-1;for(;++tString(t)).join("")}var _L={}.hasOwnProperty,I$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",za={plugins:{to:"plugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function M8(e){for(let a in za)if(_L.call(za,a)&&_L.call(e,a)){let i=za[a];console.warn(`[react-markdown] Warning: please ${i.to?`use \`${i.to}\` instead of`:"remove"} \`${a}\` (see <${I$}#${i.id}> for more info)`),delete za[a]}let t=Cl().use(TS).use(e.remarkPlugins||[]).use(Fl,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Ql,e),n=new O6;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);let r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let c=ya.default.createElement(ya.default.Fragment,{},nf({options:e,schema:pL,listDepth:0},r));return e.className&&(c=ya.default.createElement("div",{className:e.className},c)),c}M8.defaultProps={transformLinkUri:MV};M8.propTypes={children:C1.default.string,className:C1.default.string,allowElement:C1.default.func,allowedElements:C1.default.arrayOf(C1.default.string),disallowedElements:C1.default.arrayOf(C1.default.string),unwrapDisallowed:C1.default.bool,remarkPlugins:C1.default.arrayOf(C1.default.oneOfType([C1.default.object,C1.default.func,C1.default.arrayOf(C1.default.oneOfType([C1.default.bool,C1.default.string,C1.default.object,C1.default.func,C1.default.arrayOf(C1.default.any)]))])),rehypePlugins:C1.default.arrayOf(C1.default.oneOfType([C1.default.object,C1.default.func,C1.default.arrayOf(C1.default.oneOfType([C1.default.bool,C1.default.string,C1.default.object,C1.default.func,C1.default.arrayOf(C1.default.any)]))])),sourcePos:C1.default.bool,rawSourcePos:C1.default.bool,skipHtml:C1.default.bool,includeElementIndex:C1.default.bool,transformLinkUri:C1.default.oneOfType([C1.default.func,C1.default.bool]),linkTarget:C1.default.oneOfType([C1.default.func,C1.default.string]),transformImageUri:C1.default.func,components:C1.default.object};var gN=e1(Gx(),1);var Bf=Wx("start"),qx=Wx("end");function Wx(e){return t;function t(n){let r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}var X6=function(e){if(e==null)return pX;if(typeof e=="string")return mX(e);if(typeof e=="object")return Array.isArray(e)?fX(e):uX(e);if(typeof e=="function")return e7(e);throw new Error("Expected function, string, or object as test")};function fX(e){let t=[],n=-1;for(;++n":""))+")"})),p;function p(){let h=[],v,H,y;if((!t||c(s,o,l[l.length-1]||null))&&(h=vX(n(s,l)),h[0]===Kx))return h;if(s.children&&h[0]!==hX)for(H=(r?s.children.length:-1)+a,y=l.concat(s);H>-1&&Hy1,booleanish:()=>g2,commaOrSpaceSeparated:()=>C4,commaSeparated:()=>f6,number:()=>G,overloadedBoolean:()=>jf,spaceSeparated:()=>W1});var gX=0,y1=J6(),g2=J6(),jf=J6(),G=J6(),W1=J6(),f6=J6(),C4=J6();function J6(){return 2**++gX}var Gf=Object.keys(R8),Z6=class extends Q2{constructor(t,n,r,c){let a=-1;if(super(t,n),Qx(this,"space",c),typeof r=="number")for(;++a4&&n.slice(0,4)==="data"&&HX.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(Zx,yX);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!Zx.test(a)){let i=a.replace(MX,zX);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}c=Z6}return new c(r,t)}function zX(e){return"-"+e.toLowerCase()}function yX(e){return e.charAt(1).toUpperCase()}var Yf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Me=Uf([Wf,qf,Kf,$f,Xx],"html"),z3=Uf([Wf,qf,Kf,$f,Jx],"svg");var eN=/[#.]/g,tN=function(e,t="div"){for(var n=e||"",r={},c=0,a,i,s;c-1&&ii)return{line:s+1,column:i-(n[s-1]||0)+1,offset:i}}return{line:void 0,column:void 0,offset:void 0}}function a(i){var s=i&&i.line,o=i&&i.column,l;return typeof s=="number"&&typeof o=="number"&&!Number.isNaN(s)&&!Number.isNaN(o)&&s-1 in n&&(l=(n[s-2]||0)+o-1||0),l>-1&&l0?e.call(t,a,i,s):e.call(t,a,i)}function FX(e,t,n,r,c){let a=He(r.schema,t),i;n==null||typeof n=="number"&&Number.isNaN(n)||n===!1&&(r.vue||r.vdom||r.hyperscript)||!n&&a.boolean&&(r.vue||r.vdom||r.hyperscript)||(Array.isArray(n)&&(n=a.commaSeparated?rN(n):nN(n)),a.boolean&&r.hyperscript&&(n=""),a.property==="style"&&typeof n=="string"&&(r.react||r.vue||r.vdom)&&(n=qX(n,c)),r.vue?a.property!=="style"&&(i="attrs"):a.mustUseProperty||(r.vdom?a.property!=="style"&&(i="attributes"):r.hyperscript&&(i="attrs")),i?e[i]=Object.assign(e[i]||{},{[a.attribute]:n}):a.space&&r.react?e[OX[a.property]||a.property]=n:e[a.attribute]=n)}function BX(e){let t=e("div",{});return Boolean(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function UX(e){return"context"in e&&"cleanup"in e}function jX(e){return e("div",{}).type==="VirtualNode"}function GX(e){let t=e("div",{});return Boolean(t&&t.context&&t.context._isVue)}function qX(e,t){let n={};try{(0,uN.default)(e,(r,c)=>{r.slice(0,4)==="-ms-"&&(r="ms-"+r.slice(4)),n[r.replace(/-([a-z])/g,(a,i)=>i.toUpperCase())]=c})}catch(r){throw r.message=t+"[style]"+r.message.slice(9),r}return n}var dN={}.hasOwnProperty;function i7(e,t){let n=t||{};function r(c,...a){let i=r.invalid,s=r.handlers;if(c&&dN.call(c,e)){let o=String(c[e]);i=dN.call(s,o)?s[o]:r.unknown}if(i)return i.call(this,c,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var WX={}.hasOwnProperty,hN=i7("type",{handlers:{root:KX,element:JX,text:QX,comment:XX,doctype:YX}});function ru(e,t){return hN(e,t==="svg"?z3:Me)}function KX(e,t){var n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=cu(e.children,n,t),yt(e,n)}function $X(e,t){var n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=cu(e.children,n,t),yt(e,n)}function YX(e){return yt(e,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}function QX(e){return yt(e,{nodeName:"#text",value:e.value,parentNode:void 0})}function XX(e){return yt(e,{nodeName:"#comment",data:e.value,parentNode:void 0})}function JX(e,t){var n=t.space;return mN(r,Object.assign({},e,{children:[]}),{space:n});function r(c,a){var i=[],s,o,l,f,m;for(l in a)!WX.call(a,l)||a[l]===!1||(s=He(t,l),!(s.boolean&&!a[l])&&(o={name:l,value:a[l]===!0?"":String(a[l])},s.space&&s.space!=="html"&&s.space!=="svg"&&(f=l.indexOf(":"),f<0?o.prefix="":(o.name=l.slice(f+1),o.prefix=l.slice(0,f)),o.namespace=y3[s.space]),i.push(o)));return t.space==="html"&&e.tagName==="svg"&&(t=z3),m=yt(e,{nodeName:c,tagName:c,attrs:i,namespaceURI:y3[t.space],childNodes:[],parentNode:void 0}),m.childNodes=cu(e.children,m,t),c==="template"&&(m.content=$X(e.content,t)),m}}function cu(e,t,n){var r=-1,c=[],a;if(e)for(;++r{let J=N;if(J.value.stitch&&W!==null&&k!==null)return W.children[k]=J.value.stitch,k}),e.type!=="root"&&m.type==="root"&&m.children.length===1)return m.children[0];return m;function p(){let N={nodeName:"template",tagName:"template",attrs:[],namespaceURI:y3.html,childNodes:[]},k={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:y3.html,childNodes:[]},W={nodeName:"#document-fragment",childNodes:[]};if(c._bootstrap(k,N),c._pushTmplInsertionMode(ZX),c._initTokenizerForFragmentParsing(),c._insertFakeRootElement(),c._resetInsertionMode(),c._findFormInFragmentContext(),s=c.tokenizer,!s)throw new Error("Expected `tokenizer`");return o=s.preprocessor,f=s.__mixins[0],l=f.posTracker,a(e),L(),c._adoptNodes(k.childNodes[0],W),W}function h(){let N=c.treeAdapter.createDocument();if(c._bootstrap(N,void 0),s=c.tokenizer,!s)throw new Error("Expected `tokenizer`");return o=s.preprocessor,f=s.__mixins[0],l=f.posTracker,a(e),L(),N}function v(N){let k=-1;if(N)for(;++ks7(t,n,e)}var I8={strip:["script"],clobberPrefix:"user-content-",clobber:["name","id"],ancestors:{tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols:{href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames:["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes:{a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required:{input:{type:"checkbox",disabled:!0}}};var D3={}.hasOwnProperty,pJ=[].push,iu={root:{children:CN},doctype:dJ,comment:hJ,element:{tagName:yN,properties:vJ,children:CN},text:{value:HJ},"*":{data:HN,position:HN}};function su(e,t){var n={type:"root",children:[]},r;return e&&typeof e=="object"&&e.type&&(r=zN(Object.assign({},I8,t||{}),e,[]),r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r)),n}function zN(e,t,n){var r=t&&t.type,c={type:t.type},a,i,s,o,l;if(D3.call(iu,r)&&(i=iu[r],typeof i=="function"&&(i=i(e,t)),i)){a=!0,s=Object.assign({},i,iu["*"]);for(l in s)D3.call(s,l)&&(o=s[l](e,t[l],t,n),o===!1?(a=null,c[l]=t[l]):o!=null&&(c[l]=o))}return a?c:c.type==="element"&&!e.strip.includes(c.tagName)?c.children:null}function CN(e,t,n,r){var c=[],a=-1,i;if(Array.isArray(t)){for(n.type==="element"&&r.push(n.tagName);++a");return r<0?n:n.slice(0,r)}function HJ(e,t){return typeof t=="string"?t:""}function HN(e,t){return t}function MJ(e,t,n,r){for(var c=-1,a=[],i;++c-1&&c>s||a>-1&&c>a||i>-1&&c>i)return!0;for(;++l4&&e.slice(0,4).toLowerCase()==="data"}function ou(e=I8){return t=>su(t,e)}var TJ=/#(\d+)([\s:,.!]|$)/g;function lu(e,t,n,r){let c=new RegExp(`^#*\\s?${VN(t)} +*`);e=e.replace(c,"");let a=new RegExp(`^#*\\s?${VN(n)} +*`);return e=e.replace(a,""),e=e.replace(TJ,`[#$1](${r}/issues/$1)$2`),e}function VN(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var o7=e=>Object.values(e.obsidian.selectedPluginsById).reduce((t,n)=>t+(n?1:0),0);var e0=e1(X1());var xN=e1(EN()),NN=({text:e})=>{let t=e0.useRef({didChange:!1,previousText:""});return(0,xN.useChangeAwareEffect)(({did:n,previous:r,isMount:c})=>{n.text.change&&!c&&(t.current={didChange:!0,previousText:r.text})},{text:e}),t.current.didChange?e0.createElement("span",{key:e},e0.createElement(AJ,null,t.current.previousText),e0.createElement(wJ,null,e)):e0.createElement("span",null,e)},uu=1.25,AJ=M1.span` + animation-name: fadeOut; + animation-delay: 0s; + animation-duration: ${uu}s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; + position: absolute; + + @keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } + } +`,wJ=M1.span` + opacity: 0; + animation-name: fadeIn; + animation-delay: ${uu}s; + animation-duration: ${uu}s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; + + @keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } +`;var kN=e1(X1());var wN=e1(at()),bN=require("obsidian");var bJ=!1,AN="obsidian-plugin-update-tracker",kJ={excludeDismissed:!0,excludeTooRecentUpdates:!0,excludeIncompatibleVersions:!0},_J=(e,t,n,r,c,a=(0,wN.default)())=>{let i=Object.assign({excludeDisabledPlugins:t.excludeDisabledPlugins,excludeBetaVersions:t.excludeBetaVersions},kJ,e),s=ie.create(n,c),o=PJ(t);return s.filter(l=>{let f=!0;return l.keepReleaseVersions(p=>!(i.excludeIncompatibleVersions&&p.minObsidianAppVersion!=null&&!(0,bN.requireApiVersion)(p.minObsidianAppVersion)||i.excludeTooRecentUpdates&&t.daysToSuppressNewUpdates>0&&a.diff(p.updatedAt,"days")t.add(r+c.versionNumber));return(r,c)=>t.has(r+c)}var f7=_J;function t0(e={}){let t=Y1(i=>i.obsidian.pluginManifests),n=Y1(i=>i.obsidian.enabledPlugins),r=Y1(i=>i.releases.releases),c=Y1(i=>i.obsidian.settings);return kN.useMemo(()=>f7(e,c,t,n,r),[[...Object.values(e),c,t,n,r]])}var nA=e1(FN()),rA=e1(KN()),cA=e1(eA());var H4=e1(X1());function St(e,t){return t!==1?e+"s":e}var hu=1200,OJ={loading:{icon:cA.faSpinner,colour:void 0,text:void 0},success:{icon:nA.faCheck,colour:void 0,text:void 0},error:{icon:rA.faCircleXmark,colour:"#FF3333",text:"Error"}},RJ=({numberOfPluginsSelected:e,onClickInstall:t,onClickDismissVersions:n,isDisabled:r})=>{let[c,a]=H4.useState({isInProgress:!1}),i=`${e} Plugin${e!=1?"s":""} Selected`,s=`Update ${St("Plugin",e)}`,o=OJ[c.displayIcon||"loading"],l=r||c.isInProgress;function f(m){a({isInProgress:!0,displayIcon:"loading"}),setTimeout(async()=>{let p=!0;try{await m()}catch(v){p=!1}a({isInProgress:!0,displayIcon:p?"success":"error"});let h=p?hu:hu*2;setTimeout(()=>{a({isInProgress:!1,displayIcon:void 0})},h)},hu)}return H4.createElement(IJ,null,H4.createElement(DJ,null,!c.isInProgress&&H4.createElement(FJ,null,i),c.isInProgress&&H4.createElement(H4.Fragment,null,o.text&&H4.createElement("span",null,o.text," "),H4.createElement(r4,{icon:o.icon,spin:c.displayIcon==="loading",color:o.colour}))),H4.createElement(BJ,null,H4.createElement(tA,{onClick:()=>f(t),disabled:l,isDisabled:l},s),H4.createElement(tA,{onClick:()=>f(n),disabled:l,isDisabled:l},"Ignore Version")))},IJ=M1.div` + display: flex; + flex-direction: column; + align-items: center; + + padding: 0.5rem 2rem; + + h4 { + margin: 0 0 0.25rem 0; + text-align: center; + } + + background-color: var(--background-secondary); + + border: 3px var(--background-modifier-border) solid; + border-bottom: none; +`,DJ=M1.div` + margin-bottom: 0.25rem; + font-size: var(--h4-size); + line-height: var(--h4-line-height); +`,FJ=M1.h4` + margin: 0; +`,BJ=M1.div` + display: flex; + flex-direction: row; + align-items: center; + + button { + margin-right: 0.5rem; + } + + button:last-child { + margin-right: 0; + } +`,tA=M1.button` + opacity: ${({isDisabled:e})=>e?"0.75":"1"}; + cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"}; +`,aA=RJ;vu.default.extend(fA.default);var UJ=({titleEl:e,persistPluginSettings:t,closeObsidianTab:n})=>{let r=t0(),c=Y1(v=>v.releases.isLoadingReleases),a=Y1(Oc),i=Y1(o7),s=Y1(v=>v.releases.isUpdatingDismissedVersions),o=lt();d1.useEffect(()=>{!c&&r.length===0&&n()},[c,r]),d1.useEffect(()=>{let v="Available Plugin Updates";r.length>0&&(v=v+` (${r.length})`),e&&(e.innerText=v)},[e,r.length]);function l(v,H){o(bT({pluginId:v,selected:H}))}function f(v){let H=r.map(y=>y.getPluginId());o(kT({select:v,pluginIds:H}))}function m(){return o(it())}async function p(){let v=ce(r,y=>y.getPluginId()),H=a.map(y=>({pluginId:y,pluginVersionNumber:v[y].getLatestVersionNumber(),isLastAvailableVersion:v[y].getReleaseVersions().length<=1}));await o(Ze({pluginVersionsToDismiss:H,persistPluginSettings:t}))}let h=d1.useMemo(()=>r.map(v=>({id:v.getPluginId(),name:v.getPluginName(),lastUpdatedTime:v.getLatestUpdateTime(),downloads:v.getLatestDownloads(),githubRepositoryUrl:v.getPluginRepositoryUrl(),installedVersionNumber:v.getInstalledVersionNumber(),latestInstallableVersionNumber:v.getLatestVersionNumber(),latestInstallableVersionIsBeta:v.isLatestVersionABetaVersion(),releaseNotes:v.getReleaseVersions().map(H=>({releaseId:H.releaseId,versionName:H.versionName,versionNumber:H.versionNumber,notes:H.notes,isBetaVersion:H.isBetaVersion})),hasInstallableReleaseAssets:!!v.getLatestReleaseAssetIds()})),[r]);return d1.createElement(jJ,{plugins:h,selectedPluginCount:i,selectedPluginIds:a,isUpdatingDismissedVersions:s,handleToggleSelection:l,handleToggleSelectAll:f,handleInstall:m,handleClickDismissPluginVersions:p})},jJ=({plugins:e,isInitiallyExpanded:t,selectedPluginIds:n,selectedPluginCount:r,handleToggleSelection:c,handleToggleSelectAll:a,handleInstall:i,isUpdatingDismissedVersions:s,handleClickDismissPluginVersions:o})=>{let l=d1.useRef({});d1.useMemo(()=>{e.forEach(g=>{let z=(0,vu.default)(g.lastUpdatedTime||0);(!(g.id in l.current)||z.isAfter(l.current[g.id]))&&(l.current[g.id]=z)})},[e]);let f=d1.useMemo(()=>e.sort((g,z)=>l.current[g.id].isAfter(l.current[z.id])?-1:1).map(g=>({...g,releaseNotes:g.releaseNotes.map(z=>({...z,notes:lu(z.notes,z.versionName,z.versionNumber,g.githubRepositoryUrl)}))})),[e]),m=d1.useMemo(()=>new Set(n),[n]);function p(g,z){let S=z.target;c(g,S.checked)}async function h(){return await i()}function v(g){let z=g.target;a(z.checked)}let H=r===e.length,y=H?"Deselect All":"Select All",d=s;return d1.createElement(d1.Fragment,null,e.length>1&&d1.createElement(WJ,null,d1.createElement("input",{type:"checkbox",onChange:v,checked:H,disabled:d,title:y,"aria-label":y,"aria-label-position":"top"})),d1.createElement(qJ,null,f.map(g=>d1.createElement(GJ,{plugin:g,key:g.id,isInitiallyExpanded:e.length===1||!!t,isSelectionDisabled:d,selected:m.has(g.id),onToggleSelectedClicked:z=>p(g.id,z)}))),r>0&&d1.createElement(oZ,null,d1.createElement(aA,{numberOfPluginsSelected:r,isDisabled:d,onClickInstall:h,onClickDismissVersions:o})))},GJ=({plugin:e,isInitiallyExpanded:t,isSelectionDisabled:n,selected:r,onToggleSelectedClicked:c})=>{var h,v;let[a,i]=d1.useState(t),s=(0,uA.default)(e.releaseNotes,H=>!(0,mA.default)(H.notes))!=null,o=`${e.name} (${e.latestInstallableVersionNumber})`,l=`${e.downloads.toLocaleString()} Downloads`,f=!!e.lastUpdatedTime,m=`Updated ${(h=e.lastUpdatedTime)==null?void 0:h.fromNow()}`,p=`${e.githubRepositoryUrl}/compare/${e.installedVersionNumber}...${e.latestInstallableVersionNumber}#files_bucket`;return d1.createElement(KJ,null,d1.createElement($J,null,d1.createElement(YJ,null,d1.createElement(NN,{text:o}),e.latestInstallableVersionIsBeta&&d1.createElement(QJ,{"aria-label":"This version may be unstable","aria-label-position":"top",className:"obsidian-plugin-update-tracker-beta-version"},"\u26A0\uFE0F Beta Version")),d1.createElement(XJ,null,d1.createElement("input",{type:"checkbox",checked:r,disabled:n,onChange:c}))),d1.createElement(JJ,null,f&&d1.createElement(ZJ,{title:`${e.latestInstallableVersionNumber} code last updated ${(v=e.lastUpdatedTime)==null?void 0:v.fromNow()}`},d1.createElement(r4,{icon:iA.faClock}),d1.createElement("span",null,m)),d1.createElement(eZ,{title:`${e.downloads.toLocaleString()} downloads of ${e.latestInstallableVersionNumber}`},d1.createElement(r4,{icon:lA.faDownload}),d1.createElement("span",null,l)),d1.createElement(tZ,null,d1.createElement("a",{href:p,target:"_blank",title:"View Changes on Github"},d1.createElement(r4,{icon:$T}),d1.createElement("span",null,"Code Changes")))),d1.createElement(nZ,null,d1.createElement(rZ,{hasReleaseNotes:s},d1.createElement(r4,{icon:a?sA.faCaretDown:oA.faCaretRight,onClick:()=>i(!a),title:a?"Hide Release Notes":"Show Release Notes",size:"2x"})),d1.createElement(cZ,null,a&&e.releaseNotes.map(H=>d1.createElement(aZ,{key:H.releaseId},d1.createElement(sZ,null,`${H.versionName}${H.isBetaVersion&&!H.versionName.toLowerCase().includes("beta")?" (Beta)":""}`),d1.createElement(lZ,null,d1.createElement(M8,{rehypePlugins:[au,ou]},H.notes)))),!a&&d1.createElement(iZ,null,`${e.installedVersionNumber} \u2192 ${e.latestInstallableVersionNumber}`))))},pA="2px",u7=`${pA} var(--background-modifier-border) solid`,qJ=M1.div` + display: flex; + flex-direction: column; + + > * { + margin-bottom: 1rem; + } + + background-color: var(--background-primary); + color: var(--text-normal); +`,WJ=M1.div` + display: flex; + justify-content: flex-end; + + border: ${pA} transparent solid; + padding-bottom: 0.25rem; + padding-right: 0.25rem; + input { + margin: 0; + cursor: pointer; + } +`,KJ=M1.div` + display: flex; + flex-direction: column; + align-items: stretch; + + margin-left: 0.25rem; + padding-bottom: 0.25rem; + border: ${u7}; + border-radius: 0.25rem; +`,$J=M1.div` + display: flex; + flex-direction: row; + + border-bottom: ${u7}; +`,YJ=M1.h2` + flex-grow: 1; + text-align: center; + + margin-top: 0.25rem; + margin-bottom: 0.25rem; + padding-bottom: 0.5rem; +`,QJ=M1.span` + font-size: 0.45em; + display: inline-block; + text-align: center; + vertical-align: middle; + + color: #212529; + background-color: #ffc107; + font-weight: 700; + + border-radius: 10em; + + padding: 0.25em 0.5em; + margin-left: 0.4rem; +`,XJ=M1.div` + padding-top: 0.25rem; + padding-right: 0.25rem; + input { + margin: 0; + cursor: pointer; + } +`,JJ=M1.div` + display: flex; + flex-direction: row; + padding-top: 0.35rem; + padding-bottom: 0.7rem; + border-bottom: ${u7}; + + > * { + flex-grow: 1; + display: flex; + justify-content: center; + + border-right: ${u7}; + :last-child { + border-right: none; + } + } + + svg { + padding-right: 0.35rem; + } +`,ZJ=M1.div` + svg { + position: relative; + top: 0.25rem; + } +`,eZ=M1.div` + svg { + position: relative; + top: 0.12rem; + } +`,tZ=M1.div` + cursor: pointer; + + span { + color: var(--text-normal); + } + + a { + text-decoration: none; + } + + span:hover { + color: var(--text-accent); + text-decoration: underline; + } +`,nZ=M1.div` + padding-top: 0.75rem; + margin: 0.35rem; + display: flex; + background-color: var(--background-primary-alt); + border-radius: 0.25rem; +`,rZ=M1.div` + width: 1.25rem; + margin-left: 1rem; + margin-right: 0.5rem; + + svg { + position: relative; + bottom: 0.25rem; + cursor: pointer; + + visibility: ${({hasReleaseNotes:e})=>e?"visible":"hidden"}; + } + + svg:hover { + color: var(--interactive-accent-hover); + } +`,cZ=M1.div` + display: flex; + flex-direction: column; +`,aZ=M1.div` + display: flex; + flex-direction: column; + align-items: flex-start; +`,iZ=M1.div` + font-size: 1.5rem; + font-weight: bold; +`,sZ=M1.div` + font-size: 1.75rem; + font-weight: bold; + text-decoration: underline; +`,oZ=M1.div` + position: fixed; + bottom: 0; + left: 50%; + transform: translateX(-50%); + + @keyframes slideInFromRight { + 0% { + left: 200%; + } + 100% { + left: 50%; + } + } + animation-name: slideInFromRight; + animation-duration: 0.5s; + animation-timing-function: ease-in-out; +`,lZ=M1.div``,dA=UJ;var gA=e1(at()),y2=e1(X1());var hA=e1(i8());var vA=X4("obsidian/acknowledgeUpdateResult",async(e,t)=>{var i,s;let n=t.getState(),r=window.app;if((0,hA.default)(n.obsidian.pluginUpdateProgress,o=>o.pluginId===n.obsidian.thisPluginId&&o.status==="success")!=null&&((i=r.plugins)==null?void 0:i.disablePlugin)&&((s=r.plugins)==null?void 0:s.enablePlugin)){await r.plugins.disablePlugin(n.obsidian.thisPluginId),await r.plugins.enablePlugin(n.obsidian.thisPluginId);return}t.dispatch(_T()),f7({},n.obsidian.settings,n.obsidian.pluginManifests,n.obsidian.enabledPlugins,n.releases.releases).length===0&&r.workspace.detachLeavesOfType(c3)});var fZ={loading:"\u231B",success:"\u2705",failure:"\u274C"},uZ=({titleEl:e})=>{let t=Y1(s=>s.obsidian.pluginUpdateProgress),n=Y1(s=>s.obsidian.isUpdatingPlugins),r=Y1(o7),c=Y1(s=>s.obsidian.githubRateLimitResetTimestamp),a=lt();y2.useEffect(()=>{e&&(n?e.innerText=`Updating ${r} ${St("Plugin",r)}...`:e.innerText="Finished Updating Plugins")},[e,r,n]);function i(){a(vA())}return y2.createElement(mZ,{updateResults:t,isUpdatingPlugins:n,onAcknowledgeResults:i,githubRateLimitTimestamp:c})},mZ=({updateResults:e,isUpdatingPlugins:t,githubRateLimitTimestamp:n,onAcknowledgeResults:r})=>{let c=e.reduce((i,s)=>i+(s.status==="failure"?1:0),0),a="";return n?a=`Try again ${(0,gA.default)(n).fromNow()}, and if that doesn't fix it then report an issue `:a="Try again or report an issue ",y2.createElement(dZ,null,e.map(i=>y2.createElement(pZ,{updateResult:i,key:i.pluginName})),!t&&y2.createElement(CZ,null,y2.createElement("hr",null),c===0&&y2.createElement("div",null,y2.createElement("p",null,`${St("Plugin",e.length)} successfully installed and reloaded!`)),c>0&&y2.createElement("div",null,y2.createElement("p",null,`Completed with ${c} ${St("failure",c)}`),y2.createElement("p",null,y2.createElement("span",null,a),y2.createElement("a",{href:"https://github.com/swar8080/obsidian-plugin-update-tracker/issues",target:"_blank"},"here"))),y2.createElement("button",{onClick:r},"Continue")))},pZ=({updateResult:e})=>y2.createElement(hZ,null,y2.createElement(vZ,null,y2.createElement("span",null,e.pluginName),y2.createElement(gZ,null,fZ[e.status]))),dZ=M1.div``,hZ=M1.div` + display: flex; + flex-direction: row; +`,vZ=M1.div``,gZ=M1.span` + padding-left: 0.35rem; +`,CZ=M1.div` + hr { + margin: 1rem 0 0.5rem 0; + } +`,CA=uZ;var HZ=({titleEl:e,persistPluginSettings:t,closeObsidianTab:n})=>Y1(c=>c.obsidian.isUpdatingPlugins||!c.obsidian.isUpdateResultAcknowledged)?gu.createElement(CA,{titleEl:e}):gu.createElement(dA,{titleEl:e,persistPluginSettings:t,closeObsidianTab:n}),HA=HZ;var m7=e1(X1());var MZ=({rootEl:e})=>{let t=Y1(c=>c.obsidian.settings.showIconOnMobile),n=t0().length,r=m7.useRef(e.style.display);return m7.useLayoutEffect(()=>{t&&n>0?e.style.display=r.current:e.style.display="none"},[t,n,e]),null},MA=MZ;var xA=e1(EA());var M4=e1(X1());var D8="plugin-update-tracker-icon",zZ=({onClickViewUpdates:e,parentEl:t})=>{let n=Y1(s=>s.releases.isLoadingReleases),r=Y1(s=>s.releases.isErrorLoadingReleases),c=t0().length,a=Y1(s=>s.obsidian.settings.hideIconIfNoUpdatesAvailable),i=M4.useRef(t.style.display);return M4.useLayoutEffect(()=>{!a||n||c>0||r?t.style.display=i.current:t.style.display="none"},[a,c,n,r,t]),M4.createElement(M4.Fragment,null,M4.createElement(yZ,{isLoading:n,isErrorLoading:r,pluginsWithUpdatesCount:c,onClickViewUpdates:e}))},yZ=({onClickViewUpdates:e,isLoading:t,isErrorLoading:n,pluginsWithUpdatesCount:r})=>{let[c,a]=M4.useState(!1),i,s,o="0.55rem",l="0.05rem",f="0.5rem",m="0.3rem",p="pointer",h,v=!1,H;t?(i="\u231B",s="transparent",o="0.45rem",l="-0.1rem",p="wait",h="Checking for plugin updates...",H=`${D8}--loading`):n?(i="x",s="#FF3333",h="Error checking for plugin updates",p="default",H=`${D8}--error`):r>0?(i=(r||0).toString(),s="#FF4F00",m="0.3rem",l="0.08rem",i.length>1&&(f="0.65rem",m="0.3rem 0.4rem"),h=`${r} plugin update${r>1?"s":""} available`,v=!0,H=`${D8}--updates-available`):(i="\u2713",s="#197300",h="All plugins up-to-date",p="none",H=`${D8}--no-updates-available`);let y=c&&v;return M4.createElement(TZ,{onClick:()=>{v&&e()},cursor:p,title:h,"aria-label":h,"aria-label-position":"top",onMouseOver:()=>a(!0),onMouseLeave:()=>a(!1),isHighlighted:y,className:`${D8} ${H}`},M4.createElement(r4,{icon:xA.faPlug}),M4.createElement(VZ,{color:s,fontSize:o,width:f,padding:m,leftOffset:l,isHighlighted:y},i))},TZ=M1.div` + height: 100%; + display: flex; + align-items: center; + + cursor: ${e=>e.cursor}; + user-select: none; + + svg { + color: var(--text-muted); + color: ${e=>e.isHighlighted?"var(--text-accent-hover)":"var(--text-muted)"}; + font-size: 14px; + height: 14px; + } +`,VZ=M1.div` + display: flex; + justify-content: center; + align-items: center; + position: relative; + line-height: 0.5; + left: ${e=>e.leftOffset}; + + box-sizing: border-box; + font-size: ${e=>e.fontSize}; + width: ${e=>e.width}; + height: 0.6rem; + max-height: var(--icon-size); + max-width: var(--icon-size); + padding: ${e=>e.padding}; + border-radius: 50%; + + background: ${e=>e.color}; + color: white; + filter: ${e=>e.isHighlighted?"brightness(0.75)":"brightness(1)"}; +`,NA=zZ;var c3="swar8080/AVAILABLE_PLUGIN_UPDATES",SZ=parseInt("1800")*1e3,LZ=parseInt("30")*1e3,EZ=!1,xZ=!1,p7=class extends T2.Plugin{async onload(){this.registerView(c3,n=>new F8(this,n)),v3.dispatch(tl),v3.dispatch(wT(this.manifest.id)),await this.loadSettings(),this.pollForInstalledPluginVersions(),this.pollForPluginReleases(),(T2.Platform.isDesktop||EZ)&&this.renderStatusBarIcon(),this.updateRibonIconVisibilty(),this.addSettingTab(new Hu(this.app,this)),this.closeTabWhenOpeningNewNote(),v3.dispatch(st({persistPluginSettings:n=>this.saveSettings(n)}))}async loadSettings(){let n=await this.loadData();this.settings=Object.assign({},kc,n),v3.dispatch(el(this.settings))}async saveSettings(n){this.settings=n,await this.saveData(n),v3.dispatch(el(n))}pollForInstalledPluginVersions(){v3.dispatch(s8(this.app)),this.registerInterval(window.setInterval(()=>{v3.dispatch(s8(this.app))},LZ))}pollForPluginReleases(){v3.dispatch(P6()),this.registerInterval(window.setInterval(()=>{v3.dispatch(P6())},SZ))}renderStatusBarIcon(){this.statusBarIconEl=this.addStatusBarItem(),(0,T2.requireApiVersion)("1.0.0")||(this.statusBarIconEl.style.padding="0",this.statusBarIconEl.style.marginLeft="-0.25rem",this.statusBarIconEl.style.marginRight="-0.25rem"),this.statusBarIconRootComponent=d7(this.statusBarIconEl,Lt.createElement(NA,{onClickViewUpdates:()=>this.showPluginUpdateManagerView(),parentEl:this.statusBarIconEl}))}updateRibonIconVisibilty(){if((T2.Platform.isMobile||xZ)&&this.settings.showIconOnMobile&&!this.ribbonIconRootComponent){let r=this.addRibbonIcon("download","Plugin Update Tracker",()=>this.showPluginUpdateManagerView()),c=r.createEl("div");this.ribbonIconRootComponent=d7(c,Lt.createElement(MA,{rootEl:r}))}}closeTabWhenOpeningNewNote(){this.fileOpenCallback=()=>{T2.Platform.isDesktop&&this.app.workspace.detachLeavesOfType(c3)},app.workspace.on("file-open",this.fileOpenCallback),this.activeLeafChangeCallback=n=>{!((n==null?void 0:n.view)instanceof F8)&&T2.Platform.isMobile&&this.app.workspace.detachLeavesOfType(c3)},app.workspace.on("active-leaf-change",this.activeLeafChangeCallback)}async showPluginUpdateManagerView(){if(!this.app.workspace.getActiveViewOfType(F8)){this.app.workspace.detachLeavesOfType(c3);let n=T2.Platform.isMobile?!1:"tab";await this.app.workspace.getLeaf(n).setViewState({type:c3,active:!0});let r=this.app.workspace.getLeavesOfType(c3)[0];r&&this.app.workspace.revealLeaf(r)}}onunload(){this.app.workspace.detachLeavesOfType(c3),this.statusBarIconRootComponent&&this.statusBarIconRootComponent.unmount(),this.ribbonIconRootComponent&&this.ribbonIconRootComponent.unmount(),this.app.workspace.off("file-open",this.fileOpenCallback),this.app.workspace.off("active-leaf-change",this.activeLeafChangeCallback)}},F8=class extends T2.ItemView{constructor(n,r){super(r);this.plugin=n}getViewType(){return c3}getDisplayText(){return"Plugin Updates"}async onOpen(){let n=this.containerEl.children[1];n.empty();let r=this.titleEl;this.rootComponent=d7(n,Lt.createElement(HA,{titleEl:r,persistPluginSettings:async c=>await this.plugin.saveSettings(c),closeObsidianTab:()=>this.closeThisTab()}))}closeThisTab(){this.plugin.app.workspace.detachLeavesOfType(c3)}async onClose(){this.rootComponent&&this.rootComponent.unmount()}},Hu=class extends T2.PluginSettingTab{constructor(n,r){super(n,r);this.plugin=r}display(){let{containerEl:n}=this;n.empty(),n.createEl("h2",{text:"Plugin Update Filters"}),new T2.Setting(n).setName("Days until new plugin versions are shown").setDesc("Waiting a few days can help avoid bugs and security issues").addText(c=>{var a;return c.setValue(((a=this.plugin.settings.daysToSuppressNewUpdates)!=null?a:"").toString()).onChange(async i=>{let s=parseInt(i);if(!!i&&(isNaN(s)||s<0)&&(s=0,c.setValue("0")),!isNaN(s)){let o={...this.plugin.settings,daysToSuppressNewUpdates:s};await this.plugin.saveSettings(o)}})}),new T2.Setting(n).setName("Ignore Beta Versions").setDesc("Plugin beta versions are less stable but allow trying out new features sooner").addToggle(c=>c.setValue(this.plugin.settings.excludeBetaVersions).onChange(async a=>{let i={...this.plugin.settings,excludeBetaVersions:a};await this.plugin.saveSettings(i)})),new T2.Setting(n).setName("Ignore Updates to Disabled Plugins").addToggle(c=>c.setValue(this.plugin.settings.excludeDisabledPlugins).onChange(async a=>{let i={...this.plugin.settings,excludeDisabledPlugins:a};await this.plugin.saveSettings(i)})),n.createEl("h2",{text:"Appearance"}),new T2.Setting(n).setName("Hide plugin icon if no updates are available").addToggle(c=>c.setValue(this.plugin.settings.hideIconIfNoUpdatesAvailable).onChange(async a=>{await this.plugin.saveSettings({...this.plugin.settings,hideIconIfNoUpdatesAvailable:a})})),new T2.Setting(n).setName("Show on Mobile").setDesc("Adds a ribbon action icon to mobile whenever updates are available. Note that the update count is not currently shown.").addToggle(c=>c.setValue(this.plugin.settings.showIconOnMobile).onChange(async a=>{await this.plugin.saveSettings({...this.plugin.settings,showIconOnMobile:a}),this.plugin.updateRibonIconVisibilty()})),n.createEl("a",{text:"View CSS Snippet selector list"},c=>{c.href="https://github.com/swar8080/obsidian-plugin-update-tracker#custom-css-snippets",c.style.fontSize="var(--font-smallest)"}),n.createEl("h2",{text:"Restore Ignored Plugin Versions"});let r=n.createDiv();this.dismissedVersionsRootComponent=d7(r,Lt.createElement(FT,{persistPluginSettings:c=>this.plugin.saveSettings(c)}))}hide(){this.dismissedVersionsRootComponent&&this.dismissedVersionsRootComponent.unmount()}};function d7(e,t){let n=AA.createRoot(e);return n.render(Lt.createElement(Qs,{store:v3},t)),n} +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/.obsidian/plugins/obsidian-plugin-update-tracker/manifest.json b/.obsidian/plugins/obsidian-plugin-update-tracker/manifest.json new file mode 100644 index 0000000..f84e172 --- /dev/null +++ b/.obsidian/plugins/obsidian-plugin-update-tracker/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "obsidian-plugin-update-tracker", + "name": "Plugin Update Tracker", + "version": "1.4.3", + "minAppVersion": "0.15.0", + "description": "Know when installed plugins have updates and evaluate the risk of upgrading", + "author": "Obsidian", + "authorUrl": "https://github.com/swar8080/obsidian-plugin-update-tracker", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/obsidian-tasks-plugin/data.json b/.obsidian/plugins/obsidian-tasks-plugin/data.json index 8254018..bf15989 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/data.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/data.json @@ -2,7 +2,7 @@ "globalFilter": "", "removeGlobalFilter": false, "setDoneDate": true, - "autoSuggestInEditor": true, + "autoSuggestInEditor": false, "autoSuggestMinMatch": 0, "autoSuggestMaxItems": 6, "provideAccessKeys": true, diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 92e5089..e243e80 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,27 +122,27 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var P_=Object.create;var Bn=Object.defineProperty,A_=Object.defineProperties,k_=Object.getOwnPropertyDescriptor,N_=Object.getOwnPropertyDescriptors,x_=Object.getOwnPropertyNames,Jd=Object.getOwnPropertySymbols,S_=Object.getPrototypeOf,tf=Object.prototype.hasOwnProperty,C_=Object.prototype.propertyIsEnumerable;var ef=(r,e,t)=>e in r?Bn(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,De=(r,e)=>{for(var t in e||(e={}))tf.call(e,t)&&ef(r,t,e[t]);if(Jd)for(var t of Jd(e))C_.call(e,t)&&ef(r,t,e[t]);return r},ft=(r,e)=>A_(r,N_(e));var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),I_=(r,e)=>{for(var t in e)Bn(r,t,{get:e[t],enumerable:!0})},rf=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of x_(e))!tf.call(r,i)&&i!==t&&Bn(r,i,{get:()=>e[i],enumerable:!(n=k_(e,i))||n.enumerable});return r};var vs=(r,e,t)=>(t=r!=null?P_(S_(r)):{},rf(e||!r||!r.__esModule?Bn(t,"default",{value:r,enumerable:!0}):t,r)),F_=r=>rf(Bn({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var xf=p((CA,Ps)=>{var df,ff,pf,hf,mf,yf,gf,_f,Tf,Ms,fo,bf,vf,Ef,an,wf,Rf,Df,Mf,Of,Pf,Af,kf,Nf,Os;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof Ps=="object"&&typeof Ps.exports=="object"?r(t(e,t(Ps.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};df=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},ff=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},mf=function(n,i){return function(s,a){i(s,a,n)}},yf=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},gf=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(h){try{f(a.next(h))}catch(g){l(g)}}function d(h){try{f(a.throw(h))}catch(g){l(g)}}function f(h){h.done?u(h.value):o(h.value).then(c,d)}f((a=a.apply(n,i||[])).next())})},_f=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(h){return d([f,h])}}function d(f){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=f[0]&2?o.return:f[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,f[1])).done)return u;switch(o=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return s.label++,{value:f[1],done:!1};case 5:s.label++,o=f[1],f=[0];continue;case 7:f=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){s=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},fo=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},bf=function(){for(var n=[],i=0;i1||c(m,y)})})}function c(m,y){try{d(a[m](y))}catch(P){g(u[0][3],P)}}function d(m){m.value instanceof an?Promise.resolve(m.value.v).then(f,h):g(u[0][2],m)}function f(m){c("next",m)}function h(m){c("throw",m)}function g(m,y){m(y),u.shift(),u.length&&c(u[0][0],u[0][1])}},Rf=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:an(n[o](l)),done:o==="return"}:u?u(l):l}:u}},Df=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof Ms=="function"?Ms(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,d){l=n[u](l),o(c,d,l.done,l.value)})}}function o(u,l,c,d){Promise.resolve(d).then(function(f){u({value:f,done:c})},l)}},Mf=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};Of=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&Os(i,n,s);return t(i,n),i},Pf=function(n){return n&&n.__esModule?n:{default:n}},Af=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},kf=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},Nf=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",df),r("__assign",ff),r("__rest",pf),r("__decorate",hf),r("__param",mf),r("__metadata",yf),r("__awaiter",gf),r("__generator",_f),r("__exportStar",Tf),r("__createBinding",Os),r("__values",Ms),r("__read",fo),r("__spread",bf),r("__spreadArrays",vf),r("__spreadArray",Ef),r("__await",an),r("__asyncGenerator",wf),r("__asyncDelegator",Rf),r("__asyncValues",Df),r("__makeTemplateObject",Mf),r("__importStar",Of),r("__importDefault",Pf),r("__classPrivateFieldGet",Af),r("__classPrivateFieldSet",kf),r("__classPrivateFieldIn",Nf)})});var se=p(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.matchAnyPattern=vr.extractTerms=vr.repeatedTimeunitPattern=void 0;function PT(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}vr.repeatedTimeunitPattern=PT;function Mp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}vr.extractTerms=Mp;function AT(r){return`(?:${Mp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}vr.matchAnyPattern=AT});var Z=p((Do,Mo)=>{(function(r,e){typeof Do=="object"&&typeof Mo!="undefined"?Mo.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Do,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},P=function(x,E,b){var A=String(x);return!A||A.length>=E?x:""+Array(E+1-A.length).join(b)+x},w={s:P,z:function(x){var E=-x.utcOffset(),b=Math.abs(E),A=Math.floor(b/60),_=b%60;return(E<=0?"+":"-")+P(A,2,"0")+":"+P(_,2,"0")},m:function x(E,b){if(E.date(){"use strict";var kT=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});Er.findYearClosestToRef=Er.findMostLikelyADYear=void 0;var NT=kT(Z());function xT(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Er.findMostLikelyADYear=xT;function ST(r,e,t){let n=NT.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.parseTimeUnits=W.TIME_UNITS_PATTERN=W.parseYear=W.YEAR_PATTERN=W.parseOrdinalNumberPattern=W.ORDINAL_NUMBER_PATTERN=W.parseNumberPattern=W.NUMBER_PATTERN=W.TIME_UNIT_DICTIONARY=W.ORDINAL_WORD_DICTIONARY=W.INTEGER_WORD_DICTIONARY=W.MONTH_DICTIONARY=W.FULL_MONTH_NAME_DICTIONARY=W.WEEKDAY_DICTIONARY=void 0;var Fs=se(),CT=Ue();W.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};W.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};W.MONTH_DICTIONARY=Object.assign(Object.assign({},W.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});W.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};W.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};W.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};W.NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(W.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Pp(r){let e=r.toLowerCase();return W.INTEGER_WORD_DICTIONARY[e]!==void 0?W.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}W.parseNumberPattern=Pp;W.ORDINAL_NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(W.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function IT(r){let e=r.toLowerCase();return W.ORDINAL_WORD_DICTIONARY[e]!==void 0?W.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}W.parseOrdinalNumberPattern=IT;W.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function FT(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return CT.findMostLikelyADYear(e)}W.parseYear=FT;var Ap=`(${W.NUMBER_PATTERN})\\s{0,3}(${Fs.matchAnyPattern(W.TIME_UNIT_DICTIONARY)})`,Op=new RegExp(Ap,"i");W.TIME_UNITS_PATTERN=Fs.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Ap);function UT(r){let e={},t=r,n=Op.exec(t);for(;n;)qT(e,n),t=t.substring(n[0].length).trim(),n=Op.exec(t);return e}W.parseTimeUnits=UT;function qT(r,e){let t=Pp(e[1]),n=W.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var kp=p((Oo,Po)=>{(function(r,e){typeof Oo=="object"&&typeof Po!="undefined"?Po.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Oo,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var yt=p(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.implySimilarTime=jt.assignSimilarTime=jt.assignSimilarDate=jt.assignTheNextDay=void 0;var Np=Re();function WT(r,e){e=e.add(1,"day"),xp(r,e),Sp(r,e)}jt.assignTheNextDay=WT;function xp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}jt.assignSimilarDate=xp;function LT(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",Np.Meridiem.AM):r.assign("meridiem",Np.Meridiem.PM)}jt.assignSimilarTime=LT;function Sp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}jt.implySimilarTime=Sp});var Cp=p(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.toTimezoneOffset=Wr.TIMEZONE_ABBR_MAP=void 0;Wr.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function YT(r){var e;return r==null?null:typeof r=="number"?r:(e=Wr.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Wr.toTimezoneOffset=YT});var fe=p(Bt=>{"use strict";var Ip=Bt&&Bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.ParsingResult=Bt.ParsingComponents=Bt.ReferenceWithTimezone=void 0;var $T=Ip(kp()),Us=Ip(Z()),Ao=yt(),jT=Cp();Us.default.extend($T.default);var ko=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=jT.toTimezoneOffset(e.timezone))}};Bt.ReferenceWithTimezone=ko;var Lr=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Us.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new Lr(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Us.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Us.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new Lr(e);return t.hour||t.minute||t.second?(Ao.assignSimilarTime(i,n),Ao.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Ao.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};Bt.ParsingComponents=Lr;var ni=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new Lr(e),this.end=s}clone(){let e=new ni(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Bt.ParsingResult=ni});var R=p(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.AbstractParserWithWordBoundaryChecking=void 0;var No=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var So=qe(),BT=fe(),GT=R(),HT=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${So.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),zT=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${So.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),xo=class extends GT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?zT:HT}innerExtract(e,t){let n=So.parseTimeUnits(t[1]);return BT.ParsingComponents.createRelativeFromReference(e.reference,n)}};Co.default=xo});var $p=p(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var KT=Ue(),Lp=qe(),Yp=qe(),Ws=qe(),VT=se(),XT=R(),ZT=new RegExp(`(?:on\\s{0,3})?(${Ws.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ws.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${VT.matchAnyPattern(Lp.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Yp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Up=1,qp=2,QT=3,Wp=4,Io=class extends XT.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZT}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Lp.MONTH_DICTIONARY[t[QT].toLowerCase()],s=Ws.parseOrdinalNumberPattern(t[Up]);if(s>31)return t.index=t.index+t[Up].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Wp]){let a=Yp.parseYear(t[Wp]);n.start.assign("year",a)}else{let a=KT.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[qp]){let a=Ws.parseOrdinalNumberPattern(t[qp]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Fo.default=Io});var zp=p(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var JT=Ue(),Gp=qe(),Ls=qe(),Hp=qe(),eb=se(),tb=R(),rb=new RegExp(`(${eb.matchAnyPattern(Gp.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ls.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ls.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Hp.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),nb=1,ib=2,jp=3,Bp=4,Uo=class extends tb.AbstractParserWithWordBoundaryChecking{innerPattern(){return rb}innerExtract(e,t){let n=Gp.MONTH_DICTIONARY[t[nb].toLowerCase()],i=Ls.parseOrdinalNumberPattern(t[ib]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Bp]){let u=Hp.parseYear(t[Bp]);s.assign("year",u)}else{let u=JT.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[jp])return s;let a=Ls.parseOrdinalNumberPattern(t[jp]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};qo.default=Uo});var Xp=p(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Wo=qe(),sb=Ue(),ab=se(),Vp=qe(),ob=R(),ub=new RegExp(`((?:in)\\s*)?(${ab.matchAnyPattern(Wo.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Vp.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),lb=1,cb=2,Kp=3,Lo=class extends ob.AbstractParserWithWordBoundaryChecking{innerPattern(){return ub}innerExtract(e,t){let n=t[cb].toLowerCase();if(t[0].length<=3&&!Wo.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[lb]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Wo.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Kp]){let a=Vp.parseYear(t[Kp]);i.start.assign("year",a)}else{let a=sb.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Yo.default=Lo});var Jp=p(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var Qp=qe(),db=se(),fb=R(),pb=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${db.matchAnyPattern(Qp.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),hb=1,mb=2,Zp=3,yb=4,$o=class extends fb.AbstractParserWithWordBoundaryChecking{innerPattern(){return pb}innerExtract(e,t){let n=t[Zp]?parseInt(t[Zp]):Qp.MONTH_DICTIONARY[t[mb].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[hb]);return{day:parseInt(t[yb]),month:n,year:i}}};jo.default=$o});var eh=p(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var gb=R(),_b=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Tb=1,bb=2,Bo=class extends gb.AbstractParserWithWordBoundaryChecking{innerPattern(){return _b}innerExtract(e,t){let n=parseInt(t[bb]),i=parseInt(t[Tb]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Go.default=Bo});var Yr=p(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.AbstractTimeExpressionParser=void 0;var He=Re();function vb(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function Eb(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var th=2,dn=3,Ys=4,$s=5,ii=6,Ho=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[th]);if(o>100){if(this.strictMode||t[dn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[dn]!=null){if(t[dn].length==1&&!t[ii])return null;s=parseInt(t[dn])}if(s>=60)return null;if(o>12&&(a=He.Meridiem.PM),t[ii]!=null){if(o>12)return null;let u=t[ii][0].toLowerCase();u=="a"&&(a=He.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=He.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",He.Meridiem.AM):i.imply("meridiem",He.Meridiem.PM),t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[th]),a=0,o=-1;if(t[dn]!=null?a=parseInt(t[dn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=He.Meridiem.PM),t[ii]!=null){if(s>12)return null;let u=t[ii][0].toLowerCase();u=="a"&&(o=He.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=He.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==He.Meridiem.AM?(n.start.imply("meridiem",He.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",He.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",He.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",He.Meridiem.PM)):s>12?i.imply("meridiem",He.Meridiem.PM):s<=12&&i.imply("meridiem",He.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=vb(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=Eb(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};js.AbstractTimeExpressionParser=Ho});var rh=p(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Bs=Re(),wb=Yr(),zo=class extends wb.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Bs.Meridiem.PM)):i<6&&n.assign("meridiem",Bs.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Bs.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Bs.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Ko.default=zo});var gt=p(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.addImpliedTimeUnits=fn.reverseTimeUnits=void 0;function Rb(r){let e={};for(let t in r)e[t]=-r[t];return e}fn.reverseTimeUnits=Rb;function Db(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}fn.addImpliedTimeUnits=Db});var nh=p(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var Xo=qe(),Mb=fe(),Ob=R(),Pb=gt(),Ab=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),kb=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Vo=class extends Ob.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?kb:Ab}innerExtract(e,t){let n=Xo.parseTimeUnits(t[1]),i=Pb.reverseTimeUnits(n);return Mb.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zo.default=Vo});var ih=p(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var Jo=qe(),Nb=fe(),xb=R(),Sb=new RegExp(`(${Jo.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Cb=new RegExp("("+Jo.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Ib=1,Qo=class extends xb.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Cb:Sb}innerExtract(e,t){let n=Jo.parseTimeUnits(t[Ib]);return Nb.ParsingComponents.createRelativeFromReference(e.reference,n)}};eu.default=Qo});var hn=p(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.MergingRefiner=pn.Filter=void 0;var tu=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};pn.Filter=tu;var ru=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};pn.MergingRefiner=ru});var Gt=p(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var Fb=hn(),nu=class extends Fb.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var Ub=si&&si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(si,"__esModule",{value:!0});var qb=Ub(Gt()),su=class extends qb.default{patternBetween(){return/^\s*(to|-)\s*$/i}};si.default=su});var ah=p(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.mergeDateTimeComponent=mn.mergeDateTimeResult=void 0;var Wb=Re();function Lb(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=au(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=au(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var Yb=hn(),oh=ah(),ou=class extends Yb.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?oh.mergeDateTimeResult(t,n):oh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};uu.default=ou});var uh=p(ai=>{"use strict";var $b=ai&&ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ai,"__esModule",{value:!0});var jb=$b(tr()),lu=class extends jb.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};ai.default=lu});var lh=p(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var Bb=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Gb={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},cu=class{constructor(e){this.timezone=Object.assign(Object.assign({},Gb),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=Bb.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};du.default=cu});var Gs=p(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var Hb=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),zb=1,Kb=2,Vb=3,fu=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=Hb.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Kb]),o=parseInt(s[Vb]||"0"),u=a*60+o;u>14*60||(s[zb]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};pu.default=fu});var ch=p(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var hu=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};mu.default=hu});var dh=p(oi=>{"use strict";var Xb=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0});var Zb=Xb(Z()),yu=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Zb.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};oi.default=yu});var fh=p(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var Qb=hn(),gu=class extends Qb.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};_u.default=gu});var vu=p(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var Jb=R(),ev=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),tv=1,rv=2,nv=3,ph=4,iv=5,hh=6,mh=7,yh=8,gh=9,Tu=class extends Jb.AbstractParserWithWordBoundaryChecking{innerPattern(){return ev}innerExtract(e,t){let n={};if(n.year=parseInt(t[tv]),n.month=parseInt(t[rv]),n.day=parseInt(t[nv]),t[ph]!=null)if(n.hour=parseInt(t[ph]),n.minute=parseInt(t[iv]),t[hh]!=null&&(n.second=parseInt(t[hh])),t[mh]!=null&&(n.millisecond=parseInt(t[mh])),t[yh]==null)n.timezoneOffset=0;else{let i=parseInt(t[yh]),s=0;t[gh]!=null&&(s=parseInt(t[gh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};bu.default=Tu});var _h=p(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var sv=hn(),Eu=class extends sv.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};wu.default=Eu});var rr=p(yn=>{"use strict";var $r=yn&&yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yn,"__esModule",{value:!0});yn.includeCommonConfiguration=void 0;var av=$r(lh()),ov=$r(Gs()),Th=$r(ch()),uv=$r(dh()),lv=$r(fh()),cv=$r(vu()),dv=$r(_h());function fv(r,e=!1){return r.parsers.unshift(new cv.default),r.refiners.unshift(new dv.default),r.refiners.unshift(new av.default),r.refiners.unshift(new ov.default),r.refiners.unshift(new Th.default),r.refiners.push(new Th.default),r.refiners.push(new uv.default),r.refiners.push(new lv.default(e)),r}yn.includeCommonConfiguration=fv});var ir=p(re=>{"use strict";var pv=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(re,"__esModule",{value:!0});re.noon=re.morning=re.midnight=re.yesterdayEvening=re.evening=re.lastNight=re.tonight=re.theDayAfter=re.tomorrow=re.theDayBefore=re.yesterday=re.today=re.now=void 0;var Ht=fe(),gn=pv(Z()),nr=yt(),ui=Re();function hv(r){let e=gn.default(r.instant),t=new Ht.ParsingComponents(r,{});return nr.assignSimilarDate(t,e),nr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}re.now=hv;function mv(r){let e=gn.default(r.instant),t=new Ht.ParsingComponents(r,{});return nr.assignSimilarDate(t,e),nr.implySimilarTime(t,e),t}re.today=mv;function yv(r){return bh(r,1)}re.yesterday=yv;function bh(r,e){return Ru(r,-e)}re.theDayBefore=bh;function gv(r){return Ru(r,1)}re.tomorrow=gv;function Ru(r,e){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t=t.add(e,"day"),nr.assignSimilarDate(n,t),nr.implySimilarTime(n,t),n}re.theDayAfter=Ru;function _v(r,e=22){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ui.Meridiem.PM),nr.assignSimilarDate(n,t),n}re.tonight=_v;function Tv(r,e=0){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),nr.assignSimilarDate(n,t),n.imply("hour",e),n}re.lastNight=Tv;function bv(r,e=20){let t=new Ht.ParsingComponents(r,{});return t.imply("meridiem",ui.Meridiem.PM),t.imply("hour",e),t}re.evening=bv;function vv(r,e=20){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t=t.add(-1,"day"),nr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ui.Meridiem.PM),n}re.yesterdayEvening=vv;function Ev(r){let e=new Ht.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}re.midnight=Ev;function wv(r,e=6){let t=new Ht.ParsingComponents(r,{});return t.imply("meridiem",ui.Meridiem.AM),t.imply("hour",e),t}re.morning=wv;function Rv(r){let e=new Ht.ParsingComponents(r,{});return e.imply("meridiem",ui.Meridiem.AM),e.imply("hour",12),e}re.noon=Rv});var vh=p(Pt=>{"use strict";var Dv=Pt&&Pt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Mv=Pt&&Pt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ov=Pt&&Pt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Dv(e,r,t);return Mv(e,r),e},Pv=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0});var Av=Pv(Z()),kv=R(),Nv=yt(),li=Ov(ir()),xv=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Du=class extends kv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return xv}innerExtract(e,t){let n=Av.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return li.now(e.reference);case"today":return li.today(e.reference);case"yesterday":return li.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return li.tomorrow(e.reference);case"tonight":return li.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),Nv.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Pt.default=Du});var Eh=p(ci=>{"use strict";var Sv=ci&&ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ci,"__esModule",{value:!0});var Hs=Re(),Cv=R(),Iv=Sv(Z()),Fv=yt(),Uv=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Mu=class extends Cv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Uv}innerExtract(e,t){let n=Iv.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",20);break;case"midnight":Fv.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",12);break}return i}};ci.default=Mu});var jr=p(wr=>{"use strict";var qv=wr&&wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wr,"__esModule",{value:!0});wr.toDayJSClosestWeekday=wr.toDayJSWeekday=void 0;var wh=qv(Z());function Wv(r,e,t){if(!t)return Rh(r,e);let n=wh.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}wr.toDayJSWeekday=Wv;function Rh(r,e){let t=wh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var Dh=qe(),Lv=se(),Yv=R(),$v=jr(),jv=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${Lv.matchAnyPattern(Dh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Bv=1,Gv=2,Hv=3,Ou=class extends Yv.AbstractParserWithWordBoundaryChecking{innerPattern(){return jv}innerExtract(e,t){let n=t[Gv].toLowerCase(),i=Dh.WEEKDAY_DICTIONARY[n],s=t[Bv],a=t[Hv],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=$v.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Pu.default=Ou});var Ah=p(di=>{"use strict";var zv=di&&di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(di,"__esModule",{value:!0});var Ph=qe(),Oh=fe(),Kv=zv(Z()),Vv=R(),Xv=se(),Zv=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Xv.matchAnyPattern(Ph.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Qv=1,Jv=2,Au=class extends Vv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zv}innerExtract(e,t){let n=t[Qv].toLowerCase(),i=t[Jv].toLowerCase(),s=Ph.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Oh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Oh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=Kv.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};di.default=Au});var At=p(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ParsingContext=bn.Chrono=void 0;var _n=fe(),e1=ku(),Tn=class{constructor(e){e=e||e1.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Tn({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new zs(e,t,n),s=[];return this.parsers.forEach(a=>{let o=Tn.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof _n.ParsingResult?c=l:l instanceof _n.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};bn.Chrono=Tn;var zs=class{constructor(e,t,n){this.text=e,this.reference=new _n.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof _n.ParsingComponents?e:new _n.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new _n.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};bn.ParsingContext=zs});var Br=p(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var kh=Ue(),t1=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Ks=1,Nh=5,xh=2,Sh=3,Nu=4,xu=class{constructor(e){this.groupNumberMonth=e?Sh:xh,this.groupNumberDay=e?xh:Sh}pattern(){return t1}extract(e,t){if(t[Ks]=="/"||t[Nh]=="/"){t.index+=t[0].length;return}let n=t.index+t[Ks].length,i=t[0].substr(t[Ks].length,t[0].length-t[Ks].length-t[Nh].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Nu]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Nu]){let u=parseInt(t[Nu]),l=kh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=kh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Su.default=xu});var Ih=p(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var Ch=qe(),r1=fe(),n1=R(),i1=gt(),s1=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Ch.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Cu=class extends n1.AbstractParserWithWordBoundaryChecking{innerPattern(){return s1}innerExtract(e,t){let n=t[1].toLowerCase(),i=Ch.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=i1.reverseTimeUnits(i);break}return r1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Iu.default=Cu});var Uh=p(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var a1=hn(),Fu=fe(),o1=qe(),u1=gt();function Fh(r){return r.text.match(/\s+(before|from)$/i)!=null}function l1(r){return r.text.match(/\s+(after|since)$/i)!=null}var Uu=class extends a1.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Fh(t)&&!l1(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=o1.parseTimeUnits(t.text);Fh(t)&&(i=u1.reverseTimeUnits(i));let s=Fu.ParsingComponents.createRelativeFromReference(new Fu.ReferenceWithTimezone(n.start.date()),i);return new Fu.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};qu.default=Uu});var ku=p(Te=>{"use strict";var Oe=Te&&Te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Te,"__esModule",{value:!0});Te.createConfiguration=Te.createCasualConfiguration=Te.parseDate=Te.parse=Te.GB=Te.strict=Te.casual=void 0;var c1=Oe(Fp()),d1=Oe($p()),f1=Oe(zp()),p1=Oe(Xp()),h1=Oe(Jp()),m1=Oe(eh()),y1=Oe(rh()),g1=Oe(nh()),_1=Oe(ih()),T1=Oe(sh()),b1=Oe(uh()),v1=rr(),E1=Oe(vh()),w1=Oe(Eh()),R1=Oe(Mh()),D1=Oe(Ah()),Wu=At(),M1=Oe(Br()),O1=Oe(Ih()),P1=Oe(Uh());Te.casual=new Wu.Chrono(qh(!1));Te.strict=new Wu.Chrono(Vs(!0,!1));Te.GB=new Wu.Chrono(Vs(!1,!0));function A1(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=A1;function k1(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=k1;function qh(r=!1){let e=Vs(!1,r);return e.parsers.unshift(new E1.default),e.parsers.unshift(new w1.default),e.parsers.unshift(new p1.default),e.parsers.unshift(new D1.default),e.parsers.unshift(new O1.default),e}Te.createCasualConfiguration=qh;function Vs(r=!0,e=!1){return v1.includeCommonConfiguration({parsers:[new M1.default(e),new c1.default,new d1.default,new f1.default,new R1.default,new h1.default,new m1.default,new y1.default(r),new g1.default(r),new _1.default(r)],refiners:[new P1.default,new b1.default,new T1.default]},r)}Te.createConfiguration=Vs});var Wh=p(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var N1=Yr(),Lu=class extends N1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Yu.default=Lu});var fi=p(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.parseTimeUnits=ae.TIME_UNITS_PATTERN=ae.parseYear=ae.YEAR_PATTERN=ae.parseNumberPattern=ae.NUMBER_PATTERN=ae.TIME_UNIT_DICTIONARY=ae.INTEGER_WORD_DICTIONARY=ae.MONTH_DICTIONARY=ae.WEEKDAY_DICTIONARY=void 0;var $u=se(),x1=Ue();ae.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};ae.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};ae.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};ae.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};ae.NUMBER_PATTERN=`(?:${$u.matchAnyPattern(ae.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Yh(r){let e=r.toLowerCase();return ae.INTEGER_WORD_DICTIONARY[e]!==void 0?ae.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ae.parseNumberPattern=Yh;ae.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function S1(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return x1.findMostLikelyADYear(e)}ae.parseYear=S1;var $h=`(${ae.NUMBER_PATTERN})\\s{0,5}(${$u.matchAnyPattern(ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Lh=new RegExp($h,"i");ae.TIME_UNITS_PATTERN=$u.repeatedTimeunitPattern("",$h);function C1(r){let e={},t=r,n=Lh.exec(t);for(;n;)I1(e,n),t=t.substring(n[0].length),n=Lh.exec(t);return e}ae.parseTimeUnits=C1;function I1(r,e){let t=Yh(e[1]),n=ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Bh=p(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var jh=fi(),F1=se(),U1=R(),q1=jr(),W1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${F1.matchAnyPattern(jh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),L1=1,Y1=3,$1=2,ju=class extends U1.AbstractParserWithWordBoundaryChecking{innerPattern(){return W1}innerExtract(e,t){let n=t[$1].toLowerCase(),i=jh.WEEKDAY_DICTIONARY[n],s=t[L1],a=t[Y1],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=q1.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Bu.default=ju});var Kh=p(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var Rr=Re(),j1=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),B1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),G1=2,Gh=3,Hh=4,zh=5,vn=class{pattern(e){return j1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=vn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=B1.exec(i);return s&&(n.end=vn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[G1]),t[Gh]!=null&&(i=parseInt(t[Gh])),i>=60||n>24)return null;if(n>=12&&(s=Rr.Meridiem.PM),t[zh]!=null){if(n>12)return null;let a=t[zh].toLowerCase();a.match(/morgen|vormittag/)&&(s=Rr.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Rr.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Rr.Meridiem.AM,n=0):n<6?s=Rr.Meridiem.AM:(s=Rr.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Rr.Meridiem.AM):e.imply("meridiem",Rr.Meridiem.PM),t[Hh]!=null){let a=parseInt(t[Hh]);if(a>=60)return null;e.assign("second",a)}return e}};Gu.default=vn});var Vh=p(pi=>{"use strict";var H1=pi&&pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pi,"__esModule",{value:!0});var z1=H1(Gt()),Hu=class extends z1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};pi.default=Hu});var Xh=p(hi=>{"use strict";var K1=hi&&hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hi,"__esModule",{value:!0});var V1=K1(tr()),zu=class extends V1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};hi.default=zu});var Ku=p(yi=>{"use strict";var X1=yi&&yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yi,"__esModule",{value:!0});var Z1=X1(Z()),Gr=Re(),Q1=R(),J1=yt(),eE=gt(),mi=class extends Q1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=Z1.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return J1.implySimilarTime(s,n),mi.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=eE.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break}return e}};yi.default=mi});var Jh=p(kt=>{"use strict";var tE=kt&&kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),rE=kt&&kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),nE=kt&&kt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&tE(e,r,t);return rE(e,r),e},Qh=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});var iE=Qh(Z()),sE=R(),Hr=yt(),aE=Qh(Ku()),Zh=nE(ir()),oE=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),uE=1,lE=2,Vu=class extends sE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return oE}innerExtract(e,t){let n=iE.default(e.refDate),i=(t[uE]||"").toLowerCase(),s=(t[lE]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Zh.now(e.reference);break;case"heute":a=Zh.today(e.reference);break;case"morgen":Hr.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Hr.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Hr.assignSimilarDate(a,n),Hr.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Hr.assignSimilarDate(a,n),Hr.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Hr.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=aE.default.extractTimeComponents(a,s)),a}};kt.default=Vu});var sm=p(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var cE=Ue(),nm=fi(),im=fi(),dE=se(),fE=R(),pE=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${dE.matchAnyPattern(nm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${im.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),em=1,tm=2,hE=3,rm=4,Xu=class extends fE.AbstractParserWithWordBoundaryChecking{innerPattern(){return pE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=nm.MONTH_DICTIONARY[t[hE].toLowerCase()],s=parseInt(t[em]);if(s>31)return t.index=t.index+t[em].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[rm]){let a=im.parseYear(t[rm]);n.start.assign("year",a)}else{let a=cE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[tm]){let a=parseInt(t[tm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Zu.default=Xu});var am=p(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var Xs=fi(),mE=fe(),yE=R(),gE=gt(),_E=se(),Qu=class extends yE.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Xs.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${_E.matchAnyPattern(Xs.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Xs.parseNumberPattern(t[2]):1,i=Xs.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=gE.reverseTimeUnits(s)),mE.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ju.default=Qu});var lm=p(Pe=>{"use strict";var Nt=Pe&&Pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createConfiguration=Pe.createCasualConfiguration=Pe.parseDate=Pe.parse=Pe.strict=Pe.casual=void 0;var TE=rr(),om=At(),bE=Nt(Br()),vE=Nt(vu()),EE=Nt(Wh()),wE=Nt(Bh()),RE=Nt(Kh()),DE=Nt(Vh()),ME=Nt(Xh()),OE=Nt(Jh()),PE=Nt(Ku()),AE=Nt(sm()),kE=Nt(am());Pe.casual=new om.Chrono(um());Pe.strict=new om.Chrono(el(!0));function NE(r,e,t){return Pe.casual.parse(r,e,t)}Pe.parse=NE;function xE(r,e,t){return Pe.casual.parseDate(r,e,t)}Pe.parseDate=xE;function um(r=!0){let e=el(!1,r);return e.parsers.unshift(new PE.default),e.parsers.unshift(new OE.default),e.parsers.unshift(new kE.default),e}Pe.createCasualConfiguration=um;function el(r=!0,e=!0){return TE.includeCommonConfiguration({parsers:[new vE.default,new bE.default(e),new EE.default,new RE.default,new AE.default,new wE.default],refiners:[new DE.default,new ME.default]},r)}Pe.createConfiguration=el});var dm=p(xt=>{"use strict";var SE=xt&&xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),CE=xt&&xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),IE=xt&&xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&SE(e,r,t);return CE(e,r),e},FE=xt&&xt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xt,"__esModule",{value:!0});var UE=FE(Z()),qE=Re(),WE=R(),cm=yt(),Zs=IE(ir()),tl=class extends WE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=UE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Zs.now(e.reference);case"aujourd'hui":return Zs.today(e.reference);case"hier":return Zs.yesterday(e.reference);case"demain":return Zs.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(cm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",qE.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),cm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};xt.default=tl});var fm=p(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var gi=Re(),LE=R(),rl=class extends LE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",gi.Meridiem.AM);break}return i}};nl.default=rl});var pm=p(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var YE=Yr(),il=class extends YE.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};sl.default=il});var hm=p(_i=>{"use strict";var $E=_i&&_i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_i,"__esModule",{value:!0});var jE=$E(tr()),al=class extends jE.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};_i.default=al});var mm=p(Ti=>{"use strict";var BE=Ti&&Ti.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ti,"__esModule",{value:!0});var GE=BE(Gt()),ol=class extends GE.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ti.default=ol});var Dr=p(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.parseTimeUnits=Q.TIME_UNITS_PATTERN=Q.parseYear=Q.YEAR_PATTERN=Q.parseOrdinalNumberPattern=Q.ORDINAL_NUMBER_PATTERN=Q.parseNumberPattern=Q.NUMBER_PATTERN=Q.TIME_UNIT_DICTIONARY=Q.INTEGER_WORD_DICTIONARY=Q.MONTH_DICTIONARY=Q.WEEKDAY_DICTIONARY=void 0;var ul=se();Q.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Q.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Q.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Q.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Q.NUMBER_PATTERN=`(?:${ul.matchAnyPattern(Q.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function gm(r){let e=r.toLowerCase();return Q.INTEGER_WORD_DICTIONARY[e]!==void 0?Q.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Q.parseNumberPattern=gm;Q.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function HE(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Q.parseOrdinalNumberPattern=HE;Q.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function zE(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Q.parseYear=zE;var _m=`(${Q.NUMBER_PATTERN})\\s{0,5}(${ul.matchAnyPattern(Q.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ym=new RegExp(_m,"i");Q.TIME_UNITS_PATTERN=ul.repeatedTimeunitPattern("",_m);function KE(r){let e={},t=r,n=ym.exec(t);for(;n;)VE(e,n),t=t.substring(n[0].length),n=ym.exec(t);return e}Q.parseTimeUnits=KE;function VE(r,e){let t=gm(e[1]),n=Q.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var bm=p(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var Tm=Dr(),XE=se(),ZE=R(),QE=jr(),JE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${XE.matchAnyPattern(Tm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),e0=1,t0=2,ll=class extends ZE.AbstractParserWithWordBoundaryChecking{innerPattern(){return JE}innerExtract(e,t){let n=t[e0].toLowerCase(),i=Tm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[t0];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=QE.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};cl.default=ll});var Rm=p(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var bi=Re(),r0=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),n0=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),i0=2,vm=3,Em=4,wm=5,En=class{pattern(e){return r0}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=En.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=n0.exec(i);return s&&(n.end=En.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[i0]),t[vm]!=null&&(i=parseInt(t[vm])),i>=60||n>24)return null;if(n>=12&&(s=bi.Meridiem.PM),t[wm]!=null){if(n>12)return null;let a=t[wm][0].toLowerCase();a=="a"&&(s=bi.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=bi.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",bi.Meridiem.AM):e.imply("meridiem",bi.Meridiem.PM),t[Em]!=null){let a=parseInt(t[Em]);if(a>=60)return null;e.assign("second",a)}return e}};dl.default=En});var km=p(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var s0=Ue(),Pm=Dr(),Am=Dr(),Qs=Dr(),a0=se(),o0=R(),u0=new RegExp(`(?:on\\s*?)?(${Qs.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Qs.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${a0.matchAnyPattern(Pm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Am.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Dm=1,Mm=2,l0=3,Om=4,fl=class extends o0.AbstractParserWithWordBoundaryChecking{innerPattern(){return u0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Pm.MONTH_DICTIONARY[t[l0].toLowerCase()],s=Qs.parseOrdinalNumberPattern(t[Dm]);if(s>31)return t.index=t.index+t[Dm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Om]){let a=Am.parseYear(t[Om]);n.start.assign("year",a)}else{let a=s0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Mm]){let a=Qs.parseOrdinalNumberPattern(t[Mm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};pl.default=fl});var xm=p(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var Nm=Dr(),c0=fe(),d0=R(),f0=gt(),hl=class extends d0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Nm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Nm.parseTimeUnits(t[1]),i=f0.reverseTimeUnits(n);return c0.ParsingComponents.createRelativeFromReference(e.reference,i)}};ml.default=hl});var Cm=p(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var Sm=Dr(),p0=fe(),h0=R(),yl=class extends h0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Sm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Sm.parseTimeUnits(t[1]);return p0.ParsingComponents.createRelativeFromReference(e.reference,n)}};gl.default=yl});var Im=p(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Js=Dr(),m0=fe(),y0=R(),g0=gt(),_0=se(),_l=class extends y0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Js.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${_0.matchAnyPattern(Js.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Js.parseNumberPattern(t[1]):1,i=Js.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=g0.reverseTimeUnits(s)),m0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Tl.default=_l});var qm=p(Ae=>{"use strict";var _t=Ae&&Ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.createConfiguration=Ae.createCasualConfiguration=Ae.parseDate=Ae.parse=Ae.strict=Ae.casual=void 0;var T0=rr(),Fm=At(),b0=_t(dm()),v0=_t(fm()),E0=_t(Br()),w0=_t(pm()),R0=_t(hm()),D0=_t(mm()),M0=_t(bm()),O0=_t(Rm()),P0=_t(km()),A0=_t(xm()),k0=_t(Cm()),N0=_t(Im());Ae.casual=new Fm.Chrono(Um());Ae.strict=new Fm.Chrono(bl(!0));function x0(r,e,t){return Ae.casual.parse(r,e,t)}Ae.parse=x0;function S0(r,e,t){return Ae.casual.parseDate(r,e,t)}Ae.parseDate=S0;function Um(r=!0){let e=bl(!1,r);return e.parsers.unshift(new b0.default),e.parsers.unshift(new v0.default),e.parsers.unshift(new N0.default),e}Ae.createCasualConfiguration=Um;function bl(r=!0,e=!0){return T0.includeCommonConfiguration({parsers:[new E0.default(e),new P0.default,new w0.default,new O0.default,new A0.default,new k0.default,new M0.default],refiners:[new R0.default,new D0.default]},r)}Ae.createConfiguration=bl});var Wm=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.toHankaku=void 0;function C0(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,I0)}ea.toHankaku=C0;function I0(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Ym=p(vi=>{"use strict";var F0=vi&&vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vi,"__esModule",{value:!0});var vl=Wm(),U0=Ue(),q0=F0(Z()),W0=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Lm=1,L0=2,El=3,Y0=4,$0=5,j0=6,wl=class{pattern(){return W0}extract(e,t){let n=parseInt(vl.toHankaku(t[$0])),i=parseInt(vl.toHankaku(t[j0])),s=e.createParsingComponents({day:i,month:n});if(t[Lm]&&t[Lm].match("\u540C|\u4ECA|\u672C")){let a=q0.default(e.refDate);s.assign("year",a.year())}if(t[L0]){let a=t[Y0],o=a=="\u5143"?1:parseInt(vl.toHankaku(a));t[El]=="\u4EE4\u548C"?o+=2018:t[El]=="\u5E73\u6210"?o+=1988:t[El]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=U0.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};vi.default=wl});var $m=p(Ei=>{"use strict";var B0=Ei&&Ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ei,"__esModule",{value:!0});var G0=B0(Gt()),Rl=class extends G0.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ei.default=Rl});var Bm=p(St=>{"use strict";var H0=St&&St.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),z0=St&&St.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),K0=St&&St.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&H0(e,r,t);return z0(e,r),e},V0=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});var X0=V0(Z()),jm=Re(),Dl=K0(ir()),Z0=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Ml=class{pattern(){return Z0}extract(e,t){let n=t[0],i=X0.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Dl.yesterday(e.reference);case"\u660E\u65E5":return Dl.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Dl.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",jm.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",jm.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};St.default=Ml});var zm=p(ke=>{"use strict";var Ol=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});ke.createConfiguration=ke.createCasualConfiguration=ke.parseDate=ke.parse=ke.strict=ke.casual=void 0;var Q0=Ol(Ym()),J0=Ol($m()),ew=Ol(Bm()),Gm=At();ke.casual=new Gm.Chrono(Hm());ke.strict=new Gm.Chrono(Pl());function tw(r,e,t){return ke.casual.parse(r,e,t)}ke.parse=tw;function rw(r,e,t){return ke.casual.parseDate(r,e,t)}ke.parseDate=rw;function Hm(){let r=Pl();return r.parsers.unshift(new ew.default),r}ke.createCasualConfiguration=Hm;function Pl(){return{parsers:[new Q0.default],refiners:[new J0.default]}}ke.createConfiguration=Pl});var ta=p(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.parseYear=zt.YEAR_PATTERN=zt.MONTH_DICTIONARY=zt.WEEKDAY_DICTIONARY=void 0;zt.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};zt.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};zt.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function nw(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}zt.parseYear=nw});var Vm=p(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var Km=ta(),iw=se(),sw=R(),aw=jr(),ow=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${iw.matchAnyPattern(Km.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),uw=1,lw=2,cw=3,Al=class extends sw.AbstractParserWithWordBoundaryChecking{innerPattern(){return ow}innerExtract(e,t){let n=t[lw].toLowerCase(),i=Km.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[uw],a=t[cw],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=aw.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};kl.default=Al});var Xm=p(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var dw=Yr(),Nl=class extends dw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};xl.default=Nl});var Zm=p(wi=>{"use strict";var fw=wi&&wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wi,"__esModule",{value:!0});var pw=fw(tr()),Sl=class extends pw.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};wi.default=Sl});var Qm=p(Ri=>{"use strict";var hw=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var mw=hw(Gt()),Cl=class extends mw.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ri.default=Cl});var iy=p(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var yw=Ue(),ry=ta(),ny=ta(),gw=se(),_w=R(),Tw=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${gw.matchAnyPattern(ry.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${ny.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Jm=1,ey=2,bw=3,ty=4,Il=class extends _w.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ry.MONTH_DICTIONARY[t[bw].toLowerCase()],s=parseInt(t[Jm]);if(s>31)return t.index=t.index+t[Jm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[ty]){let a=ny.parseYear(t[ty]);n.start.assign("year",a)}else{let a=yw.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ey]){let a=parseInt(t[ey]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Fl.default=Il});var sy=p(sr=>{"use strict";var vw=sr&&sr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ew=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ww=sr&&sr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&vw(e,r,t);return Ew(e,r),e};Object.defineProperty(sr,"__esModule",{value:!0});var Rw=R(),ra=ww(ir()),Ul=class extends Rw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return ra.now(e.reference);case"hoje":return ra.today(e.reference);case"amanha":case"amanh\xE3":return ra.tomorrow(e.reference);case"ontem":return ra.yesterday(e.reference)}return i}};sr.default=Ul});var ay=p(Di=>{"use strict";var Dw=Di&&Di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Di,"__esModule",{value:!0});var na=Re(),Mw=R(),Ow=yt(),Pw=Dw(Z()),ql=class extends Mw.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=Pw.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":Ow.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",12);break}return i}};Di.default=ql});var ly=p(Ne=>{"use strict";var Mr=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.createConfiguration=Ne.createCasualConfiguration=Ne.parseDate=Ne.parse=Ne.strict=Ne.casual=void 0;var Aw=rr(),oy=At(),kw=Mr(Br()),Nw=Mr(Vm()),xw=Mr(Xm()),Sw=Mr(Zm()),Cw=Mr(Qm()),Iw=Mr(iy()),Fw=Mr(sy()),Uw=Mr(ay());Ne.casual=new oy.Chrono(uy());Ne.strict=new oy.Chrono(Wl(!0));function qw(r,e,t){return Ne.casual.parse(r,e,t)}Ne.parse=qw;function Ww(r,e,t){return Ne.casual.parseDate(r,e,t)}Ne.parseDate=Ww;function uy(r=!0){let e=Wl(!1,r);return e.parsers.push(new Fw.default),e.parsers.push(new Uw.default),e}Ne.createCasualConfiguration=uy;function Wl(r=!0,e=!0){return Aw.includeCommonConfiguration({parsers:[new kw.default(e),new Nw.default,new xw.default,new Iw.default],refiners:[new Sw.default,new Cw.default]},r)}Ne.createConfiguration=Wl});var cy=p(Mi=>{"use strict";var Lw=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});var Yw=Lw(Gt()),Ll=class extends Yw.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Mi.default=Ll});var dy=p(Oi=>{"use strict";var $w=Oi&&Oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oi,"__esModule",{value:!0});var jw=$w(tr()),Yl=class extends jw.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Oi.default=Yl});var fy=p(ar=>{"use strict";var Bw=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Gw=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Hw=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Bw(e,r,t);return Gw(e,r),e};Object.defineProperty(ar,"__esModule",{value:!0});var zw=R(),ia=Hw(ir()),$l=class extends zw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return ia.now(e.reference);case"vandaag":return ia.today(e.reference);case"morgen":case"morgend":return ia.tomorrow(e.reference);case"gisteren":return ia.yesterday(e.reference)}return i}};ar.default=$l});var py=p(Pi=>{"use strict";var Kw=Pi&&Pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pi,"__esModule",{value:!0});var sa=Re(),Vw=R(),Xw=Kw(Z()),Zw=yt(),Qw=1,Jw=2,jl=class extends Vw.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Xw.default(e.refDate),i=e.createParsingComponents();switch(t[Qw]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[Jw].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Zw.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",12);break}return i}};Pi.default=jl});var ot=p(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.parseTimeUnits=j.TIME_UNITS_PATTERN=j.parseYear=j.YEAR_PATTERN=j.parseOrdinalNumberPattern=j.ORDINAL_NUMBER_PATTERN=j.parseNumberPattern=j.NUMBER_PATTERN=j.TIME_UNIT_DICTIONARY=j.ORDINAL_WORD_DICTIONARY=j.INTEGER_WORD_DICTIONARY=j.MONTH_DICTIONARY=j.WEEKDAY_DICTIONARY=void 0;var aa=se(),eR=Ue();j.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};j.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};j.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};j.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};j.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};j.NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function my(r){let e=r.toLowerCase();return j.INTEGER_WORD_DICTIONARY[e]!==void 0?j.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}j.parseNumberPattern=my;j.ORDINAL_NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function tR(r){let e=r.toLowerCase();return j.ORDINAL_WORD_DICTIONARY[e]!==void 0?j.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}j.parseOrdinalNumberPattern=tR;j.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function rR(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return eR.findMostLikelyADYear(e)}j.parseYear=rR;var yy=`(${j.NUMBER_PATTERN})\\s{0,5}(${aa.matchAnyPattern(j.TIME_UNIT_DICTIONARY)})\\s{0,5}`,hy=new RegExp(yy,"i");j.TIME_UNITS_PATTERN=aa.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",yy);function nR(r){let e={},t=r,n=hy.exec(t);for(;n;)iR(e,n),t=t.substring(n[0].length),n=hy.exec(t);return e}j.parseTimeUnits=nR;function iR(r,e){let t=my(e[1]),n=j.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var _y=p(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var gy=ot(),sR=fe(),aR=R(),Bl=class extends aR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+gy.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=gy.parseTimeUnits(t[1]);return sR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Bl});var by=p(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Ty=ot(),oR=se(),uR=R(),lR=jr(),cR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${oR.matchAnyPattern(Ty.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),dR=1,fR=2,pR=3,Hl=class extends uR.AbstractParserWithWordBoundaryChecking{innerPattern(){return cR}innerExtract(e,t){let n=t[fR].toLowerCase(),i=Ty.WEEKDAY_DICTIONARY[n],s=t[dR],a=t[pR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=lR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};zl.default=Hl});var My=p(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var hR=Ue(),Ry=ot(),oa=ot(),Dy=ot(),mR=se(),yR=R(),gR=new RegExp(`(?:on\\s*?)?(${oa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${oa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+mR.matchAnyPattern(Ry.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Dy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),_R=3,vy=1,Ey=2,wy=4,Kl=class extends yR.AbstractParserWithWordBoundaryChecking{innerPattern(){return gR}innerExtract(e,t){let n=Ry.MONTH_DICTIONARY[t[_R].toLowerCase()],i=oa.parseOrdinalNumberPattern(t[vy]);if(i>31)return t.index=t.index+t[vy].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[wy]){let u=Dy.parseYear(t[wy]);s.assign("year",u)}else{let u=hR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Ey])return s;let a=oa.parseOrdinalNumberPattern(t[Ey]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Vl.default=Kl});var ky=p(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var Py=ot(),TR=Ue(),bR=se(),Ay=ot(),vR=R(),ER=new RegExp(`(${bR.matchAnyPattern(Py.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Ay.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),wR=1,Oy=2,Xl=class extends vR.AbstractParserWithWordBoundaryChecking{innerPattern(){return ER}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[wR],s=Py.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Oy]){let a=Ay.parseYear(t[Oy]);n.assign("year",a)}else{let a=TR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Zl.default=Xl});var Ny=p(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var RR=R(),DR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),MR=1,OR=2,Ql=class extends RR.AbstractParserWithWordBoundaryChecking{innerPattern(){return DR}innerExtract(e,t){let n=parseInt(t[OR]),i=parseInt(t[MR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Jl.default=Ql});var xy=p(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var PR=Yr(),ec=class extends PR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};tc.default=ec});var Iy=p(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Cy=ot(),AR=se(),kR=R(),NR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${AR.matchAnyPattern(Cy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),xR=1,SR=2,Sy=3,CR=4,rc=class extends kR.AbstractParserWithWordBoundaryChecking{innerPattern(){return NR}innerExtract(e,t){let n=t[Sy]?parseInt(t[Sy]):Cy.MONTH_DICTIONARY[t[SR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[xR]);return{day:parseInt(t[CR]),month:n,year:i}}};nc.default=rc});var Fy=p(Ai=>{"use strict";var IR=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var FR=R(),ua=Re(),ic=yt(),UR=IR(Z()),qR=1,WR=2,sc=class extends FR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[qR].toLowerCase(),i=t[WR].toLowerCase(),s=e.createParsingComponents(),a=UR.default(e.refDate);switch(n){case"gisteren":ic.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ic.assignSimilarDate(s,a);break;case"morgen":ic.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",20);break}return s}};Ai.default=sc});var qy=p(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Uy=ot(),LR=fe(),YR=R(),$R=gt(),jR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Uy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ac=class extends YR.AbstractParserWithWordBoundaryChecking{innerPattern(){return jR}innerExtract(e,t){let n=t[1].toLowerCase(),i=Uy.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=$R.reverseTimeUnits(i);break}return LR.ParsingComponents.createRelativeFromReference(e.reference,i)}};oc.default=ac});var Yy=p(ki=>{"use strict";var BR=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var Ly=ot(),Wy=fe(),GR=BR(Z()),HR=R(),zR=se(),KR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${zR.matchAnyPattern(Ly.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),VR=1,XR=2,uc=class extends HR.AbstractParserWithWordBoundaryChecking{innerPattern(){return KR}innerExtract(e,t){let n=t[VR].toLowerCase(),i=t[XR].toLowerCase(),s=Ly.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,Wy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,Wy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=GR.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ki.default=uc});var $y=p(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var cc=ot(),ZR=fe(),QR=R(),JR=gt(),eD=new RegExp("("+cc.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),tD=new RegExp("("+cc.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),lc=class extends QR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?tD:eD}innerExtract(e,t){let n=cc.parseTimeUnits(t[1]),i=JR.reverseTimeUnits(n);return ZR.ParsingComponents.createRelativeFromReference(e.reference,i)}};dc.default=lc});var jy=p(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var pc=ot(),rD=fe(),nD=R(),iD=new RegExp("("+pc.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),sD=new RegExp("("+pc.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),aD=1,fc=class extends nD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sD:iD}innerExtract(e,t){let n=pc.parseTimeUnits(t[aD]);return rD.ParsingComponents.createRelativeFromReference(e.reference,n)}};hc.default=fc});var zy=p(xe=>{"use strict";var We=xe&&xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xe,"__esModule",{value:!0});xe.createConfiguration=xe.createCasualConfiguration=xe.parseDate=xe.parse=xe.strict=xe.casual=void 0;var oD=rr(),By=At(),uD=We(cy()),lD=We(dy()),cD=We(fy()),dD=We(py()),fD=We(Br()),pD=We(_y()),hD=We(by()),mD=We(My()),Gy=We(ky()),yD=We(Ny()),gD=We(xy()),_D=We(Iy()),TD=We(Fy()),bD=We(qy()),vD=We(Yy()),ED=We($y()),wD=We(jy());xe.casual=new By.Chrono(Hy());xe.strict=new By.Chrono(mc(!0));function RD(r,e,t){return xe.casual.parse(r,e,t)}xe.parse=RD;function DD(r,e,t){return xe.casual.parseDate(r,e,t)}xe.parseDate=DD;function Hy(r=!0){let e=mc(!1,r);return e.parsers.unshift(new cD.default),e.parsers.unshift(new dD.default),e.parsers.unshift(new TD.default),e.parsers.unshift(new Gy.default),e.parsers.unshift(new vD.default),e.parsers.unshift(new bD.default),e}xe.createCasualConfiguration=Hy;function mc(r=!0,e=!0){return oD.includeCommonConfiguration({parsers:[new fD.default(e),new pD.default,new mD.default,new Gy.default,new hD.default,new _D.default,new yD.default,new gD.default(r),new ED.default(r),new wD.default(r)],refiners:[new lD.default,new uD.default]},r)}xe.createConfiguration=mc});var Zy=p(Ni=>{"use strict";var MD=Ni&&Ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ni,"__esModule",{value:!0});var OD=MD(Z()),PD=R(),AD=1,Ky=2,kD=3,Vy=4,Xy=5,ND=6,yc=class extends PD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=OD.default(e.refDate),a=s;if(t[AD])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Ky]){let o=t[Ky],u=t[kD];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Vy]){let u=t[Vy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Xy]){let o=t[Xy];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[ND];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ni.default=yc});var wn=p(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.zhStringToYear=Xe.zhStringToNumber=Xe.WEEKDAY_OFFSET=Xe.NUMBER=void 0;Xe.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Xe.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function xD(r){let e=0;for(let t=0;t{"use strict";var CD=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0});var ID=CD(Z()),FD=R(),zr=wn(),gc=1,Qy=2,_c=3,Tc=class extends FD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zr.NUMBER).join("")+"]{4}|["+Object.keys(zr.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zr.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zr.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=ID.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Qy]);if(isNaN(s)&&(s=zr.zhStringToNumber(t[Qy])),i.start.assign("month",s),t[_c]){let a=parseInt(t[_c]);isNaN(a)&&(a=zr.zhStringToNumber(t[_c])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[gc]){let a=parseInt(t[gc]);isNaN(a)&&(a=zr.zhStringToYear(t[gc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};xi.default=Tc});var tg=p(Si=>{"use strict";var UD=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var qD=UD(Z()),WD=R(),eg=wn(),LD=new RegExp("(\\d+|["+Object.keys(eg.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),bc=1,YD=2,vc=class extends WD.AbstractParserWithWordBoundaryChecking{innerPattern(){return LD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[bc]);if(isNaN(i)&&(i=eg.zhStringToNumber(t[bc])),isNaN(i)){let u=t[bc];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=qD.default(e.refDate),o=t[YD][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Si.default=vc});var ng=p(Ci=>{"use strict";var $D=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0});var jD=$D(Z()),BD=R(),rg=wn(),GD=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(rg.WEEKDAY_OFFSET).join("|")+")"),Ec=class extends BD.AbstractParserWithWordBoundaryChecking{innerPattern(){return GD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=rg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=jD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var HD=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});var zD=HD(Z()),KD=R(),bt=wn(),VD=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),XD=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),la=1,ca=2,da=3,fa=4,pa=5,ha=6,Tt=7,Rn=8,ma=9,wc=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(){return VD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=zD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[Rn]){var d=parseInt(t[Rn]);if(isNaN(d)&&(d=bt.zhStringToNumber(t[Rn])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=bt.zhStringToNumber(t[ha])),t[Tt]?t[Tt]=="\u534A"?l=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?l=0:(l=parseInt(t[Tt]),isNaN(l)&&(l=bt.zhStringToNumber(t[Tt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[ca]){var h=t[ca],g=h[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],y=m[0];y=="\u4E0A"||y=="\u671D"||y=="\u65E9"||y=="\u51CC"?(c=0,u==12&&(u=0)):(y=="\u4E0B"||y=="\u664F"||y=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var P=t[pa],w=P[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=XD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let N=s.clone();if(i.end=e.createParsingComponents(),t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&N.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?N.add(-1,"day"):a=="\u524D"?N.add(-2,"day"):a=="\u5927\u524D"?N.add(-3,"day"):a=="\u5F8C"?N.add(2,"day"):a=="\u5927\u5F8C"&&N.add(3,"day"),i.end.assign("day",N.date()),i.end.assign("month",N.month()+1),i.end.assign("year",N.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?N.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?N.add(-1,"day"):o=="\u524D"?N.add(-2,"day"):o=="\u5927\u524D"?N.add(-3,"day"):o=="\u5F8C"?N.add(2,"day"):o=="\u5927\u5F8C"&&N.add(3,"day"),i.end.assign("day",N.date()),i.end.assign("month",N.month()+1),i.end.assign("year",N.year())}else i.end.imply("day",N.date()),i.end.imply("month",N.month()+1),i.end.imply("year",N.year());if(u=0,l=0,c=-1,t[Rn]){var d=parseInt(t[Rn]);if(isNaN(d)&&(d=bt.zhStringToNumber(t[Rn])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=bt.zhStringToNumber(t[ha])),t[Tt]?t[Tt]=="\u534A"?l=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?l=0:(l=parseInt(t[Tt]),isNaN(l)&&(l=bt.zhStringToNumber(t[Tt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ca]){var h=t[ca],g=h[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],y=m[0];y=="\u4E0A"||y=="\u671D"||y=="\u65E9"||y=="\u51CC"?(c=0,u==12&&(u=0)):(y=="\u4E0B"||y=="\u664F"||y=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var P=t[pa],w=P[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var ZD=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});var QD=ZD(Z()),JD=R(),sg=wn(),eM=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(sg.WEEKDAY_OFFSET).join("|")+")"),Rc=class extends JD.AbstractParserWithWordBoundaryChecking{innerPattern(){return eM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=sg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=QD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var tM=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var rM=tM(Gt()),Dc=class extends rM.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ui.default=Dc});var ug=p(qi=>{"use strict";var nM=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var iM=nM(tr()),Mc=class extends iM.default{patternBetween(){return/^\s*$/i}};qi.default=Mc});var lg=p(be=>{"use strict";var or=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.createConfiguration=be.createCasualConfiguration=be.parseDate=be.parse=be.strict=be.casual=be.hant=void 0;var Oc=At(),sM=or(Gs()),aM=rr(),oM=or(Zy()),uM=or(Jy()),lM=or(tg()),cM=or(ng()),dM=or(ig()),fM=or(ag()),pM=or(og()),hM=or(ug());be.hant=new Oc.Chrono(Pc());be.casual=new Oc.Chrono(Pc());be.strict=new Oc.Chrono(Ac());function mM(r,e,t){return be.casual.parse(r,e,t)}be.parse=mM;function yM(r,e,t){return be.casual.parseDate(r,e,t)}be.parseDate=yM;function Pc(){let r=Ac();return r.parsers.unshift(new oM.default),r}be.createCasualConfiguration=Pc;function Ac(){let r=aM.includeCommonConfiguration({parsers:[new uM.default,new cM.default,new fM.default,new dM.default,new lM.default],refiners:[new pM.default,new hM.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof sM.default)),r}be.createConfiguration=Ac});var pg=p(Wi=>{"use strict";var gM=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var _M=gM(Z()),TM=R(),bM=1,cg=2,vM=3,dg=4,fg=5,EM=6,kc=class extends TM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=_M.default(e.refDate),a=s;if(t[bM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[cg]){let o=t[cg],u=t[vM];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[dg]){let u=t[dg][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[fg]){let o=t[fg];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[EM];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Wi.default=kc});var Dn=p(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.zhStringToYear=Ze.zhStringToNumber=Ze.WEEKDAY_OFFSET=Ze.NUMBER=void 0;Ze.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Ze.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function wM(r){let e=0;for(let t=0;t{"use strict";var DM=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var MM=DM(Z()),OM=R(),Kr=Dn(),Nc=1,hg=2,xc=3,Sc=class extends OM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Kr.NUMBER).join("")+"]{4}|["+Object.keys(Kr.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Kr.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Kr.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=MM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[hg]);if(isNaN(s)&&(s=Kr.zhStringToNumber(t[hg])),i.start.assign("month",s),t[xc]){let a=parseInt(t[xc]);isNaN(a)&&(a=Kr.zhStringToNumber(t[xc])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Nc]){let a=parseInt(t[Nc]);isNaN(a)&&(a=Kr.zhStringToYear(t[Nc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Li.default=Sc});var gg=p(Yi=>{"use strict";var PM=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var AM=PM(Z()),kM=R(),yg=Dn(),NM=new RegExp("(\\d+|["+Object.keys(yg.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Cc=1,xM=2,Ic=class extends kM.AbstractParserWithWordBoundaryChecking{innerPattern(){return NM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Cc]);if(isNaN(i)&&(i=yg.zhStringToNumber(t[Cc])),isNaN(i)){let u=t[Cc];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=AM.default(e.refDate),o=t[xM][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Yi.default=Ic});var Tg=p($i=>{"use strict";var SM=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var CM=SM(Z()),IM=R(),_g=Dn(),FM=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(_g.WEEKDAY_OFFSET).join("|")+")"),Fc=class extends IM.AbstractParserWithWordBoundaryChecking{innerPattern(){return FM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=_g.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=CM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var UM=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var qM=UM(Z()),WM=R(),Et=Dn(),LM=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),YM=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ya=1,ga=2,_a=3,Ta=4,ba=5,va=6,vt=7,Mn=8,Ea=9,Uc=class extends WM.AbstractParserWithWordBoundaryChecking{innerPattern(){return LM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=qM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[Mn]){let c=parseInt(t[Mn]);if(isNaN(c)&&(c=Et.zhStringToNumber(t[Mn])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=Et.zhStringToNumber(t[va])),t[vt]?t[vt]=="\u534A"?o=30:t[vt]=="\u6B63"||t[vt]=="\u6574"?o=0:(o=parseInt(t[vt]),isNaN(o)&&(o=Et.zhStringToNumber(t[vt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=YM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Mn]){let c=parseInt(t[Mn]);if(isNaN(c)&&(c=Et.zhStringToNumber(t[Mn])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=Et.zhStringToNumber(t[va])),t[vt]?t[vt]=="\u534A"?o=30:t[vt]=="\u6B63"||t[vt]=="\u6574"?o=0:(o=parseInt(t[vt]),isNaN(o)&&(o=Et.zhStringToNumber(t[vt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var $M=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var jM=$M(Z()),BM=R(),vg=Dn(),GM=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(vg.WEEKDAY_OFFSET).join("|")+")"),qc=class extends BM.AbstractParserWithWordBoundaryChecking{innerPattern(){return GM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=vg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=jM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var HM=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var zM=HM(Gt()),Wc=class extends zM.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Gi.default=Wc});var Rg=p(Hi=>{"use strict";var KM=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var VM=KM(tr()),Lc=class extends VM.default{patternBetween(){return/^\s*$/i}};Hi.default=Lc});var Dg=p(ve=>{"use strict";var ur=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.createConfiguration=ve.createCasualConfiguration=ve.parseDate=ve.parse=ve.strict=ve.casual=ve.hans=void 0;var Yc=At(),XM=ur(Gs()),ZM=rr(),QM=ur(pg()),JM=ur(mg()),eO=ur(gg()),tO=ur(Tg()),rO=ur(bg()),nO=ur(Eg()),iO=ur(wg()),sO=ur(Rg());ve.hans=new Yc.Chrono($c());ve.casual=new Yc.Chrono($c());ve.strict=new Yc.Chrono(jc());function aO(r,e,t){return ve.casual.parse(r,e,t)}ve.parse=aO;function oO(r,e,t){return ve.casual.parseDate(r,e,t)}ve.parseDate=oO;function $c(){let r=jc();return r.parsers.unshift(new QM.default),r}ve.createCasualConfiguration=$c;function jc(){let r=ZM.includeCommonConfiguration({parsers:[new JM.default,new tO.default,new nO.default,new rO.default,new eO.default],refiners:[new iO.default,new sO.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof XM.default)),r}ve.createConfiguration=jc});var Og=p(ut=>{"use strict";var Mg=ut&&ut.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),uO=ut&&ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lO=ut&&ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Mg(e,r,t)},cO=ut&&ut.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Mg(e,r,t);return uO(e,r),e};Object.defineProperty(ut,"__esModule",{value:!0});ut.hans=void 0;lO(lg(),ut);ut.hans=cO(Dg())});var Qe=p(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.parseTimeUnits=U.TIME_UNITS_PATTERN=U.parseYear=U.YEAR_PATTERN=U.parseOrdinalNumberPattern=U.ORDINAL_NUMBER_PATTERN=U.parseNumberPattern=U.NUMBER_PATTERN=U.TIME_UNIT_DICTIONARY=U.ORDINAL_WORD_DICTIONARY=U.INTEGER_WORD_DICTIONARY=U.MONTH_DICTIONARY=U.FULL_MONTH_NAME_DICTIONARY=U.WEEKDAY_DICTIONARY=U.REGEX_PARTS=void 0;var wa=se(),dO=Ue();U.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};U.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};U.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};U.MONTH_DICTIONARY=Object.assign(Object.assign({},U.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});U.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};U.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};U.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};U.NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function Ag(r){let e=r.toLowerCase();return U.INTEGER_WORD_DICTIONARY[e]!==void 0?U.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}U.parseNumberPattern=Ag;U.ORDINAL_NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function fO(r){let e=r.toLowerCase();return U.ORDINAL_WORD_DICTIONARY[e]!==void 0?U.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}U.parseOrdinalNumberPattern=fO;var Bc="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";U.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Bc}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Bc}|[5-9][0-9]${Bc})`;function pO(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return dO.findMostLikelyADYear(e)}U.parseYear=pO;var kg=`(${U.NUMBER_PATTERN})\\s{0,3}(${wa.matchAnyPattern(U.TIME_UNIT_DICTIONARY)})`,Pg=new RegExp(kg,"i");U.TIME_UNITS_PATTERN=wa.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",kg);function hO(r){let e={},t=r,n=Pg.exec(t);for(;n;)mO(e,n),t=t.substring(n[0].length).trim(),n=Pg.exec(t);return e}U.parseTimeUnits=hO;function mO(r,e){let t=Ag(e[1]),n=U.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var xg=p(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var zi=Qe(),yO=fe(),gO=R(),Ng=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${zi.TIME_UNITS_PATTERN})${zi.REGEX_PARTS.rightBoundary}`,_O=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Ng}`,zi.REGEX_PARTS.flags),TO=new RegExp(Ng,"i"),Gc=class extends gO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return zi.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?TO:_O}innerExtract(e,t){let n=zi.parseTimeUnits(t[1]);return yO.ParsingComponents.createRelativeFromReference(e.reference,n)}};Hc.default=Gc});var Ug=p(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var bO=Ue(),Ki=Qe(),Fg=Qe(),Ra=Qe(),vO=se(),EO=R(),wO=new RegExp(`(?:\u0441)?\\s*(${Ra.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ra.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${vO.matchAnyPattern(Ki.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Fg.YEAR_PATTERN}(?![^\\s]\\d)))?${Ki.REGEX_PARTS.rightBoundary}`,Ki.REGEX_PARTS.flags),Sg=1,Cg=2,RO=3,Ig=4,zc=class extends EO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ki.REGEX_PARTS.leftBoundary}innerPattern(){return wO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ki.MONTH_DICTIONARY[t[RO].toLowerCase()],s=Ra.parseOrdinalNumberPattern(t[Sg]);if(s>31)return t.index=t.index+t[Sg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Ig]){let a=Fg.parseYear(t[Ig]);n.start.assign("year",a)}else{let a=bO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Cg]){let a=Ra.parseOrdinalNumberPattern(t[Cg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Kc.default=zc});var Lg=p(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Vi=Qe(),DO=Ue(),MO=se(),Wg=Qe(),OO=R(),PO=new RegExp(`((?:\u0432)\\s*)?(${MO.matchAnyPattern(Vi.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Wg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Vi.REGEX_PARTS.flags),AO=2,qg=3,Vc=class extends OO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vi.REGEX_PARTS.leftBoundary}innerPattern(){return PO}innerExtract(e,t){let n=t[AO].toLowerCase();if(t[0].length<=3&&!Vi.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Vi.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[qg]){let a=Wg.parseYear(t[qg]);i.start.assign("year",a)}else{let a=DO.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Xc.default=Vc});var $g=p(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var Da=Re(),kO=Yr(),Yg=Qe(),Zc=class extends kO.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Yg.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Yg.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Da.Meridiem.PM)):i<6&&n.assign("meridiem",Da.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Da.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Da.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qc.default=Zc});var jg=p(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var Ma=Qe(),NO=fe(),xO=R(),SO=gt(),CO=new RegExp(`(${Ma.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Ma.REGEX_PARTS.flags),Jc=class extends xO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ma.REGEX_PARTS.leftBoundary}innerPattern(){return CO}innerExtract(e,t){let n=Ma.parseTimeUnits(t[1]),i=SO.reverseTimeUnits(n);return NO.ParsingComponents.createRelativeFromReference(e.reference,i)}};ed.default=Jc});var Bg=p(Xi=>{"use strict";var IO=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var FO=IO(Gt()),td=class extends FO.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Xi.default=td});var Gg=p(Zi=>{"use strict";var UO=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var qO=UO(tr()),rd=class extends qO.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Zi.default=rd});var Hg=p(lr=>{"use strict";var WO=lr&&lr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),LO=lr&&lr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YO=lr&&lr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&WO(e,r,t);return LO(e,r),e};Object.defineProperty(lr,"__esModule",{value:!0});var $O=R(),Qi=YO(ir()),nd=Qe(),jO=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${nd.REGEX_PARTS.rightBoundary}`,nd.REGEX_PARTS.flags),id=class extends $O.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return nd.REGEX_PARTS.leftBoundary}innerPattern(e){return jO}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Qi.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Qi.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Qi.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Qi.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Qi.theDayBefore(e.reference,2)}return i}};lr.default=id});var zg=p(Ct=>{"use strict";var BO=Ct&&Ct.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),GO=Ct&&Ct.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),HO=Ct&&Ct.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&BO(e,r,t);return GO(e,r),e},zO=Ct&&Ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ct,"__esModule",{value:!0});var KO=R(),Vr=HO(ir()),VO=yt(),XO=zO(Z()),sd=Qe(),ZO=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${sd.REGEX_PARTS.rightBoundary}`,sd.REGEX_PARTS.flags),ad=class extends KO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return sd.REGEX_PARTS.leftBoundary}innerPattern(){return ZO}innerExtract(e,t){let n=XO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Vr.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Vr.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Vr.morning(e.reference);if(i.match(/в\s*полдень/))return Vr.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Vr.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Vr.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),VO.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Vr.midnight(e.reference):s}};Ct.default=ad});var Kg=p(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var Ji=Qe(),QO=se(),JO=R(),eP=jr(),tP=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${QO.matchAnyPattern(Ji.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Ji.REGEX_PARTS.rightBoundary}`,Ji.REGEX_PARTS.flags),rP=1,nP=2,iP=3,od=class extends JO.AbstractParserWithWordBoundaryChecking{innerPattern(){return tP}patternLeftBoundary(){return Ji.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[nP].toLowerCase(),i=Ji.WEEKDAY_DICTIONARY[n],s=t[rP],a=t[iP],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=eP.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};ud.default=od});var Xg=p(ts=>{"use strict";var sP=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var es=Qe(),Vg=fe(),aP=sP(Z()),oP=R(),uP=se(),lP=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${uP.matchAnyPattern(es.TIME_UNIT_DICTIONARY)})(?=\\s*)${es.REGEX_PARTS.rightBoundary}`,es.REGEX_PARTS.flags),cP=1,dP=2,ld=class extends oP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return es.REGEX_PARTS.leftBoundary}innerPattern(){return lP}innerExtract(e,t){let n=t[cP].toLowerCase(),i=t[dP].toLowerCase(),s=es.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,Vg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,Vg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=aP.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ts.default=ld});var Zg=p(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var rs=Qe(),fP=fe(),pP=R(),hP=gt(),mP=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${rs.TIME_UNITS_PATTERN})${rs.REGEX_PARTS.rightBoundary}`,rs.REGEX_PARTS.flags),cd=class extends pP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return rs.REGEX_PARTS.leftBoundary}innerPattern(){return mP}innerExtract(e,t){let n=t[1].toLowerCase(),i=rs.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=hP.reverseTimeUnits(i);break}return fP.ParsingComponents.createRelativeFromReference(e.reference,i)}};dd.default=cd});var e_=p(Se=>{"use strict";var lt=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});Se.createConfiguration=Se.createCasualConfiguration=Se.parseDate=Se.parse=Se.strict=Se.casual=void 0;var yP=lt(xg()),gP=lt(Ug()),_P=lt(Lg()),TP=lt($g()),bP=lt(jg()),vP=lt(Bg()),EP=lt(Gg()),wP=rr(),RP=lt(Hg()),DP=lt(zg()),MP=lt(Kg()),OP=lt(Xg()),Qg=At(),PP=lt(Br()),AP=lt(Zg());Se.casual=new Qg.Chrono(Jg());Se.strict=new Qg.Chrono(fd(!0));function kP(r,e,t){return Se.casual.parse(r,e,t)}Se.parse=kP;function NP(r,e,t){return Se.casual.parseDate(r,e,t)}Se.parseDate=NP;function Jg(){let r=fd(!1);return r.parsers.unshift(new RP.default),r.parsers.unshift(new DP.default),r.parsers.unshift(new _P.default),r.parsers.unshift(new OP.default),r.parsers.unshift(new AP.default),r}Se.createCasualConfiguration=Jg;function fd(r=!0){return wP.includeCommonConfiguration({parsers:[new PP.default(!0),new yP.default,new gP.default,new MP.default,new TP.default(r),new bP.default],refiners:[new EP.default,new vP.default]},r)}Se.createConfiguration=fd});var Re=p(L=>{"use strict";var xP=L&&L.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),SP=L&&L.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Or=L&&L.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xP(e,r,t);return SP(e,r),e};Object.defineProperty(L,"__esModule",{value:!0});L.parseDate=L.parse=L.casual=L.strict=L.ru=L.zh=L.nl=L.pt=L.ja=L.fr=L.de=L.Meridiem=L.Chrono=L.en=void 0;var pd=Or(ku());L.en=pd;var CP=At();Object.defineProperty(L,"Chrono",{enumerable:!0,get:function(){return CP.Chrono}});var IP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(IP=L.Meridiem||(L.Meridiem={}));var FP=Or(lm());L.de=FP;var UP=Or(qm());L.fr=UP;var qP=Or(zm());L.ja=qP;var WP=Or(ly());L.pt=WP;var LP=Or(zy());L.nl=LP;var YP=Or(Og());L.zh=YP;var $P=Or(e_());L.ru=$P;L.strict=pd.strict;L.casual=pd.casual;function jP(r,e,t){return L.casual.parse(r,e,t)}L.parse=jP;function BP(r,e,t){return L.casual.parseDate(r,e,t)}L.parseDate=BP});var Kt=p(kr=>{"use strict";kr.__esModule=!0;var JP;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(JP=kr.Operators||(kr.Operators={}));var eA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(eA=kr.StructuralCharacters||(kr.StructuralCharacters={}));var tA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(tA=kr.Tokens||(kr.Tokens={}))});var Dd=p(Wa=>{"use strict";Wa.__esModule=!0;var he=Kt();Wa.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Wa.VALID_TOKENS={identifierOnly:[{name:he.Tokens.IDENTIFIER},{name:he.Tokens.STRUCTURAL_CHARACTER,value:he.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:he.Tokens.IDENTIFIER},{name:he.Tokens.STRUCTURAL_CHARACTER,value:he.StructuralCharacters.OPEN_PARENTHESIS},{name:he.Tokens.OPERATOR,value:he.Operators.NOT}],binaryOperator:[{name:he.Tokens.OPERATOR,value:he.Operators.AND},{name:he.Tokens.OPERATOR,value:he.Operators.OR},{name:he.Tokens.OPERATOR,value:he.Operators.XOR}],binaryOperatorOrClose:[{name:he.Tokens.OPERATOR,value:he.Operators.AND},{name:he.Tokens.OPERATOR,value:he.Operators.OR},{name:he.Tokens.OPERATOR,value:he.Operators.XOR},{name:he.Tokens.STRUCTURAL_CHARACTER,value:he.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Md=p(fr=>{"use strict";fr.__esModule=!0;var xn=Kt();fr.STRUCTURAL_CHARACTERS={"(":xn.StructuralCharacters.OPEN_PARENTHESIS,")":xn.StructuralCharacters.CLOSE_PARENTHESIS};fr.OPERATORS={AND:xn.Operators.AND,OR:xn.Operators.OR,XOR:xn.Operators.XOR,NOT:xn.Operators.NOT};fr.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));fr.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);fr.COMMENT_DELIMITER=String.fromCodePoint(35);fr.EOL=String.fromCodePoint(10);fr.ESCAPE_CHARACTER=String.fromCodePoint(92)});var p_=p(pr=>{"use strict";var Od=pr&&pr.__assign||function(){return Od=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Pd.__esModule=!0;var Sn=Kt(),ct=Md(),Cn=p_();Pd.lex=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var rA=hr&&hr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var Fn=ls&&ls.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";mr.__esModule=!0;var __=Kt();mr.andUtil=function(r,e){return r&&e};mr.orUtil=function(r,e){return r||e};mr.xorUtil=function(r,e){return r!==e};mr.notUtil=function(r){return!r};mr.isIdentifier=function(r){var e=r.name,t=r.value;return e===__.Tokens.IDENTIFIER&&typeof t=="string"};mr.isOperator=function(r){var e=r.name,t=r.value;return e===__.Tokens.OPERATOR&&typeof t=="string"};mr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var T_=p(Cd=>{"use strict";var cs;Cd.__esModule=!0;var xd=Kt(),Sd=Nd();Cd.OPERATOR_MAP=(cs={},cs[xd.Operators.AND]=Sd.andUtil,cs[xd.Operators.OR]=Sd.orUtil,cs[xd.Operators.XOR]=Sd.xorUtil,cs)});var v_=p(Jr=>{"use strict";var Id=Jr&&Jr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";ds.__esModule=!0;var E_=v_();ds.getEvaluator=E_.getEvaluator;ds.evaluate=E_.evaluate;var aA=kd();ds.parse=aA.parse});var pA={};I_(pA,{default:()=>ro});module.exports=F_(pA);var O_=require("obsidian");var Ns=require("obsidian");var mA=new Error("timeout while waiting for mutex to become available"),yA=new Error("mutex already locked"),U_=new Error("request for lock canceled"),nf=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},oo=class{constructor(e,t=U_){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return nf(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return nf(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},q_=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Es=class{constructor(e){this._semaphore=new oo(1,e)}acquire(){return q_(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var fp=require("obsidian");var af=require("obsidian");var sf=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Ft=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return sf.forEach(t=>{e=[...e,new Ft(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Ft.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Ft.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var L_={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],features:Ft.settingsFlags},Gn=De({},L_),B=()=>{for(let r in Ft.settingsFlags)Gn.features[r]===void 0&&(Gn.features[r]=Ft.settingsFlags[r]);return De({},Gn)},pt=r=>(Gn=De(De({},Gn),r),B());var uo,lo,of=({metadataCache:r,vault:e})=>{uo=r,lo=e},ws=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(lo===void 0||uo===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),uf({originalTask:r,newTasks:e,vault:lo,metadataCache:uo,previousTries:0})}),uf=s=>J(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let y=Math.min(Math.pow(10,i),100);setTimeout(()=>{uf({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},y)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof af.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let d=(yield t.read(o)).split(` -`),{globalFilter:f}=B(),h,g=0;for(let y of l){if(y.position.start.liney.toFileLineString()),...d.slice(h.position.start.line+1)];yield t.modify(o,m.join(` -`))});var sn=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var Rs=["MO","TU","WE","TH","FR","SA","SU"],_e=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Rs.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Rs[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var ue=function(r){return r!=null},nt=function(r){return typeof r=="number"},co=function(r){return typeof r=="string"&&Rs.includes(r)},Fe=Array.isArray,ht=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=G(t,e/t.length)),t.slice(0,e)+String(n))}var cf=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},$e=function(r,e){var t=r%e;return t*e<0?t+e:t},Ds=function(r,e){return{div:Math.floor(r/e),mod:$e(r,e)}},it=function(r){return!ue(r)||r.length===0},me=function(r){return!it(r)},H=function(r,e){return me(r)&&r.indexOf(e)!==-1};var gr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Zt=Y_;var Sf=vs(xf(),1),{__extends:on,__assign:Ge,__rest:IA,__decorate:FA,__param:UA,__metadata:qA,__awaiter:WA,__generator:LA,__exportStar:YA,__createBinding:$A,__values:jA,__read:BA,__spread:GA,__spreadArrays:HA,__spreadArray:T,__await:zA,__asyncGenerator:KA,__asyncDelegator:VA,__asyncValues:XA,__makeTemplateObject:ZA,__importStar:QA,__importDefault:JA,__classPrivateFieldGet:ek,__classPrivateFieldSet:tk,__classPrivateFieldIn:rk}=Sf.default;var $_=function(r){on(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Zt),po=$_;var j_={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Cr=j_;var Cf=function(r,e){return r.indexOf(e)!==-1},B_=function(r){return r.toString()},G_=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},H_=function(){function r(e,t,n,i){if(t===void 0&&(t=B_),n===void 0&&(n=Cr),i===void 0&&(i=G_),this.text=[],this.language=n||Cr,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,d){return c-d}),a.sort(function(c,d){return d-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(ue(this.origOptions.byweekday)){var o=Fe(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(Cf(["dtstart","wkst","freq"],n))return!0;if(!Cf(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[M.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=nt(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),Fe(e)||(e=[e]);var a=function(u,l,c){for(var d="",f=0;fe[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Hn(r,e){e===void 0&&(e=Cr);var t={},n=new z_(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=M.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=M.WEEKLY,t.byweekday=[M.MO,M.TU,M.WE,M.TH,M.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=M.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=M.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=M.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=M.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=M.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=M.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[M[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var g=u();if(!g)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(M[g]),n.nextSymbol()}c(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=M.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=o();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(m),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var g=l(),m=u(),y=o();if(g)m?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(M[m].nth(g))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(g),n.accept("day(s)"));else if(m)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(M[m]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[M.MO,M.TU,M.WE,M.TH,M.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var P=n.acceptNumber();if(!P)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(P[0],10)];n.accept("comma");){if(P=n.acceptNumber(),!P)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(P[0],10))}}else if(y)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(y);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var Y;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(Y||(Y={}));function zn(r){return r12){var n=Math.floor(this.month/12),i=$e(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Ds(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),it(i)||H(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Ds(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(it(i)||H(i,this.hour))&&(it(s)||H(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Ds(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(it(i)||H(i,this.hour))&&(it(s)||H(s,this.minute))&&(it(a)||H(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=gr.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>gr.MAXYEAR))return;t=gr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case Y.YEARLY:return this.addYears(s);case Y.MONTHLY:return this.addMonths(s);case Y.WEEKLY:return this.addWeekly(s,a);case Y.DAILY:return this.addDaily(s);case Y.HOURLY:return this.addHours(s,n,o);case Y.MINUTELY:return this.addMinutes(s,n,o,u);case Y.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(ln);function ho(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||me(e.byweekno)||me(e.byyearday)||Boolean(e.bymonthday)||me(e.bymonthday)||ue(e.byweekday)||ue(e.byeaster)))switch(e.freq){case M.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case M.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case M.WEEKLY:e.byweekday=[C.getWeekday(e.dtstart)];break}if(ue(e.bymonth)&&!Fe(e.bymonth)&&(e.bymonth=[e.bymonth]),ue(e.byyearday)&&!Fe(e.byyearday)&&nt(e.byyearday)&&(e.byyearday=[e.byyearday]),!ue(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Fe(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(ue(e.byweekno)&&!Fe(e.byweekno)&&(e.byweekno=[e.byweekno]),!ue(e.byweekday))e.bynweekday=null;else if(nt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(co(e.byweekday))e.byweekday=[_e.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof _e)!e.byweekday.n||e.freq>M.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tM.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=me(a)?a:null,e.bynweekday=me(o)?o:null}return ue(e.byhour)?nt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+$e(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=$e(l,7),h=Math.floor(d+f/4),g=0;g0&&m<=h){var y=void 0;m>1?(y=c+(m-1)*7,c!==u&&(y-=7-u)):y=c;for(var P=0;P<7&&(o.wnomask[y]=1,y++,o.wdaymask[y]!==e.wkst);P++);}}if(H(e.byweekno,1)){var y=c+h*7;if(c!==u&&(y-=7-u),y=4?(V=0,ge=le+$e(N-e.wkst,7)):ge=n-c,w=Math.floor(52+$e(ge,7)/4)}if(H(e.byweekno,w))for(var y=0;ys)return Qt(r);if(w>=t){var N=ip(w,e);if(!r.accept(N)||o&&(--o,!o))return Qt(r)}}else for(var P=h;Ps)return Qt(r);if(w>=t){var N=ip(w,e);if(!r.accept(N)||o&&(--o,!o))return Qt(r)}}}if(e.interval===0||(u.add(e,m),u.year>C.MAXYEAR))return Qt(r);zn(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function sT(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return me(n)&&!H(n,r.mmask[e])||me(i)&&!r.wnomask[e]||me(s)&&!H(s,r.wdaymask[e])||me(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!H(r.eastermask,e)||(me(o)||me(u))&&!H(o,r.mdaymask[e])&&!H(u,r.nmdaymask[e])||me(l)&&(e=r.yearlen&&!H(l,e+1-r.yearlen)&&!H(l,-r.nextyearlen+e-r.yearlen))}function ip(r,e){return new Ir(r,e.tzid).rezonedDate()}function Qt(r){return r.getValue()}function aT(r,e,t,n,i){for(var s=!1,a=e;a=M.HOURLY&&me(i)&&!H(i,e.hour)||n>=M.MINUTELY&&me(s)&&!H(s,e.minute)||n>=M.SECONDLY&&me(a)&&!H(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var mt={MO:new _e(0),TU:new _e(1),WE:new _e(2),TH:new _e(3),FR:new _e(4),SA:new _e(5),SU:new _e(6)},Kn={freq:Y.YEARLY,dtstart:null,interval:1,wkst:mt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Yf=Object.keys(Kn),M=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Bf,this.origOptions=ho(e);var n=Wf(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Hn(e,t)},r.fromText=function(e,t){return If(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return As(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new po("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Zt("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!C.isValidDate(e)||!C.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new po("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Zt("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Zt("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Zt("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Zn(this.origOptions)},r.prototype.toText=function(e,t,n){return Ff(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Uf(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=Y.YEARLY,r.MONTHLY=Y.MONTHLY,r.WEEKLY=Y.WEEKLY,r.DAILY=Y.DAILY,r.HOURLY=Y.HOURLY,r.MINUTELY=Y.MINUTELY,r.SECONDLY=Y.SECONDLY,r.MO=mt.MO,r.TU=mt.TU,r.WE=mt.WE,r.TH=mt.TH,r.FR=mt.FR,r.SA=mt.SA,r.SU=mt.SU,r.parseString=Xn,r.optionsToString=Zn,r}();function sp(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(g){g.between(f,h,!0).forEach(function(m){a[Number(m)]=!0})})}i.forEach(function(f){var h=new Ir(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var c=new go(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new M(yo(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new M(yo(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new M(yo(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function ks(r,e){return e===void 0&&(e={}),lT(r,cT(e))}function yo(r,e,t){return Ge(Ge({},r),{dtstart:e,tzid:t})}function cT(r){var e=[],t=Object.keys(r),n=Object.keys(ap);if(t.forEach(function(i){H(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Ge(Ge({},ap),r)}function dT(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=cf(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function fT(r){var e=dT(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function pT(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function hT(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function op(r,e){return hT(e),r.split(",").map(function(t){return C.untilStringToDate(t)})}function up(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne in r?Bn(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,De=(r,e)=>{for(var t in e||(e={}))tf.call(e,t)&&ef(r,t,e[t]);if(Jd)for(var t of Jd(e))I_.call(e,t)&&ef(r,t,e[t]);return r},ft=(r,e)=>k_(r,x_(e));var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),F_=(r,e)=>{for(var t in e)Bn(r,t,{get:e[t],enumerable:!0})},rf=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of S_(e))!tf.call(r,i)&&i!==t&&Bn(r,i,{get:()=>e[i],enumerable:!(n=N_(e,i))||n.enumerable});return r};var vs=(r,e,t)=>(t=r!=null?A_(C_(r)):{},rf(e||!r||!r.__esModule?Bn(t,"default",{value:r,enumerable:!0}):t,r)),U_=r=>rf(Bn({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var xf=p((CA,Ps)=>{var df,ff,pf,hf,mf,yf,gf,_f,Tf,Ms,fo,bf,vf,Ef,an,wf,Rf,Df,Mf,Of,Pf,Af,kf,Nf,Os;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof Ps=="object"&&typeof Ps.exports=="object"?r(t(e,t(Ps.exports))):r(t(e));function t(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};df=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},ff=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;c--)(l=n[c])&&(u=(o<3?l(u):o>3?l(i,s,u):l(i,s))||u);return o>3&&u&&Object.defineProperty(i,s,u),u},mf=function(n,i){return function(s,a){i(s,a,n)}},yf=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},gf=function(n,i,s,a){function o(u){return u instanceof s?u:new s(function(l){l(u)})}return new(s||(s=Promise))(function(u,l){function c(h){try{f(a.next(h))}catch(g){l(g)}}function d(h){try{f(a.throw(h))}catch(g){l(g)}}function f(h){h.done?u(h.value):o(h.value).then(c,d)}f((a=a.apply(n,i||[])).next())})},_f=function(n,i){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,o,u,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(h){return d([f,h])}}function d(f){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,o&&(u=f[0]&2?o.return:f[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,f[1])).done)return u;switch(o=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return s.label++,{value:f[1],done:!1};case 5:s.label++,o=f[1],f=[0];continue;case 7:f=s.ops.pop(),s.trys.pop();continue;default:if(u=s.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){s=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},fo=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),o,u=[],l;try{for(;(i===void 0||i-- >0)&&!(o=a.next()).done;)u.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return u},bf=function(){for(var n=[],i=0;i1||c(m,_)})})}function c(m,_){try{d(a[m](_))}catch(R){g(u[0][3],R)}}function d(m){m.value instanceof an?Promise.resolve(m.value.v).then(f,h):g(u[0][2],m)}function f(m){c("next",m)}function h(m){c("throw",m)}function g(m,_){m(_),u.shift(),u.length&&c(u[0][0],u[0][1])}},Rf=function(n){var i,s;return i={},a("next"),a("throw",function(o){throw o}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(o,u){i[o]=n[o]?function(l){return(s=!s)?{value:an(n[o](l)),done:o==="return"}:u?u(l):l}:u}},Df=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof Ms=="function"?Ms(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(u){s[u]=n[u]&&function(l){return new Promise(function(c,d){l=n[u](l),o(c,d,l.done,l.value)})}}function o(u,l,c,d){Promise.resolve(d).then(function(f){u({value:f,done:c})},l)}},Mf=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var t=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};Of=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&Os(i,n,s);return t(i,n),i},Pf=function(n){return n&&n.__esModule?n:{default:n}},Af=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},kf=function(n,i,s,a,o){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?o.call(n,s):o?o.value=s:i.set(n,s),s},Nf=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},r("__extends",df),r("__assign",ff),r("__rest",pf),r("__decorate",hf),r("__param",mf),r("__metadata",yf),r("__awaiter",gf),r("__generator",_f),r("__exportStar",Tf),r("__createBinding",Os),r("__values",Ms),r("__read",fo),r("__spread",bf),r("__spreadArrays",vf),r("__spreadArray",Ef),r("__await",an),r("__asyncGenerator",wf),r("__asyncDelegator",Rf),r("__asyncValues",Df),r("__makeTemplateObject",Mf),r("__importStar",Of),r("__importDefault",Pf),r("__classPrivateFieldGet",Af),r("__classPrivateFieldSet",kf),r("__classPrivateFieldIn",Nf)})});var ie=p(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.matchAnyPattern=vr.extractTerms=vr.repeatedTimeunitPattern=void 0;function AT(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}vr.repeatedTimeunitPattern=AT;function Mp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}vr.extractTerms=Mp;function kT(r){return`(?:${Mp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}vr.matchAnyPattern=kT});var Z=p((Do,Mo)=>{(function(r,e){typeof Do=="object"&&typeof Mo!="undefined"?Mo.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Do,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},R=function(k,E,b){var x=String(k);return!x||x.length>=E?k:""+Array(E+1-x.length).join(b)+k},w={s:R,z:function(k){var E=-k.utcOffset(),b=Math.abs(E),x=Math.floor(b/60),y=b%60;return(E<=0?"+":"-")+R(x,2,"0")+":"+R(y,2,"0")},m:function k(E,b){if(E.date(){"use strict";var NT=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});Er.findYearClosestToRef=Er.findMostLikelyADYear=void 0;var xT=NT(Z());function ST(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Er.findMostLikelyADYear=ST;function CT(r,e,t){let n=xT.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.parseTimeUnits=W.TIME_UNITS_PATTERN=W.parseYear=W.YEAR_PATTERN=W.parseOrdinalNumberPattern=W.ORDINAL_NUMBER_PATTERN=W.parseNumberPattern=W.NUMBER_PATTERN=W.TIME_UNIT_DICTIONARY=W.ORDINAL_WORD_DICTIONARY=W.INTEGER_WORD_DICTIONARY=W.MONTH_DICTIONARY=W.FULL_MONTH_NAME_DICTIONARY=W.WEEKDAY_DICTIONARY=void 0;var Fs=ie(),IT=Ue();W.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};W.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};W.MONTH_DICTIONARY=Object.assign(Object.assign({},W.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});W.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};W.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};W.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};W.NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(W.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Pp(r){let e=r.toLowerCase();return W.INTEGER_WORD_DICTIONARY[e]!==void 0?W.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}W.parseNumberPattern=Pp;W.ORDINAL_NUMBER_PATTERN=`(?:${Fs.matchAnyPattern(W.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function FT(r){let e=r.toLowerCase();return W.ORDINAL_WORD_DICTIONARY[e]!==void 0?W.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}W.parseOrdinalNumberPattern=FT;W.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function UT(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return IT.findMostLikelyADYear(e)}W.parseYear=UT;var Ap=`(${W.NUMBER_PATTERN})\\s{0,3}(${Fs.matchAnyPattern(W.TIME_UNIT_DICTIONARY)})`,Op=new RegExp(Ap,"i");W.TIME_UNITS_PATTERN=Fs.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Ap);function qT(r){let e={},t=r,n=Op.exec(t);for(;n;)WT(e,n),t=t.substring(n[0].length).trim(),n=Op.exec(t);return e}W.parseTimeUnits=qT;function WT(r,e){let t=Pp(e[1]),n=W.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var kp=p((Oo,Po)=>{(function(r,e){typeof Oo=="object"&&typeof Po!="undefined"?Po.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Oo,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var yt=p(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.implySimilarTime=jt.assignSimilarTime=jt.assignSimilarDate=jt.assignTheNextDay=void 0;var Np=Re();function LT(r,e){e=e.add(1,"day"),xp(r,e),Sp(r,e)}jt.assignTheNextDay=LT;function xp(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}jt.assignSimilarDate=xp;function YT(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",Np.Meridiem.AM):r.assign("meridiem",Np.Meridiem.PM)}jt.assignSimilarTime=YT;function Sp(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}jt.implySimilarTime=Sp});var Cp=p(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.toTimezoneOffset=Wr.TIMEZONE_ABBR_MAP=void 0;Wr.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function $T(r){var e;return r==null?null:typeof r=="number"?r:(e=Wr.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}Wr.toTimezoneOffset=$T});var pe=p(Bt=>{"use strict";var Ip=Bt&&Bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.ParsingResult=Bt.ParsingComponents=Bt.ReferenceWithTimezone=void 0;var jT=Ip(kp()),Us=Ip(Z()),Ao=yt(),BT=Cp();Us.default.extend(jT.default);var ko=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=BT.toTimezoneOffset(e.timezone))}};Bt.ReferenceWithTimezone=ko;var Lr=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Us.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new Lr(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Us.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Us.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new Lr(e);return t.hour||t.minute||t.second?(Ao.assignSimilarTime(i,n),Ao.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Ao.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};Bt.ParsingComponents=Lr;var ni=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new Lr(e),this.end=s}clone(){let e=new ni(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Bt.ParsingResult=ni});var D=p(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.AbstractParserWithWordBoundaryChecking=void 0;var No=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var So=qe(),GT=pe(),HT=D(),zT=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${So.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),KT=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${So.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),xo=class extends HT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?KT:zT}innerExtract(e,t){let n=So.parseTimeUnits(t[1]);return GT.ParsingComponents.createRelativeFromReference(e.reference,n)}};Co.default=xo});var $p=p(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var VT=Ue(),Lp=qe(),Yp=qe(),Ws=qe(),XT=ie(),ZT=D(),QT=new RegExp(`(?:on\\s{0,3})?(${Ws.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ws.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${XT.matchAnyPattern(Lp.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${Yp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Up=1,qp=2,JT=3,Wp=4,Io=class extends ZT.AbstractParserWithWordBoundaryChecking{innerPattern(){return QT}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Lp.MONTH_DICTIONARY[t[JT].toLowerCase()],s=Ws.parseOrdinalNumberPattern(t[Up]);if(s>31)return t.index=t.index+t[Up].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Wp]){let a=Yp.parseYear(t[Wp]);n.start.assign("year",a)}else{let a=VT.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[qp]){let a=Ws.parseOrdinalNumberPattern(t[qp]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Fo.default=Io});var zp=p(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var eb=Ue(),Gp=qe(),Ls=qe(),Hp=qe(),tb=ie(),rb=D(),nb=new RegExp(`(${tb.matchAnyPattern(Gp.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ls.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ls.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Hp.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),ib=1,sb=2,jp=3,Bp=4,Uo=class extends rb.AbstractParserWithWordBoundaryChecking{innerPattern(){return nb}innerExtract(e,t){let n=Gp.MONTH_DICTIONARY[t[ib].toLowerCase()],i=Ls.parseOrdinalNumberPattern(t[sb]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Bp]){let u=Hp.parseYear(t[Bp]);s.assign("year",u)}else{let u=eb.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[jp])return s;let a=Ls.parseOrdinalNumberPattern(t[jp]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};qo.default=Uo});var Xp=p(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Wo=qe(),ab=Ue(),ob=ie(),Vp=qe(),ub=D(),lb=new RegExp(`((?:in)\\s*)?(${ob.matchAnyPattern(Wo.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Vp.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),cb=1,db=2,Kp=3,Lo=class extends ub.AbstractParserWithWordBoundaryChecking{innerPattern(){return lb}innerExtract(e,t){let n=t[db].toLowerCase();if(t[0].length<=3&&!Wo.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[cb]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Wo.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[Kp]){let a=Vp.parseYear(t[Kp]);i.start.assign("year",a)}else{let a=ab.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Yo.default=Lo});var Jp=p(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var Qp=qe(),fb=ie(),pb=D(),hb=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${fb.matchAnyPattern(Qp.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),mb=1,yb=2,Zp=3,gb=4,$o=class extends pb.AbstractParserWithWordBoundaryChecking{innerPattern(){return hb}innerExtract(e,t){let n=t[Zp]?parseInt(t[Zp]):Qp.MONTH_DICTIONARY[t[yb].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[mb]);return{day:parseInt(t[gb]),month:n,year:i}}};jo.default=$o});var eh=p(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var _b=D(),Tb=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),bb=1,vb=2,Bo=class extends _b.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tb}innerExtract(e,t){let n=parseInt(t[vb]),i=parseInt(t[bb]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Go.default=Bo});var Yr=p(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.AbstractTimeExpressionParser=void 0;var Ge=Re();function Eb(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function wb(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var th=2,dn=3,Ys=4,$s=5,ii=6,Ho=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[th]);if(o>100){if(this.strictMode||t[dn]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[dn]!=null){if(t[dn].length==1&&!t[ii])return null;s=parseInt(t[dn])}if(s>=60)return null;if(o>12&&(a=Ge.Meridiem.PM),t[ii]!=null){if(o>12)return null;let u=t[ii][0].toLowerCase();u=="a"&&(a=Ge.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=Ge.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",Ge.Meridiem.AM):i.imply("meridiem",Ge.Meridiem.PM),t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[$s]!=null){let u=parseInt(t[$s].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Ys]!=null){let u=parseInt(t[Ys]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[th]),a=0,o=-1;if(t[dn]!=null?a=parseInt(t[dn]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=Ge.Meridiem.PM),t[ii]!=null){if(s>12)return null;let u=t[ii][0].toLowerCase();u=="a"&&(o=Ge.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=Ge.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==Ge.Meridiem.AM?(n.start.imply("meridiem",Ge.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Ge.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",Ge.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",Ge.Meridiem.PM)):s>12?i.imply("meridiem",Ge.Meridiem.PM):s<=12&&i.imply("meridiem",Ge.Meridiem.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Eb(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=wb(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};js.AbstractTimeExpressionParser=Ho});var rh=p(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Bs=Re(),Rb=Yr(),zo=class extends Rb.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Bs.Meridiem.PM)):i<6&&n.assign("meridiem",Bs.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Bs.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Bs.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Ko.default=zo});var gt=p(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.addImpliedTimeUnits=fn.reverseTimeUnits=void 0;function Db(r){let e={};for(let t in r)e[t]=-r[t];return e}fn.reverseTimeUnits=Db;function Mb(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}fn.addImpliedTimeUnits=Mb});var nh=p(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var Xo=qe(),Ob=pe(),Pb=D(),Ab=gt(),kb=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Nb=new RegExp(`(${Xo.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Vo=class extends Pb.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Nb:kb}innerExtract(e,t){let n=Xo.parseTimeUnits(t[1]),i=Ab.reverseTimeUnits(n);return Ob.ParsingComponents.createRelativeFromReference(e.reference,i)}};Zo.default=Vo});var ih=p(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var Jo=qe(),xb=pe(),Sb=D(),Cb=new RegExp(`(${Jo.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Ib=new RegExp("("+Jo.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Fb=1,Qo=class extends Sb.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ib:Cb}innerExtract(e,t){let n=Jo.parseTimeUnits(t[Fb]);return xb.ParsingComponents.createRelativeFromReference(e.reference,n)}};eu.default=Qo});var hn=p(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.MergingRefiner=pn.Filter=void 0;var tu=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};pn.Filter=tu;var ru=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};pn.MergingRefiner=ru});var Gt=p(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var Ub=hn(),nu=class extends Ub.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var qb=si&&si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(si,"__esModule",{value:!0});var Wb=qb(Gt()),su=class extends Wb.default{patternBetween(){return/^\s*(to|-)\s*$/i}};si.default=su});var ah=p(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.mergeDateTimeComponent=mn.mergeDateTimeResult=void 0;var Lb=Re();function Yb(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=au(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=au(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var $b=hn(),oh=ah(),ou=class extends $b.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?oh.mergeDateTimeResult(t,n):oh.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};uu.default=ou});var uh=p(ai=>{"use strict";var jb=ai&&ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ai,"__esModule",{value:!0});var Bb=jb(tr()),lu=class extends Bb.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};ai.default=lu});var lh=p(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var Gb=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Hb={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},cu=class{constructor(e){this.timezone=Object.assign(Object.assign({},Hb),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=Gb.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};du.default=cu});var Gs=p(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var zb=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Kb=1,Vb=2,Xb=3,fu=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=zb.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Vb]),o=parseInt(s[Xb]||"0"),u=a*60+o;u>14*60||(s[Kb]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};pu.default=fu});var ch=p(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var hu=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};mu.default=hu});var dh=p(oi=>{"use strict";var Zb=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0});var Qb=Zb(Z()),yu=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Qb.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};oi.default=yu});var fh=p(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var Jb=hn(),gu=class extends Jb.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};_u.default=gu});var vu=p(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var ev=D(),tv=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),rv=1,nv=2,iv=3,ph=4,sv=5,hh=6,mh=7,yh=8,gh=9,Tu=class extends ev.AbstractParserWithWordBoundaryChecking{innerPattern(){return tv}innerExtract(e,t){let n={};if(n.year=parseInt(t[rv]),n.month=parseInt(t[nv]),n.day=parseInt(t[iv]),t[ph]!=null)if(n.hour=parseInt(t[ph]),n.minute=parseInt(t[sv]),t[hh]!=null&&(n.second=parseInt(t[hh])),t[mh]!=null&&(n.millisecond=parseInt(t[mh])),t[yh]==null)n.timezoneOffset=0;else{let i=parseInt(t[yh]),s=0;t[gh]!=null&&(s=parseInt(t[gh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};bu.default=Tu});var _h=p(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var av=hn(),Eu=class extends av.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};wu.default=Eu});var rr=p(yn=>{"use strict";var $r=yn&&yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yn,"__esModule",{value:!0});yn.includeCommonConfiguration=void 0;var ov=$r(lh()),uv=$r(Gs()),Th=$r(ch()),lv=$r(dh()),cv=$r(fh()),dv=$r(vu()),fv=$r(_h());function pv(r,e=!1){return r.parsers.unshift(new dv.default),r.refiners.unshift(new fv.default),r.refiners.unshift(new ov.default),r.refiners.unshift(new uv.default),r.refiners.unshift(new Th.default),r.refiners.push(new Th.default),r.refiners.push(new lv.default),r.refiners.push(new cv.default(e)),r}yn.includeCommonConfiguration=pv});var ir=p(re=>{"use strict";var hv=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(re,"__esModule",{value:!0});re.noon=re.morning=re.midnight=re.yesterdayEvening=re.evening=re.lastNight=re.tonight=re.theDayAfter=re.tomorrow=re.theDayBefore=re.yesterday=re.today=re.now=void 0;var Ht=pe(),gn=hv(Z()),nr=yt(),ui=Re();function mv(r){let e=gn.default(r.instant),t=new Ht.ParsingComponents(r,{});return nr.assignSimilarDate(t,e),nr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}re.now=mv;function yv(r){let e=gn.default(r.instant),t=new Ht.ParsingComponents(r,{});return nr.assignSimilarDate(t,e),nr.implySimilarTime(t,e),t}re.today=yv;function gv(r){return bh(r,1)}re.yesterday=gv;function bh(r,e){return Ru(r,-e)}re.theDayBefore=bh;function _v(r){return Ru(r,1)}re.tomorrow=_v;function Ru(r,e){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t=t.add(e,"day"),nr.assignSimilarDate(n,t),nr.implySimilarTime(n,t),n}re.theDayAfter=Ru;function Tv(r,e=22){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",ui.Meridiem.PM),nr.assignSimilarDate(n,t),n}re.tonight=Tv;function bv(r,e=0){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),nr.assignSimilarDate(n,t),n.imply("hour",e),n}re.lastNight=bv;function vv(r,e=20){let t=new Ht.ParsingComponents(r,{});return t.imply("meridiem",ui.Meridiem.PM),t.imply("hour",e),t}re.evening=vv;function Ev(r,e=20){let t=gn.default(r.instant),n=new Ht.ParsingComponents(r,{});return t=t.add(-1,"day"),nr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",ui.Meridiem.PM),n}re.yesterdayEvening=Ev;function wv(r){let e=new Ht.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}re.midnight=wv;function Rv(r,e=6){let t=new Ht.ParsingComponents(r,{});return t.imply("meridiem",ui.Meridiem.AM),t.imply("hour",e),t}re.morning=Rv;function Dv(r){let e=new Ht.ParsingComponents(r,{});return e.imply("meridiem",ui.Meridiem.AM),e.imply("hour",12),e}re.noon=Dv});var vh=p(Pt=>{"use strict";var Mv=Pt&&Pt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ov=Pt&&Pt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Pv=Pt&&Pt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Mv(e,r,t);return Ov(e,r),e},Av=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0});var kv=Av(Z()),Nv=D(),xv=yt(),li=Pv(ir()),Sv=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Du=class extends Nv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Sv}innerExtract(e,t){let n=kv.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return li.now(e.reference);case"today":return li.today(e.reference);case"yesterday":return li.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return li.tomorrow(e.reference);case"tonight":return li.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),xv.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Pt.default=Du});var Eh=p(ci=>{"use strict";var Cv=ci&&ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ci,"__esModule",{value:!0});var Hs=Re(),Iv=D(),Fv=Cv(Z()),Uv=yt(),qv=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Mu=class extends Iv.AbstractParserWithWordBoundaryChecking{innerPattern(){return qv}innerExtract(e,t){let n=Fv.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Hs.Meridiem.PM),i.imply("hour",20);break;case"midnight":Uv.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Hs.Meridiem.AM),i.imply("hour",12);break}return i}};ci.default=Mu});var jr=p(wr=>{"use strict";var Wv=wr&&wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wr,"__esModule",{value:!0});wr.toDayJSClosestWeekday=wr.toDayJSWeekday=void 0;var wh=Wv(Z());function Lv(r,e,t){if(!t)return Rh(r,e);let n=wh.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}wr.toDayJSWeekday=Lv;function Rh(r,e){let t=wh.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var Dh=qe(),Yv=ie(),$v=D(),jv=jr(),Bv=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${Yv.matchAnyPattern(Dh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Gv=1,Hv=2,zv=3,Ou=class extends $v.AbstractParserWithWordBoundaryChecking{innerPattern(){return Bv}innerExtract(e,t){let n=t[Hv].toLowerCase(),i=Dh.WEEKDAY_DICTIONARY[n],s=t[Gv],a=t[zv],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=jv.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Pu.default=Ou});var Ah=p(di=>{"use strict";var Kv=di&&di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(di,"__esModule",{value:!0});var Ph=qe(),Oh=pe(),Vv=Kv(Z()),Xv=D(),Zv=ie(),Qv=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${Zv.matchAnyPattern(Ph.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Jv=1,e1=2,Au=class extends Xv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Qv}innerExtract(e,t){let n=t[Jv].toLowerCase(),i=t[e1].toLowerCase(),s=Ph.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Oh.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Oh.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=Vv.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};di.default=Au});var At=p(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ParsingContext=bn.Chrono=void 0;var _n=pe(),t1=ku(),Tn=class{constructor(e){e=e||t1.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Tn({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new zs(e,t,n),s=[];return this.parsers.forEach(a=>{let o=Tn.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof _n.ParsingResult?c=l:l instanceof _n.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};bn.Chrono=Tn;var zs=class{constructor(e,t,n){this.text=e,this.reference=new _n.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof _n.ParsingComponents?e:new _n.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new _n.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};bn.ParsingContext=zs});var Br=p(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var kh=Ue(),r1=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Ks=1,Nh=5,xh=2,Sh=3,Nu=4,xu=class{constructor(e){this.groupNumberMonth=e?Sh:xh,this.groupNumberDay=e?xh:Sh}pattern(){return r1}extract(e,t){if(t[Ks]=="/"||t[Nh]=="/"){t.index+=t[0].length;return}let n=t.index+t[Ks].length,i=t[0].substr(t[Ks].length,t[0].length-t[Ks].length-t[Nh].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Nu]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Nu]){let u=parseInt(t[Nu]),l=kh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=kh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Su.default=xu});var Ih=p(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var Ch=qe(),n1=pe(),i1=D(),s1=gt(),a1=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Ch.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Cu=class extends i1.AbstractParserWithWordBoundaryChecking{innerPattern(){return a1}innerExtract(e,t){let n=t[1].toLowerCase(),i=Ch.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=s1.reverseTimeUnits(i);break}return n1.ParsingComponents.createRelativeFromReference(e.reference,i)}};Iu.default=Cu});var Uh=p(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var o1=hn(),Fu=pe(),u1=qe(),l1=gt();function Fh(r){return r.text.match(/\s+(before|from)$/i)!=null}function c1(r){return r.text.match(/\s+(after|since)$/i)!=null}var Uu=class extends o1.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!Fh(t)&&!c1(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=u1.parseTimeUnits(t.text);Fh(t)&&(i=l1.reverseTimeUnits(i));let s=Fu.ParsingComponents.createRelativeFromReference(new Fu.ReferenceWithTimezone(n.start.date()),i);return new Fu.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};qu.default=Uu});var ku=p(Te=>{"use strict";var Oe=Te&&Te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Te,"__esModule",{value:!0});Te.createConfiguration=Te.createCasualConfiguration=Te.parseDate=Te.parse=Te.GB=Te.strict=Te.casual=void 0;var d1=Oe(Fp()),f1=Oe($p()),p1=Oe(zp()),h1=Oe(Xp()),m1=Oe(Jp()),y1=Oe(eh()),g1=Oe(rh()),_1=Oe(nh()),T1=Oe(ih()),b1=Oe(sh()),v1=Oe(uh()),E1=rr(),w1=Oe(vh()),R1=Oe(Eh()),D1=Oe(Mh()),M1=Oe(Ah()),Wu=At(),O1=Oe(Br()),P1=Oe(Ih()),A1=Oe(Uh());Te.casual=new Wu.Chrono(qh(!1));Te.strict=new Wu.Chrono(Vs(!0,!1));Te.GB=new Wu.Chrono(Vs(!1,!0));function k1(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=k1;function N1(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=N1;function qh(r=!1){let e=Vs(!1,r);return e.parsers.unshift(new w1.default),e.parsers.unshift(new R1.default),e.parsers.unshift(new h1.default),e.parsers.unshift(new M1.default),e.parsers.unshift(new P1.default),e}Te.createCasualConfiguration=qh;function Vs(r=!0,e=!1){return E1.includeCommonConfiguration({parsers:[new O1.default(e),new d1.default,new f1.default,new p1.default,new D1.default,new m1.default,new y1.default,new g1.default(r),new _1.default(r),new T1.default(r)],refiners:[new A1.default,new v1.default,new b1.default]},r)}Te.createConfiguration=Vs});var Wh=p(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var x1=Yr(),Lu=class extends x1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Yu.default=Lu});var fi=p(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.parseTimeUnits=ae.TIME_UNITS_PATTERN=ae.parseYear=ae.YEAR_PATTERN=ae.parseNumberPattern=ae.NUMBER_PATTERN=ae.TIME_UNIT_DICTIONARY=ae.INTEGER_WORD_DICTIONARY=ae.MONTH_DICTIONARY=ae.WEEKDAY_DICTIONARY=void 0;var $u=ie(),S1=Ue();ae.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};ae.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};ae.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};ae.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};ae.NUMBER_PATTERN=`(?:${$u.matchAnyPattern(ae.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Yh(r){let e=r.toLowerCase();return ae.INTEGER_WORD_DICTIONARY[e]!==void 0?ae.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}ae.parseNumberPattern=Yh;ae.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function C1(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return S1.findMostLikelyADYear(e)}ae.parseYear=C1;var $h=`(${ae.NUMBER_PATTERN})\\s{0,5}(${$u.matchAnyPattern(ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Lh=new RegExp($h,"i");ae.TIME_UNITS_PATTERN=$u.repeatedTimeunitPattern("",$h);function I1(r){let e={},t=r,n=Lh.exec(t);for(;n;)F1(e,n),t=t.substring(n[0].length),n=Lh.exec(t);return e}ae.parseTimeUnits=I1;function F1(r,e){let t=Yh(e[1]),n=ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Bh=p(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var jh=fi(),U1=ie(),q1=D(),W1=jr(),L1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${U1.matchAnyPattern(jh.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Y1=1,$1=3,j1=2,ju=class extends q1.AbstractParserWithWordBoundaryChecking{innerPattern(){return L1}innerExtract(e,t){let n=t[j1].toLowerCase(),i=jh.WEEKDAY_DICTIONARY[n],s=t[Y1],a=t[$1],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=W1.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Bu.default=ju});var Kh=p(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var Rr=Re(),B1=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),G1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),H1=2,Gh=3,Hh=4,zh=5,vn=class{pattern(e){return B1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=vn.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=G1.exec(i);return s&&(n.end=vn.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[H1]),t[Gh]!=null&&(i=parseInt(t[Gh])),i>=60||n>24)return null;if(n>=12&&(s=Rr.Meridiem.PM),t[zh]!=null){if(n>12)return null;let a=t[zh].toLowerCase();a.match(/morgen|vormittag/)&&(s=Rr.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=Rr.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=Rr.Meridiem.AM,n=0):n<6?s=Rr.Meridiem.AM:(s=Rr.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Rr.Meridiem.AM):e.imply("meridiem",Rr.Meridiem.PM),t[Hh]!=null){let a=parseInt(t[Hh]);if(a>=60)return null;e.assign("second",a)}return e}};Gu.default=vn});var Vh=p(pi=>{"use strict";var z1=pi&&pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pi,"__esModule",{value:!0});var K1=z1(Gt()),Hu=class extends K1.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};pi.default=Hu});var Xh=p(hi=>{"use strict";var V1=hi&&hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hi,"__esModule",{value:!0});var X1=V1(tr()),zu=class extends X1.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};hi.default=zu});var Ku=p(yi=>{"use strict";var Z1=yi&&yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yi,"__esModule",{value:!0});var Q1=Z1(Z()),Gr=Re(),J1=D(),eE=yt(),tE=gt(),mi=class extends J1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=Q1.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return eE.implySimilarTime(s,n),mi.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=tE.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gr.Meridiem.AM);break}return e}};yi.default=mi});var Jh=p(kt=>{"use strict";var rE=kt&&kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),nE=kt&&kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),iE=kt&&kt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&rE(e,r,t);return nE(e,r),e},Qh=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});var sE=Qh(Z()),aE=D(),Hr=yt(),oE=Qh(Ku()),Zh=iE(ir()),uE=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),lE=1,cE=2,Vu=class extends aE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return uE}innerExtract(e,t){let n=sE.default(e.refDate),i=(t[lE]||"").toLowerCase(),s=(t[cE]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Zh.now(e.reference);break;case"heute":a=Zh.today(e.reference);break;case"morgen":Hr.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Hr.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Hr.assignSimilarDate(a,n),Hr.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Hr.assignSimilarDate(a,n),Hr.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Hr.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=oE.default.extractTimeComponents(a,s)),a}};kt.default=Vu});var sm=p(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var dE=Ue(),nm=fi(),im=fi(),fE=ie(),pE=D(),hE=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${fE.matchAnyPattern(nm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${im.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),em=1,tm=2,mE=3,rm=4,Xu=class extends pE.AbstractParserWithWordBoundaryChecking{innerPattern(){return hE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=nm.MONTH_DICTIONARY[t[mE].toLowerCase()],s=parseInt(t[em]);if(s>31)return t.index=t.index+t[em].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[rm]){let a=im.parseYear(t[rm]);n.start.assign("year",a)}else{let a=dE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[tm]){let a=parseInt(t[tm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Zu.default=Xu});var am=p(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var Xs=fi(),yE=pe(),gE=D(),_E=gt(),TE=ie(),Qu=class extends gE.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Xs.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${TE.matchAnyPattern(Xs.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Xs.parseNumberPattern(t[2]):1,i=Xs.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=_E.reverseTimeUnits(s)),yE.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ju.default=Qu});var lm=p(Pe=>{"use strict";var Nt=Pe&&Pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createConfiguration=Pe.createCasualConfiguration=Pe.parseDate=Pe.parse=Pe.strict=Pe.casual=void 0;var bE=rr(),om=At(),vE=Nt(Br()),EE=Nt(vu()),wE=Nt(Wh()),RE=Nt(Bh()),DE=Nt(Kh()),ME=Nt(Vh()),OE=Nt(Xh()),PE=Nt(Jh()),AE=Nt(Ku()),kE=Nt(sm()),NE=Nt(am());Pe.casual=new om.Chrono(um());Pe.strict=new om.Chrono(el(!0));function xE(r,e,t){return Pe.casual.parse(r,e,t)}Pe.parse=xE;function SE(r,e,t){return Pe.casual.parseDate(r,e,t)}Pe.parseDate=SE;function um(r=!0){let e=el(!1,r);return e.parsers.unshift(new AE.default),e.parsers.unshift(new PE.default),e.parsers.unshift(new NE.default),e}Pe.createCasualConfiguration=um;function el(r=!0,e=!0){return bE.includeCommonConfiguration({parsers:[new EE.default,new vE.default(e),new wE.default,new DE.default,new kE.default,new RE.default],refiners:[new ME.default,new OE.default]},r)}Pe.createConfiguration=el});var dm=p(xt=>{"use strict";var CE=xt&&xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),IE=xt&&xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FE=xt&&xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&CE(e,r,t);return IE(e,r),e},UE=xt&&xt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xt,"__esModule",{value:!0});var qE=UE(Z()),WE=Re(),LE=D(),cm=yt(),Zs=FE(ir()),tl=class extends LE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=qE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Zs.now(e.reference);case"aujourd'hui":return Zs.today(e.reference);case"hier":return Zs.yesterday(e.reference);case"demain":return Zs.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(cm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",WE.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),cm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};xt.default=tl});var fm=p(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var gi=Re(),YE=D(),rl=class extends YE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",gi.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",gi.Meridiem.AM);break}return i}};nl.default=rl});var pm=p(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var $E=Yr(),il=class extends $E.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};sl.default=il});var hm=p(_i=>{"use strict";var jE=_i&&_i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_i,"__esModule",{value:!0});var BE=jE(tr()),al=class extends BE.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};_i.default=al});var mm=p(Ti=>{"use strict";var GE=Ti&&Ti.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ti,"__esModule",{value:!0});var HE=GE(Gt()),ol=class extends HE.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ti.default=ol});var Dr=p(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.parseTimeUnits=Q.TIME_UNITS_PATTERN=Q.parseYear=Q.YEAR_PATTERN=Q.parseOrdinalNumberPattern=Q.ORDINAL_NUMBER_PATTERN=Q.parseNumberPattern=Q.NUMBER_PATTERN=Q.TIME_UNIT_DICTIONARY=Q.INTEGER_WORD_DICTIONARY=Q.MONTH_DICTIONARY=Q.WEEKDAY_DICTIONARY=void 0;var ul=ie();Q.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Q.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Q.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Q.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Q.NUMBER_PATTERN=`(?:${ul.matchAnyPattern(Q.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function gm(r){let e=r.toLowerCase();return Q.INTEGER_WORD_DICTIONARY[e]!==void 0?Q.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Q.parseNumberPattern=gm;Q.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function zE(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Q.parseOrdinalNumberPattern=zE;Q.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function KE(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Q.parseYear=KE;var _m=`(${Q.NUMBER_PATTERN})\\s{0,5}(${ul.matchAnyPattern(Q.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ym=new RegExp(_m,"i");Q.TIME_UNITS_PATTERN=ul.repeatedTimeunitPattern("",_m);function VE(r){let e={},t=r,n=ym.exec(t);for(;n;)XE(e,n),t=t.substring(n[0].length),n=ym.exec(t);return e}Q.parseTimeUnits=VE;function XE(r,e){let t=gm(e[1]),n=Q.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var bm=p(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var Tm=Dr(),ZE=ie(),QE=D(),JE=jr(),e0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${ZE.matchAnyPattern(Tm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),t0=1,r0=2,ll=class extends QE.AbstractParserWithWordBoundaryChecking{innerPattern(){return e0}innerExtract(e,t){let n=t[t0].toLowerCase(),i=Tm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[r0];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=JE.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};cl.default=ll});var Rm=p(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var bi=Re(),n0=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),i0=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),s0=2,vm=3,Em=4,wm=5,En=class{pattern(e){return n0}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=En.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=i0.exec(i);return s&&(n.end=En.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[s0]),t[vm]!=null&&(i=parseInt(t[vm])),i>=60||n>24)return null;if(n>=12&&(s=bi.Meridiem.PM),t[wm]!=null){if(n>12)return null;let a=t[wm][0].toLowerCase();a=="a"&&(s=bi.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=bi.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",bi.Meridiem.AM):e.imply("meridiem",bi.Meridiem.PM),t[Em]!=null){let a=parseInt(t[Em]);if(a>=60)return null;e.assign("second",a)}return e}};dl.default=En});var km=p(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var a0=Ue(),Pm=Dr(),Am=Dr(),Qs=Dr(),o0=ie(),u0=D(),l0=new RegExp(`(?:on\\s*?)?(${Qs.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Qs.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${o0.matchAnyPattern(Pm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Am.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Dm=1,Mm=2,c0=3,Om=4,fl=class extends u0.AbstractParserWithWordBoundaryChecking{innerPattern(){return l0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Pm.MONTH_DICTIONARY[t[c0].toLowerCase()],s=Qs.parseOrdinalNumberPattern(t[Dm]);if(s>31)return t.index=t.index+t[Dm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Om]){let a=Am.parseYear(t[Om]);n.start.assign("year",a)}else{let a=a0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Mm]){let a=Qs.parseOrdinalNumberPattern(t[Mm]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};pl.default=fl});var xm=p(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var Nm=Dr(),d0=pe(),f0=D(),p0=gt(),hl=class extends f0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Nm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=Nm.parseTimeUnits(t[1]),i=p0.reverseTimeUnits(n);return d0.ParsingComponents.createRelativeFromReference(e.reference,i)}};ml.default=hl});var Cm=p(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var Sm=Dr(),h0=pe(),m0=D(),yl=class extends m0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${Sm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=Sm.parseTimeUnits(t[1]);return h0.ParsingComponents.createRelativeFromReference(e.reference,n)}};gl.default=yl});var Im=p(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Js=Dr(),y0=pe(),g0=D(),_0=gt(),T0=ie(),_l=class extends g0.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Js.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${T0.matchAnyPattern(Js.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?Js.parseNumberPattern(t[1]):1,i=Js.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=_0.reverseTimeUnits(s)),y0.ParsingComponents.createRelativeFromReference(e.reference,s)}};Tl.default=_l});var qm=p(Ae=>{"use strict";var _t=Ae&&Ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.createConfiguration=Ae.createCasualConfiguration=Ae.parseDate=Ae.parse=Ae.strict=Ae.casual=void 0;var b0=rr(),Fm=At(),v0=_t(dm()),E0=_t(fm()),w0=_t(Br()),R0=_t(pm()),D0=_t(hm()),M0=_t(mm()),O0=_t(bm()),P0=_t(Rm()),A0=_t(km()),k0=_t(xm()),N0=_t(Cm()),x0=_t(Im());Ae.casual=new Fm.Chrono(Um());Ae.strict=new Fm.Chrono(bl(!0));function S0(r,e,t){return Ae.casual.parse(r,e,t)}Ae.parse=S0;function C0(r,e,t){return Ae.casual.parseDate(r,e,t)}Ae.parseDate=C0;function Um(r=!0){let e=bl(!1,r);return e.parsers.unshift(new v0.default),e.parsers.unshift(new E0.default),e.parsers.unshift(new x0.default),e}Ae.createCasualConfiguration=Um;function bl(r=!0,e=!0){return b0.includeCommonConfiguration({parsers:[new w0.default(e),new A0.default,new R0.default,new P0.default,new k0.default,new N0.default,new O0.default],refiners:[new D0.default,new M0.default]},r)}Ae.createConfiguration=bl});var Wm=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.toHankaku=void 0;function I0(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,F0)}ea.toHankaku=I0;function F0(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var Ym=p(vi=>{"use strict";var U0=vi&&vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vi,"__esModule",{value:!0});var vl=Wm(),q0=Ue(),W0=U0(Z()),L0=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Lm=1,Y0=2,El=3,$0=4,j0=5,B0=6,wl=class{pattern(){return L0}extract(e,t){let n=parseInt(vl.toHankaku(t[j0])),i=parseInt(vl.toHankaku(t[B0])),s=e.createParsingComponents({day:i,month:n});if(t[Lm]&&t[Lm].match("\u540C|\u4ECA|\u672C")){let a=W0.default(e.refDate);s.assign("year",a.year())}if(t[Y0]){let a=t[$0],o=a=="\u5143"?1:parseInt(vl.toHankaku(a));t[El]=="\u4EE4\u548C"?o+=2018:t[El]=="\u5E73\u6210"?o+=1988:t[El]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=q0.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};vi.default=wl});var $m=p(Ei=>{"use strict";var G0=Ei&&Ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ei,"__esModule",{value:!0});var H0=G0(Gt()),Rl=class extends H0.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Ei.default=Rl});var Bm=p(St=>{"use strict";var z0=St&&St.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),K0=St&&St.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),V0=St&&St.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&z0(e,r,t);return K0(e,r),e},X0=St&&St.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(St,"__esModule",{value:!0});var Z0=X0(Z()),jm=Re(),Dl=V0(ir()),Q0=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Ml=class{pattern(){return Q0}extract(e,t){let n=t[0],i=Z0.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Dl.yesterday(e.reference);case"\u660E\u65E5":return Dl.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Dl.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",jm.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",jm.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};St.default=Ml});var zm=p(ke=>{"use strict";var Ol=ke&&ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ke,"__esModule",{value:!0});ke.createConfiguration=ke.createCasualConfiguration=ke.parseDate=ke.parse=ke.strict=ke.casual=void 0;var J0=Ol(Ym()),ew=Ol($m()),tw=Ol(Bm()),Gm=At();ke.casual=new Gm.Chrono(Hm());ke.strict=new Gm.Chrono(Pl());function rw(r,e,t){return ke.casual.parse(r,e,t)}ke.parse=rw;function nw(r,e,t){return ke.casual.parseDate(r,e,t)}ke.parseDate=nw;function Hm(){let r=Pl();return r.parsers.unshift(new tw.default),r}ke.createCasualConfiguration=Hm;function Pl(){return{parsers:[new J0.default],refiners:[new ew.default]}}ke.createConfiguration=Pl});var ta=p(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.parseYear=zt.YEAR_PATTERN=zt.MONTH_DICTIONARY=zt.WEEKDAY_DICTIONARY=void 0;zt.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};zt.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};zt.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function iw(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}zt.parseYear=iw});var Vm=p(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var Km=ta(),sw=ie(),aw=D(),ow=jr(),uw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${sw.matchAnyPattern(Km.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),lw=1,cw=2,dw=3,Al=class extends aw.AbstractParserWithWordBoundaryChecking{innerPattern(){return uw}innerExtract(e,t){let n=t[cw].toLowerCase(),i=Km.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[lw],a=t[dw],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=ow.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};kl.default=Al});var Xm=p(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var fw=Yr(),Nl=class extends fw.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};xl.default=Nl});var Zm=p(wi=>{"use strict";var pw=wi&&wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wi,"__esModule",{value:!0});var hw=pw(tr()),Sl=class extends hw.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};wi.default=Sl});var Qm=p(Ri=>{"use strict";var mw=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});var yw=mw(Gt()),Cl=class extends yw.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ri.default=Cl});var iy=p(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var gw=Ue(),ry=ta(),ny=ta(),_w=ie(),Tw=D(),bw=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${_w.matchAnyPattern(ry.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${ny.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Jm=1,ey=2,vw=3,ty=4,Il=class extends Tw.AbstractParserWithWordBoundaryChecking{innerPattern(){return bw}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ry.MONTH_DICTIONARY[t[vw].toLowerCase()],s=parseInt(t[Jm]);if(s>31)return t.index=t.index+t[Jm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[ty]){let a=ny.parseYear(t[ty]);n.start.assign("year",a)}else{let a=gw.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ey]){let a=parseInt(t[ey]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Fl.default=Il});var sy=p(sr=>{"use strict";var Ew=sr&&sr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ww=sr&&sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Rw=sr&&sr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Ew(e,r,t);return ww(e,r),e};Object.defineProperty(sr,"__esModule",{value:!0});var Dw=D(),ra=Rw(ir()),Ul=class extends Dw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return ra.now(e.reference);case"hoje":return ra.today(e.reference);case"amanha":case"amanh\xE3":return ra.tomorrow(e.reference);case"ontem":return ra.yesterday(e.reference)}return i}};sr.default=Ul});var ay=p(Di=>{"use strict";var Mw=Di&&Di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Di,"__esModule",{value:!0});var na=Re(),Ow=D(),Pw=yt(),Aw=Mw(Z()),ql=class extends Ow.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=Aw.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",na.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":Pw.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",na.Meridiem.AM),i.imply("hour",12);break}return i}};Di.default=ql});var ly=p(Ne=>{"use strict";var Mr=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.createConfiguration=Ne.createCasualConfiguration=Ne.parseDate=Ne.parse=Ne.strict=Ne.casual=void 0;var kw=rr(),oy=At(),Nw=Mr(Br()),xw=Mr(Vm()),Sw=Mr(Xm()),Cw=Mr(Zm()),Iw=Mr(Qm()),Fw=Mr(iy()),Uw=Mr(sy()),qw=Mr(ay());Ne.casual=new oy.Chrono(uy());Ne.strict=new oy.Chrono(Wl(!0));function Ww(r,e,t){return Ne.casual.parse(r,e,t)}Ne.parse=Ww;function Lw(r,e,t){return Ne.casual.parseDate(r,e,t)}Ne.parseDate=Lw;function uy(r=!0){let e=Wl(!1,r);return e.parsers.push(new Uw.default),e.parsers.push(new qw.default),e}Ne.createCasualConfiguration=uy;function Wl(r=!0,e=!0){return kw.includeCommonConfiguration({parsers:[new Nw.default(e),new xw.default,new Sw.default,new Fw.default],refiners:[new Cw.default,new Iw.default]},r)}Ne.createConfiguration=Wl});var cy=p(Mi=>{"use strict";var Yw=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});var $w=Yw(Gt()),Ll=class extends $w.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Mi.default=Ll});var dy=p(Oi=>{"use strict";var jw=Oi&&Oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oi,"__esModule",{value:!0});var Bw=jw(tr()),Yl=class extends Bw.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Oi.default=Yl});var fy=p(ar=>{"use strict";var Gw=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Hw=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zw=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Gw(e,r,t);return Hw(e,r),e};Object.defineProperty(ar,"__esModule",{value:!0});var Kw=D(),ia=zw(ir()),$l=class extends Kw.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return ia.now(e.reference);case"vandaag":return ia.today(e.reference);case"morgen":case"morgend":return ia.tomorrow(e.reference);case"gisteren":return ia.yesterday(e.reference)}return i}};ar.default=$l});var py=p(Pi=>{"use strict";var Vw=Pi&&Pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pi,"__esModule",{value:!0});var sa=Re(),Xw=D(),Zw=Vw(Z()),Qw=yt(),Jw=1,eR=2,jl=class extends Xw.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Zw.default(e.refDate),i=e.createParsingComponents();switch(t[Jw]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[eR].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",sa.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Qw.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",sa.Meridiem.AM),i.imply("hour",12);break}return i}};Pi.default=jl});var ot=p(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.parseTimeUnits=j.TIME_UNITS_PATTERN=j.parseYear=j.YEAR_PATTERN=j.parseOrdinalNumberPattern=j.ORDINAL_NUMBER_PATTERN=j.parseNumberPattern=j.NUMBER_PATTERN=j.TIME_UNIT_DICTIONARY=j.ORDINAL_WORD_DICTIONARY=j.INTEGER_WORD_DICTIONARY=j.MONTH_DICTIONARY=j.WEEKDAY_DICTIONARY=void 0;var aa=ie(),tR=Ue();j.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};j.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};j.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};j.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};j.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};j.NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function my(r){let e=r.toLowerCase();return j.INTEGER_WORD_DICTIONARY[e]!==void 0?j.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}j.parseNumberPattern=my;j.ORDINAL_NUMBER_PATTERN=`(?:${aa.matchAnyPattern(j.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function rR(r){let e=r.toLowerCase();return j.ORDINAL_WORD_DICTIONARY[e]!==void 0?j.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}j.parseOrdinalNumberPattern=rR;j.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function nR(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return tR.findMostLikelyADYear(e)}j.parseYear=nR;var yy=`(${j.NUMBER_PATTERN})\\s{0,5}(${aa.matchAnyPattern(j.TIME_UNIT_DICTIONARY)})\\s{0,5}`,hy=new RegExp(yy,"i");j.TIME_UNITS_PATTERN=aa.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",yy);function iR(r){let e={},t=r,n=hy.exec(t);for(;n;)sR(e,n),t=t.substring(n[0].length),n=hy.exec(t);return e}j.parseTimeUnits=iR;function sR(r,e){let t=my(e[1]),n=j.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var _y=p(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var gy=ot(),aR=pe(),oR=D(),Bl=class extends oR.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+gy.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=gy.parseTimeUnits(t[1]);return aR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=Bl});var by=p(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Ty=ot(),uR=ie(),lR=D(),cR=jr(),dR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${uR.matchAnyPattern(Ty.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),fR=1,pR=2,hR=3,Hl=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return dR}innerExtract(e,t){let n=t[pR].toLowerCase(),i=Ty.WEEKDAY_DICTIONARY[n],s=t[fR],a=t[hR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=cR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};zl.default=Hl});var My=p(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var mR=Ue(),Ry=ot(),oa=ot(),Dy=ot(),yR=ie(),gR=D(),_R=new RegExp(`(?:on\\s*?)?(${oa.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${oa.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+yR.matchAnyPattern(Ry.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Dy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),TR=3,vy=1,Ey=2,wy=4,Kl=class extends gR.AbstractParserWithWordBoundaryChecking{innerPattern(){return _R}innerExtract(e,t){let n=Ry.MONTH_DICTIONARY[t[TR].toLowerCase()],i=oa.parseOrdinalNumberPattern(t[vy]);if(i>31)return t.index=t.index+t[vy].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[wy]){let u=Dy.parseYear(t[wy]);s.assign("year",u)}else{let u=mR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Ey])return s;let a=oa.parseOrdinalNumberPattern(t[Ey]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Vl.default=Kl});var ky=p(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var Py=ot(),bR=Ue(),vR=ie(),Ay=ot(),ER=D(),wR=new RegExp(`(${vR.matchAnyPattern(Py.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Ay.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),RR=1,Oy=2,Xl=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return wR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[RR],s=Py.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Oy]){let a=Ay.parseYear(t[Oy]);n.assign("year",a)}else{let a=bR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Zl.default=Xl});var Ny=p(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var DR=D(),MR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),OR=1,PR=2,Ql=class extends DR.AbstractParserWithWordBoundaryChecking{innerPattern(){return MR}innerExtract(e,t){let n=parseInt(t[PR]),i=parseInt(t[OR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Jl.default=Ql});var xy=p(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var AR=Yr(),ec=class extends AR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};tc.default=ec});var Iy=p(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Cy=ot(),kR=ie(),NR=D(),xR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${kR.matchAnyPattern(Cy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),SR=1,CR=2,Sy=3,IR=4,rc=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return xR}innerExtract(e,t){let n=t[Sy]?parseInt(t[Sy]):Cy.MONTH_DICTIONARY[t[CR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[SR]);return{day:parseInt(t[IR]),month:n,year:i}}};nc.default=rc});var Fy=p(Ai=>{"use strict";var FR=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0});var UR=D(),ua=Re(),ic=yt(),qR=FR(Z()),WR=1,LR=2,sc=class extends UR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[WR].toLowerCase(),i=t[LR].toLowerCase(),s=e.createParsingComponents(),a=qR.default(e.refDate);switch(n){case"gisteren":ic.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ic.assignSimilarDate(s,a);break;case"morgen":ic.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",ua.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",ua.Meridiem.PM),s.imply("hour",20);break}return s}};Ai.default=sc});var qy=p(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Uy=ot(),YR=pe(),$R=D(),jR=gt(),BR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${Uy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ac=class extends $R.AbstractParserWithWordBoundaryChecking{innerPattern(){return BR}innerExtract(e,t){let n=t[1].toLowerCase(),i=Uy.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=jR.reverseTimeUnits(i);break}return YR.ParsingComponents.createRelativeFromReference(e.reference,i)}};oc.default=ac});var Yy=p(ki=>{"use strict";var GR=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});var Ly=ot(),Wy=pe(),HR=GR(Z()),zR=D(),KR=ie(),VR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${KR.matchAnyPattern(Ly.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),XR=1,ZR=2,uc=class extends zR.AbstractParserWithWordBoundaryChecking{innerPattern(){return VR}innerExtract(e,t){let n=t[XR].toLowerCase(),i=t[ZR].toLowerCase(),s=Ly.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,Wy.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,Wy.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=HR.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ki.default=uc});var $y=p(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var cc=ot(),QR=pe(),JR=D(),eD=gt(),tD=new RegExp("("+cc.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),rD=new RegExp("("+cc.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),lc=class extends JR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?rD:tD}innerExtract(e,t){let n=cc.parseTimeUnits(t[1]),i=eD.reverseTimeUnits(n);return QR.ParsingComponents.createRelativeFromReference(e.reference,i)}};dc.default=lc});var jy=p(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var pc=ot(),nD=pe(),iD=D(),sD=new RegExp("("+pc.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),aD=new RegExp("("+pc.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),oD=1,fc=class extends iD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?aD:sD}innerExtract(e,t){let n=pc.parseTimeUnits(t[oD]);return nD.ParsingComponents.createRelativeFromReference(e.reference,n)}};hc.default=fc});var zy=p(xe=>{"use strict";var We=xe&&xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xe,"__esModule",{value:!0});xe.createConfiguration=xe.createCasualConfiguration=xe.parseDate=xe.parse=xe.strict=xe.casual=void 0;var uD=rr(),By=At(),lD=We(cy()),cD=We(dy()),dD=We(fy()),fD=We(py()),pD=We(Br()),hD=We(_y()),mD=We(by()),yD=We(My()),Gy=We(ky()),gD=We(Ny()),_D=We(xy()),TD=We(Iy()),bD=We(Fy()),vD=We(qy()),ED=We(Yy()),wD=We($y()),RD=We(jy());xe.casual=new By.Chrono(Hy());xe.strict=new By.Chrono(mc(!0));function DD(r,e,t){return xe.casual.parse(r,e,t)}xe.parse=DD;function MD(r,e,t){return xe.casual.parseDate(r,e,t)}xe.parseDate=MD;function Hy(r=!0){let e=mc(!1,r);return e.parsers.unshift(new dD.default),e.parsers.unshift(new fD.default),e.parsers.unshift(new bD.default),e.parsers.unshift(new Gy.default),e.parsers.unshift(new ED.default),e.parsers.unshift(new vD.default),e}xe.createCasualConfiguration=Hy;function mc(r=!0,e=!0){return uD.includeCommonConfiguration({parsers:[new pD.default(e),new hD.default,new yD.default,new Gy.default,new mD.default,new TD.default,new gD.default,new _D.default(r),new wD.default(r),new RD.default(r)],refiners:[new cD.default,new lD.default]},r)}xe.createConfiguration=mc});var Zy=p(Ni=>{"use strict";var OD=Ni&&Ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ni,"__esModule",{value:!0});var PD=OD(Z()),AD=D(),kD=1,Ky=2,ND=3,Vy=4,Xy=5,xD=6,yc=class extends AD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=PD.default(e.refDate),a=s;if(t[kD])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[Ky]){let o=t[Ky],u=t[ND];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Vy]){let u=t[Vy][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Xy]){let o=t[Xy];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[xD];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ni.default=yc});var wn=p(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.zhStringToYear=Xe.zhStringToNumber=Xe.WEEKDAY_OFFSET=Xe.NUMBER=void 0;Xe.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Xe.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function SD(r){let e=0;for(let t=0;t{"use strict";var ID=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0});var FD=ID(Z()),UD=D(),zr=wn(),gc=1,Qy=2,_c=3,Tc=class extends UD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(zr.NUMBER).join("")+"]{4}|["+Object.keys(zr.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(zr.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(zr.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=FD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Qy]);if(isNaN(s)&&(s=zr.zhStringToNumber(t[Qy])),i.start.assign("month",s),t[_c]){let a=parseInt(t[_c]);isNaN(a)&&(a=zr.zhStringToNumber(t[_c])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[gc]){let a=parseInt(t[gc]);isNaN(a)&&(a=zr.zhStringToYear(t[gc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};xi.default=Tc});var tg=p(Si=>{"use strict";var qD=Si&&Si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Si,"__esModule",{value:!0});var WD=qD(Z()),LD=D(),eg=wn(),YD=new RegExp("(\\d+|["+Object.keys(eg.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),bc=1,$D=2,vc=class extends LD.AbstractParserWithWordBoundaryChecking{innerPattern(){return YD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[bc]);if(isNaN(i)&&(i=eg.zhStringToNumber(t[bc])),isNaN(i)){let u=t[bc];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=WD.default(e.refDate),o=t[$D][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Si.default=vc});var ng=p(Ci=>{"use strict";var jD=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0});var BD=jD(Z()),GD=D(),rg=wn(),HD=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(rg.WEEKDAY_OFFSET).join("|")+")"),Ec=class extends GD.AbstractParserWithWordBoundaryChecking{innerPattern(){return HD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=rg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=BD.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var zD=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});var KD=zD(Z()),VD=D(),bt=wn(),XD=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ZD=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(bt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),la=1,ca=2,da=3,fa=4,pa=5,ha=6,Tt=7,Rn=8,ma=9,wc=class extends VD.AbstractParserWithWordBoundaryChecking{innerPattern(){return XD}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=KD.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[Rn]){var d=parseInt(t[Rn]);if(isNaN(d)&&(d=bt.zhStringToNumber(t[Rn])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=bt.zhStringToNumber(t[ha])),t[Tt]?t[Tt]=="\u534A"?l=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?l=0:(l=parseInt(t[Tt]),isNaN(l)&&(l=bt.zhStringToNumber(t[Tt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12))}else if(t[ca]){var h=t[ca],g=h[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],_=m[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,u==12&&(u=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var R=t[pa],w=R[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=ZD.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let A=s.clone();if(i.end=e.createParsingComponents(),t[la]){var a=t[la];a=="\u660E"||a=="\u807D"?n.hour()>1&&A.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?A.add(-1,"day"):a=="\u524D"?A.add(-2,"day"):a=="\u5927\u524D"?A.add(-3,"day"):a=="\u5F8C"?A.add(2,"day"):a=="\u5927\u5F8C"&&A.add(3,"day"),i.end.assign("day",A.date()),i.end.assign("month",A.month()+1),i.end.assign("year",A.year())}else if(t[fa]){var o=t[fa];o=="\u660E"||o=="\u807D"?A.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?A.add(-1,"day"):o=="\u524D"?A.add(-2,"day"):o=="\u5927\u524D"?A.add(-3,"day"):o=="\u5F8C"?A.add(2,"day"):o=="\u5927\u5F8C"&&A.add(3,"day"),i.end.assign("day",A.date()),i.end.assign("month",A.month()+1),i.end.assign("year",A.year())}else i.end.imply("day",A.date()),i.end.imply("month",A.month()+1),i.end.imply("year",A.year());if(u=0,l=0,c=-1,t[Rn]){var d=parseInt(t[Rn]);if(isNaN(d)&&(d=bt.zhStringToNumber(t[Rn])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[ha]),isNaN(u)&&(u=bt.zhStringToNumber(t[ha])),t[Tt]?t[Tt]=="\u534A"?l=30:t[Tt]=="\u6B63"||t[Tt]=="\u6574"?l=0:(l=parseInt(t[Tt]),isNaN(l)&&(l=bt.zhStringToNumber(t[Tt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[ma]){if(u>12)return null;var f=t[ma][0].toLowerCase();f=="a"&&(c=0,u==12&&(u=0)),f=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ca]){var h=t[ca],g=h[0];g=="\u671D"||g=="\u65E9"?(c=0,u==12&&(u=0)):g=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[da]){var m=t[da],_=m[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,u==12&&(u=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[pa]){var R=t[pa],w=R[0];w=="\u4E0A"||w=="\u671D"||w=="\u65E9"||w=="\u51CC"?(c=0,u==12&&(u=0)):(w=="\u4E0B"||w=="\u664F"||w=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var QD=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});var JD=QD(Z()),eM=D(),sg=wn(),tM=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(sg.WEEKDAY_OFFSET).join("|")+")"),Rc=class extends eM.AbstractParserWithWordBoundaryChecking{innerPattern(){return tM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=sg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=JD.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var rM=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});var nM=rM(Gt()),Dc=class extends nM.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};Ui.default=Dc});var ug=p(qi=>{"use strict";var iM=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var sM=iM(tr()),Mc=class extends sM.default{patternBetween(){return/^\s*$/i}};qi.default=Mc});var lg=p(be=>{"use strict";var or=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.createConfiguration=be.createCasualConfiguration=be.parseDate=be.parse=be.strict=be.casual=be.hant=void 0;var Oc=At(),aM=or(Gs()),oM=rr(),uM=or(Zy()),lM=or(Jy()),cM=or(tg()),dM=or(ng()),fM=or(ig()),pM=or(ag()),hM=or(og()),mM=or(ug());be.hant=new Oc.Chrono(Pc());be.casual=new Oc.Chrono(Pc());be.strict=new Oc.Chrono(Ac());function yM(r,e,t){return be.casual.parse(r,e,t)}be.parse=yM;function gM(r,e,t){return be.casual.parseDate(r,e,t)}be.parseDate=gM;function Pc(){let r=Ac();return r.parsers.unshift(new uM.default),r}be.createCasualConfiguration=Pc;function Ac(){let r=oM.includeCommonConfiguration({parsers:[new lM.default,new dM.default,new pM.default,new fM.default,new cM.default],refiners:[new hM.default,new mM.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof aM.default)),r}be.createConfiguration=Ac});var pg=p(Wi=>{"use strict";var _M=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var TM=_M(Z()),bM=D(),vM=1,cg=2,EM=3,dg=4,fg=5,wM=6,kc=class extends bM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=TM.default(e.refDate),a=s;if(t[vM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[cg]){let o=t[cg],u=t[EM];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[dg]){let u=t[dg][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[fg]){let o=t[fg];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[wM];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Wi.default=kc});var Dn=p(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.zhStringToYear=Ze.zhStringToNumber=Ze.WEEKDAY_OFFSET=Ze.NUMBER=void 0;Ze.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Ze.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function RM(r){let e=0;for(let t=0;t{"use strict";var MM=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});var OM=MM(Z()),PM=D(),Kr=Dn(),Nc=1,hg=2,xc=3,Sc=class extends PM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Kr.NUMBER).join("")+"]{4}|["+Object.keys(Kr.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Kr.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Kr.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=OM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[hg]);if(isNaN(s)&&(s=Kr.zhStringToNumber(t[hg])),i.start.assign("month",s),t[xc]){let a=parseInt(t[xc]);isNaN(a)&&(a=Kr.zhStringToNumber(t[xc])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Nc]){let a=parseInt(t[Nc]);isNaN(a)&&(a=Kr.zhStringToYear(t[Nc])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Li.default=Sc});var gg=p(Yi=>{"use strict";var AM=Yi&&Yi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yi,"__esModule",{value:!0});var kM=AM(Z()),NM=D(),yg=Dn(),xM=new RegExp("(\\d+|["+Object.keys(yg.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Cc=1,SM=2,Ic=class extends NM.AbstractParserWithWordBoundaryChecking{innerPattern(){return xM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Cc]);if(isNaN(i)&&(i=yg.zhStringToNumber(t[Cc])),isNaN(i)){let u=t[Cc];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=kM.default(e.refDate),o=t[SM][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Yi.default=Ic});var Tg=p($i=>{"use strict";var CM=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});var IM=CM(Z()),FM=D(),_g=Dn(),UM=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(_g.WEEKDAY_OFFSET).join("|")+")"),Fc=class extends FM.AbstractParserWithWordBoundaryChecking{innerPattern(){return UM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=_g.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=IM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var qM=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var WM=qM(Z()),LM=D(),Et=Dn(),YM=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),$M=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Et.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ya=1,ga=2,_a=3,Ta=4,ba=5,va=6,vt=7,Mn=8,Ea=9,Uc=class extends LM.AbstractParserWithWordBoundaryChecking{innerPattern(){return YM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=WM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[Mn]){let c=parseInt(t[Mn]);if(isNaN(c)&&(c=Et.zhStringToNumber(t[Mn])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=Et.zhStringToNumber(t[va])),t[vt]?t[vt]=="\u534A"?o=30:t[vt]=="\u6B63"||t[vt]=="\u6574"?o=0:(o=parseInt(t[vt]),isNaN(o)&&(o=Et.zhStringToNumber(t[vt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=$M.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[ya]){let c=t[ya];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Ta]){let c=t[Ta];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[Mn]){let c=parseInt(t[Mn]);if(isNaN(c)&&(c=Et.zhStringToNumber(t[Mn])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[va]),isNaN(a)&&(a=Et.zhStringToNumber(t[va])),t[vt]?t[vt]=="\u534A"?o=30:t[vt]=="\u6B63"||t[vt]=="\u6574"?o=0:(o=parseInt(t[vt]),isNaN(o)&&(o=Et.zhStringToNumber(t[vt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ea]){if(a>12)return null;let c=t[Ea][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ga]){let d=t[ga][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[_a]){let d=t[_a][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[ba]){let d=t[ba][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var jM=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});var BM=jM(Z()),GM=D(),vg=Dn(),HM=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(vg.WEEKDAY_OFFSET).join("|")+")"),qc=class extends GM.AbstractParserWithWordBoundaryChecking{innerPattern(){return HM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=vg.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=BM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var zM=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var KM=zM(Gt()),Wc=class extends KM.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Gi.default=Wc});var Rg=p(Hi=>{"use strict";var VM=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var XM=VM(tr()),Lc=class extends XM.default{patternBetween(){return/^\s*$/i}};Hi.default=Lc});var Dg=p(ve=>{"use strict";var ur=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.createConfiguration=ve.createCasualConfiguration=ve.parseDate=ve.parse=ve.strict=ve.casual=ve.hans=void 0;var Yc=At(),ZM=ur(Gs()),QM=rr(),JM=ur(pg()),eO=ur(mg()),tO=ur(gg()),rO=ur(Tg()),nO=ur(bg()),iO=ur(Eg()),sO=ur(wg()),aO=ur(Rg());ve.hans=new Yc.Chrono($c());ve.casual=new Yc.Chrono($c());ve.strict=new Yc.Chrono(jc());function oO(r,e,t){return ve.casual.parse(r,e,t)}ve.parse=oO;function uO(r,e,t){return ve.casual.parseDate(r,e,t)}ve.parseDate=uO;function $c(){let r=jc();return r.parsers.unshift(new JM.default),r}ve.createCasualConfiguration=$c;function jc(){let r=QM.includeCommonConfiguration({parsers:[new eO.default,new rO.default,new iO.default,new nO.default,new tO.default],refiners:[new sO.default,new aO.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof ZM.default)),r}ve.createConfiguration=jc});var Og=p(ut=>{"use strict";var Mg=ut&&ut.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lO=ut&&ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cO=ut&&ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Mg(e,r,t)},dO=ut&&ut.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Mg(e,r,t);return lO(e,r),e};Object.defineProperty(ut,"__esModule",{value:!0});ut.hans=void 0;cO(lg(),ut);ut.hans=dO(Dg())});var Qe=p(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.parseTimeUnits=U.TIME_UNITS_PATTERN=U.parseYear=U.YEAR_PATTERN=U.parseOrdinalNumberPattern=U.ORDINAL_NUMBER_PATTERN=U.parseNumberPattern=U.NUMBER_PATTERN=U.TIME_UNIT_DICTIONARY=U.ORDINAL_WORD_DICTIONARY=U.INTEGER_WORD_DICTIONARY=U.MONTH_DICTIONARY=U.FULL_MONTH_NAME_DICTIONARY=U.WEEKDAY_DICTIONARY=U.REGEX_PARTS=void 0;var wa=ie(),fO=Ue();U.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};U.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};U.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};U.MONTH_DICTIONARY=Object.assign(Object.assign({},U.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});U.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};U.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};U.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};U.NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function Ag(r){let e=r.toLowerCase();return U.INTEGER_WORD_DICTIONARY[e]!==void 0?U.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}U.parseNumberPattern=Ag;U.ORDINAL_NUMBER_PATTERN=`(?:${wa.matchAnyPattern(U.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function pO(r){let e=r.toLowerCase();return U.ORDINAL_WORD_DICTIONARY[e]!==void 0?U.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}U.parseOrdinalNumberPattern=pO;var Bc="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";U.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Bc}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Bc}|[5-9][0-9]${Bc})`;function hO(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return fO.findMostLikelyADYear(e)}U.parseYear=hO;var kg=`(${U.NUMBER_PATTERN})\\s{0,3}(${wa.matchAnyPattern(U.TIME_UNIT_DICTIONARY)})`,Pg=new RegExp(kg,"i");U.TIME_UNITS_PATTERN=wa.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",kg);function mO(r){let e={},t=r,n=Pg.exec(t);for(;n;)yO(e,n),t=t.substring(n[0].length).trim(),n=Pg.exec(t);return e}U.parseTimeUnits=mO;function yO(r,e){let t=Ag(e[1]),n=U.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var xg=p(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var zi=Qe(),gO=pe(),_O=D(),Ng=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${zi.TIME_UNITS_PATTERN})${zi.REGEX_PARTS.rightBoundary}`,TO=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Ng}`,zi.REGEX_PARTS.flags),bO=new RegExp(Ng,"i"),Gc=class extends _O.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return zi.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?bO:TO}innerExtract(e,t){let n=zi.parseTimeUnits(t[1]);return gO.ParsingComponents.createRelativeFromReference(e.reference,n)}};Hc.default=Gc});var Ug=p(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var vO=Ue(),Ki=Qe(),Fg=Qe(),Ra=Qe(),EO=ie(),wO=D(),RO=new RegExp(`(?:\u0441)?\\s*(${Ra.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Ra.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${EO.matchAnyPattern(Ki.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Fg.YEAR_PATTERN}(?![^\\s]\\d)))?${Ki.REGEX_PARTS.rightBoundary}`,Ki.REGEX_PARTS.flags),Sg=1,Cg=2,DO=3,Ig=4,zc=class extends wO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ki.REGEX_PARTS.leftBoundary}innerPattern(){return RO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ki.MONTH_DICTIONARY[t[DO].toLowerCase()],s=Ra.parseOrdinalNumberPattern(t[Sg]);if(s>31)return t.index=t.index+t[Sg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Ig]){let a=Fg.parseYear(t[Ig]);n.start.assign("year",a)}else{let a=vO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Cg]){let a=Ra.parseOrdinalNumberPattern(t[Cg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Kc.default=zc});var Lg=p(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Vi=Qe(),MO=Ue(),OO=ie(),Wg=Qe(),PO=D(),AO=new RegExp(`((?:\u0432)\\s*)?(${OO.matchAnyPattern(Vi.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Wg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Vi.REGEX_PARTS.flags),kO=2,qg=3,Vc=class extends PO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Vi.REGEX_PARTS.leftBoundary}innerPattern(){return AO}innerExtract(e,t){let n=t[kO].toLowerCase();if(t[0].length<=3&&!Vi.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=Vi.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[qg]){let a=Wg.parseYear(t[qg]);i.start.assign("year",a)}else{let a=MO.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Xc.default=Vc});var $g=p(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var Da=Re(),NO=Yr(),Yg=Qe(),Zc=class extends NO.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return Yg.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Yg.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Da.Meridiem.PM)):i<6&&n.assign("meridiem",Da.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Da.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Da.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qc.default=Zc});var jg=p(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var Ma=Qe(),xO=pe(),SO=D(),CO=gt(),IO=new RegExp(`(${Ma.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Ma.REGEX_PARTS.flags),Jc=class extends SO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ma.REGEX_PARTS.leftBoundary}innerPattern(){return IO}innerExtract(e,t){let n=Ma.parseTimeUnits(t[1]),i=CO.reverseTimeUnits(n);return xO.ParsingComponents.createRelativeFromReference(e.reference,i)}};ed.default=Jc});var Bg=p(Xi=>{"use strict";var FO=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var UO=FO(Gt()),td=class extends UO.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Xi.default=td});var Gg=p(Zi=>{"use strict";var qO=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var WO=qO(tr()),rd=class extends WO.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Zi.default=rd});var Hg=p(lr=>{"use strict";var LO=lr&&lr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),YO=lr&&lr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$O=lr&&lr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&LO(e,r,t);return YO(e,r),e};Object.defineProperty(lr,"__esModule",{value:!0});var jO=D(),Qi=$O(ir()),nd=Qe(),BO=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${nd.REGEX_PARTS.rightBoundary}`,nd.REGEX_PARTS.flags),id=class extends jO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return nd.REGEX_PARTS.leftBoundary}innerPattern(e){return BO}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Qi.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Qi.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Qi.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Qi.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Qi.theDayBefore(e.reference,2)}return i}};lr.default=id});var zg=p(Ct=>{"use strict";var GO=Ct&&Ct.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),HO=Ct&&Ct.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zO=Ct&&Ct.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&GO(e,r,t);return HO(e,r),e},KO=Ct&&Ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ct,"__esModule",{value:!0});var VO=D(),Vr=zO(ir()),XO=yt(),ZO=KO(Z()),sd=Qe(),QO=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${sd.REGEX_PARTS.rightBoundary}`,sd.REGEX_PARTS.flags),ad=class extends VO.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return sd.REGEX_PARTS.leftBoundary}innerPattern(){return QO}innerExtract(e,t){let n=ZO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Vr.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Vr.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Vr.morning(e.reference);if(i.match(/в\s*полдень/))return Vr.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Vr.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Vr.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),XO.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Vr.midnight(e.reference):s}};Ct.default=ad});var Kg=p(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var Ji=Qe(),JO=ie(),eP=D(),tP=jr(),rP=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${JO.matchAnyPattern(Ji.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Ji.REGEX_PARTS.rightBoundary}`,Ji.REGEX_PARTS.flags),nP=1,iP=2,sP=3,od=class extends eP.AbstractParserWithWordBoundaryChecking{innerPattern(){return rP}patternLeftBoundary(){return Ji.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[iP].toLowerCase(),i=Ji.WEEKDAY_DICTIONARY[n],s=t[nP],a=t[sP],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=tP.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};ud.default=od});var Xg=p(ts=>{"use strict";var aP=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0});var es=Qe(),Vg=pe(),oP=aP(Z()),uP=D(),lP=ie(),cP=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${lP.matchAnyPattern(es.TIME_UNIT_DICTIONARY)})(?=\\s*)${es.REGEX_PARTS.rightBoundary}`,es.REGEX_PARTS.flags),dP=1,fP=2,ld=class extends uP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return es.REGEX_PARTS.leftBoundary}innerPattern(){return cP}innerExtract(e,t){let n=t[dP].toLowerCase(),i=t[fP].toLowerCase(),s=es.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,Vg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,Vg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=oP.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ts.default=ld});var Zg=p(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var rs=Qe(),pP=pe(),hP=D(),mP=gt(),yP=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${rs.TIME_UNITS_PATTERN})${rs.REGEX_PARTS.rightBoundary}`,rs.REGEX_PARTS.flags),cd=class extends hP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return rs.REGEX_PARTS.leftBoundary}innerPattern(){return yP}innerExtract(e,t){let n=t[1].toLowerCase(),i=rs.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=mP.reverseTimeUnits(i);break}return pP.ParsingComponents.createRelativeFromReference(e.reference,i)}};dd.default=cd});var e_=p(Se=>{"use strict";var lt=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});Se.createConfiguration=Se.createCasualConfiguration=Se.parseDate=Se.parse=Se.strict=Se.casual=void 0;var gP=lt(xg()),_P=lt(Ug()),TP=lt(Lg()),bP=lt($g()),vP=lt(jg()),EP=lt(Bg()),wP=lt(Gg()),RP=rr(),DP=lt(Hg()),MP=lt(zg()),OP=lt(Kg()),PP=lt(Xg()),Qg=At(),AP=lt(Br()),kP=lt(Zg());Se.casual=new Qg.Chrono(Jg());Se.strict=new Qg.Chrono(fd(!0));function NP(r,e,t){return Se.casual.parse(r,e,t)}Se.parse=NP;function xP(r,e,t){return Se.casual.parseDate(r,e,t)}Se.parseDate=xP;function Jg(){let r=fd(!1);return r.parsers.unshift(new DP.default),r.parsers.unshift(new MP.default),r.parsers.unshift(new TP.default),r.parsers.unshift(new PP.default),r.parsers.unshift(new kP.default),r}Se.createCasualConfiguration=Jg;function fd(r=!0){return RP.includeCommonConfiguration({parsers:[new AP.default(!0),new gP.default,new _P.default,new OP.default,new bP.default(r),new vP.default],refiners:[new wP.default,new EP.default]},r)}Se.createConfiguration=fd});var Re=p(L=>{"use strict";var SP=L&&L.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),CP=L&&L.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Or=L&&L.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&SP(e,r,t);return CP(e,r),e};Object.defineProperty(L,"__esModule",{value:!0});L.parseDate=L.parse=L.casual=L.strict=L.ru=L.zh=L.nl=L.pt=L.ja=L.fr=L.de=L.Meridiem=L.Chrono=L.en=void 0;var pd=Or(ku());L.en=pd;var IP=At();Object.defineProperty(L,"Chrono",{enumerable:!0,get:function(){return IP.Chrono}});var FP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(FP=L.Meridiem||(L.Meridiem={}));var UP=Or(lm());L.de=UP;var qP=Or(qm());L.fr=qP;var WP=Or(zm());L.ja=WP;var LP=Or(ly());L.pt=LP;var YP=Or(zy());L.nl=YP;var $P=Or(Og());L.zh=$P;var jP=Or(e_());L.ru=jP;L.strict=pd.strict;L.casual=pd.casual;function BP(r,e,t){return L.casual.parse(r,e,t)}L.parse=BP;function GP(r,e,t){return L.casual.parseDate(r,e,t)}L.parseDate=GP});var Kt=p(kr=>{"use strict";kr.__esModule=!0;var JP;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(JP=kr.Operators||(kr.Operators={}));var eA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(eA=kr.StructuralCharacters||(kr.StructuralCharacters={}));var tA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(tA=kr.Tokens||(kr.Tokens={}))});var Dd=p(Wa=>{"use strict";Wa.__esModule=!0;var me=Kt();Wa.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Wa.VALID_TOKENS={identifierOnly:[{name:me.Tokens.IDENTIFIER},{name:me.Tokens.STRUCTURAL_CHARACTER,value:me.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:me.Tokens.IDENTIFIER},{name:me.Tokens.STRUCTURAL_CHARACTER,value:me.StructuralCharacters.OPEN_PARENTHESIS},{name:me.Tokens.OPERATOR,value:me.Operators.NOT}],binaryOperator:[{name:me.Tokens.OPERATOR,value:me.Operators.AND},{name:me.Tokens.OPERATOR,value:me.Operators.OR},{name:me.Tokens.OPERATOR,value:me.Operators.XOR}],binaryOperatorOrClose:[{name:me.Tokens.OPERATOR,value:me.Operators.AND},{name:me.Tokens.OPERATOR,value:me.Operators.OR},{name:me.Tokens.OPERATOR,value:me.Operators.XOR},{name:me.Tokens.STRUCTURAL_CHARACTER,value:me.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Md=p(fr=>{"use strict";fr.__esModule=!0;var xn=Kt();fr.STRUCTURAL_CHARACTERS={"(":xn.StructuralCharacters.OPEN_PARENTHESIS,")":xn.StructuralCharacters.CLOSE_PARENTHESIS};fr.OPERATORS={AND:xn.Operators.AND,OR:xn.Operators.OR,XOR:xn.Operators.XOR,NOT:xn.Operators.NOT};fr.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));fr.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);fr.COMMENT_DELIMITER=String.fromCodePoint(35);fr.EOL=String.fromCodePoint(10);fr.ESCAPE_CHARACTER=String.fromCodePoint(92)});var h_=p(pr=>{"use strict";var Od=pr&&pr.__assign||function(){return Od=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Pd.__esModule=!0;var Sn=Kt(),ct=Md(),Cn=h_();Pd.lex=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var rA=hr&&hr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";var Fn=ls&&ls.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";mr.__esModule=!0;var T_=Kt();mr.andUtil=function(r,e){return r&&e};mr.orUtil=function(r,e){return r||e};mr.xorUtil=function(r,e){return r!==e};mr.notUtil=function(r){return!r};mr.isIdentifier=function(r){var e=r.name,t=r.value;return e===T_.Tokens.IDENTIFIER&&typeof t=="string"};mr.isOperator=function(r){var e=r.name,t=r.value;return e===T_.Tokens.OPERATOR&&typeof t=="string"};mr.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var b_=p(Cd=>{"use strict";var cs;Cd.__esModule=!0;var xd=Kt(),Sd=Nd();Cd.OPERATOR_MAP=(cs={},cs[xd.Operators.AND]=Sd.andUtil,cs[xd.Operators.OR]=Sd.orUtil,cs[xd.Operators.XOR]=Sd.xorUtil,cs)});var E_=p(Jr=>{"use strict";var Id=Jr&&Jr.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e{"use strict";ds.__esModule=!0;var w_=E_();ds.getEvaluator=w_.getEvaluator;ds.evaluate=w_.evaluate;var aA=kd();ds.parse=aA.parse});var pA={};F_(pA,{default:()=>ro});module.exports=U_(pA);var P_=require("obsidian");var Ns=require("obsidian");var mA=new Error("timeout while waiting for mutex to become available"),yA=new Error("mutex already locked"),q_=new Error("request for lock canceled"),nf=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},oo=class{constructor(e,t=q_){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return nf(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return nf(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},W_=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Es=class{constructor(e){this._semaphore=new oo(1,e)}acquire(){return W_(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var fp=require("obsidian");var af=require("obsidian");var sf=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Ft=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return sf.forEach(t=>{e=[...e,new Ft(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Ft.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Ft.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Y_={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],features:Ft.settingsFlags},Gn=De({},Y_),B=()=>{for(let r in Ft.settingsFlags)Gn.features[r]===void 0&&(Gn.features[r]=Ft.settingsFlags[r]);return De({},Gn)},pt=r=>(Gn=De(De({},Gn),r),B());var uo,lo,of=({metadataCache:r,vault:e})=>{uo=r,lo=e},ws=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(lo===void 0||uo===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),uf({originalTask:r,newTasks:e,vault:lo,metadataCache:uo,previousTries:0})}),uf=s=>J(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let _=Math.min(Math.pow(10,i),100);setTimeout(()=>{uf({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},_)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof af.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let d=(yield t.read(o)).split(` +`),{globalFilter:f}=B(),h,g=0;for(let _ of l){if(_.position.start.line_.toFileLineString()),...d.slice(h.position.start.line+1)];yield t.modify(o,m.join(` +`))});var sn=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var Rs=["MO","TU","WE","TH","FR","SA","SU"],_e=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Rs.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Rs[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var le=function(r){return r!=null},it=function(r){return typeof r=="number"},co=function(r){return typeof r=="string"&&Rs.includes(r)},Fe=Array.isArray,ht=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=G(t,e/t.length)),t.slice(0,e)+String(n))}var cf=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Ye=function(r,e){var t=r%e;return t*e<0?t+e:t},Ds=function(r,e){return{div:Math.floor(r/e),mod:Ye(r,e)}},st=function(r){return!le(r)||r.length===0},ye=function(r){return!st(r)},z=function(r,e){return ye(r)&&r.indexOf(e)!==-1};var gr;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;nthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Zt=$_;var Sf=vs(xf(),1),{__extends:on,__assign:Be,__rest:IA,__decorate:FA,__param:UA,__metadata:qA,__awaiter:WA,__generator:LA,__exportStar:YA,__createBinding:$A,__values:jA,__read:BA,__spread:GA,__spreadArrays:HA,__spreadArray:T,__await:zA,__asyncGenerator:KA,__asyncDelegator:VA,__asyncValues:XA,__makeTemplateObject:ZA,__importStar:QA,__importDefault:JA,__classPrivateFieldGet:ek,__classPrivateFieldSet:tk,__classPrivateFieldIn:rk}=Sf.default;var j_=function(r){on(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Zt),po=j_;var B_={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Cr=B_;var Cf=function(r,e){return r.indexOf(e)!==-1},G_=function(r){return r.toString()},H_=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},z_=function(){function r(e,t,n,i){if(t===void 0&&(t=G_),n===void 0&&(n=Cr),i===void 0&&(i=H_),this.text=[],this.language=n||Cr,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,d){return c-d}),a.sort(function(c,d){return d-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(le(this.origOptions.byweekday)){var o=Fe(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(Cf(["dtstart","wkst","freq"],n))return!0;if(!Cf(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[O.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=it(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),Fe(e)||(e=[e]);var a=function(u,l,c){for(var d="",f=0;fe[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Hn(r,e){e===void 0&&(e=Cr);var t={},n=new K_(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=O.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=O.WEEKLY,t.byweekday=[O.MO,O.TU,O.WE,O.TH,O.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=O.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=O.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=O.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=O.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=O.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=O.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[O[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var g=u();if(!g)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(O[g]),n.nextSymbol()}c(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=O.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=o();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(m),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var g=l(),m=u(),_=o();if(g)m?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(O[m].nth(g))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(g),n.accept("day(s)"));else if(m)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(O[m]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[O.MO,O.TU,O.WE,O.TH,O.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var R=n.acceptNumber();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(R[0],10)];n.accept("comma");){if(R=n.acceptNumber(),!R)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(R[0],10))}}else if(_)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(_);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function c(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function d(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var $;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})($||($={}));function zn(r){return r<$.HOURLY}var If=function(r,e){return e===void 0&&(e=Cr),new O(Hn(r,e)||void 0)},un=["count","until","interval","byweekday","bymonthday","bymonth"];Ut.IMPLEMENTED=[];Ut.IMPLEMENTED[$.HOURLY]=un;Ut.IMPLEMENTED[$.MINUTELY]=un;Ut.IMPLEMENTED[$.DAILY]=["byhour"].concat(un);Ut.IMPLEMENTED[$.WEEKLY]=un;Ut.IMPLEMENTED[$.MONTHLY]=un;Ut.IMPLEMENTED[$.YEARLY]=["byweekno","byyearday"].concat(un);var Ff=function(r,e,t,n){return new Ut(r,e,t,n).toString()},Uf=Ut.isFullyConvertible;var ln=function(){function r(e,t,n,i){this.hour=e,this.minute=t,this.second=n,this.millisecond=i||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var qf=function(r){on(e,r);function e(t,n,i,s,a,o,u){var l=r.call(this,s,a,o,u)||this;return l.year=t,l.month=n,l.day=i,l}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return gr.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),i=Ye(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Ds(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),st(i)||z(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Ds(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(st(i)||z(i,this.hour))&&(st(s)||z(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Ds(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(st(i)||z(i,this.hour))&&(st(s)||z(s,this.minute))&&(st(a)||z(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=gr.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>gr.MAXYEAR))return;t=gr.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case $.YEARLY:return this.addYears(s);case $.MONTHLY:return this.addMonths(s);case $.WEEKLY:return this.addWeekly(s,a);case $.DAILY:return this.addDaily(s);case $.HOURLY:return this.addHours(s,n,o);case $.MINUTELY:return this.addMinutes(s,n,o,u);case $.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(ln);function ho(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||ye(e.byweekno)||ye(e.byyearday)||Boolean(e.bymonthday)||ye(e.bymonthday)||le(e.byweekday)||le(e.byeaster)))switch(e.freq){case O.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case O.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case O.WEEKLY:e.byweekday=[C.getWeekday(e.dtstart)];break}if(le(e.bymonth)&&!Fe(e.bymonth)&&(e.bymonth=[e.bymonth]),le(e.byyearday)&&!Fe(e.byyearday)&&it(e.byyearday)&&(e.byyearday=[e.byyearday]),!le(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Fe(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(le(e.byweekno)&&!Fe(e.byweekno)&&(e.byweekno=[e.byweekno]),!le(e.byweekday))e.bynweekday=null;else if(it(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(co(e.byweekday))e.byweekday=[_e.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof _e)!e.byweekday.n||e.freq>O.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;tO.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=ye(a)?a:null,e.bynweekday=ye(o)?o:null}return le(e.byhour)?it(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+Ye(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=Ye(l,7),h=Math.floor(d+f/4),g=0;g0&&m<=h){var _=void 0;m>1?(_=c+(m-1)*7,c!==u&&(_-=7-u)):_=c;for(var R=0;R<7&&(o.wnomask[_]=1,_++,o.wdaymask[_]!==e.wkst);R++);}}if(z(e.byweekno,1)){var _=c+h*7;if(c!==u&&(_-=7-u),_=4?(H=0,fe=de+Ye(A-e.wkst,7)):fe=n-c,w=Math.floor(52+Ye(fe,7)/4)}if(z(e.byweekno,w))for(var _=0;_s)return Qt(r);if(w>=t){var A=ip(w,e);if(!r.accept(A)||o&&(--o,!o))return Qt(r)}}else for(var R=h;Rs)return Qt(r);if(w>=t){var A=ip(w,e);if(!r.accept(A)||o&&(--o,!o))return Qt(r)}}}if(e.interval===0||(u.add(e,m),u.year>C.MAXYEAR))return Qt(r);zn(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function aT(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return ye(n)&&!z(n,r.mmask[e])||ye(i)&&!r.wnomask[e]||ye(s)&&!z(s,r.wdaymask[e])||ye(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!z(r.eastermask,e)||(ye(o)||ye(u))&&!z(o,r.mdaymask[e])&&!z(u,r.nmdaymask[e])||ye(l)&&(e=r.yearlen&&!z(l,e+1-r.yearlen)&&!z(l,-r.nextyearlen+e-r.yearlen))}function ip(r,e){return new Ir(r,e.tzid).rezonedDate()}function Qt(r){return r.getValue()}function oT(r,e,t,n,i){for(var s=!1,a=e;a=O.HOURLY&&ye(i)&&!z(i,e.hour)||n>=O.MINUTELY&&ye(s)&&!z(s,e.minute)||n>=O.SECONDLY&&ye(a)&&!z(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var mt={MO:new _e(0),TU:new _e(1),WE:new _e(2),TH:new _e(3),FR:new _e(4),SA:new _e(5),SU:new _e(6)},Kn={freq:$.YEARLY,dtstart:null,interval:1,wkst:mt.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Yf=Object.keys(Kn),O=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Bf,this.origOptions=ho(e);var n=Wf(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Hn(e,t)},r.fromText=function(e,t){return If(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return As(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new po("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Zt("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!C.isValidDate(e)||!C.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new po("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Zt("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Zt("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!C.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Zt("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Zn(this.origOptions)},r.prototype.toText=function(e,t,n){return Ff(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Uf(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=$.YEARLY,r.MONTHLY=$.MONTHLY,r.WEEKLY=$.WEEKLY,r.DAILY=$.DAILY,r.HOURLY=$.HOURLY,r.MINUTELY=$.MINUTELY,r.SECONDLY=$.SECONDLY,r.MO=mt.MO,r.TU=mt.TU,r.WE=mt.WE,r.TH=mt.TH,r.FR=mt.FR,r.SA=mt.SA,r.SU=mt.SU,r.parseString=Xn,r.optionsToString=Zn,r}();function sp(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(g){g.between(f,h,!0).forEach(function(m){a[Number(m)]=!0})})}i.forEach(function(f){var h=new Ir(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var c=new go(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(f){c.rrule(new O(yo(f,o,u),l))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new O(yo(f,o,u),l))}),a.forEach(function(f){c.exdate(f)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new O(yo(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function ks(r,e){return e===void 0&&(e={}),cT(r,dT(e))}function yo(r,e,t){return Be(Be({},r),{dtstart:e,tzid:t})}function dT(r){var e=[],t=Object.keys(r),n=Object.keys(ap);if(t.forEach(function(i){z(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Be(Be({},ap),r)}function fT(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=cf(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function pT(r){var e=fT(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function hT(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` +`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function mT(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function op(r,e){return mT(e),r.split(",").map(function(t){return C.untilStringToDate(t)})}function up(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne(t,n)*-1}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}static compareByUrgency(e,t){return t.urgency-e.urgency}static compareByStatus(e,t){return e.statust.status?-1:0}static compareByPriority(e,t){return e.priority.localeCompare(t.priority)}static compareByStartDate(e,t){return K.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return K.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return K.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return K.compareByDate(e.doneDate,t.doneDate)}static compareByTag(e,t){if(e.tags.length===0&&t.tags.length===0)return 0;if(e.tags.length===0)return 1;if(t.tags.length===0)return-1;let n=K.tagPropertyInstance-1;return e.tags.length=K.tagPropertyInstance?1:t.tags.length=K.tagPropertyInstance?-1:e.tags.lengtht.tags[n]?1:0}static compareByDate(e,t){return e!==null&&t===null?-1:e===null&&t!==null?1:e!==null&&t!==null?e.isValid()&&!t.isValid()?-1:!e.isValid()&&t.isValid()||e.isAfter(t)?1:e.isBefore(t)?-1:0:0}static compareByPath(e,t){return e.patht.path?1:0}static compareByDescription(e,t){return K.cleanDescription(e.description).localeCompare(K.cleanDescription(t.description))}static cleanDescription(e){let t=B().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)\]/,i=e.match(n);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(n,"")}let s=/^\*\*?([^*]*)\*/,a=e.match(s);a!==null&&(e=a[1]+e.replace(n,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},Ve=K;Ve.tagPropertyInstance=1,Ve.comparators={urgency:K.compareByUrgency,description:K.compareByDescription,priority:K.compareByPriority,start:K.compareByStartDate,scheduled:K.compareByScheduledDate,due:K.compareByDueDate,done:K.compareByDoneDate,path:K.compareByPath,status:K.compareByStatus,tag:K.compareByTag};var Me=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=M.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new M(u);return new Me({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),i=new M(ft(De({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),i)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,i=null,s=null;if(this.referenceDate){if(this.startDate){let a=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(a.asDays()),"days")}if(this.scheduledDate){let a=window.moment.duration(this.scheduledDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(a.asDays()),"days")}if(this.dueDate){let a=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(a.asDays()),"days")}}return{startDate:n,scheduledDate:i,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Ve.compareByDate(this.startDate,e.startDate)!==0||Ve.compareByDate(this.scheduledDate,e.scheduledDate)!==0||Ve.compareByDate(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=Me.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=Me.nextAfterYears(e,n,t,a[1])),Me.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Me.isSkippingTooManyMonths(e,t,s);)t=Me.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Me.isSkippingTooManyYears(e,t,s);)t=Me.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new M(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var er=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/er.milliSecondsPerDay),i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*er.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*er.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*er.startedCoefficient),e.priority){case"1":t+=1*er.priorityCoefficient;break;case"2":t+=.65*er.priorityCoefficient;break;case"3":t+=.325*er.priorityCoefficient;break}return t}},Jt=er;Jt.dueCoefficient=12,Jt.scheduledCoefficient=5,Jt.startedCoefficient=-3,Jt.priorityCoefficient=6,Jt.milliSecondsPerDay=1e3*60*60*24;var st=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=B();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ie(ft(De({},e),{path:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ie(ft(De({},i),{scheduledDateIsInferred:!1}))),i))}};var we={High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},qt="\u{1F501}",Wt="\u{1F6EB}",Lt="\u23F3",Yt="\u{1F4C5}",_o="\u2705",at=class{},D=at;D.dateFormat="YYYY-MM-DD",D.indentationRegex=/^([\s\t>]*)/,D.listMarkerRegex=/[-*]/,D.checkboxRegex=/\[(.)\]/u,D.afterCheckboxRegex=/ *(.*)/u,D.taskRegex=new RegExp(at.indentationRegex.source+at.listMarkerRegex.source+" +"+at.checkboxRegex.source+at.afterCheckboxRegex.source,"u"),D.nonTaskRegex=new RegExp(at.indentationRegex.source+at.listMarkerRegex.source+"? *("+at.checkboxRegex.source+")?"+at.afterCheckboxRegex.source,"u"),D.listItemRegex=new RegExp(at.indentationRegex.source+"("+at.listMarkerRegex.source+")"),D.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,D.priorityRegex=/([⏫🔼🔽])$/u,D.startDateRegex=/🛫 *(\d{4}-\d{2}-\d{2})$/u,D.scheduledDateRegex=/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,D.dueDateRegex=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,D.doneDateRegex=/✅ *(\d{4}-\d{2}-\d{2})$/u,D.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,D.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,D.hashTagsFromEnd=new RegExp(at.hashTags.source+"$");var ie=class{constructor({status:e,description:t,path:n,indentation:i,sectionStart:s,sectionIndex:a,originalStatusCharacter:o,precedingHeader:u,priority:l,startDate:c,scheduledDate:d,dueDate:f,doneDate:h,recurrence:g,blockLink:m,tags:y,originalMarkdown:P,scheduledDateIsInferred:w}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.sectionStart=s,this.sectionIndex=a,this.originalStatusCharacter=o,this.precedingHeader=u,this.tags=y,this.priority=l,this.startDate=c,this.scheduledDate=d,this.dueDate=f,this.doneDate=h,this.recurrence=g,this.blockLink=m,this.originalMarkdown=P,this.scheduledDateIsInferred=w}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s,fallbackDate:a}){let o=e.match(D.taskRegex);if(o===null)return null;let u=o[3].trim(),{globalFilter:l}=B();if(!u.includes(l))return null;let c=u,d=o[1],f=o[2],h;switch(f){case" ":h="Todo";break;default:h="Done"}let g=c.match(D.blockLinkRegex),m=g!==null?g[0]:"";m!==""&&(c=c.replace(D.blockLinkRegex,"").trim());let y,P="3",w=null,N=null,V=!1,le=null,ge=null,ne="",$=null,dt=[],Le="",x=20,E=0;do{y=!1;let A=c.match(D.priorityRegex);if(A!==null){switch(A[1]){case we.Low:P="4";break;case we.Medium:P="2";break;case we.High:P="1";break}c=c.replace(D.priorityRegex,"").trim(),y=!0}let _=c.match(D.doneDateRegex);_!==null&&(ge=window.moment(_[1],D.dateFormat),c=c.replace(D.doneDateRegex,"").trim(),y=!0);let S=c.match(D.dueDateRegex);S!==null&&(le=window.moment(S[1],D.dateFormat),c=c.replace(D.dueDateRegex,"").trim(),y=!0);let k=c.match(D.scheduledDateRegex);k!==null&&(N=window.moment(k[1],D.dateFormat),c=c.replace(D.scheduledDateRegex,"").trim(),y=!0);let I=c.match(D.startDateRegex);I!==null&&(w=window.moment(I[1],D.dateFormat),c=c.replace(D.startDateRegex,"").trim(),y=!0);let te=c.match(D.recurrenceRegex);te!==null&&(ne=te[1].trim(),c=c.replace(D.recurrenceRegex,"").trim(),y=!0);let z=c.match(D.hashTagsFromEnd);if(z!=null){c=c.replace(D.hashTagsFromEnd,"").trim(),y=!0;let oe=z[0].trim();Le=Le.length>0?[oe,Le].join(" "):oe}E++}while(y&&E<=x);ne.length>0&&($=Me.fromText({recurrenceRuleText:ne,startDate:w,scheduledDate:N,dueDate:le})),st.canApplyFallback({startDate:w,scheduledDate:N,dueDate:le})&&a!==null&&(N=a,V=!0),Le.length>0&&(c+=" "+Le);let b=c.match(D.hashTags);return b!==null&&(dt=b.filter(A=>A!==l).map(A=>A.trim())),new ie({status:h,description:c,path:t,indentation:d,sectionStart:n,sectionIndex:i,originalStatusCharacter:f,precedingHeader:s,priority:P,startDate:w,scheduledDate:N,dueDate:le,doneDate:ge,recurrence:$,blockLink:m,tags:dt,originalMarkdown:e,scheduledDateIsInferred:V})}toLi(s){return J(this,arguments,function*({parentUlElement:e,listIndex:t,layoutOptions:n,isFilenameUnique:i}){let a=e.createEl("li");a.addClasses(["task-list-item","plugin-tasks-list-item"]);let o=this.toString(n),{globalFilter:u,removeGlobalFilter:l}=B();l&&(o=o.replace(u,"").trim());let c=a.createSpan();c.addClass("tasks-list-text"),yield fp.MarkdownRenderer.renderMarkdown(o,c,this.path,null);let d=c.querySelector("blockquote"),f=d!=null?d:c,h=f.querySelector("p");if(h!==null){for(;h.firstChild;)f.insertBefore(h.firstChild,h);h.remove()}c.findAll("p").forEach(m=>{m.hasChildNodes()||m.remove()}),c.findAll(".footnotes").forEach(m=>{m.remove()});let g=a.createEl("input");return g.addClass("task-list-item-checkbox"),g.type="checkbox",this.status!=="Todo"&&(g.checked=!0,a.addClass("is-checked")),g.onClickEvent(m=>{m.preventDefault(),m.stopPropagation(),g.disabled=!0;let y=this.toggle();ws({originalTask:this,newTasks:y})}),a.prepend(g),a.setAttr("data-task",this.originalStatusCharacter.trim()),a.setAttr("data-line",t),g.setAttr("data-line",t),n!=null&&n.shortMode&&this.addTooltip({element:c,isFilenameUnique:i}),a})}toString(e){var i;e=e!=null?e:new sn;let t=this.description;if(!e.hidePriority){let s="";this.priority==="1"?s=" "+we.High:this.priority==="2"?s=" "+we.Medium:this.priority==="4"&&(s=" "+we.Low),t+=s}return!e.hideRecurrenceRule&&this.recurrence&&(t+=e.shortMode?" "+qt:` ${qt} ${this.recurrence.toText()}`),!e.hideStartDate&&this.startDate&&(t+=e.shortMode?" "+Wt:` ${Wt} ${this.startDate.format(D.dateFormat)}`),!e.hideScheduledDate&&this.scheduledDate&&!this.scheduledDateIsInferred&&(t+=e.shortMode?" "+Lt:` ${Lt} ${this.scheduledDate.format(D.dateFormat)}`),!e.hideDueDate&&this.dueDate&&(t+=e.shortMode?" "+Yt:` ${Yt} ${this.dueDate.format(D.dateFormat)}`),!e.hideDoneDate&&this.doneDate&&(t+=e.shortMode?" "+_o:` ${_o} ${this.doneDate.format(D.dateFormat)}`),t+=(i=this.blockLink)!=null?i:"",t}toFileLineString(){return`${this.indentation}- [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status==="Todo"?"Done":"Todo",t=null,n=null;if(e!=="Todo"){let{setDoneDate:a}=B();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new ie(ft(De({},this),{status:e,doneDate:t,originalStatusCharacter:e==="Done"?"x":" "})),s=[];if(n!==null){let a=new ie(ft(De(De({},this),n),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=Jt.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["status","description","path","indentation","sectionStart","sectionIndex","originalStatusCharacter","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Ve.compareByDate(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}addTooltip({element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),this.recurrence&&n.createDiv().setText(`${qt} ${this.recurrence.toText()}`),this.startDate&&n.createDiv().setText(ie.toTooltipDate({signifier:Wt,date:this.startDate})),this.scheduledDate&&n.createDiv().setText(ie.toTooltipDate({signifier:Lt,date:this.scheduledDate})),this.dueDate&&n.createDiv().setText(ie.toTooltipDate({signifier:Yt,date:this.dueDate})),this.doneDate&&n.createDiv().setText(ie.toTooltipDate({signifier:_o,date:this.doneDate}));let i=this.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}static toTooltipDate({signifier:e,date:t}){return`${e} ${t.format(D.dateFormat)} (${t.from(window.moment().startOf("day"))})`}escapeRegExp(e){return e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=B(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+this.escapeRegExp(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var Qn=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var br=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Es,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>J(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=B(),t=this.vault.on("create",s=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{let o=new Qn(()=>st.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?st.updateTaskPath(u,s.path,o.value):new ie(ft(De({},u),{path:s.path})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=br.getTasksFromFileContent(a,i,t,e)}ie.tasksListsIdentical(n,s)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}static getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` -`),o=new Qn(()=>st.fromPath(i.path)),u=null,l=0;for(let c of t)if(c.task!==void 0){if((u===null||u.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var gd=require("obsidian");var s_=require("obsidian");function Ur(){}function Eo(r){return r()}function hp(){return Object.create(null)}function qr(r){r.forEach(Eo)}function yp(r){return typeof r=="function"}function gp(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function _p(r){return Object.keys(r).length===0}var Tp=!1;function mT(){Tp=!0}function yT(){Tp=!1}function v(r,e){r.appendChild(e)}function ri(r,e,t){r.insertBefore(e,t||null)}function cn(r){r.parentNode.removeChild(r)}function bp(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function vp(r){return function(e){return e.preventDefault(),r.call(this,e)}}function O(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function _T(r){return Array.from(r.childNodes)}function Ep(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Ot(r,e){r.value=e==null?"":e}function wo(r,e,t){r.classList[t?"add":"remove"](e)}var Fr=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=gT(t.nodeName):this.e=q(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t{let u=s.map(Eo).filter(yp);a?a.push(...u):qr(u),r.$$.on_mount=[]}),o.forEach(vo)}function Rp(r,e){let t=r.$$;t.fragment!==null&&(qr(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function MT(r,e){r.$$.dirty[0]===-1&&(Jn.push(r),vT(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let g=h.length?h[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=g)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](g),c&&MT(r,d)),f}):[],l.update(),c=!0,qr(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){mT();let d=_T(e.target);l.fragment&&l.fragment.l(d),d.forEach(cn)}else l.fragment&&l.fragment.c();e.intro&&RT(r.$$.fragment),DT(r,e.target,e.anchor,e.customElement),yT(),wp()}ei(u)}var OT;typeof HTMLElement=="function"&&(OT=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Eo).filter(yp);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){qr(this.$$.on_disconnect)}$destroy(){Rp(this,1),this.$destroy=Ur}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!_p(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Is=class{$destroy(){Rp(this,1),this.$destroy=Ur}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!_p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ns=vs(Re());var GP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function On(r){for(let[e,t]of Object.entries(GP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function t_(r,e,t){let n=r.slice();return n[28]=e[t].value,n[29]=e[t].label,n[30]=e[t].symbol,n}function HP(r){let e,t=r[30]+"",n;return{c(){e=q("span"),n=$t(t)},m(i,s){ri(i,e,s),v(e,n)},p:Ur,d(i){i&&cn(e)}}}function r_(r){let e,t,n,i,s,a,o,u,l=r[29]+"",c,d,f=r[30]&&r[30].charCodeAt(0)>=256,h,g,m,y,P=f&&HP(r);return{c(){e=q("span"),t=q("input"),a=X(),o=q("label"),u=q("span"),c=$t(l),d=X(),P&&P.c(),g=X(),O(t,"type","radio"),O(t,"id",n="priority-"+r[28]),t.__value=i=r[28],t.value=t.__value,O(t,"accesskey",s=r[8](r[29].charAt(0).toLowerCase())),r[20][0].push(t),O(u,"class","accesskey-first"),O(o,"for",h="priority-"+r[28])},m(w,N){ri(w,e,N),v(e,t),t.checked=t.__value===r[0].priority,v(e,a),v(e,o),v(o,u),v(u,c),v(o,d),P&&P.m(o,null),v(e,g),m||(y=Mt(t,"change",r[19]),m=!0)},p(w,N){N[0]&256&&s!==(s=w[8](w[29].charAt(0).toLowerCase()))&&O(t,"accesskey",s),N[0]&1&&(t.checked=t.__value===w[0].priority),f&&P.p(w,N)},d(w){w&&cn(e),r[20][0].splice(r[20][0].indexOf(t),1),P&&P.d(),m=!1,y()}}}function zP(r){let e,t,n,i,s,a,o,u,l,c,d,f,h,g,m,y,P,w,N,V,le,ge,ne,$,dt,Le,x,E,b,A,_,S,k,I,te,z,oe,de,Ce,ze,tt,Vt,Ie,rt,en,Xt,qd,Dt,ps,Wd,Wn,Ld,Yd,hs,$d,Ln,ms,jd,It,ys,Bd,tn,xr,gs,Gd,yr,_s,Hd,no,Ts=r[0].status+"",io,zd,Yn,so,Kd,bs,Vd,rn,$n,Xd,jn,ao,Zd,nn=r[9],Ke=[];for(let F=0;Ftion',s=X(),a=q("input"),u=X(),l=q("div"),c=q("label"),d=$t("Priority"),h=X();for(let F=0;Fart',qd=X(),Dt=q("input"),Wd=X(),Wn=q("code"),Ld=$t(Wt),Yd=X(),hs=new Fr(!1),$d=X(),Ln=q("div"),ms=q("label"),ms.innerHTML=`Only - future dates:`,jd=X(),It=q("input"),Bd=X(),tn=q("div"),xr=q("div"),gs=q("label"),gs.textContent="Status:",Gd=X(),yr=q("input"),Hd=X(),no=q("code"),io=$t(Ts),zd=X(),Yn=q("div"),so=q("span"),so.textContent="Done on:",Kd=X(),bs=q("code"),Vd=X(),rn=q("div"),$n=q("button"),$n.textContent="Apply",Xd=X(),jn=q("button"),jn.textContent="Cancel",O(i,"for","description"),O(a,"id","description"),O(a,"type","text"),O(a,"class","tasks-modal-description"),O(a,"placeholder","Take out the trash"),O(a,"accesskey",o=r[8]("t")),O(n,"class","tasks-modal-section"),O(c,"for",f="priority-"+r[0].priority),O(l,"class","tasks-modal-section tasks-modal-priorities"),O(y,"for","recurrence"),O(y,"class","accesskey-first"),O(w,"id","description"),O(w,"type","text"),O(w,"placeholder","Try 'every 2 weeks on Thursday'."),O(w,"accesskey",N=r[8]("r")),$.a=null,O(Le,"for","due"),O(Le,"class","accesskey-first"),O(E,"id","due"),O(E,"type","text"),O(E,"placeholder",hd),O(E,"accesskey",b=r[8]("d")),I.a=null,O(z,"for","scheduled"),O(z,"class","accesskey-first"),O(de,"id","scheduled"),O(de,"type","text"),O(de,"placeholder",hd),O(de,"accesskey",Ce=r[8]("s")),rt.a=null,O(Xt,"for","start"),O(Dt,"id","start"),O(Dt,"type","text"),O(Dt,"placeholder",hd),O(Dt,"accesskey",ps=r[8]("a")),hs.a=null,O(ms,"for","forwardOnly"),O(It,"id","forwardOnly"),O(It,"type","checkbox"),O(It,"class","task-list-item-checkbox tasks-modal-checkbox"),O(It,"accesskey",ys=r[8]("f")),O(m,"class","tasks-modal-section tasks-modal-dates"),O(gs,"for","status"),O(yr,"id","status"),O(yr,"type","checkbox"),O(yr,"class","task-list-item-checkbox tasks-modal-checkbox"),yr.checked=_s=r[0].status==="Done",yr.disabled=!0,O(tn,"class","tasks-modal-section tasks-modal-status"),O($n,"type","submit"),O($n,"class","mod-cta"),O(jn,"type","button"),O(rn,"class","tasks-modal-section tasks-modal-buttons"),wo(t,"with-accesskeys",r[1]),O(e,"class","tasks-modal")},m(F,ce){ri(F,e,ce),v(e,t),v(t,n),v(n,i),v(n,s),v(n,a),Ot(a,r[0].description),r[18](a),v(t,u),v(t,l),v(l,c),v(c,d),v(l,h);for(let Ye=0;Yeno ${_} date`;let I=ns.parseDate(S,k,{forwardDate:k!=null});return I!==null?window.moment(I).format("YYYY-MM-DD"):`invalid ${_} date`}Ro(()=>{let{globalFilter:_,provideAccessKeys:S}=B();t(1,y=S);let k=a.getDescriptionWithoutGlobalFilter();(k!=a.description||k.indexOf(_)==-1)&&(m=!0);let I="none";a.priority==="4"?I="low":a.priority==="2"?I="medium":a.priority==="1"&&(I="high"),t(0,l={description:k,status:a.status,priority:I,recurrenceRule:a.recurrence?a.recurrence.toText():"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{u.focus()},10)});let N=_=>{if(_.key&&!_.altKey&&!_.ctrlKey){let S=P.find(k=>k.label.charAt(0).toLowerCase()==_.key);S&&t(0,l.priority=S.value,l)}},V=()=>{o([])},le=()=>{let{globalFilter:_}=B(),S=l.description.trim();m&&(S=_+" "+S);let k=null,I=ns.parseDate(l.startDate,new Date,{forwardDate:l.forwardOnly});I!==null&&(k=window.moment(I));let te=null,z=ns.parseDate(l.scheduledDate,new Date,{forwardDate:l.forwardOnly});z!==null&&(te=window.moment(z));let oe=null,de=ns.parseDate(l.dueDate,new Date,{forwardDate:l.forwardOnly});de!==null&&(oe=window.moment(de));let Ce=null;l.recurrenceRule&&(Ce=Me.fromText({recurrenceRuleText:l.recurrenceRule,startDate:k,scheduledDate:te,dueDate:oe}));let ze;switch(l.priority){case"low":ze="4";break;case"medium":ze="2";break;case"high":ze="1";break;default:ze="3"}let tt=new ie(Object.assign(Object.assign({},a),{description:S,status:l.status,priority:ze,recurrence:Ce,startDate:k,scheduledDate:te,dueDate:oe,doneDate:window.moment(l.doneDate,"YYYY-MM-DD").isValid()?window.moment(l.doneDate,"YYYY-MM-DD"):null}));o([tt])},ge=[[]];function ne(){l.description=this.value,t(0,l)}function $(_){Cs[_?"unshift":"push"](()=>{u=_,t(2,u)})}function dt(){l.priority=this.__value,t(0,l)}function Le(){l.recurrenceRule=this.value,t(0,l)}function x(){l.dueDate=this.value,t(0,l)}function E(){l.scheduledDate=this.value,t(0,l)}function b(){l.startDate=this.value,t(0,l)}function A(){l.forwardOnly=this.checked,t(0,l)}return r.$$set=_=>{"task"in _&&t(13,a=_.task),"onSubmit"in _&&t(14,o=_.onSubmit)},r.$$.update=()=>{if(r.$$.dirty[0]&2){e:t(8,n=_=>y?_:null)}if(r.$$.dirty[0]&1){e:t(0,l.startDate=On(l.startDate),l),t(3,c=w("start",l.startDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.scheduledDate=On(l.scheduledDate),l),t(4,d=w("scheduled",l.scheduledDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.dueDate=On(l.dueDate),l),t(5,f=w("due",l.dueDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&98305){e:l.recurrenceRule?t(6,h=t(16,s=t(15,i=Me.fromText({recurrenceRuleText:l.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText())!==null&&s!==void 0?s:"invalid recurrence rule"):t(6,h="not recurring")}if(r.$$.dirty[0]&1){e:t(7,g=w("done",l.doneDate))}},[l,y,u,c,d,f,h,g,n,P,N,V,le,a,o,i,s,ne,$,dt,ge,Le,x,E,b,A]}var md=class extends Is{constructor(e){super(),Dp(this,e,KP,zP,gp,{task:13,onSubmit:14},null,[-1,-1])}},i_=md;var Pn=class extends s_.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this;new i_({target:t,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:t}=this;t.empty()}};var a_=(r,e,t,n)=>{var d;if(r)return t instanceof gd.MarkdownView;if(!(t instanceof gd.MarkdownView))return;let i=(d=t.file)==null?void 0:d.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=VP({line:o,path:i}),l=f=>{let h=st.removeInferredStatusIfNeeded(u,f).map(g=>g.toFileLineString()).join(` -`);e.setLine(a,h)};new Pn({app:n,task:u,onSubmit:l}).open()},VP=({line:r,path:e})=>{var d;let t=st.fromPath(e),n=ie.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:t});if(n!==null)return n;let i=r.match(D.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ie({status:"Todo",description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(d=i[3])!=null?d:" ",o=a===" "?"Todo":"Done",u=i[4],l=r.match(D.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(D.blockLinkRegex,"")),new ie({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:c,priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var _d=require("obsidian");var o_=(r,e,t)=>{var u;if(r)return t instanceof _d.MarkdownView;if(!(t instanceof _d.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=XP(a,n);e.setLine(s,o),e.setCursor({line:i.line,ch:QP(i.ch,a,o)})},XP=(r,e)=>{let t=r,n=ie.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(n!==null)t=ZP(n);else{let i=r.match(D.taskRegex);if(i!==null){let a=i[2].toLowerCase()===" "?"x":" ";t=r.replace(D.taskRegex,`$1- [${a}] $3`)}else D.listItemRegex.test(r)?t=r.replace(D.listItemRegex,"$1$2 [ ]"):t=r.replace(D.indentationRegex,"$1- ")}return t},ZP=r=>r.toggle().map(n=>n.toFileLineString()).join(` -`),QP=(r,e,t)=>{let n=t.length;if(n<=e.length)return r>=t.length?n:r;let i=13;if(t.match(D.doneDateRegex)&&n-e.length>=i&&(n-=i),n>=2*e.length&&t.search(`.+ -.+`)!==-1)return r+n-e.length;let s=t.search(/[-*]/);return ra_(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:o_})}};var Pa=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Aa=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var c;let{globalFilter:n}=B(),i=e.findAll(".task-list-item").filter(d=>{var g;let f=(g=d.textContent)==null?void 0:g.split(` +`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(O);function lp(r,e){if(!(r instanceof O))throw new TypeError(String(r)+" is not RRule instance");z(e.map(String),String(r))||e.push(r)}function cp(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");z(e.map(Number),Number(r))||(e.push(r),C.sort(e))}function dp(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return C.timeToUntilString(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}var V=class{static by(e,t){let n=[V.compareByUrgency,V.compareByStatus,V.compareByDueDate,V.compareByPriority,V.compareByPath],i=[];for(let{property:s,reverse:a,propertyInstance:o}of e.sorting){let u=V.comparators[s];i.push(a?V.makeReversedComparator(u):u),s==="tag"&&(V.tagPropertyInstance=o)}return t.sort(V.makeCompositeComparator([...i,...n]))}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}static compareByUrgency(e,t){return t.urgency-e.urgency}static compareByStatus(e,t){return e.statust.status?-1:0}static compareByPriority(e,t){return e.priority.localeCompare(t.priority)}static compareByStartDate(e,t){return V.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return V.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return V.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return V.compareByDate(e.doneDate,t.doneDate)}static compareByTag(e,t){if(e.tags.length===0&&t.tags.length===0)return 0;if(e.tags.length===0)return 1;if(t.tags.length===0)return-1;let n=V.tagPropertyInstance-1;return e.tags.length=V.tagPropertyInstance?1:t.tags.length=V.tagPropertyInstance?-1:e.tags.lengtht.tags[n]?1:0}static compareByDate(e,t){return e!==null&&t===null?-1:e===null&&t!==null?1:e!==null&&t!==null?e.isValid()&&!t.isValid()?-1:!e.isValid()&&t.isValid()||e.isAfter(t)?1:e.isBefore(t)?-1:0:0}static compareByPath(e,t){return e.patht.path?1:0}static compareByDescription(e,t){return V.cleanDescription(e.description).localeCompare(V.cleanDescription(t.description))}static cleanDescription(e){let t=B().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)\]/,i=e.match(n);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(n,"")}let s=/^\*\*?([^*]*)\*/,a=e.match(s);a!==null&&(e=a[1]+e.replace(n,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},Ke=V;Ke.tagPropertyInstance=1,Ke.comparators={urgency:V.compareByUrgency,description:V.compareByDescription,priority:V.compareByPriority,start:V.compareByStartDate,scheduled:V.compareByScheduledDate,due:V.compareByDueDate,done:V.compareByDoneDate,path:V.compareByPath,status:V.compareByStatus,tag:V.compareByTag};var Me=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=O.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new O(u);return new Me({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),i=new O(ft(De({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),i)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,i=null,s=null;if(this.referenceDate){if(this.startDate){let a=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(a.asDays()),"days")}if(this.scheduledDate){let a=window.moment.duration(this.scheduledDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(a.asDays()),"days")}if(this.dueDate){let a=window.moment.duration(this.dueDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(a.asDays()),"days")}}return{startDate:n,scheduledDate:i,dueDate:s}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Ke.compareByDate(this.startDate,e.startDate)!==0||Ke.compareByDate(this.scheduledDate,e.scheduledDate)!==0||Ke.compareByDate(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=Me.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=Me.nextAfterYears(e,n,t,a[1])),Me.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Me.isSkippingTooManyMonths(e,t,s);)t=Me.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Me.isSkippingTooManyYears(e,t,s);)t=Me.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new O(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var er=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/er.milliSecondsPerDay),i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*er.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*er.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*er.startedCoefficient),e.priority){case"1":t+=1*er.priorityCoefficient;break;case"2":t+=.65*er.priorityCoefficient;break;case"3":t+=.325*er.priorityCoefficient;break}return t}},Jt=er;Jt.dueCoefficient=12,Jt.scheduledCoefficient=5,Jt.startedCoefficient=-3,Jt.priorityCoefficient=6,Jt.milliSecondsPerDay=1e3*60*60*24;var Ve=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=B();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ne(ft(De({},e),{path:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ne(ft(De({},i),{scheduledDateIsInferred:!1}))),i))}};var we={High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},qt="\u{1F501}",Wt="\u{1F6EB}",Lt="\u23F3",Yt="\u{1F4C5}",_o="\u2705",at=class{},M=at;M.dateFormat="YYYY-MM-DD",M.indentationRegex=/^([\s\t>]*)/,M.listMarkerRegex=/([-*]|[0-9]+\.)/,M.checkboxRegex=/\[(.)\]/u,M.afterCheckboxRegex=/ *(.*)/u,M.taskRegex=new RegExp(at.indentationRegex.source+at.listMarkerRegex.source+" +"+at.checkboxRegex.source+at.afterCheckboxRegex.source,"u"),M.nonTaskRegex=new RegExp(at.indentationRegex.source+at.listMarkerRegex.source+"? *("+at.checkboxRegex.source+")?"+at.afterCheckboxRegex.source,"u"),M.listItemRegex=new RegExp(at.indentationRegex.source+at.listMarkerRegex.source),M.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,M.priorityRegex=/([⏫🔼🔽])$/u,M.startDateRegex=/🛫 *(\d{4}-\d{2}-\d{2})$/u,M.scheduledDateRegex=/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,M.dueDateRegex=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,M.doneDateRegex=/✅ *(\d{4}-\d{2}-\d{2})$/u,M.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,M.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,M.hashTagsFromEnd=new RegExp(at.hashTags.source+"$");var ne=class{constructor({status:e,description:t,path:n,indentation:i,listMarker:s,sectionStart:a,sectionIndex:o,originalStatusCharacter:u,precedingHeader:l,priority:c,startDate:d,scheduledDate:f,dueDate:h,doneDate:g,recurrence:m,blockLink:_,tags:R,originalMarkdown:w,scheduledDateIsInferred:A}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.listMarker=s,this.sectionStart=a,this.sectionIndex=o,this.originalStatusCharacter=u,this.precedingHeader=l,this.tags=R,this.priority=c,this.startDate=d,this.scheduledDate=f,this.dueDate=h,this.doneDate=g,this.recurrence=m,this.blockLink=_,this.originalMarkdown=w,this.scheduledDateIsInferred=A}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s,fallbackDate:a}){let o=e.match(M.taskRegex);if(o===null)return null;let u=o[4].trim(),{globalFilter:l}=B();if(!u.includes(l))return null;let c=u,d=o[1],f=o[2],h=o[3],g;switch(h){case" ":g="Todo";break;default:g="Done"}let m=c.match(M.blockLinkRegex),_=m!==null?m[0]:"";_!==""&&(c=c.replace(M.blockLinkRegex,"").trim());let R,w="3",A=null,H=null,de=!1,fe=null,se=null,Y="",dt=null,tt=[],k="",E=20,b=0;do{R=!1;let y=c.match(M.priorityRegex);if(y!==null){switch(y[1]){case we.Low:w="4";break;case we.Medium:w="2";break;case we.High:w="1";break}c=c.replace(M.priorityRegex,"").trim(),R=!0}let S=c.match(M.doneDateRegex);S!==null&&(se=window.moment(S[1],M.dateFormat),c=c.replace(M.doneDateRegex,"").trim(),R=!0);let N=c.match(M.dueDateRegex);N!==null&&(fe=window.moment(N[1],M.dateFormat),c=c.replace(M.dueDateRegex,"").trim(),R=!0);let I=c.match(M.scheduledDateRegex);I!==null&&(H=window.moment(I[1],M.dateFormat),c=c.replace(M.scheduledDateRegex,"").trim(),R=!0);let te=c.match(M.startDateRegex);te!==null&&(A=window.moment(te[1],M.dateFormat),c=c.replace(M.startDateRegex,"").trim(),R=!0);let K=c.match(M.recurrenceRegex);K!==null&&(Y=K[1].trim(),c=c.replace(M.recurrenceRegex,"").trim(),R=!0);let oe=c.match(M.hashTagsFromEnd);if(oe!=null){c=c.replace(M.hashTagsFromEnd,"").trim(),R=!0;let ue=oe[0].trim();k=k.length>0?[ue,k].join(" "):ue}b++}while(R&&b<=E);Y.length>0&&(dt=Me.fromText({recurrenceRuleText:Y,startDate:A,scheduledDate:H,dueDate:fe})),Ve.canApplyFallback({startDate:A,scheduledDate:H,dueDate:fe})&&a!==null&&(H=a,de=!0),k.length>0&&(c+=" "+k);let x=c.match(M.hashTags);return x!==null&&(tt=x.filter(y=>y!==l).map(y=>y.trim())),new ne({status:g,description:c,path:t,indentation:d,listMarker:f,sectionStart:n,sectionIndex:i,originalStatusCharacter:h,precedingHeader:s,priority:w,startDate:A,scheduledDate:H,dueDate:fe,doneDate:se,recurrence:dt,blockLink:_,tags:tt,originalMarkdown:e,scheduledDateIsInferred:de})}toLi(s){return J(this,arguments,function*({parentUlElement:e,listIndex:t,layoutOptions:n,isFilenameUnique:i}){let a=e.createEl("li");a.addClasses(["task-list-item","plugin-tasks-list-item"]);let o=this.toString(n),{globalFilter:u,removeGlobalFilter:l}=B();l&&(o=o.replace(u,"").trim());let c=a.createSpan();c.addClass("tasks-list-text"),yield fp.MarkdownRenderer.renderMarkdown(o,c,this.path,null);let d=c.querySelector("blockquote"),f=d!=null?d:c,h=f.querySelector("p");if(h!==null){for(;h.firstChild;)f.insertBefore(h.firstChild,h);h.remove()}c.findAll("p").forEach(m=>{m.hasChildNodes()||m.remove()}),c.findAll(".footnotes").forEach(m=>{m.remove()});let g=a.createEl("input");return g.addClass("task-list-item-checkbox"),g.type="checkbox",this.status!=="Todo"&&(g.checked=!0,a.addClass("is-checked")),g.onClickEvent(m=>{m.preventDefault(),m.stopPropagation(),g.disabled=!0;let _=this.toggle();ws({originalTask:this,newTasks:_})}),a.prepend(g),a.setAttr("data-task",this.originalStatusCharacter.trim()),a.setAttr("data-line",t),g.setAttr("data-line",t),n!=null&&n.shortMode&&this.addTooltip({element:c,isFilenameUnique:i}),a})}toString(e){var i;e=e!=null?e:new sn;let t=this.description;if(!e.hidePriority){let s="";this.priority==="1"?s=" "+we.High:this.priority==="2"?s=" "+we.Medium:this.priority==="4"&&(s=" "+we.Low),t+=s}return!e.hideRecurrenceRule&&this.recurrence&&(t+=e.shortMode?" "+qt:` ${qt} ${this.recurrence.toText()}`),!e.hideStartDate&&this.startDate&&(t+=e.shortMode?" "+Wt:` ${Wt} ${this.startDate.format(M.dateFormat)}`),!e.hideScheduledDate&&this.scheduledDate&&!this.scheduledDateIsInferred&&(t+=e.shortMode?" "+Lt:` ${Lt} ${this.scheduledDate.format(M.dateFormat)}`),!e.hideDueDate&&this.dueDate&&(t+=e.shortMode?" "+Yt:` ${Yt} ${this.dueDate.format(M.dateFormat)}`),!e.hideDoneDate&&this.doneDate&&(t+=e.shortMode?" "+_o:` ${_o} ${this.doneDate.format(M.dateFormat)}`),t+=(i=this.blockLink)!=null?i:"",t}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status==="Todo"?"Done":"Todo",t=null,n=null;if(e!=="Todo"){let{setDoneDate:a}=B();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new ne(ft(De({},this),{status:e,doneDate:t,originalStatusCharacter:e==="Done"?"x":" "})),s=[];if(n!==null){let a=new ne(ft(De(De({},this),n),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=Jt.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","sectionStart","sectionIndex","originalStatusCharacter","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=["startDate","scheduledDate","dueDate","doneDate"];for(let s of t){let a=this[s],o=e[s];if(Ke.compareByDate(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}addTooltip({element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),this.recurrence&&n.createDiv().setText(`${qt} ${this.recurrence.toText()}`),this.startDate&&n.createDiv().setText(ne.toTooltipDate({signifier:Wt,date:this.startDate})),this.scheduledDate&&n.createDiv().setText(ne.toTooltipDate({signifier:Lt,date:this.scheduledDate})),this.dueDate&&n.createDiv().setText(ne.toTooltipDate({signifier:Yt,date:this.dueDate})),this.doneDate&&n.createDiv().setText(ne.toTooltipDate({signifier:_o,date:this.doneDate}));let i=this.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}static toTooltipDate({signifier:e,date:t}){return`${e} ${t.format(M.dateFormat)} (${t.from(window.moment().startOf("day"))})`}escapeRegExp(e){return e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=B(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+this.escapeRegExp(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var Qn=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var br=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Es,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>J(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let{useFilenameAsScheduledDate:e}=B(),t=this.vault.on("create",s=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(s)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Ns.TFile&&this.tasksMutex.runExclusive(()=>{let o=new Qn(()=>Ve.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?Ve.updateTaskPath(u,s.path,o.value):new ne(ft(De({},u),{path:s.path})):u),this.notifySubscribers()})});this.vaultEventReferences.push(i)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=br.getTasksFromFileContent(a,i,t,e)}ne.tasksListsIdentical(n,s)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.notifySubscribers())})}static getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(` +`),o=new Qn(()=>Ve.fromPath(i.path)),u=null,l=0;for(let c of t)if(c.task!==void 0){if((u===null||u.position.end.line=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var gd=require("obsidian");var s_=require("obsidian");function Ur(){}function Eo(r){return r()}function hp(){return Object.create(null)}function qr(r){r.forEach(Eo)}function yp(r){return typeof r=="function"}function gp(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function _p(r){return Object.keys(r).length===0}var Tp=!1;function yT(){Tp=!0}function gT(){Tp=!1}function v(r,e){r.appendChild(e)}function ri(r,e,t){r.insertBefore(e,t||null)}function cn(r){r.parentNode.removeChild(r)}function bp(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function vp(r){return function(e){return e.preventDefault(),r.call(this,e)}}function P(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function TT(r){return Array.from(r.childNodes)}function Ep(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Ot(r,e){r.value=e==null?"":e}function wo(r,e,t){r.classList[t?"add":"remove"](e)}var Fr=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=_T(t.nodeName):this.e=q(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t{let u=s.map(Eo).filter(yp);a?a.push(...u):qr(u),r.$$.on_mount=[]}),o.forEach(vo)}function Rp(r,e){let t=r.$$;t.fragment!==null&&(qr(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function OT(r,e){r.$$.dirty[0]===-1&&(Jn.push(r),ET(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let g=h.length?h[0]:f;return l.ctx&&i(l.ctx[d],l.ctx[d]=g)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](g),c&&OT(r,d)),f}):[],l.update(),c=!0,qr(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){yT();let d=TT(e.target);l.fragment&&l.fragment.l(d),d.forEach(cn)}else l.fragment&&l.fragment.c();e.intro&&DT(r.$$.fragment),MT(r,e.target,e.anchor,e.customElement),gT(),wp()}ei(u)}var PT;typeof HTMLElement=="function"&&(PT=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Eo).filter(yp);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){qr(this.$$.on_disconnect)}$destroy(){Rp(this,1),this.$destroy=Ur}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!_p(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Is=class{$destroy(){Rp(this,1),this.$destroy=Ur}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!_p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ns=vs(Re());var HP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function On(r){for(let[e,t]of Object.entries(HP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function t_(r,e,t){let n=r.slice();return n[28]=e[t].value,n[29]=e[t].label,n[30]=e[t].symbol,n}function zP(r){let e,t=r[30]+"",n;return{c(){e=q("span"),n=$t(t)},m(i,s){ri(i,e,s),v(e,n)},p:Ur,d(i){i&&cn(e)}}}function r_(r){let e,t,n,i,s,a,o,u,l=r[29]+"",c,d,f=r[30]&&r[30].charCodeAt(0)>=256,h,g,m,_,R=f&&zP(r);return{c(){e=q("span"),t=q("input"),a=X(),o=q("label"),u=q("span"),c=$t(l),d=X(),R&&R.c(),g=X(),P(t,"type","radio"),P(t,"id",n="priority-"+r[28]),t.__value=i=r[28],t.value=t.__value,P(t,"accesskey",s=r[8](r[29].charAt(0).toLowerCase())),r[20][0].push(t),P(u,"class","accesskey-first"),P(o,"for",h="priority-"+r[28])},m(w,A){ri(w,e,A),v(e,t),t.checked=t.__value===r[0].priority,v(e,a),v(e,o),v(o,u),v(u,c),v(o,d),R&&R.m(o,null),v(e,g),m||(_=Mt(t,"change",r[19]),m=!0)},p(w,A){A[0]&256&&s!==(s=w[8](w[29].charAt(0).toLowerCase()))&&P(t,"accesskey",s),A[0]&1&&(t.checked=t.__value===w[0].priority),f&&R.p(w,A)},d(w){w&&cn(e),r[20][0].splice(r[20][0].indexOf(t),1),R&&R.d(),m=!1,_()}}}function KP(r){let e,t,n,i,s,a,o,u,l,c,d,f,h,g,m,_,R,w,A,H,de,fe,se,Y,dt,tt,k,E,b,x,y,S,N,I,te,K,oe,ue,Ce,He,rt,Vt,Ie,nt,en,Xt,qd,Dt,ps,Wd,Wn,Ld,Yd,hs,$d,Ln,ms,jd,It,ys,Bd,tn,xr,gs,Gd,yr,_s,Hd,no,Ts=r[0].status+"",io,zd,Yn,so,Kd,bs,Vd,rn,$n,Xd,jn,ao,Zd,nn=r[9],ze=[];for(let F=0;Ftion',s=X(),a=q("input"),u=X(),l=q("div"),c=q("label"),d=$t("Priority"),h=X();for(let F=0;Fart',qd=X(),Dt=q("input"),Wd=X(),Wn=q("code"),Ld=$t(Wt),Yd=X(),hs=new Fr(!1),$d=X(),Ln=q("div"),ms=q("label"),ms.innerHTML=`Only + future dates:`,jd=X(),It=q("input"),Bd=X(),tn=q("div"),xr=q("div"),gs=q("label"),gs.textContent="Status:",Gd=X(),yr=q("input"),Hd=X(),no=q("code"),io=$t(Ts),zd=X(),Yn=q("div"),so=q("span"),so.textContent="Done on:",Kd=X(),bs=q("code"),Vd=X(),rn=q("div"),$n=q("button"),$n.textContent="Apply",Xd=X(),jn=q("button"),jn.textContent="Cancel",P(i,"for","description"),P(a,"id","description"),P(a,"type","text"),P(a,"class","tasks-modal-description"),P(a,"placeholder","Take out the trash"),P(a,"accesskey",o=r[8]("t")),P(n,"class","tasks-modal-section"),P(c,"for",f="priority-"+r[0].priority),P(l,"class","tasks-modal-section tasks-modal-priorities"),P(_,"for","recurrence"),P(_,"class","accesskey-first"),P(w,"id","description"),P(w,"type","text"),P(w,"placeholder","Try 'every 2 weeks on Thursday'."),P(w,"accesskey",A=r[8]("r")),Y.a=null,P(tt,"for","due"),P(tt,"class","accesskey-first"),P(E,"id","due"),P(E,"type","text"),P(E,"placeholder",hd),P(E,"accesskey",b=r[8]("d")),I.a=null,P(K,"for","scheduled"),P(K,"class","accesskey-first"),P(ue,"id","scheduled"),P(ue,"type","text"),P(ue,"placeholder",hd),P(ue,"accesskey",Ce=r[8]("s")),nt.a=null,P(Xt,"for","start"),P(Dt,"id","start"),P(Dt,"type","text"),P(Dt,"placeholder",hd),P(Dt,"accesskey",ps=r[8]("a")),hs.a=null,P(ms,"for","forwardOnly"),P(It,"id","forwardOnly"),P(It,"type","checkbox"),P(It,"class","task-list-item-checkbox tasks-modal-checkbox"),P(It,"accesskey",ys=r[8]("f")),P(m,"class","tasks-modal-section tasks-modal-dates"),P(gs,"for","status"),P(yr,"id","status"),P(yr,"type","checkbox"),P(yr,"class","task-list-item-checkbox tasks-modal-checkbox"),yr.checked=_s=r[0].status==="Done",yr.disabled=!0,P(tn,"class","tasks-modal-section tasks-modal-status"),P($n,"type","submit"),P($n,"class","mod-cta"),P(jn,"type","button"),P(rn,"class","tasks-modal-section tasks-modal-buttons"),wo(t,"with-accesskeys",r[1]),P(e,"class","tasks-modal")},m(F,ce){ri(F,e,ce),v(e,t),v(t,n),v(n,i),v(n,s),v(n,a),Ot(a,r[0].description),r[18](a),v(t,u),v(t,l),v(l,c),v(c,d),v(l,h);for(let Le=0;Leno ${y} date`;let I=ns.parseDate(S,N,{forwardDate:N!=null});return I!==null?window.moment(I).format("YYYY-MM-DD"):`invalid ${y} date`}Ro(()=>{let{globalFilter:y,provideAccessKeys:S}=B();t(1,_=S);let N=a.getDescriptionWithoutGlobalFilter();(N!=a.description||N.indexOf(y)==-1)&&(m=!0);let I="none";a.priority==="4"?I="low":a.priority==="2"?I="medium":a.priority==="1"&&(I="high"),t(0,l={description:N,status:a.status,priority:I,recurrenceRule:a.recurrence?a.recurrence.toText():"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{u.focus()},10)});let A=y=>{if(y.key&&!y.altKey&&!y.ctrlKey){let S=R.find(N=>N.label.charAt(0).toLowerCase()==y.key);S&&t(0,l.priority=S.value,l)}},H=()=>{o([])},de=()=>{let{globalFilter:y}=B(),S=l.description.trim();m&&(S=y+" "+S);let N=null,I=ns.parseDate(l.startDate,new Date,{forwardDate:l.forwardOnly});I!==null&&(N=window.moment(I));let te=null,K=ns.parseDate(l.scheduledDate,new Date,{forwardDate:l.forwardOnly});K!==null&&(te=window.moment(K));let oe=null,ue=ns.parseDate(l.dueDate,new Date,{forwardDate:l.forwardOnly});ue!==null&&(oe=window.moment(ue));let Ce=null;l.recurrenceRule&&(Ce=Me.fromText({recurrenceRuleText:l.recurrenceRule,startDate:N,scheduledDate:te,dueDate:oe}));let He;switch(l.priority){case"low":He="4";break;case"medium":He="2";break;case"high":He="1";break;default:He="3"}let rt=new ne(Object.assign(Object.assign({},a),{description:S,status:l.status,priority:He,recurrence:Ce,startDate:N,scheduledDate:te,dueDate:oe,doneDate:window.moment(l.doneDate,"YYYY-MM-DD").isValid()?window.moment(l.doneDate,"YYYY-MM-DD"):null}));o([rt])},fe=[[]];function se(){l.description=this.value,t(0,l)}function Y(y){Cs[y?"unshift":"push"](()=>{u=y,t(2,u)})}function dt(){l.priority=this.__value,t(0,l)}function tt(){l.recurrenceRule=this.value,t(0,l)}function k(){l.dueDate=this.value,t(0,l)}function E(){l.scheduledDate=this.value,t(0,l)}function b(){l.startDate=this.value,t(0,l)}function x(){l.forwardOnly=this.checked,t(0,l)}return r.$$set=y=>{"task"in y&&t(13,a=y.task),"onSubmit"in y&&t(14,o=y.onSubmit)},r.$$.update=()=>{if(r.$$.dirty[0]&2){e:t(8,n=y=>_?y:null)}if(r.$$.dirty[0]&1){e:t(0,l.startDate=On(l.startDate),l),t(3,c=w("start",l.startDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.scheduledDate=On(l.scheduledDate),l),t(4,d=w("scheduled",l.scheduledDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&1){e:t(0,l.dueDate=On(l.dueDate),l),t(5,f=w("due",l.dueDate,l.forwardOnly?new Date:void 0))}if(r.$$.dirty[0]&98305){e:l.recurrenceRule?t(6,h=t(16,s=t(15,i=Me.fromText({recurrenceRuleText:l.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText())!==null&&s!==void 0?s:"invalid recurrence rule"):t(6,h="not recurring")}if(r.$$.dirty[0]&1){e:t(7,g=w("done",l.doneDate))}},[l,_,u,c,d,f,h,g,n,R,A,H,de,a,o,i,s,se,Y,dt,fe,tt,k,E,b,x]}var md=class extends Is{constructor(e){super(),Dp(this,e,VP,KP,gp,{task:13,onSubmit:14},null,[-1,-1])}},i_=md;var Pn=class extends s_.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this;new i_({target:t,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:t}=this;t.empty()}};var a_=({line:r,path:e})=>{var f,h;let t=Ve.fromPath(e),n=ne.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:t});if(n!==null)return n;let i=r.match(M.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ne({status:"Todo",description:"",path:e,indentation:"",listMarker:"-",originalStatusCharacter:" ",priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(h=i[4])!=null?h:" ",u=o===" "?"Todo":"Done",l=i[5],c=r.match(M.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(M.blockLinkRegex,"")),new ne({status:u,description:l,path:e,indentation:s,listMarker:a,originalStatusCharacter:o,blockLink:d,priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var o_=(r,e,t,n)=>{var d;if(r)return t instanceof gd.MarkdownView;if(!(t instanceof gd.MarkdownView))return;let i=(d=t.file)==null?void 0:d.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=a_({line:o,path:i}),l=f=>{let h=Ve.removeInferredStatusIfNeeded(u,f).map(g=>g.toFileLineString()).join(` +`);e.setLine(a,h)};new Pn({app:n,task:u,onSubmit:l}).open()};var _d=require("obsidian");var u_=(r,e,t)=>{var u;if(r)return t instanceof _d.MarkdownView;if(!(t instanceof _d.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=XP(a,n);e.setLine(s,o),e.setCursor({line:i.line,ch:QP(i.ch,a,o)})},XP=(r,e)=>{let t=r,n=ne.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(n!==null)t=ZP(n);else{let i=r.match(M.taskRegex);if(i!==null){let a=i[3].toLowerCase()===" "?"x":" ";t=r.replace(M.taskRegex,`$1- [${a}] $4`)}else M.listItemRegex.test(r)?t=r.replace(M.listItemRegex,"$1$2 [ ]"):t=r.replace(M.indentationRegex,"$1- ")}return t},ZP=r=>r.toggle().map(n=>n.toFileLineString()).join(` +`),QP=(r,e,t)=>{let n=t.length;if(n<=e.length)return r>=t.length?n:r;let i=13;if(t.match(M.doneDateRegex)&&n-e.length>=i&&(n-=i),n>=2*e.length&&t.search(`.+ +.+`)!==-1)return r+n-e.length;let s=t.search(/[-*]/);return ro_(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:u_})}};var Pa=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Aa=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var c;let{globalFilter:n}=B(),i=e.findAll(".task-list-item").filter(d=>{var g;let f=(g=d.textContent)==null?void 0:g.split(` `);if(f===void 0)return!1;let h=null;for(let m=0;mu_.ViewPlugin.fromClass(Td),Td=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. -If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new l_.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ie.fromLine({line:a.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${s} Line: ${a.text}`),o===null)return!1;e.preventDefault();let l=o.toggle().map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var eo=require("obsidian");var An=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Xr=class extends An{constructor(t){super();this.stringToFind=t}matches(t){return Xr.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var kn=class extends An{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new kn(s)}else return null}matches(t){return t.match(this.regex)!==null}};var ye=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new ye("None of",e,"NOT")}static booleanXor(e){return new ye("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let i=0;il_.ViewPlugin.fromClass(Td),Td=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let f=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(f),new c_.Notice(f,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ne.fromLine({line:a.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null,fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${s} Line: ${a.text}`),o===null)return!1;e.preventDefault();let l=o.toggle().map(f=>f.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var eo=require("obsidian");var An=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Xr=class extends An{constructor(t){super();this.stringToFind=t}matches(t){return Xr.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var kn=class extends An{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new kn(s)}else return null}matches(t){return t.match(this.regex)!==null}};var ge=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new ge("None of",e,"NOT")}static booleanXor(e){return new ge("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let i=0;i ${t.asString(" ")} -`}},pe=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new pe(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new pe(e);return n.error=t,n}};var wt=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return pe.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Xr(s);else if(i.includes("regex")&&(a=kn.validateAndConstruct(s),a===null))return pe.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(a===null)return pe.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new Je(e,this.getFilter(a,o),new ye(e));return pe.fromFilter(u)}static stringIncludesCaseInsensitive(e,t){return Xr.stringIncludesCaseInsensitive(e,t)}fieldPattern(){return this.fieldName()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}};var ka=class extends wt{fieldName(){return"description"}value(e){let t=B().globalFilter;return e.description.replace(t,"").trim()}};var d_=vs(Re()),cr=class{static parseDate(e,t=!1){return window.moment(d_.parseDate(e,void 0,{forwardDate:t})).startOf("day")}};var Na=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new pe(e);return e===this._instruction?(t.filter=new Je(e,this._filter,new ye(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Pr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Na(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new pe(e);return t.error=`do not understand filter: ${e}`,t}};var et=class extends Ee{constructor(){super();this.filterInstructions=new Pr,this.filterInstructions.add(`has ${this.fieldName()} date`,t=>this.date(t)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,t=>this.date(t)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,t=>{let n=this.date(t);return n!==null&&!n.isValid()})}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new pe(t),s=Ee.getMatch(this.filterRegExp(),t),a;if(s!==null){let o=cr.parseDate(s[2]);if(!o.isValid())i.error="do not understand "+this.fieldName()+" date";else{let u;s[1]==="before"?(a=c=>{let d=this.date(c);return d?d.isBefore(o):this.filterResultIfFieldMissing()},u=" "+s[1]):s[1]==="after"?(a=c=>{let d=this.date(c);return d?d.isAfter(o):this.filterResultIfFieldMissing()},u=" "+s[1]):(a=c=>{let d=this.date(c);return d?d.isSame(o):this.filterResultIfFieldMissing()},u=" on");let l=et.getExplanationString(this.fieldName(),u,this.filterResultIfFieldMissing(),o);i.filter=new Je(t,a,new ye(l))}}else i.error="do not understand query filter ("+this.fieldName()+" date)";return i}static getExplanationString(t,n,i,s){let a=s.format("YYYY-MM-DD (dddd Do MMMM YYYY)"),o=`${t} date is${n} ${a}`;return i&&(o+=` OR no ${t} date`),o}};var bd=class extends et{filterRegExp(){return bd.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},is=bd;is.doneRegexp=/^done (before|after|on)? ?(.*)/;var vd=class extends et{filterRegExp(){return vd.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},ss=vd;ss.dueRegexp=/^due (before|after|on)? ?(.*)/;var Ar=class extends Ee{constructor(){super(...arguments);this._filters=new Pr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var xa=class extends Ar{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Sa=class extends wt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}};var Ca=class extends wt{fieldName(){return"path"}value(e){return e.path}};var Ed=class extends Ee{createFilterOrErrorMessage(e){let t=new pe(e),n=Ee.getMatch(this.filterRegExp(),e);if(n!==null){let i=n[3],s=null;switch(i){case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break}if(s===null)return t.error="do not understand priority",t;let a=e,o;n[2]==="above"?o=u=>u.priority?u.priority.localeCompare(s)<0:!1:n[2]==="below"?o=u=>u.priority?u.priority.localeCompare(s)>0:!1:(o=u=>u.priority?u.priority===s:!1,a=`${this.fieldName()} is ${i}`),t.filter=new Je(e,o,new ye(a))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Ed.priorityRegexp}},as=Ed;as.priorityRegexp=/^priority (is )?(above|below)? ?(low|none|medium|high)/;var wd=class extends et{filterRegExp(){return wd.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},os=wd;os.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Rd=class extends et{filterRegExp(){return Rd.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},us=Rd;us.startRegexp=/^starts (before|after|on)? ?(.*)/;var Nn=class extends Ee{constructor(){super();this.filterInstructions=new Pr,this.filterInstructions.add(Nn.instructionForFieldPresence,t=>this.dates(t).some(n=>n!==null)),this.filterInstructions.add(Nn.instructionForFieldAbsence,t=>!this.dates(t).some(n=>n!==null))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new pe(t),s=Ee.getMatch(this.filterRegExp(),t);if(s!==null){let a=cr.parseDate(s[2]);if(!a.isValid())i.error="do not understand happens date";else{let o,u;s[1]==="before"?(o=c=>this.dates(c).some(d=>d&&d.isBefore(a)),u=" "+s[1]):s[1]==="after"?(o=c=>this.dates(c).some(d=>d&&d.isAfter(a)),u=" "+s[1]):(o=c=>this.dates(c).some(d=>d&&d.isSame(a)),u=" on");let l=et.getExplanationString("due, start or scheduled",u,!1,a);i.filter=new Je(t,o,new ye(l))}}else i.error="do not understand query filter (happens date)";return i}earliestDate(t){return new Nn().dates(t).sort(Ve.compareByDate)[0]}filterRegExp(){return Nn.happensRegexp}dates(t){return Array.of(t.startDate,t.scheduledDate,t.dueDate)}fieldName(){return"happens"}},dr=Nn;dr.happensRegexp=/^happens (before|after|on)? ?(.*)/,dr.instructionForFieldPresence="has happens date",dr.instructionForFieldAbsence="no happens date";var Ia=class extends Ar{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var Fa=class extends Ar{constructor(){super(),this._filters.add("done",e=>e.status==="Done"),this._filters.add("not done",e=>e.status!=="Done")}fieldName(){return"status"}};var Ua=class extends wt{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}};var qa=class extends Ua{fieldNameSingular(){return"tag"}values(e){return e.tags}};var R_=vs(w_());var $a=class extends Ee{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new pe(t);if(t.length===0)return n.error="empty line",n;let i=this.preprocessExpression(t);try{let s=(0,R_.parse)(i);for(let u of s)if(u.name==="IDENTIFIER"&&u.value){let l=u.value.trim();if(!(l in this.subFields)){let c=ja(l);if(c===null)return n.error=`couldn't parse sub-expression '${l}'`,n;if(c.error)return n.error=`couldn't parse sub-expression '${l}': ${c.error}`,n;c.filter&&(this.subFields[l]=c.filter)}}else if(u.name==="OPERATOR"){if(u.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(u.value))return n.error=`unknown boolean operator '${u.value}'`,n}let a=u=>this.filterTaskWithParsedQuery(u,s),o=this.constructExplanation(s);return n.filter=new Je(t,a,o),n}catch(s){let a=s instanceof Error?s.message:"unknown error type";return n.error=`malformed boolean query -- ${a} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(ye.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(ye.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(ye.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(ye.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i);return n[0]}};var Ba=class extends wt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}};var oA=[()=>new Fa,()=>new Ia,()=>new as,()=>new dr,()=>new us,()=>new os,()=>new ss,()=>new is,()=>new Ca,()=>new ka,()=>new qa,()=>new Sa,()=>new xa,()=>new $a,()=>new Ba];function ja(r){for(let e of oA){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}var Ga=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Ha=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var Ka=class extends Map{},Va=class extends za{},Xa=class{constructor(e,t){this.groups=new Ka;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new Va(t),i=[n];for(let s of e){let a=[];for(let o of i)for(let u of o.values){let l=Nr.getGroupNamesForTask(s.property,u);for(let c of l){let d=o.children.get(c);d===void 0&&(d=new Va([]),o.children.set(c,d),a.push(d)),d.values.push(u)}}i=a}return n}getSortedGroups(){return new Ka([...this.groups.entries()].sort())}};var Za=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` +`}},he=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new he(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new he(e);return n.error=t,n}};var wt=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return he.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,i,s]=t,a=null;if(i.includes("include"))a=new Xr(s);else if(i.includes("regex")&&(a=kn.validateAndConstruct(s),a===null))return he.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(a===null)return he.fromError(e,`do not understand query filter (${this.fieldName()})`);let o=i.match(/not/)!==null,u=new Je(e,this.getFilter(a,o),new ge(e));return he.fromFilter(u)}static stringIncludesCaseInsensitive(e,t){return Xr.stringIncludesCaseInsensitive(e,t)}fieldPattern(){return this.fieldName()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}};var ka=class extends wt{fieldName(){return"description"}value(e){let t=B().globalFilter;return e.description.replace(t,"").trim()}};var f_=vs(Re()),cr=class{static parseDate(e,t=!1){return window.moment(f_.parseDate(e,void 0,{forwardDate:t})).startOf("day")}};var Na=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new he(e);return e===this._instruction?(t.filter=new Je(e,this._filter,new ge(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Pr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Na(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let i=n.createFilterOrErrorMessage(e);if(i.error===void 0)return i}let t=new he(e);return t.error=`do not understand filter: ${e}`,t}};var et=class extends Ee{constructor(){super();this.filterInstructions=new Pr,this.filterInstructions.add(`has ${this.fieldName()} date`,t=>this.date(t)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,t=>this.date(t)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,t=>{let n=this.date(t);return n!==null&&!n.isValid()})}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new he(t),s=Ee.getMatch(this.filterRegExp(),t),a;if(s!==null){let o=cr.parseDate(s[2]);if(!o.isValid())i.error="do not understand "+this.fieldName()+" date";else{let u;s[1]==="before"?(a=c=>{let d=this.date(c);return d?d.isBefore(o):this.filterResultIfFieldMissing()},u=" "+s[1]):s[1]==="after"?(a=c=>{let d=this.date(c);return d?d.isAfter(o):this.filterResultIfFieldMissing()},u=" "+s[1]):(a=c=>{let d=this.date(c);return d?d.isSame(o):this.filterResultIfFieldMissing()},u=" on");let l=et.getExplanationString(this.fieldName(),u,this.filterResultIfFieldMissing(),o);i.filter=new Je(t,a,new ge(l))}}else i.error="do not understand query filter ("+this.fieldName()+" date)";return i}static getExplanationString(t,n,i,s){let a=s.format("YYYY-MM-DD (dddd Do MMMM YYYY)"),o=`${t} date is${n} ${a}`;return i&&(o+=` OR no ${t} date`),o}};var bd=class extends et{filterRegExp(){return bd.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},is=bd;is.doneRegexp=/^done (before|after|on)? ?(.*)/;var vd=class extends et{filterRegExp(){return vd.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},ss=vd;ss.dueRegexp=/^due (before|after|on)? ?(.*)/;var Ar=class extends Ee{constructor(){super(...arguments);this._filters=new Pr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var xa=class extends Ar{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Sa=class extends wt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}};var Ca=class extends wt{fieldName(){return"path"}value(e){return e.path}};var Ed=class extends Ee{createFilterOrErrorMessage(e){let t=new he(e),n=Ee.getMatch(this.filterRegExp(),e);if(n!==null){let i=n[5],s=null;switch(i){case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break}if(s===null)return t.error="do not understand priority",t;let a=e,o;switch(n[3]){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}t.filter=new Je(e,o,new ge(a))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Ed.priorityRegexp}},as=Ed;as.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var wd=class extends et{filterRegExp(){return wd.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},os=wd;os.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Rd=class extends et{filterRegExp(){return Rd.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},us=Rd;us.startRegexp=/^starts (before|after|on)? ?(.*)/;var Nn=class extends Ee{constructor(){super();this.filterInstructions=new Pr,this.filterInstructions.add(Nn.instructionForFieldPresence,t=>this.dates(t).some(n=>n!==null)),this.filterInstructions.add(Nn.instructionForFieldAbsence,t=>!this.dates(t).some(n=>n!==null))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let i=new he(t),s=Ee.getMatch(this.filterRegExp(),t);if(s!==null){let a=cr.parseDate(s[2]);if(!a.isValid())i.error="do not understand happens date";else{let o,u;s[1]==="before"?(o=c=>this.dates(c).some(d=>d&&d.isBefore(a)),u=" "+s[1]):s[1]==="after"?(o=c=>this.dates(c).some(d=>d&&d.isAfter(a)),u=" "+s[1]):(o=c=>this.dates(c).some(d=>d&&d.isSame(a)),u=" on");let l=et.getExplanationString("due, start or scheduled",u,!1,a);i.filter=new Je(t,o,new ge(l))}}else i.error="do not understand query filter (happens date)";return i}earliestDate(t){return new Nn().dates(t).sort(Ke.compareByDate)[0]}filterRegExp(){return Nn.happensRegexp}dates(t){return Array.of(t.startDate,t.scheduledDate,t.dueDate)}fieldName(){return"happens"}},dr=Nn;dr.happensRegexp=/^happens (before|after|on)? ?(.*)/,dr.instructionForFieldPresence="has happens date",dr.instructionForFieldAbsence="no happens date";var Ia=class extends Ar{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var Fa=class extends Ar{constructor(){super(),this._filters.add("done",e=>e.status==="Done"),this._filters.add("not done",e=>e.status!=="Done")}fieldName(){return"status"}};var Ua=class extends wt{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}};var qa=class extends Ua{fieldNameSingular(){return"tag"}values(e){return e.tags}};var D_=vs(R_());var $a=class extends Ee{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new he(t);if(t.length===0)return n.error="empty line",n;let i=this.preprocessExpression(t);try{let s=(0,D_.parse)(i);for(let u of s)if(u.name==="IDENTIFIER"&&u.value){let l=u.value.trim();if(!(l in this.subFields)){let c=ja(l);if(c===null)return n.error=`couldn't parse sub-expression '${l}'`,n;if(c.error)return n.error=`couldn't parse sub-expression '${l}': ${c.error}`,n;c.filter&&(this.subFields[l]=c.filter)}}else if(u.name==="OPERATOR"){if(u.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(u.value))return n.error=`unknown boolean operator '${u.value}'`,n}let a=u=>this.filterTaskWithParsedQuery(u,s),o=this.constructExplanation(s);return n.filter=new Je(t,a,o),n}catch(s){let a=s instanceof Error?s.message:"unknown error type";return n.error=`malformed boolean query -- ${a} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let i=o=>o==="true",s=o=>o?"true":"false",a=[];for(let o of n)if(o.name==="IDENTIFIER"){if(o.value==null)throw Error("null token value");let l=this.subFields[o.value.trim()].filterFunction(t);a.push(s(l))}else if(o.name==="OPERATOR")if(o.value==="NOT"){let u=i(a.pop());a.push(s(!u))}else if(o.value==="OR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u||l))}else if(o.value==="AND"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&l))}else if(o.value==="XOR"){let u=i(a.pop()),l=i(a.pop());a.push(s(u&&!l||!u&&l))}else throw Error("Unsupported operator: "+o.value);else throw Error("Unsupported token type: "+o);return i(a[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(ge.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(ge.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(ge.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(ge.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i);return n[0]}};var Ba=class extends wt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}};var oA=[()=>new Fa,()=>new Ia,()=>new as,()=>new dr,()=>new us,()=>new os,()=>new ss,()=>new is,()=>new Ca,()=>new ka,()=>new qa,()=>new Sa,()=>new xa,()=>new $a,()=>new Ba];function ja(r){for(let e of oA){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}var Ga=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Ha=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;it.set(o,a)),e.pop();return t}};var Ka=class extends Map{},Va=class extends za{},Xa=class{constructor(e,t){this.groups=new Ka;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new Va(t),i=[n];for(let s of e){let a=[];for(let o of i)for(let u of o.values){let l=Nr.getGroupNamesForTask(s.property,u);for(let c of l){let d=o.children.get(c);d===void 0&&(d=new Va([]),o.children.set(c,d),a.push(d)),d.values.push(u)}}i=a}return n}getSortedGroups(){return new Ka([...this.groups.entries()].sort())}};var Za=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+` `;return e}toString(){let e=` `;e+=`Group names: [${this.groups}] `;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} ${t.name} @@ -159,5 +159,5 @@ ${this.totalTasksCount()} tasks `),e+=this.filters[i].explainFilterIndented("");return this._limit!==void 0&&(e+=` At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`. -`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(n=>{e=e.filter(n.filterFunction)});let t=Ve.by(this,e).slice(0,this.limit);return Nr.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=ja(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=e.match(this.sortByRegexp);t!==null?this._sorting.push({property:t[1],reverse:!!t[2],propertyInstance:isNaN(+t[3])?1:+t[3]}):this._error="do not understand query sorting"}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var Ja=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return J(this,null,function*(){n.addChild(new Fd({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Fd=class extends eo.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=new Un({source:s}),this.queryType="tasks";break;default:this.query=new Un({source:s}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Un({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return J(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(s);let o=this.query.applyQueryToTasks(t);for(let l of o.groups){this.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug(`${u} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(s,u)}else this.query.error!==void 0?s.setText(`Tasks query: ${this.query.error}`):s.setText("Loading Tasks ...");(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}createExplanation(t){let n=this.query.explainQuery(),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return J(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=n.createEl("ul");a.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let o=0;oh.remove());let f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(c,u),this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,u,f,l),this.query.layoutOptions.hideEditButton||this.addEditButton(c,u),a.appendChild(c)}return{taskList:a,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{ws({originalTask:n,newTasks:st.removeInferredStatusIfNeeded(n,u)})};new Pn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return J(this,null,function*(){let i;n.nestingLevel===0?i=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?i=t.createEl("h5",{cls:"tasks-group-heading"}):i=t.createEl("h6",{cls:"tasks-group-heading"}),yield eo.MarkdownRenderer.renderMarkdown(n.name,i,this.filePath,this)})}addBacklinks(t,n,i,s){var l;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");if(o.href=n.path,o.setAttribute("data-href",n.path),o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode"),n.precedingHeader!==null){let c=n.precedingHeader.replace(/#/g,"");o.href=o.href+"#"+c,o.setAttribute("data-href",o.getAttribute("data-href")+"#"+c)}let u;i?u=" \u{1F517}":u=(l=n.getLinkText({isFilenameUnique:s}))!=null?l:"",o.setText(u),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}};var Rt=require("obsidian");var qn=class extends Rt.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.plugin=t}display(){let{containerEl:t}=this;t.empty(),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new Rt.Setting(t).setName("Global task filter").setDesc(qn.createFragmentWithHTML('

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

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

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

See the documentation.

')).addText(n=>{let i=B();n.setPlaceholder("e.g. #task or TODO").setValue(i.globalFilter).onChange(s=>J(this,null,function*(){pt({globalFilter:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(n=>{let i=B();n.setValue(i.removeGlobalFilter).onChange(s=>J(this,null,function*(){pt({removeGlobalFilter:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Date Settings"}),new Rt.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(n=>{let i=B();n.setValue(i.setDoneDate).onChange(s=>J(this,null,function*(){pt({setDoneDate:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(qn.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(n=>{let i=B();n.setValue(i.useFilenameAsScheduledDate).onChange(s=>J(this,null,function*(){pt({useFilenameAsScheduledDate:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(n=>J(this,null,function*(){let i=B();yield this.plugin.saveSettings(),n.setValue(qn.renderFolderArray(i.filenameAsDateFolders)).onChange(s=>J(this,null,function*(){let a=qn.parseCommaSeparatedFolders(s);pt({filenameAsDateFolders:a}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Rt.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(n=>{let i=B();n.setValue(i.autoSuggestInEditor).onChange(s=>J(this,null,function*(){pt({autoSuggestInEditor:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(n=>{let i=B();n.setLimits(0,3,1).setValue(i.autoSuggestMinMatch).setDynamicTooltip().onChange(s=>J(this,null,function*(){pt({autoSuggestMinMatch:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(n=>{let i=B();n.setLimits(3,12,1).setValue(i.autoSuggestMaxItems).setDynamicTooltip().onChange(s=>J(this,null,function*(){pt({autoSuggestMaxItems:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Rt.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(n=>{let i=B();n.setValue(i.provideAccessKeys).onChange(s=>J(this,null,function*(){pt({provideAccessKeys:s}),yield this.plugin.saveSettings()}))})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}},fs=qn;fs.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);var M_=require("obsidian");var uA=`${Wt}${Lt}${Yt}`;function D_(r,e,t){let n=[];n=n.concat(dA(r,e,t)),n=n.concat(fA(r,e,t));let i=cA(r,t),s=Ud(r,/([a-zA-Z'_-]*)/g,e),a=!1;if(s&&s.length>0){let o=s[0];if(o.length>=Math.max(1,t.autoSuggestMinMatch)){let u=i.filter(l=>l.displayText.toLowerCase().includes(o.toLowerCase()));for(let l of u)n.push({suggestionType:"match",displayText:l.displayText,appendText:l.appendText,insertAt:s.index,insertSkip:o.length}),a=!0}}return!a&&t.autoSuggestMinMatch===0&&(n=n.concat(i)),n.length>0&&!n.some(o=>o.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`}),n=n.slice(0,t.autoSuggestMaxItems),n}function lA(r){if(Object.values(we).some(e=>e.length>0&&r.includes(e)))return!0}function cA(r,e){let t=[];return r.includes(Yt)||t.push({displayText:`${Yt} due date`,appendText:`${Yt} `}),r.includes(Wt)||t.push({displayText:`${Wt} start date`,appendText:`${Wt} `}),r.includes(Lt)||t.push({displayText:`${Lt} scheduled date`,appendText:`${Lt} `}),lA(r)||(t.push({displayText:`${we.High} high priority`,appendText:`${we.High} `}),t.push({displayText:`${we.Medium} medium priority`,appendText:`${we.Medium} `}),t.push({displayText:`${we.Low} low priority`,appendText:`${we.Low} `})),r.includes(qt)||t.push({displayText:`${qt} recurring (repeat)`,appendText:`${qt} `}),t}function dA(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`([${uA}])\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ud(r,s,e);if(a&&a.length>=2){let o=a[1],u=a[2];if(u.length1?cr.parseDate(On(u),!0):null;l&&l.isValid()&&i.push({displayText:`${l.format(D.dateFormat)}`,appendText:`${o} ${l.format(D.dateFormat)} `,insertAt:a.index,insertSkip:a[0].length});let c=1,d=5,f=n.filter(h=>u&&u.length>=c&&h.toLowerCase().includes(u.toLowerCase())).slice(0,d);f.length===0&&(f=n.slice(0,d));for(let h of f){let m=`${cr.parseDate(h,!0).format(D.dateFormat)}`;i.push({suggestionType:"match",displayText:`${h} (${m})`,appendText:`${o} ${m} `,insertAt:a.index,insertSkip:a[0].length})}}return i}function fA(r,e,t){var o;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],s=new RegExp(`(${qt})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ud(r,s,e);if(a&&a.length>=2){let u=a[1],l=a[2];if(l.length0){let h=(o=Me.fromText({recurrenceRuleText:l,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:o.toText();if(h){let g=`${u} ${h} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${h}`,appendText:g,insertAt:a.index,insertSkip:a[0].length}),a[0]==g)return[]}}let c=1,d=t.autoSuggestMaxItems/2,f=n.filter(h=>l&&l.length>=c&&h.toLowerCase().includes(l.toLowerCase())).slice(0,d);f.length===0&&l.trim().length===0&&(f=n.slice(0,d));for(let h of f)i.push({suggestionType:"match",displayText:`${h}`,appendText:`${u} ${h} `,insertAt:a.index,insertSkip:a[0].length})}return i}function Ud(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i;return[]}var to=class extends M_.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return s.contains(this.settings.globalFilter)&&s.match(D.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){let n=t.query,i=t.editor.getCursor(),s=D_(n,i.ch,this.settings),a=[];for(let o of s)a.push(ft(De({},o),{context:t}));return a}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(d);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var ro=class extends O_.Plugin{onload(){return J(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new fs({plugin:this})),of({metadataCache:this.app.metadataCache,vault:this.app.vault});let t=new Pa({obsidianEvents:this.app.workspace});this.cache=new br({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Aa({plugin:this}),this.queryRenderer=new Ja({plugin:this,events:t}),this.registerEditorExtension(c_()),this.registerEditorSuggest(new to(this.app,B())),new Oa({plugin:this})})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();pt(t)})}saveSettings(){return J(this,null,function*(){yield this.saveData(B())})}}; +`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(n=>{e=e.filter(n.filterFunction)});let t=Ke.by(this,e).slice(0,this.limit);return Nr.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=ja(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=e.match(this.sortByRegexp);t!==null?this._sorting.push({property:t[1],reverse:!!t[2],propertyInstance:isNaN(+t[3])?1:+t[3]}):this._error="do not understand query sorting"}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var Ja=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return J(this,null,function*(){n.addChild(new Fd({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Fd=class extends eo.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=new Un({source:s}),this.queryType="tasks";break;default:this.query=new Un({source:s}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Un({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return J(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(s);let o=this.query.applyQueryToTasks(t);for(let l of o.groups){this.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug(`${u} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(s,u)}else this.query.error!==void 0?s.setText(`Tasks query: ${this.query.error}`):s.setText("Loading Tasks ...");(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}createExplanation(t){let n=this.query.explainQuery(),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTasksList(i){return J(this,arguments,function*({tasks:t,content:n}){let s=t.length,a=n.createEl("ul");a.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let o=0;oh.remove());let f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideUrgency||this.addUrgency(c,u),this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,u,f,l),this.query.layoutOptions.hideEditButton||this.addEditButton(c,u),a.appendChild(c)}return{taskList:a,tasksCount:s}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>{ws({originalTask:n,newTasks:Ve.removeInferredStatusIfNeeded(n,u)})};new Pn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let i of n)this.addGroupHeading(t,i)}addGroupHeading(t,n){return J(this,null,function*(){let i;n.nestingLevel===0?i=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?i=t.createEl("h5",{cls:"tasks-group-heading"}):i=t.createEl("h6",{cls:"tasks-group-heading"}),yield eo.MarkdownRenderer.renderMarkdown(n.name,i,this.filePath,this)})}addBacklinks(t,n,i,s){var l;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");if(o.href=n.path,o.setAttribute("data-href",n.path),o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode"),n.precedingHeader!==null){let c=n.precedingHeader.replace(/#/g,"");o.href=o.href+"#"+c,o.setAttribute("data-href",o.getAttribute("data-href")+"#"+c)}let u;i?u=" \u{1F517}":u=(l=n.getLinkText({isFilenameUnique:s}))!=null?l:"",o.setText(u),i||a.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}};var Rt=require("obsidian");var qn=class extends Rt.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.plugin=t}display(){let{containerEl:t}=this;t.empty(),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new Rt.Setting(t).setName("Global task filter").setDesc(qn.createFragmentWithHTML('

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

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

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

See the documentation.

')).addText(n=>{let i=B();n.setPlaceholder("e.g. #task or TODO").setValue(i.globalFilter).onChange(s=>J(this,null,function*(){pt({globalFilter:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(n=>{let i=B();n.setValue(i.removeGlobalFilter).onChange(s=>J(this,null,function*(){pt({removeGlobalFilter:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Date Settings"}),new Rt.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(n=>{let i=B();n.setValue(i.setDoneDate).onChange(s=>J(this,null,function*(){pt({setDoneDate:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(qn.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
The date in the file name must be in one of YYYY-MM-DD or YYYYMMDD formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(n=>{let i=B();n.setValue(i.useFilenameAsScheduledDate).onChange(s=>J(this,null,function*(){pt({useFilenameAsScheduledDate:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(n=>J(this,null,function*(){let i=B();yield this.plugin.saveSettings(),n.setValue(qn.renderFolderArray(i.filenameAsDateFolders)).onChange(s=>J(this,null,function*(){let a=qn.parseCommaSeparatedFolders(s);pt({filenameAsDateFolders:a}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Rt.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(n=>{let i=B();n.setValue(i.autoSuggestInEditor).onChange(s=>J(this,null,function*(){pt({autoSuggestInEditor:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(n=>{let i=B();n.setLimits(0,3,1).setValue(i.autoSuggestMinMatch).setDynamicTooltip().onChange(s=>J(this,null,function*(){pt({autoSuggestMinMatch:s}),yield this.plugin.saveSettings()}))}),new Rt.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(n=>{let i=B();n.setLimits(3,12,1).setValue(i.autoSuggestMaxItems).setDynamicTooltip().onChange(s=>J(this,null,function*(){pt({autoSuggestMaxItems:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Rt.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(n=>{let i=B();n.setValue(i.provideAccessKeys).onChange(s=>J(this,null,function*(){pt({provideAccessKeys:s}),yield this.plugin.saveSettings()}))})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}},fs=qn;fs.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);var O_=require("obsidian");var uA=`${Wt}${Lt}${Yt}`;function M_(r,e,t){let n=[];n=n.concat(dA(r,e,t)),n=n.concat(fA(r,e,t));let i=cA(r,t),s=Ud(r,/([a-zA-Z'_-]*)/g,e),a=!1;if(s&&s.length>0){let o=s[0];if(o.length>=Math.max(1,t.autoSuggestMinMatch)){let u=i.filter(l=>l.displayText.toLowerCase().includes(o.toLowerCase()));for(let l of u)n.push({suggestionType:"match",displayText:l.displayText,appendText:l.appendText,insertAt:s.index,insertSkip:o.length}),a=!0}}return!a&&t.autoSuggestMinMatch===0&&(n=n.concat(i)),n.length>0&&!n.some(o=>o.suggestionType==="match")&&n.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`}),n=n.slice(0,t.autoSuggestMaxItems),n}function lA(r){if(Object.values(we).some(e=>e.length>0&&r.includes(e)))return!0}function cA(r,e){let t=[];return r.includes(Yt)||t.push({displayText:`${Yt} due date`,appendText:`${Yt} `}),r.includes(Wt)||t.push({displayText:`${Wt} start date`,appendText:`${Wt} `}),r.includes(Lt)||t.push({displayText:`${Lt} scheduled date`,appendText:`${Lt} `}),lA(r)||(t.push({displayText:`${we.High} high priority`,appendText:`${we.High} `}),t.push({displayText:`${we.Medium} medium priority`,appendText:`${we.Medium} `}),t.push({displayText:`${we.Low} low priority`,appendText:`${we.Low} `})),r.includes(qt)||t.push({displayText:`${qt} recurring (repeat)`,appendText:`${qt} `}),t}function dA(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`([${uA}])\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ud(r,s,e);if(a&&a.length>=2){let o=a[1],u=a[2];if(u.length1?cr.parseDate(On(u),!0):null;l&&l.isValid()&&i.push({displayText:`${l.format(M.dateFormat)}`,appendText:`${o} ${l.format(M.dateFormat)} `,insertAt:a.index,insertSkip:a[0].length});let c=1,d=5,f=n.filter(h=>u&&u.length>=c&&h.toLowerCase().includes(u.toLowerCase())).slice(0,d);f.length===0&&(f=n.slice(0,d));for(let h of f){let m=`${cr.parseDate(h,!0).format(M.dateFormat)}`;i.push({suggestionType:"match",displayText:`${h} (${m})`,appendText:`${o} ${m} `,insertAt:a.index,insertSkip:a[0].length})}}return i}function fA(r,e,t){var o;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],s=new RegExp(`(${qt})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ud(r,s,e);if(a&&a.length>=2){let u=a[1],l=a[2];if(l.length0){let h=(o=Me.fromText({recurrenceRuleText:l,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:o.toText();if(h){let g=`${u} ${h} `;if(i.push({suggestionType:"match",displayText:`\u2705 ${h}`,appendText:g,insertAt:a.index,insertSkip:a[0].length}),a[0]==g)return[]}}let c=1,d=t.autoSuggestMaxItems/2,f=n.filter(h=>l&&l.length>=c&&h.toLowerCase().includes(l.toLowerCase())).slice(0,d);f.length===0&&l.trim().length===0&&(f=n.slice(0,d));for(let h of f)i.push({suggestionType:"match",displayText:`${h}`,appendText:`${u} ${h} `,insertAt:a.index,insertSkip:a[0].length})}return i}function Ud(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i;return[]}var to=class extends O_.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return s.contains(this.settings.globalFilter)&&s.match(M.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){let n=t.query,i=t.editor.getCursor(),s=M_(n,i.ch,this.settings),a=[];for(let o of s)a.push(ft(De({},o),{context:t}));return a}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(d);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var ro=class extends P_.Plugin{onload(){return J(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new fs({plugin:this})),of({metadataCache:this.app.metadataCache,vault:this.app.vault});let t=new Pa({obsidianEvents:this.app.workspace});this.cache=new br({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Aa({plugin:this}),this.queryRenderer=new Ja({plugin:this,events:t}),this.registerEditorExtension(d_()),this.registerEditorSuggest(new to(this.app,B())),new Oa({plugin:this})})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();pt(t)})}saveSettings(){return J(this,null,function*(){yield this.saveData(B())})}}; diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index a91af23..689b891 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,10 +1 @@ -{ - "id": "obsidian-tasks-plugin", - "name": "Tasks", - "version": "1.19.0", - "minAppVersion": "0.14.6", - "description": "Task management for Obsidian", - "author": "Martin Schenck and Clare Macrae", - "authorUrl": "https://github.com/obsidian-tasks-group", - "isDesktopOnly": false -} +{"id":"obsidian-tasks-plugin","name":"Tasks","version":"1.20.0","minAppVersion":"0.14.6","description":"Task management for Obsidian","author":"Martin Schenck and Clare Macrae","authorUrl":"https://github.com/obsidian-tasks-group","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/omnisearch/main.js b/.obsidian/plugins/omnisearch/main.js index c284d76..de642b2 100644 --- a/.obsidian/plugins/omnisearch/main.js +++ b/.obsidian/plugins/omnisearch/main.js @@ -3,53 +3,50 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var KJ=Object.create;var xQ=Object.defineProperty,gJ=Object.defineProperties,PJ=Object.getOwnPropertyDescriptor,qJ=Object.getOwnPropertyDescriptors,_J=Object.getOwnPropertyNames,zB=Object.getOwnPropertySymbols,AJ=Object.getPrototypeOf,FV=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable;var cd=(F,U,Q)=>U in F?xQ(F,U,{enumerable:!0,configurable:!0,writable:!0,value:Q}):F[U]=Q,z=(F,U)=>{for(var Q in U||(U={}))FV.call(U,Q)&&cd(F,Q,U[Q]);if(zB)for(var Q of zB(U))hd.call(U,Q)&&cd(F,Q,U[Q]);return F},q=(F,U)=>gJ(F,qJ(U)),rd=F=>xQ(F,"__esModule",{value:!0});var Cd=(F,U)=>{var Q={};for(var B in F)FV.call(F,B)&&U.indexOf(B)<0&&(Q[B]=F[B]);if(F!=null&&zB)for(var B of zB(F))U.indexOf(B)<0&&hd.call(F,B)&&(Q[B]=F[B]);return Q};var $J=(F,U)=>()=>(U||F((U={exports:{}}).exports,U),U.exports),UW=(F,U)=>{rd(F);for(var Q in U)xQ(F,Q,{get:U[Q],enumerable:!0})},FW=(F,U,Q)=>{if(U&&typeof U=="object"||typeof U=="function")for(let B of _J(U))!FV.call(F,B)&&B!=="default"&&xQ(F,B,{get:()=>U[B],enumerable:!(Q=PJ(U,B))||Q.enumerable});return F},XU=F=>FW(rd(xQ(F!=null?KJ(AJ(F)):{},"default",F&&F.__esModule&&"default"in F?{get:()=>F.default,enumerable:!0}:{value:F,enumerable:!0})),F);var Gl=$J((eB,V0)=>{(function(F,U){if(typeof eB=="object"&&typeof V0=="object")V0.exports=U();else if(typeof define=="function"&&define.amd)define([],U);else{var Q=U();for(var B in Q)(typeof eB=="object"?eB:F)[B]=Q[B]}})(typeof self!="undefined"?self:eB,function(){return function(F){var U={};function Q(B){if(U[B])return U[B].exports;var R=U[B]={i:B,l:!1,exports:{}};return F[B].call(R.exports,R,R.exports,Q),R.l=!0,R.exports}return Q.m=F,Q.c=U,Q.d=function(B,R,V){Q.o(B,R)||Object.defineProperty(B,R,{enumerable:!0,get:V})},Q.r=function(B){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},Q.t=function(B,R){if(1&R&&(B=Q(B)),8&R||4&R&&typeof B=="object"&&B&&B.__esModule)return B;var V=Object.create(null);if(Q.r(V),Object.defineProperty(V,"default",{enumerable:!0,value:B}),2&R&&typeof B!="string")for(var d in B)Q.d(V,d,function(l){return B[l]}.bind(null,d));return V},Q.n=function(B){var R=B&&B.__esModule?function(){return B.default}:function(){return B};return Q.d(R,"a",R),R},Q.o=function(B,R){return Object.prototype.hasOwnProperty.call(B,R)},Q.p="",Q(Q.s=0)}([function(F,U,Q){"use strict";Q.r(U),Q.d(U,"md5",function(){return c});var B="0123456789abcdef".split(""),R=function(h){for(var N="",k=0;k<4;k++)N+=B[h>>8*k+4&15]+B[h>>8*k&15];return N},V=function(h){for(var N=h.length,k=0;k>>32-D,p)}(N=function(C,D,p,o){return D=d(d(D,C),d(p,o))}(h,N,t,a),S,k)},n=function(h,N,k,t,S,a,T,C){return l(k&t|~k&S,N,k,a,T,C,h)},J=function(h,N,k,t,S,a,T,C){return l(k&S|t&~S,N,k,a,T,C,h)},W=function(h,N,k,t,S,a,T,C){return l(k^t^S,N,k,a,T,C,h)},E=function(h,N,k,t,S,a,T,C){return l(t^(k|~S),N,k,a,T,C,h)},Z=function(h,N,k){k===void 0&&(k=d);var t=h[0],S=h[1],a=h[2],T=h[3],C=n.bind(null,k);t=C(t,S,a,T,N[0],7,-680876936),T=C(T,t,S,a,N[1],12,-389564586),a=C(a,T,t,S,N[2],17,606105819),S=C(S,a,T,t,N[3],22,-1044525330),t=C(t,S,a,T,N[4],7,-176418897),T=C(T,t,S,a,N[5],12,1200080426),a=C(a,T,t,S,N[6],17,-1473231341),S=C(S,a,T,t,N[7],22,-45705983),t=C(t,S,a,T,N[8],7,1770035416),T=C(T,t,S,a,N[9],12,-1958414417),a=C(a,T,t,S,N[10],17,-42063),S=C(S,a,T,t,N[11],22,-1990404162),t=C(t,S,a,T,N[12],7,1804603682),T=C(T,t,S,a,N[13],12,-40341101),a=C(a,T,t,S,N[14],17,-1502002290),S=C(S,a,T,t,N[15],22,1236535329);var D=J.bind(null,k);t=D(t,S,a,T,N[1],5,-165796510),T=D(T,t,S,a,N[6],9,-1069501632),a=D(a,T,t,S,N[11],14,643717713),S=D(S,a,T,t,N[0],20,-373897302),t=D(t,S,a,T,N[5],5,-701558691),T=D(T,t,S,a,N[10],9,38016083),a=D(a,T,t,S,N[15],14,-660478335),S=D(S,a,T,t,N[4],20,-405537848),t=D(t,S,a,T,N[9],5,568446438),T=D(T,t,S,a,N[14],9,-1019803690),a=D(a,T,t,S,N[3],14,-187363961),S=D(S,a,T,t,N[8],20,1163531501),t=D(t,S,a,T,N[13],5,-1444681467),T=D(T,t,S,a,N[2],9,-51403784),a=D(a,T,t,S,N[7],14,1735328473),S=D(S,a,T,t,N[12],20,-1926607734);var p=W.bind(null,k);t=p(t,S,a,T,N[5],4,-378558),T=p(T,t,S,a,N[8],11,-2022574463),a=p(a,T,t,S,N[11],16,1839030562),S=p(S,a,T,t,N[14],23,-35309556),t=p(t,S,a,T,N[1],4,-1530992060),T=p(T,t,S,a,N[4],11,1272893353),a=p(a,T,t,S,N[7],16,-155497632),S=p(S,a,T,t,N[10],23,-1094730640),t=p(t,S,a,T,N[13],4,681279174),T=p(T,t,S,a,N[0],11,-358537222),a=p(a,T,t,S,N[3],16,-722521979),S=p(S,a,T,t,N[6],23,76029189),t=p(t,S,a,T,N[9],4,-640364487),T=p(T,t,S,a,N[12],11,-421815835),a=p(a,T,t,S,N[15],16,530742520),S=p(S,a,T,t,N[2],23,-995338651);var o=E.bind(null,k);t=o(t,S,a,T,N[0],6,-198630844),T=o(T,t,S,a,N[7],10,1126891415),a=o(a,T,t,S,N[14],15,-1416354905),S=o(S,a,T,t,N[5],21,-57434055),t=o(t,S,a,T,N[12],6,1700485571),T=o(T,t,S,a,N[3],10,-1894986606),a=o(a,T,t,S,N[10],15,-1051523),S=o(S,a,T,t,N[1],21,-2054922799),t=o(t,S,a,T,N[8],6,1873313359),T=o(T,t,S,a,N[15],10,-30611744),a=o(a,T,t,S,N[6],15,-1560198380),S=o(S,a,T,t,N[13],21,1309151649),t=o(t,S,a,T,N[4],6,-145523070),T=o(T,t,S,a,N[11],10,-1120210379),a=o(a,T,t,S,N[2],15,718787259),S=o(S,a,T,t,N[9],21,-343485551),h[0]=k(t,h[0]),h[1]=k(S,h[1]),h[2]=k(a,h[2]),h[3]=k(T,h[3])},e=function(h){for(var N=[],k=0;k<64;k+=4)N[k>>2]=h.charCodeAt(k)+(h.charCodeAt(k+1)<<8)+(h.charCodeAt(k+2)<<16)+(h.charCodeAt(k+3)<<24);return N},r=function(h,N){var k,t=h.length,S=[1732584193,-271733879,-1732584194,271733878];for(k=64;k<=t;k+=64)Z(S,e(h.substring(k-64,k)),N);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=(h=h.substring(k-64)).length;for(k=0;k>2]|=h.charCodeAt(k)<<(k%4<<3);if(a[k>>2]|=128<<(k%4<<3),k>55)for(Z(S,a,N),k=16;k--;)a[k]=0;return a[14]=8*t,Z(S,a,N),S};function c(h){var N;return V(r("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(N=function(k,t){var S=(65535&k)+(65535&t);return(k>>16)+(t>>16)+(S>>16)<<16|65535&S}),V(r(h,N))}}])})});UW(exports,{default:()=>Td});var uF=XU(require("obsidian"));var fJ=XU(require("obsidian"));function tU(){}function QW(F,U){for(let Q in U)F[Q]=U[Q];return F}function QV(F){return F()}function Dd(){return Object.create(null)}function gU(F){F.forEach(QV)}function wQ(F){return typeof F=="function"}function rU(F,U){return F!=F?U==U:F!==U||F&&typeof F=="object"||typeof F=="function"}var uB;function BV(F,U){return uB||(uB=document.createElement("a")),uB.href=U,F===uB.href}function pd(F){return Object.keys(F).length===0}function md(F,...U){if(F==null)return tU;let Q=F.subscribe(...U);return Q.unsubscribe?()=>Q.unsubscribe():Q}function xB(F,U,Q){F.$$.on_destroy.push(md(U,Q))}function NQ(F,U,Q,B){if(F){let R=Md(F,U,Q,B);return F[0](R)}}function Md(F,U,Q,B){return F[1]&&B?QW(Q.ctx.slice(),F[1](B(U))):Q.ctx}function EQ(F,U,Q,B){if(F[2]&&B){let R=F[2](B(Q));if(U.dirty===void 0)return R;if(typeof R=="object"){let V=[],d=Math.max(U.dirty.length,R.length);for(let l=0;l32){let U=[],Q=F.ctx.length/32;for(let B=0;BF.removeEventListener(U,Q,B)}function P(F,U,Q){Q==null?F.removeAttribute(U):F.getAttribute(U)!==Q&&F.setAttribute(U,Q)}function VW(F){return Array.from(F.childNodes)}function jQ(F,U){U=""+U,F.wholeText!==U&&(F.data=U)}function RV(F,U){F.value=U??""}function UF(F,U,Q,B){Q===null?F.style.removeProperty(U):F.style.setProperty(U,Q,B?"important":"")}function VV(F,U,Q){F.classList[Q?"add":"remove"](U)}function dW(F,U,{bubbles:Q=!1,cancelable:B=!1}={}){let R=document.createEvent("CustomEvent");return R.initCustomEvent(F,Q,B,U),R}var IQ;function fQ(F){IQ=F}function dV(){if(!IQ)throw new Error("Function called outside component initialization");return IQ}function KQ(F){dV().$$.on_mount.push(F)}function gQ(F){dV().$$.on_destroy.push(F)}function lV(){let F=dV();return(U,Q,{cancelable:B=!1}={})=>{let R=F.$$.callbacks[U];if(R){let V=dW(U,Q,{cancelable:B});return R.slice().forEach(d=>{d.call(F,V)}),!V.defaultPrevented}return!0}}function FF(F,U){let Q=F.$$.callbacks[U.type];Q&&Q.slice().forEach(B=>B.call(this,U))}var PQ=[];var LB=[],jB=[],id=[],sd=Promise.resolve(),nV=!1;function Yd(){nV||(nV=!0,sd.then(yd))}function lF(){return Yd(),sd}function JV(F){jB.push(F)}var WV=new Set,IB=0;function yd(){let F=IQ;do{for(;IB{fB.delete(F),B&&(Q&&F.d(1),B())}),F.o(U)}else B&&B()}var PE=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function OU(F){F&&F.c()}function YU(F,U,Q,B){let{fragment:R,after_update:V}=F.$$;R&&R.m(U,Q),B||JV(()=>{let d=F.$$.on_mount.map(QV).filter(wQ);F.$$.on_destroy?F.$$.on_destroy.push(...d):gU(d),F.$$.on_mount=[]}),V.forEach(JV)}function pU(F,U){let Q=F.$$;Q.fragment!==null&&(gU(Q.on_destroy),Q.fragment&&Q.fragment.d(U),Q.on_destroy=Q.fragment=null,Q.ctx=[])}function nW(F,U){F.$$.dirty[0]===-1&&(PQ.push(F),Yd(),F.$$.dirty.fill(0)),F.$$.dirty[U/31|0]|=1<{let r=e.length?e[0]:Z;return J.ctx&&R(J.ctx[E],J.ctx[E]=r)&&(!J.skip_bound&&J.bound[E]&&J.bound[E](r),W&&nW(F,E)),Z}):[],J.update(),W=!0,gU(J.before_update),J.fragment=B?B(J.ctx):!1,U.target){if(U.hydrate){BW();let E=VW(U.target);J.fragment&&J.fragment.l(E),E.forEach(A)}else J.fragment&&J.fragment.c();U.intro&&BU(F.$$.fragment),YU(F,U.target,U.anchor,U.customElement),RW(),yd()}fQ(n)}var JW;typeof HTMLElement=="function"&&(JW=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:F}=this.$$;this.$$.on_disconnect=F.map(QV).filter(wQ);for(let U in this.$$.slotted)this.appendChild(this.$$.slotted[U])}attributeChangedCallback(F,U,Q){this[F]=Q}disconnectedCallback(){gU(this.$$.on_disconnect)}$destroy(){pU(this,1),this.$destroy=tU}$on(F,U){if(!wQ(U))return tU;let Q=this.$$.callbacks[F]||(this.$$.callbacks[F]=[]);return Q.push(U),()=>{let B=Q.indexOf(U);B!==-1&&Q.splice(B,1)}}$set(F){this.$$set&&!pd(F)&&(this.$$.skip_bound=!0,this.$$set(F),this.$$.skip_bound=!1)}});var CU=class{$destroy(){pU(this,1),this.$destroy=tU}$on(U,Q){if(!wQ(Q))return tU;let B=this.$$.callbacks[U]||(this.$$.callbacks[U]=[]);return B.push(Q),()=>{let R=B.indexOf(Q);R!==-1&&B.splice(R,1)}}$set(U){this.$$set&&!pd(U)&&(this.$$.skip_bound=!0,this.$$set(U),this.$$.skip_bound=!1)}};var zF=XU(require("obsidian"));var nJ=XU(require("obsidian"));var ZV=class{constructor(){this.handlers=new Map;this.disabled=[]}on(U,Q,B){if(U.includes("@")||Q.includes("@"))throw new Error("Invalid context/event name - Cannot contain @");this.handlers.set(`${U}@${Q}`,B)}off(U,Q){if(Q)this.handlers.delete(`${U}@${Q}`);else for(let[B]of this.handlers.entries())B.startsWith(`${U}@`)&&this.handlers.delete(B)}disable(U){this.enable(U),this.disabled.push(U)}enable(U){this.disabled=this.disabled.filter(Q=>Q!==U)}emit(U,...Q){let B=[...this.handlers.entries()].filter(([R,V])=>!this.disabled.includes(R.split("@")[0]));for(let[R,V]of B)R.endsWith(`@${U}`)&&V(...Q)}};var eQ=[];function KB(F,U=tU){let Q,B=new Set;function R(l){if(rU(F,l)&&(F=l,Q)){let n=!eQ.length;for(let J of B)J[1](),eQ.push(J,F);if(n){for(let J=0;J{B.delete(J),B.size===0&&(Q(),Q=null)}}return{set:R,update:V,subscribe:d}}var QU=XU(require("obsidian"));var nU=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,SU=Object.keys,MU=Array.isArray;typeof Promise!="undefined"&&!nU.Promise&&(nU.Promise=Promise);function yU(F,U){return typeof U!="object"||SU(U).forEach(function(Q){F[Q]=U[Q]}),F}var qQ=Object.getPrototypeOf,WW={}.hasOwnProperty;function wU(F,U){return WW.call(F,U)}function kQ(F,U){typeof U=="function"&&(U=U(qQ(F))),(typeof Reflect=="undefined"?SU:Reflect.ownKeys)(U).forEach(Q=>{nF(F,Q,U[Q])})}var vd=Object.defineProperty;function nF(F,U,Q,B){vd(F,U,yU(Q&&wU(Q,"get")&&typeof Q.get=="function"?{get:Q.get,set:Q.set,configurable:!0}:{value:Q,configurable:!0,writable:!0},B))}function aQ(F){return{from:function(U){return F.prototype=Object.create(U.prototype),nF(F.prototype,"constructor",F),{extend:kQ.bind(null,F.prototype)}}}}var ZW=Object.getOwnPropertyDescriptor;function NV(F,U){let Q=ZW(F,U),B;return Q||(B=qQ(F))&&NV(B,U)}var NW=[].slice;function gB(F,U,Q){return NW.call(F,U,Q)}function Gd(F,U){return U(F)}function _Q(F){if(!F)throw new Error("Assertion Failed")}function bd(F){nU.setImmediate?setImmediate(F):setTimeout(F,0)}function Xd(F,U){return F.reduce((Q,B,R)=>{var V=U(B,R);return V&&(Q[V[0]]=V[1]),Q},{})}function EW(F,U,Q){try{F.apply(null,Q)}catch(B){U&&U(B)}}function JF(F,U){if(wU(F,U))return F[U];if(!U)return F;if(typeof U!="string"){for(var Q=[],B=0,R=U.length;B["Int","Uint","Float"].map(U=>U+F+"Array")))).filter(F=>nU[F]),eW=zd.map(F=>nU[F]);Xd(zd,F=>[F,!0]);var DF=null;function AQ(F){DF=typeof WeakMap!="undefined"&&new WeakMap;let U=EV(F);return DF=null,U}function EV(F){if(!F||typeof F!="object")return F;let U=DF&&DF.get(F);if(U)return U;if(MU(F)){U=[],DF&&DF.set(F,U);for(var Q=0,B=F.length;Q=0)U=F;else{let V=qQ(F);U=V===Object.prototype?{}:Object.create(V),DF&&DF.set(F,U);for(var R in F)wU(F,R)&&(U[R]=EV(F[R]))}return U}var{toString:kW}={};function tV(F){return kW.call(F).slice(8,-1)}var SV=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",aW=typeof SV=="symbol"?function(F){var U;return F!=null&&(U=F[SV])&&U.apply(F)}:function(){return null},TQ={};function WF(F){var U,Q,B,R;if(arguments.length===1){if(MU(F))return F.slice();if(this===TQ&&typeof F=="string")return[F];if(R=aW(F)){for(Q=[];B=R.next(),!B.done;)Q.push(B.value);return Q}if(F==null)return[F];if(U=F.length,typeof U=="number"){for(Q=new Array(U);U--;)Q[U]=F[U];return Q}return[F]}for(U=arguments.length,Q=new Array(U);U--;)Q[U]=arguments[U];return Q}var eV=typeof Symbol!="undefined"?F=>F[Symbol.toStringTag]==="AsyncFunction":()=>!1,QF=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ud(F,U){QF=F,xd=U}var xd=()=>!0,TW=!new Error("").stack;function IF(){if(TW)try{throw IF.arguments,new Error}catch(F){return F}return new Error}function kV(F,U){var Q=F.stack;return Q?(U=U||0,Q.indexOf(F.name)===0&&(U+=(F.name+F.message).split(` +var gJ=Object.create;var wQ=Object.defineProperty,PJ=Object.defineProperties,_J=Object.getOwnPropertyDescriptor,qJ=Object.getOwnPropertyDescriptors,AJ=Object.getOwnPropertyNames,HB=Object.getOwnPropertySymbols,$J=Object.getPrototypeOf,FV=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable;var cd=(F,U,Q)=>U in F?wQ(F,U,{enumerable:!0,configurable:!0,writable:!0,value:Q}):F[U]=Q,z=(F,U)=>{for(var Q in U||(U={}))FV.call(U,Q)&&cd(F,Q,U[Q]);if(HB)for(var Q of HB(U))hd.call(U,Q)&&cd(F,Q,U[Q]);return F},_=(F,U)=>PJ(F,qJ(U)),rd=F=>wQ(F,"__esModule",{value:!0});var Cd=(F,U)=>{var Q={};for(var B in F)FV.call(F,B)&&U.indexOf(B)<0&&(Q[B]=F[B]);if(F!=null&&HB)for(var B of HB(F))U.indexOf(B)<0&&hd.call(F,B)&&(Q[B]=F[B]);return Q};var UW=(F,U)=>()=>(U||F((U={exports:{}}).exports,U),U.exports),FW=(F,U)=>{rd(F);for(var Q in U)wQ(F,Q,{get:U[Q],enumerable:!0})},QW=(F,U,Q)=>{if(U&&typeof U=="object"||typeof U=="function")for(let B of AJ(U))!FV.call(F,B)&&B!=="default"&&wQ(F,B,{get:()=>U[B],enumerable:!(Q=_J(U,B))||Q.enumerable});return F},XU=F=>QW(rd(wQ(F!=null?gJ($J(F)):{},"default",F&&F.__esModule&&"default"in F?{get:()=>F.default,enumerable:!0}:{value:F,enumerable:!0})),F);var bl=UW((SB,V0)=>{(function(F,U){if(typeof SB=="object"&&typeof V0=="object")V0.exports=U();else if(typeof define=="function"&&define.amd)define([],U);else{var Q=U();for(var B in Q)(typeof SB=="object"?SB:F)[B]=Q[B]}})(typeof self!="undefined"?self:SB,function(){return function(F){var U={};function Q(B){if(U[B])return U[B].exports;var R=U[B]={i:B,l:!1,exports:{}};return F[B].call(R.exports,R,R.exports,Q),R.l=!0,R.exports}return Q.m=F,Q.c=U,Q.d=function(B,R,V){Q.o(B,R)||Object.defineProperty(B,R,{enumerable:!0,get:V})},Q.r=function(B){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},Q.t=function(B,R){if(1&R&&(B=Q(B)),8&R||4&R&&typeof B=="object"&&B&&B.__esModule)return B;var V=Object.create(null);if(Q.r(V),Object.defineProperty(V,"default",{enumerable:!0,value:B}),2&R&&typeof B!="string")for(var d in B)Q.d(V,d,function(l){return B[l]}.bind(null,d));return V},Q.n=function(B){var R=B&&B.__esModule?function(){return B.default}:function(){return B};return Q.d(R,"a",R),R},Q.o=function(B,R){return Object.prototype.hasOwnProperty.call(B,R)},Q.p="",Q(Q.s=0)}([function(F,U,Q){"use strict";Q.r(U),Q.d(U,"md5",function(){return c});var B="0123456789abcdef".split(""),R=function(h){for(var N="",k=0;k<4;k++)N+=B[h>>8*k+4&15]+B[h>>8*k&15];return N},V=function(h){for(var N=h.length,k=0;k>>32-D,p)}(N=function(C,D,p,o){return D=d(d(D,C),d(p,o))}(h,N,t,a),S,k)},n=function(h,N,k,t,S,a,T,C){return l(k&t|~k&S,N,k,a,T,C,h)},J=function(h,N,k,t,S,a,T,C){return l(k&S|t&~S,N,k,a,T,C,h)},W=function(h,N,k,t,S,a,T,C){return l(k^t^S,N,k,a,T,C,h)},E=function(h,N,k,t,S,a,T,C){return l(t^(k|~S),N,k,a,T,C,h)},Z=function(h,N,k){k===void 0&&(k=d);var t=h[0],S=h[1],a=h[2],T=h[3],C=n.bind(null,k);t=C(t,S,a,T,N[0],7,-680876936),T=C(T,t,S,a,N[1],12,-389564586),a=C(a,T,t,S,N[2],17,606105819),S=C(S,a,T,t,N[3],22,-1044525330),t=C(t,S,a,T,N[4],7,-176418897),T=C(T,t,S,a,N[5],12,1200080426),a=C(a,T,t,S,N[6],17,-1473231341),S=C(S,a,T,t,N[7],22,-45705983),t=C(t,S,a,T,N[8],7,1770035416),T=C(T,t,S,a,N[9],12,-1958414417),a=C(a,T,t,S,N[10],17,-42063),S=C(S,a,T,t,N[11],22,-1990404162),t=C(t,S,a,T,N[12],7,1804603682),T=C(T,t,S,a,N[13],12,-40341101),a=C(a,T,t,S,N[14],17,-1502002290),S=C(S,a,T,t,N[15],22,1236535329);var D=J.bind(null,k);t=D(t,S,a,T,N[1],5,-165796510),T=D(T,t,S,a,N[6],9,-1069501632),a=D(a,T,t,S,N[11],14,643717713),S=D(S,a,T,t,N[0],20,-373897302),t=D(t,S,a,T,N[5],5,-701558691),T=D(T,t,S,a,N[10],9,38016083),a=D(a,T,t,S,N[15],14,-660478335),S=D(S,a,T,t,N[4],20,-405537848),t=D(t,S,a,T,N[9],5,568446438),T=D(T,t,S,a,N[14],9,-1019803690),a=D(a,T,t,S,N[3],14,-187363961),S=D(S,a,T,t,N[8],20,1163531501),t=D(t,S,a,T,N[13],5,-1444681467),T=D(T,t,S,a,N[2],9,-51403784),a=D(a,T,t,S,N[7],14,1735328473),S=D(S,a,T,t,N[12],20,-1926607734);var p=W.bind(null,k);t=p(t,S,a,T,N[5],4,-378558),T=p(T,t,S,a,N[8],11,-2022574463),a=p(a,T,t,S,N[11],16,1839030562),S=p(S,a,T,t,N[14],23,-35309556),t=p(t,S,a,T,N[1],4,-1530992060),T=p(T,t,S,a,N[4],11,1272893353),a=p(a,T,t,S,N[7],16,-155497632),S=p(S,a,T,t,N[10],23,-1094730640),t=p(t,S,a,T,N[13],4,681279174),T=p(T,t,S,a,N[0],11,-358537222),a=p(a,T,t,S,N[3],16,-722521979),S=p(S,a,T,t,N[6],23,76029189),t=p(t,S,a,T,N[9],4,-640364487),T=p(T,t,S,a,N[12],11,-421815835),a=p(a,T,t,S,N[15],16,530742520),S=p(S,a,T,t,N[2],23,-995338651);var o=E.bind(null,k);t=o(t,S,a,T,N[0],6,-198630844),T=o(T,t,S,a,N[7],10,1126891415),a=o(a,T,t,S,N[14],15,-1416354905),S=o(S,a,T,t,N[5],21,-57434055),t=o(t,S,a,T,N[12],6,1700485571),T=o(T,t,S,a,N[3],10,-1894986606),a=o(a,T,t,S,N[10],15,-1051523),S=o(S,a,T,t,N[1],21,-2054922799),t=o(t,S,a,T,N[8],6,1873313359),T=o(T,t,S,a,N[15],10,-30611744),a=o(a,T,t,S,N[6],15,-1560198380),S=o(S,a,T,t,N[13],21,1309151649),t=o(t,S,a,T,N[4],6,-145523070),T=o(T,t,S,a,N[11],10,-1120210379),a=o(a,T,t,S,N[2],15,718787259),S=o(S,a,T,t,N[9],21,-343485551),h[0]=k(t,h[0]),h[1]=k(S,h[1]),h[2]=k(a,h[2]),h[3]=k(T,h[3])},e=function(h){for(var N=[],k=0;k<64;k+=4)N[k>>2]=h.charCodeAt(k)+(h.charCodeAt(k+1)<<8)+(h.charCodeAt(k+2)<<16)+(h.charCodeAt(k+3)<<24);return N},r=function(h,N){var k,t=h.length,S=[1732584193,-271733879,-1732584194,271733878];for(k=64;k<=t;k+=64)Z(S,e(h.substring(k-64,k)),N);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=(h=h.substring(k-64)).length;for(k=0;k>2]|=h.charCodeAt(k)<<(k%4<<3);if(a[k>>2]|=128<<(k%4<<3),k>55)for(Z(S,a,N),k=16;k--;)a[k]=0;return a[14]=8*t,Z(S,a,N),S};function c(h){var N;return V(r("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(N=function(k,t){var S=(65535&k)+(65535&t);return(k>>16)+(t>>16)+(S>>16)<<16|65535&S}),V(r(h,N))}}])})});FW(exports,{default:()=>Td});var DF=XU(require("obsidian"));var KJ=XU(require("obsidian"));function tU(){}function BW(F,U){for(let Q in U)F[Q]=U[Q];return F}function QV(F){return F()}function Dd(){return Object.create(null)}function gU(F){F.forEach(QV)}function NQ(F){return typeof F=="function"}function rU(F,U){return F!=F?U==U:F!==U||F&&typeof F=="object"||typeof F=="function"}var zB;function BV(F,U){return zB||(zB=document.createElement("a")),zB.href=U,F===zB.href}function pd(F){return Object.keys(F).length===0}function md(F,...U){if(F==null)return tU;let Q=F.subscribe(...U);return Q.unsubscribe?()=>Q.unsubscribe():Q}function uB(F,U,Q){F.$$.on_destroy.push(md(U,Q))}function EQ(F,U,Q,B){if(F){let R=Md(F,U,Q,B);return F[0](R)}}function Md(F,U,Q,B){return F[1]&&B?BW(Q.ctx.slice(),F[1](B(U))):Q.ctx}function tQ(F,U,Q,B){if(F[2]&&B){let R=F[2](B(Q));if(U.dirty===void 0)return R;if(typeof R=="object"){let V=[],d=Math.max(U.dirty.length,R.length);for(let l=0;l32){let U=[],Q=F.ctx.length/32;for(let B=0;BF.removeEventListener(U,Q,B)}function P(F,U,Q){Q==null?F.removeAttribute(U):F.getAttribute(U)!==Q&&F.setAttribute(U,Q)}function dW(F){return Array.from(F.childNodes)}function jQ(F,U){U=""+U,F.wholeText!==U&&(F.data=U)}function RV(F,U){F.value=U??""}function UF(F,U,Q,B){Q===null?F.style.removeProperty(U):F.style.setProperty(U,Q,B?"important":"")}function VV(F,U,Q){F.classList[Q?"add":"remove"](U)}function lW(F,U,{bubbles:Q=!1,cancelable:B=!1}={}){let R=document.createEvent("CustomEvent");return R.initCustomEvent(F,Q,B,U),R}var IQ;function fQ(F){IQ=F}function dV(){if(!IQ)throw new Error("Function called outside component initialization");return IQ}function KQ(F){dV().$$.on_mount.push(F)}function gQ(F){dV().$$.on_destroy.push(F)}function lV(){let F=dV();return(U,Q,{cancelable:B=!1}={})=>{let R=F.$$.callbacks[U];if(R){let V=lW(U,Q,{cancelable:B});return R.slice().forEach(d=>{d.call(F,V)}),!V.defaultPrevented}return!0}}function FF(F,U){let Q=F.$$.callbacks[U.type];Q&&Q.slice().forEach(B=>B.call(this,U))}var PQ=[];var wB=[],LB=[],sd=[],Yd=Promise.resolve(),nV=!1;function yd(){nV||(nV=!0,Yd.then(vd))}function lF(){return yd(),Yd}function JV(F){LB.push(F)}var WV=new Set,jB=0;function vd(){let F=IQ;do{for(;jB{IB.delete(F),B&&(Q&&F.d(1),B())}),F.o(U)}else B&&B()}var _E=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function OU(F){F&&F.c()}function YU(F,U,Q,B){let{fragment:R,after_update:V}=F.$$;R&&R.m(U,Q),B||JV(()=>{let d=F.$$.on_mount.map(QV).filter(NQ);F.$$.on_destroy?F.$$.on_destroy.push(...d):gU(d),F.$$.on_mount=[]}),V.forEach(JV)}function pU(F,U){let Q=F.$$;Q.fragment!==null&&(gU(Q.on_destroy),Q.fragment&&Q.fragment.d(U),Q.on_destroy=Q.fragment=null,Q.ctx=[])}function JW(F,U){F.$$.dirty[0]===-1&&(PQ.push(F),yd(),F.$$.dirty.fill(0)),F.$$.dirty[U/31|0]|=1<{let r=e.length?e[0]:Z;return J.ctx&&R(J.ctx[E],J.ctx[E]=r)&&(!J.skip_bound&&J.bound[E]&&J.bound[E](r),W&&JW(F,E)),Z}):[],J.update(),W=!0,gU(J.before_update),J.fragment=B?B(J.ctx):!1,U.target){if(U.hydrate){RW();let E=dW(U.target);J.fragment&&J.fragment.l(E),E.forEach(A)}else J.fragment&&J.fragment.c();U.intro&&BU(F.$$.fragment),YU(F,U.target,U.anchor,U.customElement),VW(),vd()}fQ(n)}var WW;typeof HTMLElement=="function"&&(WW=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:F}=this.$$;this.$$.on_disconnect=F.map(QV).filter(NQ);for(let U in this.$$.slotted)this.appendChild(this.$$.slotted[U])}attributeChangedCallback(F,U,Q){this[F]=Q}disconnectedCallback(){gU(this.$$.on_disconnect)}$destroy(){pU(this,1),this.$destroy=tU}$on(F,U){if(!NQ(U))return tU;let Q=this.$$.callbacks[F]||(this.$$.callbacks[F]=[]);return Q.push(U),()=>{let B=Q.indexOf(U);B!==-1&&Q.splice(B,1)}}$set(F){this.$$set&&!pd(F)&&(this.$$.skip_bound=!0,this.$$set(F),this.$$.skip_bound=!1)}});var CU=class{$destroy(){pU(this,1),this.$destroy=tU}$on(U,Q){if(!NQ(Q))return tU;let B=this.$$.callbacks[U]||(this.$$.callbacks[U]=[]);return B.push(Q),()=>{let R=B.indexOf(Q);R!==-1&&B.splice(R,1)}}$set(U){this.$$set&&!pd(U)&&(this.$$.skip_bound=!0,this.$$set(U),this.$$.skip_bound=!1)}};var uF=XU(require("obsidian"));var JJ=XU(require("obsidian"));var ZV=class{constructor(){this.handlers=new Map;this.disabled=[]}on(U,Q,B){if(U.includes("@")||Q.includes("@"))throw new Error("Invalid context/event name - Cannot contain @");this.handlers.set(`${U}@${Q}`,B)}off(U,Q){if(Q)this.handlers.delete(`${U}@${Q}`);else for(let[B]of this.handlers.entries())B.startsWith(`${U}@`)&&this.handlers.delete(B)}disable(U){this.enable(U),this.disabled.push(U)}enable(U){this.disabled=this.disabled.filter(Q=>Q!==U)}emit(U,...Q){let B=[...this.handlers.entries()].filter(([R,V])=>!this.disabled.includes(R.split("@")[0]));for(let[R,V]of B)R.endsWith(`@${U}`)&&V(...Q)}};var kQ=[];function fB(F,U=tU){let Q,B=new Set;function R(l){if(rU(F,l)&&(F=l,Q)){let n=!kQ.length;for(let J of B)J[1](),kQ.push(J,F);if(n){for(let J=0;J{B.delete(J),B.size===0&&(Q(),Q=null)}}return{set:R,update:V,subscribe:d}}var QU=XU(require("obsidian"));var nU=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,SU=Object.keys,MU=Array.isArray;typeof Promise!="undefined"&&!nU.Promise&&(nU.Promise=Promise);function yU(F,U){return typeof U!="object"||SU(U).forEach(function(Q){F[Q]=U[Q]}),F}var _Q=Object.getPrototypeOf,ZW={}.hasOwnProperty;function wU(F,U){return ZW.call(F,U)}function aQ(F,U){typeof U=="function"&&(U=U(_Q(F))),(typeof Reflect=="undefined"?SU:Reflect.ownKeys)(U).forEach(Q=>{nF(F,Q,U[Q])})}var Gd=Object.defineProperty;function nF(F,U,Q,B){Gd(F,U,yU(Q&&wU(Q,"get")&&typeof Q.get=="function"?{get:Q.get,set:Q.set,configurable:!0}:{value:Q,configurable:!0,writable:!0},B))}function TQ(F){return{from:function(U){return F.prototype=Object.create(U.prototype),nF(F.prototype,"constructor",F),{extend:aQ.bind(null,F.prototype)}}}}var NW=Object.getOwnPropertyDescriptor;function NV(F,U){let Q=NW(F,U),B;return Q||(B=_Q(F))&&NV(B,U)}var EW=[].slice;function KB(F,U,Q){return EW.call(F,U,Q)}function bd(F,U){return U(F)}function qQ(F){if(!F)throw new Error("Assertion Failed")}function Xd(F){nU.setImmediate?setImmediate(F):setTimeout(F,0)}function Od(F,U){return F.reduce((Q,B,R)=>{var V=U(B,R);return V&&(Q[V[0]]=V[1]),Q},{})}function tW(F,U,Q){try{F.apply(null,Q)}catch(B){U&&U(B)}}function JF(F,U){if(wU(F,U))return F[U];if(!U)return F;if(typeof U!="string"){for(var Q=[],B=0,R=U.length;B["Int","Uint","Float"].map(U=>U+F+"Array")))).filter(F=>nU[F]),kW=ud.map(F=>nU[F]);Od(ud,F=>[F,!0]);var pF=null;function AQ(F){pF=typeof WeakMap!="undefined"&&new WeakMap;let U=EV(F);return pF=null,U}function EV(F){if(!F||typeof F!="object")return F;let U=pF&&pF.get(F);if(U)return U;if(MU(F)){U=[],pF&&pF.set(F,U);for(var Q=0,B=F.length;Q=0)U=F;else{let V=_Q(F);U=V===Object.prototype?{}:Object.create(V),pF&&pF.set(F,U);for(var R in F)wU(F,R)&&(U[R]=EV(F[R]))}return U}var{toString:aW}={};function tV(F){return aW.call(F).slice(8,-1)}var SV=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",TW=typeof SV=="symbol"?function(F){var U;return F!=null&&(U=F[SV])&&U.apply(F)}:function(){return null},hQ={};function WF(F){var U,Q,B,R;if(arguments.length===1){if(MU(F))return F.slice();if(this===hQ&&typeof F=="string")return[F];if(R=TW(F)){for(Q=[];B=R.next(),!B.done;)Q.push(B.value);return Q}if(F==null)return[F];if(U=F.length,typeof U=="number"){for(Q=new Array(U);U--;)Q[U]=F[U];return Q}return[F]}for(U=arguments.length,Q=new Array(U);U--;)Q[U]=arguments[U];return Q}var eV=typeof Symbol!="undefined"?F=>F[Symbol.toStringTag]==="AsyncFunction":()=>!1,QF=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function xd(F,U){QF=F,wd=U}var wd=()=>!0,hW=!new Error("").stack;function IF(){if(hW)try{throw IF.arguments,new Error}catch(F){return F}return new Error}function kV(F,U){var Q=F.stack;return Q?(U=U||0,Q.indexOf(F.name)===0&&(U+=(F.name+F.message).split(` `).length),Q.split(` -`).slice(U).filter(xd).map(B=>` -`+B).join("")):""}var hW=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],wd=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],aV=hW.concat(wd),cW={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function hQ(F,U){this._e=IF(),this.name=F,this.message=U}aQ(hQ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kV(this._e,2))}},toString:function(){return this.name+": "+this.message}});function Ld(F,U){return F+". Errors: "+Object.keys(U).map(Q=>U[Q].toString()).filter((Q,B,R)=>R.indexOf(Q)===B).join(` -`)}function PB(F,U,Q,B){this._e=IF(),this.failures=U,this.failedKeys=B,this.successCount=Q,this.message=Ld(F,U)}aQ(PB).from(hQ);function $Q(F,U){this._e=IF(),this.name="BulkError",this.failures=Object.keys(U).map(Q=>U[Q]),this.failuresByPos=U,this.message=Ld(F,U)}aQ($Q).from(hQ);var TV=aV.reduce((F,U)=>(F[U]=U+"Error",F),{}),rW=hQ,f=aV.reduce((F,U)=>{var Q=U+"Error";function B(R,V){this._e=IF(),this.name=Q,R?typeof R=="string"?(this.message=`${R}${V?` - `+V:""}`,this.inner=V||null):typeof R=="object"&&(this.message=`${R.name} ${R.message}`,this.inner=R):(this.message=cW[U]||Q,this.inner=null)}return aQ(B).from(rW),F[U]=B,F},{});f.Syntax=SyntaxError;f.Type=TypeError;f.Range=RangeError;var jd=wd.reduce((F,U)=>(F[U+"Error"]=f[U],F),{});function CW(F,U){if(!F||F instanceof hQ||F instanceof TypeError||F instanceof SyntaxError||!F.name||!jd[F.name])return F;var Q=new jd[F.name](U||F.message,F);return"stack"in F&&nF(Q,"stack",{get:function(){return this.inner.stack}}),Q}var qB=aV.reduce((F,U)=>(["Syntax","Type","Range"].indexOf(U)===-1&&(F[U+"Error"]=f[U]),F),{});qB.ModifyError=PB;qB.DexieError=hQ;qB.BulkError=$Q;function VU(){}function UB(F){return F}function DW(F,U){return F==null||F===UB?U:function(Q){return U(F(Q))}}function fF(F,U){return function(){F.apply(this,arguments),U.apply(this,arguments)}}function pW(F,U){return F===VU?U:function(){var Q=F.apply(this,arguments);Q!==void 0&&(arguments[0]=Q);var B=this.onsuccess,R=this.onerror;this.onsuccess=null,this.onerror=null;var V=U.apply(this,arguments);return B&&(this.onsuccess=this.onsuccess?fF(B,this.onsuccess):B),R&&(this.onerror=this.onerror?fF(R,this.onerror):R),V!==void 0?V:Q}}function mW(F,U){return F===VU?U:function(){F.apply(this,arguments);var Q=this.onsuccess,B=this.onerror;this.onsuccess=this.onerror=null,U.apply(this,arguments),Q&&(this.onsuccess=this.onsuccess?fF(Q,this.onsuccess):Q),B&&(this.onerror=this.onerror?fF(B,this.onerror):B)}}function MW(F,U){return F===VU?U:function(Q){var B=F.apply(this,arguments);yU(Q,B);var R=this.onsuccess,V=this.onerror;this.onsuccess=null,this.onerror=null;var d=U.apply(this,arguments);return R&&(this.onsuccess=this.onsuccess?fF(R,this.onsuccess):R),V&&(this.onerror=this.onerror?fF(V,this.onerror):V),B===void 0?d===void 0?void 0:d:yU(B,d)}}function oW(F,U){return F===VU?U:function(){return U.apply(this,arguments)===!1?!1:F.apply(this,arguments)}}function hV(F,U){return F===VU?U:function(){var Q=F.apply(this,arguments);if(Q&&typeof Q.then=="function"){for(var B=this,R=arguments.length,V=new Array(R);R--;)V[R]=arguments[R];return Q.then(function(){return U.apply(B,V)})}return U.apply(this,arguments)}}var FB={},iW=100,sW=20,Id=100,[cV,_B,rV]=typeof Promise=="undefined"?[]:(()=>{let F=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[F,qQ(F),F];let U=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[U,qQ(U),F]})(),fd=_B&&_B.then,AB=cV&&cV.constructor,CV=!!rV,DV=!1,YW=rV?()=>{rV.then(QR)}:nU.setImmediate?setImmediate.bind(null,QR):nU.MutationObserver?()=>{var F=document.createElement("div");new MutationObserver(()=>{QR(),F=null}).observe(F,{attributes:!0}),F.setAttribute("i","1")}:()=>{setTimeout(QR,0)},QB=function(F,U){BB.push([F,U]),$B&&(YW(),$B=!1)},pV=!0,$B=!0,KF=[],UR=[],mV=null,MV=UB,cQ={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ql,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(F=>{try{Ql(F[0],F[1])}catch{}})}},u=cQ,BB=[],gF=0,FR=[];function G(F){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=VU,this._lib=!1;var U=this._PSD=u;if(QF&&(this._stackHolder=IF(),this._prev=null,this._numPrev=0),typeof F!="function"){if(F!==FB)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&iV(this,this._value);return}this._state=null,this._value=null,++U.ref,gd(this,F)}var oV={get:function(){var F=u,U=VR;function Q(B,R){var V=!F.global&&(F!==u||U!==VR);let d=V&&!ZF();var l=new G((n,J)=>{sV(this,new Kd(lR(B,F,V,d),lR(R,F,V,d),n,J,F))});return QF&&_d(l,this),l}return Q.prototype=FB,Q},set:function(F){nF(this,"then",F&&F.prototype===FB?oV:{get:function(){return F},set:oV.set})}};kQ(G.prototype,{then:oV,_then:function(F,U){sV(this,new Kd(null,null,F,U,u))},catch:function(F){if(arguments.length===1)return this.then(null,F);var U=arguments[0],Q=arguments[1];return typeof U=="function"?this.then(null,B=>B instanceof U?Q(B):BR(B)):this.then(null,B=>B&&B.name===U?Q(B):BR(B))},finally:function(F){return this.then(U=>(F(),U),U=>(F(),BR(U)))},stack:{get:function(){if(this._stack)return this._stack;try{DV=!0;var F=qd(this,[],sW),U=F.join(` -From previous: `);return this._state!==null&&(this._stack=U),U}finally{DV=!1}}},timeout:function(F,U){return F<1/0?new G((Q,B)=>{var R=setTimeout(()=>B(new f.Timeout(U)),F);this.then(Q,B).finally(clearTimeout.bind(null,R))}):this}});typeof Symbol!="undefined"&&Symbol.toStringTag&&nF(G.prototype,Symbol.toStringTag,"Dexie.Promise");cQ.env=Ad();function Kd(F,U,Q,B,R){this.onFulfilled=typeof F=="function"?F:null,this.onRejected=typeof U=="function"?U:null,this.resolve=Q,this.reject=B,this.psd=R}kQ(G,{all:function(){var F=WF.apply(null,arguments).map(dR);return new G(function(U,Q){F.length===0&&U([]);var B=F.length;F.forEach((R,V)=>G.resolve(R).then(d=>{F[V]=d,--B||U(F)},Q))})},resolve:F=>{if(F instanceof G)return F;if(F&&typeof F.then=="function")return new G((Q,B)=>{F.then(Q,B)});var U=new G(FB,!0,F);return _d(U,mV),U},reject:BR,race:function(){var F=WF.apply(null,arguments).map(dR);return new G((U,Q)=>{F.map(B=>G.resolve(B).then(U,Q))})},PSD:{get:()=>u,set:F=>u=F},totalEchoes:{get:()=>VR},newPSD:pF,usePSD:CQ,scheduler:{get:()=>QB,set:F=>{QB=F}},rejectionMapper:{get:()=>MV,set:F=>{MV=F}},follow:(F,U)=>new G((Q,B)=>pF((R,V)=>{var d=u;d.unhandleds=[],d.onunhandled=V,d.finalize=fF(function(){vW(()=>{this.unhandleds.length===0?R():V(this.unhandleds[0])})},d.finalize),F()},U,Q,B))});AB&&(AB.allSettled&&nF(G,"allSettled",function(){let F=WF.apply(null,arguments).map(dR);return new G(U=>{F.length===0&&U([]);let Q=F.length,B=new Array(Q);F.forEach((R,V)=>G.resolve(R).then(d=>B[V]={status:"fulfilled",value:d},d=>B[V]={status:"rejected",reason:d}).then(()=>--Q||U(B)))})}),AB.any&&typeof AggregateError!="undefined"&&nF(G,"any",function(){let F=WF.apply(null,arguments).map(dR);return new G((U,Q)=>{F.length===0&&Q(new AggregateError([]));let B=F.length,R=new Array(B);F.forEach((V,d)=>G.resolve(V).then(l=>U(l),l=>{R[d]=l,--B||Q(new AggregateError(R))}))})}));function gd(F,U){try{U(Q=>{if(F._state===null){if(Q===F)throw new TypeError("A promise cannot be resolved with itself.");var B=F._lib&&RB();Q&&typeof Q.then=="function"?gd(F,(R,V)=>{Q instanceof G?Q._then(R,V):Q.then(R,V)}):(F._state=!0,F._value=Q,Pd(F)),B&&VB()}},iV.bind(null,F))}catch(Q){iV(F,Q)}}function iV(F,U){if(UR.push(U),F._state===null){var Q=F._lib&&RB();U=MV(U),F._state=!1,F._value=U,QF&&U!==null&&typeof U=="object"&&!U._promise&&EW(()=>{var B=NV(U,"stack");U._promise=F,nF(U,"stack",{get:()=>DV?B&&(B.get?B.get.apply(U):B.value):F.stack})}),GW(F),Pd(F),Q&&VB()}}function Pd(F){var U=F._listeners;F._listeners=[];for(var Q=0,B=U.length;Q{--gF==0&&YV()},[]))}function sV(F,U){if(F._state===null){F._listeners.push(U);return}var Q=F._state?U.onFulfilled:U.onRejected;if(Q===null)return(F._state?U.resolve:U.reject)(F._value);++U.psd.ref,++gF,QB(yW,[Q,F,U])}function yW(F,U,Q){try{mV=U;var B,R=U._value;U._state?B=F(R):(UR.length&&(UR=[]),B=F(R),UR.indexOf(R)===-1&&bW(U)),Q.resolve(B)}catch(V){Q.reject(V)}finally{mV=null,--gF==0&&YV(),--Q.psd.ref||Q.psd.finalize()}}function qd(F,U,Q){if(U.length===Q)return U;var B="";if(F._state===!1){var R=F._value,V,d;R!=null?(V=R.name||"Error",d=R.message||R,B=kV(R,0)):(V=R,d=""),U.push(V+(d?": "+d:"")+B)}return QF&&(B=kV(F._stackHolder,2),B&&U.indexOf(B)===-1&&U.push(B),F._prev&&qd(F._prev,U,Q)),U}function _d(F,U){var Q=U?U._numPrev+1:0;Q0;)for(F=BB,BB=[],Q=F.length,U=0;U0);pV=!0,$B=!0}function YV(){var F=KF;KF=[],F.forEach(B=>{B._PSD.onunhandled.call(null,B._value,B)});for(var U=FR.slice(0),Q=U.length;Q;)U[--Q]()}function vW(F){function U(){F(),FR.splice(FR.indexOf(U),1)}FR.push(U),++gF,QB(()=>{--gF==0&&YV()},[])}function GW(F){KF.some(U=>U._value===F._value)||KF.push(F)}function bW(F){for(var U=KF.length;U;)if(KF[--U]._value===F._value){KF.splice(U,1);return}}function BR(F){return new G(FB,!1,F)}function WU(F,U){var Q=u;return function(){var B=RB(),R=u;try{return mF(Q,!0),F.apply(this,arguments)}catch(V){U&&U(V)}finally{mF(R,!1),B&&VB()}}}var oU={awaits:0,echoes:0,id:0},XW=0,RR=[],yV=0,VR=0,OW=0;function pF(F,U,Q,B){var R=u,V=Object.create(R);V.parent=R,V.ref=0,V.global=!1,V.id=++OW;var d=cQ.env;V.env=CV?{Promise:G,PromiseProp:{value:G,configurable:!0,writable:!0},all:G.all,race:G.race,allSettled:G.allSettled,any:G.any,resolve:G.resolve,reject:G.reject,nthen:Ul(d.nthen,V),gthen:Ul(d.gthen,V)}:{},U&&yU(V,U),++R.ref,V.finalize=function(){--this.parent.ref||this.parent.finalize()};var l=CQ(V,F,Q,B);return V.ref===0&&V.finalize(),l}function rQ(){return oU.id||(oU.id=++XW),++oU.awaits,oU.echoes+=Id,oU.id}function ZF(){return oU.awaits?(--oU.awaits==0&&(oU.id=0),oU.echoes=oU.awaits*Id,!0):!1}(""+fd).indexOf("[native code]")===-1&&(rQ=ZF=VU);function dR(F){return oU.echoes&&F&&F.constructor===AB?(rQ(),F.then(U=>(ZF(),U),U=>(ZF(),aU(U)))):F}function HW(F){++VR,(!oU.echoes||--oU.echoes==0)&&(oU.echoes=oU.id=0),RR.push(u),mF(F,!0)}function zW(){var F=RR[RR.length-1];RR.pop(),mF(F,!1)}function mF(F,U){var Q=u;if((U?oU.echoes&&(!yV++||F!==u):yV&&(!--yV||F!==u))&&$d(U?HW.bind(null,F):zW),F!==u&&(u=F,Q===cQ&&(cQ.env=Ad()),CV)){var B=cQ.env.Promise,R=F.env;_B.then=R.nthen,B.prototype.then=R.gthen,(Q.global||F.global)&&(Object.defineProperty(nU,"Promise",R.PromiseProp),B.all=R.all,B.race=R.race,B.resolve=R.resolve,B.reject=R.reject,R.allSettled&&(B.allSettled=R.allSettled),R.any&&(B.any=R.any))}}function Ad(){var F=nU.Promise;return CV?{Promise:F,PromiseProp:Object.getOwnPropertyDescriptor(nU,"Promise"),all:F.all,race:F.race,allSettled:F.allSettled,any:F.any,resolve:F.resolve,reject:F.reject,nthen:_B.then,gthen:F.prototype.then}:{}}function CQ(F,U,Q,B,R){var V=u;try{return mF(F,!0),U(Q,B,R)}finally{mF(V,!1)}}function $d(F){fd.call(cV,F)}function lR(F,U,Q,B){return typeof F!="function"?F:function(){var R=u;Q&&rQ(),mF(U,!0);try{return F.apply(this,arguments)}finally{mF(R,!1),B&&$d(ZF)}}}function Ul(F,U){return function(Q,B){return F.call(this,lR(Q,U),lR(B,U))}}var Fl="unhandledrejection";function Ql(F,U){var Q;try{Q=U.onuncatched(F)}catch{}if(Q!==!1)try{var B,R={promise:U,reason:F};if(nU.document&&document.createEvent?(B=document.createEvent("Event"),B.initEvent(Fl,!0,!0),yU(B,R)):nU.CustomEvent&&(B=new CustomEvent(Fl,{detail:R}),yU(B,R)),B&&nU.dispatchEvent&&(dispatchEvent(B),!nU.PromiseRejectionEvent&&nU.onunhandledrejection))try{nU.onunhandledrejection(B)}catch{}QF&&B&&!B.defaultPrevented&&console.warn(`Unhandled rejection: ${F.stack||F}`)}catch{}}var aU=G.reject;function vV(F,U,Q,B){if(!F.idbdb||!F._state.openComplete&&!u.letThrough&&!F._vip){if(F._state.openComplete)return aU(new f.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._options.autoOpen)return aU(new f.DatabaseClosed);F.open().catch(VU)}return F._state.dbReadyPromise.then(()=>vV(F,U,Q,B))}else{var R=F._createTransaction(U,Q,F._dbSchema);try{R.create(),F._state.PR1398_maxLoop=3}catch(V){return V.name===TV.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>vV(F,U,Q,B))):aU(V)}return R._promise(U,(V,d)=>pF(()=>(u.trans=R,B(V,d,R)))).then(V=>R._completion.then(()=>V))}}var Bl="3.2.2",PF=String.fromCharCode(65535),GV=-1/0,NF="Invalid key provided. Keys must be of type string, number, Date or Array.",Rl="String expected.",dB=[],nR=typeof navigator!="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uW=nR,xW=nR,Vl=F=>!/(dexie\.js|dexie\.min\.js)/.test(F),JR="__dbnames",bV="readonly",XV="readwrite";function qF(F,U){return F?U?function(){return F.apply(this,arguments)&&U.apply(this,arguments)}:F:U}var dl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function WR(F){return typeof F=="string"&&!/\./.test(F)?U=>(U[F]===void 0&&F in U&&(U=AQ(U),delete U[F]),U):U=>U}var ll=class{_trans(U,Q,B){let R=this._tx||u.trans,V=this.name;function d(n,J,W){if(!W.schema[V])throw new f.NotFound("Table "+V+" not part of transaction");return Q(W.idbtrans,W)}let l=RB();try{return R&&R.db===this.db?R===u.trans?R._promise(U,d,B):pF(()=>R._promise(U,d,B),{trans:R,transless:u.transless||u}):vV(this.db,U,[this.name],d)}finally{l&&VB()}}get(U,Q){return U&&U.constructor===Object?this.where(U).first(Q):this._trans("readonly",B=>this.core.get({trans:B,key:U}).then(R=>this.hook.reading.fire(R))).then(Q)}where(U){if(typeof U=="string")return new this.db.WhereClause(this,U);if(MU(U))return new this.db.WhereClause(this,`[${U.join("+")}]`);let Q=SU(U);if(Q.length===1)return this.where(Q[0]).equals(U[Q[0]]);let B=this.schema.indexes.concat(this.schema.primKey).filter(J=>J.compound&&Q.every(W=>J.keyPath.indexOf(W)>=0)&&J.keyPath.every(W=>Q.indexOf(W)>=0))[0];if(B&&this.db._maxKey!==PF)return this.where(B.name).equals(B.keyPath.map(J=>U[J]));!B&&QF&&console.warn(`The query ${JSON.stringify(U)} on ${this.name} would benefit of a compound index [${Q.join("+")}]`);let{idxByName:R}=this.schema,V=this.db._deps.indexedDB;function d(J,W){try{return V.cmp(J,W)===0}catch{return!1}}let[l,n]=Q.reduce(([J,W],E)=>{let Z=R[E],e=U[E];return[J||Z,J||!Z?qF(W,Z&&Z.multi?r=>{let c=JF(r,E);return MU(c)&&c.some(h=>d(e,h))}:r=>d(e,JF(r,E))):W]},[null,null]);return l?this.where(l.name).equals(U[l.keyPath]).filter(n):B?this.filter(n):this.where(Q).equals("")}filter(U){return this.toCollection().and(U)}count(U){return this.toCollection().count(U)}offset(U){return this.toCollection().offset(U)}limit(U){return this.toCollection().limit(U)}each(U){return this.toCollection().each(U)}toArray(U){return this.toCollection().toArray(U)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(U){return new this.db.Collection(new this.db.WhereClause(this,MU(U)?`[${U.join("+")}]`:U))}reverse(){return this.toCollection().reverse()}mapToClass(U){this.schema.mappedClass=U;let Q=B=>{if(!B)return B;let R=Object.create(U.prototype);for(var V in B)if(wU(B,V))try{R[V]=B[V]}catch{}return R};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=Q,this.hook("reading",Q),U}defineClass(){function U(Q){yU(this,Q)}return this.mapToClass(U)}add(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=WR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"add",keys:Q!=null?[Q]:null,values:[V]})).then(d=>d.numFailures?G.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{qU(U,R,d)}catch{}return d})}update(U,Q){if(typeof U=="object"&&!MU(U)){let B=JF(U,this.schema.primKey.keyPath);if(B===void 0)return aU(new f.InvalidArgument("Given object does not contain its primary key"));try{typeof Q!="function"?SU(Q).forEach(R=>{qU(U,R,Q[R])}):Q(U,{value:U,primKey:B})}catch{}return this.where(":id").equals(B).modify(Q)}else return this.where(":id").equals(U).modify(Q)}put(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=WR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"put",values:[V],keys:Q!=null?[Q]:null})).then(d=>d.numFailures?G.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{qU(U,R,d)}catch{}return d})}delete(U){return this._trans("readwrite",Q=>this.core.mutate({trans:Q,type:"delete",keys:[U]})).then(Q=>Q.numFailures?G.reject(Q.failures[0]):void 0)}clear(){return this._trans("readwrite",U=>this.core.mutate({trans:U,type:"deleteRange",range:dl})).then(U=>U.numFailures?G.reject(U.failures[0]):void 0)}bulkGet(U){return this._trans("readonly",Q=>this.core.getMany({keys:U,trans:Q}).then(B=>B.map(R=>this.hook.reading.fire(R))))}bulkAdd(U,Q,B){let R=Array.isArray(Q)?Q:void 0;B=B||(R?void 0:Q);let V=B?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new f.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new f.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(WR(n)):U;return this.core.mutate({trans:d,type:"add",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{let c=V?Z:e;if(E===0)return c;throw new $Q(`${this.name}.bulkAdd(): ${E} of ${J} operations failed`,r)})})}bulkPut(U,Q,B){let R=Array.isArray(Q)?Q:void 0;B=B||(R?void 0:Q);let V=B?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new f.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new f.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(WR(n)):U;return this.core.mutate({trans:d,type:"put",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{let c=V?Z:e;if(E===0)return c;throw new $Q(`${this.name}.bulkPut(): ${E} of ${J} operations failed`,r)})})}bulkDelete(U){let Q=U.length;return this._trans("readwrite",B=>this.core.mutate({trans:B,type:"delete",keys:U})).then(({numFailures:B,lastResult:R,failures:V})=>{if(B===0)return R;throw new $Q(`${this.name}.bulkDelete(): ${B} of ${Q} operations failed`,V)})}};function lB(F){var U={},Q=function(l,n){if(n){for(var J=arguments.length,W=new Array(J-1);--J;)W[J-1]=arguments[J];return U[l].subscribe.apply(null,W),F}else if(typeof l=="string")return U[l]};Q.addEventType=V;for(var B=1,R=arguments.length;BqF(B(),U()):U,F.justLimit=Q&&!B}function LW(F,U){F.isMatch=qF(F.isMatch,U)}function ZR(F,U){if(F.isPrimKey)return U.primaryKey;let Q=U.getIndexByKeyPath(F.index);if(!Q)throw new f.Schema("KeyPath "+F.index+" on object store "+U.name+" is not indexed");return Q}function nl(F,U,Q){let B=ZR(F,U.schema);return U.openCursor({trans:Q,values:!F.keysOnly,reverse:F.dir==="prev",unique:!!F.unique,query:{index:B,range:F.range}})}function NR(F,U,Q,B){let R=F.replayFilter?qF(F.filter,F.replayFilter()):F.filter;if(F.or){let V={},d=(l,n,J)=>{if(!R||R(n,J,Z=>n.stop(Z),Z=>n.fail(Z))){var W=n.primaryKey,E=""+W;E==="[object ArrayBuffer]"&&(E=""+new Uint8Array(W)),wU(V,E)||(V[E]=!0,U(l,n,J))}};return Promise.all([F.or._iterate(d,Q),Jl(nl(F,B,Q),F.algorithm,d,!F.keysOnly&&F.valueMapper)])}else return Jl(nl(F,B,Q),qF(F.algorithm,R),U,!F.keysOnly&&F.valueMapper)}function Jl(F,U,Q,B){var R=B?(d,l,n)=>Q(B(d),l,n):Q,V=WU(R);return F.then(d=>{if(d)return d.start(()=>{var l=()=>d.continue();(!U||U(d,n=>l=n,n=>{d.stop(n),l=VU},n=>{d.fail(n),l=VU}))&&V(d.value,d,n=>l=n),l()})})}function vU(F,U){try{let Q=Wl(F),B=Wl(U);if(Q!==B)return Q==="Array"?1:B==="Array"?-1:Q==="binary"?1:B==="binary"?-1:Q==="string"?1:B==="string"?-1:Q==="Date"?1:B!=="Date"?NaN:-1;switch(Q){case"number":case"Date":case"string":return F>U?1:FNR(Q,U,B,Q.table.core))}count(U){return this._read(Q=>{let B=this._ctx,R=B.table.core;if(DQ(B,!0))return R.count({trans:Q,query:{index:ZR(B,R.schema),range:B.range}}).then(d=>Math.min(d,B.limit));var V=0;return NR(B,()=>(++V,!1),Q,R).then(()=>V)}).then(U)}sortBy(U,Q){let B=U.split(".").reverse(),R=B[0],V=B.length-1;function d(J,W){return W?d(J[B[W]],W-1):J[R]}var l=this._ctx.dir==="next"?1:-1;function n(J,W){var E=d(J,V),Z=d(W,V);return EZ?l:0}return this.toArray(function(J){return J.sort(n)}).then(Q)}toArray(U){return this._read(Q=>{var B=this._ctx;if(B.dir==="next"&&DQ(B,!0)&&B.limit>0){let{valueMapper:R}=B,V=ZR(B,B.table.core.schema);return B.table.core.query({trans:Q,limit:B.limit,values:!0,query:{index:V,range:B.range}}).then(({result:d})=>R?d.map(R):d)}else{let R=[];return NR(B,V=>R.push(V),Q,B.table.core).then(()=>R)}},U)}offset(U){var Q=this._ctx;return U<=0?this:(Q.offset+=U,DQ(Q)?HV(Q,()=>{var B=U;return(R,V)=>B===0?!0:B===1?(--B,!1):(V(()=>{R.advance(B),B=0}),!1)}):HV(Q,()=>{var B=U;return()=>--B<0}),this)}limit(U){return this._ctx.limit=Math.min(this._ctx.limit,U),HV(this._ctx,()=>{var Q=U;return function(B,R,V){return--Q<=0&&R(V),Q>=0}},!0),this}until(U,Q){return OV(this._ctx,function(B,R,V){return U(B.value)?(R(V),Q):!0}),this}first(U){return this.limit(1).toArray(function(Q){return Q[0]}).then(U)}last(U){return this.reverse().first(U)}filter(U){return OV(this._ctx,function(Q){return U(Q.value)}),LW(this._ctx,U),this}and(U){return this.filter(U)}or(U){return new this.db.WhereClause(this._ctx.table,U,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.key,R)})}eachUniqueKey(U){return this._ctx.unique="unique",this.eachKey(U)}eachPrimaryKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.primaryKey,R)})}keys(U){var Q=this._ctx;Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.key)}).then(function(){return B}).then(U)}primaryKeys(U){var Q=this._ctx;if(Q.dir==="next"&&DQ(Q,!0)&&Q.limit>0)return this._read(R=>{var V=ZR(Q,Q.table.core.schema);return Q.table.core.query({trans:R,values:!1,limit:Q.limit,query:{index:V,range:Q.range}})}).then(({result:R})=>R).then(U);Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.primaryKey)}).then(function(){return B}).then(U)}uniqueKeys(U){return this._ctx.unique="unique",this.keys(U)}firstKey(U){return this.limit(1).keys(function(Q){return Q[0]}).then(U)}lastKey(U){return this.reverse().firstKey(U)}distinct(){var U=this._ctx,Q=U.index&&U.table.schema.idxByName[U.index];if(!Q||!Q.multi)return this;var B={};return OV(this._ctx,function(R){var V=R.primaryKey.toString(),d=wU(B,V);return B[V]=!0,!d}),this}modify(U){var Q=this._ctx;return this._write(B=>{var R;if(typeof U=="function")R=U;else{var V=SU(U),d=V.length;R=function(c){for(var h=!1,N=0;N{let{failures:N,numFailures:k}=h;Z+=c-k;for(let t of SU(N))E.push(N[t])};return this.clone().primaryKeys().then(c=>{let h=N=>{let k=Math.min(W,c.length-N);return l.getMany({trans:B,keys:c.slice(N,N+k),cache:"immutable"}).then(t=>{let S=[],a=[],T=n?[]:null,C=[];for(let p=0;p0&&l.mutate({trans:B,type:"add",values:S}).then(p=>{for(let o in p.failures)C.splice(parseInt(o),1);r(S.length,p)})).then(()=>(a.length>0||D&&typeof U=="object")&&l.mutate({trans:B,type:"put",keys:T,values:a,criteria:D,changeSpec:typeof U!="function"&&U}).then(p=>r(a.length,p))).then(()=>(C.length>0||D&&U===zV)&&l.mutate({trans:B,type:"delete",keys:C,criteria:D}).then(p=>r(C.length,p))).then(()=>c.length>N+k&&h(N+W))})};return h(0).then(()=>{if(E.length>0)throw new PB("Error modifying one or more objects",E,Z,e);return c.length})})})}delete(){var U=this._ctx,Q=U.range;return DQ(U)&&(U.isPrimKey&&!xW||Q.type===3)?this._write(B=>{let{primaryKey:R}=U.table.core.schema,V=Q;return U.table.core.count({trans:B,query:{index:R,range:V}}).then(d=>U.table.core.mutate({trans:B,type:"deleteRange",range:V}).then(({failures:l,lastResult:n,results:J,numFailures:W})=>{if(W)throw new PB("Could not delete some values",Object.keys(l).map(E=>l[E]),d-W);return d-W}))}):this.modify(zV)}},zV=(F,U)=>U.value=null;function fW(F){return nB(Nl.prototype,function(Q,B){this.db=F;let R=dl,V=null;if(B)try{R=B()}catch(J){V=J}let d=Q._ctx,l=d.table,n=l.hook.reading.fire;this._ctx={table:l,index:d.index,isPrimKey:!d.index||l.schema.primKey.keyPath&&d.index===l.schema.primKey.name,range:R,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:V,or:d.or,valueMapper:n!==UB?n:null}})}function KW(F,U){return FU?-1:F===U?0:1}function LU(F,U,Q){var B=F instanceof uV?new F.Collection(F):F;return B._ctx.error=Q?new Q(U):new TypeError(U),B}function pQ(F){return new F.Collection(F,()=>El("")).limit(0)}function PW(F){return F==="next"?U=>U.toUpperCase():U=>U.toLowerCase()}function qW(F){return F==="next"?U=>U.toLowerCase():U=>U.toUpperCase()}function _W(F,U,Q,B,R,V){for(var d=Math.min(F.length,B.length),l=-1,n=0;n=0?F.substr(0,l)+U[l]+Q.substr(l+1):null;R(F[n],J)<0&&(l=n)}return dtypeof c=="string"))return LU(F,Rl);function Z(c){R=PW(c),V=qW(c),d=c==="next"?KW:gW;var h=Q.map(function(N){return{lower:V(N),upper:R(N)}}).sort(function(N,k){return d(N.lower,k.lower)});l=h.map(function(N){return N.upper}),n=h.map(function(N){return N.lower}),J=c,W=c==="next"?"":B}Z("next");var e=new F.Collection(F,()=>MF(l[0],n[E-1]+B));e._ondirectionchange=function(c){Z(c)};var r=0;return e._addAlgorithm(function(c,h,N){var k=c.key;if(typeof k!="string")return!1;var t=V(k);if(U(t,n,r))return!0;for(var S=null,a=r;a0)&&(S=T)}return h(S!==null?function(){c.continue(S+W)}:N),!1}),e}function MF(F,U,Q,B){return{type:2,lower:F,upper:U,lowerOpen:Q,upperOpen:B}}function El(F){return{type:1,lower:F,upper:F}}var uV=class{get Collection(){return this._ctx.table.db.Collection}between(U,Q,B,R){B=B!==!1,R=R===!0;try{return this._cmp(U,Q)>0||this._cmp(U,Q)===0&&(B||R)&&!(B&&R)?pQ(this):new this.Collection(this,()=>MF(U,Q,!B,!R))}catch{return LU(this,NF)}}equals(U){return U==null?LU(this,NF):new this.Collection(this,()=>El(U))}above(U){return U==null?LU(this,NF):new this.Collection(this,()=>MF(U,void 0,!0))}aboveOrEqual(U){return U==null?LU(this,NF):new this.Collection(this,()=>MF(U,void 0,!1))}below(U){return U==null?LU(this,NF):new this.Collection(this,()=>MF(void 0,U,!1,!0))}belowOrEqual(U){return U==null?LU(this,NF):new this.Collection(this,()=>MF(void 0,U))}startsWith(U){return typeof U!="string"?LU(this,Rl):this.between(U,U+PF,!0,!0)}startsWithIgnoreCase(U){return U===""?this.startsWith(U):ER(this,(Q,B)=>Q.indexOf(B[0])===0,[U],PF)}equalsIgnoreCase(U){return ER(this,(Q,B)=>Q===B[0],[U],"")}anyOfIgnoreCase(){var U=WF.apply(TQ,arguments);return U.length===0?pQ(this):ER(this,(Q,B)=>B.indexOf(Q)!==-1,U,"")}startsWithAnyOfIgnoreCase(){var U=WF.apply(TQ,arguments);return U.length===0?pQ(this):ER(this,(Q,B)=>B.some(R=>Q.indexOf(R)===0),U,PF)}anyOf(){let U=WF.apply(TQ,arguments),Q=this._cmp;try{U.sort(Q)}catch{return LU(this,NF)}if(U.length===0)return pQ(this);let B=new this.Collection(this,()=>MF(U[0],U[U.length-1]));B._ondirectionchange=V=>{Q=V==="next"?this._ascending:this._descending,U.sort(Q)};let R=0;return B._addAlgorithm((V,d,l)=>{let n=V.key;for(;Q(n,U[R])>0;)if(++R,R===U.length)return d(l),!1;return Q(n,U[R])===0?!0:(d(()=>{V.continue(U[R])}),!1)}),B}notEqual(U){return this.inAnyRange([[GV,U],[U,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let U=WF.apply(TQ,arguments);if(U.length===0)return new this.Collection(this);try{U.sort(this._ascending)}catch{return LU(this,NF)}let Q=U.reduce((B,R)=>B?B.concat([[B[B.length-1][1],R]]):[[GV,R]],null);return Q.push([U[U.length-1],this.db._maxKey]),this.inAnyRange(Q,{includeLowers:!1,includeUppers:!1})}inAnyRange(U,Q){let B=this._cmp,R=this._ascending,V=this._descending,d=this._min,l=this._max;if(U.length===0)return pQ(this);if(!U.every(S=>S[0]!==void 0&&S[1]!==void 0&&R(S[0],S[1])<=0))return LU(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",f.InvalidArgument);let n=!Q||Q.includeLowers!==!1,J=Q&&Q.includeUppers===!0;function W(S,a){let T=0,C=S.length;for(;T0){D[0]=d(D[0],a[0]),D[1]=l(D[1],a[1]);break}}return T===C&&S.push(a),S}let E=R;function Z(S,a){return E(S[0],a[0])}let e;try{e=U.reduce(W,[]),e.sort(Z)}catch{return LU(this,NF)}let r=0,c=J?S=>R(S,e[r][1])>0:S=>R(S,e[r][1])>=0,h=n?S=>V(S,e[r][0])>0:S=>V(S,e[r][0])>=0;function N(S){return!c(S)&&!h(S)}let k=c,t=new this.Collection(this,()=>MF(e[0][0],e[e.length-1][1],!n,!J));return t._ondirectionchange=S=>{S==="next"?(k=c,E=R):(k=h,E=V),e.sort(Z)},t._addAlgorithm((S,a,T)=>{for(var C=S.key;k(C);)if(++r,r===e.length)return a(T),!1;return N(C)?!0:(this._cmp(C,e[r][1])===0||this._cmp(C,e[r][0])===0||a(()=>{E===R?S.continue(e[r][0]):S.continue(e[r][1])}),!1)}),t}startsWithAnyOf(){let U=WF.apply(TQ,arguments);return U.every(Q=>typeof Q=="string")?U.length===0?pQ(this):this.inAnyRange(U.map(Q=>[Q,Q+PF])):LU(this,"startsWithAnyOf() only works with strings")}};function AW(F){return nB(uV.prototype,function(Q,B,R){this.db=F,this._ctx={table:Q,index:B===":id"?null:B,or:R};let V=F._deps.indexedDB;if(!V)throw new f.MissingAPI;this._cmp=this._ascending=V.cmp.bind(V),this._descending=(d,l)=>V.cmp(l,d),this._max=(d,l)=>V.cmp(d,l)>0?d:l,this._min=(d,l)=>V.cmp(d,l)<0?d:l,this._IDBKeyRange=F._deps.IDBKeyRange})}function BF(F){return WU(function(U){return JB(U),F(U.target.error),!1})}function JB(F){F.stopPropagation&&F.stopPropagation(),F.preventDefault&&F.preventDefault()}var WB="storagemutated",oF="x-storagemutated-1",iF=lB(null,WB),tl=class{_lock(){return _Q(!u.global),++this._reculock,this._reculock===1&&!u.global&&(u.lockOwnerFor=this),this}_unlock(){if(_Q(!u.global),--this._reculock==0)for(u.global||(u.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var U=this._blockedFuncs.shift();try{CQ(U[1],U[0])}catch{}}return this}_locked(){return this._reculock&&u.lockOwnerFor!==this}create(U){if(!this.mode)return this;let Q=this.db.idbdb,B=this.db._state.dbOpenError;if(_Q(!this.idbtrans),!U&&!Q)switch(B&&B.name){case"DatabaseClosedError":throw new f.DatabaseClosed(B);case"MissingAPIError":throw new f.MissingAPI(B.message,B);default:throw new f.OpenFailed(B)}if(!this.active)throw new f.TransactionInactive;return _Q(this._completion._state===null),U=this.idbtrans=U||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):Q.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),U.onerror=WU(R=>{JB(R),this._reject(U.error)}),U.onabort=WU(R=>{JB(R),this.active&&this._reject(new f.Abort(U.error)),this.active=!1,this.on("abort").fire(R)}),U.oncomplete=WU(()=>{this.active=!1,this._resolve(),"mutatedParts"in U&&iF.storagemutated.fire(U.mutatedParts)}),this}_promise(U,Q,B){if(U==="readwrite"&&this.mode!=="readwrite")return aU(new f.ReadOnly("Transaction is readonly"));if(!this.active)return aU(new f.TransactionInactive);if(this._locked())return new G((V,d)=>{this._blockedFuncs.push([()=>{this._promise(U,Q,B).then(V,d)},u])});if(B)return pF(()=>{var V=new G((d,l)=>{this._lock();let n=Q(d,l,this);n&&n.then&&n.then(d,l)});return V.finally(()=>this._unlock()),V._lib=!0,V});var R=new G((V,d)=>{var l=Q(V,d,this);l&&l.then&&l.then(V,d)});return R._lib=!0,R}_root(){return this.parent?this.parent._root():this}waitFor(U){var Q=this._root();let B=G.resolve(U);if(Q._waitingFor)Q._waitingFor=Q._waitingFor.then(()=>B);else{Q._waitingFor=B,Q._waitingQueue=[];var R=Q.idbtrans.objectStore(Q.storeNames[0]);(function d(){for(++Q._spinCount;Q._waitingQueue.length;)Q._waitingQueue.shift()();Q._waitingFor&&(R.get(-1/0).onsuccess=d)})()}var V=Q._waitingFor;return new G((d,l)=>{B.then(n=>Q._waitingQueue.push(WU(d.bind(null,n))),n=>Q._waitingQueue.push(WU(l.bind(null,n)))).finally(()=>{Q._waitingFor===V&&(Q._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new f.Abort))}table(U){let Q=this._memoizedTables||(this._memoizedTables={});if(wU(Q,U))return Q[U];let B=this.schema[U];if(!B)throw new f.NotFound("Table "+U+" not part of transaction");let R=new this.db.Table(U,B,this);return R.core=this.db.core.table(U),Q[U]=R,R}};function $W(F){return nB(tl.prototype,function(Q,B,R,V,d){this.db=F,this.mode=Q,this.storeNames=B,this.schema=R,this.chromeTransactionDurability=V,this.idbtrans=null,this.on=lB(this,"complete","error","abort"),this.parent=d||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new G((l,n)=>{this._resolve=l,this._reject=n}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},l=>{var n=this.active;return this.active=!1,this.on.error.fire(l),this.parent?this.parent._reject(l):n&&this.idbtrans&&this.idbtrans.abort(),aU(l)})})}function xV(F,U,Q,B,R,V,d){return{name:F,keyPath:U,unique:Q,multi:B,auto:R,compound:V,src:(Q&&!d?"&":"")+(B?"*":"")+(R?"++":"")+Sl(U)}}function Sl(F){return typeof F=="string"?F:F?"["+[].join.call(F,"+")+"]":""}function el(F,U,Q){return{name:F,primKey:U,indexes:Q,mappedClass:null,idxByName:Xd(Q,B=>[B.name,B])}}function UZ(F){return F.length===1?F[0]:F}var ZB=F=>{try{return F.only([[]]),ZB=()=>[[]],[[]]}catch{return ZB=()=>PF,PF}};function wV(F){return F==null?()=>{}:typeof F=="string"?FZ(F):U=>JF(U,F)}function FZ(F){return F.split(".").length===1?Q=>Q[F]:Q=>JF(Q,F)}function kl(F){return[].slice.call(F)}var QZ=0;function NB(F){return F==null?":id":typeof F=="string"?F:`[${F.join("+")}]`}function BZ(F,U,Q){function B(W,E){let Z=kl(W.objectStoreNames);return{schema:{name:W.name,tables:Z.map(e=>E.objectStore(e)).map(e=>{let{keyPath:r,autoIncrement:c}=e,h=MU(r),N=r==null,k={},t={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:N,compound:h,keyPath:r,autoIncrement:c,unique:!0,extractKey:wV(r)},indexes:kl(e.indexNames).map(S=>e.index(S)).map(S=>{let{name:a,unique:T,multiEntry:C,keyPath:D}=S,p=MU(D),o={name:a,compound:p,keyPath:D,unique:T,multiEntry:C,extractKey:wV(D)};return k[NB(D)]=o,o}),getIndexByKeyPath:S=>k[NB(S)]};return k[":id"]=t.primaryKey,r!=null&&(k[NB(r)]=t.primaryKey),t})},hasGetAll:Z.length>0&&"getAll"in E.objectStore(Z[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function R(W){if(W.type===3)return null;if(W.type===4)throw new Error("Cannot convert never type to IDBKeyRange");let{lower:E,upper:Z,lowerOpen:e,upperOpen:r}=W;return E===void 0?Z===void 0?null:U.upperBound(Z,!!r):Z===void 0?U.lowerBound(E,!!e):U.bound(E,Z,!!e,!!r)}function V(W){let E=W.name;function Z({trans:c,type:h,keys:N,values:k,range:t}){return new Promise((S,a)=>{S=WU(S);let T=c.objectStore(E),C=T.keyPath==null,D=h==="put"||h==="add";if(!D&&h!=="delete"&&h!=="deleteRange")throw new Error("Invalid operation type: "+h);let{length:p}=N||k||{length:1};if(N&&k&&N.length!==k.length)throw new Error("Given keys array must have same length as given values array.");if(p===0)return S({numFailures:0,failures:{},results:[],lastResult:void 0});let o,s=[],v=[],y=0,i=g=>{++y,JB(g)};if(h==="deleteRange"){if(t.type===4)return S({numFailures:y,failures:v,results:[],lastResult:void 0});t.type===3?s.push(o=T.clear()):s.push(o=T.delete(R(t)))}else{let[g,L]=D?C?[k,N]:[k,null]:[N,null];if(D)for(let M=0;M{let L=g.target.result;s.forEach((M,m)=>M.error!=null&&(v[m]=M.error)),S({numFailures:y,failures:v,results:h==="delete"?N:s.map(M=>M.result),lastResult:L})};o.onerror=g=>{i(g),w(g)},o.onsuccess=w})}function e({trans:c,values:h,query:N,reverse:k,unique:t}){return new Promise((S,a)=>{S=WU(S);let{index:T,range:C}=N,D=c.objectStore(E),p=T.isPrimaryKey?D:D.index(T.name),o=k?t?"prevunique":"prev":t?"nextunique":"next",s=h||!("openKeyCursor"in p)?p.openCursor(R(C),o):p.openKeyCursor(R(C),o);s.onerror=BF(a),s.onsuccess=WU(v=>{let y=s.result;if(!y){S(null);return}y.___id=++QZ,y.done=!1;let i=y.continue.bind(y),w=y.continuePrimaryKey;w&&(w=w.bind(y));let g=y.advance.bind(y),L=()=>{throw new Error("Cursor not started")},M=()=>{throw new Error("Cursor not stopped")};y.trans=c,y.stop=y.continue=y.continuePrimaryKey=y.advance=L,y.fail=WU(a),y.next=function(){let m=1;return this.start(()=>m--?this.continue():this.stop()).then(()=>this)},y.start=m=>{let Y=new Promise((X,lU)=>{X=WU(X),s.onerror=BF(lU),y.fail=lU,y.stop=EU=>{y.stop=y.continue=y.continuePrimaryKey=y.advance=M,X(EU)}}),I=()=>{if(s.result)try{m()}catch(X){y.fail(X)}else y.done=!0,y.start=()=>{throw new Error("Cursor behind last entry")},y.stop()};return s.onsuccess=WU(X=>{s.onsuccess=I,I()}),y.continue=i,y.continuePrimaryKey=w,y.advance=g,I(),Y},S(y)},a)})}function r(c){return h=>new Promise((N,k)=>{N=WU(N);let{trans:t,values:S,limit:a,query:T}=h,C=a===1/0?void 0:a,{index:D,range:p}=T,o=t.objectStore(E),s=D.isPrimaryKey?o:o.index(D.name),v=R(p);if(a===0)return N({result:[]});if(c){let y=S?s.getAll(v,C):s.getAllKeys(v,C);y.onsuccess=i=>N({result:i.target.result}),y.onerror=BF(k)}else{let y=0,i=S||!("openKeyCursor"in s)?s.openCursor(v):s.openKeyCursor(v),w=[];i.onsuccess=g=>{let L=i.result;if(!L)return N({result:w});if(w.push(S?L.value:L.primaryKey),++y===a)return N({result:w});L.continue()},i.onerror=BF(k)}})}return{name:E,schema:W,mutate:Z,getMany({trans:c,keys:h}){return new Promise((N,k)=>{N=WU(N);let t=c.objectStore(E),S=h.length,a=new Array(S),T=0,C=0,D,p=s=>{let v=s.target;(a[v._pos]=v.result)!=null,++C===T&&N(a)},o=BF(k);for(let s=0;s{N=WU(N);let S=c.objectStore(E).get(h);S.onsuccess=a=>N(a.target.result),S.onerror=BF(k)})},query:r(l),openCursor:e,count({query:c,trans:h}){let{index:N,range:k}=c;return new Promise((t,S)=>{let a=h.objectStore(E),T=N.isPrimaryKey?a:a.index(N.name),C=R(k),D=C?T.count(C):T.count();D.onsuccess=WU(p=>t(p.target.result)),D.onerror=BF(S)})}}}let{schema:d,hasGetAll:l}=B(F,Q),n=d.tables.map(W=>V(W)),J={};return n.forEach(W=>J[W.name]=W),{stack:"dbcore",transaction:F.transaction.bind(F),table(W){if(!J[W])throw new Error(`Table '${W}' not found`);return J[W]},MIN_KEY:-1/0,MAX_KEY:ZB(U),schema:d}}function RZ(F,U){return U.reduce((Q,{create:B})=>z(z({},Q),B(Q)),F)}function VZ(F,U,{IDBKeyRange:Q,indexedDB:B},R){return{dbcore:RZ(BZ(U,Q,R),F.dbcore)}}function LV({_novip:F},U){let Q=U.db,B=VZ(F._middlewares,Q,F._deps,U);F.core=B.dbcore,F.tables.forEach(R=>{let V=R.name;F.core.schema.tables.some(d=>d.name===V)&&(R.core=F.core.table(V),F[V]instanceof F.Table&&(F[V].core=R.core))})}function tR({_novip:F},U,Q,B){Q.forEach(R=>{let V=B[R];U.forEach(d=>{let l=NV(d,R);(!l||"value"in l&&l.value===void 0)&&(d===F.Transaction.prototype||d instanceof F.Transaction?nF(d,R,{get(){return this.table(R)},set(n){vd(this,R,{value:n,writable:!0,configurable:!0,enumerable:!0})}}):d[R]=new F.Table(R,V))})})}function jV({_novip:F},U){U.forEach(Q=>{for(let B in Q)Q[B]instanceof F.Table&&delete Q[B]})}function dZ(F,U){return F._cfg.version-U._cfg.version}function lZ(F,U,Q,B){let R=F._dbSchema,V=F._createTransaction("readwrite",F._storeNames,R);V.create(Q),V._completion.catch(B);let d=V._reject.bind(V),l=u.transless||u;pF(()=>{u.trans=V,u.transless=l,U===0?(SU(R).forEach(n=>{IV(Q,n,R[n].primKey,R[n].indexes)}),LV(F,Q),G.follow(()=>F.on.populate.fire(V)).catch(d)):nZ(F,U,V,Q).catch(d)})}function nZ({_novip:F},U,Q,B){let R=[],V=F._versions,d=F._dbSchema=KV(F,F.idbdb,B),l=!1;V.filter(W=>W._cfg.version>=U).forEach(W=>{R.push(()=>{let E=d,Z=W._cfg.dbschema;gV(F,E,B),gV(F,Z,B),d=F._dbSchema=Z;let e=al(E,Z);e.add.forEach(c=>{IV(B,c[0],c[1].primKey,c[1].indexes)}),e.change.forEach(c=>{if(c.recreate)throw new f.Upgrade("Not yet support for changing primary key");{let h=B.objectStore(c.name);c.add.forEach(N=>fV(h,N)),c.change.forEach(N=>{h.deleteIndex(N.name),fV(h,N)}),c.del.forEach(N=>h.deleteIndex(N))}});let r=W._cfg.contentUpgrade;if(r&&W._cfg.version>U){LV(F,B),Q._memoizedTables={},l=!0;let c=Od(Z);e.del.forEach(t=>{c[t]=E[t]}),jV(F,[F.Transaction.prototype]),tR(F,[F.Transaction.prototype],SU(c),c),Q.schema=c;let h=eV(r);h&&rQ();let N,k=G.follow(()=>{if(N=r(Q),N&&h){var t=ZF.bind(null,null);N.then(t,t)}});return N&&typeof N.then=="function"?G.resolve(N):k.then(()=>N)}}),R.push(E=>{if(!l||!uW){let Z=W._cfg.dbschema;WZ(Z,E)}jV(F,[F.Transaction.prototype]),tR(F,[F.Transaction.prototype],F._storeNames,F._dbSchema),Q.schema=F._dbSchema})});function J(){return R.length?G.resolve(R.shift()(Q.idbtrans)).then(J):G.resolve()}return J().then(()=>{JZ(d,B)})}function al(F,U){let Q={del:[],add:[],change:[]},B;for(B in F)U[B]||Q.del.push(B);for(B in U){let R=F[B],V=U[B];if(!R)Q.add.push([B,V]);else{let d={name:B,def:V,recreate:!1,del:[],add:[],change:[]};if(""+(R.primKey.keyPath||"")!=""+(V.primKey.keyPath||"")||R.primKey.auto!==V.primKey.auto&&!nR)d.recreate=!0,Q.change.push(d);else{let l=R.idxByName,n=V.idxByName,J;for(J in l)n[J]||d.del.push(J);for(J in n){let W=l[J],E=n[J];W?W.src!==E.src&&d.change.push(E):d.add.push(E)}(d.del.length>0||d.add.length>0||d.change.length>0)&&Q.change.push(d)}}}return Q}function IV(F,U,Q,B){let R=F.db.createObjectStore(U,Q.keyPath?{keyPath:Q.keyPath,autoIncrement:Q.auto}:{autoIncrement:Q.auto});return B.forEach(V=>fV(R,V)),R}function JZ(F,U){SU(F).forEach(Q=>{U.db.objectStoreNames.contains(Q)||IV(U,Q,F[Q].primKey,F[Q].indexes)})}function WZ(F,U){[].slice.call(U.db.objectStoreNames).forEach(Q=>F[Q]==null&&U.db.deleteObjectStore(Q))}function fV(F,U){F.createIndex(U.name,U.keyPath,{unique:U.unique,multiEntry:U.multi})}function KV(F,U,Q){let B={};return gB(U.objectStoreNames,0).forEach(V=>{let d=Q.objectStore(V),l=d.keyPath,n=xV(Sl(l),l||"",!1,!1,!!d.autoIncrement,l&&typeof l!="string",!0),J=[];for(let E=0;ER.add.length||R.change.length))}function gV({_novip:F},U,Q){let B=Q.db.objectStoreNames;for(let R=0;R{U=U.trim();let B=U.replace(/([&*]|\+\+)/g,""),R=/^\[/.test(B)?B.match(/^\[(.*)\]$/)[1].split("+"):B;return xV(B,R||null,/\&/.test(U),/\*/.test(U),/\+\+/.test(U),MU(R),Q===0)})}var Tl=class{_parseStoresSpec(U,Q){SU(U).forEach(B=>{if(U[B]!==null){var R=EZ(U[B]),V=R.shift();if(V.multi)throw new f.Schema("Primary key cannot be multi-valued");R.forEach(d=>{if(d.auto)throw new f.Schema("Only primary key can be marked as autoIncrement (++)");if(!d.keyPath)throw new f.Schema("Index must have a name and cannot be an empty string")}),Q[B]=el(B,V,R)}})}stores(U){let Q=this.db;this._cfg.storesSource=this._cfg.storesSource?yU(this._cfg.storesSource,U):U;let B=Q._versions,R={},V={};return B.forEach(d=>{yU(R,d._cfg.storesSource),V=d._cfg.dbschema={},d._parseStoresSpec(R,V)}),Q._dbSchema=V,jV(Q,[Q._allTables,Q,Q.Transaction.prototype]),tR(Q,[Q._allTables,Q,Q.Transaction.prototype,this._cfg.tables],SU(V),V),Q._storeNames=SU(V),this}upgrade(U){return this._cfg.contentUpgrade=hV(this._cfg.contentUpgrade||VU,U),this}};function tZ(F){return nB(Tl.prototype,function(Q){this.db=F,this._cfg={version:Q,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}function PV(F,U){let Q=F._dbNamesDB;return Q||(Q=F._dbNamesDB=new tF(JR,{addons:[],indexedDB:F,IDBKeyRange:U}),Q.version(1).stores({dbnames:"name"})),Q.table("dbnames")}function qV(F){return F&&typeof F.databases=="function"}function SZ({indexedDB:F,IDBKeyRange:U}){return qV(F)?Promise.resolve(F.databases()).then(Q=>Q.map(B=>B.name).filter(B=>B!==JR)):PV(F,U).toCollection().primaryKeys()}function eZ({indexedDB:F,IDBKeyRange:U},Q){!qV(F)&&Q!==JR&&PV(F,U).put({name:Q}).catch(VU)}function kZ({indexedDB:F,IDBKeyRange:U},Q){!qV(F)&&Q!==JR&&PV(F,U).delete(Q).catch(VU)}function _V(F){return pF(function(){return u.letThrough=!0,F()})}function aZ(){var F=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!F||!indexedDB.databases)return Promise.resolve();var U;return new Promise(function(Q){var B=function(){return indexedDB.databases().finally(Q)};U=setInterval(B,100),B()}).finally(function(){return clearInterval(U)})}function TZ(F){let U=F._state,{indexedDB:Q}=F._deps;if(U.isBeingOpened||F.idbdb)return U.dbReadyPromise.then(()=>U.dbOpenError?aU(U.dbOpenError):F);QF&&(U.openCanceller._stackHolder=IF()),U.isBeingOpened=!0,U.dbOpenError=null,U.openComplete=!1;let B=U.openCanceller;function R(){if(U.openCanceller!==B)throw new f.DatabaseClosed("db.open() was cancelled")}let V=U.dbReadyResolve,d=null,l=!1;return G.race([B,(typeof navigator=="undefined"?G.resolve():aZ()).then(()=>new G((n,J)=>{if(R(),!Q)throw new f.MissingAPI;let W=F.name,E=U.autoSchema?Q.open(W):Q.open(W,Math.round(F.verno*10));if(!E)throw new f.MissingAPI;E.onerror=BF(J),E.onblocked=WU(F._fireOnBlocked),E.onupgradeneeded=WU(Z=>{if(d=E.transaction,U.autoSchema&&!F._options.allowEmptyDB){E.onerror=JB,d.abort(),E.result.close();let r=Q.deleteDatabase(W);r.onsuccess=r.onerror=WU(()=>{J(new f.NoSuchDatabase(`Database ${W} doesnt exist`))})}else{d.onerror=BF(J);var e=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion;l=e<1,F._novip.idbdb=E.result,lZ(F,e/10,d,J)}},J),E.onsuccess=WU(()=>{d=null;let Z=F._novip.idbdb=E.result,e=gB(Z.objectStoreNames);if(e.length>0)try{let r=Z.transaction(UZ(e),"readonly");U.autoSchema?ZZ(F,Z,r):(gV(F,F._dbSchema,r),NZ(F,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),LV(F,r)}catch{}dB.push(F),Z.onversionchange=WU(r=>{U.vcFired=!0,F.on("versionchange").fire(r)}),Z.onclose=WU(r=>{F.on("close").fire(r)}),l&&eZ(F._deps,W),n()},J)}))]).then(()=>(R(),U.onReadyBeingFired=[],G.resolve(_V(()=>F.on.ready.fire(F.vip))).then(function n(){if(U.onReadyBeingFired.length>0){let J=U.onReadyBeingFired.reduce(hV,VU);return U.onReadyBeingFired=[],G.resolve(_V(()=>J(F.vip))).then(n)}}))).finally(()=>{U.onReadyBeingFired=null,U.isBeingOpened=!1}).then(()=>F).catch(n=>{U.dbOpenError=n;try{d&&d.abort()}catch{}return B===U.openCanceller&&F._close(),aU(n)}).finally(()=>{U.openComplete=!0,V()})}function AV(F){var U=d=>F.next(d),Q=d=>F.throw(d),B=V(U),R=V(Q);function V(d){return l=>{var n=d(l),J=n.value;return n.done?J:!J||typeof J.then!="function"?MU(J)?Promise.all(J).then(B,R):B(J):J.then(B,R)}}return V(U)()}function hZ(F,U,Q){var B=arguments.length;if(B<2)throw new f.InvalidArgument("Too few arguments");for(var R=new Array(B-1);--B;)R[B-1]=arguments[B];Q=R.pop();var V=Hd(R);return[F,V,Q]}function hl(F,U,Q,B,R){return G.resolve().then(()=>{let V=u.transless||u,d=F._createTransaction(U,Q,F._dbSchema,B),l={trans:d,transless:V};if(B)d.idbtrans=B.idbtrans;else try{d.create(),F._state.PR1398_maxLoop=3}catch(E){return E.name===TV.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>hl(F,U,Q,null,R))):aU(E)}let n=eV(R);n&&rQ();let J,W=G.follow(()=>{if(J=R.call(d,d),J)if(n){var E=ZF.bind(null,null);J.then(E,E)}else typeof J.next=="function"&&typeof J.throw=="function"&&(J=AV(J))},l);return(J&&typeof J.then=="function"?G.resolve(J).then(E=>d.active?E:aU(new f.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):W.then(()=>J)).then(E=>(B&&d._resolve(),d._completion.then(()=>E))).catch(E=>(d._reject(E),aU(E)))})}function SR(F,U,Q){let B=MU(F)?F.slice():[F];for(let R=0;R0,t=q(z({},r),{isVirtual:k,keyTail:e,keyLength:N,extractKey:wV(Z),unique:!k&&r.unique});if(h.push(t),t.isPrimaryKey||V.push(t),N>1){let S=N===2?Z[0]:Z.slice(0,N-1);d(S,e+1,r)}return h.sort((S,a)=>S.keyTail-a.keyTail),t}let l=d(B.primaryKey.keyPath,0,B.primaryKey);R[":id"]=[l];for(let Z of B.indexes)d(Z.keyPath,0,Z);function n(Z){let e=R[NB(Z)];return e&&e[0]}function J(Z,e){return{type:Z.type===1?2:Z.type,lower:SR(Z.lower,Z.lowerOpen?F.MAX_KEY:F.MIN_KEY,e),lowerOpen:!0,upper:SR(Z.upper,Z.upperOpen?F.MIN_KEY:F.MAX_KEY,e),upperOpen:!0}}function W(Z){let e=Z.query.index;return e.isVirtual?q(z({},Z),{query:{index:e,range:J(Z.query.range,e.keyTail)}}):Z}return q(z({},Q),{schema:q(z({},B),{primaryKey:l,indexes:V,getIndexByKeyPath:n}),count(Z){return Q.count(W(Z))},query(Z){return Q.query(W(Z))},openCursor(Z){let{keyTail:e,isVirtual:r,keyLength:c}=Z.query.index;if(!r)return Q.openCursor(Z);function h(N){function k(S){S!=null?N.continue(SR(S,Z.reverse?F.MAX_KEY:F.MIN_KEY,e)):Z.unique?N.continue(N.key.slice(0,c).concat(Z.reverse?F.MIN_KEY:F.MAX_KEY,e)):N.continue()}return Object.create(N,{continue:{value:k},continuePrimaryKey:{value(S,a){N.continuePrimaryKey(SR(S,F.MAX_KEY,e),a)}},primaryKey:{get(){return N.primaryKey}},key:{get(){let S=N.key;return c===1?S[0]:S.slice(0,c)}},value:{get(){return N.value}}})}return Q.openCursor(W(Z)).then(N=>N&&h(N))}})}})}var rZ={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:cZ};function $V(F,U,Q,B){return Q=Q||{},B=B||"",SU(F).forEach(R=>{if(!wU(U,R))Q[B+R]=void 0;else{var V=F[R],d=U[R];if(typeof V=="object"&&typeof d=="object"&&V&&d){let l=tV(V),n=tV(d);l!==n?Q[B+R]=U[R]:l==="Object"?$V(V,d,Q,B+R+"."):V!==d&&(Q[B+R]=U[R])}else V!==d&&(Q[B+R]=U[R])}}),SU(U).forEach(R=>{wU(F,R)||(Q[B+R]=U[R])}),Q}function CZ(F,U){return U.type==="delete"?U.keys:U.keys||U.values.map(F.extractKey)}var DZ={stack:"dbcore",name:"HooksMiddleware",level:2,create:F=>q(z({},F),{table(U){let Q=F.table(U),{primaryKey:B}=Q.schema;return q(z({},Q),{mutate(V){let d=u.trans,{deleting:l,creating:n,updating:J}=d.table(U).hook;switch(V.type){case"add":if(n.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"put":if(n.fire===VU&&J.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"delete":if(l.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"deleteRange":if(l.fire===VU)break;return d._promise("readwrite",()=>E(V),!0)}return Q.mutate(V);function W(e){let r=u.trans,c=e.keys||CZ(B,e);if(!c)throw new Error("Keys missing");return e=e.type==="add"||e.type==="put"?q(z({},e),{keys:c}):z({},e),e.type!=="delete"&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),pZ(Q,e,c).then(h=>{let N=c.map((k,t)=>{let S=h[t],a={onerror:null,onsuccess:null};if(e.type==="delete")l.fire.call(a,k,S,r);else if(e.type==="add"||S===void 0){let T=n.fire.call(a,k,e.values[t],r);k==null&&T!=null&&(k=T,e.keys[t]=k,B.outbound||qU(e.values[t],B.keyPath,k))}else{let T=$V(S,e.values[t]),C=J.fire.call(a,T,k,S,r);if(C){let D=e.values[t];Object.keys(C).forEach(p=>{wU(D,p)?D[p]=C[p]:qU(D,p,C[p])})}}return a});return Q.mutate(e).then(({failures:k,results:t,numFailures:S,lastResult:a})=>{for(let T=0;T(N.forEach(t=>t.onerror&&t.onerror(k)),Promise.reject(k)))})}function E(e){return Z(e.trans,e.range,1e4)}function Z(e,r,c){return Q.query({trans:e,values:!1,query:{index:B,range:r},limit:c}).then(({result:h})=>W({type:"delete",keys:h,trans:e}).then(N=>N.numFailures>0?Promise.reject(N.failures[0]):h.length({table:U=>{let Q=F.table(U);return q(z({},Q),{getMany:B=>{if(!B.cache)return Q.getMany(B);let R=cl(B.keys,B.trans._cache,B.cache==="clone");return R?G.resolve(R):Q.getMany(B).then(V=>(B.trans._cache={keys:B.keys,values:B.cache==="clone"?AQ(V):V},V))},mutate:B=>(B.type!=="add"&&(B.trans._cache=null),Q.mutate(B))})}})};function U0(F){return!("from"in F)}var EF=function(F,U){if(this)yU(this,arguments.length?{d:1,from:F,to:arguments.length>1?U:F}:{d:0});else{let Q=new EF;return F&&"d"in F&&yU(Q,F),Q}};kQ(EF.prototype,{add(F){return eR(this,F),this},addKey(F){return EB(this,F,F),this},addKeys(F){return F.forEach(U=>EB(this,U,U)),this},[SV](){return F0(this)}});function EB(F,U,Q){let B=vU(U,Q);if(isNaN(B))return;if(B>0)throw RangeError();if(U0(F))return yU(F,{from:U,to:Q,d:1});let R=F.l,V=F.r;if(vU(Q,F.from)<0)return R?EB(R,U,Q):F.l={from:U,to:Q,d:1,l:null,r:null},rl(F);if(vU(U,F.to)>0)return V?EB(V,U,Q):F.r={from:U,to:Q,d:1,l:null,r:null},rl(F);vU(U,F.from)<0&&(F.from=U,F.l=null,F.d=V?V.d+1:1),vU(Q,F.to)>0&&(F.to=Q,F.r=null,F.d=F.l?F.l.d+1:1);let d=!F.r;R&&!F.l&&eR(F,R),V&&d&&eR(F,V)}function eR(F,U){function Q(B,{from:R,to:V,l:d,r:l}){EB(B,R,V),d&&Q(B,d),l&&Q(B,l)}U0(U)||Q(F,U)}function MZ(F,U){let Q=F0(U),B=Q.next();if(B.done)return!1;let R=B.value,V=F0(F),d=V.next(R.from),l=d.value;for(;!B.done&&!d.done;){if(vU(l.from,R.to)<=0&&vU(l.to,R.from)>=0)return!0;vU(R.from,l.from)<0?R=(B=Q.next(l.from)).value:l=(d=V.next(R.from)).value}return!1}function F0(F){let U=U0(F)?null:{s:0,n:F};return{next(Q){let B=arguments.length>0;for(;U;)switch(U.s){case 0:if(U.s=1,B)for(;U.n.l&&vU(Q,U.n.from)<0;)U={up:U,n:U.n.l,s:1};else for(;U.n.l;)U={up:U,n:U.n.l,s:1};case 1:if(U.s=2,!B||vU(Q,U.n.to)<=0)return{value:U.n,done:!1};case 2:if(U.n.r){U.s=3,U={up:U,n:U.n.r,s:0};continue}case 3:U=U.up}return{done:!0}}}}function rl(F){var U,Q;let B=(((U=F.r)===null||U===void 0?void 0:U.d)||0)-(((Q=F.l)===null||Q===void 0?void 0:Q.d)||0),R=B>1?"r":B<-1?"l":"";if(R){let V=R==="r"?"l":"r",d=z({},F),l=F[R];F.from=l.from,F.to=l.to,F[R]=l[R],d[R]=l[V],F[V]=d,d.d=Cl(d)}F.d=Cl(F)}function Cl({r:F,l:U}){return(F?U?Math.max(F.d,U.d):F.d:U?U.d:0)+1}var oZ={stack:"dbcore",level:0,create:F=>{let U=F.schema.name,Q=new EF(F.MIN_KEY,F.MAX_KEY);return q(z({},F),{table:B=>{let R=F.table(B),{schema:V}=R,{primaryKey:d}=V,{extractKey:l,outbound:n}=d,J=q(z({},R),{mutate:Z=>{let e=Z.trans,r=e.mutatedParts||(e.mutatedParts={}),c=T=>{let C=`idb://${U}/${B}/${T}`;return r[C]||(r[C]=new EF)},h=c(""),N=c(":dels"),{type:k}=Z,[t,S]=Z.type==="deleteRange"?[Z.range]:Z.type==="delete"?[Z.keys]:Z.values.length<50?[[],Z.values]:[],a=Z.trans._cache;return R.mutate(Z).then(T=>{if(MU(t)){k!=="delete"&&(t=T.results),h.addKeys(t);let C=cl(t,a);!C&&k!=="add"&&N.addKeys(t),(C||S)&&iZ(c,V,C,S)}else if(t){let C={from:t.lower,to:t.upper};N.add(C),h.add(C)}else h.add(Q),N.add(Q),V.indexes.forEach(C=>c(C.name).add(Q));return T})}}),W=({query:{index:Z,range:e}})=>{var r,c;return[Z,new EF((r=e.lower)!==null&&r!==void 0?r:F.MIN_KEY,(c=e.upper)!==null&&c!==void 0?c:F.MAX_KEY)]},E={get:Z=>[d,new EF(Z.key)],getMany:Z=>[d,new EF().addKeys(Z.keys)],count:W,query:W,openCursor:W};return SU(E).forEach(Z=>{J[Z]=function(e){let{subscr:r}=u;if(r){let c=S=>{let a=`idb://${U}/${B}/${S}`;return r[a]||(r[a]=new EF)},h=c(""),N=c(":dels"),[k,t]=E[Z](e);if(c(k.name||"").add(t),!k.isPrimaryKey)if(Z==="count")N.add(Q);else{let S=Z==="query"&&n&&e.values&&R.query(q(z({},e),{values:!1}));return R[Z].apply(this,arguments).then(a=>{if(Z==="query"){if(n&&e.values)return S.then(({result:C})=>(h.addKeys(C),a));let T=e.values?a.result.map(l):a.result;e.values?h.addKeys(T):N.addKeys(T)}else if(Z==="openCursor"){let T=a,C=e.values;return T&&Object.create(T,{key:{get(){return N.addKey(T.primaryKey),T.key}},primaryKey:{get(){let D=T.primaryKey;return N.addKey(D),D}},value:{get(){return C&&h.addKey(T.primaryKey),T.value}}})}return a})}}return R[Z].apply(this,arguments)}}),J}})}};function iZ(F,U,Q,B){function R(V){let d=F(V.name||"");function l(J){return J!=null?V.extractKey(J):null}let n=J=>V.multiEntry&&MU(J)?J.forEach(W=>d.addKey(W)):d.addKey(J);(Q||B).forEach((J,W)=>{let E=Q&&l(Q[W]),Z=B&&l(B[W]);vU(E,Z)!==0&&(E!=null&&n(E),Z!=null&&n(Z))})}U.indexes.forEach(R)}var tF=class{constructor(U,Q){this._middlewares={},this.verno=0;let B=tF.dependencies;this._options=Q=z({addons:tF.addons,autoOpen:!0,indexedDB:B.indexedDB,IDBKeyRange:B.IDBKeyRange},Q),this._deps={indexedDB:Q.indexedDB,IDBKeyRange:Q.IDBKeyRange};let{addons:R}=Q;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let V={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:VU,dbReadyPromise:null,cancelOpen:VU,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};V.dbReadyPromise=new G(d=>{V.dbReadyResolve=d}),V.openCanceller=new G((d,l)=>{V.cancelOpen=l}),this._state=V,this.name=U,this.on=lB(this,"populate","blocked","versionchange","close",{ready:[hV,VU]}),this.on.ready.subscribe=Gd(this.on.ready.subscribe,d=>(l,n)=>{tF.vip(()=>{let J=this._state;if(J.openComplete)J.dbOpenError||G.resolve().then(l),n&&d(l);else if(J.onReadyBeingFired)J.onReadyBeingFired.push(l),n&&d(l);else{d(l);let W=this;n||d(function E(){W.on.ready.unsubscribe(l),W.on.ready.unsubscribe(E)})}})}),this.Collection=fW(this),this.Table=wW(this),this.Transaction=$W(this),this.Version=tZ(this),this.WhereClause=AW(this),this.on("versionchange",d=>{d.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",d=>{!d.newVersion||d.newVersionnew this.Transaction(d,l,n,this._options.chromeTransactionDurability,J),this._fireOnBlocked=d=>{this.on("blocked").fire(d),dB.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(d))},this.use(rZ),this.use(DZ),this.use(oZ),this.use(mZ),this.vip=Object.create(this,{_vip:{value:!0}}),R.forEach(d=>d(this))}version(U){if(isNaN(U)||U<.1)throw new f.Type("Given version is not a positive number");if(U=Math.round(U*10)/10,this.idbdb||this._state.isBeingOpened)throw new f.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,U);let Q=this._versions;var B=Q.filter(R=>R._cfg.version===U)[0];return B||(B=new this.Version(U),Q.push(B),Q.sort(dZ),B.stores({}),this._state.autoSchema=!1,B)}_whenReady(U){return this.idbdb&&(this._state.openComplete||u.letThrough||this._vip)?U():new G((Q,B)=>{if(this._state.openComplete)return B(new f.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen){B(new f.DatabaseClosed);return}this.open().catch(VU)}this._state.dbReadyPromise.then(Q,B)}).then(U)}use({stack:U,create:Q,level:B,name:R}){R&&this.unuse({stack:U,name:R});let V=this._middlewares[U]||(this._middlewares[U]=[]);return V.push({stack:U,create:Q,level:B??10,name:R}),V.sort((d,l)=>d.level-l.level),this}unuse({stack:U,name:Q,create:B}){return U&&this._middlewares[U]&&(this._middlewares[U]=this._middlewares[U].filter(R=>B?R.create!==B:Q?R.name!==Q:!1)),this}open(){return TZ(this)}_close(){let U=this._state,Q=dB.indexOf(this);if(Q>=0&&dB.splice(Q,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}U.dbReadyPromise=new G(B=>{U.dbReadyResolve=B}),U.openCanceller=new G((B,R)=>{U.cancelOpen=R})}close(){this._close();let U=this._state;this._options.autoOpen=!1,U.dbOpenError=new f.DatabaseClosed,U.isBeingOpened&&U.cancelOpen(U.dbOpenError)}delete(){let U=arguments.length>0,Q=this._state;return new G((B,R)=>{let V=()=>{this.close();var d=this._deps.indexedDB.deleteDatabase(this.name);d.onsuccess=WU(()=>{kZ(this._deps,this.name),B()}),d.onerror=BF(R),d.onblocked=this._fireOnBlocked};if(U)throw new f.InvalidArgument("Arguments not allowed in db.delete()");Q.isBeingOpened?Q.dbReadyPromise.then(V):V()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){let U=this._state.dbOpenError;return U&&U.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return SU(this._allTables).map(U=>this._allTables[U])}transaction(){let U=hZ.apply(this,arguments);return this._transaction.apply(this,U)}_transaction(U,Q,B){let R=u.trans;(!R||R.db!==this||U.indexOf("!")!==-1)&&(R=null);let V=U.indexOf("?")!==-1;U=U.replace("!","").replace("?","");let d,l;try{if(l=Q.map(J=>{var W=J instanceof this.Table?J.name:J;if(typeof W!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),U=="r"||U===bV)d=bV;else if(U=="rw"||U==XV)d=XV;else throw new f.InvalidArgument("Invalid transaction mode: "+U);if(R){if(R.mode===bV&&d===XV)if(V)R=null;else throw new f.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");R&&l.forEach(J=>{if(R&&R.storeNames.indexOf(J)===-1)if(V)R=null;else throw new f.SubTransaction("Table "+J+" not included in parent transaction.")}),V&&R&&!R.active&&(R=null)}}catch(J){return R?R._promise(null,(W,E)=>{E(J)}):aU(J)}let n=hl.bind(null,this,d,l,R,B);return R?R._promise(d,n,"lock"):u.trans?CQ(u.transless,()=>this._whenReady(n)):this._whenReady(n)}table(U){if(!wU(this._allTables,U))throw new f.InvalidTable(`Table ${U} does not exist`);return this._allTables[U]}},sZ=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",Dl=class{constructor(U){this._subscribe=U}subscribe(U,Q,B){return this._subscribe(!U||typeof U=="function"?{next:U,error:Q,complete:B}:U)}[sZ](){return this}};function pl(F,U){return SU(U).forEach(Q=>{let B=F[Q]||(F[Q]=new EF);eR(B,U[Q])}),F}function YZ(F){return new Dl(U=>{let Q=eV(F);function B(e){Q&&rQ();let r=()=>pF(F,{subscr:e,trans:null}),c=u.trans?CQ(u.transless,r):r();return Q&&c.then(ZF,ZF),c}let R=!1,V={},d={},l={get closed(){return R},unsubscribe:()=>{R=!0,iF.storagemutated.unsubscribe(E)}};U.start&&U.start(l);let n=!1,J=!1;function W(){return SU(d).some(e=>V[e]&&MZ(V[e],d[e]))}let E=e=>{pl(V,e),W()&&Z()},Z=()=>{if(n||R)return;V={};let e={},r=B(e);J||(iF(WB,E),J=!0),n=!0,Promise.resolve(r).then(c=>{n=!1,!R&&(W()?Z():(V={},d=e,U.next&&U.next(c)))},c=>{n=!1,U.error&&U.error(c),l.unsubscribe()})};return Z(),l})}var Q0;try{Q0={indexedDB:nU.indexedDB||nU.mozIndexedDB||nU.webkitIndexedDB||nU.msIndexedDB,IDBKeyRange:nU.IDBKeyRange||nU.webkitIDBKeyRange}}catch{Q0={indexedDB:null,IDBKeyRange:null}}var _F=tF;kQ(_F,q(z({},qB),{delete(F){return new _F(F,{addons:[]}).delete()},exists(F){return new _F(F,{addons:[]}).open().then(U=>(U.close(),!0)).catch("NoSuchDatabaseError",()=>!1)},getDatabaseNames(F){try{return SZ(_F.dependencies).then(F)}catch{return aU(new f.MissingAPI)}},defineClass(){function F(U){yU(this,U)}return F},ignoreTransaction(F){return u.trans?CQ(u.transless,F):F()},vip:_V,async:function(F){return function(){try{var U=AV(F.apply(this,arguments));return!U||typeof U.then!="function"?G.resolve(U):U}catch(Q){return aU(Q)}}},spawn:function(F,U,Q){try{var B=AV(F.apply(Q,U||[]));return!B||typeof B.then!="function"?G.resolve(B):B}catch(R){return aU(R)}},currentTransaction:{get:()=>u.trans||null},waitFor:function(F,U){let Q=G.resolve(typeof F=="function"?_F.ignoreTransaction(F):F).timeout(U||6e4);return u.trans?u.trans.waitFor(Q):Q},Promise:G,debug:{get:()=>QF,set:F=>{ud(F,F==="dexie"?()=>!0:Vl)}},derive:aQ,extend:yU,props:kQ,override:Gd,Events:lB,on:iF,liveQuery:YZ,extendObservabilitySet:pl,getByKeyPath:JF,setByKeyPath:qU,delByKeyPath:tW,shallowClone:Od,deepClone:AQ,getObjectDiff:$V,cmp:vU,asap:bd,minKey:GV,addons:[],connections:dB,errnames:TV,dependencies:Q0,semVer:Bl,version:Bl.split(".").map(F=>parseInt(F)).reduce((F,U,Q)=>F+U/Math.pow(10,Q*2))}));_F.maxKey=ZB(_F.dependencies.IDBKeyRange);typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(iF(WB,F=>{if(!SF){let U;nR?(U=document.createEvent("CustomEvent"),U.initCustomEvent(oF,!0,!0,F)):U=new CustomEvent(oF,{detail:F}),SF=!0,dispatchEvent(U),SF=!1}}),addEventListener(oF,({detail:F})=>{SF||kR(F)}));function kR(F){let U=SF;try{SF=!0,iF.storagemutated.fire(F)}finally{SF=U}}var SF=!1;if(typeof BroadcastChannel!="undefined"){let F=new BroadcastChannel(oF);iF(WB,U=>{SF||F.postMessage(U)}),F.onmessage=U=>{U.data&&kR(U.data)}}else if(typeof self!="undefined"&&typeof navigator!="undefined"){iF(WB,U=>{try{SF||(typeof localStorage!="undefined"&&localStorage.setItem(oF,JSON.stringify({trig:Math.random(),changedParts:U})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(Q=>Q.postMessage({type:oF,changedParts:U})))}catch{}}),typeof addEventListener!="undefined"&&addEventListener("storage",U=>{if(U.key===oF){let Q=JSON.parse(U.newValue);Q&&kR(Q.changedParts)}});let F=self.document&&navigator.serviceWorker;F&&F.addEventListener("message",yZ)}function yZ({data:F}){F&&F.type===oF&&kR(F.changedParts)}G.rejectionMapper=CW;ud(QF,Vl);var RF=class extends tF{constructor(){super(RF.dbName);this.version(RF.dbVersion).stores({searchHistory:"++id",minisearch:"date"})}static async clearOldDatabases(){let U=(await indexedDB.databases()).filter(Q=>Q.name===RF.dbName&&Q.version!==RF.dbVersion*10);if(U.length){console.log("Omnisearch - Those IndexedDb databases will be deleted:");for(let Q of U)Q.name&&indexedDB.deleteDatabase(Q.name)}}static getInstance(){return RF.instance||(RF.instance=new RF),RF.instance}async clearCache(){await this.minisearch.clear()}},mQ=RF;mQ.dbVersion=8,mQ.dbName="omnisearch/cache/"+app.appId;var fU=mQ.getInstance();var AF=KB(!1),B0=class extends QU.PluginSettingTab{constructor(U){super(app,U);this.plugin=U,AF.subscribe(async Q=>{O.showExcerpt=Q,await HU(this.plugin)})}display(){let{containerEl:U}=this;U.empty(),U.createEl("h2",{text:"Omnisearch"});let Q=U.createDiv();if(Q.innerHTML=` +`).slice(U).filter(wd).map(B=>` +`+B).join("")):""}var cW=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],Ld=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],aV=cW.concat(Ld),rW={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function cQ(F,U){this._e=IF(),this.name=F,this.message=U}TQ(cQ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kV(this._e,2))}},toString:function(){return this.name+": "+this.message}});function jd(F,U){return F+". Errors: "+Object.keys(U).map(Q=>U[Q].toString()).filter((Q,B,R)=>R.indexOf(Q)===B).join(` +`)}function gB(F,U,Q,B){this._e=IF(),this.failures=U,this.failedKeys=B,this.successCount=Q,this.message=jd(F,U)}TQ(gB).from(cQ);function $Q(F,U){this._e=IF(),this.name="BulkError",this.failures=Object.keys(U).map(Q=>U[Q]),this.failuresByPos=U,this.message=jd(F,U)}TQ($Q).from(cQ);var TV=aV.reduce((F,U)=>(F[U]=U+"Error",F),{}),CW=cQ,f=aV.reduce((F,U)=>{var Q=U+"Error";function B(R,V){this._e=IF(),this.name=Q,R?typeof R=="string"?(this.message=`${R}${V?` + `+V:""}`,this.inner=V||null):typeof R=="object"&&(this.message=`${R.name} ${R.message}`,this.inner=R):(this.message=rW[U]||Q,this.inner=null)}return TQ(B).from(CW),F[U]=B,F},{});f.Syntax=SyntaxError;f.Type=TypeError;f.Range=RangeError;var Id=Ld.reduce((F,U)=>(F[U+"Error"]=f[U],F),{});function DW(F,U){if(!F||F instanceof cQ||F instanceof TypeError||F instanceof SyntaxError||!F.name||!Id[F.name])return F;var Q=new Id[F.name](U||F.message,F);return"stack"in F&&nF(Q,"stack",{get:function(){return this.inner.stack}}),Q}var PB=aV.reduce((F,U)=>(["Syntax","Type","Range"].indexOf(U)===-1&&(F[U+"Error"]=f[U]),F),{});PB.ModifyError=gB;PB.DexieError=cQ;PB.BulkError=$Q;function VU(){}function UB(F){return F}function pW(F,U){return F==null||F===UB?U:function(Q){return U(F(Q))}}function fF(F,U){return function(){F.apply(this,arguments),U.apply(this,arguments)}}function mW(F,U){return F===VU?U:function(){var Q=F.apply(this,arguments);Q!==void 0&&(arguments[0]=Q);var B=this.onsuccess,R=this.onerror;this.onsuccess=null,this.onerror=null;var V=U.apply(this,arguments);return B&&(this.onsuccess=this.onsuccess?fF(B,this.onsuccess):B),R&&(this.onerror=this.onerror?fF(R,this.onerror):R),V!==void 0?V:Q}}function MW(F,U){return F===VU?U:function(){F.apply(this,arguments);var Q=this.onsuccess,B=this.onerror;this.onsuccess=this.onerror=null,U.apply(this,arguments),Q&&(this.onsuccess=this.onsuccess?fF(Q,this.onsuccess):Q),B&&(this.onerror=this.onerror?fF(B,this.onerror):B)}}function oW(F,U){return F===VU?U:function(Q){var B=F.apply(this,arguments);yU(Q,B);var R=this.onsuccess,V=this.onerror;this.onsuccess=null,this.onerror=null;var d=U.apply(this,arguments);return R&&(this.onsuccess=this.onsuccess?fF(R,this.onsuccess):R),V&&(this.onerror=this.onerror?fF(V,this.onerror):V),B===void 0?d===void 0?void 0:d:yU(B,d)}}function iW(F,U){return F===VU?U:function(){return U.apply(this,arguments)===!1?!1:F.apply(this,arguments)}}function hV(F,U){return F===VU?U:function(){var Q=F.apply(this,arguments);if(Q&&typeof Q.then=="function"){for(var B=this,R=arguments.length,V=new Array(R);R--;)V[R]=arguments[R];return Q.then(function(){return U.apply(B,V)})}return U.apply(this,arguments)}}var FB={},sW=100,YW=20,fd=100,[cV,_B,rV]=typeof Promise=="undefined"?[]:(()=>{let F=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[F,_Q(F),F];let U=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[U,_Q(U),F]})(),Kd=_B&&_B.then,qB=cV&&cV.constructor,CV=!!rV,DV=!1,yW=rV?()=>{rV.then(FR)}:nU.setImmediate?setImmediate.bind(null,FR):nU.MutationObserver?()=>{var F=document.createElement("div");new MutationObserver(()=>{FR(),F=null}).observe(F,{attributes:!0}),F.setAttribute("i","1")}:()=>{setTimeout(FR,0)},QB=function(F,U){BB.push([F,U]),AB&&(yW(),AB=!1)},pV=!0,AB=!0,KF=[],$B=[],mV=null,MV=UB,rQ={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Bl,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(F=>{try{Bl(F[0],F[1])}catch{}})}},u=rQ,BB=[],gF=0,UR=[];function G(F){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=VU,this._lib=!1;var U=this._PSD=u;if(QF&&(this._stackHolder=IF(),this._prev=null,this._numPrev=0),typeof F!="function"){if(F!==FB)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&iV(this,this._value);return}this._state=null,this._value=null,++U.ref,Pd(this,F)}var oV={get:function(){var F=u,U=RR;function Q(B,R){var V=!F.global&&(F!==u||U!==RR);let d=V&&!ZF();var l=new G((n,J)=>{sV(this,new gd(dR(B,F,V,d),dR(R,F,V,d),n,J,F))});return QF&&Ad(l,this),l}return Q.prototype=FB,Q},set:function(F){nF(this,"then",F&&F.prototype===FB?oV:{get:function(){return F},set:oV.set})}};aQ(G.prototype,{then:oV,_then:function(F,U){sV(this,new gd(null,null,F,U,u))},catch:function(F){if(arguments.length===1)return this.then(null,F);var U=arguments[0],Q=arguments[1];return typeof U=="function"?this.then(null,B=>B instanceof U?Q(B):QR(B)):this.then(null,B=>B&&B.name===U?Q(B):QR(B))},finally:function(F){return this.then(U=>(F(),U),U=>(F(),QR(U)))},stack:{get:function(){if(this._stack)return this._stack;try{DV=!0;var F=qd(this,[],YW),U=F.join(` +From previous: `);return this._state!==null&&(this._stack=U),U}finally{DV=!1}}},timeout:function(F,U){return F<1/0?new G((Q,B)=>{var R=setTimeout(()=>B(new f.Timeout(U)),F);this.then(Q,B).finally(clearTimeout.bind(null,R))}):this}});typeof Symbol!="undefined"&&Symbol.toStringTag&&nF(G.prototype,Symbol.toStringTag,"Dexie.Promise");rQ.env=$d();function gd(F,U,Q,B,R){this.onFulfilled=typeof F=="function"?F:null,this.onRejected=typeof U=="function"?U:null,this.resolve=Q,this.reject=B,this.psd=R}aQ(G,{all:function(){var F=WF.apply(null,arguments).map(VR);return new G(function(U,Q){F.length===0&&U([]);var B=F.length;F.forEach((R,V)=>G.resolve(R).then(d=>{F[V]=d,--B||U(F)},Q))})},resolve:F=>{if(F instanceof G)return F;if(F&&typeof F.then=="function")return new G((Q,B)=>{F.then(Q,B)});var U=new G(FB,!0,F);return Ad(U,mV),U},reject:QR,race:function(){var F=WF.apply(null,arguments).map(VR);return new G((U,Q)=>{F.map(B=>G.resolve(B).then(U,Q))})},PSD:{get:()=>u,set:F=>u=F},totalEchoes:{get:()=>RR},newPSD:mF,usePSD:DQ,scheduler:{get:()=>QB,set:F=>{QB=F}},rejectionMapper:{get:()=>MV,set:F=>{MV=F}},follow:(F,U)=>new G((Q,B)=>mF((R,V)=>{var d=u;d.unhandleds=[],d.onunhandled=V,d.finalize=fF(function(){GW(()=>{this.unhandleds.length===0?R():V(this.unhandleds[0])})},d.finalize),F()},U,Q,B))});qB&&(qB.allSettled&&nF(G,"allSettled",function(){let F=WF.apply(null,arguments).map(VR);return new G(U=>{F.length===0&&U([]);let Q=F.length,B=new Array(Q);F.forEach((R,V)=>G.resolve(R).then(d=>B[V]={status:"fulfilled",value:d},d=>B[V]={status:"rejected",reason:d}).then(()=>--Q||U(B)))})}),qB.any&&typeof AggregateError!="undefined"&&nF(G,"any",function(){let F=WF.apply(null,arguments).map(VR);return new G((U,Q)=>{F.length===0&&Q(new AggregateError([]));let B=F.length,R=new Array(B);F.forEach((V,d)=>G.resolve(V).then(l=>U(l),l=>{R[d]=l,--B||Q(new AggregateError(R))}))})}));function Pd(F,U){try{U(Q=>{if(F._state===null){if(Q===F)throw new TypeError("A promise cannot be resolved with itself.");var B=F._lib&&RB();Q&&typeof Q.then=="function"?Pd(F,(R,V)=>{Q instanceof G?Q._then(R,V):Q.then(R,V)}):(F._state=!0,F._value=Q,_d(F)),B&&VB()}},iV.bind(null,F))}catch(Q){iV(F,Q)}}function iV(F,U){if($B.push(U),F._state===null){var Q=F._lib&&RB();U=MV(U),F._state=!1,F._value=U,QF&&U!==null&&typeof U=="object"&&!U._promise&&tW(()=>{var B=NV(U,"stack");U._promise=F,nF(U,"stack",{get:()=>DV?B&&(B.get?B.get.apply(U):B.value):F.stack})}),bW(F),_d(F),Q&&VB()}}function _d(F){var U=F._listeners;F._listeners=[];for(var Q=0,B=U.length;Q{--gF==0&&YV()},[]))}function sV(F,U){if(F._state===null){F._listeners.push(U);return}var Q=F._state?U.onFulfilled:U.onRejected;if(Q===null)return(F._state?U.resolve:U.reject)(F._value);++U.psd.ref,++gF,QB(vW,[Q,F,U])}function vW(F,U,Q){try{mV=U;var B,R=U._value;U._state?B=F(R):($B.length&&($B=[]),B=F(R),$B.indexOf(R)===-1&&XW(U)),Q.resolve(B)}catch(V){Q.reject(V)}finally{mV=null,--gF==0&&YV(),--Q.psd.ref||Q.psd.finalize()}}function qd(F,U,Q){if(U.length===Q)return U;var B="";if(F._state===!1){var R=F._value,V,d;R!=null?(V=R.name||"Error",d=R.message||R,B=kV(R,0)):(V=R,d=""),U.push(V+(d?": "+d:"")+B)}return QF&&(B=kV(F._stackHolder,2),B&&U.indexOf(B)===-1&&U.push(B),F._prev&&qd(F._prev,U,Q)),U}function Ad(F,U){var Q=U?U._numPrev+1:0;Q0;)for(F=BB,BB=[],Q=F.length,U=0;U0);pV=!0,AB=!0}function YV(){var F=KF;KF=[],F.forEach(B=>{B._PSD.onunhandled.call(null,B._value,B)});for(var U=UR.slice(0),Q=U.length;Q;)U[--Q]()}function GW(F){function U(){F(),UR.splice(UR.indexOf(U),1)}UR.push(U),++gF,QB(()=>{--gF==0&&YV()},[])}function bW(F){KF.some(U=>U._value===F._value)||KF.push(F)}function XW(F){for(var U=KF.length;U;)if(KF[--U]._value===F._value){KF.splice(U,1);return}}function QR(F){return new G(FB,!1,F)}function WU(F,U){var Q=u;return function(){var B=RB(),R=u;try{return MF(Q,!0),F.apply(this,arguments)}catch(V){U&&U(V)}finally{MF(R,!1),B&&VB()}}}var oU={awaits:0,echoes:0,id:0},OW=0,BR=[],yV=0,RR=0,HW=0;function mF(F,U,Q,B){var R=u,V=Object.create(R);V.parent=R,V.ref=0,V.global=!1,V.id=++HW;var d=rQ.env;V.env=CV?{Promise:G,PromiseProp:{value:G,configurable:!0,writable:!0},all:G.all,race:G.race,allSettled:G.allSettled,any:G.any,resolve:G.resolve,reject:G.reject,nthen:Fl(d.nthen,V),gthen:Fl(d.gthen,V)}:{},U&&yU(V,U),++R.ref,V.finalize=function(){--this.parent.ref||this.parent.finalize()};var l=DQ(V,F,Q,B);return V.ref===0&&V.finalize(),l}function CQ(){return oU.id||(oU.id=++OW),++oU.awaits,oU.echoes+=fd,oU.id}function ZF(){return oU.awaits?(--oU.awaits==0&&(oU.id=0),oU.echoes=oU.awaits*fd,!0):!1}(""+Kd).indexOf("[native code]")===-1&&(CQ=ZF=VU);function VR(F){return oU.echoes&&F&&F.constructor===qB?(CQ(),F.then(U=>(ZF(),U),U=>(ZF(),aU(U)))):F}function zW(F){++RR,(!oU.echoes||--oU.echoes==0)&&(oU.echoes=oU.id=0),BR.push(u),MF(F,!0)}function uW(){var F=BR[BR.length-1];BR.pop(),MF(F,!1)}function MF(F,U){var Q=u;if((U?oU.echoes&&(!yV++||F!==u):yV&&(!--yV||F!==u))&&Ul(U?zW.bind(null,F):uW),F!==u&&(u=F,Q===rQ&&(rQ.env=$d()),CV)){var B=rQ.env.Promise,R=F.env;_B.then=R.nthen,B.prototype.then=R.gthen,(Q.global||F.global)&&(Object.defineProperty(nU,"Promise",R.PromiseProp),B.all=R.all,B.race=R.race,B.resolve=R.resolve,B.reject=R.reject,R.allSettled&&(B.allSettled=R.allSettled),R.any&&(B.any=R.any))}}function $d(){var F=nU.Promise;return CV?{Promise:F,PromiseProp:Object.getOwnPropertyDescriptor(nU,"Promise"),all:F.all,race:F.race,allSettled:F.allSettled,any:F.any,resolve:F.resolve,reject:F.reject,nthen:_B.then,gthen:F.prototype.then}:{}}function DQ(F,U,Q,B,R){var V=u;try{return MF(F,!0),U(Q,B,R)}finally{MF(V,!1)}}function Ul(F){Kd.call(cV,F)}function dR(F,U,Q,B){return typeof F!="function"?F:function(){var R=u;Q&&CQ(),MF(U,!0);try{return F.apply(this,arguments)}finally{MF(R,!1),B&&Ul(ZF)}}}function Fl(F,U){return function(Q,B){return F.call(this,dR(Q,U),dR(B,U))}}var Ql="unhandledrejection";function Bl(F,U){var Q;try{Q=U.onuncatched(F)}catch{}if(Q!==!1)try{var B,R={promise:U,reason:F};if(nU.document&&document.createEvent?(B=document.createEvent("Event"),B.initEvent(Ql,!0,!0),yU(B,R)):nU.CustomEvent&&(B=new CustomEvent(Ql,{detail:R}),yU(B,R)),B&&nU.dispatchEvent&&(dispatchEvent(B),!nU.PromiseRejectionEvent&&nU.onunhandledrejection))try{nU.onunhandledrejection(B)}catch{}QF&&B&&!B.defaultPrevented&&console.warn(`Unhandled rejection: ${F.stack||F}`)}catch{}}var aU=G.reject;function vV(F,U,Q,B){if(!F.idbdb||!F._state.openComplete&&!u.letThrough&&!F._vip){if(F._state.openComplete)return aU(new f.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._options.autoOpen)return aU(new f.DatabaseClosed);F.open().catch(VU)}return F._state.dbReadyPromise.then(()=>vV(F,U,Q,B))}else{var R=F._createTransaction(U,Q,F._dbSchema);try{R.create(),F._state.PR1398_maxLoop=3}catch(V){return V.name===TV.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>vV(F,U,Q,B))):aU(V)}return R._promise(U,(V,d)=>mF(()=>(u.trans=R,B(V,d,R)))).then(V=>R._completion.then(()=>V))}}var Rl="3.2.2",PF=String.fromCharCode(65535),GV=-1/0,NF="Invalid key provided. Keys must be of type string, number, Date or Array.",Vl="String expected.",dB=[],lR=typeof navigator!="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),xW=lR,wW=lR,dl=F=>!/(dexie\.js|dexie\.min\.js)/.test(F),nR="__dbnames",bV="readonly",XV="readwrite";function _F(F,U){return F?U?function(){return F.apply(this,arguments)&&U.apply(this,arguments)}:F:U}var ll={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function JR(F){return typeof F=="string"&&!/\./.test(F)?U=>(U[F]===void 0&&F in U&&(U=AQ(U),delete U[F]),U):U=>U}var nl=class{_trans(U,Q,B){let R=this._tx||u.trans,V=this.name;function d(n,J,W){if(!W.schema[V])throw new f.NotFound("Table "+V+" not part of transaction");return Q(W.idbtrans,W)}let l=RB();try{return R&&R.db===this.db?R===u.trans?R._promise(U,d,B):mF(()=>R._promise(U,d,B),{trans:R,transless:u.transless||u}):vV(this.db,U,[this.name],d)}finally{l&&VB()}}get(U,Q){return U&&U.constructor===Object?this.where(U).first(Q):this._trans("readonly",B=>this.core.get({trans:B,key:U}).then(R=>this.hook.reading.fire(R))).then(Q)}where(U){if(typeof U=="string")return new this.db.WhereClause(this,U);if(MU(U))return new this.db.WhereClause(this,`[${U.join("+")}]`);let Q=SU(U);if(Q.length===1)return this.where(Q[0]).equals(U[Q[0]]);let B=this.schema.indexes.concat(this.schema.primKey).filter(J=>J.compound&&Q.every(W=>J.keyPath.indexOf(W)>=0)&&J.keyPath.every(W=>Q.indexOf(W)>=0))[0];if(B&&this.db._maxKey!==PF)return this.where(B.name).equals(B.keyPath.map(J=>U[J]));!B&&QF&&console.warn(`The query ${JSON.stringify(U)} on ${this.name} would benefit of a compound index [${Q.join("+")}]`);let{idxByName:R}=this.schema,V=this.db._deps.indexedDB;function d(J,W){try{return V.cmp(J,W)===0}catch{return!1}}let[l,n]=Q.reduce(([J,W],E)=>{let Z=R[E],e=U[E];return[J||Z,J||!Z?_F(W,Z&&Z.multi?r=>{let c=JF(r,E);return MU(c)&&c.some(h=>d(e,h))}:r=>d(e,JF(r,E))):W]},[null,null]);return l?this.where(l.name).equals(U[l.keyPath]).filter(n):B?this.filter(n):this.where(Q).equals("")}filter(U){return this.toCollection().and(U)}count(U){return this.toCollection().count(U)}offset(U){return this.toCollection().offset(U)}limit(U){return this.toCollection().limit(U)}each(U){return this.toCollection().each(U)}toArray(U){return this.toCollection().toArray(U)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(U){return new this.db.Collection(new this.db.WhereClause(this,MU(U)?`[${U.join("+")}]`:U))}reverse(){return this.toCollection().reverse()}mapToClass(U){this.schema.mappedClass=U;let Q=B=>{if(!B)return B;let R=Object.create(U.prototype);for(var V in B)if(wU(B,V))try{R[V]=B[V]}catch{}return R};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=Q,this.hook("reading",Q),U}defineClass(){function U(Q){yU(this,Q)}return this.mapToClass(U)}add(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=JR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"add",keys:Q!=null?[Q]:null,values:[V]})).then(d=>d.numFailures?G.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{_U(U,R,d)}catch{}return d})}update(U,Q){if(typeof U=="object"&&!MU(U)){let B=JF(U,this.schema.primKey.keyPath);if(B===void 0)return aU(new f.InvalidArgument("Given object does not contain its primary key"));try{typeof Q!="function"?SU(Q).forEach(R=>{_U(U,R,Q[R])}):Q(U,{value:U,primKey:B})}catch{}return this.where(":id").equals(B).modify(Q)}else return this.where(":id").equals(U).modify(Q)}put(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=JR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"put",values:[V],keys:Q!=null?[Q]:null})).then(d=>d.numFailures?G.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{_U(U,R,d)}catch{}return d})}delete(U){return this._trans("readwrite",Q=>this.core.mutate({trans:Q,type:"delete",keys:[U]})).then(Q=>Q.numFailures?G.reject(Q.failures[0]):void 0)}clear(){return this._trans("readwrite",U=>this.core.mutate({trans:U,type:"deleteRange",range:ll})).then(U=>U.numFailures?G.reject(U.failures[0]):void 0)}bulkGet(U){return this._trans("readonly",Q=>this.core.getMany({keys:U,trans:Q}).then(B=>B.map(R=>this.hook.reading.fire(R))))}bulkAdd(U,Q,B){let R=Array.isArray(Q)?Q:void 0;B=B||(R?void 0:Q);let V=B?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new f.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new f.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(JR(n)):U;return this.core.mutate({trans:d,type:"add",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{let c=V?Z:e;if(E===0)return c;throw new $Q(`${this.name}.bulkAdd(): ${E} of ${J} operations failed`,r)})})}bulkPut(U,Q,B){let R=Array.isArray(Q)?Q:void 0;B=B||(R?void 0:Q);let V=B?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new f.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new f.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(JR(n)):U;return this.core.mutate({trans:d,type:"put",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{let c=V?Z:e;if(E===0)return c;throw new $Q(`${this.name}.bulkPut(): ${E} of ${J} operations failed`,r)})})}bulkDelete(U){let Q=U.length;return this._trans("readwrite",B=>this.core.mutate({trans:B,type:"delete",keys:U})).then(({numFailures:B,lastResult:R,failures:V})=>{if(B===0)return R;throw new $Q(`${this.name}.bulkDelete(): ${B} of ${Q} operations failed`,V)})}};function lB(F){var U={},Q=function(l,n){if(n){for(var J=arguments.length,W=new Array(J-1);--J;)W[J-1]=arguments[J];return U[l].subscribe.apply(null,W),F}else if(typeof l=="string")return U[l]};Q.addEventType=V;for(var B=1,R=arguments.length;B_F(B(),U()):U,F.justLimit=Q&&!B}function jW(F,U){F.isMatch=_F(F.isMatch,U)}function WR(F,U){if(F.isPrimKey)return U.primaryKey;let Q=U.getIndexByKeyPath(F.index);if(!Q)throw new f.Schema("KeyPath "+F.index+" on object store "+U.name+" is not indexed");return Q}function Jl(F,U,Q){let B=WR(F,U.schema);return U.openCursor({trans:Q,values:!F.keysOnly,reverse:F.dir==="prev",unique:!!F.unique,query:{index:B,range:F.range}})}function ZR(F,U,Q,B){let R=F.replayFilter?_F(F.filter,F.replayFilter()):F.filter;if(F.or){let V={},d=(l,n,J)=>{if(!R||R(n,J,Z=>n.stop(Z),Z=>n.fail(Z))){var W=n.primaryKey,E=""+W;E==="[object ArrayBuffer]"&&(E=""+new Uint8Array(W)),wU(V,E)||(V[E]=!0,U(l,n,J))}};return Promise.all([F.or._iterate(d,Q),Wl(Jl(F,B,Q),F.algorithm,d,!F.keysOnly&&F.valueMapper)])}else return Wl(Jl(F,B,Q),_F(F.algorithm,R),U,!F.keysOnly&&F.valueMapper)}function Wl(F,U,Q,B){var R=B?(d,l,n)=>Q(B(d),l,n):Q,V=WU(R);return F.then(d=>{if(d)return d.start(()=>{var l=()=>d.continue();(!U||U(d,n=>l=n,n=>{d.stop(n),l=VU},n=>{d.fail(n),l=VU}))&&V(d.value,d,n=>l=n),l()})})}function vU(F,U){try{let Q=Zl(F),B=Zl(U);if(Q!==B)return Q==="Array"?1:B==="Array"?-1:Q==="binary"?1:B==="binary"?-1:Q==="string"?1:B==="string"?-1:Q==="Date"?1:B!=="Date"?NaN:-1;switch(Q){case"number":case"Date":case"string":return F>U?1:FZR(Q,U,B,Q.table.core))}count(U){return this._read(Q=>{let B=this._ctx,R=B.table.core;if(pQ(B,!0))return R.count({trans:Q,query:{index:WR(B,R.schema),range:B.range}}).then(d=>Math.min(d,B.limit));var V=0;return ZR(B,()=>(++V,!1),Q,R).then(()=>V)}).then(U)}sortBy(U,Q){let B=U.split(".").reverse(),R=B[0],V=B.length-1;function d(J,W){return W?d(J[B[W]],W-1):J[R]}var l=this._ctx.dir==="next"?1:-1;function n(J,W){var E=d(J,V),Z=d(W,V);return EZ?l:0}return this.toArray(function(J){return J.sort(n)}).then(Q)}toArray(U){return this._read(Q=>{var B=this._ctx;if(B.dir==="next"&&pQ(B,!0)&&B.limit>0){let{valueMapper:R}=B,V=WR(B,B.table.core.schema);return B.table.core.query({trans:Q,limit:B.limit,values:!0,query:{index:V,range:B.range}}).then(({result:d})=>R?d.map(R):d)}else{let R=[];return ZR(B,V=>R.push(V),Q,B.table.core).then(()=>R)}},U)}offset(U){var Q=this._ctx;return U<=0?this:(Q.offset+=U,pQ(Q)?HV(Q,()=>{var B=U;return(R,V)=>B===0?!0:B===1?(--B,!1):(V(()=>{R.advance(B),B=0}),!1)}):HV(Q,()=>{var B=U;return()=>--B<0}),this)}limit(U){return this._ctx.limit=Math.min(this._ctx.limit,U),HV(this._ctx,()=>{var Q=U;return function(B,R,V){return--Q<=0&&R(V),Q>=0}},!0),this}until(U,Q){return OV(this._ctx,function(B,R,V){return U(B.value)?(R(V),Q):!0}),this}first(U){return this.limit(1).toArray(function(Q){return Q[0]}).then(U)}last(U){return this.reverse().first(U)}filter(U){return OV(this._ctx,function(Q){return U(Q.value)}),jW(this._ctx,U),this}and(U){return this.filter(U)}or(U){return new this.db.WhereClause(this._ctx.table,U,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.key,R)})}eachUniqueKey(U){return this._ctx.unique="unique",this.eachKey(U)}eachPrimaryKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.primaryKey,R)})}keys(U){var Q=this._ctx;Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.key)}).then(function(){return B}).then(U)}primaryKeys(U){var Q=this._ctx;if(Q.dir==="next"&&pQ(Q,!0)&&Q.limit>0)return this._read(R=>{var V=WR(Q,Q.table.core.schema);return Q.table.core.query({trans:R,values:!1,limit:Q.limit,query:{index:V,range:Q.range}})}).then(({result:R})=>R).then(U);Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.primaryKey)}).then(function(){return B}).then(U)}uniqueKeys(U){return this._ctx.unique="unique",this.keys(U)}firstKey(U){return this.limit(1).keys(function(Q){return Q[0]}).then(U)}lastKey(U){return this.reverse().firstKey(U)}distinct(){var U=this._ctx,Q=U.index&&U.table.schema.idxByName[U.index];if(!Q||!Q.multi)return this;var B={};return OV(this._ctx,function(R){var V=R.primaryKey.toString(),d=wU(B,V);return B[V]=!0,!d}),this}modify(U){var Q=this._ctx;return this._write(B=>{var R;if(typeof U=="function")R=U;else{var V=SU(U),d=V.length;R=function(c){for(var h=!1,N=0;N{let{failures:N,numFailures:k}=h;Z+=c-k;for(let t of SU(N))E.push(N[t])};return this.clone().primaryKeys().then(c=>{let h=N=>{let k=Math.min(W,c.length-N);return l.getMany({trans:B,keys:c.slice(N,N+k),cache:"immutable"}).then(t=>{let S=[],a=[],T=n?[]:null,C=[];for(let p=0;p0&&l.mutate({trans:B,type:"add",values:S}).then(p=>{for(let o in p.failures)C.splice(parseInt(o),1);r(S.length,p)})).then(()=>(a.length>0||D&&typeof U=="object")&&l.mutate({trans:B,type:"put",keys:T,values:a,criteria:D,changeSpec:typeof U!="function"&&U}).then(p=>r(a.length,p))).then(()=>(C.length>0||D&&U===zV)&&l.mutate({trans:B,type:"delete",keys:C,criteria:D}).then(p=>r(C.length,p))).then(()=>c.length>N+k&&h(N+W))})};return h(0).then(()=>{if(E.length>0)throw new gB("Error modifying one or more objects",E,Z,e);return c.length})})})}delete(){var U=this._ctx,Q=U.range;return pQ(U)&&(U.isPrimKey&&!wW||Q.type===3)?this._write(B=>{let{primaryKey:R}=U.table.core.schema,V=Q;return U.table.core.count({trans:B,query:{index:R,range:V}}).then(d=>U.table.core.mutate({trans:B,type:"deleteRange",range:V}).then(({failures:l,lastResult:n,results:J,numFailures:W})=>{if(W)throw new gB("Could not delete some values",Object.keys(l).map(E=>l[E]),d-W);return d-W}))}):this.modify(zV)}},zV=(F,U)=>U.value=null;function KW(F){return nB(El.prototype,function(Q,B){this.db=F;let R=ll,V=null;if(B)try{R=B()}catch(J){V=J}let d=Q._ctx,l=d.table,n=l.hook.reading.fire;this._ctx={table:l,index:d.index,isPrimKey:!d.index||l.schema.primKey.keyPath&&d.index===l.schema.primKey.name,range:R,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:V,or:d.or,valueMapper:n!==UB?n:null}})}function gW(F,U){return FU?-1:F===U?0:1}function LU(F,U,Q){var B=F instanceof uV?new F.Collection(F):F;return B._ctx.error=Q?new Q(U):new TypeError(U),B}function mQ(F){return new F.Collection(F,()=>tl("")).limit(0)}function _W(F){return F==="next"?U=>U.toUpperCase():U=>U.toLowerCase()}function qW(F){return F==="next"?U=>U.toLowerCase():U=>U.toUpperCase()}function AW(F,U,Q,B,R,V){for(var d=Math.min(F.length,B.length),l=-1,n=0;n=0?F.substr(0,l)+U[l]+Q.substr(l+1):null;R(F[n],J)<0&&(l=n)}return dtypeof c=="string"))return LU(F,Vl);function Z(c){R=_W(c),V=qW(c),d=c==="next"?gW:PW;var h=Q.map(function(N){return{lower:V(N),upper:R(N)}}).sort(function(N,k){return d(N.lower,k.lower)});l=h.map(function(N){return N.upper}),n=h.map(function(N){return N.lower}),J=c,W=c==="next"?"":B}Z("next");var e=new F.Collection(F,()=>oF(l[0],n[E-1]+B));e._ondirectionchange=function(c){Z(c)};var r=0;return e._addAlgorithm(function(c,h,N){var k=c.key;if(typeof k!="string")return!1;var t=V(k);if(U(t,n,r))return!0;for(var S=null,a=r;a0)&&(S=T)}return h(S!==null?function(){c.continue(S+W)}:N),!1}),e}function oF(F,U,Q,B){return{type:2,lower:F,upper:U,lowerOpen:Q,upperOpen:B}}function tl(F){return{type:1,lower:F,upper:F}}var uV=class{get Collection(){return this._ctx.table.db.Collection}between(U,Q,B,R){B=B!==!1,R=R===!0;try{return this._cmp(U,Q)>0||this._cmp(U,Q)===0&&(B||R)&&!(B&&R)?mQ(this):new this.Collection(this,()=>oF(U,Q,!B,!R))}catch{return LU(this,NF)}}equals(U){return U==null?LU(this,NF):new this.Collection(this,()=>tl(U))}above(U){return U==null?LU(this,NF):new this.Collection(this,()=>oF(U,void 0,!0))}aboveOrEqual(U){return U==null?LU(this,NF):new this.Collection(this,()=>oF(U,void 0,!1))}below(U){return U==null?LU(this,NF):new this.Collection(this,()=>oF(void 0,U,!1,!0))}belowOrEqual(U){return U==null?LU(this,NF):new this.Collection(this,()=>oF(void 0,U))}startsWith(U){return typeof U!="string"?LU(this,Vl):this.between(U,U+PF,!0,!0)}startsWithIgnoreCase(U){return U===""?this.startsWith(U):NR(this,(Q,B)=>Q.indexOf(B[0])===0,[U],PF)}equalsIgnoreCase(U){return NR(this,(Q,B)=>Q===B[0],[U],"")}anyOfIgnoreCase(){var U=WF.apply(hQ,arguments);return U.length===0?mQ(this):NR(this,(Q,B)=>B.indexOf(Q)!==-1,U,"")}startsWithAnyOfIgnoreCase(){var U=WF.apply(hQ,arguments);return U.length===0?mQ(this):NR(this,(Q,B)=>B.some(R=>Q.indexOf(R)===0),U,PF)}anyOf(){let U=WF.apply(hQ,arguments),Q=this._cmp;try{U.sort(Q)}catch{return LU(this,NF)}if(U.length===0)return mQ(this);let B=new this.Collection(this,()=>oF(U[0],U[U.length-1]));B._ondirectionchange=V=>{Q=V==="next"?this._ascending:this._descending,U.sort(Q)};let R=0;return B._addAlgorithm((V,d,l)=>{let n=V.key;for(;Q(n,U[R])>0;)if(++R,R===U.length)return d(l),!1;return Q(n,U[R])===0?!0:(d(()=>{V.continue(U[R])}),!1)}),B}notEqual(U){return this.inAnyRange([[GV,U],[U,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let U=WF.apply(hQ,arguments);if(U.length===0)return new this.Collection(this);try{U.sort(this._ascending)}catch{return LU(this,NF)}let Q=U.reduce((B,R)=>B?B.concat([[B[B.length-1][1],R]]):[[GV,R]],null);return Q.push([U[U.length-1],this.db._maxKey]),this.inAnyRange(Q,{includeLowers:!1,includeUppers:!1})}inAnyRange(U,Q){let B=this._cmp,R=this._ascending,V=this._descending,d=this._min,l=this._max;if(U.length===0)return mQ(this);if(!U.every(S=>S[0]!==void 0&&S[1]!==void 0&&R(S[0],S[1])<=0))return LU(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",f.InvalidArgument);let n=!Q||Q.includeLowers!==!1,J=Q&&Q.includeUppers===!0;function W(S,a){let T=0,C=S.length;for(;T0){D[0]=d(D[0],a[0]),D[1]=l(D[1],a[1]);break}}return T===C&&S.push(a),S}let E=R;function Z(S,a){return E(S[0],a[0])}let e;try{e=U.reduce(W,[]),e.sort(Z)}catch{return LU(this,NF)}let r=0,c=J?S=>R(S,e[r][1])>0:S=>R(S,e[r][1])>=0,h=n?S=>V(S,e[r][0])>0:S=>V(S,e[r][0])>=0;function N(S){return!c(S)&&!h(S)}let k=c,t=new this.Collection(this,()=>oF(e[0][0],e[e.length-1][1],!n,!J));return t._ondirectionchange=S=>{S==="next"?(k=c,E=R):(k=h,E=V),e.sort(Z)},t._addAlgorithm((S,a,T)=>{for(var C=S.key;k(C);)if(++r,r===e.length)return a(T),!1;return N(C)?!0:(this._cmp(C,e[r][1])===0||this._cmp(C,e[r][0])===0||a(()=>{E===R?S.continue(e[r][0]):S.continue(e[r][1])}),!1)}),t}startsWithAnyOf(){let U=WF.apply(hQ,arguments);return U.every(Q=>typeof Q=="string")?U.length===0?mQ(this):this.inAnyRange(U.map(Q=>[Q,Q+PF])):LU(this,"startsWithAnyOf() only works with strings")}};function $W(F){return nB(uV.prototype,function(Q,B,R){this.db=F,this._ctx={table:Q,index:B===":id"?null:B,or:R};let V=F._deps.indexedDB;if(!V)throw new f.MissingAPI;this._cmp=this._ascending=V.cmp.bind(V),this._descending=(d,l)=>V.cmp(l,d),this._max=(d,l)=>V.cmp(d,l)>0?d:l,this._min=(d,l)=>V.cmp(d,l)<0?d:l,this._IDBKeyRange=F._deps.IDBKeyRange})}function BF(F){return WU(function(U){return JB(U),F(U.target.error),!1})}function JB(F){F.stopPropagation&&F.stopPropagation(),F.preventDefault&&F.preventDefault()}var WB="storagemutated",iF="x-storagemutated-1",sF=lB(null,WB),Sl=class{_lock(){return qQ(!u.global),++this._reculock,this._reculock===1&&!u.global&&(u.lockOwnerFor=this),this}_unlock(){if(qQ(!u.global),--this._reculock==0)for(u.global||(u.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var U=this._blockedFuncs.shift();try{DQ(U[1],U[0])}catch{}}return this}_locked(){return this._reculock&&u.lockOwnerFor!==this}create(U){if(!this.mode)return this;let Q=this.db.idbdb,B=this.db._state.dbOpenError;if(qQ(!this.idbtrans),!U&&!Q)switch(B&&B.name){case"DatabaseClosedError":throw new f.DatabaseClosed(B);case"MissingAPIError":throw new f.MissingAPI(B.message,B);default:throw new f.OpenFailed(B)}if(!this.active)throw new f.TransactionInactive;return qQ(this._completion._state===null),U=this.idbtrans=U||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):Q.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),U.onerror=WU(R=>{JB(R),this._reject(U.error)}),U.onabort=WU(R=>{JB(R),this.active&&this._reject(new f.Abort(U.error)),this.active=!1,this.on("abort").fire(R)}),U.oncomplete=WU(()=>{this.active=!1,this._resolve(),"mutatedParts"in U&&sF.storagemutated.fire(U.mutatedParts)}),this}_promise(U,Q,B){if(U==="readwrite"&&this.mode!=="readwrite")return aU(new f.ReadOnly("Transaction is readonly"));if(!this.active)return aU(new f.TransactionInactive);if(this._locked())return new G((V,d)=>{this._blockedFuncs.push([()=>{this._promise(U,Q,B).then(V,d)},u])});if(B)return mF(()=>{var V=new G((d,l)=>{this._lock();let n=Q(d,l,this);n&&n.then&&n.then(d,l)});return V.finally(()=>this._unlock()),V._lib=!0,V});var R=new G((V,d)=>{var l=Q(V,d,this);l&&l.then&&l.then(V,d)});return R._lib=!0,R}_root(){return this.parent?this.parent._root():this}waitFor(U){var Q=this._root();let B=G.resolve(U);if(Q._waitingFor)Q._waitingFor=Q._waitingFor.then(()=>B);else{Q._waitingFor=B,Q._waitingQueue=[];var R=Q.idbtrans.objectStore(Q.storeNames[0]);(function d(){for(++Q._spinCount;Q._waitingQueue.length;)Q._waitingQueue.shift()();Q._waitingFor&&(R.get(-1/0).onsuccess=d)})()}var V=Q._waitingFor;return new G((d,l)=>{B.then(n=>Q._waitingQueue.push(WU(d.bind(null,n))),n=>Q._waitingQueue.push(WU(l.bind(null,n)))).finally(()=>{Q._waitingFor===V&&(Q._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new f.Abort))}table(U){let Q=this._memoizedTables||(this._memoizedTables={});if(wU(Q,U))return Q[U];let B=this.schema[U];if(!B)throw new f.NotFound("Table "+U+" not part of transaction");let R=new this.db.Table(U,B,this);return R.core=this.db.core.table(U),Q[U]=R,R}};function UZ(F){return nB(Sl.prototype,function(Q,B,R,V,d){this.db=F,this.mode=Q,this.storeNames=B,this.schema=R,this.chromeTransactionDurability=V,this.idbtrans=null,this.on=lB(this,"complete","error","abort"),this.parent=d||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new G((l,n)=>{this._resolve=l,this._reject=n}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},l=>{var n=this.active;return this.active=!1,this.on.error.fire(l),this.parent?this.parent._reject(l):n&&this.idbtrans&&this.idbtrans.abort(),aU(l)})})}function xV(F,U,Q,B,R,V,d){return{name:F,keyPath:U,unique:Q,multi:B,auto:R,compound:V,src:(Q&&!d?"&":"")+(B?"*":"")+(R?"++":"")+el(U)}}function el(F){return typeof F=="string"?F:F?"["+[].join.call(F,"+")+"]":""}function kl(F,U,Q){return{name:F,primKey:U,indexes:Q,mappedClass:null,idxByName:Od(Q,B=>[B.name,B])}}function FZ(F){return F.length===1?F[0]:F}var ZB=F=>{try{return F.only([[]]),ZB=()=>[[]],[[]]}catch{return ZB=()=>PF,PF}};function wV(F){return F==null?()=>{}:typeof F=="string"?QZ(F):U=>JF(U,F)}function QZ(F){return F.split(".").length===1?Q=>Q[F]:Q=>JF(Q,F)}function al(F){return[].slice.call(F)}var BZ=0;function NB(F){return F==null?":id":typeof F=="string"?F:`[${F.join("+")}]`}function RZ(F,U,Q){function B(W,E){let Z=al(W.objectStoreNames);return{schema:{name:W.name,tables:Z.map(e=>E.objectStore(e)).map(e=>{let{keyPath:r,autoIncrement:c}=e,h=MU(r),N=r==null,k={},t={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:N,compound:h,keyPath:r,autoIncrement:c,unique:!0,extractKey:wV(r)},indexes:al(e.indexNames).map(S=>e.index(S)).map(S=>{let{name:a,unique:T,multiEntry:C,keyPath:D}=S,p=MU(D),o={name:a,compound:p,keyPath:D,unique:T,multiEntry:C,extractKey:wV(D)};return k[NB(D)]=o,o}),getIndexByKeyPath:S=>k[NB(S)]};return k[":id"]=t.primaryKey,r!=null&&(k[NB(r)]=t.primaryKey),t})},hasGetAll:Z.length>0&&"getAll"in E.objectStore(Z[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function R(W){if(W.type===3)return null;if(W.type===4)throw new Error("Cannot convert never type to IDBKeyRange");let{lower:E,upper:Z,lowerOpen:e,upperOpen:r}=W;return E===void 0?Z===void 0?null:U.upperBound(Z,!!r):Z===void 0?U.lowerBound(E,!!e):U.bound(E,Z,!!e,!!r)}function V(W){let E=W.name;function Z({trans:c,type:h,keys:N,values:k,range:t}){return new Promise((S,a)=>{S=WU(S);let T=c.objectStore(E),C=T.keyPath==null,D=h==="put"||h==="add";if(!D&&h!=="delete"&&h!=="deleteRange")throw new Error("Invalid operation type: "+h);let{length:p}=N||k||{length:1};if(N&&k&&N.length!==k.length)throw new Error("Given keys array must have same length as given values array.");if(p===0)return S({numFailures:0,failures:{},results:[],lastResult:void 0});let o,s=[],v=[],y=0,i=g=>{++y,JB(g)};if(h==="deleteRange"){if(t.type===4)return S({numFailures:y,failures:v,results:[],lastResult:void 0});t.type===3?s.push(o=T.clear()):s.push(o=T.delete(R(t)))}else{let[g,L]=D?C?[k,N]:[k,null]:[N,null];if(D)for(let M=0;M{let L=g.target.result;s.forEach((M,m)=>M.error!=null&&(v[m]=M.error)),S({numFailures:y,failures:v,results:h==="delete"?N:s.map(M=>M.result),lastResult:L})};o.onerror=g=>{i(g),w(g)},o.onsuccess=w})}function e({trans:c,values:h,query:N,reverse:k,unique:t}){return new Promise((S,a)=>{S=WU(S);let{index:T,range:C}=N,D=c.objectStore(E),p=T.isPrimaryKey?D:D.index(T.name),o=k?t?"prevunique":"prev":t?"nextunique":"next",s=h||!("openKeyCursor"in p)?p.openCursor(R(C),o):p.openKeyCursor(R(C),o);s.onerror=BF(a),s.onsuccess=WU(v=>{let y=s.result;if(!y){S(null);return}y.___id=++BZ,y.done=!1;let i=y.continue.bind(y),w=y.continuePrimaryKey;w&&(w=w.bind(y));let g=y.advance.bind(y),L=()=>{throw new Error("Cursor not started")},M=()=>{throw new Error("Cursor not stopped")};y.trans=c,y.stop=y.continue=y.continuePrimaryKey=y.advance=L,y.fail=WU(a),y.next=function(){let m=1;return this.start(()=>m--?this.continue():this.stop()).then(()=>this)},y.start=m=>{let Y=new Promise((X,lU)=>{X=WU(X),s.onerror=BF(lU),y.fail=lU,y.stop=EU=>{y.stop=y.continue=y.continuePrimaryKey=y.advance=M,X(EU)}}),I=()=>{if(s.result)try{m()}catch(X){y.fail(X)}else y.done=!0,y.start=()=>{throw new Error("Cursor behind last entry")},y.stop()};return s.onsuccess=WU(X=>{s.onsuccess=I,I()}),y.continue=i,y.continuePrimaryKey=w,y.advance=g,I(),Y},S(y)},a)})}function r(c){return h=>new Promise((N,k)=>{N=WU(N);let{trans:t,values:S,limit:a,query:T}=h,C=a===1/0?void 0:a,{index:D,range:p}=T,o=t.objectStore(E),s=D.isPrimaryKey?o:o.index(D.name),v=R(p);if(a===0)return N({result:[]});if(c){let y=S?s.getAll(v,C):s.getAllKeys(v,C);y.onsuccess=i=>N({result:i.target.result}),y.onerror=BF(k)}else{let y=0,i=S||!("openKeyCursor"in s)?s.openCursor(v):s.openKeyCursor(v),w=[];i.onsuccess=g=>{let L=i.result;if(!L)return N({result:w});if(w.push(S?L.value:L.primaryKey),++y===a)return N({result:w});L.continue()},i.onerror=BF(k)}})}return{name:E,schema:W,mutate:Z,getMany({trans:c,keys:h}){return new Promise((N,k)=>{N=WU(N);let t=c.objectStore(E),S=h.length,a=new Array(S),T=0,C=0,D,p=s=>{let v=s.target;(a[v._pos]=v.result)!=null,++C===T&&N(a)},o=BF(k);for(let s=0;s{N=WU(N);let S=c.objectStore(E).get(h);S.onsuccess=a=>N(a.target.result),S.onerror=BF(k)})},query:r(l),openCursor:e,count({query:c,trans:h}){let{index:N,range:k}=c;return new Promise((t,S)=>{let a=h.objectStore(E),T=N.isPrimaryKey?a:a.index(N.name),C=R(k),D=C?T.count(C):T.count();D.onsuccess=WU(p=>t(p.target.result)),D.onerror=BF(S)})}}}let{schema:d,hasGetAll:l}=B(F,Q),n=d.tables.map(W=>V(W)),J={};return n.forEach(W=>J[W.name]=W),{stack:"dbcore",transaction:F.transaction.bind(F),table(W){if(!J[W])throw new Error(`Table '${W}' not found`);return J[W]},MIN_KEY:-1/0,MAX_KEY:ZB(U),schema:d}}function VZ(F,U){return U.reduce((Q,{create:B})=>z(z({},Q),B(Q)),F)}function dZ(F,U,{IDBKeyRange:Q,indexedDB:B},R){return{dbcore:VZ(RZ(U,Q,R),F.dbcore)}}function LV({_novip:F},U){let Q=U.db,B=dZ(F._middlewares,Q,F._deps,U);F.core=B.dbcore,F.tables.forEach(R=>{let V=R.name;F.core.schema.tables.some(d=>d.name===V)&&(R.core=F.core.table(V),F[V]instanceof F.Table&&(F[V].core=R.core))})}function ER({_novip:F},U,Q,B){Q.forEach(R=>{let V=B[R];U.forEach(d=>{let l=NV(d,R);(!l||"value"in l&&l.value===void 0)&&(d===F.Transaction.prototype||d instanceof F.Transaction?nF(d,R,{get(){return this.table(R)},set(n){Gd(this,R,{value:n,writable:!0,configurable:!0,enumerable:!0})}}):d[R]=new F.Table(R,V))})})}function jV({_novip:F},U){U.forEach(Q=>{for(let B in Q)Q[B]instanceof F.Table&&delete Q[B]})}function lZ(F,U){return F._cfg.version-U._cfg.version}function nZ(F,U,Q,B){let R=F._dbSchema,V=F._createTransaction("readwrite",F._storeNames,R);V.create(Q),V._completion.catch(B);let d=V._reject.bind(V),l=u.transless||u;mF(()=>{u.trans=V,u.transless=l,U===0?(SU(R).forEach(n=>{IV(Q,n,R[n].primKey,R[n].indexes)}),LV(F,Q),G.follow(()=>F.on.populate.fire(V)).catch(d)):JZ(F,U,V,Q).catch(d)})}function JZ({_novip:F},U,Q,B){let R=[],V=F._versions,d=F._dbSchema=KV(F,F.idbdb,B),l=!1;V.filter(W=>W._cfg.version>=U).forEach(W=>{R.push(()=>{let E=d,Z=W._cfg.dbschema;gV(F,E,B),gV(F,Z,B),d=F._dbSchema=Z;let e=Tl(E,Z);e.add.forEach(c=>{IV(B,c[0],c[1].primKey,c[1].indexes)}),e.change.forEach(c=>{if(c.recreate)throw new f.Upgrade("Not yet support for changing primary key");{let h=B.objectStore(c.name);c.add.forEach(N=>fV(h,N)),c.change.forEach(N=>{h.deleteIndex(N.name),fV(h,N)}),c.del.forEach(N=>h.deleteIndex(N))}});let r=W._cfg.contentUpgrade;if(r&&W._cfg.version>U){LV(F,B),Q._memoizedTables={},l=!0;let c=Hd(Z);e.del.forEach(t=>{c[t]=E[t]}),jV(F,[F.Transaction.prototype]),ER(F,[F.Transaction.prototype],SU(c),c),Q.schema=c;let h=eV(r);h&&CQ();let N,k=G.follow(()=>{if(N=r(Q),N&&h){var t=ZF.bind(null,null);N.then(t,t)}});return N&&typeof N.then=="function"?G.resolve(N):k.then(()=>N)}}),R.push(E=>{if(!l||!xW){let Z=W._cfg.dbschema;ZZ(Z,E)}jV(F,[F.Transaction.prototype]),ER(F,[F.Transaction.prototype],F._storeNames,F._dbSchema),Q.schema=F._dbSchema})});function J(){return R.length?G.resolve(R.shift()(Q.idbtrans)).then(J):G.resolve()}return J().then(()=>{WZ(d,B)})}function Tl(F,U){let Q={del:[],add:[],change:[]},B;for(B in F)U[B]||Q.del.push(B);for(B in U){let R=F[B],V=U[B];if(!R)Q.add.push([B,V]);else{let d={name:B,def:V,recreate:!1,del:[],add:[],change:[]};if(""+(R.primKey.keyPath||"")!=""+(V.primKey.keyPath||"")||R.primKey.auto!==V.primKey.auto&&!lR)d.recreate=!0,Q.change.push(d);else{let l=R.idxByName,n=V.idxByName,J;for(J in l)n[J]||d.del.push(J);for(J in n){let W=l[J],E=n[J];W?W.src!==E.src&&d.change.push(E):d.add.push(E)}(d.del.length>0||d.add.length>0||d.change.length>0)&&Q.change.push(d)}}}return Q}function IV(F,U,Q,B){let R=F.db.createObjectStore(U,Q.keyPath?{keyPath:Q.keyPath,autoIncrement:Q.auto}:{autoIncrement:Q.auto});return B.forEach(V=>fV(R,V)),R}function WZ(F,U){SU(F).forEach(Q=>{U.db.objectStoreNames.contains(Q)||IV(U,Q,F[Q].primKey,F[Q].indexes)})}function ZZ(F,U){[].slice.call(U.db.objectStoreNames).forEach(Q=>F[Q]==null&&U.db.deleteObjectStore(Q))}function fV(F,U){F.createIndex(U.name,U.keyPath,{unique:U.unique,multiEntry:U.multi})}function KV(F,U,Q){let B={};return KB(U.objectStoreNames,0).forEach(V=>{let d=Q.objectStore(V),l=d.keyPath,n=xV(el(l),l||"",!1,!1,!!d.autoIncrement,l&&typeof l!="string",!0),J=[];for(let E=0;ER.add.length||R.change.length))}function gV({_novip:F},U,Q){let B=Q.db.objectStoreNames;for(let R=0;R{U=U.trim();let B=U.replace(/([&*]|\+\+)/g,""),R=/^\[/.test(B)?B.match(/^\[(.*)\]$/)[1].split("+"):B;return xV(B,R||null,/\&/.test(U),/\*/.test(U),/\+\+/.test(U),MU(R),Q===0)})}var hl=class{_parseStoresSpec(U,Q){SU(U).forEach(B=>{if(U[B]!==null){var R=tZ(U[B]),V=R.shift();if(V.multi)throw new f.Schema("Primary key cannot be multi-valued");R.forEach(d=>{if(d.auto)throw new f.Schema("Only primary key can be marked as autoIncrement (++)");if(!d.keyPath)throw new f.Schema("Index must have a name and cannot be an empty string")}),Q[B]=kl(B,V,R)}})}stores(U){let Q=this.db;this._cfg.storesSource=this._cfg.storesSource?yU(this._cfg.storesSource,U):U;let B=Q._versions,R={},V={};return B.forEach(d=>{yU(R,d._cfg.storesSource),V=d._cfg.dbschema={},d._parseStoresSpec(R,V)}),Q._dbSchema=V,jV(Q,[Q._allTables,Q,Q.Transaction.prototype]),ER(Q,[Q._allTables,Q,Q.Transaction.prototype,this._cfg.tables],SU(V),V),Q._storeNames=SU(V),this}upgrade(U){return this._cfg.contentUpgrade=hV(this._cfg.contentUpgrade||VU,U),this}};function SZ(F){return nB(hl.prototype,function(Q){this.db=F,this._cfg={version:Q,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}function PV(F,U){let Q=F._dbNamesDB;return Q||(Q=F._dbNamesDB=new tF(nR,{addons:[],indexedDB:F,IDBKeyRange:U}),Q.version(1).stores({dbnames:"name"})),Q.table("dbnames")}function _V(F){return F&&typeof F.databases=="function"}function eZ({indexedDB:F,IDBKeyRange:U}){return _V(F)?Promise.resolve(F.databases()).then(Q=>Q.map(B=>B.name).filter(B=>B!==nR)):PV(F,U).toCollection().primaryKeys()}function kZ({indexedDB:F,IDBKeyRange:U},Q){!_V(F)&&Q!==nR&&PV(F,U).put({name:Q}).catch(VU)}function aZ({indexedDB:F,IDBKeyRange:U},Q){!_V(F)&&Q!==nR&&PV(F,U).delete(Q).catch(VU)}function qV(F){return mF(function(){return u.letThrough=!0,F()})}function TZ(){var F=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!F||!indexedDB.databases)return Promise.resolve();var U;return new Promise(function(Q){var B=function(){return indexedDB.databases().finally(Q)};U=setInterval(B,100),B()}).finally(function(){return clearInterval(U)})}function hZ(F){let U=F._state,{indexedDB:Q}=F._deps;if(U.isBeingOpened||F.idbdb)return U.dbReadyPromise.then(()=>U.dbOpenError?aU(U.dbOpenError):F);QF&&(U.openCanceller._stackHolder=IF()),U.isBeingOpened=!0,U.dbOpenError=null,U.openComplete=!1;let B=U.openCanceller;function R(){if(U.openCanceller!==B)throw new f.DatabaseClosed("db.open() was cancelled")}let V=U.dbReadyResolve,d=null,l=!1;return G.race([B,(typeof navigator=="undefined"?G.resolve():TZ()).then(()=>new G((n,J)=>{if(R(),!Q)throw new f.MissingAPI;let W=F.name,E=U.autoSchema?Q.open(W):Q.open(W,Math.round(F.verno*10));if(!E)throw new f.MissingAPI;E.onerror=BF(J),E.onblocked=WU(F._fireOnBlocked),E.onupgradeneeded=WU(Z=>{if(d=E.transaction,U.autoSchema&&!F._options.allowEmptyDB){E.onerror=JB,d.abort(),E.result.close();let r=Q.deleteDatabase(W);r.onsuccess=r.onerror=WU(()=>{J(new f.NoSuchDatabase(`Database ${W} doesnt exist`))})}else{d.onerror=BF(J);var e=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion;l=e<1,F._novip.idbdb=E.result,nZ(F,e/10,d,J)}},J),E.onsuccess=WU(()=>{d=null;let Z=F._novip.idbdb=E.result,e=KB(Z.objectStoreNames);if(e.length>0)try{let r=Z.transaction(FZ(e),"readonly");U.autoSchema?NZ(F,Z,r):(gV(F,F._dbSchema,r),EZ(F,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),LV(F,r)}catch{}dB.push(F),Z.onversionchange=WU(r=>{U.vcFired=!0,F.on("versionchange").fire(r)}),Z.onclose=WU(r=>{F.on("close").fire(r)}),l&&kZ(F._deps,W),n()},J)}))]).then(()=>(R(),U.onReadyBeingFired=[],G.resolve(qV(()=>F.on.ready.fire(F.vip))).then(function n(){if(U.onReadyBeingFired.length>0){let J=U.onReadyBeingFired.reduce(hV,VU);return U.onReadyBeingFired=[],G.resolve(qV(()=>J(F.vip))).then(n)}}))).finally(()=>{U.onReadyBeingFired=null,U.isBeingOpened=!1}).then(()=>F).catch(n=>{U.dbOpenError=n;try{d&&d.abort()}catch{}return B===U.openCanceller&&F._close(),aU(n)}).finally(()=>{U.openComplete=!0,V()})}function AV(F){var U=d=>F.next(d),Q=d=>F.throw(d),B=V(U),R=V(Q);function V(d){return l=>{var n=d(l),J=n.value;return n.done?J:!J||typeof J.then!="function"?MU(J)?Promise.all(J).then(B,R):B(J):J.then(B,R)}}return V(U)()}function cZ(F,U,Q){var B=arguments.length;if(B<2)throw new f.InvalidArgument("Too few arguments");for(var R=new Array(B-1);--B;)R[B-1]=arguments[B];Q=R.pop();var V=zd(R);return[F,V,Q]}function cl(F,U,Q,B,R){return G.resolve().then(()=>{let V=u.transless||u,d=F._createTransaction(U,Q,F._dbSchema,B),l={trans:d,transless:V};if(B)d.idbtrans=B.idbtrans;else try{d.create(),F._state.PR1398_maxLoop=3}catch(E){return E.name===TV.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>cl(F,U,Q,null,R))):aU(E)}let n=eV(R);n&&CQ();let J,W=G.follow(()=>{if(J=R.call(d,d),J)if(n){var E=ZF.bind(null,null);J.then(E,E)}else typeof J.next=="function"&&typeof J.throw=="function"&&(J=AV(J))},l);return(J&&typeof J.then=="function"?G.resolve(J).then(E=>d.active?E:aU(new f.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):W.then(()=>J)).then(E=>(B&&d._resolve(),d._completion.then(()=>E))).catch(E=>(d._reject(E),aU(E)))})}function tR(F,U,Q){let B=MU(F)?F.slice():[F];for(let R=0;R0,t=_(z({},r),{isVirtual:k,keyTail:e,keyLength:N,extractKey:wV(Z),unique:!k&&r.unique});if(h.push(t),t.isPrimaryKey||V.push(t),N>1){let S=N===2?Z[0]:Z.slice(0,N-1);d(S,e+1,r)}return h.sort((S,a)=>S.keyTail-a.keyTail),t}let l=d(B.primaryKey.keyPath,0,B.primaryKey);R[":id"]=[l];for(let Z of B.indexes)d(Z.keyPath,0,Z);function n(Z){let e=R[NB(Z)];return e&&e[0]}function J(Z,e){return{type:Z.type===1?2:Z.type,lower:tR(Z.lower,Z.lowerOpen?F.MAX_KEY:F.MIN_KEY,e),lowerOpen:!0,upper:tR(Z.upper,Z.upperOpen?F.MIN_KEY:F.MAX_KEY,e),upperOpen:!0}}function W(Z){let e=Z.query.index;return e.isVirtual?_(z({},Z),{query:{index:e,range:J(Z.query.range,e.keyTail)}}):Z}return _(z({},Q),{schema:_(z({},B),{primaryKey:l,indexes:V,getIndexByKeyPath:n}),count(Z){return Q.count(W(Z))},query(Z){return Q.query(W(Z))},openCursor(Z){let{keyTail:e,isVirtual:r,keyLength:c}=Z.query.index;if(!r)return Q.openCursor(Z);function h(N){function k(S){S!=null?N.continue(tR(S,Z.reverse?F.MAX_KEY:F.MIN_KEY,e)):Z.unique?N.continue(N.key.slice(0,c).concat(Z.reverse?F.MIN_KEY:F.MAX_KEY,e)):N.continue()}return Object.create(N,{continue:{value:k},continuePrimaryKey:{value(S,a){N.continuePrimaryKey(tR(S,F.MAX_KEY,e),a)}},primaryKey:{get(){return N.primaryKey}},key:{get(){let S=N.key;return c===1?S[0]:S.slice(0,c)}},value:{get(){return N.value}}})}return Q.openCursor(W(Z)).then(N=>N&&h(N))}})}})}var CZ={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:rZ};function $V(F,U,Q,B){return Q=Q||{},B=B||"",SU(F).forEach(R=>{if(!wU(U,R))Q[B+R]=void 0;else{var V=F[R],d=U[R];if(typeof V=="object"&&typeof d=="object"&&V&&d){let l=tV(V),n=tV(d);l!==n?Q[B+R]=U[R]:l==="Object"?$V(V,d,Q,B+R+"."):V!==d&&(Q[B+R]=U[R])}else V!==d&&(Q[B+R]=U[R])}}),SU(U).forEach(R=>{wU(F,R)||(Q[B+R]=U[R])}),Q}function DZ(F,U){return U.type==="delete"?U.keys:U.keys||U.values.map(F.extractKey)}var pZ={stack:"dbcore",name:"HooksMiddleware",level:2,create:F=>_(z({},F),{table(U){let Q=F.table(U),{primaryKey:B}=Q.schema;return _(z({},Q),{mutate(V){let d=u.trans,{deleting:l,creating:n,updating:J}=d.table(U).hook;switch(V.type){case"add":if(n.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"put":if(n.fire===VU&&J.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"delete":if(l.fire===VU)break;return d._promise("readwrite",()=>W(V),!0);case"deleteRange":if(l.fire===VU)break;return d._promise("readwrite",()=>E(V),!0)}return Q.mutate(V);function W(e){let r=u.trans,c=e.keys||DZ(B,e);if(!c)throw new Error("Keys missing");return e=e.type==="add"||e.type==="put"?_(z({},e),{keys:c}):z({},e),e.type!=="delete"&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),mZ(Q,e,c).then(h=>{let N=c.map((k,t)=>{let S=h[t],a={onerror:null,onsuccess:null};if(e.type==="delete")l.fire.call(a,k,S,r);else if(e.type==="add"||S===void 0){let T=n.fire.call(a,k,e.values[t],r);k==null&&T!=null&&(k=T,e.keys[t]=k,B.outbound||_U(e.values[t],B.keyPath,k))}else{let T=$V(S,e.values[t]),C=J.fire.call(a,T,k,S,r);if(C){let D=e.values[t];Object.keys(C).forEach(p=>{wU(D,p)?D[p]=C[p]:_U(D,p,C[p])})}}return a});return Q.mutate(e).then(({failures:k,results:t,numFailures:S,lastResult:a})=>{for(let T=0;T(N.forEach(t=>t.onerror&&t.onerror(k)),Promise.reject(k)))})}function E(e){return Z(e.trans,e.range,1e4)}function Z(e,r,c){return Q.query({trans:e,values:!1,query:{index:B,range:r},limit:c}).then(({result:h})=>W({type:"delete",keys:h,trans:e}).then(N=>N.numFailures>0?Promise.reject(N.failures[0]):h.length({table:U=>{let Q=F.table(U);return _(z({},Q),{getMany:B=>{if(!B.cache)return Q.getMany(B);let R=rl(B.keys,B.trans._cache,B.cache==="clone");return R?G.resolve(R):Q.getMany(B).then(V=>(B.trans._cache={keys:B.keys,values:B.cache==="clone"?AQ(V):V},V))},mutate:B=>(B.type!=="add"&&(B.trans._cache=null),Q.mutate(B))})}})};function U0(F){return!("from"in F)}var EF=function(F,U){if(this)yU(this,arguments.length?{d:1,from:F,to:arguments.length>1?U:F}:{d:0});else{let Q=new EF;return F&&"d"in F&&yU(Q,F),Q}};aQ(EF.prototype,{add(F){return SR(this,F),this},addKey(F){return EB(this,F,F),this},addKeys(F){return F.forEach(U=>EB(this,U,U)),this},[SV](){return F0(this)}});function EB(F,U,Q){let B=vU(U,Q);if(isNaN(B))return;if(B>0)throw RangeError();if(U0(F))return yU(F,{from:U,to:Q,d:1});let R=F.l,V=F.r;if(vU(Q,F.from)<0)return R?EB(R,U,Q):F.l={from:U,to:Q,d:1,l:null,r:null},Cl(F);if(vU(U,F.to)>0)return V?EB(V,U,Q):F.r={from:U,to:Q,d:1,l:null,r:null},Cl(F);vU(U,F.from)<0&&(F.from=U,F.l=null,F.d=V?V.d+1:1),vU(Q,F.to)>0&&(F.to=Q,F.r=null,F.d=F.l?F.l.d+1:1);let d=!F.r;R&&!F.l&&SR(F,R),V&&d&&SR(F,V)}function SR(F,U){function Q(B,{from:R,to:V,l:d,r:l}){EB(B,R,V),d&&Q(B,d),l&&Q(B,l)}U0(U)||Q(F,U)}function oZ(F,U){let Q=F0(U),B=Q.next();if(B.done)return!1;let R=B.value,V=F0(F),d=V.next(R.from),l=d.value;for(;!B.done&&!d.done;){if(vU(l.from,R.to)<=0&&vU(l.to,R.from)>=0)return!0;vU(R.from,l.from)<0?R=(B=Q.next(l.from)).value:l=(d=V.next(R.from)).value}return!1}function F0(F){let U=U0(F)?null:{s:0,n:F};return{next(Q){let B=arguments.length>0;for(;U;)switch(U.s){case 0:if(U.s=1,B)for(;U.n.l&&vU(Q,U.n.from)<0;)U={up:U,n:U.n.l,s:1};else for(;U.n.l;)U={up:U,n:U.n.l,s:1};case 1:if(U.s=2,!B||vU(Q,U.n.to)<=0)return{value:U.n,done:!1};case 2:if(U.n.r){U.s=3,U={up:U,n:U.n.r,s:0};continue}case 3:U=U.up}return{done:!0}}}}function Cl(F){var U,Q;let B=(((U=F.r)===null||U===void 0?void 0:U.d)||0)-(((Q=F.l)===null||Q===void 0?void 0:Q.d)||0),R=B>1?"r":B<-1?"l":"";if(R){let V=R==="r"?"l":"r",d=z({},F),l=F[R];F.from=l.from,F.to=l.to,F[R]=l[R],d[R]=l[V],F[V]=d,d.d=Dl(d)}F.d=Dl(F)}function Dl({r:F,l:U}){return(F?U?Math.max(F.d,U.d):F.d:U?U.d:0)+1}var iZ={stack:"dbcore",level:0,create:F=>{let U=F.schema.name,Q=new EF(F.MIN_KEY,F.MAX_KEY);return _(z({},F),{table:B=>{let R=F.table(B),{schema:V}=R,{primaryKey:d}=V,{extractKey:l,outbound:n}=d,J=_(z({},R),{mutate:Z=>{let e=Z.trans,r=e.mutatedParts||(e.mutatedParts={}),c=T=>{let C=`idb://${U}/${B}/${T}`;return r[C]||(r[C]=new EF)},h=c(""),N=c(":dels"),{type:k}=Z,[t,S]=Z.type==="deleteRange"?[Z.range]:Z.type==="delete"?[Z.keys]:Z.values.length<50?[[],Z.values]:[],a=Z.trans._cache;return R.mutate(Z).then(T=>{if(MU(t)){k!=="delete"&&(t=T.results),h.addKeys(t);let C=rl(t,a);!C&&k!=="add"&&N.addKeys(t),(C||S)&&sZ(c,V,C,S)}else if(t){let C={from:t.lower,to:t.upper};N.add(C),h.add(C)}else h.add(Q),N.add(Q),V.indexes.forEach(C=>c(C.name).add(Q));return T})}}),W=({query:{index:Z,range:e}})=>{var r,c;return[Z,new EF((r=e.lower)!==null&&r!==void 0?r:F.MIN_KEY,(c=e.upper)!==null&&c!==void 0?c:F.MAX_KEY)]},E={get:Z=>[d,new EF(Z.key)],getMany:Z=>[d,new EF().addKeys(Z.keys)],count:W,query:W,openCursor:W};return SU(E).forEach(Z=>{J[Z]=function(e){let{subscr:r}=u;if(r){let c=S=>{let a=`idb://${U}/${B}/${S}`;return r[a]||(r[a]=new EF)},h=c(""),N=c(":dels"),[k,t]=E[Z](e);if(c(k.name||"").add(t),!k.isPrimaryKey)if(Z==="count")N.add(Q);else{let S=Z==="query"&&n&&e.values&&R.query(_(z({},e),{values:!1}));return R[Z].apply(this,arguments).then(a=>{if(Z==="query"){if(n&&e.values)return S.then(({result:C})=>(h.addKeys(C),a));let T=e.values?a.result.map(l):a.result;e.values?h.addKeys(T):N.addKeys(T)}else if(Z==="openCursor"){let T=a,C=e.values;return T&&Object.create(T,{key:{get(){return N.addKey(T.primaryKey),T.key}},primaryKey:{get(){let D=T.primaryKey;return N.addKey(D),D}},value:{get(){return C&&h.addKey(T.primaryKey),T.value}}})}return a})}}return R[Z].apply(this,arguments)}}),J}})}};function sZ(F,U,Q,B){function R(V){let d=F(V.name||"");function l(J){return J!=null?V.extractKey(J):null}let n=J=>V.multiEntry&&MU(J)?J.forEach(W=>d.addKey(W)):d.addKey(J);(Q||B).forEach((J,W)=>{let E=Q&&l(Q[W]),Z=B&&l(B[W]);vU(E,Z)!==0&&(E!=null&&n(E),Z!=null&&n(Z))})}U.indexes.forEach(R)}var tF=class{constructor(U,Q){this._middlewares={},this.verno=0;let B=tF.dependencies;this._options=Q=z({addons:tF.addons,autoOpen:!0,indexedDB:B.indexedDB,IDBKeyRange:B.IDBKeyRange},Q),this._deps={indexedDB:Q.indexedDB,IDBKeyRange:Q.IDBKeyRange};let{addons:R}=Q;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let V={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:VU,dbReadyPromise:null,cancelOpen:VU,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};V.dbReadyPromise=new G(d=>{V.dbReadyResolve=d}),V.openCanceller=new G((d,l)=>{V.cancelOpen=l}),this._state=V,this.name=U,this.on=lB(this,"populate","blocked","versionchange","close",{ready:[hV,VU]}),this.on.ready.subscribe=bd(this.on.ready.subscribe,d=>(l,n)=>{tF.vip(()=>{let J=this._state;if(J.openComplete)J.dbOpenError||G.resolve().then(l),n&&d(l);else if(J.onReadyBeingFired)J.onReadyBeingFired.push(l),n&&d(l);else{d(l);let W=this;n||d(function E(){W.on.ready.unsubscribe(l),W.on.ready.unsubscribe(E)})}})}),this.Collection=KW(this),this.Table=LW(this),this.Transaction=UZ(this),this.Version=SZ(this),this.WhereClause=$W(this),this.on("versionchange",d=>{d.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",d=>{!d.newVersion||d.newVersionnew this.Transaction(d,l,n,this._options.chromeTransactionDurability,J),this._fireOnBlocked=d=>{this.on("blocked").fire(d),dB.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(d))},this.use(CZ),this.use(pZ),this.use(iZ),this.use(MZ),this.vip=Object.create(this,{_vip:{value:!0}}),R.forEach(d=>d(this))}version(U){if(isNaN(U)||U<.1)throw new f.Type("Given version is not a positive number");if(U=Math.round(U*10)/10,this.idbdb||this._state.isBeingOpened)throw new f.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,U);let Q=this._versions;var B=Q.filter(R=>R._cfg.version===U)[0];return B||(B=new this.Version(U),Q.push(B),Q.sort(lZ),B.stores({}),this._state.autoSchema=!1,B)}_whenReady(U){return this.idbdb&&(this._state.openComplete||u.letThrough||this._vip)?U():new G((Q,B)=>{if(this._state.openComplete)return B(new f.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen){B(new f.DatabaseClosed);return}this.open().catch(VU)}this._state.dbReadyPromise.then(Q,B)}).then(U)}use({stack:U,create:Q,level:B,name:R}){R&&this.unuse({stack:U,name:R});let V=this._middlewares[U]||(this._middlewares[U]=[]);return V.push({stack:U,create:Q,level:B??10,name:R}),V.sort((d,l)=>d.level-l.level),this}unuse({stack:U,name:Q,create:B}){return U&&this._middlewares[U]&&(this._middlewares[U]=this._middlewares[U].filter(R=>B?R.create!==B:Q?R.name!==Q:!1)),this}open(){return hZ(this)}_close(){let U=this._state,Q=dB.indexOf(this);if(Q>=0&&dB.splice(Q,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}U.dbReadyPromise=new G(B=>{U.dbReadyResolve=B}),U.openCanceller=new G((B,R)=>{U.cancelOpen=R})}close(){this._close();let U=this._state;this._options.autoOpen=!1,U.dbOpenError=new f.DatabaseClosed,U.isBeingOpened&&U.cancelOpen(U.dbOpenError)}delete(){let U=arguments.length>0,Q=this._state;return new G((B,R)=>{let V=()=>{this.close();var d=this._deps.indexedDB.deleteDatabase(this.name);d.onsuccess=WU(()=>{aZ(this._deps,this.name),B()}),d.onerror=BF(R),d.onblocked=this._fireOnBlocked};if(U)throw new f.InvalidArgument("Arguments not allowed in db.delete()");Q.isBeingOpened?Q.dbReadyPromise.then(V):V()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){let U=this._state.dbOpenError;return U&&U.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return SU(this._allTables).map(U=>this._allTables[U])}transaction(){let U=cZ.apply(this,arguments);return this._transaction.apply(this,U)}_transaction(U,Q,B){let R=u.trans;(!R||R.db!==this||U.indexOf("!")!==-1)&&(R=null);let V=U.indexOf("?")!==-1;U=U.replace("!","").replace("?","");let d,l;try{if(l=Q.map(J=>{var W=J instanceof this.Table?J.name:J;if(typeof W!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),U=="r"||U===bV)d=bV;else if(U=="rw"||U==XV)d=XV;else throw new f.InvalidArgument("Invalid transaction mode: "+U);if(R){if(R.mode===bV&&d===XV)if(V)R=null;else throw new f.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");R&&l.forEach(J=>{if(R&&R.storeNames.indexOf(J)===-1)if(V)R=null;else throw new f.SubTransaction("Table "+J+" not included in parent transaction.")}),V&&R&&!R.active&&(R=null)}}catch(J){return R?R._promise(null,(W,E)=>{E(J)}):aU(J)}let n=cl.bind(null,this,d,l,R,B);return R?R._promise(d,n,"lock"):u.trans?DQ(u.transless,()=>this._whenReady(n)):this._whenReady(n)}table(U){if(!wU(this._allTables,U))throw new f.InvalidTable(`Table ${U} does not exist`);return this._allTables[U]}},YZ=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",pl=class{constructor(U){this._subscribe=U}subscribe(U,Q,B){return this._subscribe(!U||typeof U=="function"?{next:U,error:Q,complete:B}:U)}[YZ](){return this}};function ml(F,U){return SU(U).forEach(Q=>{let B=F[Q]||(F[Q]=new EF);SR(B,U[Q])}),F}function yZ(F){return new pl(U=>{let Q=eV(F);function B(e){Q&&CQ();let r=()=>mF(F,{subscr:e,trans:null}),c=u.trans?DQ(u.transless,r):r();return Q&&c.then(ZF,ZF),c}let R=!1,V={},d={},l={get closed(){return R},unsubscribe:()=>{R=!0,sF.storagemutated.unsubscribe(E)}};U.start&&U.start(l);let n=!1,J=!1;function W(){return SU(d).some(e=>V[e]&&oZ(V[e],d[e]))}let E=e=>{ml(V,e),W()&&Z()},Z=()=>{if(n||R)return;V={};let e={},r=B(e);J||(sF(WB,E),J=!0),n=!0,Promise.resolve(r).then(c=>{n=!1,!R&&(W()?Z():(V={},d=e,U.next&&U.next(c)))},c=>{n=!1,U.error&&U.error(c),l.unsubscribe()})};return Z(),l})}var Q0;try{Q0={indexedDB:nU.indexedDB||nU.mozIndexedDB||nU.webkitIndexedDB||nU.msIndexedDB,IDBKeyRange:nU.IDBKeyRange||nU.webkitIDBKeyRange}}catch{Q0={indexedDB:null,IDBKeyRange:null}}var qF=tF;aQ(qF,_(z({},PB),{delete(F){return new qF(F,{addons:[]}).delete()},exists(F){return new qF(F,{addons:[]}).open().then(U=>(U.close(),!0)).catch("NoSuchDatabaseError",()=>!1)},getDatabaseNames(F){try{return eZ(qF.dependencies).then(F)}catch{return aU(new f.MissingAPI)}},defineClass(){function F(U){yU(this,U)}return F},ignoreTransaction(F){return u.trans?DQ(u.transless,F):F()},vip:qV,async:function(F){return function(){try{var U=AV(F.apply(this,arguments));return!U||typeof U.then!="function"?G.resolve(U):U}catch(Q){return aU(Q)}}},spawn:function(F,U,Q){try{var B=AV(F.apply(Q,U||[]));return!B||typeof B.then!="function"?G.resolve(B):B}catch(R){return aU(R)}},currentTransaction:{get:()=>u.trans||null},waitFor:function(F,U){let Q=G.resolve(typeof F=="function"?qF.ignoreTransaction(F):F).timeout(U||6e4);return u.trans?u.trans.waitFor(Q):Q},Promise:G,debug:{get:()=>QF,set:F=>{xd(F,F==="dexie"?()=>!0:dl)}},derive:TQ,extend:yU,props:aQ,override:bd,Events:lB,on:sF,liveQuery:yZ,extendObservabilitySet:ml,getByKeyPath:JF,setByKeyPath:_U,delByKeyPath:SW,shallowClone:Hd,deepClone:AQ,getObjectDiff:$V,cmp:vU,asap:Xd,minKey:GV,addons:[],connections:dB,errnames:TV,dependencies:Q0,semVer:Rl,version:Rl.split(".").map(F=>parseInt(F)).reduce((F,U,Q)=>F+U/Math.pow(10,Q*2))}));qF.maxKey=ZB(qF.dependencies.IDBKeyRange);typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(sF(WB,F=>{if(!SF){let U;lR?(U=document.createEvent("CustomEvent"),U.initCustomEvent(iF,!0,!0,F)):U=new CustomEvent(iF,{detail:F}),SF=!0,dispatchEvent(U),SF=!1}}),addEventListener(iF,({detail:F})=>{SF||eR(F)}));function eR(F){let U=SF;try{SF=!0,sF.storagemutated.fire(F)}finally{SF=U}}var SF=!1;if(typeof BroadcastChannel!="undefined"){let F=new BroadcastChannel(iF);sF(WB,U=>{SF||F.postMessage(U)}),F.onmessage=U=>{U.data&&eR(U.data)}}else if(typeof self!="undefined"&&typeof navigator!="undefined"){sF(WB,U=>{try{SF||(typeof localStorage!="undefined"&&localStorage.setItem(iF,JSON.stringify({trig:Math.random(),changedParts:U})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(Q=>Q.postMessage({type:iF,changedParts:U})))}catch{}}),typeof addEventListener!="undefined"&&addEventListener("storage",U=>{if(U.key===iF){let Q=JSON.parse(U.newValue);Q&&eR(Q.changedParts)}});let F=self.document&&navigator.serviceWorker;F&&F.addEventListener("message",vZ)}function vZ({data:F}){F&&F.type===iF&&eR(F.changedParts)}G.rejectionMapper=DW;xd(QF,dl);var RF=class extends tF{constructor(){super(RF.dbName);this.version(RF.dbVersion).stores({searchHistory:"++id",minisearch:"date"})}static async clearOldDatabases(){let U=(await indexedDB.databases()).filter(Q=>Q.name===RF.dbName&&Q.version!==RF.dbVersion*10);if(U.length){console.log("Omnisearch - Those IndexedDb databases will be deleted:");for(let Q of U)Q.name&&indexedDB.deleteDatabase(Q.name)}}static getInstance(){return RF.instance||(RF.instance=new RF),RF.instance}async clearCache(){await this.minisearch.clear()}},MQ=RF;MQ.dbVersion=8,MQ.dbName="omnisearch/cache/"+app.appId;var fU=MQ.getInstance();var AF=fB(!1),B0=class extends QU.PluginSettingTab{constructor(U){super(app,U);this.plugin=U,AF.subscribe(async Q=>{O.showExcerpt=Q,await HU(this.plugin)})}display(){let{containerEl:U}=this;U.empty(),U.createEl("h2",{text:"Omnisearch"});let Q=U.createDiv();if(Q.innerHTML=` Buy Me a Coffee at ko-fi.com - `,new QU.Setting(U).setName("Indexing").setHeading(),!QU.Platform.isMobileApp){let d=new DocumentFragment;d.createSpan({},l=>{l.innerHTML=`Omnisearch will include PDFs in search results. -
    -
  • \u26A0\uFE0F Each PDF can take anywhere from a few seconds to 2 minutes to be processed.
  • -
  • \u26A0\uFE0F Texts extracted from PDFs may contain errors such as missing spaces, or spaces in the middle of words.
  • -
  • \u26A0\uFE0F Some PDFs can't be processed correctly and will return an empty text.
  • -
  • This feature is currently a work-in-progress, please report issues that you might experience.
  • -
+ `,new QU.Setting(U).setName("Indexing").setHeading(),!QU.Platform.isMobileApp){let d=new DocumentFragment;d.createSpan({},l=>{l.innerHTML=`Omnisearch will include PDFs in search results.
+ \u26A0\uFE0F PDFs first need to be processed. This can take anywhere from a few seconds to 2 minutes, then the resulting text is cached. Needs a restart to fully take effect.`}),new QU.Setting(U).setName("PDF Indexing").setDesc(d).addToggle(l=>l.setValue(O.PDFIndexing).onChange(async n=>{O.PDFIndexing=n,await HU(this.plugin)}))}if(!QU.Platform.isMobileApp){let d=new DocumentFragment;d.createSpan({},l=>{l.innerHTML=`Omnisearch will use Tesseract to index images from their text.
  • Only English is supported at the moment.
  • Not all images can be correctly read by the OCR, this feature works best with scanned documents.
- Needs a restart to fully take effect.`}),new QU.Setting(U).setName("BETA - Images Indexing").setDesc(d).addToggle(l=>l.setValue(O.imagesIndexing).onChange(async n=>{O.imagesIndexing=n,await HU(this.plugin)}))}let B=new DocumentFragment;B.createSpan({},d=>{d.innerHTML=`In addition to standard md files, Omnisearch can also index other plain text files.
+ Needs a restart to fully take effect.`}),new QU.Setting(U).setName("BETA - Images Indexing").setDesc(d).addToggle(l=>l.setValue(O.imagesIndexing).onChange(async n=>{O.imagesIndexing=n,await HU(this.plugin)}))}let B=new DocumentFragment;B.createSpan({},d=>{d.innerHTML=`In addition to standard md files, Omnisearch can also index other plaintext files.
Add extensions separated by a space, without the dot. Example: "txt org".
+ \u26A0\uFE0F Using extensions of non-plaintext files (like .docx or .pptx) WILL cause crashes, + because Omnisearch will try to index their content.
Needs a restart to fully take effect.`}),new QU.Setting(U).setName("Additional files to index").setDesc(B).addText(d=>{d.setValue(O.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org").onChange(async l=>{O.indexedFileTypes=l.split(" "),await HU(this.plugin)})}),new QU.Setting(U).setName("Behavior").setHeading(),new QU.Setting(U).setName(`Respect Obsidian's "Excluded Files"`).setDesc(`By default, fFiles that are in Obsidian's "Options > Files & Links > Excluded Files" list are downranked in results. Enable this option to completely hide them`).addToggle(d=>d.setValue(O.hideExcluded).onChange(async l=>{O.hideExcluded=l,await HU(this.plugin)}));let R=new DocumentFragment;R.createSpan({},d=>{d.innerHTML=`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".
- You probably shouldn't disable this.
- Needs a restart to fully take effect.
+ \u26A0\uFE0FYou probably should NOT disable this.
+ Needs a restart to fully take effect. `}),new QU.Setting(U).setName("Ignore diacritics").setDesc(R).addToggle(d=>d.setValue(O.ignoreDiacritics).onChange(async l=>{O.ignoreDiacritics=l,await HU(this.plugin)})),new QU.Setting(U).setName("Simpler search").setDesc("Enable this if Obsidian often freezes while making searches. This will return more strict results.").addToggle(d=>d.setValue(O.simpleSearch).onChange(async l=>{O.simpleSearch=l,await HU(this.plugin)})),new QU.Setting(U).setName("User Interface").setHeading(),new QU.Setting(U).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(d=>d.setValue(O.ribbonIcon).onChange(async l=>{O.ribbonIcon=l,await HU(this.plugin),l?this.plugin.addRibbonButton():this.plugin.removeRibbonButton()})),new QU.Setting(U).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(d=>d.setValue(O.showExcerpt).onChange(async l=>{AF.set(l)})),new QU.Setting(U).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(d=>d.setValue(O.renderLineReturnInExcerpts).onChange(async l=>{O.renderLineReturnInExcerpts=l,await HU(this.plugin)})),new QU.Setting(U).setName("Show previous query results").setDesc("Re-executes the previous query when opening Omnisearch.").addToggle(d=>d.setValue(O.showPreviousQueryResults).onChange(async l=>{O.showPreviousQueryResults=l,await HU(this.plugin)}));let V=new DocumentFragment;if(V.createSpan({},d=>{d.innerHTML=`Shows a button next to the search input, to create a note. - Acts the same as the shift \u21B5 shortcut, can be useful for mobile device users.`}),new QU.Setting(U).setName('Show "Create note" button').setDesc(V).addToggle(d=>d.setValue(O.showCreateButton).onChange(async l=>{O.showCreateButton=l,await HU(this.plugin)})),new QU.Setting(U).setName("Hide full path in results list").setDesc("In the search results, only show the note name, without the full path.").addToggle(d=>d.setValue(O.showShortName).onChange(async l=>{O.showShortName=l,await HU(this.plugin)})),new QU.Setting(U).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(d=>d.setValue(O.hightlight).onChange(async l=>{O.hightlight=l,await HU(this.plugin)})),new QU.Setting(U).setName("Results weighting").setHeading(),new QU.Setting(U).setName(`File name & declared aliases (default: ${MQ.weightBasename})`).addSlider(d=>this.weightSlider(d,"weightBasename")),new QU.Setting(U).setName(`Headings level 1 (default: ${MQ.weightH1})`).addSlider(d=>this.weightSlider(d,"weightH1")),new QU.Setting(U).setName(`Headings level 2 (default: ${MQ.weightH2})`).addSlider(d=>this.weightSlider(d,"weightH2")),new QU.Setting(U).setName(`Headings level 3 (default: ${MQ.weightH3})`).addSlider(d=>this.weightSlider(d,"weightH3")),!QU.Platform.isIosApp){new QU.Setting(U).setName("Danger Zone").setHeading();let d=new DocumentFragment;d.createSpan({},l=>{l.innerHTML=`Erase all Omnisearch cache data. + Acts the same as the shift \u21B5 shortcut, can be useful for mobile device users.`}),new QU.Setting(U).setName('Show "Create note" button').setDesc(V).addToggle(d=>d.setValue(O.showCreateButton).onChange(async l=>{O.showCreateButton=l,await HU(this.plugin)})),new QU.Setting(U).setName("Hide full path in results list").setDesc("In the search results, only show the note name, without the full path.").addToggle(d=>d.setValue(O.showShortName).onChange(async l=>{O.showShortName=l,await HU(this.plugin)})),new QU.Setting(U).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(d=>d.setValue(O.hightlight).onChange(async l=>{O.hightlight=l,await HU(this.plugin)})),new QU.Setting(U).setName("Results weighting").setHeading(),new QU.Setting(U).setName(`File name & declared aliases (default: ${oQ.weightBasename})`).addSlider(d=>this.weightSlider(d,"weightBasename")),new QU.Setting(U).setName(`Headings level 1 (default: ${oQ.weightH1})`).addSlider(d=>this.weightSlider(d,"weightH1")),new QU.Setting(U).setName(`Headings level 2 (default: ${oQ.weightH2})`).addSlider(d=>this.weightSlider(d,"weightH2")),new QU.Setting(U).setName(`Headings level 3 (default: ${oQ.weightH3})`).addSlider(d=>this.weightSlider(d,"weightH3")),!QU.Platform.isIosApp){new QU.Setting(U).setName("Danger Zone").setHeading();let d=new DocumentFragment;d.createSpan({},l=>{l.innerHTML=`Erase all Omnisearch cache data. Use this if Omnisearch results are inconsistent, missing, or appear outdated.
- Needs a restart to fully take effect.`}),new QU.Setting(U).setName("Clear cache data").setDesc(d).addButton(l=>{l.setButtonText("Clear cache"),l.onClick(async()=>{await fU.clearCache(),new QU.Notice("Omnisearch - Cache cleared. Please restart Obsidian.")})})}}weightSlider(U,Q){U.setLimits(1,3,.1).setValue(O[Q]).setDynamicTooltip().onChange(B=>{O[Q]=B,HU(this.plugin)})}},MQ={hideExcluded:!1,ignoreDiacritics:!0,indexedFileTypes:[],PDFIndexing:!1,imagesIndexing:!1,showShortName:!1,ribbonIcon:!0,showExcerpt:!0,renderLineReturnInExcerpts:!0,showCreateButton:!1,hightlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,weightBasename:2,weightH1:1.5,weightH2:1.3,weightH3:1.1,welcomeMessage:""},O=Object.assign({},MQ);async function ml(F){O=Object.assign({},MQ,await F.loadData()),AF.set(O.showExcerpt)}async function HU(F){await F.saveData(O)}var Ml=/^"|"$|^'|'$/g,ol=/[\u4e00-\u9fa5]/,tB=app.plugins.plugins["cm-chs-patch"],il=100,SB=300,sl=`suggestion-highlight omnisearch-highlight ${O.hightlight?"omnisearch-default-highlight":""}`,$=new ZV,aR={ToggleExcerpts:"toggle-excerpts"},KU=(V=>(V[V.Done=0]="Done",V[V.LoadingCache=1]="LoadingCache",V[V.ReadingFiles=2]="ReadingFiles",V[V.IndexingFiles=3]="IndexingFiles",V[V.WritingCache=4]="WritingCache",V))(KU||{});var sF=KB(0),Yl=!1;function R0(F){Yl=F}function yl(){return Yl}var vl=/[|\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;var dJ=XU(require("obsidian"));var _U=XU(require("obsidian"));var bl=XU(require("crypto")),Xl=XU(Gl());function YF(F){return`${F}`}function vZ(F){return F.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function GZ(F){return F.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function yF(F){if(!F.length)return/^$/g;let U=F.map(B=>(tB?"":"\\b")+GZ(B)).join("|");return new RegExp(`(${U})`,"gi")}function TR(F,U){return F.headings?.filter(Q=>Q.level===U).map(Q=>Q.heading)??[]}function hR(F,U){return(F+U)%U}function cR(F,U){try{let Q=U??-1,B=Math.max(0,Q-il),R=Math.min(F.length,Q+SB);if(Q>-1?F=(B>0?"\u2026":"")+F.slice(B,R).trim()+(Rl).join(` + Needs a restart to fully take effect.`}),new QU.Setting(U).setName("Clear cache data").setDesc(d).addButton(l=>{l.setButtonText("Clear cache"),l.onClick(async()=>{await fU.clearCache(),new QU.Notice("Omnisearch - Cache cleared. Please restart Obsidian.")})})}}weightSlider(U,Q){U.setLimits(1,3,.1).setValue(O[Q]).setDynamicTooltip().onChange(B=>{O[Q]=B,HU(this.plugin)})}},oQ={hideExcluded:!1,ignoreDiacritics:!0,indexedFileTypes:[],PDFIndexing:!1,imagesIndexing:!1,showShortName:!1,ribbonIcon:!0,showExcerpt:!0,renderLineReturnInExcerpts:!0,showCreateButton:!1,hightlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,weightBasename:2,weightH1:1.5,weightH2:1.3,weightH3:1.1,welcomeMessage:""},O=Object.assign({},oQ);async function Ml(F){O=Object.assign({},oQ,await F.loadData()),AF.set(O.showExcerpt)}async function HU(F){await F.saveData(O)}var ol=/^"|"$|^'|'$/g,il=/[\u4e00-\u9fa5]/,sl=100,tB=300,Yl=`suggestion-highlight omnisearch-highlight ${O.hightlight?"omnisearch-default-highlight":""}`,$=new ZV,kR={ToggleExcerpts:"toggle-excerpts"},KU=(V=>(V[V.Done=0]="Done",V[V.LoadingCache=1]="LoadingCache",V[V.ReadingFiles=2]="ReadingFiles",V[V.IndexingFiles=3]="IndexingFiles",V[V.WritingCache=4]="WritingCache",V))(KU||{});var YF=fB(0),yl=!1;function R0(F){yl=F}function vl(){return yl}function aR(){return app.plugins.plugins["cm-chs-patch"]}var Gl=/[|\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;var lJ=XU(require("obsidian"));var qU=XU(require("obsidian"));var Xl=XU(require("crypto")),Ol=XU(bl());function yF(F){return`${F}`}function GZ(F){return F.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function bZ(F){return F.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function vF(F){if(!F.length)return/^$/g;let U=F.map(B=>(aR()?"":"\\b")+bZ(B)).join("|");return new RegExp(`(${U})`,"gi")}function TR(F,U){return F.headings?.filter(Q=>Q.level===U).map(Q=>Q.heading)??[]}function hR(F,U){return(F+U)%U}function cR(F,U){try{let Q=U??-1,B=Math.max(0,Q-sl),R=Math.min(F.length,Q+tB);if(Q>-1?F=(B>0?"\u2026":"")+F.slice(B,R).trim()+(Rl).join(` `);let d=F.lastIndexOf(` -`,Q-B);d>0&&(F=F.slice(d))}return F=vZ(F),O.renderLineReturnInExcerpts&&(F=F.trim().replaceAll(` -`,"
")),F}catch(Q){return new _U.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(Q),""}}function Ol(F){return F.replace(Ml,"")}function d0(F){return F.replace(/(\*|_)+(.+?)(\*|_)+/g,(U,Q,B)=>B)}function Hl(F){return F?.frontmatter?(0,_U.parseFrontMatterAliases)(F.frontmatter)??[]:[]}function zl(F){return F?(0,_U.getAllTags)(F)??[]:[]}function $F(F){return F.normalize("NFD").replace(/\p{Diacritic}/gu,"")}function ul(){return _U.Platform.isMacOS?"\u2318":"ctrl"}function kB(F){return l0(F)||!_U.Platform.isMobileApp&&O.PDFIndexing&&TB(F)||!_U.Platform.isMobileApp&&O.imagesIndexing&&aB(F)}function aB(F){return F.endsWith(".png")||F.endsWith(".jpg")||F.endsWith(".jpeg")}function TB(F){return F.endsWith(".pdf")}function l0(F){return bZ().some(U=>F.endsWith(`.${U}`))}function bZ(){return[...O.indexedFileTypes,"md"]}function xl(F){let U=F.split(".");return U[U.length-1]??""}function wl(F){return _U.Platform.isMobileApp?(0,Xl.md5)(F.toString()):(0,bl.createHash)("md5").update(F).digest("hex")}function Ll(F,U){for(var Q=[],B=0,R=F.length;B>8*k+4&15]+B[h>>8*k&15];return N},V=function(h){for(var N=h.length,k=0;k>>32-D,p)}(N=function(C,D,p,o){return d(d(D,C),d(p,o))}(h,N,t,a),S,k)},n=function(h,N,k,t,S,a,T,C){return l(k&t|~k&S,N,k,a,T,C)},J=function(h,N,k,t,S,a,T,C){return l(k&S|t&~S,N,k,a,T,C)},W=function(h,N,k,t,S,a,T,C){return l(k^t^S,N,k,a,T,C)},E=function(h,N,k,t,S,a,T,C){return l(t^(k|~S),N,k,a,T,C)},Z=function(h,N,k){k===void 0&&(k=d);var t=h[0],S=h[1],a=h[2],T=h[3],C=n.bind(null,k);t=C(t,S,a,T,N[0],7,-680876936),T=C(T,t,S,a,N[1],12,-389564586),a=C(a,T,t,S,N[2],17,606105819),S=C(S,a,T,t,N[3],22,-1044525330),t=C(t,S,a,T,N[4],7,-176418897),T=C(T,t,S,a,N[5],12,1200080426),a=C(a,T,t,S,N[6],17,-1473231341),S=C(S,a,T,t,N[7],22,-45705983),t=C(t,S,a,T,N[8],7,1770035416),T=C(T,t,S,a,N[9],12,-1958414417),a=C(a,T,t,S,N[10],17,-42063),S=C(S,a,T,t,N[11],22,-1990404162),t=C(t,S,a,T,N[12],7,1804603682),T=C(T,t,S,a,N[13],12,-40341101),a=C(a,T,t,S,N[14],17,-1502002290),S=C(S,a,T,t,N[15],22,1236535329);var D=J.bind(null,k);t=D(t,S,a,T,N[1],5,-165796510),T=D(T,t,S,a,N[6],9,-1069501632),a=D(a,T,t,S,N[11],14,643717713),S=D(S,a,T,t,N[0],20,-373897302),t=D(t,S,a,T,N[5],5,-701558691),T=D(T,t,S,a,N[10],9,38016083),a=D(a,T,t,S,N[15],14,-660478335),S=D(S,a,T,t,N[4],20,-405537848),t=D(t,S,a,T,N[9],5,568446438),T=D(T,t,S,a,N[14],9,-1019803690),a=D(a,T,t,S,N[3],14,-187363961),S=D(S,a,T,t,N[8],20,1163531501),t=D(t,S,a,T,N[13],5,-1444681467),T=D(T,t,S,a,N[2],9,-51403784),a=D(a,T,t,S,N[7],14,1735328473),S=D(S,a,T,t,N[12],20,-1926607734);var p=W.bind(null,k);t=p(t,S,a,T,N[5],4,-378558),T=p(T,t,S,a,N[8],11,-2022574463),a=p(a,T,t,S,N[11],16,1839030562),S=p(S,a,T,t,N[14],23,-35309556),t=p(t,S,a,T,N[1],4,-1530992060),T=p(T,t,S,a,N[4],11,1272893353),a=p(a,T,t,S,N[7],16,-155497632),S=p(S,a,T,t,N[10],23,-1094730640),t=p(t,S,a,T,N[13],4,681279174),T=p(T,t,S,a,N[0],11,-358537222),a=p(a,T,t,S,N[3],16,-722521979),S=p(S,a,T,t,N[6],23,76029189),t=p(t,S,a,T,N[9],4,-640364487),T=p(T,t,S,a,N[12],11,-421815835),a=p(a,T,t,S,N[15],16,530742520),S=p(S,a,T,t,N[2],23,-995338651);var o=E.bind(null,k);t=o(t,S,a,T,N[0],6,-198630844),T=o(T,t,S,a,N[7],10,1126891415),a=o(a,T,t,S,N[14],15,-1416354905),S=o(S,a,T,t,N[5],21,-57434055),t=o(t,S,a,T,N[12],6,1700485571),T=o(T,t,S,a,N[3],10,-1894986606),a=o(a,T,t,S,N[10],15,-1051523),S=o(S,a,T,t,N[1],21,-2054922799),t=o(t,S,a,T,N[8],6,1873313359),T=o(T,t,S,a,N[15],10,-30611744),a=o(a,T,t,S,N[6],15,-1560198380),S=o(S,a,T,t,N[13],21,1309151649),t=o(t,S,a,T,N[4],6,-145523070),T=o(T,t,S,a,N[11],10,-1120210379),a=o(a,T,t,S,N[2],15,718787259),S=o(S,a,T,t,N[9],21,-343485551),h[0]=k(t,h[0]),h[1]=k(S,h[1]),h[2]=k(a,h[2]),h[3]=k(T,h[3])},e=function(h){for(var N=[],k=0;k<64;k+=4)N[k>>2]=h.charCodeAt(k)+(h.charCodeAt(k+1)<<8)+(h.charCodeAt(k+2)<<16)+(h.charCodeAt(k+3)<<24);return N},r=function(h,N){var k,t=h.length,S=[1732584193,-271733879,-1732584194,271733878];for(k=64;k<=t;k+=64)Z(S,e(h.substring(k-64,k)),N);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=(h=h.substring(k-64)).length;for(k=0;k>2]|=h.charCodeAt(k)<<(k%4<<3);if(a[k>>2]|=128<<(k%4<<3),k>55)for(Z(S,a,N),k=16;k--;)a[k]=0;return a[14]=8*t,Z(S,a,N),S};function c(h){var N;return V(r("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(N=function(k,t){var S=(65535&k)+(65535&t);return(k>>16)+(t>>16)+(S>>16)<<16|65535&S}),V(r(h,N))}}]);var JU=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,eU=Object.keys,iU=Array.isArray;function GU(F,U){return typeof U!="object"||eU(U).forEach(function(Q){F[Q]=U[Q]}),F}typeof Promise=="undefined"||JU.Promise||(JU.Promise=Promise);var cB=Object.getPrototypeOf,HZ={}.hasOwnProperty;function jU(F,U){return HZ.call(F,U)}function oQ(F,U){typeof U=="function"&&(U=U(cB(F))),(typeof Reflect=="undefined"?eU:Reflect.ownKeys)(U).forEach(Q=>{eF(F,Q,U[Q])})}var ql=Object.defineProperty;function eF(F,U,Q,B){ql(F,U,GU(Q&&jU(Q,"get")&&typeof Q.get=="function"?{get:Q.get,set:Q.set,configurable:!0}:{value:Q,configurable:!0,writable:!0},B))}function iQ(F){return{from:function(U){return F.prototype=Object.create(U.prototype),eF(F.prototype,"constructor",F),{extend:oQ.bind(null,F.prototype)}}}}var zZ=Object.getOwnPropertyDescriptor;function J0(F,U){let Q;return zZ(F,U)||(Q=cB(F))&&J0(Q,U)}var uZ=[].slice;function rR(F,U,Q){return uZ.call(F,U,Q)}function _l(F,U){return U(F)}function rB(F){if(!F)throw new Error("Assertion Failed")}function Al(F){JU.setImmediate?setImmediate(F):setTimeout(F,0)}function $l(F,U){return F.reduce((Q,B,R)=>{var V=U(B,R);return V&&(Q[V[0]]=V[1]),Q},{})}function kF(F,U){if(jU(F,U))return F[U];if(!U)return F;if(typeof U!="string"){for(var Q=[],B=0,R=U.length;B["Int","Uint","Float"].map(U=>U+F+"Array")))).filter(F=>JU[F]),wZ=Qn.map(F=>JU[F]);$l(Qn,F=>[F,!0]);var vF=null;function CB(F){vF=typeof WeakMap!="undefined"&&new WeakMap;let U=W0(F);return vF=null,U}function W0(F){if(!F||typeof F!="object")return F;let U=vF&&vF.get(F);if(U)return U;if(iU(F)){U=[],vF&&vF.set(F,U);for(var Q=0,B=F.length;Q=0)U=F;else{let V=cB(F);for(var R in U=V===Object.prototype?{}:Object.create(V),vF&&vF.set(F,U),F)jU(F,R)&&(U[R]=W0(F[R]))}return U}var{toString:LZ}={};function Z0(F){return LZ.call(F).slice(8,-1)}var N0=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",jZ=typeof N0=="symbol"?function(F){var U;return F!=null&&(U=F[N0])&&U.apply(F)}:function(){return null},sQ={};function aF(F){var U,Q,B,R;if(arguments.length===1){if(iU(F))return F.slice();if(this===sQ&&typeof F=="string")return[F];if(R=jZ(F)){for(Q=[];!(B=R.next()).done;)Q.push(B.value);return Q}if(F==null)return[F];if(typeof(U=F.length)=="number"){for(Q=new Array(U);U--;)Q[U]=F[U];return Q}return[F]}for(U=arguments.length,Q=new Array(U);U--;)Q[U]=arguments[U];return Q}var E0=typeof Symbol!="undefined"?F=>F[Symbol.toStringTag]==="AsyncFunction":()=>!1,VF=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Bn(F,U){VF=F,Rn=U}var Rn=()=>!0,IZ=!new Error("").stack;function UQ(){if(IZ)try{throw UQ.arguments,new Error}catch(F){return F}return new Error}function t0(F,U){var Q=F.stack;return Q?(U=U||0,Q.indexOf(F.name)===0&&(U+=(F.name+F.message).split(` +`,Q-B);d>0&&(F=F.slice(d))}return F=GZ(F),O.renderLineReturnInExcerpts&&(F=F.trim().replaceAll(` +`,"
")),F}catch(Q){return new qU.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(Q),""}}function Hl(F){return F.replace(ol,"")}function d0(F){return F.replace(/(\*|_)+(.+?)(\*|_)+/g,(U,Q,B)=>B)}function zl(F){return F?.frontmatter?(0,qU.parseFrontMatterAliases)(F.frontmatter)??[]:[]}function ul(F){return F?(0,qU.getAllTags)(F)??[]:[]}function $F(F){return F.normalize("NFD").replace(/\p{Diacritic}/gu,"")}function xl(){return qU.Platform.isMacOS?"\u2318":"ctrl"}function eB(F){return l0(F)||!qU.Platform.isMobileApp&&O.PDFIndexing&&aB(F)||!qU.Platform.isMobileApp&&O.imagesIndexing&&kB(F)}function kB(F){return F.endsWith(".png")||F.endsWith(".jpg")||F.endsWith(".jpeg")}function aB(F){return F.endsWith(".pdf")}function l0(F){return XZ().some(U=>F.endsWith(`.${U}`))}function XZ(){return[...O.indexedFileTypes,"md"]}function wl(F){let U=F.split(".");return U[U.length-1]??""}function Ll(F){return qU.Platform.isMobileApp?(0,Ol.md5)(F.toString()):(0,Xl.createHash)("md5").update(F).digest("hex")}function jl(F,U){for(var Q=[],B=0,R=F.length;B>8*k+4&15]+B[h>>8*k&15];return N},V=function(h){for(var N=h.length,k=0;k>>32-D,p)}(N=function(C,D,p,o){return d(d(D,C),d(p,o))}(h,N,t,a),S,k)},n=function(h,N,k,t,S,a,T,C){return l(k&t|~k&S,N,k,a,T,C)},J=function(h,N,k,t,S,a,T,C){return l(k&S|t&~S,N,k,a,T,C)},W=function(h,N,k,t,S,a,T,C){return l(k^t^S,N,k,a,T,C)},E=function(h,N,k,t,S,a,T,C){return l(t^(k|~S),N,k,a,T,C)},Z=function(h,N,k){k===void 0&&(k=d);var t=h[0],S=h[1],a=h[2],T=h[3],C=n.bind(null,k);t=C(t,S,a,T,N[0],7,-680876936),T=C(T,t,S,a,N[1],12,-389564586),a=C(a,T,t,S,N[2],17,606105819),S=C(S,a,T,t,N[3],22,-1044525330),t=C(t,S,a,T,N[4],7,-176418897),T=C(T,t,S,a,N[5],12,1200080426),a=C(a,T,t,S,N[6],17,-1473231341),S=C(S,a,T,t,N[7],22,-45705983),t=C(t,S,a,T,N[8],7,1770035416),T=C(T,t,S,a,N[9],12,-1958414417),a=C(a,T,t,S,N[10],17,-42063),S=C(S,a,T,t,N[11],22,-1990404162),t=C(t,S,a,T,N[12],7,1804603682),T=C(T,t,S,a,N[13],12,-40341101),a=C(a,T,t,S,N[14],17,-1502002290),S=C(S,a,T,t,N[15],22,1236535329);var D=J.bind(null,k);t=D(t,S,a,T,N[1],5,-165796510),T=D(T,t,S,a,N[6],9,-1069501632),a=D(a,T,t,S,N[11],14,643717713),S=D(S,a,T,t,N[0],20,-373897302),t=D(t,S,a,T,N[5],5,-701558691),T=D(T,t,S,a,N[10],9,38016083),a=D(a,T,t,S,N[15],14,-660478335),S=D(S,a,T,t,N[4],20,-405537848),t=D(t,S,a,T,N[9],5,568446438),T=D(T,t,S,a,N[14],9,-1019803690),a=D(a,T,t,S,N[3],14,-187363961),S=D(S,a,T,t,N[8],20,1163531501),t=D(t,S,a,T,N[13],5,-1444681467),T=D(T,t,S,a,N[2],9,-51403784),a=D(a,T,t,S,N[7],14,1735328473),S=D(S,a,T,t,N[12],20,-1926607734);var p=W.bind(null,k);t=p(t,S,a,T,N[5],4,-378558),T=p(T,t,S,a,N[8],11,-2022574463),a=p(a,T,t,S,N[11],16,1839030562),S=p(S,a,T,t,N[14],23,-35309556),t=p(t,S,a,T,N[1],4,-1530992060),T=p(T,t,S,a,N[4],11,1272893353),a=p(a,T,t,S,N[7],16,-155497632),S=p(S,a,T,t,N[10],23,-1094730640),t=p(t,S,a,T,N[13],4,681279174),T=p(T,t,S,a,N[0],11,-358537222),a=p(a,T,t,S,N[3],16,-722521979),S=p(S,a,T,t,N[6],23,76029189),t=p(t,S,a,T,N[9],4,-640364487),T=p(T,t,S,a,N[12],11,-421815835),a=p(a,T,t,S,N[15],16,530742520),S=p(S,a,T,t,N[2],23,-995338651);var o=E.bind(null,k);t=o(t,S,a,T,N[0],6,-198630844),T=o(T,t,S,a,N[7],10,1126891415),a=o(a,T,t,S,N[14],15,-1416354905),S=o(S,a,T,t,N[5],21,-57434055),t=o(t,S,a,T,N[12],6,1700485571),T=o(T,t,S,a,N[3],10,-1894986606),a=o(a,T,t,S,N[10],15,-1051523),S=o(S,a,T,t,N[1],21,-2054922799),t=o(t,S,a,T,N[8],6,1873313359),T=o(T,t,S,a,N[15],10,-30611744),a=o(a,T,t,S,N[6],15,-1560198380),S=o(S,a,T,t,N[13],21,1309151649),t=o(t,S,a,T,N[4],6,-145523070),T=o(T,t,S,a,N[11],10,-1120210379),a=o(a,T,t,S,N[2],15,718787259),S=o(S,a,T,t,N[9],21,-343485551),h[0]=k(t,h[0]),h[1]=k(S,h[1]),h[2]=k(a,h[2]),h[3]=k(T,h[3])},e=function(h){for(var N=[],k=0;k<64;k+=4)N[k>>2]=h.charCodeAt(k)+(h.charCodeAt(k+1)<<8)+(h.charCodeAt(k+2)<<16)+(h.charCodeAt(k+3)<<24);return N},r=function(h,N){var k,t=h.length,S=[1732584193,-271733879,-1732584194,271733878];for(k=64;k<=t;k+=64)Z(S,e(h.substring(k-64,k)),N);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=(h=h.substring(k-64)).length;for(k=0;k>2]|=h.charCodeAt(k)<<(k%4<<3);if(a[k>>2]|=128<<(k%4<<3),k>55)for(Z(S,a,N),k=16;k--;)a[k]=0;return a[14]=8*t,Z(S,a,N),S};function c(h){var N;return V(r("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(N=function(k,t){var S=(65535&k)+(65535&t);return(k>>16)+(t>>16)+(S>>16)<<16|65535&S}),V(r(h,N))}}]);var JU=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,eU=Object.keys,iU=Array.isArray;function GU(F,U){return typeof U!="object"||eU(U).forEach(function(Q){F[Q]=U[Q]}),F}typeof Promise=="undefined"||JU.Promise||(JU.Promise=Promise);var hB=Object.getPrototypeOf,zZ={}.hasOwnProperty;function jU(F,U){return zZ.call(F,U)}function iQ(F,U){typeof U=="function"&&(U=U(hB(F))),(typeof Reflect=="undefined"?eU:Reflect.ownKeys)(U).forEach(Q=>{eF(F,Q,U[Q])})}var ql=Object.defineProperty;function eF(F,U,Q,B){ql(F,U,GU(Q&&jU(Q,"get")&&typeof Q.get=="function"?{get:Q.get,set:Q.set,configurable:!0}:{value:Q,configurable:!0,writable:!0},B))}function sQ(F){return{from:function(U){return F.prototype=Object.create(U.prototype),eF(F.prototype,"constructor",F),{extend:iQ.bind(null,F.prototype)}}}}var uZ=Object.getOwnPropertyDescriptor;function J0(F,U){let Q;return uZ(F,U)||(Q=hB(F))&&J0(Q,U)}var xZ=[].slice;function rR(F,U,Q){return xZ.call(F,U,Q)}function Al(F,U){return U(F)}function cB(F){if(!F)throw new Error("Assertion Failed")}function $l(F){JU.setImmediate?setImmediate(F):setTimeout(F,0)}function Un(F,U){return F.reduce((Q,B,R)=>{var V=U(B,R);return V&&(Q[V[0]]=V[1]),Q},{})}function kF(F,U){if(jU(F,U))return F[U];if(!U)return F;if(typeof U!="string"){for(var Q=[],B=0,R=U.length;B["Int","Uint","Float"].map(U=>U+F+"Array")))).filter(F=>JU[F]),LZ=Bn.map(F=>JU[F]);Un(Bn,F=>[F,!0]);var GF=null;function rB(F){GF=typeof WeakMap!="undefined"&&new WeakMap;let U=W0(F);return GF=null,U}function W0(F){if(!F||typeof F!="object")return F;let U=GF&&GF.get(F);if(U)return U;if(iU(F)){U=[],GF&&GF.set(F,U);for(var Q=0,B=F.length;Q=0)U=F;else{let V=hB(F);for(var R in U=V===Object.prototype?{}:Object.create(V),GF&&GF.set(F,U),F)jU(F,R)&&(U[R]=W0(F[R]))}return U}var{toString:jZ}={};function Z0(F){return jZ.call(F).slice(8,-1)}var N0=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",IZ=typeof N0=="symbol"?function(F){var U;return F!=null&&(U=F[N0])&&U.apply(F)}:function(){return null},YQ={};function aF(F){var U,Q,B,R;if(arguments.length===1){if(iU(F))return F.slice();if(this===YQ&&typeof F=="string")return[F];if(R=IZ(F)){for(Q=[];!(B=R.next()).done;)Q.push(B.value);return Q}if(F==null)return[F];if(typeof(U=F.length)=="number"){for(Q=new Array(U);U--;)Q[U]=F[U];return Q}return[F]}for(U=arguments.length,Q=new Array(U);U--;)Q[U]=arguments[U];return Q}var E0=typeof Symbol!="undefined"?F=>F[Symbol.toStringTag]==="AsyncFunction":()=>!1,VF=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Rn(F,U){VF=F,Vn=U}var Vn=()=>!0,fZ=!new Error("").stack;function UQ(){if(fZ)try{throw UQ.arguments,new Error}catch(F){return F}return new Error}function t0(F,U){var Q=F.stack;return Q?(U=U||0,Q.indexOf(F.name)===0&&(U+=(F.name+F.message).split(` `).length),Q.split(` -`).slice(U).filter(Rn).map(B=>` -`+B).join("")):""}var Vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],S0=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Vn),fZ={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function YQ(F,U){this._e=UQ(),this.name=F,this.message=U}function dn(F,U){return F+". Errors: "+Object.keys(U).map(Q=>U[Q].toString()).filter((Q,B,R)=>R.indexOf(Q)===B).join(` -`)}function CR(F,U,Q,B){this._e=UQ(),this.failures=U,this.failedKeys=B,this.successCount=Q,this.message=dn(F,U)}function DB(F,U){this._e=UQ(),this.name="BulkError",this.failures=Object.keys(U).map(Q=>U[Q]),this.failuresByPos=U,this.message=dn(F,U)}iQ(YQ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+t0(this._e,2))}},toString:function(){return this.name+": "+this.message}}),iQ(CR).from(YQ),iQ(DB).from(YQ);var e0=S0.reduce((F,U)=>(F[U]=U+"Error",F),{}),KZ=YQ,K=S0.reduce((F,U)=>{var Q=U+"Error";function B(R,V){this._e=UQ(),this.name=Q,R?typeof R=="string"?(this.message=`${R}${V?` - `+V:""}`,this.inner=V||null):typeof R=="object"&&(this.message=`${R.name} ${R.message}`,this.inner=R):(this.message=fZ[U]||Q,this.inner=null)}return iQ(B).from(KZ),F[U]=B,F},{});K.Syntax=SyntaxError,K.Type=TypeError,K.Range=RangeError;var ln=Vn.reduce((F,U)=>(F[U+"Error"]=K[U],F),{}),DR=S0.reduce((F,U)=>(["Syntax","Type","Range"].indexOf(U)===-1&&(F[U+"Error"]=K[U]),F),{});function dU(){}function pB(F){return F}function gZ(F,U){return F==null||F===pB?U:function(Q){return U(F(Q))}}function FQ(F,U){return function(){F.apply(this,arguments),U.apply(this,arguments)}}function PZ(F,U){return F===dU?U:function(){var Q=F.apply(this,arguments);Q!==void 0&&(arguments[0]=Q);var B=this.onsuccess,R=this.onerror;this.onsuccess=null,this.onerror=null;var V=U.apply(this,arguments);return B&&(this.onsuccess=this.onsuccess?FQ(B,this.onsuccess):B),R&&(this.onerror=this.onerror?FQ(R,this.onerror):R),V!==void 0?V:Q}}function qZ(F,U){return F===dU?U:function(){F.apply(this,arguments);var Q=this.onsuccess,B=this.onerror;this.onsuccess=this.onerror=null,U.apply(this,arguments),Q&&(this.onsuccess=this.onsuccess?FQ(Q,this.onsuccess):Q),B&&(this.onerror=this.onerror?FQ(B,this.onerror):B)}}function _Z(F,U){return F===dU?U:function(Q){var B=F.apply(this,arguments);GU(Q,B);var R=this.onsuccess,V=this.onerror;this.onsuccess=null,this.onerror=null;var d=U.apply(this,arguments);return R&&(this.onsuccess=this.onsuccess?FQ(R,this.onsuccess):R),V&&(this.onerror=this.onerror?FQ(V,this.onerror):V),B===void 0?d===void 0?void 0:d:GU(B,d)}}function AZ(F,U){return F===dU?U:function(){return U.apply(this,arguments)!==!1&&F.apply(this,arguments)}}function k0(F,U){return F===dU?U:function(){var Q=F.apply(this,arguments);if(Q&&typeof Q.then=="function"){for(var B=this,R=arguments.length,V=new Array(R);R--;)V[R]=arguments[R];return Q.then(function(){return U.apply(B,V)})}return U.apply(this,arguments)}}DR.ModifyError=CR,DR.DexieError=YQ,DR.BulkError=DB;var mB={},[a0,pR,T0]=typeof Promise=="undefined"?[]:(()=>{let F=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[F,cB(F),F];let U=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[U,cB(U),F]})(),nn=pR&&pR.then,mR=a0&&a0.constructor,h0=!!T0,c0=!1,$Z=T0?()=>{T0.then(sR)}:JU.setImmediate?setImmediate.bind(null,sR):JU.MutationObserver?()=>{var F=document.createElement("div");new MutationObserver(()=>{sR(),F=null}).observe(F,{attributes:!0}),F.setAttribute("i","1")}:()=>{setTimeout(sR,0)},MB=function(F,U){oB.push([F,U]),MR&&($Z(),MR=!1)},r0=!0,MR=!0,QQ=[],oR=[],C0=null,D0=pB,yQ={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:kn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(F=>{try{kn(F[0],F[1])}catch{}})}},x=yQ,oB=[],BQ=0,iR=[];function b(F){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=dU,this._lib=!1;var U=this._PSD=x;if(VF&&(this._stackHolder=UQ(),this._prev=null,this._numPrev=0),typeof F!="function"){if(F!==mB)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&m0(this,this._value))}this._state=null,this._value=null,++U.ref,Wn(this,F)}var p0={get:function(){var F=x,U=vR;function Q(B,R){var V=!F.global&&(F!==x||U!==vR);let d=V&&!TF();var l=new b((n,J)=>{M0(this,new Jn(bR(B,F,V,d),bR(R,F,V,d),n,J,F))});return VF&&En(l,this),l}return Q.prototype=mB,Q},set:function(F){eF(this,"then",F&&F.prototype===mB?p0:{get:function(){return F},set:p0.set})}};function Jn(F,U,Q,B,R){this.onFulfilled=typeof F=="function"?F:null,this.onRejected=typeof U=="function"?U:null,this.resolve=Q,this.reject=B,this.psd=R}function Wn(F,U){try{U(Q=>{if(F._state===null){if(Q===F)throw new TypeError("A promise cannot be resolved with itself.");var B=F._lib&&iB();Q&&typeof Q.then=="function"?Wn(F,(R,V)=>{Q instanceof b?Q._then(R,V):Q.then(R,V)}):(F._state=!0,F._value=Q,Zn(F)),B&&sB()}},m0.bind(null,F))}catch(Q){m0(F,Q)}}function m0(F,U){if(oR.push(U),F._state===null){var Q=F._lib&&iB();U=D0(U),F._state=!1,F._value=U,VF&&U!==null&&typeof U=="object"&&!U._promise&&function(B,R,V){try{B.apply(null,V)}catch(d){R&&R(d)}}(()=>{var B=J0(U,"stack");U._promise=F,eF(U,"stack",{get:()=>c0?B&&(B.get?B.get.apply(U):B.value):F.stack})}),function(B){QQ.some(R=>R._value===B._value)||QQ.push(B)}(F),Zn(F),Q&&sB()}}function Zn(F){var U=F._listeners;F._listeners=[];for(var Q=0,B=U.length;Q{--BQ==0&&o0()},[]))}function M0(F,U){if(F._state!==null){var Q=F._state?U.onFulfilled:U.onRejected;if(Q===null)return(F._state?U.resolve:U.reject)(F._value);++U.psd.ref,++BQ,MB(UN,[Q,F,U])}else F._listeners.push(U)}function UN(F,U,Q){try{C0=U;var B,R=U._value;U._state?B=F(R):(oR.length&&(oR=[]),B=F(R),oR.indexOf(R)===-1&&function(V){for(var d=QQ.length;d;)if(QQ[--d]._value===V._value)return void QQ.splice(d,1)}(U)),Q.resolve(B)}catch(V){Q.reject(V)}finally{C0=null,--BQ==0&&o0(),--Q.psd.ref||Q.psd.finalize()}}function Nn(F,U,Q){if(U.length===Q)return U;var B="";if(F._state===!1){var R,V,d=F._value;d!=null?(R=d.name||"Error",V=d.message||d,B=t0(d,0)):(R=d,V=""),U.push(R+(V?": "+V:"")+B)}return VF&&((B=t0(F._stackHolder,2))&&U.indexOf(B)===-1&&U.push(B),F._prev&&Nn(F._prev,U,Q)),U}function En(F,U){var Q=U?U._numPrev+1:0;Q<100&&(F._prev=U,F._numPrev=Q)}function sR(){iB()&&sB()}function iB(){var F=r0;return r0=!1,MR=!1,F}function sB(){var F,U,Q;do for(;oB.length>0;)for(F=oB,oB=[],Q=F.length,U=0;U0);r0=!0,MR=!0}function o0(){var F=QQ;QQ=[],F.forEach(B=>{B._PSD.onunhandled.call(null,B._value,B)});for(var U=iR.slice(0),Q=U.length;Q;)U[--Q]()}function YR(F){return new b(mB,!1,F)}function ZU(F,U){var Q=x;return function(){var B=iB(),R=x;try{return bF(Q,!0),F.apply(this,arguments)}catch(V){U&&U(V)}finally{bF(R,!1),B&&sB()}}}oQ(b.prototype,{then:p0,_then:function(F,U){M0(this,new Jn(null,null,F,U,x))},catch:function(F){if(arguments.length===1)return this.then(null,F);var U=arguments[0],Q=arguments[1];return typeof U=="function"?this.then(null,B=>B instanceof U?Q(B):YR(B)):this.then(null,B=>B&&B.name===U?Q(B):YR(B))},finally:function(F){return this.then(U=>(F(),U),U=>(F(),YR(U)))},stack:{get:function(){if(this._stack)return this._stack;try{c0=!0;var F=Nn(this,[],20).join(` -From previous: `);return this._state!==null&&(this._stack=F),F}finally{c0=!1}}},timeout:function(F,U){return F<1/0?new b((Q,B)=>{var R=setTimeout(()=>B(new K.Timeout(U)),F);this.then(Q,B).finally(clearTimeout.bind(null,R))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&eF(b.prototype,Symbol.toStringTag,"Dexie.Promise"),yQ.env=tn(),oQ(b,{all:function(){var F=aF.apply(null,arguments).map(GR);return new b(function(U,Q){F.length===0&&U([]);var B=F.length;F.forEach((R,V)=>b.resolve(R).then(d=>{F[V]=d,--B||U(F)},Q))})},resolve:F=>{if(F instanceof b)return F;if(F&&typeof F.then=="function")return new b((Q,B)=>{F.then(Q,B)});var U=new b(mB,!0,F);return En(U,C0),U},reject:YR,race:function(){var F=aF.apply(null,arguments).map(GR);return new b((U,Q)=>{F.map(B=>b.resolve(B).then(U,Q))})},PSD:{get:()=>x,set:F=>x=F},totalEchoes:{get:()=>vR},newPSD:GF,usePSD:GQ,scheduler:{get:()=>MB,set:F=>{MB=F}},rejectionMapper:{get:()=>D0,set:F=>{D0=F}},follow:(F,U)=>new b((Q,B)=>GF((R,V)=>{var d=x;d.unhandleds=[],d.onunhandled=V,d.finalize=FQ(function(){(function(l){function n(){l(),iR.splice(iR.indexOf(n),1)}iR.push(n),++BQ,MB(()=>{--BQ==0&&o0()},[])})(()=>{this.unhandleds.length===0?R():V(this.unhandleds[0])})},d.finalize),F()},U,Q,B))}),mR&&(mR.allSettled&&eF(b,"allSettled",function(){let F=aF.apply(null,arguments).map(GR);return new b(U=>{F.length===0&&U([]);let Q=F.length,B=new Array(Q);F.forEach((R,V)=>b.resolve(R).then(d=>B[V]={status:"fulfilled",value:d},d=>B[V]={status:"rejected",reason:d}).then(()=>--Q||U(B)))})}),mR.any&&typeof AggregateError!="undefined"&&eF(b,"any",function(){let F=aF.apply(null,arguments).map(GR);return new b((U,Q)=>{F.length===0&&Q(new AggregateError([]));let B=F.length,R=new Array(B);F.forEach((V,d)=>b.resolve(V).then(l=>U(l),l=>{R[d]=l,--B||Q(new AggregateError(R))}))})}));var sU={awaits:0,echoes:0,id:0},FN=0,yR=[],i0=0,vR=0,QN=0;function GF(F,U,Q,B){var R=x,V=Object.create(R);V.parent=R,V.ref=0,V.global=!1,V.id=++QN;var d=yQ.env;V.env=h0?{Promise:b,PromiseProp:{value:b,configurable:!0,writable:!0},all:b.all,race:b.race,allSettled:b.allSettled,any:b.any,resolve:b.resolve,reject:b.reject,nthen:en(d.nthen,V),gthen:en(d.gthen,V)}:{},U&&GU(V,U),++R.ref,V.finalize=function(){--this.parent.ref||this.parent.finalize()};var l=GQ(V,F,Q,B);return V.ref===0&&V.finalize(),l}function vQ(){return sU.id||(sU.id=++FN),++sU.awaits,sU.echoes+=100,sU.id}function TF(){return!!sU.awaits&&(--sU.awaits==0&&(sU.id=0),sU.echoes=100*sU.awaits,!0)}function GR(F){return sU.echoes&&F&&F.constructor===mR?(vQ(),F.then(U=>(TF(),U),U=>(TF(),TU(U)))):F}function BN(F){++vR,sU.echoes&&--sU.echoes!=0||(sU.echoes=sU.id=0),yR.push(x),bF(F,!0)}function RN(){var F=yR[yR.length-1];yR.pop(),bF(F,!1)}function bF(F,U){var Q=x;if((U?!sU.echoes||i0++&&F===x:!i0||--i0&&F===x)||Sn(U?BN.bind(null,F):RN),F!==x&&(x=F,Q===yQ&&(yQ.env=tn()),h0)){var B=yQ.env.Promise,R=F.env;pR.then=R.nthen,B.prototype.then=R.gthen,(Q.global||F.global)&&(Object.defineProperty(JU,"Promise",R.PromiseProp),B.all=R.all,B.race=R.race,B.resolve=R.resolve,B.reject=R.reject,R.allSettled&&(B.allSettled=R.allSettled),R.any&&(B.any=R.any))}}function tn(){var F=JU.Promise;return h0?{Promise:F,PromiseProp:Object.getOwnPropertyDescriptor(JU,"Promise"),all:F.all,race:F.race,allSettled:F.allSettled,any:F.any,resolve:F.resolve,reject:F.reject,nthen:pR.then,gthen:F.prototype.then}:{}}function GQ(F,U,Q,B,R){var V=x;try{return bF(F,!0),U(Q,B,R)}finally{bF(V,!1)}}function Sn(F){nn.call(a0,F)}function bR(F,U,Q,B){return typeof F!="function"?F:function(){var R=x;Q&&vQ(),bF(U,!0);try{return F.apply(this,arguments)}finally{bF(R,!1),B&&Sn(TF)}}}function en(F,U){return function(Q,B){return F.call(this,bR(Q,U),bR(B,U))}}(""+nn).indexOf("[native code]")===-1&&(vQ=TF=dU);function kn(F,U){var Q;try{Q=U.onuncatched(F)}catch{}if(Q!==!1)try{var B,R={promise:U,reason:F};if(JU.document&&document.createEvent?((B=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),GU(B,R)):JU.CustomEvent&&GU(B=new CustomEvent("unhandledrejection",{detail:R}),R),B&&JU.dispatchEvent&&(dispatchEvent(B),!JU.PromiseRejectionEvent&&JU.onunhandledrejection))try{JU.onunhandledrejection(B)}catch{}VF&&B&&!B.defaultPrevented&&console.warn(`Unhandled rejection: ${F.stack||F}`)}catch{}}var TU=b.reject;function s0(F,U,Q,B){if(F.idbdb&&(F._state.openComplete||x.letThrough||F._vip)){var R=F._createTransaction(U,Q,F._dbSchema);try{R.create(),F._state.PR1398_maxLoop=3}catch(V){return V.name===e0.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>s0(F,U,Q,B))):TU(V)}return R._promise(U,(V,d)=>GF(()=>(x.trans=R,B(V,d,R)))).then(V=>R._completion.then(()=>V))}if(F._state.openComplete)return TU(new K.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._options.autoOpen)return TU(new K.DatabaseClosed);F.open().catch(dU)}return F._state.dbReadyPromise.then(()=>s0(F,U,Q,B))}var RQ=String.fromCharCode(65535),hF="Invalid key provided. Keys must be of type string, number, Date or Array.",YB=[],XR=typeof navigator!="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),VN=XR,dN=XR,an=F=>!/(dexie\.js|dexie\.min\.js)/.test(F);function VQ(F,U){return F?U?function(){return F.apply(this,arguments)&&U.apply(this,arguments)}:F:U}var Tn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function OR(F){return typeof F!="string"||/\./.test(F)?U=>U:U=>(U[F]===void 0&&F in U&&delete(U=CB(U))[F],U)}var hn=class{_trans(U,Q,B){let R=this._tx||x.trans,V=this.name;function d(n,J,W){if(!W.schema[V])throw new K.NotFound("Table "+V+" not part of transaction");return Q(W.idbtrans,W)}let l=iB();try{return R&&R.db===this.db?R===x.trans?R._promise(U,d,B):GF(()=>R._promise(U,d,B),{trans:R,transless:x.transless||x}):s0(this.db,U,[this.name],d)}finally{l&&sB()}}get(U,Q){return U&&U.constructor===Object?this.where(U).first(Q):this._trans("readonly",B=>this.core.get({trans:B,key:U}).then(R=>this.hook.reading.fire(R))).then(Q)}where(U){if(typeof U=="string")return new this.db.WhereClause(this,U);if(iU(U))return new this.db.WhereClause(this,`[${U.join("+")}]`);let Q=eU(U);if(Q.length===1)return this.where(Q[0]).equals(U[Q[0]]);let B=this.schema.indexes.concat(this.schema.primKey).filter(J=>J.compound&&Q.every(W=>J.keyPath.indexOf(W)>=0)&&J.keyPath.every(W=>Q.indexOf(W)>=0))[0];if(B&&this.db._maxKey!==RQ)return this.where(B.name).equals(B.keyPath.map(J=>U[J]));!B&&VF&&console.warn(`The query ${JSON.stringify(U)} on ${this.name} would benefit of a compound index [${Q.join("+")}]`);let{idxByName:R}=this.schema,V=this.db._deps.indexedDB;function d(J,W){try{return V.cmp(J,W)===0}catch{return!1}}let[l,n]=Q.reduce(([J,W],E)=>{let Z=R[E],e=U[E];return[J||Z,J||!Z?VQ(W,Z&&Z.multi?r=>{let c=kF(r,E);return iU(c)&&c.some(h=>d(e,h))}:r=>d(e,kF(r,E))):W]},[null,null]);return l?this.where(l.name).equals(U[l.keyPath]).filter(n):B?this.filter(n):this.where(Q).equals("")}filter(U){return this.toCollection().and(U)}count(U){return this.toCollection().count(U)}offset(U){return this.toCollection().offset(U)}limit(U){return this.toCollection().limit(U)}each(U){return this.toCollection().each(U)}toArray(U){return this.toCollection().toArray(U)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(U){return new this.db.Collection(new this.db.WhereClause(this,iU(U)?`[${U.join("+")}]`:U))}reverse(){return this.toCollection().reverse()}mapToClass(U){this.schema.mappedClass=U;let Q=B=>{if(!B)return B;let R=Object.create(U.prototype);for(var V in B)if(jU(B,V))try{R[V]=B[V]}catch{}return R};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=Q,this.hook("reading",Q),U}defineClass(){return this.mapToClass(function(U){GU(this,U)})}add(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=OR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"add",keys:Q!=null?[Q]:null,values:[V]})).then(d=>d.numFailures?b.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{AU(U,R,d)}catch{}return d})}update(U,Q){if(typeof U!="object"||iU(U))return this.where(":id").equals(U).modify(Q);{let B=kF(U,this.schema.primKey.keyPath);if(B===void 0)return TU(new K.InvalidArgument("Given object does not contain its primary key"));try{typeof Q!="function"?eU(Q).forEach(R=>{AU(U,R,Q[R])}):Q(U,{value:U,primKey:B})}catch{}return this.where(":id").equals(B).modify(Q)}}put(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=OR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"put",values:[V],keys:Q!=null?[Q]:null})).then(d=>d.numFailures?b.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{AU(U,R,d)}catch{}return d})}delete(U){return this._trans("readwrite",Q=>this.core.mutate({trans:Q,type:"delete",keys:[U]})).then(Q=>Q.numFailures?b.reject(Q.failures[0]):void 0)}clear(){return this._trans("readwrite",U=>this.core.mutate({trans:U,type:"deleteRange",range:Tn})).then(U=>U.numFailures?b.reject(U.failures[0]):void 0)}bulkGet(U){return this._trans("readonly",Q=>this.core.getMany({keys:U,trans:Q}).then(B=>B.map(R=>this.hook.reading.fire(R))))}bulkAdd(U,Q,B){let R=Array.isArray(Q)?Q:void 0,V=(B=B||(R?void 0:Q))?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new K.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new K.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(OR(n)):U;return this.core.mutate({trans:d,type:"add",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{if(E===0)return V?Z:e;throw new DB(`${this.name}.bulkAdd(): ${E} of ${J} operations failed`,r)})})}bulkPut(U,Q,B){let R=Array.isArray(Q)?Q:void 0,V=(B=B||(R?void 0:Q))?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new K.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new K.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(OR(n)):U;return this.core.mutate({trans:d,type:"put",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{if(E===0)return V?Z:e;throw new DB(`${this.name}.bulkPut(): ${E} of ${J} operations failed`,r)})})}bulkDelete(U){let Q=U.length;return this._trans("readwrite",B=>this.core.mutate({trans:B,type:"delete",keys:U})).then(({numFailures:B,lastResult:R,failures:V})=>{if(B===0)return R;throw new DB(`${this.name}.bulkDelete(): ${B} of ${Q} operations failed`,V)})}};function yB(F){var U={},Q=function(l,n){if(n){for(var J=arguments.length,W=new Array(J-1);--J;)W[J-1]=arguments[J];return U[l].subscribe.apply(null,W),F}if(typeof l=="string")return U[l]};Q.addEventType=V;for(var B=1,R=arguments.length;BVQ(B(),U()):U,F.justLimit=Q&&!B}function HR(F,U){if(F.isPrimKey)return U.primaryKey;let Q=U.getIndexByKeyPath(F.index);if(!Q)throw new K.Schema("KeyPath "+F.index+" on object store "+U.name+" is not indexed");return Q}function cn(F,U,Q){let B=HR(F,U.schema);return U.openCursor({trans:Q,values:!F.keysOnly,reverse:F.dir==="prev",unique:!!F.unique,query:{index:B,range:F.range}})}function zR(F,U,Q,B){let R=F.replayFilter?VQ(F.filter,F.replayFilter()):F.filter;if(F.or){let V={},d=(l,n,J)=>{if(!R||R(n,J,Z=>n.stop(Z),Z=>n.fail(Z))){var W=n.primaryKey,E=""+W;E==="[object ArrayBuffer]"&&(E=""+new Uint8Array(W)),jU(V,E)||(V[E]=!0,U(l,n,J))}};return Promise.all([F.or._iterate(d,Q),rn(cn(F,B,Q),F.algorithm,d,!F.keysOnly&&F.valueMapper)])}return rn(cn(F,B,Q),VQ(F.algorithm,R),U,!F.keysOnly&&F.valueMapper)}function rn(F,U,Q,B){var R=ZU(B?(V,d,l)=>Q(B(V),d,l):Q);return F.then(V=>{if(V)return V.start(()=>{var d=()=>V.continue();U&&!U(V,l=>d=l,l=>{V.stop(l),d=dU},l=>{V.fail(l),d=dU})||R(V.value,V,l=>d=l),d()})})}function bU(F,U){try{let Q=Cn(F),B=Cn(U);if(Q!==B)return Q==="Array"?1:B==="Array"?-1:Q==="binary"?1:B==="binary"?-1:Q==="string"?1:B==="string"?-1:Q==="Date"?1:B!=="Date"?NaN:-1;switch(Q){case"number":case"Date":case"string":return F>U?1:FzR(Q,U,B,Q.table.core))}count(U){return this._read(Q=>{let B=this._ctx,R=B.table.core;if(bQ(B,!0))return R.count({trans:Q,query:{index:HR(B,R.schema),range:B.range}}).then(d=>Math.min(d,B.limit));var V=0;return zR(B,()=>(++V,!1),Q,R).then(()=>V)}).then(U)}sortBy(U,Q){let B=U.split(".").reverse(),R=B[0],V=B.length-1;function d(J,W){return W?d(J[B[W]],W-1):J[R]}var l=this._ctx.dir==="next"?1:-1;function n(J,W){var E=d(J,V),Z=d(W,V);return EZ?l:0}return this.toArray(function(J){return J.sort(n)}).then(Q)}toArray(U){return this._read(Q=>{var B=this._ctx;if(B.dir==="next"&&bQ(B,!0)&&B.limit>0){let{valueMapper:R}=B,V=HR(B,B.table.core.schema);return B.table.core.query({trans:Q,limit:B.limit,values:!0,query:{index:V,range:B.range}}).then(({result:d})=>R?d.map(R):d)}{let R=[];return zR(B,V=>R.push(V),Q,B.table.core).then(()=>R)}},U)}offset(U){var Q=this._ctx;return U<=0||(Q.offset+=U,bQ(Q)?y0(Q,()=>{var B=U;return(R,V)=>B===0||(B===1?(--B,!1):(V(()=>{R.advance(B),B=0}),!1))}):y0(Q,()=>{var B=U;return()=>--B<0})),this}limit(U){return this._ctx.limit=Math.min(this._ctx.limit,U),y0(this._ctx,()=>{var Q=U;return function(B,R,V){return--Q<=0&&R(V),Q>=0}},!0),this}until(U,Q){return Y0(this._ctx,function(B,R,V){return!U(B.value)||(R(V),Q)}),this}first(U){return this.limit(1).toArray(function(Q){return Q[0]}).then(U)}last(U){return this.reverse().first(U)}filter(U){var Q,B;return Y0(this._ctx,function(R){return U(R.value)}),Q=this._ctx,B=U,Q.isMatch=VQ(Q.isMatch,B),this}and(U){return this.filter(U)}or(U){return new this.db.WhereClause(this._ctx.table,U,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.key,R)})}eachUniqueKey(U){return this._ctx.unique="unique",this.eachKey(U)}eachPrimaryKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.primaryKey,R)})}keys(U){var Q=this._ctx;Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.key)}).then(function(){return B}).then(U)}primaryKeys(U){var Q=this._ctx;if(Q.dir==="next"&&bQ(Q,!0)&&Q.limit>0)return this._read(R=>{var V=HR(Q,Q.table.core.schema);return Q.table.core.query({trans:R,values:!1,limit:Q.limit,query:{index:V,range:Q.range}})}).then(({result:R})=>R).then(U);Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.primaryKey)}).then(function(){return B}).then(U)}uniqueKeys(U){return this._ctx.unique="unique",this.keys(U)}firstKey(U){return this.limit(1).keys(function(Q){return Q[0]}).then(U)}lastKey(U){return this.reverse().firstKey(U)}distinct(){var U=this._ctx,Q=U.index&&U.table.schema.idxByName[U.index];if(!Q||!Q.multi)return this;var B={};return Y0(this._ctx,function(R){var V=R.primaryKey.toString(),d=jU(B,V);return B[V]=!0,!d}),this}modify(U){var Q=this._ctx;return this._write(B=>{var R;if(typeof U=="function")R=U;else{var V=eU(U),d=V.length;R=function(c){for(var h=!1,N=0;N{let{failures:N,numFailures:k}=h;Z+=c-k;for(let t of eU(N))E.push(N[t])};return this.clone().primaryKeys().then(c=>{let h=N=>{let k=Math.min(W,c.length-N);return l.getMany({trans:B,keys:c.slice(N,N+k),cache:"immutable"}).then(t=>{let S=[],a=[],T=n?[]:null,C=[];for(let p=0;p0&&l.mutate({trans:B,type:"add",values:S}).then(p=>{for(let o in p.failures)C.splice(parseInt(o),1);r(S.length,p)})).then(()=>(a.length>0||D&&typeof U=="object")&&l.mutate({trans:B,type:"put",keys:T,values:a,criteria:D,changeSpec:typeof U!="function"&&U}).then(p=>r(a.length,p))).then(()=>(C.length>0||D&&U===v0)&&l.mutate({trans:B,type:"delete",keys:C,criteria:D}).then(p=>r(C.length,p))).then(()=>c.length>N+k&&h(N+W))})};return h(0).then(()=>{if(E.length>0)throw new CR("Error modifying one or more objects",E,Z,e);return c.length})})})}delete(){var U=this._ctx,Q=U.range;return bQ(U)&&(U.isPrimKey&&!dN||Q.type===3)?this._write(B=>{let{primaryKey:R}=U.table.core.schema,V=Q;return U.table.core.count({trans:B,query:{index:R,range:V}}).then(d=>U.table.core.mutate({trans:B,type:"deleteRange",range:V}).then(({failures:l,lastResult:n,results:J,numFailures:W})=>{if(W)throw new CR("Could not delete some values",Object.keys(l).map(E=>l[E]),d-W);return d-W}))}):this.modify(v0)}},v0=(F,U)=>U.value=null;function lN(F,U){return FU?-1:F===U?0:1}function IU(F,U,Q){var B=F instanceof G0?new F.Collection(F):F;return B._ctx.error=Q?new Q(U):new TypeError(U),B}function XQ(F){return new F.Collection(F,()=>mn("")).limit(0)}function JN(F,U,Q,B,R,V){for(var d=Math.min(F.length,B.length),l=-1,n=0;n=0?F.substr(0,l)+U[l]+Q.substr(l+1):null;R(F[n],J)<0&&(l=n)}return dtypeof c=="string"))return IU(F,"String expected.");function Z(c){R=function(N){return N==="next"?k=>k.toUpperCase():k=>k.toLowerCase()}(c),V=function(N){return N==="next"?k=>k.toLowerCase():k=>k.toUpperCase()}(c),d=c==="next"?lN:nN;var h=Q.map(function(N){return{lower:V(N),upper:R(N)}}).sort(function(N,k){return d(N.lower,k.lower)});l=h.map(function(N){return N.upper}),n=h.map(function(N){return N.lower}),J=c,W=c==="next"?"":B}Z("next");var e=new F.Collection(F,()=>XF(l[0],n[E-1]+B));e._ondirectionchange=function(c){Z(c)};var r=0;return e._addAlgorithm(function(c,h,N){var k=c.key;if(typeof k!="string")return!1;var t=V(k);if(U(t,n,r))return!0;for(var S=null,a=r;a0)&&(S=T)}return h(S!==null?function(){c.continue(S+W)}:N),!1}),e}function XF(F,U,Q,B){return{type:2,lower:F,upper:U,lowerOpen:Q,upperOpen:B}}function mn(F){return{type:1,lower:F,upper:F}}var G0=class{get Collection(){return this._ctx.table.db.Collection}between(U,Q,B,R){B=B!==!1,R=R===!0;try{return this._cmp(U,Q)>0||this._cmp(U,Q)===0&&(B||R)&&(!B||!R)?XQ(this):new this.Collection(this,()=>XF(U,Q,!B,!R))}catch{return IU(this,hF)}}equals(U){return U==null?IU(this,hF):new this.Collection(this,()=>mn(U))}above(U){return U==null?IU(this,hF):new this.Collection(this,()=>XF(U,void 0,!0))}aboveOrEqual(U){return U==null?IU(this,hF):new this.Collection(this,()=>XF(U,void 0,!1))}below(U){return U==null?IU(this,hF):new this.Collection(this,()=>XF(void 0,U,!1,!0))}belowOrEqual(U){return U==null?IU(this,hF):new this.Collection(this,()=>XF(void 0,U))}startsWith(U){return typeof U!="string"?IU(this,"String expected."):this.between(U,U+RQ,!0,!0)}startsWithIgnoreCase(U){return U===""?this.startsWith(U):uR(this,(Q,B)=>Q.indexOf(B[0])===0,[U],RQ)}equalsIgnoreCase(U){return uR(this,(Q,B)=>Q===B[0],[U],"")}anyOfIgnoreCase(){var U=aF.apply(sQ,arguments);return U.length===0?XQ(this):uR(this,(Q,B)=>B.indexOf(Q)!==-1,U,"")}startsWithAnyOfIgnoreCase(){var U=aF.apply(sQ,arguments);return U.length===0?XQ(this):uR(this,(Q,B)=>B.some(R=>Q.indexOf(R)===0),U,RQ)}anyOf(){let U=aF.apply(sQ,arguments),Q=this._cmp;try{U.sort(Q)}catch{return IU(this,hF)}if(U.length===0)return XQ(this);let B=new this.Collection(this,()=>XF(U[0],U[U.length-1]));B._ondirectionchange=V=>{Q=V==="next"?this._ascending:this._descending,U.sort(Q)};let R=0;return B._addAlgorithm((V,d,l)=>{let n=V.key;for(;Q(n,U[R])>0;)if(++R,R===U.length)return d(l),!1;return Q(n,U[R])===0||(d(()=>{V.continue(U[R])}),!1)}),B}notEqual(U){return this.inAnyRange([[-(1/0),U],[U,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let U=aF.apply(sQ,arguments);if(U.length===0)return new this.Collection(this);try{U.sort(this._ascending)}catch{return IU(this,hF)}let Q=U.reduce((B,R)=>B?B.concat([[B[B.length-1][1],R]]):[[-(1/0),R]],null);return Q.push([U[U.length-1],this.db._maxKey]),this.inAnyRange(Q,{includeLowers:!1,includeUppers:!1})}inAnyRange(U,Q){let B=this._cmp,R=this._ascending,V=this._descending,d=this._min,l=this._max;if(U.length===0)return XQ(this);if(!U.every(k=>k[0]!==void 0&&k[1]!==void 0&&R(k[0],k[1])<=0))return IU(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",K.InvalidArgument);let n=!Q||Q.includeLowers!==!1,J=Q&&Q.includeUppers===!0,W,E=R;function Z(k,t){return E(k[0],t[0])}try{W=U.reduce(function(k,t){let S=0,a=k.length;for(;S0){T[0]=d(T[0],t[0]),T[1]=l(T[1],t[1]);break}}return S===a&&k.push(t),k},[]),W.sort(Z)}catch{return IU(this,hF)}let e=0,r=J?k=>R(k,W[e][1])>0:k=>R(k,W[e][1])>=0,c=n?k=>V(k,W[e][0])>0:k=>V(k,W[e][0])>=0,h=r,N=new this.Collection(this,()=>XF(W[0][0],W[W.length-1][1],!n,!J));return N._ondirectionchange=k=>{k==="next"?(h=r,E=R):(h=c,E=V),W.sort(Z)},N._addAlgorithm((k,t,S)=>{for(var a=k.key;h(a);)if(++e,e===W.length)return t(S),!1;return!!function(T){return!r(T)&&!c(T)}(a)||(this._cmp(a,W[e][1])===0||this._cmp(a,W[e][0])===0||t(()=>{E===R?k.continue(W[e][0]):k.continue(W[e][1])}),!1)}),N}startsWithAnyOf(){let U=aF.apply(sQ,arguments);return U.every(Q=>typeof Q=="string")?U.length===0?XQ(this):this.inAnyRange(U.map(Q=>[Q,Q+RQ])):IU(this,"startsWithAnyOf() only works with strings")}};function dF(F){return ZU(function(U){return GB(U),F(U.target.error),!1})}function GB(F){F.stopPropagation&&F.stopPropagation(),F.preventDefault&&F.preventDefault()}var OF=yB(null,"storagemutated"),Mn=class{_lock(){return rB(!x.global),++this._reculock,this._reculock!==1||x.global||(x.lockOwnerFor=this),this}_unlock(){if(rB(!x.global),--this._reculock==0)for(x.global||(x.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var U=this._blockedFuncs.shift();try{GQ(U[1],U[0])}catch{}}return this}_locked(){return this._reculock&&x.lockOwnerFor!==this}create(U){if(!this.mode)return this;let Q=this.db.idbdb,B=this.db._state.dbOpenError;if(rB(!this.idbtrans),!U&&!Q)switch(B&&B.name){case"DatabaseClosedError":throw new K.DatabaseClosed(B);case"MissingAPIError":throw new K.MissingAPI(B.message,B);default:throw new K.OpenFailed(B)}if(!this.active)throw new K.TransactionInactive;return rB(this._completion._state===null),(U=this.idbtrans=U||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):Q.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ZU(R=>{GB(R),this._reject(U.error)}),U.onabort=ZU(R=>{GB(R),this.active&&this._reject(new K.Abort(U.error)),this.active=!1,this.on("abort").fire(R)}),U.oncomplete=ZU(()=>{this.active=!1,this._resolve(),"mutatedParts"in U&&OF.storagemutated.fire(U.mutatedParts)}),this}_promise(U,Q,B){if(U==="readwrite"&&this.mode!=="readwrite")return TU(new K.ReadOnly("Transaction is readonly"));if(!this.active)return TU(new K.TransactionInactive);if(this._locked())return new b((V,d)=>{this._blockedFuncs.push([()=>{this._promise(U,Q,B).then(V,d)},x])});if(B)return GF(()=>{var V=new b((d,l)=>{this._lock();let n=Q(d,l,this);n&&n.then&&n.then(d,l)});return V.finally(()=>this._unlock()),V._lib=!0,V});var R=new b((V,d)=>{var l=Q(V,d,this);l&&l.then&&l.then(V,d)});return R._lib=!0,R}_root(){return this.parent?this.parent._root():this}waitFor(U){var Q=this._root();let B=b.resolve(U);if(Q._waitingFor)Q._waitingFor=Q._waitingFor.then(()=>B);else{Q._waitingFor=B,Q._waitingQueue=[];var R=Q.idbtrans.objectStore(Q.storeNames[0]);(function d(){for(++Q._spinCount;Q._waitingQueue.length;)Q._waitingQueue.shift()();Q._waitingFor&&(R.get(-1/0).onsuccess=d)})()}var V=Q._waitingFor;return new b((d,l)=>{B.then(n=>Q._waitingQueue.push(ZU(d.bind(null,n))),n=>Q._waitingQueue.push(ZU(l.bind(null,n)))).finally(()=>{Q._waitingFor===V&&(Q._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new K.Abort))}table(U){let Q=this._memoizedTables||(this._memoizedTables={});if(jU(Q,U))return Q[U];let B=this.schema[U];if(!B)throw new K.NotFound("Table "+U+" not part of transaction");let R=new this.db.Table(U,B,this);return R.core=this.db.core.table(U),Q[U]=R,R}};function b0(F,U,Q,B,R,V,d){return{name:F,keyPath:U,unique:Q,multi:B,auto:R,compound:V,src:(Q&&!d?"&":"")+(B?"*":"")+(R?"++":"")+on(U)}}function on(F){return typeof F=="string"?F:F?"["+[].join.call(F,"+")+"]":""}function sn(F,U,Q){return{name:F,primKey:U,indexes:Q,mappedClass:null,idxByName:$l(Q,B=>[B.name,B])}}var bB=F=>{try{return F.only([[]]),bB=()=>[[]],[[]]}catch{return bB=()=>RQ,RQ}};function X0(F){return F==null?()=>{}:typeof F=="string"?function(U){return U.split(".").length===1?Q=>Q[U]:Q=>kF(Q,U)}(F):U=>kF(U,F)}function Yn(F){return[].slice.call(F)}var WN=0;function XB(F){return F==null?":id":typeof F=="string"?F:`[${F.join("+")}]`}function ZN(F,U,Q){function B(n){if(n.type===3)return null;if(n.type===4)throw new Error("Cannot convert never type to IDBKeyRange");let{lower:J,upper:W,lowerOpen:E,upperOpen:Z}=n;return J===void 0?W===void 0?null:U.upperBound(W,!!Z):W===void 0?U.lowerBound(J,!!E):U.bound(J,W,!!E,!!Z)}let{schema:R,hasGetAll:V}=function(n,J){let W=Yn(n.objectStoreNames);return{schema:{name:n.name,tables:W.map(E=>J.objectStore(E)).map(E=>{let{keyPath:Z,autoIncrement:e}=E,r=iU(Z),c=Z==null,h={},N={name:E.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:c,compound:r,keyPath:Z,autoIncrement:e,unique:!0,extractKey:X0(Z)},indexes:Yn(E.indexNames).map(k=>E.index(k)).map(k=>{let{name:t,unique:S,multiEntry:a,keyPath:T}=k,C={name:t,compound:iU(T),keyPath:T,unique:S,multiEntry:a,extractKey:X0(T)};return h[XB(T)]=C,C}),getIndexByKeyPath:k=>h[XB(k)]};return h[":id"]=N.primaryKey,Z!=null&&(h[XB(Z)]=N.primaryKey),N})},hasGetAll:W.length>0&&"getAll"in J.objectStore(W[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(F,Q),d=R.tables.map(n=>function(J){let W=J.name;return{name:W,schema:J,mutate:function({trans:E,type:Z,keys:e,values:r,range:c}){return new Promise((h,N)=>{h=ZU(h);let k=E.objectStore(W),t=k.keyPath==null,S=Z==="put"||Z==="add";if(!S&&Z!=="delete"&&Z!=="deleteRange")throw new Error("Invalid operation type: "+Z);let{length:a}=e||r||{length:1};if(e&&r&&e.length!==r.length)throw new Error("Given keys array must have same length as given values array.");if(a===0)return h({numFailures:0,failures:{},results:[],lastResult:void 0});let T,C=[],D=[],p=0,o=v=>{++p,GB(v)};if(Z==="deleteRange"){if(c.type===4)return h({numFailures:p,failures:D,results:[],lastResult:void 0});c.type===3?C.push(T=k.clear()):C.push(T=k.delete(B(c)))}else{let[v,y]=S?t?[r,e]:[r,null]:[e,null];if(S)for(let i=0;i{let y=v.target.result;C.forEach((i,w)=>i.error!=null&&(D[w]=i.error)),h({numFailures:p,failures:D,results:Z==="delete"?e:C.map(i=>i.result),lastResult:y})};T.onerror=v=>{o(v),s(v)},T.onsuccess=s})},getMany:({trans:E,keys:Z})=>new Promise((e,r)=>{e=ZU(e);let c=E.objectStore(W),h=Z.length,N=new Array(h),k,t=0,S=0,a=C=>{let D=C.target;N[D._pos]=D.result,++S===t&&e(N)},T=dF(r);for(let C=0;Cnew Promise((e,r)=>{e=ZU(e);let c=E.objectStore(W).get(Z);c.onsuccess=h=>e(h.target.result),c.onerror=dF(r)}),query:function(E){return Z=>new Promise((e,r)=>{e=ZU(e);let{trans:c,values:h,limit:N,query:k}=Z,t=N===1/0?void 0:N,{index:S,range:a}=k,T=c.objectStore(W),C=S.isPrimaryKey?T:T.index(S.name),D=B(a);if(N===0)return e({result:[]});if(E){let p=h?C.getAll(D,t):C.getAllKeys(D,t);p.onsuccess=o=>e({result:o.target.result}),p.onerror=dF(r)}else{let p=0,o=h||!("openKeyCursor"in C)?C.openCursor(D):C.openKeyCursor(D),s=[];o.onsuccess=v=>{let y=o.result;return y?(s.push(h?y.value:y.primaryKey),++p===N?e({result:s}):void y.continue()):e({result:s})},o.onerror=dF(r)}})}(V),openCursor:function({trans:E,values:Z,query:e,reverse:r,unique:c}){return new Promise((h,N)=>{h=ZU(h);let{index:k,range:t}=e,S=E.objectStore(W),a=k.isPrimaryKey?S:S.index(k.name),T=r?c?"prevunique":"prev":c?"nextunique":"next",C=Z||!("openKeyCursor"in a)?a.openCursor(B(t),T):a.openKeyCursor(B(t),T);C.onerror=dF(N),C.onsuccess=ZU(D=>{let p=C.result;if(!p)return void h(null);p.___id=++WN,p.done=!1;let o=p.continue.bind(p),s=p.continuePrimaryKey;s&&(s=s.bind(p));let v=p.advance.bind(p),y=()=>{throw new Error("Cursor not stopped")};p.trans=E,p.stop=p.continue=p.continuePrimaryKey=p.advance=()=>{throw new Error("Cursor not started")},p.fail=ZU(N),p.next=function(){let i=1;return this.start(()=>i--?this.continue():this.stop()).then(()=>this)},p.start=i=>{let w=new Promise((L,M)=>{L=ZU(L),C.onerror=dF(M),p.fail=M,p.stop=m=>{p.stop=p.continue=p.continuePrimaryKey=p.advance=y,L(m)}}),g=()=>{if(C.result)try{i()}catch(L){p.fail(L)}else p.done=!0,p.start=()=>{throw new Error("Cursor behind last entry")},p.stop()};return C.onsuccess=ZU(L=>{C.onsuccess=g,g()}),p.continue=o,p.continuePrimaryKey=s,p.advance=v,g(),w},h(p)},N)})},count({query:E,trans:Z}){let{index:e,range:r}=E;return new Promise((c,h)=>{let N=Z.objectStore(W),k=e.isPrimaryKey?N:N.index(e.name),t=B(r),S=t?k.count(t):k.count();S.onsuccess=ZU(a=>c(a.target.result)),S.onerror=dF(h)})}}}(n)),l={};return d.forEach(n=>l[n.name]=n),{stack:"dbcore",transaction:F.transaction.bind(F),table(n){if(!l[n])throw new Error(`Table '${n}' not found`);return l[n]},MIN_KEY:-1/0,MAX_KEY:bB(U),schema:R}}function O0({_novip:F},U){let Q=U.db,B=function(R,V,{IDBKeyRange:d,indexedDB:l},n){return{dbcore:function(W,E){return E.reduce((Z,{create:e})=>z(z({},Z),e(Z)),W)}(ZN(V,d,n),R.dbcore)}}(F._middlewares,Q,F._deps,U);F.core=B.dbcore,F.tables.forEach(R=>{let V=R.name;F.core.schema.tables.some(d=>d.name===V)&&(R.core=F.core.table(V),F[V]instanceof F.Table&&(F[V].core=R.core))})}function xR({_novip:F},U,Q,B){Q.forEach(R=>{let V=B[R];U.forEach(d=>{let l=J0(d,R);(!l||"value"in l&&l.value===void 0)&&(d===F.Transaction.prototype||d instanceof F.Transaction?eF(d,R,{get(){return this.table(R)},set(n){ql(this,R,{value:n,writable:!0,configurable:!0,enumerable:!0})}}):d[R]=new F.Table(R,V))})})}function H0({_novip:F},U){U.forEach(Q=>{for(let B in Q)Q[B]instanceof F.Table&&delete Q[B]})}function NN(F,U){return F._cfg.version-U._cfg.version}function EN(F,U,Q,B){let R=F._dbSchema,V=F._createTransaction("readwrite",F._storeNames,R);V.create(Q),V._completion.catch(B);let d=V._reject.bind(V),l=x.transless||x;GF(()=>{x.trans=V,x.transless=l,U===0?(eU(R).forEach(n=>{z0(Q,n,R[n].primKey,R[n].indexes)}),O0(F,Q),b.follow(()=>F.on.populate.fire(V)).catch(d)):function({_novip:n},J,W,E){let Z=[],e=n._versions,r=n._dbSchema=x0(n,n.idbdb,E),c=!1;function h(){return Z.length?b.resolve(Z.shift()(W.idbtrans)).then(h):b.resolve()}return e.filter(N=>N._cfg.version>=J).forEach(N=>{Z.push(()=>{let k=r,t=N._cfg.dbschema;w0(n,k,E),w0(n,t,E),r=n._dbSchema=t;let S=yn(k,t);S.add.forEach(T=>{z0(E,T[0],T[1].primKey,T[1].indexes)}),S.change.forEach(T=>{if(T.recreate)throw new K.Upgrade("Not yet support for changing primary key");{let C=E.objectStore(T.name);T.add.forEach(D=>u0(C,D)),T.change.forEach(D=>{C.deleteIndex(D.name),u0(C,D)}),T.del.forEach(D=>C.deleteIndex(D))}});let a=N._cfg.contentUpgrade;if(a&&N._cfg.version>J){O0(n,E),W._memoizedTables={},c=!0;let T=Un(t);S.del.forEach(o=>{T[o]=k[o]}),H0(n,[n.Transaction.prototype]),xR(n,[n.Transaction.prototype],eU(T),T),W.schema=T;let C=E0(a),D;C&&vQ();let p=b.follow(()=>{if(D=a(W),D&&C){var o=TF.bind(null,null);D.then(o,o)}});return D&&typeof D.then=="function"?b.resolve(D):p.then(()=>D)}}),Z.push(k=>{(!c||!VN)&&function(t,S){[].slice.call(S.db.objectStoreNames).forEach(a=>t[a]==null&&S.db.deleteObjectStore(a))}(N._cfg.dbschema,k),H0(n,[n.Transaction.prototype]),xR(n,[n.Transaction.prototype],n._storeNames,n._dbSchema),W.schema=n._dbSchema})}),h().then(()=>{var N,k;k=E,eU(N=r).forEach(t=>{k.db.objectStoreNames.contains(t)||z0(k,t,N[t].primKey,N[t].indexes)})})}(F,U,V,Q).catch(d)})}function yn(F,U){let Q={del:[],add:[],change:[]},B;for(B in F)U[B]||Q.del.push(B);for(B in U){let R=F[B],V=U[B];if(R){let d={name:B,def:V,recreate:!1,del:[],add:[],change:[]};if(""+(R.primKey.keyPath||"")!=""+(V.primKey.keyPath||"")||R.primKey.auto!==V.primKey.auto&&!XR)d.recreate=!0,Q.change.push(d);else{let l=R.idxByName,n=V.idxByName,J;for(J in l)n[J]||d.del.push(J);for(J in n){let W=l[J],E=n[J];W?W.src!==E.src&&d.change.push(E):d.add.push(E)}(d.del.length>0||d.add.length>0||d.change.length>0)&&Q.change.push(d)}}else Q.add.push([B,V])}return Q}function z0(F,U,Q,B){let R=F.db.createObjectStore(U,Q.keyPath?{keyPath:Q.keyPath,autoIncrement:Q.auto}:{autoIncrement:Q.auto});return B.forEach(V=>u0(R,V)),R}function u0(F,U){F.createIndex(U.name,U.keyPath,{unique:U.unique,multiEntry:U.multi})}function x0(F,U,Q){let B={};return rR(U.objectStoreNames,0).forEach(R=>{let V=Q.objectStore(R),d=V.keyPath,l=b0(on(d),d||"",!1,!1,!!V.autoIncrement,d&&typeof d!="string",!0),n=[];for(let W=0;W{if(U[B]!==null){var R=U[B].split(",").map((d,l)=>{let n=(d=d.trim()).replace(/([&*]|\+\+)/g,""),J=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return b0(n,J||null,/\&/.test(d),/\*/.test(d),/\+\+/.test(d),iU(J),l===0)}),V=R.shift();if(V.multi)throw new K.Schema("Primary key cannot be multi-valued");R.forEach(d=>{if(d.auto)throw new K.Schema("Only primary key can be marked as autoIncrement (++)");if(!d.keyPath)throw new K.Schema("Index must have a name and cannot be an empty string")}),Q[B]=sn(B,V,R)}})}stores(U){let Q=this.db;this._cfg.storesSource=this._cfg.storesSource?GU(this._cfg.storesSource,U):U;let B=Q._versions,R={},V={};return B.forEach(d=>{GU(R,d._cfg.storesSource),V=d._cfg.dbschema={},d._parseStoresSpec(R,V)}),Q._dbSchema=V,H0(Q,[Q._allTables,Q,Q.Transaction.prototype]),xR(Q,[Q._allTables,Q,Q.Transaction.prototype,this._cfg.tables],eU(V),V),Q._storeNames=eU(V),this}upgrade(U){return this._cfg.contentUpgrade=k0(this._cfg.contentUpgrade||dU,U),this}};function L0(F,U){let Q=F._dbNamesDB;return Q||(Q=F._dbNamesDB=new HF("__dbnames",{addons:[],indexedDB:F,IDBKeyRange:U}),Q.version(1).stores({dbnames:"name"})),Q.table("dbnames")}function j0(F){return F&&typeof F.databases=="function"}function I0(F){return GF(function(){return x.letThrough=!0,F()})}function tN(){var F;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(U){var Q=function(){return indexedDB.databases().finally(U)};F=setInterval(Q,100),Q()}).finally(function(){return clearInterval(F)}):Promise.resolve()}function SN(F){let U=F._state,{indexedDB:Q}=F._deps;if(U.isBeingOpened||F.idbdb)return U.dbReadyPromise.then(()=>U.dbOpenError?TU(U.dbOpenError):F);VF&&(U.openCanceller._stackHolder=UQ()),U.isBeingOpened=!0,U.dbOpenError=null,U.openComplete=!1;let B=U.openCanceller;function R(){if(U.openCanceller!==B)throw new K.DatabaseClosed("db.open() was cancelled")}let V=U.dbReadyResolve,d=null,l=!1;return b.race([B,(typeof navigator=="undefined"?b.resolve():tN()).then(()=>new b((n,J)=>{if(R(),!Q)throw new K.MissingAPI;let W=F.name,E=U.autoSchema?Q.open(W):Q.open(W,Math.round(10*F.verno));if(!E)throw new K.MissingAPI;E.onerror=dF(J),E.onblocked=ZU(F._fireOnBlocked),E.onupgradeneeded=ZU(Z=>{if(d=E.transaction,U.autoSchema&&!F._options.allowEmptyDB){E.onerror=GB,d.abort(),E.result.close();let r=Q.deleteDatabase(W);r.onsuccess=r.onerror=ZU(()=>{J(new K.NoSuchDatabase(`Database ${W} doesnt exist`))})}else{d.onerror=dF(J);var e=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion;l=e<1,F._novip.idbdb=E.result,EN(F,e/10,d,J)}},J),E.onsuccess=ZU(()=>{d=null;let Z=F._novip.idbdb=E.result,e=rR(Z.objectStoreNames);if(e.length>0)try{let c=Z.transaction((r=e).length===1?r[0]:r,"readonly");U.autoSchema?function({_novip:h},N,k){h.verno=N.version/10;let t=h._dbSchema=x0(0,N,k);h._storeNames=rR(N.objectStoreNames,0),xR(h,[h._allTables],eU(t),t)}(F,Z,c):(w0(F,F._dbSchema,c),function(h,N){let k=yn(x0(0,h.idbdb,N),h._dbSchema);return!(k.add.length||k.change.some(t=>t.add.length||t.change.length))}(F,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),O0(F,c)}catch{}var r;YB.push(F),Z.onversionchange=ZU(c=>{U.vcFired=!0,F.on("versionchange").fire(c)}),Z.onclose=ZU(c=>{F.on("close").fire(c)}),l&&function({indexedDB:c,IDBKeyRange:h},N){!j0(c)&&N!=="__dbnames"&&L0(c,h).put({name:N}).catch(dU)}(F._deps,W),n()},J)}))]).then(()=>(R(),U.onReadyBeingFired=[],b.resolve(I0(()=>F.on.ready.fire(F.vip))).then(function n(){if(U.onReadyBeingFired.length>0){let J=U.onReadyBeingFired.reduce(k0,dU);return U.onReadyBeingFired=[],b.resolve(I0(()=>J(F.vip))).then(n)}}))).finally(()=>{U.onReadyBeingFired=null,U.isBeingOpened=!1}).then(()=>F).catch(n=>{U.dbOpenError=n;try{d&&d.abort()}catch{}return B===U.openCanceller&&F._close(),TU(n)}).finally(()=>{U.openComplete=!0,V()})}function f0(F){var U=V=>F.next(V),Q=R(U),B=R(V=>F.throw(V));function R(V){return d=>{var l=V(d),n=l.value;return l.done?n:n&&typeof n.then=="function"?n.then(Q,B):iU(n)?Promise.all(n).then(Q,B):Q(n)}}return R(U)()}function eN(F,U,Q){var B=arguments.length;if(B<2)throw new K.InvalidArgument("Too few arguments");for(var R=new Array(B-1);--B;)R[B-1]=arguments[B];Q=R.pop();var V=Fn(R);return[F,V,Q]}function Gn(F,U,Q,B,R){return b.resolve().then(()=>{let V=x.transless||x,d=F._createTransaction(U,Q,F._dbSchema,B),l={trans:d,transless:V};if(B)d.idbtrans=B.idbtrans;else try{d.create(),F._state.PR1398_maxLoop=3}catch(E){return E.name===e0.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>Gn(F,U,Q,null,R))):TU(E)}let n=E0(R),J;n&&vQ();let W=b.follow(()=>{if(J=R.call(d,d),J)if(n){var E=TF.bind(null,null);J.then(E,E)}else typeof J.next=="function"&&typeof J.throw=="function"&&(J=f0(J))},l);return(J&&typeof J.then=="function"?b.resolve(J).then(E=>d.active?E:TU(new K.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):W.then(()=>J)).then(E=>(B&&d._resolve(),d._completion.then(()=>E))).catch(E=>(d._reject(E),TU(E)))})}function wR(F,U,Q){let B=iU(F)?F.slice():[F];for(let R=0;R0,N=q(z({},Z),{isVirtual:h,keyTail:E,keyLength:c,extractKey:X0(W),unique:!h&&Z.unique});return r.push(N),N.isPrimaryKey||V.push(N),c>1&&d(c===2?W[0]:W.slice(0,c-1),E+1,Z),r.sort((k,t)=>k.keyTail-t.keyTail),N}let l=d(B.primaryKey.keyPath,0,B.primaryKey);R[":id"]=[l];for(let W of B.indexes)d(W.keyPath,0,W);function n(W){let E=W.query.index;return E.isVirtual?q(z({},W),{query:{index:E,range:(Z=W.query.range,e=E.keyTail,{type:Z.type===1?2:Z.type,lower:wR(Z.lower,Z.lowerOpen?F.MAX_KEY:F.MIN_KEY,e),lowerOpen:!0,upper:wR(Z.upper,Z.upperOpen?F.MIN_KEY:F.MAX_KEY,e),upperOpen:!0})}}):W;var Z,e}return q(z({},Q),{schema:q(z({},B),{primaryKey:l,indexes:V,getIndexByKeyPath:function(W){let E=R[XB(W)];return E&&E[0]}}),count:W=>Q.count(n(W)),query:W=>Q.query(n(W)),openCursor(W){let{keyTail:E,isVirtual:Z,keyLength:e}=W.query.index;return Z?Q.openCursor(n(W)).then(r=>r&&function(c){return Object.create(c,{continue:{value:function(N){N!=null?c.continue(wR(N,W.reverse?F.MAX_KEY:F.MIN_KEY,E)):W.unique?c.continue(c.key.slice(0,e).concat(W.reverse?F.MIN_KEY:F.MAX_KEY,E)):c.continue()}},continuePrimaryKey:{value(N,k){c.continuePrimaryKey(wR(N,F.MAX_KEY,E),k)}},primaryKey:{get:()=>c.primaryKey},key:{get(){let N=c.key;return e===1?N[0]:N.slice(0,e)}},value:{get:()=>c.value}})}(r)):Q.openCursor(W)}})}})}};function K0(F,U,Q,B){return Q=Q||{},B=B||"",eU(F).forEach(R=>{if(jU(U,R)){var V=F[R],d=U[R];if(typeof V=="object"&&typeof d=="object"&&V&&d){let l=Z0(V);l!==Z0(d)?Q[B+R]=U[R]:l==="Object"?K0(V,d,Q,B+R+"."):V!==d&&(Q[B+R]=U[R])}else V!==d&&(Q[B+R]=U[R])}else Q[B+R]=void 0}),eU(U).forEach(R=>{jU(F,R)||(Q[B+R]=U[R])}),Q}var aN={stack:"dbcore",name:"HooksMiddleware",level:2,create:F=>q(z({},F),{table(U){let Q=F.table(U),{primaryKey:B}=Q.schema;return q(z({},Q),{mutate(V){let d=x.trans,{deleting:l,creating:n,updating:J}=d.table(U).hook;switch(V.type){case"add":if(n.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"put":if(n.fire===dU&&J.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"delete":if(l.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"deleteRange":if(l.fire===dU)break;return d._promise("readwrite",()=>function(Z){return E(Z.trans,Z.range,1e4)}(V),!0)}return Q.mutate(V);function W(Z){let e=x.trans,r=Z.keys||function(c,h){return h.type==="delete"?h.keys:h.keys||h.values.map(c.extractKey)}(B,Z);if(!r)throw new Error("Keys missing");return(Z=Z.type==="add"||Z.type==="put"?q(z({},Z),{keys:r}):z({},Z)).type!=="delete"&&(Z.values=[...Z.values]),Z.keys&&(Z.keys=[...Z.keys]),function(c,h,N){return h.type==="add"?Promise.resolve([]):c.getMany({trans:h.trans,keys:N,cache:"immutable"})}(Q,Z,r).then(c=>{let h=r.map((N,k)=>{let t=c[k],S={onerror:null,onsuccess:null};if(Z.type==="delete")l.fire.call(S,N,t,e);else if(Z.type==="add"||t===void 0){let a=n.fire.call(S,N,Z.values[k],e);N==null&&a!=null&&(N=a,Z.keys[k]=N,B.outbound||AU(Z.values[k],B.keyPath,N))}else{let a=K0(t,Z.values[k]),T=J.fire.call(S,a,N,t,e);if(T){let C=Z.values[k];Object.keys(T).forEach(D=>{jU(C,D)?C[D]=T[D]:AU(C,D,T[D])})}}return S});return Q.mutate(Z).then(({failures:N,results:k,numFailures:t,lastResult:S})=>{for(let a=0;a(h.forEach(k=>k.onerror&&k.onerror(N)),Promise.reject(N)))})}function E(Z,e,r){return Q.query({trans:Z,values:!1,query:{index:B,range:e},limit:r}).then(({result:c})=>W({type:"delete",keys:c,trans:Z}).then(h=>h.numFailures>0?Promise.reject(h.failures[0]):c.length({table:U=>{let Q=F.table(U);return q(z({},Q),{getMany:B=>{if(!B.cache)return Q.getMany(B);let R=bn(B.keys,B.trans._cache,B.cache==="clone");return R?b.resolve(R):Q.getMany(B).then(V=>(B.trans._cache={keys:B.keys,values:B.cache==="clone"?CB(V):V},V))},mutate:B=>(B.type!=="add"&&(B.trans._cache=null),Q.mutate(B))})}})};function g0(F){return!("from"in F)}var cF=function(F,U){if(!this){let Q=new cF;return F&&"d"in F&&GU(Q,F),Q}GU(this,arguments.length?{d:1,from:F,to:arguments.length>1?U:F}:{d:0})};function OB(F,U,Q){let B=bU(U,Q);if(isNaN(B))return;if(B>0)throw RangeError();if(g0(F))return GU(F,{from:U,to:Q,d:1});let R=F.l,V=F.r;if(bU(Q,F.from)<0)return R?OB(R,U,Q):F.l={from:U,to:Q,d:1,l:null,r:null},Xn(F);if(bU(U,F.to)>0)return V?OB(V,U,Q):F.r={from:U,to:Q,d:1,l:null,r:null},Xn(F);bU(U,F.from)<0&&(F.from=U,F.l=null,F.d=V?V.d+1:1),bU(Q,F.to)>0&&(F.to=Q,F.r=null,F.d=F.l?F.l.d+1:1);let d=!F.r;R&&!F.l&&LR(F,R),V&&d&&LR(F,V)}function LR(F,U){g0(U)||function Q(B,{from:R,to:V,l:d,r:l}){OB(B,R,V),d&&Q(B,d),l&&Q(B,l)}(F,U)}function P0(F){let U=g0(F)?null:{s:0,n:F};return{next(Q){let B=arguments.length>0;for(;U;)switch(U.s){case 0:if(U.s=1,B)for(;U.n.l&&bU(Q,U.n.from)<0;)U={up:U,n:U.n.l,s:1};else for(;U.n.l;)U={up:U,n:U.n.l,s:1};case 1:if(U.s=2,!B||bU(Q,U.n.to)<=0)return{value:U.n,done:!1};case 2:if(U.n.r){U.s=3,U={up:U,n:U.n.r,s:0};continue}case 3:U=U.up}return{done:!0}}}}function Xn(F){var U,Q;let B=(((U=F.r)===null||U===void 0?void 0:U.d)||0)-(((Q=F.l)===null||Q===void 0?void 0:Q.d)||0),R=B>1?"r":B<-1?"l":"";if(R){let V=R==="r"?"l":"r",d=z({},F),l=F[R];F.from=l.from,F.to=l.to,F[R]=l[R],d[R]=l[V],F[V]=d,d.d=On(d)}F.d=On(F)}function On({r:F,l:U}){return(F?U?Math.max(F.d,U.d):F.d:U?U.d:0)+1}oQ(cF.prototype,{add(F){return LR(this,F),this},addKey(F){return OB(this,F,F),this},addKeys(F){return F.forEach(U=>OB(this,U,U)),this},[N0](){return P0(this)}});var hN={stack:"dbcore",level:0,create:F=>{let U=F.schema.name,Q=new cF(F.MIN_KEY,F.MAX_KEY);return q(z({},F),{table:B=>{let R=F.table(B),{schema:V}=R,{primaryKey:d}=V,{extractKey:l,outbound:n}=d,J=q(z({},R),{mutate:Z=>{let e=Z.trans,r=e.mutatedParts||(e.mutatedParts={}),c=T=>{let C=`idb://${U}/${B}/${T}`;return r[C]||(r[C]=new cF)},h=c(""),N=c(":dels"),{type:k}=Z,[t,S]=Z.type==="deleteRange"?[Z.range]:Z.type==="delete"?[Z.keys]:Z.values.length<50?[[],Z.values]:[],a=Z.trans._cache;return R.mutate(Z).then(T=>{if(iU(t)){k!=="delete"&&(t=T.results),h.addKeys(t);let C=bn(t,a);C||k==="add"||N.addKeys(t),(C||S)&&function(D,p,o,s){function v(y){let i=D(y.name||"");function w(L){return L!=null?y.extractKey(L):null}let g=L=>y.multiEntry&&iU(L)?L.forEach(M=>i.addKey(M)):i.addKey(L);(o||s).forEach((L,M)=>{let m=o&&w(o[M]),Y=s&&w(s[M]);bU(m,Y)!==0&&(m!=null&&g(m),Y!=null&&g(Y))})}p.indexes.forEach(v)}(c,V,C,S)}else if(t){let C={from:t.lower,to:t.upper};N.add(C),h.add(C)}else h.add(Q),N.add(Q),V.indexes.forEach(C=>c(C.name).add(Q));return T})}}),W=({query:{index:Z,range:e}})=>{var r,c;return[Z,new cF((r=e.lower)!==null&&r!==void 0?r:F.MIN_KEY,(c=e.upper)!==null&&c!==void 0?c:F.MAX_KEY)]},E={get:Z=>[d,new cF(Z.key)],getMany:Z=>[d,new cF().addKeys(Z.keys)],count:W,query:W,openCursor:W};return eU(E).forEach(Z=>{J[Z]=function(e){let{subscr:r}=x;if(r){let c=S=>{let a=`idb://${U}/${B}/${S}`;return r[a]||(r[a]=new cF)},h=c(""),N=c(":dels"),[k,t]=E[Z](e);if(c(k.name||"").add(t),!k.isPrimaryKey){if(Z!=="count"){let S=Z==="query"&&n&&e.values&&R.query(q(z({},e),{values:!1}));return R[Z].apply(this,arguments).then(a=>{if(Z==="query"){if(n&&e.values)return S.then(({result:C})=>(h.addKeys(C),a));let T=e.values?a.result.map(l):a.result;e.values?h.addKeys(T):N.addKeys(T)}else if(Z==="openCursor"){let T=a,C=e.values;return T&&Object.create(T,{key:{get:()=>(N.addKey(T.primaryKey),T.key)},primaryKey:{get(){let D=T.primaryKey;return N.addKey(D),D}},value:{get:()=>(C&&h.addKey(T.primaryKey),T.value)}})}return a})}N.add(Q)}}return R[Z].apply(this,arguments)}}),J}})}},HF=class{constructor(U,Q){this._middlewares={},this.verno=0;let B=HF.dependencies;this._options=Q=z({addons:HF.addons,autoOpen:!0,indexedDB:B.indexedDB,IDBKeyRange:B.IDBKeyRange},Q),this._deps={indexedDB:Q.indexedDB,IDBKeyRange:Q.IDBKeyRange};let{addons:R}=Q;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let V={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:dU,dbReadyPromise:null,cancelOpen:dU,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var d;V.dbReadyPromise=new b(l=>{V.dbReadyResolve=l}),V.openCanceller=new b((l,n)=>{V.cancelOpen=n}),this._state=V,this.name=U,this.on=yB(this,"populate","blocked","versionchange","close",{ready:[k0,dU]}),this.on.ready.subscribe=_l(this.on.ready.subscribe,l=>(n,J)=>{HF.vip(()=>{let W=this._state;if(W.openComplete)W.dbOpenError||b.resolve().then(n),J&&l(n);else if(W.onReadyBeingFired)W.onReadyBeingFired.push(n),J&&l(n);else{l(n);let E=this;J||l(function Z(){E.on.ready.unsubscribe(n),E.on.ready.unsubscribe(Z)})}})}),this.Collection=(d=this,vB(pn.prototype,function(l,n){this.db=d;let J=Tn,W=null;if(n)try{J=n()}catch(r){W=r}let E=l._ctx,Z=E.table,e=Z.hook.reading.fire;this._ctx={table:Z,index:E.index,isPrimKey:!E.index||Z.schema.primKey.keyPath&&E.index===Z.schema.primKey.name,range:J,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:W,or:E.or,valueMapper:e!==pB?e:null}})),this.Table=function(l){return vB(hn.prototype,function(n,J,W){this.db=l,this._tx=W,this.name=n,this.schema=J,this.hook=l._allTables[n]?l._allTables[n].hook:yB(null,{creating:[PZ,dU],reading:[gZ,pB],updating:[_Z,dU],deleting:[qZ,dU]})})}(this),this.Transaction=function(l){return vB(Mn.prototype,function(n,J,W,E,Z){this.db=l,this.mode=n,this.storeNames=J,this.schema=W,this.chromeTransactionDurability=E,this.idbtrans=null,this.on=yB(this,"complete","error","abort"),this.parent=Z||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new b((e,r)=>{this._resolve=e,this._reject=r}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var r=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):r&&this.idbtrans&&this.idbtrans.abort(),TU(e)})})}(this),this.Version=function(l){return vB(vn.prototype,function(n){this.db=l,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(l){return vB(G0.prototype,function(n,J,W){this.db=l,this._ctx={table:n,index:J===":id"?null:J,or:W};let E=l._deps.indexedDB;if(!E)throw new K.MissingAPI;this._cmp=this._ascending=E.cmp.bind(E),this._descending=(Z,e)=>E.cmp(e,Z),this._max=(Z,e)=>E.cmp(Z,e)>0?Z:e,this._min=(Z,e)=>E.cmp(Z,e)<0?Z:e,this._IDBKeyRange=l._deps.IDBKeyRange})}(this),this.on("versionchange",l=>{l.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",l=>{!l.newVersion||l.newVersionnew this.Transaction(l,n,J,this._options.chromeTransactionDurability,W),this._fireOnBlocked=l=>{this.on("blocked").fire(l),YB.filter(n=>n.name===this.name&&n!==this&&!n._state.vcFired).map(n=>n.on("versionchange").fire(l))},this.use(kN),this.use(aN),this.use(hN),this.use(TN),this.vip=Object.create(this,{_vip:{value:!0}}),R.forEach(l=>l(this))}version(U){if(isNaN(U)||U<.1)throw new K.Type("Given version is not a positive number");if(U=Math.round(10*U)/10,this.idbdb||this._state.isBeingOpened)throw new K.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,U);let Q=this._versions;var B=Q.filter(R=>R._cfg.version===U)[0];return B||(B=new this.Version(U),Q.push(B),Q.sort(NN),B.stores({}),this._state.autoSchema=!1,B)}_whenReady(U){return this.idbdb&&(this._state.openComplete||x.letThrough||this._vip)?U():new b((Q,B)=>{if(this._state.openComplete)return B(new K.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void B(new K.DatabaseClosed);this.open().catch(dU)}this._state.dbReadyPromise.then(Q,B)}).then(U)}use({stack:U,create:Q,level:B,name:R}){R&&this.unuse({stack:U,name:R});let V=this._middlewares[U]||(this._middlewares[U]=[]);return V.push({stack:U,create:Q,level:B??10,name:R}),V.sort((d,l)=>d.level-l.level),this}unuse({stack:U,name:Q,create:B}){return U&&this._middlewares[U]&&(this._middlewares[U]=this._middlewares[U].filter(R=>B?R.create!==B:!!Q&&R.name!==Q)),this}open(){return SN(this)}_close(){let U=this._state,Q=YB.indexOf(this);if(Q>=0&&YB.splice(Q,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}U.dbReadyPromise=new b(B=>{U.dbReadyResolve=B}),U.openCanceller=new b((B,R)=>{U.cancelOpen=R})}close(){this._close();let U=this._state;this._options.autoOpen=!1,U.dbOpenError=new K.DatabaseClosed,U.isBeingOpened&&U.cancelOpen(U.dbOpenError)}delete(){let U=arguments.length>0,Q=this._state;return new b((B,R)=>{let V=()=>{this.close();var d=this._deps.indexedDB.deleteDatabase(this.name);d.onsuccess=ZU(()=>{(function({indexedDB:l,IDBKeyRange:n},J){!j0(l)&&J!=="__dbnames"&&L0(l,n).delete(J).catch(dU)})(this._deps,this.name),B()}),d.onerror=dF(R),d.onblocked=this._fireOnBlocked};if(U)throw new K.InvalidArgument("Arguments not allowed in db.delete()");Q.isBeingOpened?Q.dbReadyPromise.then(V):V()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){let U=this._state.dbOpenError;return U&&U.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return eU(this._allTables).map(U=>this._allTables[U])}transaction(){let U=eN.apply(this,arguments);return this._transaction.apply(this,U)}_transaction(U,Q,B){let R=x.trans;R&&R.db===this&&U.indexOf("!")===-1||(R=null);let V=U.indexOf("?")!==-1,d,l;U=U.replace("!","").replace("?","");try{if(l=Q.map(J=>{var W=J instanceof this.Table?J.name:J;if(typeof W!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),U=="r"||U==="readonly")d="readonly";else{if(U!="rw"&&U!="readwrite")throw new K.InvalidArgument("Invalid transaction mode: "+U);d="readwrite"}if(R){if(R.mode==="readonly"&&d==="readwrite"){if(!V)throw new K.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");R=null}R&&l.forEach(J=>{if(R&&R.storeNames.indexOf(J)===-1){if(!V)throw new K.SubTransaction("Table "+J+" not included in parent transaction.");R=null}}),V&&R&&!R.active&&(R=null)}}catch(J){return R?R._promise(null,(W,E)=>{E(J)}):TU(J)}let n=Gn.bind(null,this,d,l,R,B);return R?R._promise(d,n,"lock"):x.trans?GQ(x.transless,()=>this._whenReady(n)):this._whenReady(n)}table(U){if(!jU(this._allTables,U))throw new K.InvalidTable(`Table ${U} does not exist`);return this._allTables[U]}},cN=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",Hn=class{constructor(U){this._subscribe=U}subscribe(U,Q,B){return this._subscribe(U&&typeof U!="function"?U:{next:U,error:Q,complete:B})}[cN](){return this}};function zn(F,U){return eU(U).forEach(Q=>{LR(F[Q]||(F[Q]=new cF),U[Q])}),F}var q0;try{q0={indexedDB:JU.indexedDB||JU.mozIndexedDB||JU.webkitIndexedDB||JU.msIndexedDB,IDBKeyRange:JU.IDBKeyRange||JU.webkitIDBKeyRange}}catch{q0={indexedDB:null,IDBKeyRange:null}}var dQ=HF;function jR(F){let U=rF;try{rF=!0,OF.storagemutated.fire(F)}finally{rF=U}}oQ(dQ,q(z({},DR),{delete:F=>new dQ(F,{addons:[]}).delete(),exists:F=>new dQ(F,{addons:[]}).open().then(U=>(U.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(F){try{return function({indexedDB:U,IDBKeyRange:Q}){return j0(U)?Promise.resolve(U.databases()).then(B=>B.map(R=>R.name).filter(R=>R!=="__dbnames")):L0(U,Q).toCollection().primaryKeys()}(dQ.dependencies).then(F)}catch{return TU(new K.MissingAPI)}},defineClass:()=>function(F){GU(this,F)},ignoreTransaction:F=>x.trans?GQ(x.transless,F):F(),vip:I0,async:function(F){return function(){try{var U=f0(F.apply(this,arguments));return U&&typeof U.then=="function"?U:b.resolve(U)}catch(Q){return TU(Q)}}},spawn:function(F,U,Q){try{var B=f0(F.apply(Q,U||[]));return B&&typeof B.then=="function"?B:b.resolve(B)}catch(R){return TU(R)}},currentTransaction:{get:()=>x.trans||null},waitFor:function(F,U){let Q=b.resolve(typeof F=="function"?dQ.ignoreTransaction(F):F).timeout(U||6e4);return x.trans?x.trans.waitFor(Q):Q},Promise:b,debug:{get:()=>VF,set:F=>{Bn(F,F==="dexie"?()=>!0:an)}},derive:iQ,extend:GU,props:oQ,override:_l,Events:yB,on:OF,liveQuery:function(F){return new Hn(U=>{let Q=E0(F),B=!1,R={},V={},d={get closed(){return B},unsubscribe:()=>{B=!0,OF.storagemutated.unsubscribe(W)}};U.start&&U.start(d);let l=!1,n=!1;function J(){return eU(V).some(Z=>R[Z]&&function(e,r){let c=P0(r),h=c.next();if(h.done)return!1;let N=h.value,k=P0(e),t=k.next(N.from),S=t.value;for(;!h.done&&!t.done;){if(bU(S.from,N.to)<=0&&bU(S.to,N.from)>=0)return!0;bU(N.from,S.from)<0?N=(h=c.next(S.from)).value:S=(t=k.next(N.from)).value}return!1}(R[Z],V[Z]))}let W=Z=>{zn(R,Z),J()&&E()},E=()=>{if(l||B)return;R={};let Z={},e=function(r){Q&&vQ();let c=()=>GF(F,{subscr:r,trans:null}),h=x.trans?GQ(x.transless,c):c();return Q&&h.then(TF,TF),h}(Z);n||(OF("storagemutated",W),n=!0),l=!0,Promise.resolve(e).then(r=>{l=!1,B||(J()?E():(R={},V=Z,U.next&&U.next(r)))},r=>{l=!1,U.error&&U.error(r),d.unsubscribe()})};return E(),d})},extendObservabilitySet:zn,getByKeyPath:kF,setByKeyPath:AU,delByKeyPath:function(F,U){typeof U=="string"?AU(F,U,void 0):"length"in U&&[].map.call(U,function(Q){AU(F,Q,void 0)})},shallowClone:Un,deepClone:CB,getObjectDiff:K0,cmp:bU,asap:Al,minKey:-(1/0),addons:[],connections:YB,errnames:e0,dependencies:q0,semVer:"3.2.2",version:"3.2.2".split(".").map(F=>parseInt(F)).reduce((F,U,Q)=>F+U/Math.pow(10,2*Q))})),dQ.maxKey=bB(dQ.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(OF("storagemutated",F=>{if(!rF){let U;XR?(U=document.createEvent("CustomEvent"),U.initCustomEvent("x-storagemutated-1",!0,!0,F)):U=new CustomEvent("x-storagemutated-1",{detail:F}),rF=!0,dispatchEvent(U),rF=!1}}),addEventListener("x-storagemutated-1",({detail:F})=>{rF||jR(F)}));var rF=!1;if(typeof BroadcastChannel!="undefined"){let F=new BroadcastChannel("x-storagemutated-1");OF("storagemutated",U=>{rF||F.postMessage(U)}),F.onmessage=U=>{U.data&&jR(U.data)}}else if(typeof self!="undefined"&&typeof navigator!="undefined"){OF("storagemutated",U=>{try{rF||(typeof localStorage!="undefined"&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:U})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(Q=>Q.postMessage({type:"x-storagemutated-1",changedParts:U})))}catch{}}),typeof addEventListener!="undefined"&&addEventListener("storage",U=>{if(U.key==="x-storagemutated-1"){let Q=JSON.parse(U.newValue);Q&&jR(Q.changedParts)}});let F=self.document&&navigator.serviceWorker;F&&F.addEventListener("message",function({data:U}){U&&U.type==="x-storagemutated-1"&&jR(U.changedParts)})}b.rejectionMapper=function(F,U){if(!F||F instanceof YQ||F instanceof TypeError||F instanceof SyntaxError||!F.name||!ln[F.name])return F;var Q=new ln[F.name](U||F.message,F);return"stack"in F&&eF(Q,"stack",{get:function(){return this.inner.stack}}),Q},Bn(VF,an);var CF=new class extends HF{constructor(){super("obsidian-text-extract/cache/"+app.appId),this.version(3).stores({pdf:"path, hash, size",images:"path, hash, size"}),this.clearOldDatabases()}clearOldDatabases(){indexedDB.deleteDatabase("obsidian-text-extract/cache")}},un=class{value;next;constructor(U){this.value=U}},xn=class{#U;#F;#Q;constructor(){this.clear()}enqueue(U){let Q=new un(U);this.#U?(this.#F.next=Q,this.#F=Q):(this.#U=Q,this.#F=Q),this.#Q++}dequeue(){let U=this.#U;if(U)return this.#U=this.#U.next,this.#Q--,U.value}clear(){this.#U=void 0,this.#F=void 0,this.#Q=0}get size(){return this.#Q}*[Symbol.iterator](){let U=this.#U;for(;U;)yield U.value,U=U.next}},wn=hB.Platform.isMobileApp?1:require("os").cpus().length,IR=Math.max(1,Math.floor(.7*wn));IR==wn&&(IR=1);var _0=Symbol.for("be.scambier.obsidian-text-extract");globalThis[_0]||(console.info("Text Extract - Number of available workers: "+IR),globalThis[_0]=function(F){if(!Number.isInteger(F)&&F!==Number.POSITIVE_INFINITY||!(F>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let U=new xn,Q=0,B=async(V,d,l)=>{Q++;let n=(async()=>V(...l))();d(n);try{await n}catch{}Q--,U.size>0&&U.dequeue()()},R=(V,...d)=>new Promise(l=>{((n,J,W)=>{U.enqueue(B.bind(void 0,n,J,W)),(async()=>{await Promise.resolve(),Q0&&U.dequeue()()})()})(V,l,d)});return Object.defineProperties(R,{activeCount:{get:()=>Q},pendingCount:{get:()=>U.size},clearQueue:{value:()=>{U.clear()}}}),R}(IR));var Ln=globalThis[_0],lQ=class{constructor(U){this.worker=U,this.running=!1}static getWorker(){let U=lQ.pool.find(B=>!B.running);if(U)return U;let Q=new lQ(new OZ({name:"PDF Text Extractor"}));return lQ.pool.push(Q),Q}async run(U){return new Promise((Q,B)=>{this.running=!0;let R=setTimeout(()=>{this.worker.terminate(),console.warn("Omnisearch - Worker timeout"),B("timeout"),this.running=!1},12e4);this.worker.postMessage(U),this.worker.onmessage=V=>{clearTimeout(R),Q(V),this.running=!1}})}};lQ.pool=[];var jn=new class{async getPdfText(F){return hB.Platform.isMobile?"":Ln(this._getPdfText,F)}async _getPdfText(F){let U=await CF.pdf.get({path:F.path,size:F.stat.size});if(U)return U.text;let Q=new Uint8Array(await app.vault.readBinary(F)),B=Pl(Q),R=await CF.pdf.get(B);if(R)return R.text;let V=lQ.getWorker();return new Promise(async(d,l)=>{try{let n=(await V.run({data:Q,name:F.basename})).data.text.replace(/\n/g," ").replace(/ +/g," ").trim();CF.pdf.add({hash:B,text:n,path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d(n)})}catch{CF.pdf.add({hash:B,text:"",path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d("")})}})}async cleanCache(){CF.pdf.each(async F=>{await app.vault.adapter.exists(F.path)||console.log(F.path+" does not exist")})}};(function(F){var U=function(Q){var B,R=Object.prototype,V=R.hasOwnProperty,d=Object.defineProperty||function(M,m,Y){M[m]=Y.value},l=typeof Symbol=="function"?Symbol:{},n=l.iterator||"@@iterator",J=l.asyncIterator||"@@asyncIterator",W=l.toStringTag||"@@toStringTag";function E(M,m,Y){return Object.defineProperty(M,m,{value:Y,enumerable:!0,configurable:!0,writable:!0}),M[m]}try{E({},"")}catch{E=function(m,Y,I){return m[Y]=I}}function Z(M,m,Y,I){var X=m&&m.prototype instanceof k?m:k,lU=Object.create(X.prototype),EU=new w(I||[]);return d(lU,"_invoke",{value:s(M,Y,EU)}),lU}function e(M,m,Y){try{return{type:"normal",arg:M.call(m,Y)}}catch(I){return{type:"throw",arg:I}}}Q.wrap=Z;var r="suspendedStart",c="executing",h="completed",N={};function k(){}function t(){}function S(){}var a={};E(a,n,function(){return this});var T=Object.getPrototypeOf,C=T&&T(T(g([])));C&&C!==R&&V.call(C,n)&&(a=C);var D=S.prototype=k.prototype=Object.create(a);function p(M){["next","throw","return"].forEach(function(m){E(M,m,function(Y){return this._invoke(m,Y)})})}function o(M,m){function Y(X,lU,EU,zU){var uU=e(M[X],M,lU);if(uU.type!=="throw"){var ZQ=uU.arg,uQ=ZQ.value;return uQ&&typeof uQ=="object"&&V.call(uQ,"__await")?m.resolve(uQ.__await).then(function(xF){Y("next",xF,EU,zU)},function(xF){Y("throw",xF,EU,zU)}):m.resolve(uQ).then(function(xF){ZQ.value=xF,EU(ZQ)},function(xF){return Y("throw",xF,EU,zU)})}zU(uU.arg)}var I;d(this,"_invoke",{value:function(X,lU){function EU(){return new m(function(zU,uU){Y(X,lU,zU,uU)})}return I=I?I.then(EU,EU):EU()}})}function s(M,m,Y){var I=r;return function(X,lU){if(I===c)throw new Error("Generator is already running");if(I===h){if(X==="throw")throw lU;return L()}for(Y.method=X,Y.arg=lU;;){var EU=Y.delegate;if(EU){var zU=v(EU,Y);if(zU){if(zU===N)continue;return zU}}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(I===r)throw I=h,Y.arg;Y.dispatchException(Y.arg)}else Y.method==="return"&&Y.abrupt("return",Y.arg);I=c;var uU=e(M,m,Y);if(uU.type==="normal"){if(I=Y.done?h:"suspendedYield",uU.arg===N)continue;return{value:uU.arg,done:Y.done}}uU.type==="throw"&&(I=h,Y.method="throw",Y.arg=uU.arg)}}}function v(M,m){var Y=M.iterator[m.method];if(Y===B){if(m.delegate=null,m.method==="throw"){if(M.iterator.return&&(m.method="return",m.arg=B,v(M,m),m.method==="throw"))return N;m.method="throw",m.arg=new TypeError("The iterator does not provide a 'throw' method")}return N}var I=e(Y,M.iterator,m.arg);if(I.type==="throw")return m.method="throw",m.arg=I.arg,m.delegate=null,N;var X=I.arg;return X?X.done?(m[M.resultName]=X.value,m.next=M.nextLoc,m.method!=="return"&&(m.method="next",m.arg=B),m.delegate=null,N):X:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,N)}function y(M){var m={tryLoc:M[0]};1 in M&&(m.catchLoc=M[1]),2 in M&&(m.finallyLoc=M[2],m.afterLoc=M[3]),this.tryEntries.push(m)}function i(M){var m=M.completion||{};m.type="normal",delete m.arg,M.completion=m}function w(M){this.tryEntries=[{tryLoc:"root"}],M.forEach(y,this),this.reset(!0)}function g(M){if(M){var m=M[n];if(m)return m.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var Y=-1,I=function X(){for(;++Y=0;--I){var X=this.tryEntries[I],lU=X.completion;if(X.tryLoc==="root")return Y("end");if(X.tryLoc<=this.prev){var EU=V.call(X,"catchLoc"),zU=V.call(X,"finallyLoc");if(EU&&zU){if(this.prev=0;--Y){var I=this.tryEntries[Y];if(I.tryLoc<=this.prev&&V.call(I,"finallyLoc")&&this.prev=0;--m){var Y=this.tryEntries[m];if(Y.finallyLoc===M)return this.complete(Y.completion,Y.afterLoc),i(Y),N}},catch:function(M){for(var m=this.tryEntries.length-1;m>=0;--m){var Y=this.tryEntries[m];if(Y.tryLoc===M){var I=Y.completion;if(I.type==="throw"){var X=I.arg;i(Y)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(M,m,Y){return this.delegate={iterator:g(M),resultName:m,nextLoc:Y},this.method==="next"&&(this.arg=B),N}},Q}(F.exports);try{regeneratorRuntime=U}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=U:Function("r","regeneratorRuntime = r")(U)}})({exports:{}});var A0=(F,U)=>`${F}-${U}-${Math.random().toString(16).slice(3,8)}`,rN=A0,In=0,fn=({id:F,action:U,payload:Q={}})=>{let B=F;return B===void 0&&(B=rN("Job",In),In+=1),{id:B,action:U,payload:Q}},OQ={},$0=!1;OQ.logging=$0,OQ.setLogging=F=>{$0=F},OQ.log=(...F)=>$0?console.log.apply(void 0,F):null;var CN=fn,{log:fR}=OQ,DN=A0,Kn=0,pN=function(){return typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||!(typeof process=="undefined"||typeof process.versions!="object"||!process.versions.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0},gn,Pn={exports:{}};function Ud(){return gn?Pn.exports:(gn=1,Pn.exports=function(){function F(){var U=arguments.length;if(U===0)throw new Error("resolveUrl requires at least one argument; got none.");var Q=document.createElement("base");if(Q.href=arguments[0],U===1)return Q.href;var B=document.getElementsByTagName("head")[0];B.insertBefore(Q,B.firstChild);for(var R,V=document.createElement("a"),d=1;d{let U={};return typeof WorkerGlobalScope!="undefined"?U.type="webworker":pN()?U.type="electron":typeof window=="object"?U.type="browser":typeof process=="object"&&(U.type="node"),F===void 0?U:U[F]})("type")==="browser"?Ud():F=>F,qn={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3},MN={defaultOEM:qn.DEFAULT},oN={name:"tesseract.js",version:"3.0.3",description:"Pure Javascript Multilingual OCR",main:"src/index.js",types:"src/index.d.ts",unpkg:"dist/tesseract.min.js",jsdelivr:"dist/tesseract.min.js",scripts:{start:"node scripts/server.js",build:"rimraf dist && webpack --config scripts/webpack.config.prod.js && rollup -c scripts/rollup.esm.js","profile:tesseract":"webpack-bundle-analyzer dist/tesseract-stats.json","profile:worker":"webpack-bundle-analyzer dist/worker-stats.json",prepublishOnly:"npm run build",wait:"rimraf dist && wait-on http://localhost:3000/dist/tesseract.dev.js",test:"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node:all","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:browser:scheduler":"npm run test:browser-tpl -- -f ./tests/scheduler.test.html","test:browser:FS":"npm run test:browser-tpl -- -f ./tests/FS.test.html",lint:"eslint src","lint:fix":"eslint --fix src",postinstall:"opencollective-postinstall || true"},browser:{"./src/worker/node/index.js":"./src/worker/browser/index.js"},author:"",contributors:["jeromewu"],license:"Apache-2.0",devDependencies:{"@babel/core":"^7.18.7","@babel/preset-env":"^7.18.7","@rollup/plugin-commonjs":"^22.0.2",acorn:"^6.4.0","babel-loader":"^8.2.0",buffer:"^6.0.3",cors:"^2.8.5",eslint:"^7.2.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.1","expect.js":"^0.3.1",express:"^4.17.1",mocha:"^8.1.3","mocha-headless-chrome":"^2.0.3","npm-run-all":"^4.1.5",nyc:"^15.1.0",rimraf:"^2.7.1",rollup:"^2.79.0","wait-on":"^3.3.0",webpack:"^5.74.0","webpack-bundle-analyzer":"^4.6.0","webpack-cli":"^4.10.0","webpack-dev-middleware":"^5.3.3"},dependencies:{"babel-eslint":"^10.1.0","bmp-js":"^0.1.0","file-type":"^12.4.1","idb-keyval":"^3.2.0","is-electron":"^2.2.0","is-url":"^1.2.4","node-fetch":"^2.6.0","opencollective-postinstall":"^2.0.2","regenerator-runtime":"^0.13.3","resolve-url":"^0.2.1","tesseract.js-core":"^3.0.2","wasm-feature-detect":"^1.2.11",zlibjs:"^0.3.1"},repository:{type:"git",url:"https://github.com/naptha/tesseract.js.git"},bugs:{url:"https://github.com/naptha/tesseract.js/issues"},homepage:"https://github.com/naptha/tesseract.js",collective:{type:"opencollective",url:"https://opencollective.com/tesseractjs"}},iN=Ud(),{version:sN}=oN,YN={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{},workerPath:typeof process!="undefined"&&process.env.TESS_ENV==="development"?iN(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${sN}/dist/worker.min.js`,corePath:null},yN=Ud(),_n=F=>new Promise((U,Q)=>{let B=new FileReader;B.onload=()=>{U(B.result)},B.onerror=({target:{error:{code:R}}})=>{Q(Error(`File could not be read! Code=${R}`))},B.readAsArrayBuffer(F)}),Fd=async F=>{let U=F;return F===void 0?"undefined":(typeof F=="string"?/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(F)?U=atob(F.split(",")[1]).split("").map(Q=>Q.charCodeAt(0)):U=await(await fetch(yN(F))).arrayBuffer():F instanceof HTMLElement?(F.tagName==="IMG"&&(U=await Fd(F.src)),F.tagName==="VIDEO"&&(U=await Fd(F.poster)),F.tagName==="CANVAS"&&await new Promise(Q=>{F.toBlob(async B=>{U=await _n(B),Q()})})):(F instanceof File||F instanceof Blob)&&(U=await _n(F)),new Uint8Array(U))},vN={defaultOptions:YN,spawnWorker:({workerPath:F,workerBlobURL:U})=>{let Q;if(Blob&&URL&&U){let B=new Blob([`importScripts("${F}");`],{type:"application/javascript"});Q=new Worker(URL.createObjectURL(B))}else Q=new Worker(F);return Q},terminateWorker:F=>{F.terminate()},onMessage:(F,U)=>{F.onmessage=({data:Q})=>{U(Q)}},send:async(F,U)=>{F.postMessage(U)},loadImage:Fd},GN=F=>{let U=z({},F);return["corePath","workerPath","langPath"].forEach(Q=>{F[Q]&&(U[Q]=mN(U[Q]))}),U},bN=F=>{let U=[],Q=[],B=[],R=[],V=[];return F.blocks.forEach(d=>{d.paragraphs.forEach(l=>{l.lines.forEach(n=>{n.words.forEach(J=>{J.symbols.forEach(W=>{V.push(q(z({},W),{page:F,block:d,paragraph:l,line:n,word:J}))}),R.push(q(z({},J),{page:F,block:d,paragraph:l,line:n}))}),B.push(q(z({},n),{page:F,block:d,paragraph:l}))}),Q.push(q(z({},l),{page:F,block:d}))}),U.push(q(z({},d),{page:F}))}),q(z({},F),{blocks:U,paragraphs:Q,lines:B,words:R,symbols:V})},$U=fn,{log:An}=OQ,XN=A0,{defaultOEM:ON}=MN,{defaultOptions:HN,spawnWorker:zN,terminateWorker:uN,onMessage:xN,loadImage:$n,send:wN}=vN,UJ=0,FJ=(F={})=>{let U=XN("Worker",UJ),E=GN(z(z({},HN),F)),{logger:Q,errorHandler:B}=E,R=Cd(E,["logger","errorHandler"]),V={},d={},l=zN(R);UJ+=1;let n=(Z,e)=>{V[Z]=e},J=(Z,e)=>{d[Z]=e},W=({id:Z,action:e,payload:r})=>new Promise((c,h)=>{An(`[${U}]: Start ${Z}, action=${e}`),n(e,c),J(e,h),wN(l,{workerId:U,jobId:Z,action:e,payload:r})});return xN(l,({workerId:Z,jobId:e,status:r,action:c,data:h})=>{if(r==="resolve"){An(`[${Z}]: Complete ${e}`);let N=h;c==="recognize"?N=bN(h):c==="getPDF"&&(N=Array.from(q(z({},h),{length:Object.keys(h).length}))),V[c]({jobId:e,data:N})}else if(r==="reject"){if(d[c](h),!B)throw Error(h);B(h)}else r==="progress"&&Q(q(z({},h),{userJobId:e}))}),{id:U,worker:l,setResolve:n,setReject:J,load:Z=>W($U({id:Z,action:"load",payload:{options:R}})),writeText:(Z,e,r)=>W($U({id:r,action:"FS",payload:{method:"writeFile",args:[Z,e]}})),readText:(Z,e)=>W($U({id:e,action:"FS",payload:{method:"readFile",args:[Z,{encoding:"utf8"}]}})),removeFile:(Z,e)=>W($U({id:e,action:"FS",payload:{method:"unlink",args:[Z]}})),FS:(Z,e,r)=>W($U({id:r,action:"FS",payload:{method:Z,args:e}})),loadLanguage:(Z="eng",e)=>W($U({id:e,action:"loadLanguage",payload:{langs:Z,options:R}})),initialize:(Z="eng",e=ON,r)=>W($U({id:r,action:"initialize",payload:{langs:Z,oem:e}})),setParameters:(Z={},e)=>W($U({id:e,action:"setParameters",payload:{params:Z}})),recognize:async(Z,e={},r)=>W($U({id:r,action:"recognize",payload:{image:await $n(Z),options:e}})),getPDF:(Z="Tesseract OCR Result",e=!1,r)=>W($U({id:r,action:"getPDF",payload:{title:Z,textonly:e}})),detect:async(Z,e)=>W($U({id:e,action:"detect",payload:{image:await $n(Z)}})),terminate:async()=>(l!==null&&(uN(l),l=null),Promise.resolve())}},QJ=FJ,LN=()=>{let F=DN("Scheduler",Kn),U={},Q={},B=[];Kn+=1;let R=()=>Object.keys(U).length,V=()=>{if(B.length!==0){let d=Object.keys(U);for(let l=0;l(U[d.id]=d,fR(`[${F}]: Add ${d.id}`),fR(`[${F}]: Number of workers=${R()}`),V(),d.id),addJob:async(d,...l)=>{if(R()===0)throw Error(`[${F}]: You need to have at least one worker before adding jobs`);return((n,J)=>new Promise((W,E)=>{let Z=CN({action:n,payload:J});B.push(async e=>{B.shift(),Q[e.id]=Z;try{W(await e[n].apply(void 0,[...J,Z.id]))}catch(r){E(r)}finally{delete Q[e.id],V()}}),fR(`[${F}]: Add ${Z.id} to JobQueue`),fR(`[${F}]: JobQueue length=${B.length}`),V()}))(d,l)},terminate:async()=>{Object.keys(U).forEach(async d=>{await U[d].terminate()}),B=[]},getQueueLen:()=>B.length,getNumWorkers:R}},jN=FJ,IN={recognize:async(F,U,Q)=>{let B=QJ(Q);return await B.load(),await B.loadLanguage(U),await B.initialize(U),B.recognize(F).finally(async()=>{await B.terminate()})},detect:async(F,U)=>{let Q=QJ(U);return await Q.load(),await Q.loadLanguage("osd"),await Q.initialize("osd"),Q.detect(F).finally(async()=>{await Q.terminate()})}},fN={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"},KN=qn,gN={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"},{setLogging:PN}=OQ,qN=z({languages:fN,OEM:KN,PSM:gN,createScheduler:LN,createWorker:jN,setLogging:PN},IN),nQ=class{constructor(U){this.worker=U,this.running=!1,this.ready=!1}static getWorker(){let U=nQ.pool.find(B=>!B.running&&B.ready);if(U)return U;let Q=new nQ(qN.createWorker({cachePath:"tesseract"}));return nQ.pool.push(Q),Q}async run(U){return new Promise(async(Q,B)=>{this.running=!0,this.ready||(await this.worker.load(),await this.worker.loadLanguage("eng"),await this.worker.initialize("eng"),this.ready=!0);let R=setTimeout(()=>{this.worker.terminate(),console.warn("Omnisearch - Worker timeout"),B("timeout"),this.running=!1},12e4);try{let{data:V}=await this.worker.recognize(U.imageData);return clearTimeout(R),Q(V)}catch{console.error("Omnisearch - OCR Worker timeout for "+name),Q({text:""})}finally{this.running=!1}})}};nQ.pool=[];var BJ=new class{async getImageText(F){return hB.Platform.isMobile?"":Ln(this._getImageText,F)}async _getImageText(F){let U=await CF.images.get({path:F.path,size:F.stat.size});if(U)return U.text;let Q=new Uint8ClampedArray(await app.vault.readBinary(F)),B=Pl(Q),R=await CF.images.get(B);if(R)return R.text;let V=nQ.getWorker();return new Promise(async(d,l)=>{try{let n=(await V.run({imageData:Buffer.from(Q.buffer),name:F.basename})).text.replace(/\n/g," ").replace(/ +/g," ").trim();CF.images.add({hash:B,text:n,path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d(n)})}catch{CF.images.add({hash:B,text:"",path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d("")})}})}},RJ=jn.getPdfText.bind(jn),VJ=BJ.getImageText.bind(BJ);async function _N(F){let U=app.vault.getFiles().find(R=>R.path===F);if(!U)throw new Error(`Invalid file path: "${F}"`);let Q;if(l0(F))Q=await app.vault.cachedRead(U);else if(TB(F))Q=await RJ(U);else if(aB(U.path))Q=await VJ(U);else throw new Error("Invalid file format: "+U.path);Q=$F(Q);let B=app.metadataCache.getFileCache(U);if(B&&B.frontmatter?.["excalidraw-plugin"]){let R=B.sections?.filter(V=>V.type==="comment")??[];for(let{start:V,end:d}of R.map(l=>l.position))Q=Q.substring(0,V.offset-1)+Q.substring(d.offset)}return{basename:$F(U.basename),content:Q,path:U.path,mtime:U.stat.mtime,tags:zl(B),aliases:Hl(B).join(""),headings1:B?TR(B,1).join(" "):"",headings2:B?TR(B,2).join(" "):"",headings3:B?TR(B,3).join(" "):""}}var lJ=class{constructor(){this.nextQueryIsEmpty=!1;this.documents=new Map}async addToLiveCache(U){let Q=await _N(U);this.documents.set(U,Q)}removeFromLiveCache(U){this.documents.delete(U)}async getDocument(U){return this.documents.has(U)?this.documents.get(U):(await this.addToLiveCache(U),this.documents.get(U))}async addToSearchHistory(U){if(!U){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let Q=await fU.searchHistory.toArray();Q=Q.filter(B=>B.query!==U).reverse(),Q.unshift({query:U}),Q=Q.slice(0,10),await fU.searchHistory.clear(),await fU.searchHistory.bulkAdd(Q)}async getSearchHistory(){let U=(await fU.searchHistory.toArray()).reverse().map(Q=>Q.query);return this.nextQueryIsEmpty&&U.unshift(""),U}getDocumentsChecksum(U){return wl(JSON.stringify(U.sort((Q,B)=>Q.pathB.path?1:0)))}async getMinisearchCache(){try{return(await fU.minisearch.toArray())[0]}catch(U){return new dJ.Notice("Omnisearch - Cache missing or invalid. Some freezes may occur while Omnisearch indexes your vault."),console.error("Omnisearch - Error while loading Minisearch cache"),console.error(U),null}}async writeMinisearchCache(U,Q){let B=Array.from(Q).map(([R,V])=>({path:R,mtime:V}));await fU.minisearch.clear(),await fU.minisearch.add({date:new Date().toISOString(),paths:B,data:U.toJSON()}),console.log("Omnisearch - Search cache written")}},hU=new lJ;function AN(F){let U,Q,B,R,V,d,l,n=F[7].default,J=NQ(n,F,F[6],null);return{c(){U=j("div"),Q=j("div"),B=j("input"),R=FU(),J&&J.c(),P(B,"class","prompt-input"),P(B,"placeholder",F[0]),P(B,"spellcheck","false"),P(B,"type","text"),P(Q,"class","omnisearch-input-field"),P(U,"class","omnisearch-input-container")},m(W,E){UU(W,U,E),H(U,Q),H(Q,B),F[8](B),RV(B,F[1]),H(U,R),J&&J.m(U,null),V=!0,d||(l=[xU(B,"input",F[9]),xU(B,"compositionend",F[10]),xU(B,"compositionstart",F[11]),xU(B,"input",F[3])],d=!0)},p(W,[E]){(!V||E&1)&&P(B,"placeholder",W[0]),E&2&&B.value!==W[1]&&RV(B,W[1]),J&&J.p&&(!V||E&64)&&tQ(J,n,W,W[6],V?EQ(n,W[6],E,null):SQ(W[6]),null)},i(W){V||(BU(J,W),V=!0)},o(W){RU(J,W),V=!1},d(W){W&&A(U),F[8](null),J&&J.d(W),d=!1,gU(l)}}}function $N(F,U,Q){let{$$slots:B={},$$scope:R}=U,{initialValue:V=""}=U,d=!1,{placeholder:l=""}=U,n="",J,W=lV();async function E(){await lF(),J.focus(),await lF(),J.select(),await lF()}let Z=(0,nJ.debounce)(()=>{hU.addToSearchHistory(""),W("input",n)},500);function e(N){LB[N?"unshift":"push"](()=>{J=N,Q(2,J)})}function r(){n=this.value,Q(1,n),Q(4,V),Q(5,d)}let c=N=>R0(!1),h=N=>R0(!0);return F.$$set=N=>{"initialValue"in N&&Q(4,V=N.initialValue),"placeholder"in N&&Q(0,l=N.placeholder),"$$scope"in N&&Q(6,R=N.$$scope)},F.$$.update=()=>{if(F.$$.dirty&50){U:V&&!d&&!n&&(Q(5,d=!0),Q(1,n=V),E())}},[l,n,J,Z,V,d,R,B,e,r,c,h]}var JJ=class extends CU{constructor(U){super();mU(this,U,$N,AN,rU,{initialValue:4,placeholder:0})}},KR=JJ;function UE(F){let U,Q,B,R,V=F[1].default,d=NQ(V,F,F[0],null);return{c(){U=j("div"),d&&d.c(),P(U,"class","prompt-results")},m(l,n){UU(l,U,n),d&&d.m(U,null),Q=!0,B||(R=xU(U,"mousedown",FE),B=!0)},p(l,[n]){d&&d.p&&(!Q||n&1)&&tQ(d,V,l,l[0],Q?EQ(V,l[0],n,null):SQ(l[0]),null)},i(l){Q||(BU(d,l),Q=!0)},o(l){RU(d,l),Q=!1},d(l){l&&A(U),d&&d.d(l),B=!1,R()}}}var FE=F=>F.preventDefault();function QE(F,U,Q){let{$$slots:B={},$$scope:R}=U;return F.$$set=V=>{"$$scope"in V&&Q(0,R=V.$$scope)},[R,B]}var WJ=class extends CU{constructor(U){super();mU(this,U,QE,UE,rU,{})}},gR=WJ;var Qd=XU(require("obsidian"));async function PR(F,U=!1){let Q=yF(F.foundWords);Q.exec(F.content);let B=Q.lastIndex,R=!1;app.workspace.iterateAllLeaves(l=>{l.view instanceof Qd.MarkdownView&&!U&&l.getViewState().state?.file===F.path&&l.getViewState()?.pinned&&(app.workspace.setActiveLeaf(l,{focus:!0}),R=!0)}),R||await app.workspace.openLinkText(F.path,"",U);let V=app.workspace.getActiveViewOfType(Qd.MarkdownView);if(!V)return;let d=V.editor.offsetToPos(B);d.ch=0,V.editor.setCursor(d),V.editor.scrollIntoView({from:{line:d.line-10,ch:0},to:{line:d.line+10,ch:0}})}async function ZJ(F,U=!1){try{let Q;switch(app.vault.getConfig("newFileLocation")){case"current":Q=(app.workspace.getActiveFile()?.parent.path??"")+"/";break;case"folder":Q=app.vault.getConfig("newFileFolderPath")+"/";break;default:Q="";break}await app.workspace.openLinkText(`${Q}${F}.md`,"",U)}catch(Q){throw Q.message="OmniSearch - Could not create note: "+Q.message,console.error(Q),Q}}function BE(F){let U;return{c(){U=j("span"),U.innerHTML='',P(U,"class","suggestion-flair"),P(U,"aria-label","Not created yet, select to create")},m(Q,B){UU(Q,U,B)},p:tU,i:tU,o:tU,d(Q){Q&&A(U)}}}function RE(F){"use strict";return[]}var NJ=class extends CU{constructor(U){super();mU(this,U,RE,BE,rU,{})}},EJ=NJ;function tJ(F){let U,Q;return U=new EJ({}),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function VE(F){let U,Q,B,R,V,d=F[2]&&tJ(F),l=F[4].default,n=NQ(l,F,F[3],null);return{c(){U=j("div"),d&&d.c(),Q=FU(),n&&n.c(),P(U,"data-result-id",F[0]),P(U,"class","suggestion-item omnisearch-result"),VV(U,"is-selected",F[1])},m(J,W){UU(J,U,W),d&&d.m(U,null),H(U,Q),n&&n.m(U,null),B=!0,R||(V=[xU(U,"mousemove",F[5]),xU(U,"click",F[6]),xU(U,"auxclick",F[7])],R=!0)},p(J,[W]){J[2]?d?W&4&&BU(d,1):(d=tJ(J),d.c(),BU(d,1),d.m(U,Q)):d&&(LF(),RU(d,1,1,()=>{d=null}),jF()),n&&n.p&&(!B||W&8)&&tQ(n,l,J,J[3],B?EQ(l,J[3],W,null):SQ(J[3]),null),(!B||W&1)&&P(U,"data-result-id",J[0]),(!B||W&2)&&VV(U,"is-selected",J[1])},i(J){B||(BU(d),BU(n,J),B=!0)},o(J){RU(d),RU(n,J),B=!1},d(J){J&&A(U),d&&d.d(),n&&n.d(J),R=!1,gU(V)}}}function dE(F,U,Q){let{$$slots:B={},$$scope:R}=U,{id:V}=U,{selected:d=!1}=U,{glyph:l=!1}=U;function n(E){FF.call(this,F,E)}function J(E){FF.call(this,F,E)}function W(E){FF.call(this,F,E)}return F.$$set=E=>{"id"in E&&Q(0,V=E.id),"selected"in E&&Q(1,d=E.selected),"glyph"in E&&Q(2,l=E.glyph),"$$scope"in E&&Q(3,R=E.$$scope)},[V,d,l,R,B,n,J,W]}var SJ=class extends CU{constructor(U){super();mU(this,U,dE,VE,rU,{id:0,selected:1,glyph:2})}},qR=SJ;function eJ(F){let U,Q=F[1].matches.length+"",B,R,V=(F[1].matches.length>1?"matches":"match")+"",d;return{c(){U=j("span"),B=PU(Q),R=PU("\xA0"),d=PU(V),P(U,"class","omnisearch-result__counter")},m(l,n){UU(l,U,n),H(U,B),H(U,R),H(U,d)},p(l,n){n&2&&Q!==(Q=l[1].matches.length+"")&&jQ(B,Q),n&2&&V!==(V=(l[1].matches.length>1?"matches":"match")+"")&&jQ(d,V)},d(l){l&&A(U)}}}function kJ(F){let U,Q=F[5].replace(F[6],YF)+"";return{c(){U=j("div"),P(U,"class","omnisearch-result__body")},m(B,R){UU(B,U,R),U.innerHTML=Q},p(B,R){R&96&&Q!==(Q=B[5].replace(B[6],YF)+"")&&(U.innerHTML=Q)},d(B){B&&A(U)}}}function aJ(F){let U,Q;return{c(){U=j("img"),UF(U,"width","100px"),BV(U.src,Q=F[2])||P(U,"src",Q),P(U,"alt","")},m(B,R){UU(B,U,R)},p(B,R){R&4&&!BV(U.src,Q=B[2])&&P(U,"src",Q)},d(B){B&&A(U)}}}function lE(F){let U,Q,B,R,V=F[3].replace(F[6],YF)+"",d,l,n,J=F[1].matches.length>0&&eJ(F),W=F[7]&&kJ(F),E=F[2]&&aJ(F);return{c(){U=j("div"),Q=j("div"),B=j("div"),R=j("span"),d=FU(),J&&J.c(),l=FU(),W&&W.c(),n=FU(),E&&E.c(),P(R,"class","omnisearch-result__title"),UF(U,"display","flex")},m(Z,e){UU(Z,U,e),H(U,Q),H(Q,B),H(B,R),R.innerHTML=V,H(B,d),J&&J.m(B,null),H(Q,l),W&&W.m(Q,null),H(U,n),E&&E.m(U,null)},p(Z,e){e&72&&V!==(V=Z[3].replace(Z[6],YF)+"")&&(R.innerHTML=V),Z[1].matches.length>0?J?J.p(Z,e):(J=eJ(Z),J.c(),J.m(B,null)):J&&(J.d(1),J=null),Z[7]?W?W.p(Z,e):(W=kJ(Z),W.c(),W.m(Q,null)):W&&(W.d(1),W=null),Z[2]?E?E.p(Z,e):(E=aJ(Z),E.c(),E.m(U,null)):E&&(E.d(1),E=null)},d(Z){Z&&A(U),J&&J.d(),W&&W.d(),E&&E.d()}}}function nE(F){let U,Q;return U=new qR({props:{id:F[1].path,selected:F[0],glyph:F[4],$$slots:{default:[lE]},$$scope:{ctx:F}}}),U.$on("mousemove",F[8]),U.$on("click",F[9]),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},p(B,[R]){let V={};R&2&&(V.id=B[1].path),R&1&&(V.selected=B[0]),R&16&&(V.glyph=B[4]),R&1262&&(V.$$scope={dirty:R,ctx:B}),U.$set(V)},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function JE(F,U,Q){let B,R,V,d,l;xB(F,AF,e=>Q(7,l=e));let{selected:n=!1}=U,{note:J}=U,W=null;function E(e){FF.call(this,F,e)}function Z(e){FF.call(this,F,e)}F.$$set=e=>{"selected"in e&&Q(0,n=e.selected),"note"in e&&Q(1,J=e.note)},F.$$.update=()=>{if(F.$$.dirty&2){U:if(Q(2,W=null),aB(J.path)){let e=app.vault.getFiles().find(r=>r.path===J.path);e&&Q(2,W=app.vault.getResourcePath(e))}}if(F.$$.dirty&2){U:Q(6,B=yF(J.foundWords))}if(F.$$.dirty&2){U:Q(5,R=cR(J.content,J.matches[0]?.offset??-1))}if(F.$$.dirty&2){U:Q(3,d=O.showShortName?J.basename:J.path)}};U:Q(4,V=!1);return[n,J,W,d,V,R,B,l,E,Z]}var TJ=class extends CU{constructor(U){super();mU(this,U,JE,nE,rU,{selected:0,note:1})}},hJ=TJ;function cJ(F,U){U?U.offsets=typeof U.offsets=="undefined"?!0:U.offsets:U={offsets:!0,tokenize:!0},F||(F="");let Q={text:[],offsets:[],exclude:{text:[]}};U.offsets&&(Q.offsets=[]);let B={text:[]},R=[],V=/(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|(-?"(?:[^"\\]|\\.)*")|(-?'(?:[^'\\]|\\.)*')|\S+|\S+:\S+/g,d,l=0;for(;(d=V.exec(F))!==null&&!(++l>=100);){let J=d[0],W=J.indexOf(":");if(W!==-1){let E=J.slice(0,W),Z=J.slice(W+1);Z=(Z+"").replace(/\\(.?)/g,function(e,r){switch(r){case"\\":return"\\";case"0":return"\0";case"":return"";default:return r}}),R.push({keyword:E,value:Z,offsetStart:d.index,offsetEnd:d.index+J.length})}else{let E=!1;J[0]==="-"&&(E=!0,J=J.slice(1)),J=(J+"").replace(/\\(.?)/g,function(Z,e){switch(e){case"\\":return"\\";case"0":return"\0";case"":return"";default:return e}}),E?B.text.push(J):R.push({text:J,offsetStart:d.index,offsetEnd:d.index+J.length})}}R.reverse();let n;for(;n=R.pop();)if(n.text)Q.text.push(n.text),U.offsets&&Q.offsets.push(n);else if(n.keyword){let J=n.keyword;U.keywords=U.keywords||[];let W=!1,E=!1;if(!/^-/.test(J))W=U.keywords.indexOf(J)!==-1;else if(J[0]==="-"){let e=J.slice(1);W=U.keywords.indexOf(e)!==-1,W&&(J=e,E=!0)}U.ranges=U.ranges||[];let Z=U.ranges.indexOf(J)!==-1;if(W){U.offsets&&Q.offsets.push({keyword:J,value:n.value,offsetStart:E?n.offsetStart+1:n.offsetStart,offsetEnd:n.offsetEnd});let e=n.value;if(e.length){let r=e.split(",");E?B[J]?B[J]instanceof Array?r.length>1?B[J]=B[J].concat(r):B[J].push(e):(B[J]=[B[J]],B[J].push(e)):r.length>1?B[J]=r:U.alwaysArray?B[J]=[e]:B[J]=e:Q[J]?Q[J]instanceof Array?r.length>1?Q[J]=Q[J].concat(r):Q[J].push(e):(Q[J]=[Q[J]],Q[J].push(e)):r.length>1?Q[J]=r:U.alwaysArray?Q[J]=[e]:Q[J]=e}}else if(Z){U.offsets&&Q.offsets.push(n);let e=n.value,r=e.split("-");Q[J]={},r.length===2?(Q[J].from=r[0],Q[J].to=r[1]):Q[J].from=e}else{let e=n.keyword+":"+n.value;Q.text.push(e),U.offsets&&Q.offsets.push({text:e,offsetStart:n.offsetStart,offsetEnd:n.offsetEnd})}}return Q.exclude=B,Q}var JQ=class{constructor(U=""){this.segments=[];this.exclusions=[];O.ignoreDiacritics&&(U=$F(U));let Q=cJ(U.toLowerCase(),{tokenize:!0});this.exclusions=Q.exclude.text.map(this.formatToken).filter(B=>!!B.value),this.segments=Q.text.reduce((B,R)=>{let V=this.formatToken(R);return V.value&&B.push(V),B},[])}isEmpty(){return this.segments.length===0}segmentsToStr(){return this.segments.map(({value:U})=>U).join(" ")}getExactTerms(){return this.segments.filter(({exact:U})=>U).map(({value:U})=>U)}formatToken(U){let Q=Ol(U);return{value:Q,exact:Q!==U}}};var NU=function(){return NU=Object.assign||function(U){for(var Q,B=1,R=arguments.length;B0&&V[V.length-1])&&(J[0]===6||J[0]===2)){Q=0;continue}if(J[0]===3&&(!V||J[1]>V[0]&&J[1]=F.length&&(F=void 0),{value:F&&F[B++],done:!F}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")}function kU(F,U){var Q=typeof Symbol=="function"&&F[Symbol.iterator];if(!Q)return F;var B=Q.call(F),R,V=[],d;try{for(;(U===void 0||U-- >0)&&!(R=B.next()).done;)V.push(R.value)}catch(l){d={error:l}}finally{try{R&&!R.done&&(Q=B.return)&&Q.call(B)}finally{if(d)throw d.error}}return V}var NE="ENTRIES",rJ="KEYS",CJ="VALUES",DU="",Bd=function(){function F(U,Q){var B=U._tree,R=Array.from(B.keys());this.set=U,this._type=Q,this._path=R.length>0?[{node:B,keys:R}]:[]}return F.prototype.next=function(){var U=this.dive();return this.backtrack(),U},F.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var U=HQ(this._path),Q=U.node,B=U.keys;if(HQ(B)===DU)return{done:!1,value:this.result()};var R=Q.get(HQ(B));return this._path.push({node:R,keys:Array.from(R.keys())}),this.dive()},F.prototype.backtrack=function(){if(this._path.length!==0){var U=HQ(this._path).keys;U.pop(),!(U.length>0)&&(this._path.pop(),this.backtrack())}},F.prototype.key=function(){return this.set._prefix+this._path.map(function(U){var Q=U.keys;return HQ(Q)}).filter(function(U){return U!==DU}).join("")},F.prototype.value=function(){return HQ(this._path).node.get(DU)},F.prototype.result=function(){switch(this._type){case CJ:return this.value();case rJ:return this.key();default:return[this.key(),this.value()]}},F.prototype[Symbol.iterator]=function(){return this},F}(),HQ=function(F){return F[F.length-1]},EE=function(F,U,Q){var B=new Map;if(U===void 0)return B;for(var R=U.length+1,V=R+Q,d=new Uint8Array(V*R).fill(Q+1),l=0;lQ)continue U}DJ(F.get(e),U,Q,B,R,c,d,l+e)}}}catch(y){n={error:y}}finally{try{Z&&!Z.done&&(J=E.return)&&J.call(E)}finally{if(n)throw n.error}}},Rd=function(){function F(U,Q){U===void 0&&(U=new Map),Q===void 0&&(Q=""),this._size=void 0,this._tree=U,this._prefix=Q}return F.prototype.atPrefix=function(U){var Q,B;if(!U.startsWith(this._prefix))throw new Error("Mismatched prefix");var R=kU(_R(this._tree,U.slice(this._prefix.length)),2),V=R[0],d=R[1];if(V===void 0){var l=kU(ld(d),2),n=l[0],J=l[1];try{for(var W=_(n.keys()),E=W.next();!E.done;E=W.next()){var Z=E.value;if(Z!==DU&&Z.startsWith(J)){var e=new Map;return e.set(Z.slice(J.length),n.get(Z)),new F(e,U)}}}catch(r){Q={error:r}}finally{try{E&&!E.done&&(B=W.return)&&B.call(W)}finally{if(Q)throw Q.error}}}return new F(V,U)},F.prototype.clear=function(){this._size=void 0,this._tree.clear()},F.prototype.delete=function(U){return this._size=void 0,tE(this._tree,U)},F.prototype.entries=function(){return new Bd(this,NE)},F.prototype.forEach=function(U){var Q,B;try{for(var R=_(this),V=R.next();!V.done;V=R.next()){var d=kU(V.value,2),l=d[0],n=d[1];U(l,n,this)}}catch(J){Q={error:J}}finally{try{V&&!V.done&&(B=R.return)&&B.call(R)}finally{if(Q)throw Q.error}}},F.prototype.fuzzyGet=function(U,Q){return EE(this._tree,U,Q)},F.prototype.get=function(U){var Q=Vd(this._tree,U);return Q!==void 0?Q.get(DU):void 0},F.prototype.has=function(U){var Q=Vd(this._tree,U);return Q!==void 0&&Q.has(DU)},F.prototype.keys=function(){return new Bd(this,rJ)},F.prototype.set=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U);return B.set(DU,Q),this},Object.defineProperty(F.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var U=this.entries();!U.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),F.prototype.update=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U);return B.set(DU,Q(B.get(DU))),this},F.prototype.fetch=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U),R=B.get(DU);return R===void 0&&B.set(DU,R=Q()),R},F.prototype.values=function(){return new Bd(this,CJ)},F.prototype[Symbol.iterator]=function(){return this.entries()},F.from=function(U){var Q,B,R=new F;try{for(var V=_(U),d=V.next();!d.done;d=V.next()){var l=kU(d.value,2),n=l[0],J=l[1];R.set(n,J)}}catch(W){Q={error:W}}finally{try{d&&!d.done&&(B=V.return)&&B.call(V)}finally{if(Q)throw Q.error}}return R},F.fromObject=function(U){return F.from(Object.entries(U))},F}(),_R=function(F,U,Q){var B,R;if(Q===void 0&&(Q=[]),U.length===0||F==null)return[F,Q];try{for(var V=_(F.keys()),d=V.next();!d.done;d=V.next()){var l=d.value;if(l!==DU&&U.startsWith(l))return Q.push([F,l]),_R(F.get(l),U.slice(l.length),Q)}}catch(n){B={error:n}}finally{try{d&&!d.done&&(R=V.return)&&R.call(V)}finally{if(B)throw B.error}}return Q.push([F,U]),_R(void 0,"",Q)},Vd=function(F,U){var Q,B;if(U.length===0||F==null)return F;try{for(var R=_(F.keys()),V=R.next();!V.done;V=R.next()){var d=V.value;if(d!==DU&&U.startsWith(d))return Vd(F.get(d),U.slice(d.length))}}catch(l){Q={error:l}}finally{try{V&&!V.done&&(B=R.return)&&B.call(R)}finally{if(Q)throw Q.error}}},dd=function(F,U){var Q,B,R=U.length;U:for(var V=0;F&&V0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Rd,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},F.prototype.discard=function(U){var Q=this,B=this._idToShortId.get(U);if(B==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(U,": it is not in the index"));this._idToShortId.delete(U),this._documentIds.delete(B),this._storedFields.delete(B),(this._fieldLength.get(B)||[]).forEach(function(R,V){Q.removeFieldLength(B,V,Q._documentCount,R)}),this._fieldLength.delete(B),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},F.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var U=this._options.autoVacuum,Q=U.minDirtFactor,B=U.minDirtCount,R=U.batchSize,V=U.batchWait;this.conditionalVacuum({batchSize:R,batchWait:V},{minDirtCount:B,minDirtFactor:Q})}},F.prototype.discardAll=function(U){var Q,B,R=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var V=_(U),d=V.next();!d.done;d=V.next()){var l=d.value;this.discard(l)}}catch(n){Q={error:n}}finally{try{d&&!d.done&&(B=V.return)&&B.call(V)}finally{if(Q)throw Q.error}}}finally{this._options.autoVacuum=R}this.maybeAutoVacuum()},F.prototype.replace=function(U){var Q=this._options,B=Q.idField,R=Q.extractField,V=R(U,B);this.discard(V),this.add(U)},F.prototype.vacuum=function(U){return U===void 0&&(U={}),this.conditionalVacuum(U)},F.prototype.conditionalVacuum=function(U,Q){var B=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&Q,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var R=B._enqueuedVacuumConditions;return B._enqueuedVacuumConditions=Ed,B.performVacuuming(U,R)}),this._enqueuedVacuum)):this.vacuumConditionsMet(Q)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(U),this._currentVacuum)},F.prototype.performVacuuming=function(U,Q){return WE(this,void 0,void 0,function(){var B,R,V,d,l,n,J,W,E,Z,e,r,c,h,N,k,t,S,a,T,C,D,p,o,s;return ZE(this,function(v){switch(v.label){case 0:if(B=this._dirtCount,!this.vacuumConditionsMet(Q))return[3,10];R=U.batchSize||Nd.batchSize,V=U.batchWait||Nd.batchWait,d=1,v.label=1;case 1:v.trys.push([1,7,8,9]),l=_(this._index),n=l.next(),v.label=2;case 2:if(n.done)return[3,6];J=kU(n.value,2),W=J[0],E=J[1];try{for(Z=(D=void 0,_(E)),e=Z.next();!e.done;e=Z.next()){r=kU(e.value,2),c=r[0],h=r[1];try{for(N=(o=void 0,_(h)),k=N.next();!k.done;k=N.next())t=kU(k.value,1),S=t[0],!this._documentIds.has(S)&&(h.size<=1?E.delete(c):h.delete(S))}catch(y){o={error:y}}finally{try{k&&!k.done&&(s=N.return)&&s.call(N)}finally{if(o)throw o.error}}}}catch(y){D={error:y}}finally{try{e&&!e.done&&(p=Z.return)&&p.call(Z)}finally{if(D)throw D.error}}return this._index.get(W).size===0&&this._index.delete(W),d%R!=0?[3,4]:[4,new Promise(function(y){return setTimeout(y,V)})];case 3:v.sent(),v.label=4;case 4:d+=1,v.label=5;case 5:return n=l.next(),[3,2];case 6:return[3,9];case 7:return a=v.sent(),T={error:a},[3,9];case 8:try{n&&!n.done&&(C=l.return)&&C.call(l)}finally{if(T)throw T.error}return[7];case 9:this._dirtCount-=B,v.label=10;case 10:return[4,null];case 11:return v.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},F.prototype.vacuumConditionsMet=function(U){if(U==null)return!0;var Q=U.minDirtCount,B=U.minDirtFactor;return Q=Q||td.minDirtCount,B=B||td.minDirtFactor,this.dirtCount>=Q&&this.dirtFactor>=B},Object.defineProperty(F.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),F.prototype.has=function(U){return this._idToShortId.has(U)},F.prototype.search=function(U,Q){var B,R;Q===void 0&&(Q={});var V=this.executeQuery(U,Q),d=[];try{for(var l=_(V),n=l.next();!n.done;n=l.next()){var J=kU(n.value,2),W=J[0],E=J[1],Z=E.score,e=E.terms,r=E.match,c=e.length,h={id:this._documentIds.get(W),score:Z*c,terms:Object.keys(r),match:r};Object.assign(h,this._storedFields.get(W)),(Q.filter==null||Q.filter(h))&&d.push(h)}}catch(N){B={error:N}}finally{try{n&&!n.done&&(R=l.return)&&R.call(l)}finally{if(B)throw B.error}}return d.sort(sJ),d},F.prototype.autoSuggest=function(U,Q){var B,R,V,d;Q===void 0&&(Q={}),Q=NU(NU({},this._options.autoSuggestOptions),Q);var l=new Map;try{for(var n=_(this.search(U,Q)),J=n.next();!J.done;J=n.next()){var W=J.value,E=W.score,Z=W.terms,e=Z.join(" "),r=l.get(e);r!=null?(r.score+=E,r.count+=1):l.set(e,{score:E,terms:Z,count:1})}}catch(a){B={error:a}}finally{try{J&&!J.done&&(R=n.return)&&R.call(n)}finally{if(B)throw B.error}}var c=[];try{for(var h=_(l),N=h.next();!N.done;N=h.next()){var k=kU(N.value,2),r=k[0],t=k[1],E=t.score,Z=t.terms,S=t.count;c.push({suggestion:r,terms:Z,score:E/S})}}catch(a){V={error:a}}finally{try{N&&!N.done&&(d=h.return)&&d.call(h)}finally{if(V)throw V.error}}return c.sort(sJ),c},Object.defineProperty(F.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),F.loadJSON=function(U,Q){if(Q==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(U),Q)},F.getDefault=function(U){if(Zd.hasOwnProperty(U))return Wd(Zd,U);throw new Error('MiniSearch: unknown option "'.concat(U,'"'))},F.loadJS=function(U,Q){var B,R,V,d,l,n,J=U.index,W=U.documentCount,E=U.nextId,Z=U.documentIds,e=U.fieldIds,r=U.fieldLength,c=U.averageFieldLength,h=U.storedFields,N=U.dirtCount,k=U.serializationVersion;if(k!==1&&k!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var t=new F(Q);t._documentCount=W,t._nextId=E,t._documentIds=AR(Z),t._idToShortId=new Map,t._fieldIds=e,t._fieldLength=AR(r),t._avgFieldLength=c,t._storedFields=AR(h),t._dirtCount=N||0,t._index=new Rd;try{for(var S=_(t._documentIds),a=S.next();!a.done;a=S.next()){var T=kU(a.value,2),C=T[0],D=T[1];t._idToShortId.set(D,C)}}catch(m){B={error:m}}finally{try{a&&!a.done&&(R=S.return)&&R.call(S)}finally{if(B)throw B.error}}try{for(var p=_(J),o=p.next();!o.done;o=p.next()){var s=kU(o.value,2),v=s[0],y=s[1],i=new Map;try{for(var w=(l=void 0,_(Object.keys(y))),g=w.next();!g.done;g=w.next()){var L=g.value,M=y[L];k===1&&(M=M.ds),i.set(parseInt(L,10),AR(M))}}catch(m){l={error:m}}finally{try{g&&!g.done&&(n=w.return)&&n.call(w)}finally{if(l)throw l.error}}t._index.set(v,i)}}catch(m){V={error:m}}finally{try{o&&!o.done&&(d=p.return)&&d.call(p)}finally{if(V)throw V.error}}return t},F.prototype.executeQuery=function(U,Q){var B=this;if(Q===void 0&&(Q={}),typeof U!="string"){var R=NU(NU(NU({},Q),U),{queries:void 0}),V=U.queries.map(function(h){return B.executeQuery(h,R)});return this.combineResults(V,U.combineWith)}var d=this._options,l=d.tokenize,n=d.processTerm,J=d.searchOptions,W=NU(NU({tokenize:l,processTerm:n},J),Q),E=W.tokenize,Z=W.processTerm,e=E(U).flatMap(function(h){return Z(h)}).filter(function(h){return!!h}),r=e.map(TE(W)),c=r.map(function(h){return B.executeQuerySpec(h,W)});return this.combineResults(c,W.combineWith)},F.prototype.executeQuerySpec=function(U,Q){var B,R,V,d,l=NU(NU({},this._options.searchOptions),Q),n=(l.fields||this._options.fields).reduce(function(L,M){var m;return NU(NU({},L),(m={},m[M]=Wd(L,M)||1,m))},l.boost||{}),J=l.boostDocument,W=l.weights,E=l.maxFuzzy,Z=l.bm25,e=NU(NU({},oJ.weights),W),r=e.fuzzy,c=e.prefix,h=this._index.get(U.term),N=this.termResults(U.term,U.term,1,h,n,J,Z),k,t;if(U.prefix&&(k=this._index.atPrefix(U.term)),U.fuzzy){var S=U.fuzzy===!0?.2:U.fuzzy,a=S<1?Math.min(E,Math.round(U.term.length*S)):S;a&&(t=this._index.fuzzyGet(U.term,a))}if(k)try{for(var T=_(k),C=T.next();!C.done;C=T.next()){var D=kU(C.value,2),p=D[0],o=D[1],s=p.length-U.term.length;if(!!s){t==null||t.delete(p);var v=c*p.length/(p.length+.3*s);this.termResults(U.term,p,v,o,n,J,Z,N)}}}catch(L){B={error:L}}finally{try{C&&!C.done&&(R=T.return)&&R.call(T)}finally{if(B)throw B.error}}if(t)try{for(var y=_(t.keys()),i=y.next();!i.done;i=y.next()){var p=i.value,w=kU(t.get(p),2),g=w[0],s=w[1];if(!!s){var v=r*p.length/(p.length+s);this.termResults(U.term,p,v,g,n,J,Z,N)}}}catch(L){V={error:L}}finally{try{i&&!i.done&&(d=y.return)&&d.call(y)}finally{if(V)throw V.error}}return N},F.prototype.combineResults=function(U,Q){if(Q===void 0&&(Q=nd),U.length===0)return new Map;var B=Q.toLowerCase();return U.reduce(eE[B])||new Map},F.prototype.toJSON=function(){var U,Q,B,R,V=[];try{for(var d=_(this._index),l=d.next();!l.done;l=d.next()){var n=kU(l.value,2),J=n[0],W=n[1],E={};try{for(var Z=(B=void 0,_(W)),e=Z.next();!e.done;e=Z.next()){var r=kU(e.value,2),c=r[0],h=r[1];E[c]=Object.fromEntries(h)}}catch(N){B={error:N}}finally{try{e&&!e.done&&(R=Z.return)&&R.call(Z)}finally{if(B)throw B.error}}V.push([J,E])}}catch(N){U={error:N}}finally{try{l&&!l.done&&(Q=d.return)&&Q.call(d)}finally{if(U)throw U.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:V,serializationVersion:2}},F.prototype.termResults=function(U,Q,B,R,V,d,l,n){var J,W,E,Z,e;if(n===void 0&&(n=new Map),R==null)return n;try{for(var r=_(Object.keys(V)),c=r.next();!c.done;c=r.next()){var h=c.value,N=V[h],k=this._fieldIds[h],t=R.get(k);if(t!=null){var S=t.size,a=this._avgFieldLength[k];try{for(var T=(E=void 0,_(t.keys())),C=T.next();!C.done;C=T.next()){var D=C.value;if(!this._documentIds.has(D)){this.removeTerm(k,D,Q),S-=1;continue}var p=d?d(this._documentIds.get(D),Q):1;if(!!p){var o=t.get(D),s=this._fieldLength.get(D)[k],v=aE(o,S,this._documentCount,s,a,l),y=B*N*p*v,i=n.get(D);if(i){i.score+=y,cE(i.terms,U);var w=Wd(i.match,Q);w?w.push(h):i.match[Q]=[h]}else n.set(D,{score:y,terms:[U],match:(e={},e[Q]=[h],e)})}}}catch(g){E={error:g}}finally{try{C&&!C.done&&(Z=T.return)&&Z.call(T)}finally{if(E)throw E.error}}}}}catch(g){J={error:g}}finally{try{c&&!c.done&&(W=r.return)&&W.call(r)}finally{if(J)throw J.error}}return n},F.prototype.addTerm=function(U,Q,B){var R=this._index.fetch(B,YJ),V=R.get(U);if(V==null)V=new Map,V.set(Q,1),R.set(U,V);else{var d=V.get(Q);V.set(Q,(d||0)+1)}},F.prototype.removeTerm=function(U,Q,B){if(!this._index.has(B)){this.warnDocumentChanged(Q,U,B);return}var R=this._index.fetch(B,YJ),V=R.get(U);V==null||V.get(Q)==null?this.warnDocumentChanged(Q,U,B):V.get(Q)<=1?V.size<=1?R.delete(U):V.delete(Q):V.set(Q,V.get(Q)-1),this._index.get(B).size===0&&this._index.delete(B)},F.prototype.warnDocumentChanged=function(U,Q,B){var R,V;try{for(var d=_(Object.keys(this._fieldIds)),l=d.next();!l.done;l=d.next()){var n=l.value;if(this._fieldIds[n]===Q){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(U),' has changed before removal: term "').concat(B,'" was not present in field "').concat(n,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(J){R={error:J}}finally{try{l&&!l.done&&(V=d.return)&&V.call(d)}finally{if(R)throw R.error}}},F.prototype.addDocumentId=function(U){var Q=this._nextId;return this._idToShortId.set(U,Q),this._documentIds.set(Q,U),this._documentCount+=1,this._nextId+=1,Q},F.prototype.addFields=function(U){for(var Q=0;Q{let U=F.split(vl);return tB?U.flatMap(Q=>ol.test(Q)?tB.cut(Q):[Q]):U},UV=class{constructor(){this.indexedDocuments=new Map;this.previousResults=[];this.minisearch=new Jd(UV.options)}async loadCache(){let U=await hU.getMinisearchCache();U&&(this.minisearch=Jd.loadJS(U.data,UV.options),this.indexedDocuments=new Map(U.paths.map(Q=>[Q.path,Q.mtime])))}getDiff(U){let Q=new Map(U.map(V=>[V.path,V.mtime])),B=U.filter(V=>!this.indexedDocuments.has(V.path)||this.indexedDocuments.get(V.path)!==V.mtime),R=[...this.indexedDocuments].filter(([V,d])=>!Q.has(V)||Q.get(V)!==d).map(V=>({path:V[0],mtime:V[1]}));return{toAdd:B,toRemove:R}}async addFromPaths(U){let Q=await Promise.all(U.map(async R=>await hU.getDocument(R)));this.removeFromPaths(Q.filter(R=>this.indexedDocuments.has(R.path)).map(R=>R.path));let B=Ll(Q,500);for(let R of B){R.forEach(d=>this.indexedDocuments.set(d.path,d.mtime));let V=R.filter(d=>this.minisearch.has(d.path));this.removeFromPaths(V.map(d=>d.path)),await this.minisearch.addAllAsync(R)}}removeFromPaths(U){U.forEach(B=>this.indexedDocuments.delete(B));let Q=U.filter(B=>this.minisearch.has(B));this.minisearch.discardAll(Q)}async search(U,Q){if(U.isEmpty())return this.previousResults=[],[];let B=this.minisearch.search(U.segmentsToStr(),{prefix:n=>n.length>=Q.prefixLength,fuzzy:.2,combineWith:"AND",boost:{basename:O.weightBasename,aliases:O.weightBasename,headings1:O.weightH1,headings2:O.weightH2,headings3:O.weightH3}});if(!B.length)return this.previousResults;if(Q.singleFilePath)return B.filter(n=>n.id===Q.singleFilePath);O.hideExcluded?B=B.filter(n=>!(app.metadataCache.isUserIgnored&&app.metadataCache.isUserIgnored(n.id))):B.forEach(n=>{app.metadataCache.isUserIgnored&&app.metadataCache.isUserIgnored(n.id)&&(n.score/=10)});let R=U.segments.filter(n=>n.value.startsWith("#")).map(n=>n.value);for(let n of R)for(let J of B)(J.tags??[]).includes(n)&&(J.score*=100);B=B.slice(0,50);let V=await Promise.all(B.map(async n=>await hU.getDocument(n.id))),d=U.getExactTerms();d.length&&(B=B.filter(n=>{let J=V.find(Z=>Z.path===n.id),W=J?.path.toLowerCase()??"",E=d0(J?.content??"").toLowerCase();return d.every(Z=>E.includes(Z)||W.includes(Z))}));let l=U.exclusions;return l.length&&(B=B.filter(n=>{let J=d0(V.find(W=>W.path===n.id)?.content??"").toLowerCase();return l.every(W=>!J.includes(W.value))})),B=B.filter((n,J,W)=>W.findIndex(E=>E.id===n.id)===J),this.previousResults=B,B}getMatches(U,Q,B){let R=null,V=[],d=0;for(;(R=Q.exec(U))!==null&&!(++d>=100);){let n=R[0];n&&V.push({match:n,offset:R.index})}let l=U.toLowerCase().indexOf(B.segmentsToStr());return l>-1&&V.unshift({offset:l,match:B.segmentsToStr()}),V}async getSuggestions(U,Q){let B;O.simpleSearch?B=await this.search(U,{prefixLength:1,singleFilePath:Q?.singleFilePath}):B=await this.search(U,{prefixLength:3,singleFilePath:Q?.singleFilePath});let R=U.segments.filter(l=>l.value.startsWith("#")).map(l=>l.value),V=await Promise.all(B.map(async l=>await hU.getDocument(l.id)));return B.map(l=>{let n=V.find(Z=>Z.path===l.id);n||(console.warn(`Omnisearch - Note "${l.id}" not in the live cache`),n={content:"",basename:l.id,path:l.id}),U.segments.forEach(Z=>{Z.value=Z.value.replace(/^#/,"")});let J=[...Object.keys(l.match),...U.segments.filter(Z=>Z.exact).map(Z=>Z.value),...R].filter(Z=>Z.length>1),W=this.getMatches(n.content,yF(J),U);return z({score:l.score,foundWords:J,matches:W},n)})}async writeToCache(){$R.Platform.isIosApp||await hU.writeMinisearchCache(this.minisearch,this.indexedDocuments)}},Sd=UV;Sd.options={tokenize:CE,processTerm:U=>(O.ignoreDiacritics?$F(U):U).toLowerCase(),idField:"path",fields:["basename","aliases","content","headings1","headings2","headings3"],storeFields:["tags"],logger(U,Q,B){B==="version_conflict"&&new $R.Notice("Omnisearch - Your index cache may be incorrect or corrupted. If this message keeps appearing, go to Settings to clear the cache.",5e3)}};var cU=new Sd;var ed=new Set;function yJ(F){ed.add(F)}async function vJ(){let F=[...ed].map(U=>U.path);F.length&&(cU.removeFromPaths(F),cU.addFromPaths(F),ed.clear())}function GJ(F,U,Q){let B=F.slice();return B[27]=U[Q],B[29]=Q,B}function DE(F){let U,Q,B;return{c(){U=j("button"),U.textContent="Create note"},m(R,V){UU(R,U,V),Q||(B=xU(U,"click",F[6]),Q=!0)},p:tU,d(R){R&&A(U),Q=!1,B()}}}function pE(F){let U,Q=O.showCreateButton&&DE(F);return{c(){Q&&Q.c(),U=LQ()},m(B,R){Q&&Q.m(B,R),UU(B,U,R)},p(B,R){O.showCreateButton&&Q.p(B,R)},d(B){Q&&Q.d(B),B&&A(U)}}}function bJ(F){let U,Q,B;return{c(){U=j("div"),Q=PU("\u23F3 Work in progress: "),B=PU(F[3]),UF(U,"text-align","center"),UF(U,"color","var(--text-accent)"),UF(U,"margin-top","10px")},m(R,V){UU(R,U,V),H(U,Q),H(U,B)},p(R,V){V&8&&jQ(B,R[3])},d(R){R&&A(U)}}}function XJ(F){let U,Q;function B(...R){return F[11](F[29],...R)}return U=new hJ({props:{selected:F[29]===F[0],note:F[27]}}),U.$on("mousemove",B),U.$on("click",F[5]),{c(){OU(U.$$.fragment)},m(R,V){YU(U,R,V),Q=!0},p(R,V){F=R;let d={};V&1&&(d.selected=F[29]===F[0]),V&4&&(d.note=F[27]),U.$set(d)},i(R){Q||(BU(U.$$.fragment,R),Q=!0)},o(R){RU(U.$$.fragment,R),Q=!1},d(R){pU(U,R)}}}function mE(F){let U;return{c(){U=PU("Searching...")},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function ME(F){let U;return{c(){U=PU("We found 0 result for your search here.")},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function oE(F){let U,Q,B,R=F[2],V=[];for(let W=0;WRU(V[W],1,1,()=>{V[W]=null});function l(W,E){if(!W[2].length&&W[1]&&!W[4])return ME;if(W[4])return mE}let n=l(F,-1),J=n&&n(F);return{c(){for(let W=0;W\u2191\u2193to navigate',n=FU(),J=j("div"),J.innerHTML=`alt \u2191\u2193 +`).slice(U).filter(Vn).map(B=>` +`+B).join("")):""}var dn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],S0=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(dn),KZ={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function yQ(F,U){this._e=UQ(),this.name=F,this.message=U}function ln(F,U){return F+". Errors: "+Object.keys(U).map(Q=>U[Q].toString()).filter((Q,B,R)=>R.indexOf(Q)===B).join(` +`)}function CR(F,U,Q,B){this._e=UQ(),this.failures=U,this.failedKeys=B,this.successCount=Q,this.message=ln(F,U)}function CB(F,U){this._e=UQ(),this.name="BulkError",this.failures=Object.keys(U).map(Q=>U[Q]),this.failuresByPos=U,this.message=ln(F,U)}sQ(yQ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+t0(this._e,2))}},toString:function(){return this.name+": "+this.message}}),sQ(CR).from(yQ),sQ(CB).from(yQ);var e0=S0.reduce((F,U)=>(F[U]=U+"Error",F),{}),gZ=yQ,K=S0.reduce((F,U)=>{var Q=U+"Error";function B(R,V){this._e=UQ(),this.name=Q,R?typeof R=="string"?(this.message=`${R}${V?` + `+V:""}`,this.inner=V||null):typeof R=="object"&&(this.message=`${R.name} ${R.message}`,this.inner=R):(this.message=KZ[U]||Q,this.inner=null)}return sQ(B).from(gZ),F[U]=B,F},{});K.Syntax=SyntaxError,K.Type=TypeError,K.Range=RangeError;var nn=dn.reduce((F,U)=>(F[U+"Error"]=K[U],F),{}),DR=S0.reduce((F,U)=>(["Syntax","Type","Range"].indexOf(U)===-1&&(F[U+"Error"]=K[U]),F),{});function dU(){}function DB(F){return F}function PZ(F,U){return F==null||F===DB?U:function(Q){return U(F(Q))}}function FQ(F,U){return function(){F.apply(this,arguments),U.apply(this,arguments)}}function _Z(F,U){return F===dU?U:function(){var Q=F.apply(this,arguments);Q!==void 0&&(arguments[0]=Q);var B=this.onsuccess,R=this.onerror;this.onsuccess=null,this.onerror=null;var V=U.apply(this,arguments);return B&&(this.onsuccess=this.onsuccess?FQ(B,this.onsuccess):B),R&&(this.onerror=this.onerror?FQ(R,this.onerror):R),V!==void 0?V:Q}}function qZ(F,U){return F===dU?U:function(){F.apply(this,arguments);var Q=this.onsuccess,B=this.onerror;this.onsuccess=this.onerror=null,U.apply(this,arguments),Q&&(this.onsuccess=this.onsuccess?FQ(Q,this.onsuccess):Q),B&&(this.onerror=this.onerror?FQ(B,this.onerror):B)}}function AZ(F,U){return F===dU?U:function(Q){var B=F.apply(this,arguments);GU(Q,B);var R=this.onsuccess,V=this.onerror;this.onsuccess=null,this.onerror=null;var d=U.apply(this,arguments);return R&&(this.onsuccess=this.onsuccess?FQ(R,this.onsuccess):R),V&&(this.onerror=this.onerror?FQ(V,this.onerror):V),B===void 0?d===void 0?void 0:d:GU(B,d)}}function $Z(F,U){return F===dU?U:function(){return U.apply(this,arguments)!==!1&&F.apply(this,arguments)}}function k0(F,U){return F===dU?U:function(){var Q=F.apply(this,arguments);if(Q&&typeof Q.then=="function"){for(var B=this,R=arguments.length,V=new Array(R);R--;)V[R]=arguments[R];return Q.then(function(){return U.apply(B,V)})}return U.apply(this,arguments)}}DR.ModifyError=CR,DR.DexieError=yQ,DR.BulkError=CB;var pB={},[a0,pR,T0]=typeof Promise=="undefined"?[]:(()=>{let F=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[F,hB(F),F];let U=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[U,hB(U),F]})(),Jn=pR&&pR.then,mR=a0&&a0.constructor,h0=!!T0,c0=!1,UN=T0?()=>{T0.then(sR)}:JU.setImmediate?setImmediate.bind(null,sR):JU.MutationObserver?()=>{var F=document.createElement("div");new MutationObserver(()=>{sR(),F=null}).observe(F,{attributes:!0}),F.setAttribute("i","1")}:()=>{setTimeout(sR,0)},mB=function(F,U){MB.push([F,U]),MR&&(UN(),MR=!1)},r0=!0,MR=!0,QQ=[],oR=[],C0=null,D0=DB,vQ={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:an,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(F=>{try{an(F[0],F[1])}catch{}})}},x=vQ,MB=[],BQ=0,iR=[];function b(F){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=dU,this._lib=!1;var U=this._PSD=x;if(VF&&(this._stackHolder=UQ(),this._prev=null,this._numPrev=0),typeof F!="function"){if(F!==pB)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&m0(this,this._value))}this._state=null,this._value=null,++U.ref,Zn(this,F)}var p0={get:function(){var F=x,U=vR;function Q(B,R){var V=!F.global&&(F!==x||U!==vR);let d=V&&!TF();var l=new b((n,J)=>{M0(this,new Wn(bR(B,F,V,d),bR(R,F,V,d),n,J,F))});return VF&&tn(l,this),l}return Q.prototype=pB,Q},set:function(F){eF(this,"then",F&&F.prototype===pB?p0:{get:function(){return F},set:p0.set})}};function Wn(F,U,Q,B,R){this.onFulfilled=typeof F=="function"?F:null,this.onRejected=typeof U=="function"?U:null,this.resolve=Q,this.reject=B,this.psd=R}function Zn(F,U){try{U(Q=>{if(F._state===null){if(Q===F)throw new TypeError("A promise cannot be resolved with itself.");var B=F._lib&&oB();Q&&typeof Q.then=="function"?Zn(F,(R,V)=>{Q instanceof b?Q._then(R,V):Q.then(R,V)}):(F._state=!0,F._value=Q,Nn(F)),B&&iB()}},m0.bind(null,F))}catch(Q){m0(F,Q)}}function m0(F,U){if(oR.push(U),F._state===null){var Q=F._lib&&oB();U=D0(U),F._state=!1,F._value=U,VF&&U!==null&&typeof U=="object"&&!U._promise&&function(B,R,V){try{B.apply(null,V)}catch(d){R&&R(d)}}(()=>{var B=J0(U,"stack");U._promise=F,eF(U,"stack",{get:()=>c0?B&&(B.get?B.get.apply(U):B.value):F.stack})}),function(B){QQ.some(R=>R._value===B._value)||QQ.push(B)}(F),Nn(F),Q&&iB()}}function Nn(F){var U=F._listeners;F._listeners=[];for(var Q=0,B=U.length;Q{--BQ==0&&o0()},[]))}function M0(F,U){if(F._state!==null){var Q=F._state?U.onFulfilled:U.onRejected;if(Q===null)return(F._state?U.resolve:U.reject)(F._value);++U.psd.ref,++BQ,mB(FN,[Q,F,U])}else F._listeners.push(U)}function FN(F,U,Q){try{C0=U;var B,R=U._value;U._state?B=F(R):(oR.length&&(oR=[]),B=F(R),oR.indexOf(R)===-1&&function(V){for(var d=QQ.length;d;)if(QQ[--d]._value===V._value)return void QQ.splice(d,1)}(U)),Q.resolve(B)}catch(V){Q.reject(V)}finally{C0=null,--BQ==0&&o0(),--Q.psd.ref||Q.psd.finalize()}}function En(F,U,Q){if(U.length===Q)return U;var B="";if(F._state===!1){var R,V,d=F._value;d!=null?(R=d.name||"Error",V=d.message||d,B=t0(d,0)):(R=d,V=""),U.push(R+(V?": "+V:"")+B)}return VF&&((B=t0(F._stackHolder,2))&&U.indexOf(B)===-1&&U.push(B),F._prev&&En(F._prev,U,Q)),U}function tn(F,U){var Q=U?U._numPrev+1:0;Q<100&&(F._prev=U,F._numPrev=Q)}function sR(){oB()&&iB()}function oB(){var F=r0;return r0=!1,MR=!1,F}function iB(){var F,U,Q;do for(;MB.length>0;)for(F=MB,MB=[],Q=F.length,U=0;U0);r0=!0,MR=!0}function o0(){var F=QQ;QQ=[],F.forEach(B=>{B._PSD.onunhandled.call(null,B._value,B)});for(var U=iR.slice(0),Q=U.length;Q;)U[--Q]()}function YR(F){return new b(pB,!1,F)}function ZU(F,U){var Q=x;return function(){var B=oB(),R=x;try{return XF(Q,!0),F.apply(this,arguments)}catch(V){U&&U(V)}finally{XF(R,!1),B&&iB()}}}iQ(b.prototype,{then:p0,_then:function(F,U){M0(this,new Wn(null,null,F,U,x))},catch:function(F){if(arguments.length===1)return this.then(null,F);var U=arguments[0],Q=arguments[1];return typeof U=="function"?this.then(null,B=>B instanceof U?Q(B):YR(B)):this.then(null,B=>B&&B.name===U?Q(B):YR(B))},finally:function(F){return this.then(U=>(F(),U),U=>(F(),YR(U)))},stack:{get:function(){if(this._stack)return this._stack;try{c0=!0;var F=En(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=F),F}finally{c0=!1}}},timeout:function(F,U){return F<1/0?new b((Q,B)=>{var R=setTimeout(()=>B(new K.Timeout(U)),F);this.then(Q,B).finally(clearTimeout.bind(null,R))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&eF(b.prototype,Symbol.toStringTag,"Dexie.Promise"),vQ.env=Sn(),iQ(b,{all:function(){var F=aF.apply(null,arguments).map(GR);return new b(function(U,Q){F.length===0&&U([]);var B=F.length;F.forEach((R,V)=>b.resolve(R).then(d=>{F[V]=d,--B||U(F)},Q))})},resolve:F=>{if(F instanceof b)return F;if(F&&typeof F.then=="function")return new b((Q,B)=>{F.then(Q,B)});var U=new b(pB,!0,F);return tn(U,C0),U},reject:YR,race:function(){var F=aF.apply(null,arguments).map(GR);return new b((U,Q)=>{F.map(B=>b.resolve(B).then(U,Q))})},PSD:{get:()=>x,set:F=>x=F},totalEchoes:{get:()=>vR},newPSD:bF,usePSD:bQ,scheduler:{get:()=>mB,set:F=>{mB=F}},rejectionMapper:{get:()=>D0,set:F=>{D0=F}},follow:(F,U)=>new b((Q,B)=>bF((R,V)=>{var d=x;d.unhandleds=[],d.onunhandled=V,d.finalize=FQ(function(){(function(l){function n(){l(),iR.splice(iR.indexOf(n),1)}iR.push(n),++BQ,mB(()=>{--BQ==0&&o0()},[])})(()=>{this.unhandleds.length===0?R():V(this.unhandleds[0])})},d.finalize),F()},U,Q,B))}),mR&&(mR.allSettled&&eF(b,"allSettled",function(){let F=aF.apply(null,arguments).map(GR);return new b(U=>{F.length===0&&U([]);let Q=F.length,B=new Array(Q);F.forEach((R,V)=>b.resolve(R).then(d=>B[V]={status:"fulfilled",value:d},d=>B[V]={status:"rejected",reason:d}).then(()=>--Q||U(B)))})}),mR.any&&typeof AggregateError!="undefined"&&eF(b,"any",function(){let F=aF.apply(null,arguments).map(GR);return new b((U,Q)=>{F.length===0&&Q(new AggregateError([]));let B=F.length,R=new Array(B);F.forEach((V,d)=>b.resolve(V).then(l=>U(l),l=>{R[d]=l,--B||Q(new AggregateError(R))}))})}));var sU={awaits:0,echoes:0,id:0},QN=0,yR=[],i0=0,vR=0,BN=0;function bF(F,U,Q,B){var R=x,V=Object.create(R);V.parent=R,V.ref=0,V.global=!1,V.id=++BN;var d=vQ.env;V.env=h0?{Promise:b,PromiseProp:{value:b,configurable:!0,writable:!0},all:b.all,race:b.race,allSettled:b.allSettled,any:b.any,resolve:b.resolve,reject:b.reject,nthen:kn(d.nthen,V),gthen:kn(d.gthen,V)}:{},U&&GU(V,U),++R.ref,V.finalize=function(){--this.parent.ref||this.parent.finalize()};var l=bQ(V,F,Q,B);return V.ref===0&&V.finalize(),l}function GQ(){return sU.id||(sU.id=++QN),++sU.awaits,sU.echoes+=100,sU.id}function TF(){return!!sU.awaits&&(--sU.awaits==0&&(sU.id=0),sU.echoes=100*sU.awaits,!0)}function GR(F){return sU.echoes&&F&&F.constructor===mR?(GQ(),F.then(U=>(TF(),U),U=>(TF(),TU(U)))):F}function RN(F){++vR,sU.echoes&&--sU.echoes!=0||(sU.echoes=sU.id=0),yR.push(x),XF(F,!0)}function VN(){var F=yR[yR.length-1];yR.pop(),XF(F,!1)}function XF(F,U){var Q=x;if((U?!sU.echoes||i0++&&F===x:!i0||--i0&&F===x)||en(U?RN.bind(null,F):VN),F!==x&&(x=F,Q===vQ&&(vQ.env=Sn()),h0)){var B=vQ.env.Promise,R=F.env;pR.then=R.nthen,B.prototype.then=R.gthen,(Q.global||F.global)&&(Object.defineProperty(JU,"Promise",R.PromiseProp),B.all=R.all,B.race=R.race,B.resolve=R.resolve,B.reject=R.reject,R.allSettled&&(B.allSettled=R.allSettled),R.any&&(B.any=R.any))}}function Sn(){var F=JU.Promise;return h0?{Promise:F,PromiseProp:Object.getOwnPropertyDescriptor(JU,"Promise"),all:F.all,race:F.race,allSettled:F.allSettled,any:F.any,resolve:F.resolve,reject:F.reject,nthen:pR.then,gthen:F.prototype.then}:{}}function bQ(F,U,Q,B,R){var V=x;try{return XF(F,!0),U(Q,B,R)}finally{XF(V,!1)}}function en(F){Jn.call(a0,F)}function bR(F,U,Q,B){return typeof F!="function"?F:function(){var R=x;Q&&GQ(),XF(U,!0);try{return F.apply(this,arguments)}finally{XF(R,!1),B&&en(TF)}}}function kn(F,U){return function(Q,B){return F.call(this,bR(Q,U),bR(B,U))}}(""+Jn).indexOf("[native code]")===-1&&(GQ=TF=dU);function an(F,U){var Q;try{Q=U.onuncatched(F)}catch{}if(Q!==!1)try{var B,R={promise:U,reason:F};if(JU.document&&document.createEvent?((B=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),GU(B,R)):JU.CustomEvent&&GU(B=new CustomEvent("unhandledrejection",{detail:R}),R),B&&JU.dispatchEvent&&(dispatchEvent(B),!JU.PromiseRejectionEvent&&JU.onunhandledrejection))try{JU.onunhandledrejection(B)}catch{}VF&&B&&!B.defaultPrevented&&console.warn(`Unhandled rejection: ${F.stack||F}`)}catch{}}var TU=b.reject;function s0(F,U,Q,B){if(F.idbdb&&(F._state.openComplete||x.letThrough||F._vip)){var R=F._createTransaction(U,Q,F._dbSchema);try{R.create(),F._state.PR1398_maxLoop=3}catch(V){return V.name===e0.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>s0(F,U,Q,B))):TU(V)}return R._promise(U,(V,d)=>bF(()=>(x.trans=R,B(V,d,R)))).then(V=>R._completion.then(()=>V))}if(F._state.openComplete)return TU(new K.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._options.autoOpen)return TU(new K.DatabaseClosed);F.open().catch(dU)}return F._state.dbReadyPromise.then(()=>s0(F,U,Q,B))}var RQ=String.fromCharCode(65535),hF="Invalid key provided. Keys must be of type string, number, Date or Array.",sB=[],XR=typeof navigator!="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),dN=XR,lN=XR,Tn=F=>!/(dexie\.js|dexie\.min\.js)/.test(F);function VQ(F,U){return F?U?function(){return F.apply(this,arguments)&&U.apply(this,arguments)}:F:U}var hn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function OR(F){return typeof F!="string"||/\./.test(F)?U=>U:U=>(U[F]===void 0&&F in U&&delete(U=rB(U))[F],U)}var cn=class{_trans(U,Q,B){let R=this._tx||x.trans,V=this.name;function d(n,J,W){if(!W.schema[V])throw new K.NotFound("Table "+V+" not part of transaction");return Q(W.idbtrans,W)}let l=oB();try{return R&&R.db===this.db?R===x.trans?R._promise(U,d,B):bF(()=>R._promise(U,d,B),{trans:R,transless:x.transless||x}):s0(this.db,U,[this.name],d)}finally{l&&iB()}}get(U,Q){return U&&U.constructor===Object?this.where(U).first(Q):this._trans("readonly",B=>this.core.get({trans:B,key:U}).then(R=>this.hook.reading.fire(R))).then(Q)}where(U){if(typeof U=="string")return new this.db.WhereClause(this,U);if(iU(U))return new this.db.WhereClause(this,`[${U.join("+")}]`);let Q=eU(U);if(Q.length===1)return this.where(Q[0]).equals(U[Q[0]]);let B=this.schema.indexes.concat(this.schema.primKey).filter(J=>J.compound&&Q.every(W=>J.keyPath.indexOf(W)>=0)&&J.keyPath.every(W=>Q.indexOf(W)>=0))[0];if(B&&this.db._maxKey!==RQ)return this.where(B.name).equals(B.keyPath.map(J=>U[J]));!B&&VF&&console.warn(`The query ${JSON.stringify(U)} on ${this.name} would benefit of a compound index [${Q.join("+")}]`);let{idxByName:R}=this.schema,V=this.db._deps.indexedDB;function d(J,W){try{return V.cmp(J,W)===0}catch{return!1}}let[l,n]=Q.reduce(([J,W],E)=>{let Z=R[E],e=U[E];return[J||Z,J||!Z?VQ(W,Z&&Z.multi?r=>{let c=kF(r,E);return iU(c)&&c.some(h=>d(e,h))}:r=>d(e,kF(r,E))):W]},[null,null]);return l?this.where(l.name).equals(U[l.keyPath]).filter(n):B?this.filter(n):this.where(Q).equals("")}filter(U){return this.toCollection().and(U)}count(U){return this.toCollection().count(U)}offset(U){return this.toCollection().offset(U)}limit(U){return this.toCollection().limit(U)}each(U){return this.toCollection().each(U)}toArray(U){return this.toCollection().toArray(U)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(U){return new this.db.Collection(new this.db.WhereClause(this,iU(U)?`[${U.join("+")}]`:U))}reverse(){return this.toCollection().reverse()}mapToClass(U){this.schema.mappedClass=U;let Q=B=>{if(!B)return B;let R=Object.create(U.prototype);for(var V in B)if(jU(B,V))try{R[V]=B[V]}catch{}return R};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=Q,this.hook("reading",Q),U}defineClass(){return this.mapToClass(function(U){GU(this,U)})}add(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=OR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"add",keys:Q!=null?[Q]:null,values:[V]})).then(d=>d.numFailures?b.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{AU(U,R,d)}catch{}return d})}update(U,Q){if(typeof U!="object"||iU(U))return this.where(":id").equals(U).modify(Q);{let B=kF(U,this.schema.primKey.keyPath);if(B===void 0)return TU(new K.InvalidArgument("Given object does not contain its primary key"));try{typeof Q!="function"?eU(Q).forEach(R=>{AU(U,R,Q[R])}):Q(U,{value:U,primKey:B})}catch{}return this.where(":id").equals(B).modify(Q)}}put(U,Q){let{auto:B,keyPath:R}=this.schema.primKey,V=U;return R&&B&&(V=OR(R)(U)),this._trans("readwrite",d=>this.core.mutate({trans:d,type:"put",values:[V],keys:Q!=null?[Q]:null})).then(d=>d.numFailures?b.reject(d.failures[0]):d.lastResult).then(d=>{if(R)try{AU(U,R,d)}catch{}return d})}delete(U){return this._trans("readwrite",Q=>this.core.mutate({trans:Q,type:"delete",keys:[U]})).then(Q=>Q.numFailures?b.reject(Q.failures[0]):void 0)}clear(){return this._trans("readwrite",U=>this.core.mutate({trans:U,type:"deleteRange",range:hn})).then(U=>U.numFailures?b.reject(U.failures[0]):void 0)}bulkGet(U){return this._trans("readonly",Q=>this.core.getMany({keys:U,trans:Q}).then(B=>B.map(R=>this.hook.reading.fire(R))))}bulkAdd(U,Q,B){let R=Array.isArray(Q)?Q:void 0,V=(B=B||(R?void 0:Q))?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new K.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new K.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(OR(n)):U;return this.core.mutate({trans:d,type:"add",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{if(E===0)return V?Z:e;throw new CB(`${this.name}.bulkAdd(): ${E} of ${J} operations failed`,r)})})}bulkPut(U,Q,B){let R=Array.isArray(Q)?Q:void 0,V=(B=B||(R?void 0:Q))?B.allKeys:void 0;return this._trans("readwrite",d=>{let{auto:l,keyPath:n}=this.schema.primKey;if(n&&R)throw new K.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(R&&R.length!==U.length)throw new K.InvalidArgument("Arguments objects and keys must have the same length");let J=U.length,W=n&&l?U.map(OR(n)):U;return this.core.mutate({trans:d,type:"put",keys:R,values:W,wantResults:V}).then(({numFailures:E,results:Z,lastResult:e,failures:r})=>{if(E===0)return V?Z:e;throw new CB(`${this.name}.bulkPut(): ${E} of ${J} operations failed`,r)})})}bulkDelete(U){let Q=U.length;return this._trans("readwrite",B=>this.core.mutate({trans:B,type:"delete",keys:U})).then(({numFailures:B,lastResult:R,failures:V})=>{if(B===0)return R;throw new CB(`${this.name}.bulkDelete(): ${B} of ${Q} operations failed`,V)})}};function YB(F){var U={},Q=function(l,n){if(n){for(var J=arguments.length,W=new Array(J-1);--J;)W[J-1]=arguments[J];return U[l].subscribe.apply(null,W),F}if(typeof l=="string")return U[l]};Q.addEventType=V;for(var B=1,R=arguments.length;BVQ(B(),U()):U,F.justLimit=Q&&!B}function HR(F,U){if(F.isPrimKey)return U.primaryKey;let Q=U.getIndexByKeyPath(F.index);if(!Q)throw new K.Schema("KeyPath "+F.index+" on object store "+U.name+" is not indexed");return Q}function rn(F,U,Q){let B=HR(F,U.schema);return U.openCursor({trans:Q,values:!F.keysOnly,reverse:F.dir==="prev",unique:!!F.unique,query:{index:B,range:F.range}})}function zR(F,U,Q,B){let R=F.replayFilter?VQ(F.filter,F.replayFilter()):F.filter;if(F.or){let V={},d=(l,n,J)=>{if(!R||R(n,J,Z=>n.stop(Z),Z=>n.fail(Z))){var W=n.primaryKey,E=""+W;E==="[object ArrayBuffer]"&&(E=""+new Uint8Array(W)),jU(V,E)||(V[E]=!0,U(l,n,J))}};return Promise.all([F.or._iterate(d,Q),Cn(rn(F,B,Q),F.algorithm,d,!F.keysOnly&&F.valueMapper)])}return Cn(rn(F,B,Q),VQ(F.algorithm,R),U,!F.keysOnly&&F.valueMapper)}function Cn(F,U,Q,B){var R=ZU(B?(V,d,l)=>Q(B(V),d,l):Q);return F.then(V=>{if(V)return V.start(()=>{var d=()=>V.continue();U&&!U(V,l=>d=l,l=>{V.stop(l),d=dU},l=>{V.fail(l),d=dU})||R(V.value,V,l=>d=l),d()})})}function bU(F,U){try{let Q=Dn(F),B=Dn(U);if(Q!==B)return Q==="Array"?1:B==="Array"?-1:Q==="binary"?1:B==="binary"?-1:Q==="string"?1:B==="string"?-1:Q==="Date"?1:B!=="Date"?NaN:-1;switch(Q){case"number":case"Date":case"string":return F>U?1:FzR(Q,U,B,Q.table.core))}count(U){return this._read(Q=>{let B=this._ctx,R=B.table.core;if(XQ(B,!0))return R.count({trans:Q,query:{index:HR(B,R.schema),range:B.range}}).then(d=>Math.min(d,B.limit));var V=0;return zR(B,()=>(++V,!1),Q,R).then(()=>V)}).then(U)}sortBy(U,Q){let B=U.split(".").reverse(),R=B[0],V=B.length-1;function d(J,W){return W?d(J[B[W]],W-1):J[R]}var l=this._ctx.dir==="next"?1:-1;function n(J,W){var E=d(J,V),Z=d(W,V);return EZ?l:0}return this.toArray(function(J){return J.sort(n)}).then(Q)}toArray(U){return this._read(Q=>{var B=this._ctx;if(B.dir==="next"&&XQ(B,!0)&&B.limit>0){let{valueMapper:R}=B,V=HR(B,B.table.core.schema);return B.table.core.query({trans:Q,limit:B.limit,values:!0,query:{index:V,range:B.range}}).then(({result:d})=>R?d.map(R):d)}{let R=[];return zR(B,V=>R.push(V),Q,B.table.core).then(()=>R)}},U)}offset(U){var Q=this._ctx;return U<=0||(Q.offset+=U,XQ(Q)?y0(Q,()=>{var B=U;return(R,V)=>B===0||(B===1?(--B,!1):(V(()=>{R.advance(B),B=0}),!1))}):y0(Q,()=>{var B=U;return()=>--B<0})),this}limit(U){return this._ctx.limit=Math.min(this._ctx.limit,U),y0(this._ctx,()=>{var Q=U;return function(B,R,V){return--Q<=0&&R(V),Q>=0}},!0),this}until(U,Q){return Y0(this._ctx,function(B,R,V){return!U(B.value)||(R(V),Q)}),this}first(U){return this.limit(1).toArray(function(Q){return Q[0]}).then(U)}last(U){return this.reverse().first(U)}filter(U){var Q,B;return Y0(this._ctx,function(R){return U(R.value)}),Q=this._ctx,B=U,Q.isMatch=VQ(Q.isMatch,B),this}and(U){return this.filter(U)}or(U){return new this.db.WhereClause(this._ctx.table,U,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.key,R)})}eachUniqueKey(U){return this._ctx.unique="unique",this.eachKey(U)}eachPrimaryKey(U){var Q=this._ctx;return Q.keysOnly=!Q.isMatch,this.each(function(B,R){U(R.primaryKey,R)})}keys(U){var Q=this._ctx;Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.key)}).then(function(){return B}).then(U)}primaryKeys(U){var Q=this._ctx;if(Q.dir==="next"&&XQ(Q,!0)&&Q.limit>0)return this._read(R=>{var V=HR(Q,Q.table.core.schema);return Q.table.core.query({trans:R,values:!1,limit:Q.limit,query:{index:V,range:Q.range}})}).then(({result:R})=>R).then(U);Q.keysOnly=!Q.isMatch;var B=[];return this.each(function(R,V){B.push(V.primaryKey)}).then(function(){return B}).then(U)}uniqueKeys(U){return this._ctx.unique="unique",this.keys(U)}firstKey(U){return this.limit(1).keys(function(Q){return Q[0]}).then(U)}lastKey(U){return this.reverse().firstKey(U)}distinct(){var U=this._ctx,Q=U.index&&U.table.schema.idxByName[U.index];if(!Q||!Q.multi)return this;var B={};return Y0(this._ctx,function(R){var V=R.primaryKey.toString(),d=jU(B,V);return B[V]=!0,!d}),this}modify(U){var Q=this._ctx;return this._write(B=>{var R;if(typeof U=="function")R=U;else{var V=eU(U),d=V.length;R=function(c){for(var h=!1,N=0;N{let{failures:N,numFailures:k}=h;Z+=c-k;for(let t of eU(N))E.push(N[t])};return this.clone().primaryKeys().then(c=>{let h=N=>{let k=Math.min(W,c.length-N);return l.getMany({trans:B,keys:c.slice(N,N+k),cache:"immutable"}).then(t=>{let S=[],a=[],T=n?[]:null,C=[];for(let p=0;p0&&l.mutate({trans:B,type:"add",values:S}).then(p=>{for(let o in p.failures)C.splice(parseInt(o),1);r(S.length,p)})).then(()=>(a.length>0||D&&typeof U=="object")&&l.mutate({trans:B,type:"put",keys:T,values:a,criteria:D,changeSpec:typeof U!="function"&&U}).then(p=>r(a.length,p))).then(()=>(C.length>0||D&&U===v0)&&l.mutate({trans:B,type:"delete",keys:C,criteria:D}).then(p=>r(C.length,p))).then(()=>c.length>N+k&&h(N+W))})};return h(0).then(()=>{if(E.length>0)throw new CR("Error modifying one or more objects",E,Z,e);return c.length})})})}delete(){var U=this._ctx,Q=U.range;return XQ(U)&&(U.isPrimKey&&!lN||Q.type===3)?this._write(B=>{let{primaryKey:R}=U.table.core.schema,V=Q;return U.table.core.count({trans:B,query:{index:R,range:V}}).then(d=>U.table.core.mutate({trans:B,type:"deleteRange",range:V}).then(({failures:l,lastResult:n,results:J,numFailures:W})=>{if(W)throw new CR("Could not delete some values",Object.keys(l).map(E=>l[E]),d-W);return d-W}))}):this.modify(v0)}},v0=(F,U)=>U.value=null;function nN(F,U){return FU?-1:F===U?0:1}function IU(F,U,Q){var B=F instanceof G0?new F.Collection(F):F;return B._ctx.error=Q?new Q(U):new TypeError(U),B}function OQ(F){return new F.Collection(F,()=>Mn("")).limit(0)}function WN(F,U,Q,B,R,V){for(var d=Math.min(F.length,B.length),l=-1,n=0;n=0?F.substr(0,l)+U[l]+Q.substr(l+1):null;R(F[n],J)<0&&(l=n)}return dtypeof c=="string"))return IU(F,"String expected.");function Z(c){R=function(N){return N==="next"?k=>k.toUpperCase():k=>k.toLowerCase()}(c),V=function(N){return N==="next"?k=>k.toLowerCase():k=>k.toUpperCase()}(c),d=c==="next"?nN:JN;var h=Q.map(function(N){return{lower:V(N),upper:R(N)}}).sort(function(N,k){return d(N.lower,k.lower)});l=h.map(function(N){return N.upper}),n=h.map(function(N){return N.lower}),J=c,W=c==="next"?"":B}Z("next");var e=new F.Collection(F,()=>OF(l[0],n[E-1]+B));e._ondirectionchange=function(c){Z(c)};var r=0;return e._addAlgorithm(function(c,h,N){var k=c.key;if(typeof k!="string")return!1;var t=V(k);if(U(t,n,r))return!0;for(var S=null,a=r;a0)&&(S=T)}return h(S!==null?function(){c.continue(S+W)}:N),!1}),e}function OF(F,U,Q,B){return{type:2,lower:F,upper:U,lowerOpen:Q,upperOpen:B}}function Mn(F){return{type:1,lower:F,upper:F}}var G0=class{get Collection(){return this._ctx.table.db.Collection}between(U,Q,B,R){B=B!==!1,R=R===!0;try{return this._cmp(U,Q)>0||this._cmp(U,Q)===0&&(B||R)&&(!B||!R)?OQ(this):new this.Collection(this,()=>OF(U,Q,!B,!R))}catch{return IU(this,hF)}}equals(U){return U==null?IU(this,hF):new this.Collection(this,()=>Mn(U))}above(U){return U==null?IU(this,hF):new this.Collection(this,()=>OF(U,void 0,!0))}aboveOrEqual(U){return U==null?IU(this,hF):new this.Collection(this,()=>OF(U,void 0,!1))}below(U){return U==null?IU(this,hF):new this.Collection(this,()=>OF(void 0,U,!1,!0))}belowOrEqual(U){return U==null?IU(this,hF):new this.Collection(this,()=>OF(void 0,U))}startsWith(U){return typeof U!="string"?IU(this,"String expected."):this.between(U,U+RQ,!0,!0)}startsWithIgnoreCase(U){return U===""?this.startsWith(U):uR(this,(Q,B)=>Q.indexOf(B[0])===0,[U],RQ)}equalsIgnoreCase(U){return uR(this,(Q,B)=>Q===B[0],[U],"")}anyOfIgnoreCase(){var U=aF.apply(YQ,arguments);return U.length===0?OQ(this):uR(this,(Q,B)=>B.indexOf(Q)!==-1,U,"")}startsWithAnyOfIgnoreCase(){var U=aF.apply(YQ,arguments);return U.length===0?OQ(this):uR(this,(Q,B)=>B.some(R=>Q.indexOf(R)===0),U,RQ)}anyOf(){let U=aF.apply(YQ,arguments),Q=this._cmp;try{U.sort(Q)}catch{return IU(this,hF)}if(U.length===0)return OQ(this);let B=new this.Collection(this,()=>OF(U[0],U[U.length-1]));B._ondirectionchange=V=>{Q=V==="next"?this._ascending:this._descending,U.sort(Q)};let R=0;return B._addAlgorithm((V,d,l)=>{let n=V.key;for(;Q(n,U[R])>0;)if(++R,R===U.length)return d(l),!1;return Q(n,U[R])===0||(d(()=>{V.continue(U[R])}),!1)}),B}notEqual(U){return this.inAnyRange([[-(1/0),U],[U,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let U=aF.apply(YQ,arguments);if(U.length===0)return new this.Collection(this);try{U.sort(this._ascending)}catch{return IU(this,hF)}let Q=U.reduce((B,R)=>B?B.concat([[B[B.length-1][1],R]]):[[-(1/0),R]],null);return Q.push([U[U.length-1],this.db._maxKey]),this.inAnyRange(Q,{includeLowers:!1,includeUppers:!1})}inAnyRange(U,Q){let B=this._cmp,R=this._ascending,V=this._descending,d=this._min,l=this._max;if(U.length===0)return OQ(this);if(!U.every(k=>k[0]!==void 0&&k[1]!==void 0&&R(k[0],k[1])<=0))return IU(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",K.InvalidArgument);let n=!Q||Q.includeLowers!==!1,J=Q&&Q.includeUppers===!0,W,E=R;function Z(k,t){return E(k[0],t[0])}try{W=U.reduce(function(k,t){let S=0,a=k.length;for(;S0){T[0]=d(T[0],t[0]),T[1]=l(T[1],t[1]);break}}return S===a&&k.push(t),k},[]),W.sort(Z)}catch{return IU(this,hF)}let e=0,r=J?k=>R(k,W[e][1])>0:k=>R(k,W[e][1])>=0,c=n?k=>V(k,W[e][0])>0:k=>V(k,W[e][0])>=0,h=r,N=new this.Collection(this,()=>OF(W[0][0],W[W.length-1][1],!n,!J));return N._ondirectionchange=k=>{k==="next"?(h=r,E=R):(h=c,E=V),W.sort(Z)},N._addAlgorithm((k,t,S)=>{for(var a=k.key;h(a);)if(++e,e===W.length)return t(S),!1;return!!function(T){return!r(T)&&!c(T)}(a)||(this._cmp(a,W[e][1])===0||this._cmp(a,W[e][0])===0||t(()=>{E===R?k.continue(W[e][0]):k.continue(W[e][1])}),!1)}),N}startsWithAnyOf(){let U=aF.apply(YQ,arguments);return U.every(Q=>typeof Q=="string")?U.length===0?OQ(this):this.inAnyRange(U.map(Q=>[Q,Q+RQ])):IU(this,"startsWithAnyOf() only works with strings")}};function dF(F){return ZU(function(U){return vB(U),F(U.target.error),!1})}function vB(F){F.stopPropagation&&F.stopPropagation(),F.preventDefault&&F.preventDefault()}var HF=YB(null,"storagemutated"),on=class{_lock(){return cB(!x.global),++this._reculock,this._reculock!==1||x.global||(x.lockOwnerFor=this),this}_unlock(){if(cB(!x.global),--this._reculock==0)for(x.global||(x.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var U=this._blockedFuncs.shift();try{bQ(U[1],U[0])}catch{}}return this}_locked(){return this._reculock&&x.lockOwnerFor!==this}create(U){if(!this.mode)return this;let Q=this.db.idbdb,B=this.db._state.dbOpenError;if(cB(!this.idbtrans),!U&&!Q)switch(B&&B.name){case"DatabaseClosedError":throw new K.DatabaseClosed(B);case"MissingAPIError":throw new K.MissingAPI(B.message,B);default:throw new K.OpenFailed(B)}if(!this.active)throw new K.TransactionInactive;return cB(this._completion._state===null),(U=this.idbtrans=U||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):Q.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ZU(R=>{vB(R),this._reject(U.error)}),U.onabort=ZU(R=>{vB(R),this.active&&this._reject(new K.Abort(U.error)),this.active=!1,this.on("abort").fire(R)}),U.oncomplete=ZU(()=>{this.active=!1,this._resolve(),"mutatedParts"in U&&HF.storagemutated.fire(U.mutatedParts)}),this}_promise(U,Q,B){if(U==="readwrite"&&this.mode!=="readwrite")return TU(new K.ReadOnly("Transaction is readonly"));if(!this.active)return TU(new K.TransactionInactive);if(this._locked())return new b((V,d)=>{this._blockedFuncs.push([()=>{this._promise(U,Q,B).then(V,d)},x])});if(B)return bF(()=>{var V=new b((d,l)=>{this._lock();let n=Q(d,l,this);n&&n.then&&n.then(d,l)});return V.finally(()=>this._unlock()),V._lib=!0,V});var R=new b((V,d)=>{var l=Q(V,d,this);l&&l.then&&l.then(V,d)});return R._lib=!0,R}_root(){return this.parent?this.parent._root():this}waitFor(U){var Q=this._root();let B=b.resolve(U);if(Q._waitingFor)Q._waitingFor=Q._waitingFor.then(()=>B);else{Q._waitingFor=B,Q._waitingQueue=[];var R=Q.idbtrans.objectStore(Q.storeNames[0]);(function d(){for(++Q._spinCount;Q._waitingQueue.length;)Q._waitingQueue.shift()();Q._waitingFor&&(R.get(-1/0).onsuccess=d)})()}var V=Q._waitingFor;return new b((d,l)=>{B.then(n=>Q._waitingQueue.push(ZU(d.bind(null,n))),n=>Q._waitingQueue.push(ZU(l.bind(null,n)))).finally(()=>{Q._waitingFor===V&&(Q._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new K.Abort))}table(U){let Q=this._memoizedTables||(this._memoizedTables={});if(jU(Q,U))return Q[U];let B=this.schema[U];if(!B)throw new K.NotFound("Table "+U+" not part of transaction");let R=new this.db.Table(U,B,this);return R.core=this.db.core.table(U),Q[U]=R,R}};function b0(F,U,Q,B,R,V,d){return{name:F,keyPath:U,unique:Q,multi:B,auto:R,compound:V,src:(Q&&!d?"&":"")+(B?"*":"")+(R?"++":"")+sn(U)}}function sn(F){return typeof F=="string"?F:F?"["+[].join.call(F,"+")+"]":""}function Yn(F,U,Q){return{name:F,primKey:U,indexes:Q,mappedClass:null,idxByName:Un(Q,B=>[B.name,B])}}var GB=F=>{try{return F.only([[]]),GB=()=>[[]],[[]]}catch{return GB=()=>RQ,RQ}};function X0(F){return F==null?()=>{}:typeof F=="string"?function(U){return U.split(".").length===1?Q=>Q[U]:Q=>kF(Q,U)}(F):U=>kF(U,F)}function yn(F){return[].slice.call(F)}var ZN=0;function bB(F){return F==null?":id":typeof F=="string"?F:`[${F.join("+")}]`}function NN(F,U,Q){function B(n){if(n.type===3)return null;if(n.type===4)throw new Error("Cannot convert never type to IDBKeyRange");let{lower:J,upper:W,lowerOpen:E,upperOpen:Z}=n;return J===void 0?W===void 0?null:U.upperBound(W,!!Z):W===void 0?U.lowerBound(J,!!E):U.bound(J,W,!!E,!!Z)}let{schema:R,hasGetAll:V}=function(n,J){let W=yn(n.objectStoreNames);return{schema:{name:n.name,tables:W.map(E=>J.objectStore(E)).map(E=>{let{keyPath:Z,autoIncrement:e}=E,r=iU(Z),c=Z==null,h={},N={name:E.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:c,compound:r,keyPath:Z,autoIncrement:e,unique:!0,extractKey:X0(Z)},indexes:yn(E.indexNames).map(k=>E.index(k)).map(k=>{let{name:t,unique:S,multiEntry:a,keyPath:T}=k,C={name:t,compound:iU(T),keyPath:T,unique:S,multiEntry:a,extractKey:X0(T)};return h[bB(T)]=C,C}),getIndexByKeyPath:k=>h[bB(k)]};return h[":id"]=N.primaryKey,Z!=null&&(h[bB(Z)]=N.primaryKey),N})},hasGetAll:W.length>0&&"getAll"in J.objectStore(W[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(F,Q),d=R.tables.map(n=>function(J){let W=J.name;return{name:W,schema:J,mutate:function({trans:E,type:Z,keys:e,values:r,range:c}){return new Promise((h,N)=>{h=ZU(h);let k=E.objectStore(W),t=k.keyPath==null,S=Z==="put"||Z==="add";if(!S&&Z!=="delete"&&Z!=="deleteRange")throw new Error("Invalid operation type: "+Z);let{length:a}=e||r||{length:1};if(e&&r&&e.length!==r.length)throw new Error("Given keys array must have same length as given values array.");if(a===0)return h({numFailures:0,failures:{},results:[],lastResult:void 0});let T,C=[],D=[],p=0,o=v=>{++p,vB(v)};if(Z==="deleteRange"){if(c.type===4)return h({numFailures:p,failures:D,results:[],lastResult:void 0});c.type===3?C.push(T=k.clear()):C.push(T=k.delete(B(c)))}else{let[v,y]=S?t?[r,e]:[r,null]:[e,null];if(S)for(let i=0;i{let y=v.target.result;C.forEach((i,w)=>i.error!=null&&(D[w]=i.error)),h({numFailures:p,failures:D,results:Z==="delete"?e:C.map(i=>i.result),lastResult:y})};T.onerror=v=>{o(v),s(v)},T.onsuccess=s})},getMany:({trans:E,keys:Z})=>new Promise((e,r)=>{e=ZU(e);let c=E.objectStore(W),h=Z.length,N=new Array(h),k,t=0,S=0,a=C=>{let D=C.target;N[D._pos]=D.result,++S===t&&e(N)},T=dF(r);for(let C=0;Cnew Promise((e,r)=>{e=ZU(e);let c=E.objectStore(W).get(Z);c.onsuccess=h=>e(h.target.result),c.onerror=dF(r)}),query:function(E){return Z=>new Promise((e,r)=>{e=ZU(e);let{trans:c,values:h,limit:N,query:k}=Z,t=N===1/0?void 0:N,{index:S,range:a}=k,T=c.objectStore(W),C=S.isPrimaryKey?T:T.index(S.name),D=B(a);if(N===0)return e({result:[]});if(E){let p=h?C.getAll(D,t):C.getAllKeys(D,t);p.onsuccess=o=>e({result:o.target.result}),p.onerror=dF(r)}else{let p=0,o=h||!("openKeyCursor"in C)?C.openCursor(D):C.openKeyCursor(D),s=[];o.onsuccess=v=>{let y=o.result;return y?(s.push(h?y.value:y.primaryKey),++p===N?e({result:s}):void y.continue()):e({result:s})},o.onerror=dF(r)}})}(V),openCursor:function({trans:E,values:Z,query:e,reverse:r,unique:c}){return new Promise((h,N)=>{h=ZU(h);let{index:k,range:t}=e,S=E.objectStore(W),a=k.isPrimaryKey?S:S.index(k.name),T=r?c?"prevunique":"prev":c?"nextunique":"next",C=Z||!("openKeyCursor"in a)?a.openCursor(B(t),T):a.openKeyCursor(B(t),T);C.onerror=dF(N),C.onsuccess=ZU(D=>{let p=C.result;if(!p)return void h(null);p.___id=++ZN,p.done=!1;let o=p.continue.bind(p),s=p.continuePrimaryKey;s&&(s=s.bind(p));let v=p.advance.bind(p),y=()=>{throw new Error("Cursor not stopped")};p.trans=E,p.stop=p.continue=p.continuePrimaryKey=p.advance=()=>{throw new Error("Cursor not started")},p.fail=ZU(N),p.next=function(){let i=1;return this.start(()=>i--?this.continue():this.stop()).then(()=>this)},p.start=i=>{let w=new Promise((L,M)=>{L=ZU(L),C.onerror=dF(M),p.fail=M,p.stop=m=>{p.stop=p.continue=p.continuePrimaryKey=p.advance=y,L(m)}}),g=()=>{if(C.result)try{i()}catch(L){p.fail(L)}else p.done=!0,p.start=()=>{throw new Error("Cursor behind last entry")},p.stop()};return C.onsuccess=ZU(L=>{C.onsuccess=g,g()}),p.continue=o,p.continuePrimaryKey=s,p.advance=v,g(),w},h(p)},N)})},count({query:E,trans:Z}){let{index:e,range:r}=E;return new Promise((c,h)=>{let N=Z.objectStore(W),k=e.isPrimaryKey?N:N.index(e.name),t=B(r),S=t?k.count(t):k.count();S.onsuccess=ZU(a=>c(a.target.result)),S.onerror=dF(h)})}}}(n)),l={};return d.forEach(n=>l[n.name]=n),{stack:"dbcore",transaction:F.transaction.bind(F),table(n){if(!l[n])throw new Error(`Table '${n}' not found`);return l[n]},MIN_KEY:-1/0,MAX_KEY:GB(U),schema:R}}function O0({_novip:F},U){let Q=U.db,B=function(R,V,{IDBKeyRange:d,indexedDB:l},n){return{dbcore:function(W,E){return E.reduce((Z,{create:e})=>z(z({},Z),e(Z)),W)}(NN(V,d,n),R.dbcore)}}(F._middlewares,Q,F._deps,U);F.core=B.dbcore,F.tables.forEach(R=>{let V=R.name;F.core.schema.tables.some(d=>d.name===V)&&(R.core=F.core.table(V),F[V]instanceof F.Table&&(F[V].core=R.core))})}function xR({_novip:F},U,Q,B){Q.forEach(R=>{let V=B[R];U.forEach(d=>{let l=J0(d,R);(!l||"value"in l&&l.value===void 0)&&(d===F.Transaction.prototype||d instanceof F.Transaction?eF(d,R,{get(){return this.table(R)},set(n){ql(this,R,{value:n,writable:!0,configurable:!0,enumerable:!0})}}):d[R]=new F.Table(R,V))})})}function H0({_novip:F},U){U.forEach(Q=>{for(let B in Q)Q[B]instanceof F.Table&&delete Q[B]})}function EN(F,U){return F._cfg.version-U._cfg.version}function tN(F,U,Q,B){let R=F._dbSchema,V=F._createTransaction("readwrite",F._storeNames,R);V.create(Q),V._completion.catch(B);let d=V._reject.bind(V),l=x.transless||x;bF(()=>{x.trans=V,x.transless=l,U===0?(eU(R).forEach(n=>{z0(Q,n,R[n].primKey,R[n].indexes)}),O0(F,Q),b.follow(()=>F.on.populate.fire(V)).catch(d)):function({_novip:n},J,W,E){let Z=[],e=n._versions,r=n._dbSchema=x0(n,n.idbdb,E),c=!1;function h(){return Z.length?b.resolve(Z.shift()(W.idbtrans)).then(h):b.resolve()}return e.filter(N=>N._cfg.version>=J).forEach(N=>{Z.push(()=>{let k=r,t=N._cfg.dbschema;w0(n,k,E),w0(n,t,E),r=n._dbSchema=t;let S=vn(k,t);S.add.forEach(T=>{z0(E,T[0],T[1].primKey,T[1].indexes)}),S.change.forEach(T=>{if(T.recreate)throw new K.Upgrade("Not yet support for changing primary key");{let C=E.objectStore(T.name);T.add.forEach(D=>u0(C,D)),T.change.forEach(D=>{C.deleteIndex(D.name),u0(C,D)}),T.del.forEach(D=>C.deleteIndex(D))}});let a=N._cfg.contentUpgrade;if(a&&N._cfg.version>J){O0(n,E),W._memoizedTables={},c=!0;let T=Fn(t);S.del.forEach(o=>{T[o]=k[o]}),H0(n,[n.Transaction.prototype]),xR(n,[n.Transaction.prototype],eU(T),T),W.schema=T;let C=E0(a),D;C&&GQ();let p=b.follow(()=>{if(D=a(W),D&&C){var o=TF.bind(null,null);D.then(o,o)}});return D&&typeof D.then=="function"?b.resolve(D):p.then(()=>D)}}),Z.push(k=>{(!c||!dN)&&function(t,S){[].slice.call(S.db.objectStoreNames).forEach(a=>t[a]==null&&S.db.deleteObjectStore(a))}(N._cfg.dbschema,k),H0(n,[n.Transaction.prototype]),xR(n,[n.Transaction.prototype],n._storeNames,n._dbSchema),W.schema=n._dbSchema})}),h().then(()=>{var N,k;k=E,eU(N=r).forEach(t=>{k.db.objectStoreNames.contains(t)||z0(k,t,N[t].primKey,N[t].indexes)})})}(F,U,V,Q).catch(d)})}function vn(F,U){let Q={del:[],add:[],change:[]},B;for(B in F)U[B]||Q.del.push(B);for(B in U){let R=F[B],V=U[B];if(R){let d={name:B,def:V,recreate:!1,del:[],add:[],change:[]};if(""+(R.primKey.keyPath||"")!=""+(V.primKey.keyPath||"")||R.primKey.auto!==V.primKey.auto&&!XR)d.recreate=!0,Q.change.push(d);else{let l=R.idxByName,n=V.idxByName,J;for(J in l)n[J]||d.del.push(J);for(J in n){let W=l[J],E=n[J];W?W.src!==E.src&&d.change.push(E):d.add.push(E)}(d.del.length>0||d.add.length>0||d.change.length>0)&&Q.change.push(d)}}else Q.add.push([B,V])}return Q}function z0(F,U,Q,B){let R=F.db.createObjectStore(U,Q.keyPath?{keyPath:Q.keyPath,autoIncrement:Q.auto}:{autoIncrement:Q.auto});return B.forEach(V=>u0(R,V)),R}function u0(F,U){F.createIndex(U.name,U.keyPath,{unique:U.unique,multiEntry:U.multi})}function x0(F,U,Q){let B={};return rR(U.objectStoreNames,0).forEach(R=>{let V=Q.objectStore(R),d=V.keyPath,l=b0(sn(d),d||"",!1,!1,!!V.autoIncrement,d&&typeof d!="string",!0),n=[];for(let W=0;W{if(U[B]!==null){var R=U[B].split(",").map((d,l)=>{let n=(d=d.trim()).replace(/([&*]|\+\+)/g,""),J=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return b0(n,J||null,/\&/.test(d),/\*/.test(d),/\+\+/.test(d),iU(J),l===0)}),V=R.shift();if(V.multi)throw new K.Schema("Primary key cannot be multi-valued");R.forEach(d=>{if(d.auto)throw new K.Schema("Only primary key can be marked as autoIncrement (++)");if(!d.keyPath)throw new K.Schema("Index must have a name and cannot be an empty string")}),Q[B]=Yn(B,V,R)}})}stores(U){let Q=this.db;this._cfg.storesSource=this._cfg.storesSource?GU(this._cfg.storesSource,U):U;let B=Q._versions,R={},V={};return B.forEach(d=>{GU(R,d._cfg.storesSource),V=d._cfg.dbschema={},d._parseStoresSpec(R,V)}),Q._dbSchema=V,H0(Q,[Q._allTables,Q,Q.Transaction.prototype]),xR(Q,[Q._allTables,Q,Q.Transaction.prototype,this._cfg.tables],eU(V),V),Q._storeNames=eU(V),this}upgrade(U){return this._cfg.contentUpgrade=k0(this._cfg.contentUpgrade||dU,U),this}};function L0(F,U){let Q=F._dbNamesDB;return Q||(Q=F._dbNamesDB=new zF("__dbnames",{addons:[],indexedDB:F,IDBKeyRange:U}),Q.version(1).stores({dbnames:"name"})),Q.table("dbnames")}function j0(F){return F&&typeof F.databases=="function"}function I0(F){return bF(function(){return x.letThrough=!0,F()})}function SN(){var F;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(U){var Q=function(){return indexedDB.databases().finally(U)};F=setInterval(Q,100),Q()}).finally(function(){return clearInterval(F)}):Promise.resolve()}function eN(F){let U=F._state,{indexedDB:Q}=F._deps;if(U.isBeingOpened||F.idbdb)return U.dbReadyPromise.then(()=>U.dbOpenError?TU(U.dbOpenError):F);VF&&(U.openCanceller._stackHolder=UQ()),U.isBeingOpened=!0,U.dbOpenError=null,U.openComplete=!1;let B=U.openCanceller;function R(){if(U.openCanceller!==B)throw new K.DatabaseClosed("db.open() was cancelled")}let V=U.dbReadyResolve,d=null,l=!1;return b.race([B,(typeof navigator=="undefined"?b.resolve():SN()).then(()=>new b((n,J)=>{if(R(),!Q)throw new K.MissingAPI;let W=F.name,E=U.autoSchema?Q.open(W):Q.open(W,Math.round(10*F.verno));if(!E)throw new K.MissingAPI;E.onerror=dF(J),E.onblocked=ZU(F._fireOnBlocked),E.onupgradeneeded=ZU(Z=>{if(d=E.transaction,U.autoSchema&&!F._options.allowEmptyDB){E.onerror=vB,d.abort(),E.result.close();let r=Q.deleteDatabase(W);r.onsuccess=r.onerror=ZU(()=>{J(new K.NoSuchDatabase(`Database ${W} doesnt exist`))})}else{d.onerror=dF(J);var e=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion;l=e<1,F._novip.idbdb=E.result,tN(F,e/10,d,J)}},J),E.onsuccess=ZU(()=>{d=null;let Z=F._novip.idbdb=E.result,e=rR(Z.objectStoreNames);if(e.length>0)try{let c=Z.transaction((r=e).length===1?r[0]:r,"readonly");U.autoSchema?function({_novip:h},N,k){h.verno=N.version/10;let t=h._dbSchema=x0(0,N,k);h._storeNames=rR(N.objectStoreNames,0),xR(h,[h._allTables],eU(t),t)}(F,Z,c):(w0(F,F._dbSchema,c),function(h,N){let k=vn(x0(0,h.idbdb,N),h._dbSchema);return!(k.add.length||k.change.some(t=>t.add.length||t.change.length))}(F,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),O0(F,c)}catch{}var r;sB.push(F),Z.onversionchange=ZU(c=>{U.vcFired=!0,F.on("versionchange").fire(c)}),Z.onclose=ZU(c=>{F.on("close").fire(c)}),l&&function({indexedDB:c,IDBKeyRange:h},N){!j0(c)&&N!=="__dbnames"&&L0(c,h).put({name:N}).catch(dU)}(F._deps,W),n()},J)}))]).then(()=>(R(),U.onReadyBeingFired=[],b.resolve(I0(()=>F.on.ready.fire(F.vip))).then(function n(){if(U.onReadyBeingFired.length>0){let J=U.onReadyBeingFired.reduce(k0,dU);return U.onReadyBeingFired=[],b.resolve(I0(()=>J(F.vip))).then(n)}}))).finally(()=>{U.onReadyBeingFired=null,U.isBeingOpened=!1}).then(()=>F).catch(n=>{U.dbOpenError=n;try{d&&d.abort()}catch{}return B===U.openCanceller&&F._close(),TU(n)}).finally(()=>{U.openComplete=!0,V()})}function f0(F){var U=V=>F.next(V),Q=R(U),B=R(V=>F.throw(V));function R(V){return d=>{var l=V(d),n=l.value;return l.done?n:n&&typeof n.then=="function"?n.then(Q,B):iU(n)?Promise.all(n).then(Q,B):Q(n)}}return R(U)()}function kN(F,U,Q){var B=arguments.length;if(B<2)throw new K.InvalidArgument("Too few arguments");for(var R=new Array(B-1);--B;)R[B-1]=arguments[B];Q=R.pop();var V=Qn(R);return[F,V,Q]}function bn(F,U,Q,B,R){return b.resolve().then(()=>{let V=x.transless||x,d=F._createTransaction(U,Q,F._dbSchema,B),l={trans:d,transless:V};if(B)d.idbtrans=B.idbtrans;else try{d.create(),F._state.PR1398_maxLoop=3}catch(E){return E.name===e0.InvalidState&&F.isOpen()&&--F._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),F._close(),F.open().then(()=>bn(F,U,Q,null,R))):TU(E)}let n=E0(R),J;n&&GQ();let W=b.follow(()=>{if(J=R.call(d,d),J)if(n){var E=TF.bind(null,null);J.then(E,E)}else typeof J.next=="function"&&typeof J.throw=="function"&&(J=f0(J))},l);return(J&&typeof J.then=="function"?b.resolve(J).then(E=>d.active?E:TU(new K.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):W.then(()=>J)).then(E=>(B&&d._resolve(),d._completion.then(()=>E))).catch(E=>(d._reject(E),TU(E)))})}function wR(F,U,Q){let B=iU(F)?F.slice():[F];for(let R=0;R0,N=_(z({},Z),{isVirtual:h,keyTail:E,keyLength:c,extractKey:X0(W),unique:!h&&Z.unique});return r.push(N),N.isPrimaryKey||V.push(N),c>1&&d(c===2?W[0]:W.slice(0,c-1),E+1,Z),r.sort((k,t)=>k.keyTail-t.keyTail),N}let l=d(B.primaryKey.keyPath,0,B.primaryKey);R[":id"]=[l];for(let W of B.indexes)d(W.keyPath,0,W);function n(W){let E=W.query.index;return E.isVirtual?_(z({},W),{query:{index:E,range:(Z=W.query.range,e=E.keyTail,{type:Z.type===1?2:Z.type,lower:wR(Z.lower,Z.lowerOpen?F.MAX_KEY:F.MIN_KEY,e),lowerOpen:!0,upper:wR(Z.upper,Z.upperOpen?F.MIN_KEY:F.MAX_KEY,e),upperOpen:!0})}}):W;var Z,e}return _(z({},Q),{schema:_(z({},B),{primaryKey:l,indexes:V,getIndexByKeyPath:function(W){let E=R[bB(W)];return E&&E[0]}}),count:W=>Q.count(n(W)),query:W=>Q.query(n(W)),openCursor(W){let{keyTail:E,isVirtual:Z,keyLength:e}=W.query.index;return Z?Q.openCursor(n(W)).then(r=>r&&function(c){return Object.create(c,{continue:{value:function(N){N!=null?c.continue(wR(N,W.reverse?F.MAX_KEY:F.MIN_KEY,E)):W.unique?c.continue(c.key.slice(0,e).concat(W.reverse?F.MIN_KEY:F.MAX_KEY,E)):c.continue()}},continuePrimaryKey:{value(N,k){c.continuePrimaryKey(wR(N,F.MAX_KEY,E),k)}},primaryKey:{get:()=>c.primaryKey},key:{get(){let N=c.key;return e===1?N[0]:N.slice(0,e)}},value:{get:()=>c.value}})}(r)):Q.openCursor(W)}})}})}};function K0(F,U,Q,B){return Q=Q||{},B=B||"",eU(F).forEach(R=>{if(jU(U,R)){var V=F[R],d=U[R];if(typeof V=="object"&&typeof d=="object"&&V&&d){let l=Z0(V);l!==Z0(d)?Q[B+R]=U[R]:l==="Object"?K0(V,d,Q,B+R+"."):V!==d&&(Q[B+R]=U[R])}else V!==d&&(Q[B+R]=U[R])}else Q[B+R]=void 0}),eU(U).forEach(R=>{jU(F,R)||(Q[B+R]=U[R])}),Q}var TN={stack:"dbcore",name:"HooksMiddleware",level:2,create:F=>_(z({},F),{table(U){let Q=F.table(U),{primaryKey:B}=Q.schema;return _(z({},Q),{mutate(V){let d=x.trans,{deleting:l,creating:n,updating:J}=d.table(U).hook;switch(V.type){case"add":if(n.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"put":if(n.fire===dU&&J.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"delete":if(l.fire===dU)break;return d._promise("readwrite",()=>W(V),!0);case"deleteRange":if(l.fire===dU)break;return d._promise("readwrite",()=>function(Z){return E(Z.trans,Z.range,1e4)}(V),!0)}return Q.mutate(V);function W(Z){let e=x.trans,r=Z.keys||function(c,h){return h.type==="delete"?h.keys:h.keys||h.values.map(c.extractKey)}(B,Z);if(!r)throw new Error("Keys missing");return(Z=Z.type==="add"||Z.type==="put"?_(z({},Z),{keys:r}):z({},Z)).type!=="delete"&&(Z.values=[...Z.values]),Z.keys&&(Z.keys=[...Z.keys]),function(c,h,N){return h.type==="add"?Promise.resolve([]):c.getMany({trans:h.trans,keys:N,cache:"immutable"})}(Q,Z,r).then(c=>{let h=r.map((N,k)=>{let t=c[k],S={onerror:null,onsuccess:null};if(Z.type==="delete")l.fire.call(S,N,t,e);else if(Z.type==="add"||t===void 0){let a=n.fire.call(S,N,Z.values[k],e);N==null&&a!=null&&(N=a,Z.keys[k]=N,B.outbound||AU(Z.values[k],B.keyPath,N))}else{let a=K0(t,Z.values[k]),T=J.fire.call(S,a,N,t,e);if(T){let C=Z.values[k];Object.keys(T).forEach(D=>{jU(C,D)?C[D]=T[D]:AU(C,D,T[D])})}}return S});return Q.mutate(Z).then(({failures:N,results:k,numFailures:t,lastResult:S})=>{for(let a=0;a(h.forEach(k=>k.onerror&&k.onerror(N)),Promise.reject(N)))})}function E(Z,e,r){return Q.query({trans:Z,values:!1,query:{index:B,range:e},limit:r}).then(({result:c})=>W({type:"delete",keys:c,trans:Z}).then(h=>h.numFailures>0?Promise.reject(h.failures[0]):c.length({table:U=>{let Q=F.table(U);return _(z({},Q),{getMany:B=>{if(!B.cache)return Q.getMany(B);let R=Xn(B.keys,B.trans._cache,B.cache==="clone");return R?b.resolve(R):Q.getMany(B).then(V=>(B.trans._cache={keys:B.keys,values:B.cache==="clone"?rB(V):V},V))},mutate:B=>(B.type!=="add"&&(B.trans._cache=null),Q.mutate(B))})}})};function g0(F){return!("from"in F)}var cF=function(F,U){if(!this){let Q=new cF;return F&&"d"in F&&GU(Q,F),Q}GU(this,arguments.length?{d:1,from:F,to:arguments.length>1?U:F}:{d:0})};function XB(F,U,Q){let B=bU(U,Q);if(isNaN(B))return;if(B>0)throw RangeError();if(g0(F))return GU(F,{from:U,to:Q,d:1});let R=F.l,V=F.r;if(bU(Q,F.from)<0)return R?XB(R,U,Q):F.l={from:U,to:Q,d:1,l:null,r:null},On(F);if(bU(U,F.to)>0)return V?XB(V,U,Q):F.r={from:U,to:Q,d:1,l:null,r:null},On(F);bU(U,F.from)<0&&(F.from=U,F.l=null,F.d=V?V.d+1:1),bU(Q,F.to)>0&&(F.to=Q,F.r=null,F.d=F.l?F.l.d+1:1);let d=!F.r;R&&!F.l&&LR(F,R),V&&d&&LR(F,V)}function LR(F,U){g0(U)||function Q(B,{from:R,to:V,l:d,r:l}){XB(B,R,V),d&&Q(B,d),l&&Q(B,l)}(F,U)}function P0(F){let U=g0(F)?null:{s:0,n:F};return{next(Q){let B=arguments.length>0;for(;U;)switch(U.s){case 0:if(U.s=1,B)for(;U.n.l&&bU(Q,U.n.from)<0;)U={up:U,n:U.n.l,s:1};else for(;U.n.l;)U={up:U,n:U.n.l,s:1};case 1:if(U.s=2,!B||bU(Q,U.n.to)<=0)return{value:U.n,done:!1};case 2:if(U.n.r){U.s=3,U={up:U,n:U.n.r,s:0};continue}case 3:U=U.up}return{done:!0}}}}function On(F){var U,Q;let B=(((U=F.r)===null||U===void 0?void 0:U.d)||0)-(((Q=F.l)===null||Q===void 0?void 0:Q.d)||0),R=B>1?"r":B<-1?"l":"";if(R){let V=R==="r"?"l":"r",d=z({},F),l=F[R];F.from=l.from,F.to=l.to,F[R]=l[R],d[R]=l[V],F[V]=d,d.d=Hn(d)}F.d=Hn(F)}function Hn({r:F,l:U}){return(F?U?Math.max(F.d,U.d):F.d:U?U.d:0)+1}iQ(cF.prototype,{add(F){return LR(this,F),this},addKey(F){return XB(this,F,F),this},addKeys(F){return F.forEach(U=>XB(this,U,U)),this},[N0](){return P0(this)}});var cN={stack:"dbcore",level:0,create:F=>{let U=F.schema.name,Q=new cF(F.MIN_KEY,F.MAX_KEY);return _(z({},F),{table:B=>{let R=F.table(B),{schema:V}=R,{primaryKey:d}=V,{extractKey:l,outbound:n}=d,J=_(z({},R),{mutate:Z=>{let e=Z.trans,r=e.mutatedParts||(e.mutatedParts={}),c=T=>{let C=`idb://${U}/${B}/${T}`;return r[C]||(r[C]=new cF)},h=c(""),N=c(":dels"),{type:k}=Z,[t,S]=Z.type==="deleteRange"?[Z.range]:Z.type==="delete"?[Z.keys]:Z.values.length<50?[[],Z.values]:[],a=Z.trans._cache;return R.mutate(Z).then(T=>{if(iU(t)){k!=="delete"&&(t=T.results),h.addKeys(t);let C=Xn(t,a);C||k==="add"||N.addKeys(t),(C||S)&&function(D,p,o,s){function v(y){let i=D(y.name||"");function w(L){return L!=null?y.extractKey(L):null}let g=L=>y.multiEntry&&iU(L)?L.forEach(M=>i.addKey(M)):i.addKey(L);(o||s).forEach((L,M)=>{let m=o&&w(o[M]),Y=s&&w(s[M]);bU(m,Y)!==0&&(m!=null&&g(m),Y!=null&&g(Y))})}p.indexes.forEach(v)}(c,V,C,S)}else if(t){let C={from:t.lower,to:t.upper};N.add(C),h.add(C)}else h.add(Q),N.add(Q),V.indexes.forEach(C=>c(C.name).add(Q));return T})}}),W=({query:{index:Z,range:e}})=>{var r,c;return[Z,new cF((r=e.lower)!==null&&r!==void 0?r:F.MIN_KEY,(c=e.upper)!==null&&c!==void 0?c:F.MAX_KEY)]},E={get:Z=>[d,new cF(Z.key)],getMany:Z=>[d,new cF().addKeys(Z.keys)],count:W,query:W,openCursor:W};return eU(E).forEach(Z=>{J[Z]=function(e){let{subscr:r}=x;if(r){let c=S=>{let a=`idb://${U}/${B}/${S}`;return r[a]||(r[a]=new cF)},h=c(""),N=c(":dels"),[k,t]=E[Z](e);if(c(k.name||"").add(t),!k.isPrimaryKey){if(Z!=="count"){let S=Z==="query"&&n&&e.values&&R.query(_(z({},e),{values:!1}));return R[Z].apply(this,arguments).then(a=>{if(Z==="query"){if(n&&e.values)return S.then(({result:C})=>(h.addKeys(C),a));let T=e.values?a.result.map(l):a.result;e.values?h.addKeys(T):N.addKeys(T)}else if(Z==="openCursor"){let T=a,C=e.values;return T&&Object.create(T,{key:{get:()=>(N.addKey(T.primaryKey),T.key)},primaryKey:{get(){let D=T.primaryKey;return N.addKey(D),D}},value:{get:()=>(C&&h.addKey(T.primaryKey),T.value)}})}return a})}N.add(Q)}}return R[Z].apply(this,arguments)}}),J}})}},zF=class{constructor(U,Q){this._middlewares={},this.verno=0;let B=zF.dependencies;this._options=Q=z({addons:zF.addons,autoOpen:!0,indexedDB:B.indexedDB,IDBKeyRange:B.IDBKeyRange},Q),this._deps={indexedDB:Q.indexedDB,IDBKeyRange:Q.IDBKeyRange};let{addons:R}=Q;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let V={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:dU,dbReadyPromise:null,cancelOpen:dU,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var d;V.dbReadyPromise=new b(l=>{V.dbReadyResolve=l}),V.openCanceller=new b((l,n)=>{V.cancelOpen=n}),this._state=V,this.name=U,this.on=YB(this,"populate","blocked","versionchange","close",{ready:[k0,dU]}),this.on.ready.subscribe=Al(this.on.ready.subscribe,l=>(n,J)=>{zF.vip(()=>{let W=this._state;if(W.openComplete)W.dbOpenError||b.resolve().then(n),J&&l(n);else if(W.onReadyBeingFired)W.onReadyBeingFired.push(n),J&&l(n);else{l(n);let E=this;J||l(function Z(){E.on.ready.unsubscribe(n),E.on.ready.unsubscribe(Z)})}})}),this.Collection=(d=this,yB(mn.prototype,function(l,n){this.db=d;let J=hn,W=null;if(n)try{J=n()}catch(r){W=r}let E=l._ctx,Z=E.table,e=Z.hook.reading.fire;this._ctx={table:Z,index:E.index,isPrimKey:!E.index||Z.schema.primKey.keyPath&&E.index===Z.schema.primKey.name,range:J,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:W,or:E.or,valueMapper:e!==DB?e:null}})),this.Table=function(l){return yB(cn.prototype,function(n,J,W){this.db=l,this._tx=W,this.name=n,this.schema=J,this.hook=l._allTables[n]?l._allTables[n].hook:YB(null,{creating:[_Z,dU],reading:[PZ,DB],updating:[AZ,dU],deleting:[qZ,dU]})})}(this),this.Transaction=function(l){return yB(on.prototype,function(n,J,W,E,Z){this.db=l,this.mode=n,this.storeNames=J,this.schema=W,this.chromeTransactionDurability=E,this.idbtrans=null,this.on=YB(this,"complete","error","abort"),this.parent=Z||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new b((e,r)=>{this._resolve=e,this._reject=r}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var r=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):r&&this.idbtrans&&this.idbtrans.abort(),TU(e)})})}(this),this.Version=function(l){return yB(Gn.prototype,function(n){this.db=l,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(l){return yB(G0.prototype,function(n,J,W){this.db=l,this._ctx={table:n,index:J===":id"?null:J,or:W};let E=l._deps.indexedDB;if(!E)throw new K.MissingAPI;this._cmp=this._ascending=E.cmp.bind(E),this._descending=(Z,e)=>E.cmp(e,Z),this._max=(Z,e)=>E.cmp(Z,e)>0?Z:e,this._min=(Z,e)=>E.cmp(Z,e)<0?Z:e,this._IDBKeyRange=l._deps.IDBKeyRange})}(this),this.on("versionchange",l=>{l.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",l=>{!l.newVersion||l.newVersionnew this.Transaction(l,n,J,this._options.chromeTransactionDurability,W),this._fireOnBlocked=l=>{this.on("blocked").fire(l),sB.filter(n=>n.name===this.name&&n!==this&&!n._state.vcFired).map(n=>n.on("versionchange").fire(l))},this.use(aN),this.use(TN),this.use(cN),this.use(hN),this.vip=Object.create(this,{_vip:{value:!0}}),R.forEach(l=>l(this))}version(U){if(isNaN(U)||U<.1)throw new K.Type("Given version is not a positive number");if(U=Math.round(10*U)/10,this.idbdb||this._state.isBeingOpened)throw new K.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,U);let Q=this._versions;var B=Q.filter(R=>R._cfg.version===U)[0];return B||(B=new this.Version(U),Q.push(B),Q.sort(EN),B.stores({}),this._state.autoSchema=!1,B)}_whenReady(U){return this.idbdb&&(this._state.openComplete||x.letThrough||this._vip)?U():new b((Q,B)=>{if(this._state.openComplete)return B(new K.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void B(new K.DatabaseClosed);this.open().catch(dU)}this._state.dbReadyPromise.then(Q,B)}).then(U)}use({stack:U,create:Q,level:B,name:R}){R&&this.unuse({stack:U,name:R});let V=this._middlewares[U]||(this._middlewares[U]=[]);return V.push({stack:U,create:Q,level:B??10,name:R}),V.sort((d,l)=>d.level-l.level),this}unuse({stack:U,name:Q,create:B}){return U&&this._middlewares[U]&&(this._middlewares[U]=this._middlewares[U].filter(R=>B?R.create!==B:!!Q&&R.name!==Q)),this}open(){return eN(this)}_close(){let U=this._state,Q=sB.indexOf(this);if(Q>=0&&sB.splice(Q,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}U.dbReadyPromise=new b(B=>{U.dbReadyResolve=B}),U.openCanceller=new b((B,R)=>{U.cancelOpen=R})}close(){this._close();let U=this._state;this._options.autoOpen=!1,U.dbOpenError=new K.DatabaseClosed,U.isBeingOpened&&U.cancelOpen(U.dbOpenError)}delete(){let U=arguments.length>0,Q=this._state;return new b((B,R)=>{let V=()=>{this.close();var d=this._deps.indexedDB.deleteDatabase(this.name);d.onsuccess=ZU(()=>{(function({indexedDB:l,IDBKeyRange:n},J){!j0(l)&&J!=="__dbnames"&&L0(l,n).delete(J).catch(dU)})(this._deps,this.name),B()}),d.onerror=dF(R),d.onblocked=this._fireOnBlocked};if(U)throw new K.InvalidArgument("Arguments not allowed in db.delete()");Q.isBeingOpened?Q.dbReadyPromise.then(V):V()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){let U=this._state.dbOpenError;return U&&U.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return eU(this._allTables).map(U=>this._allTables[U])}transaction(){let U=kN.apply(this,arguments);return this._transaction.apply(this,U)}_transaction(U,Q,B){let R=x.trans;R&&R.db===this&&U.indexOf("!")===-1||(R=null);let V=U.indexOf("?")!==-1,d,l;U=U.replace("!","").replace("?","");try{if(l=Q.map(J=>{var W=J instanceof this.Table?J.name:J;if(typeof W!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),U=="r"||U==="readonly")d="readonly";else{if(U!="rw"&&U!="readwrite")throw new K.InvalidArgument("Invalid transaction mode: "+U);d="readwrite"}if(R){if(R.mode==="readonly"&&d==="readwrite"){if(!V)throw new K.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");R=null}R&&l.forEach(J=>{if(R&&R.storeNames.indexOf(J)===-1){if(!V)throw new K.SubTransaction("Table "+J+" not included in parent transaction.");R=null}}),V&&R&&!R.active&&(R=null)}}catch(J){return R?R._promise(null,(W,E)=>{E(J)}):TU(J)}let n=bn.bind(null,this,d,l,R,B);return R?R._promise(d,n,"lock"):x.trans?bQ(x.transless,()=>this._whenReady(n)):this._whenReady(n)}table(U){if(!jU(this._allTables,U))throw new K.InvalidTable(`Table ${U} does not exist`);return this._allTables[U]}},rN=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",zn=class{constructor(U){this._subscribe=U}subscribe(U,Q,B){return this._subscribe(U&&typeof U!="function"?U:{next:U,error:Q,complete:B})}[rN](){return this}};function un(F,U){return eU(U).forEach(Q=>{LR(F[Q]||(F[Q]=new cF),U[Q])}),F}var _0;try{_0={indexedDB:JU.indexedDB||JU.mozIndexedDB||JU.webkitIndexedDB||JU.msIndexedDB,IDBKeyRange:JU.IDBKeyRange||JU.webkitIDBKeyRange}}catch{_0={indexedDB:null,IDBKeyRange:null}}var dQ=zF;function jR(F){let U=rF;try{rF=!0,HF.storagemutated.fire(F)}finally{rF=U}}iQ(dQ,_(z({},DR),{delete:F=>new dQ(F,{addons:[]}).delete(),exists:F=>new dQ(F,{addons:[]}).open().then(U=>(U.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(F){try{return function({indexedDB:U,IDBKeyRange:Q}){return j0(U)?Promise.resolve(U.databases()).then(B=>B.map(R=>R.name).filter(R=>R!=="__dbnames")):L0(U,Q).toCollection().primaryKeys()}(dQ.dependencies).then(F)}catch{return TU(new K.MissingAPI)}},defineClass:()=>function(F){GU(this,F)},ignoreTransaction:F=>x.trans?bQ(x.transless,F):F(),vip:I0,async:function(F){return function(){try{var U=f0(F.apply(this,arguments));return U&&typeof U.then=="function"?U:b.resolve(U)}catch(Q){return TU(Q)}}},spawn:function(F,U,Q){try{var B=f0(F.apply(Q,U||[]));return B&&typeof B.then=="function"?B:b.resolve(B)}catch(R){return TU(R)}},currentTransaction:{get:()=>x.trans||null},waitFor:function(F,U){let Q=b.resolve(typeof F=="function"?dQ.ignoreTransaction(F):F).timeout(U||6e4);return x.trans?x.trans.waitFor(Q):Q},Promise:b,debug:{get:()=>VF,set:F=>{Rn(F,F==="dexie"?()=>!0:Tn)}},derive:sQ,extend:GU,props:iQ,override:Al,Events:YB,on:HF,liveQuery:function(F){return new zn(U=>{let Q=E0(F),B=!1,R={},V={},d={get closed(){return B},unsubscribe:()=>{B=!0,HF.storagemutated.unsubscribe(W)}};U.start&&U.start(d);let l=!1,n=!1;function J(){return eU(V).some(Z=>R[Z]&&function(e,r){let c=P0(r),h=c.next();if(h.done)return!1;let N=h.value,k=P0(e),t=k.next(N.from),S=t.value;for(;!h.done&&!t.done;){if(bU(S.from,N.to)<=0&&bU(S.to,N.from)>=0)return!0;bU(N.from,S.from)<0?N=(h=c.next(S.from)).value:S=(t=k.next(N.from)).value}return!1}(R[Z],V[Z]))}let W=Z=>{un(R,Z),J()&&E()},E=()=>{if(l||B)return;R={};let Z={},e=function(r){Q&&GQ();let c=()=>bF(F,{subscr:r,trans:null}),h=x.trans?bQ(x.transless,c):c();return Q&&h.then(TF,TF),h}(Z);n||(HF("storagemutated",W),n=!0),l=!0,Promise.resolve(e).then(r=>{l=!1,B||(J()?E():(R={},V=Z,U.next&&U.next(r)))},r=>{l=!1,U.error&&U.error(r),d.unsubscribe()})};return E(),d})},extendObservabilitySet:un,getByKeyPath:kF,setByKeyPath:AU,delByKeyPath:function(F,U){typeof U=="string"?AU(F,U,void 0):"length"in U&&[].map.call(U,function(Q){AU(F,Q,void 0)})},shallowClone:Fn,deepClone:rB,getObjectDiff:K0,cmp:bU,asap:$l,minKey:-(1/0),addons:[],connections:sB,errnames:e0,dependencies:_0,semVer:"3.2.2",version:"3.2.2".split(".").map(F=>parseInt(F)).reduce((F,U,Q)=>F+U/Math.pow(10,2*Q))})),dQ.maxKey=GB(dQ.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(HF("storagemutated",F=>{if(!rF){let U;XR?(U=document.createEvent("CustomEvent"),U.initCustomEvent("x-storagemutated-1",!0,!0,F)):U=new CustomEvent("x-storagemutated-1",{detail:F}),rF=!0,dispatchEvent(U),rF=!1}}),addEventListener("x-storagemutated-1",({detail:F})=>{rF||jR(F)}));var rF=!1;if(typeof BroadcastChannel!="undefined"){let F=new BroadcastChannel("x-storagemutated-1");HF("storagemutated",U=>{rF||F.postMessage(U)}),F.onmessage=U=>{U.data&&jR(U.data)}}else if(typeof self!="undefined"&&typeof navigator!="undefined"){HF("storagemutated",U=>{try{rF||(typeof localStorage!="undefined"&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:U})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(Q=>Q.postMessage({type:"x-storagemutated-1",changedParts:U})))}catch{}}),typeof addEventListener!="undefined"&&addEventListener("storage",U=>{if(U.key==="x-storagemutated-1"){let Q=JSON.parse(U.newValue);Q&&jR(Q.changedParts)}});let F=self.document&&navigator.serviceWorker;F&&F.addEventListener("message",function({data:U}){U&&U.type==="x-storagemutated-1"&&jR(U.changedParts)})}b.rejectionMapper=function(F,U){if(!F||F instanceof yQ||F instanceof TypeError||F instanceof SyntaxError||!F.name||!nn[F.name])return F;var Q=new nn[F.name](U||F.message,F);return"stack"in F&&eF(Q,"stack",{get:function(){return this.inner.stack}}),Q},Rn(VF,Tn);var CF=new class extends zF{constructor(){super("obsidian-text-extract/cache/"+app.appId),this.version(3).stores({pdf:"path, hash, size",images:"path, hash, size"}),this.clearOldDatabases()}clearOldDatabases(){indexedDB.deleteDatabase("obsidian-text-extract/cache")}},xn=class{value;next;constructor(U){this.value=U}},wn=class{#U;#F;#Q;constructor(){this.clear()}enqueue(U){let Q=new xn(U);this.#U?(this.#F.next=Q,this.#F=Q):(this.#U=Q,this.#F=Q),this.#Q++}dequeue(){let U=this.#U;if(U)return this.#U=this.#U.next,this.#Q--,U.value}clear(){this.#U=void 0,this.#F=void 0,this.#Q=0}get size(){return this.#Q}*[Symbol.iterator](){let U=this.#U;for(;U;)yield U.value,U=U.next}},Ln=TB.Platform.isMobileApp?1:require("os").cpus().length,IR=Math.max(1,Math.floor(.7*Ln));IR==Ln&&(IR=1);var q0=Symbol.for("be.scambier.obsidian-text-extract");globalThis[q0]||(console.info("Text Extract - Number of available workers: "+IR),globalThis[q0]=function(F){if(!Number.isInteger(F)&&F!==Number.POSITIVE_INFINITY||!(F>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let U=new wn,Q=0,B=async(V,d,l)=>{Q++;let n=(async()=>V(...l))();d(n);try{await n}catch{}Q--,U.size>0&&U.dequeue()()},R=(V,...d)=>new Promise(l=>{((n,J,W)=>{U.enqueue(B.bind(void 0,n,J,W)),(async()=>{await Promise.resolve(),Q0&&U.dequeue()()})()})(V,l,d)});return Object.defineProperties(R,{activeCount:{get:()=>Q},pendingCount:{get:()=>U.size},clearQueue:{value:()=>{U.clear()}}}),R}(IR));var jn=globalThis[q0],lQ=class{constructor(U){this.worker=U,this.running=!1}static getWorker(){let U=lQ.pool.find(B=>!B.running);if(U)return U;let Q=new lQ(new HZ({name:"PDF Text Extractor"}));return lQ.pool.push(Q),Q}async run(U){return new Promise((Q,B)=>{this.running=!0;let R=setTimeout(()=>{this.worker.terminate(),console.warn("Omnisearch - Worker timeout"),B("timeout"),this.running=!1},12e4);this.worker.postMessage(U),this.worker.onmessage=V=>{clearTimeout(R),Q(V),this.running=!1}})}};lQ.pool=[];var In=new class{async getPdfText(F){return TB.Platform.isMobile?"":jn(this._getPdfText,F)}async _getPdfText(F){let U=await CF.pdf.get({path:F.path,size:F.stat.size});if(U)return U.text;let Q=new Uint8Array(await app.vault.readBinary(F)),B=_l(Q),R=await CF.pdf.get(B);if(R)return R.text;let V=lQ.getWorker();return new Promise(async(d,l)=>{try{let n=(await V.run({data:Q,name:F.basename})).data.text.replace(/\n/g," ").replace(/ +/g," ").trim();CF.pdf.add({hash:B,text:n,path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d(n)})}catch{CF.pdf.add({hash:B,text:"",path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d("")})}})}async cleanCache(){CF.pdf.each(async F=>{await app.vault.adapter.exists(F.path)||console.log(F.path+" does not exist")})}};(function(F){var U=function(Q){var B,R=Object.prototype,V=R.hasOwnProperty,d=Object.defineProperty||function(M,m,Y){M[m]=Y.value},l=typeof Symbol=="function"?Symbol:{},n=l.iterator||"@@iterator",J=l.asyncIterator||"@@asyncIterator",W=l.toStringTag||"@@toStringTag";function E(M,m,Y){return Object.defineProperty(M,m,{value:Y,enumerable:!0,configurable:!0,writable:!0}),M[m]}try{E({},"")}catch{E=function(m,Y,I){return m[Y]=I}}function Z(M,m,Y,I){var X=m&&m.prototype instanceof k?m:k,lU=Object.create(X.prototype),EU=new w(I||[]);return d(lU,"_invoke",{value:s(M,Y,EU)}),lU}function e(M,m,Y){try{return{type:"normal",arg:M.call(m,Y)}}catch(I){return{type:"throw",arg:I}}}Q.wrap=Z;var r="suspendedStart",c="executing",h="completed",N={};function k(){}function t(){}function S(){}var a={};E(a,n,function(){return this});var T=Object.getPrototypeOf,C=T&&T(T(g([])));C&&C!==R&&V.call(C,n)&&(a=C);var D=S.prototype=k.prototype=Object.create(a);function p(M){["next","throw","return"].forEach(function(m){E(M,m,function(Y){return this._invoke(m,Y)})})}function o(M,m){function Y(X,lU,EU,zU){var uU=e(M[X],M,lU);if(uU.type!=="throw"){var ZQ=uU.arg,xQ=ZQ.value;return xQ&&typeof xQ=="object"&&V.call(xQ,"__await")?m.resolve(xQ.__await).then(function(xF){Y("next",xF,EU,zU)},function(xF){Y("throw",xF,EU,zU)}):m.resolve(xQ).then(function(xF){ZQ.value=xF,EU(ZQ)},function(xF){return Y("throw",xF,EU,zU)})}zU(uU.arg)}var I;d(this,"_invoke",{value:function(X,lU){function EU(){return new m(function(zU,uU){Y(X,lU,zU,uU)})}return I=I?I.then(EU,EU):EU()}})}function s(M,m,Y){var I=r;return function(X,lU){if(I===c)throw new Error("Generator is already running");if(I===h){if(X==="throw")throw lU;return L()}for(Y.method=X,Y.arg=lU;;){var EU=Y.delegate;if(EU){var zU=v(EU,Y);if(zU){if(zU===N)continue;return zU}}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(I===r)throw I=h,Y.arg;Y.dispatchException(Y.arg)}else Y.method==="return"&&Y.abrupt("return",Y.arg);I=c;var uU=e(M,m,Y);if(uU.type==="normal"){if(I=Y.done?h:"suspendedYield",uU.arg===N)continue;return{value:uU.arg,done:Y.done}}uU.type==="throw"&&(I=h,Y.method="throw",Y.arg=uU.arg)}}}function v(M,m){var Y=M.iterator[m.method];if(Y===B){if(m.delegate=null,m.method==="throw"){if(M.iterator.return&&(m.method="return",m.arg=B,v(M,m),m.method==="throw"))return N;m.method="throw",m.arg=new TypeError("The iterator does not provide a 'throw' method")}return N}var I=e(Y,M.iterator,m.arg);if(I.type==="throw")return m.method="throw",m.arg=I.arg,m.delegate=null,N;var X=I.arg;return X?X.done?(m[M.resultName]=X.value,m.next=M.nextLoc,m.method!=="return"&&(m.method="next",m.arg=B),m.delegate=null,N):X:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,N)}function y(M){var m={tryLoc:M[0]};1 in M&&(m.catchLoc=M[1]),2 in M&&(m.finallyLoc=M[2],m.afterLoc=M[3]),this.tryEntries.push(m)}function i(M){var m=M.completion||{};m.type="normal",delete m.arg,M.completion=m}function w(M){this.tryEntries=[{tryLoc:"root"}],M.forEach(y,this),this.reset(!0)}function g(M){if(M){var m=M[n];if(m)return m.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var Y=-1,I=function X(){for(;++Y=0;--I){var X=this.tryEntries[I],lU=X.completion;if(X.tryLoc==="root")return Y("end");if(X.tryLoc<=this.prev){var EU=V.call(X,"catchLoc"),zU=V.call(X,"finallyLoc");if(EU&&zU){if(this.prev=0;--Y){var I=this.tryEntries[Y];if(I.tryLoc<=this.prev&&V.call(I,"finallyLoc")&&this.prev=0;--m){var Y=this.tryEntries[m];if(Y.finallyLoc===M)return this.complete(Y.completion,Y.afterLoc),i(Y),N}},catch:function(M){for(var m=this.tryEntries.length-1;m>=0;--m){var Y=this.tryEntries[m];if(Y.tryLoc===M){var I=Y.completion;if(I.type==="throw"){var X=I.arg;i(Y)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(M,m,Y){return this.delegate={iterator:g(M),resultName:m,nextLoc:Y},this.method==="next"&&(this.arg=B),N}},Q}(F.exports);try{regeneratorRuntime=U}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=U:Function("r","regeneratorRuntime = r")(U)}})({exports:{}});var A0=(F,U)=>`${F}-${U}-${Math.random().toString(16).slice(3,8)}`,CN=A0,fn=0,Kn=({id:F,action:U,payload:Q={}})=>{let B=F;return B===void 0&&(B=CN("Job",fn),fn+=1),{id:B,action:U,payload:Q}},HQ={},$0=!1;HQ.logging=$0,HQ.setLogging=F=>{$0=F},HQ.log=(...F)=>$0?console.log.apply(void 0,F):null;var DN=Kn,{log:fR}=HQ,pN=A0,gn=0,mN=function(){return typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||!(typeof process=="undefined"||typeof process.versions!="object"||!process.versions.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0},Pn,_n={exports:{}};function Ud(){return Pn?_n.exports:(Pn=1,_n.exports=function(){function F(){var U=arguments.length;if(U===0)throw new Error("resolveUrl requires at least one argument; got none.");var Q=document.createElement("base");if(Q.href=arguments[0],U===1)return Q.href;var B=document.getElementsByTagName("head")[0];B.insertBefore(Q,B.firstChild);for(var R,V=document.createElement("a"),d=1;d{let U={};return typeof WorkerGlobalScope!="undefined"?U.type="webworker":mN()?U.type="electron":typeof window=="object"?U.type="browser":typeof process=="object"&&(U.type="node"),F===void 0?U:U[F]})("type")==="browser"?Ud():F=>F,qn={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3},oN={defaultOEM:qn.DEFAULT},iN={name:"tesseract.js",version:"3.0.3",description:"Pure Javascript Multilingual OCR",main:"src/index.js",types:"src/index.d.ts",unpkg:"dist/tesseract.min.js",jsdelivr:"dist/tesseract.min.js",scripts:{start:"node scripts/server.js",build:"rimraf dist && webpack --config scripts/webpack.config.prod.js && rollup -c scripts/rollup.esm.js","profile:tesseract":"webpack-bundle-analyzer dist/tesseract-stats.json","profile:worker":"webpack-bundle-analyzer dist/worker-stats.json",prepublishOnly:"npm run build",wait:"rimraf dist && wait-on http://localhost:3000/dist/tesseract.dev.js",test:"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node:all","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:browser:scheduler":"npm run test:browser-tpl -- -f ./tests/scheduler.test.html","test:browser:FS":"npm run test:browser-tpl -- -f ./tests/FS.test.html",lint:"eslint src","lint:fix":"eslint --fix src",postinstall:"opencollective-postinstall || true"},browser:{"./src/worker/node/index.js":"./src/worker/browser/index.js"},author:"",contributors:["jeromewu"],license:"Apache-2.0",devDependencies:{"@babel/core":"^7.18.7","@babel/preset-env":"^7.18.7","@rollup/plugin-commonjs":"^22.0.2",acorn:"^6.4.0","babel-loader":"^8.2.0",buffer:"^6.0.3",cors:"^2.8.5",eslint:"^7.2.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.1","expect.js":"^0.3.1",express:"^4.17.1",mocha:"^8.1.3","mocha-headless-chrome":"^2.0.3","npm-run-all":"^4.1.5",nyc:"^15.1.0",rimraf:"^2.7.1",rollup:"^2.79.0","wait-on":"^3.3.0",webpack:"^5.74.0","webpack-bundle-analyzer":"^4.6.0","webpack-cli":"^4.10.0","webpack-dev-middleware":"^5.3.3"},dependencies:{"babel-eslint":"^10.1.0","bmp-js":"^0.1.0","file-type":"^12.4.1","idb-keyval":"^3.2.0","is-electron":"^2.2.0","is-url":"^1.2.4","node-fetch":"^2.6.0","opencollective-postinstall":"^2.0.2","regenerator-runtime":"^0.13.3","resolve-url":"^0.2.1","tesseract.js-core":"^3.0.2","wasm-feature-detect":"^1.2.11",zlibjs:"^0.3.1"},repository:{type:"git",url:"https://github.com/naptha/tesseract.js.git"},bugs:{url:"https://github.com/naptha/tesseract.js/issues"},homepage:"https://github.com/naptha/tesseract.js",collective:{type:"opencollective",url:"https://opencollective.com/tesseractjs"}},sN=Ud(),{version:YN}=iN,yN={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{},workerPath:typeof process!="undefined"&&process.env.TESS_ENV==="development"?sN(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${YN}/dist/worker.min.js`,corePath:null},vN=Ud(),An=F=>new Promise((U,Q)=>{let B=new FileReader;B.onload=()=>{U(B.result)},B.onerror=({target:{error:{code:R}}})=>{Q(Error(`File could not be read! Code=${R}`))},B.readAsArrayBuffer(F)}),Fd=async F=>{let U=F;return F===void 0?"undefined":(typeof F=="string"?/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(F)?U=atob(F.split(",")[1]).split("").map(Q=>Q.charCodeAt(0)):U=await(await fetch(vN(F))).arrayBuffer():F instanceof HTMLElement?(F.tagName==="IMG"&&(U=await Fd(F.src)),F.tagName==="VIDEO"&&(U=await Fd(F.poster)),F.tagName==="CANVAS"&&await new Promise(Q=>{F.toBlob(async B=>{U=await An(B),Q()})})):(F instanceof File||F instanceof Blob)&&(U=await An(F)),new Uint8Array(U))},GN={defaultOptions:yN,spawnWorker:({workerPath:F,workerBlobURL:U})=>{let Q;if(Blob&&URL&&U){let B=new Blob([`importScripts("${F}");`],{type:"application/javascript"});Q=new Worker(URL.createObjectURL(B))}else Q=new Worker(F);return Q},terminateWorker:F=>{F.terminate()},onMessage:(F,U)=>{F.onmessage=({data:Q})=>{U(Q)}},send:async(F,U)=>{F.postMessage(U)},loadImage:Fd},bN=F=>{let U=z({},F);return["corePath","workerPath","langPath"].forEach(Q=>{F[Q]&&(U[Q]=MN(U[Q]))}),U},XN=F=>{let U=[],Q=[],B=[],R=[],V=[];return F.blocks.forEach(d=>{d.paragraphs.forEach(l=>{l.lines.forEach(n=>{n.words.forEach(J=>{J.symbols.forEach(W=>{V.push(_(z({},W),{page:F,block:d,paragraph:l,line:n,word:J}))}),R.push(_(z({},J),{page:F,block:d,paragraph:l,line:n}))}),B.push(_(z({},n),{page:F,block:d,paragraph:l}))}),Q.push(_(z({},l),{page:F,block:d}))}),U.push(_(z({},d),{page:F}))}),_(z({},F),{blocks:U,paragraphs:Q,lines:B,words:R,symbols:V})},$U=Kn,{log:$n}=HQ,ON=A0,{defaultOEM:HN}=oN,{defaultOptions:zN,spawnWorker:uN,terminateWorker:xN,onMessage:wN,loadImage:UJ,send:LN}=GN,FJ=0,QJ=(F={})=>{let U=ON("Worker",FJ),E=bN(z(z({},zN),F)),{logger:Q,errorHandler:B}=E,R=Cd(E,["logger","errorHandler"]),V={},d={},l=uN(R);FJ+=1;let n=(Z,e)=>{V[Z]=e},J=(Z,e)=>{d[Z]=e},W=({id:Z,action:e,payload:r})=>new Promise((c,h)=>{$n(`[${U}]: Start ${Z}, action=${e}`),n(e,c),J(e,h),LN(l,{workerId:U,jobId:Z,action:e,payload:r})});return wN(l,({workerId:Z,jobId:e,status:r,action:c,data:h})=>{if(r==="resolve"){$n(`[${Z}]: Complete ${e}`);let N=h;c==="recognize"?N=XN(h):c==="getPDF"&&(N=Array.from(_(z({},h),{length:Object.keys(h).length}))),V[c]({jobId:e,data:N})}else if(r==="reject"){if(d[c](h),!B)throw Error(h);B(h)}else r==="progress"&&Q(_(z({},h),{userJobId:e}))}),{id:U,worker:l,setResolve:n,setReject:J,load:Z=>W($U({id:Z,action:"load",payload:{options:R}})),writeText:(Z,e,r)=>W($U({id:r,action:"FS",payload:{method:"writeFile",args:[Z,e]}})),readText:(Z,e)=>W($U({id:e,action:"FS",payload:{method:"readFile",args:[Z,{encoding:"utf8"}]}})),removeFile:(Z,e)=>W($U({id:e,action:"FS",payload:{method:"unlink",args:[Z]}})),FS:(Z,e,r)=>W($U({id:r,action:"FS",payload:{method:Z,args:e}})),loadLanguage:(Z="eng",e)=>W($U({id:e,action:"loadLanguage",payload:{langs:Z,options:R}})),initialize:(Z="eng",e=HN,r)=>W($U({id:r,action:"initialize",payload:{langs:Z,oem:e}})),setParameters:(Z={},e)=>W($U({id:e,action:"setParameters",payload:{params:Z}})),recognize:async(Z,e={},r)=>W($U({id:r,action:"recognize",payload:{image:await UJ(Z),options:e}})),getPDF:(Z="Tesseract OCR Result",e=!1,r)=>W($U({id:r,action:"getPDF",payload:{title:Z,textonly:e}})),detect:async(Z,e)=>W($U({id:e,action:"detect",payload:{image:await UJ(Z)}})),terminate:async()=>(l!==null&&(xN(l),l=null),Promise.resolve())}},BJ=QJ,jN=()=>{let F=pN("Scheduler",gn),U={},Q={},B=[];gn+=1;let R=()=>Object.keys(U).length,V=()=>{if(B.length!==0){let d=Object.keys(U);for(let l=0;l(U[d.id]=d,fR(`[${F}]: Add ${d.id}`),fR(`[${F}]: Number of workers=${R()}`),V(),d.id),addJob:async(d,...l)=>{if(R()===0)throw Error(`[${F}]: You need to have at least one worker before adding jobs`);return((n,J)=>new Promise((W,E)=>{let Z=DN({action:n,payload:J});B.push(async e=>{B.shift(),Q[e.id]=Z;try{W(await e[n].apply(void 0,[...J,Z.id]))}catch(r){E(r)}finally{delete Q[e.id],V()}}),fR(`[${F}]: Add ${Z.id} to JobQueue`),fR(`[${F}]: JobQueue length=${B.length}`),V()}))(d,l)},terminate:async()=>{Object.keys(U).forEach(async d=>{await U[d].terminate()}),B=[]},getQueueLen:()=>B.length,getNumWorkers:R}},IN=QJ,fN={recognize:async(F,U,Q)=>{let B=BJ(Q);return await B.load(),await B.loadLanguage(U),await B.initialize(U),B.recognize(F).finally(async()=>{await B.terminate()})},detect:async(F,U)=>{let Q=BJ(U);return await Q.load(),await Q.loadLanguage("osd"),await Q.initialize("osd"),Q.detect(F).finally(async()=>{await Q.terminate()})}},KN={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"},gN=qn,PN={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"},{setLogging:_N}=HQ,qN=z({languages:KN,OEM:gN,PSM:PN,createScheduler:jN,createWorker:IN,setLogging:_N},fN),nQ=class{constructor(U){this.worker=U,this.running=!1,this.ready=!1}static getWorker(){let U=nQ.pool.find(B=>!B.running&&B.ready);if(U)return U;let Q=new nQ(qN.createWorker({cachePath:"tesseract"}));return nQ.pool.push(Q),Q}async run(U){return new Promise(async(Q,B)=>{this.running=!0,this.ready||(await this.worker.load(),await this.worker.loadLanguage("eng"),await this.worker.initialize("eng"),this.ready=!0);let R=setTimeout(()=>{this.worker.terminate(),console.warn("Omnisearch - Worker timeout"),B("timeout"),this.running=!1},12e4);try{let{data:V}=await this.worker.recognize(U.imageData);return clearTimeout(R),Q(V)}catch{console.error("Omnisearch - OCR Worker timeout for "+name),Q({text:""})}finally{this.running=!1}})}};nQ.pool=[];var RJ=new class{async getImageText(F){return TB.Platform.isMobile?"":jn(this._getImageText,F)}async _getImageText(F){let U=await CF.images.get({path:F.path,size:F.stat.size});if(U)return U.text;let Q=new Uint8ClampedArray(await app.vault.readBinary(F)),B=_l(Q),R=await CF.images.get(B);if(R)return R.text;let V=nQ.getWorker();return new Promise(async(d,l)=>{try{let n=(await V.run({imageData:Buffer.from(Q.buffer),name:F.basename})).text.replace(/\n/g," ").replace(/ +/g," ").trim();CF.images.add({hash:B,text:n,path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d(n)})}catch{CF.images.add({hash:B,text:"",path:F.path,size:F.stat.size,libVersion:"1.0.4"}).then(()=>{d("")})}})}},VJ=In.getPdfText.bind(In),dJ=RJ.getImageText.bind(RJ);async function AN(F){let U=app.vault.getFiles().find(R=>R.path===F);if(!U)throw new Error(`Invalid file path: "${F}"`);let Q;if(l0(F))Q=await app.vault.cachedRead(U);else if(aB(F))Q=await VJ(U);else if(kB(U.path))Q=await dJ(U);else throw new Error("Invalid file format: "+U.path);Q=$F(Q);let B=app.metadataCache.getFileCache(U);if(B&&B.frontmatter?.["excalidraw-plugin"]){let R=B.sections?.filter(V=>V.type==="comment")??[];for(let{start:V,end:d}of R.map(l=>l.position))Q=Q.substring(0,V.offset-1)+Q.substring(d.offset)}return{basename:$F(U.basename),content:Q,path:U.path,mtime:U.stat.mtime,tags:ul(B),aliases:zl(B).join(""),headings1:B?TR(B,1).join(" "):"",headings2:B?TR(B,2).join(" "):"",headings3:B?TR(B,3).join(" "):""}}var nJ=class{constructor(){this.nextQueryIsEmpty=!1;this.documents=new Map}async addToLiveCache(U){let Q=await AN(U);this.documents.set(U,Q)}removeFromLiveCache(U){this.documents.delete(U)}async getDocument(U){return this.documents.has(U)?this.documents.get(U):(await this.addToLiveCache(U),this.documents.get(U))}async addToSearchHistory(U){if(!U){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let Q=await fU.searchHistory.toArray();Q=Q.filter(B=>B.query!==U).reverse(),Q.unshift({query:U}),Q=Q.slice(0,10),await fU.searchHistory.clear(),await fU.searchHistory.bulkAdd(Q)}async getSearchHistory(){let U=(await fU.searchHistory.toArray()).reverse().map(Q=>Q.query);return this.nextQueryIsEmpty&&U.unshift(""),U}getDocumentsChecksum(U){return Ll(JSON.stringify(U.sort((Q,B)=>Q.pathB.path?1:0)))}async getMinisearchCache(){try{return(await fU.minisearch.toArray())[0]}catch(U){return new lJ.Notice("Omnisearch - Cache missing or invalid. Some freezes may occur while Omnisearch indexes your vault."),console.error("Omnisearch - Error while loading Minisearch cache"),console.error(U),null}}async writeMinisearchCache(U,Q){let B=Array.from(Q).map(([R,V])=>({path:R,mtime:V}));await fU.minisearch.clear(),await fU.minisearch.add({date:new Date().toISOString(),paths:B,data:U.toJSON()}),console.log("Omnisearch - Search cache written")}},hU=new nJ;function $N(F){let U,Q,B,R,V,d,l,n,J=F[8].default,W=EQ(J,F,F[7],null);return{c(){U=j("div"),Q=j("div"),B=j("input"),V=FU(),W&&W.c(),P(B,"class","prompt-input"),P(B,"placeholder",F[0]),P(B,"spellcheck","false"),P(B,"type","text"),P(Q,"class","omnisearch-input-field"),P(U,"class","omnisearch-input-container")},m(E,Z){UU(E,U,Z),H(U,Q),H(Q,B),F[9](B),RV(B,F[1]),H(U,V),W&&W.m(U,null),d=!0,l||(n=[xU(B,"input",F[10]),od(R=F[3].call(null,B)),xU(B,"compositionend",F[11]),xU(B,"compositionstart",F[12]),xU(B,"input",F[4])],l=!0)},p(E,[Z]){(!d||Z&1)&&P(B,"placeholder",E[0]),Z&2&&B.value!==E[1]&&RV(B,E[1]),W&&W.p&&(!d||Z&128)&&SQ(W,J,E,E[7],d?tQ(J,E[7],Z,null):eQ(E[7]),null)},i(E){d||(BU(W,E),d=!0)},o(E){RU(W,E),d=!1},d(E){E&&A(U),F[9](null),W&&W.d(E),l=!1,gU(n)}}}function UE(F,U,Q){let{$$slots:B={},$$scope:R}=U,{initialValue:V=""}=U,d=!1,{placeholder:l=""}=U,n="",J,W=lV();async function E(){await lF(),J.focus(),await lF(),J.select(),await lF()}let Z=(0,JJ.debounce)(()=>{hU.addToSearchHistory(""),W("input",n)},500);function e(N){wB[N?"unshift":"push"](()=>{J=N,Q(2,J)})}function r(){n=this.value,Q(1,n),Q(5,V),Q(6,d)}let c=N=>R0(!1),h=N=>R0(!0);return F.$$set=N=>{"initialValue"in N&&Q(5,V=N.initialValue),"placeholder"in N&&Q(0,l=N.placeholder),"$$scope"in N&&Q(7,R=N.$$scope)},F.$$.update=()=>{if(F.$$.dirty&98){U:V&&!d&&!n&&(Q(6,d=!0),Q(1,n=V),E())}},[l,n,J,E,Z,V,d,R,B,e,r,c,h]}var WJ=class extends CU{constructor(U){super();mU(this,U,UE,$N,rU,{initialValue:5,placeholder:0})}},KR=WJ;function FE(F){let U,Q,B,R,V=F[1].default,d=EQ(V,F,F[0],null);return{c(){U=j("div"),d&&d.c(),P(U,"class","prompt-results")},m(l,n){UU(l,U,n),d&&d.m(U,null),Q=!0,B||(R=xU(U,"mousedown",QE),B=!0)},p(l,[n]){d&&d.p&&(!Q||n&1)&&SQ(d,V,l,l[0],Q?tQ(V,l[0],n,null):eQ(l[0]),null)},i(l){Q||(BU(d,l),Q=!0)},o(l){RU(d,l),Q=!1},d(l){l&&A(U),d&&d.d(l),B=!1,R()}}}var QE=F=>F.preventDefault();function BE(F,U,Q){let{$$slots:B={},$$scope:R}=U;return F.$$set=V=>{"$$scope"in V&&Q(0,R=V.$$scope)},[R,B]}var ZJ=class extends CU{constructor(U){super();mU(this,U,BE,FE,rU,{})}},gR=ZJ;var Qd=XU(require("obsidian"));async function PR(F,U=!1){let Q=vF(F.foundWords);Q.exec(F.content);let B=Q.lastIndex,R=!1;app.workspace.iterateAllLeaves(l=>{l.view instanceof Qd.MarkdownView&&!U&&l.getViewState().state?.file===F.path&&l.getViewState()?.pinned&&(app.workspace.setActiveLeaf(l,{focus:!0}),R=!0)}),R||await app.workspace.openLinkText(F.path,"",U);let V=app.workspace.getActiveViewOfType(Qd.MarkdownView);if(!V)return;let d=V.editor.offsetToPos(B);d.ch=0,V.editor.setCursor(d),V.editor.scrollIntoView({from:{line:d.line-10,ch:0},to:{line:d.line+10,ch:0}})}async function NJ(F,U=!1){try{let Q;switch(app.vault.getConfig("newFileLocation")){case"current":Q=(app.workspace.getActiveFile()?.parent.path??"")+"/";break;case"folder":Q=app.vault.getConfig("newFileFolderPath")+"/";break;default:Q="";break}await app.workspace.openLinkText(`${Q}${F}.md`,"",U)}catch(Q){throw Q.message="OmniSearch - Could not create note: "+Q.message,console.error(Q),Q}}function RE(F){let U;return{c(){U=j("span"),U.innerHTML='',P(U,"class","suggestion-flair"),P(U,"aria-label","Not created yet, select to create")},m(Q,B){UU(Q,U,B)},p:tU,i:tU,o:tU,d(Q){Q&&A(U)}}}function VE(F){"use strict";return[]}var EJ=class extends CU{constructor(U){super();mU(this,U,VE,RE,rU,{})}},tJ=EJ;function SJ(F){let U,Q;return U=new tJ({}),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function dE(F){let U,Q,B,R,V,d=F[2]&&SJ(F),l=F[4].default,n=EQ(l,F,F[3],null);return{c(){U=j("div"),d&&d.c(),Q=FU(),n&&n.c(),P(U,"data-result-id",F[0]),P(U,"class","suggestion-item omnisearch-result"),VV(U,"is-selected",F[1])},m(J,W){UU(J,U,W),d&&d.m(U,null),H(U,Q),n&&n.m(U,null),B=!0,R||(V=[xU(U,"mousemove",F[5]),xU(U,"click",F[6]),xU(U,"auxclick",F[7])],R=!0)},p(J,[W]){J[2]?d?W&4&&BU(d,1):(d=SJ(J),d.c(),BU(d,1),d.m(U,Q)):d&&(LF(),RU(d,1,1,()=>{d=null}),jF()),n&&n.p&&(!B||W&8)&&SQ(n,l,J,J[3],B?tQ(l,J[3],W,null):eQ(J[3]),null),(!B||W&1)&&P(U,"data-result-id",J[0]),(!B||W&2)&&VV(U,"is-selected",J[1])},i(J){B||(BU(d),BU(n,J),B=!0)},o(J){RU(d),RU(n,J),B=!1},d(J){J&&A(U),d&&d.d(),n&&n.d(J),R=!1,gU(V)}}}function lE(F,U,Q){let{$$slots:B={},$$scope:R}=U,{id:V}=U,{selected:d=!1}=U,{glyph:l=!1}=U;function n(E){FF.call(this,F,E)}function J(E){FF.call(this,F,E)}function W(E){FF.call(this,F,E)}return F.$$set=E=>{"id"in E&&Q(0,V=E.id),"selected"in E&&Q(1,d=E.selected),"glyph"in E&&Q(2,l=E.glyph),"$$scope"in E&&Q(3,R=E.$$scope)},[V,d,l,R,B,n,J,W]}var eJ=class extends CU{constructor(U){super();mU(this,U,lE,dE,rU,{id:0,selected:1,glyph:2})}},_R=eJ;function kJ(F){let U,Q=F[1].matches.length+"",B,R,V=(F[1].matches.length>1?"matches":"match")+"",d;return{c(){U=j("span"),B=PU(Q),R=PU("\xA0"),d=PU(V),P(U,"class","omnisearch-result__counter")},m(l,n){UU(l,U,n),H(U,B),H(U,R),H(U,d)},p(l,n){n&2&&Q!==(Q=l[1].matches.length+"")&&jQ(B,Q),n&2&&V!==(V=(l[1].matches.length>1?"matches":"match")+"")&&jQ(d,V)},d(l){l&&A(U)}}}function aJ(F){let U,Q=F[5].replace(F[6],yF)+"";return{c(){U=j("div"),P(U,"class","omnisearch-result__body")},m(B,R){UU(B,U,R),U.innerHTML=Q},p(B,R){R&96&&Q!==(Q=B[5].replace(B[6],yF)+"")&&(U.innerHTML=Q)},d(B){B&&A(U)}}}function TJ(F){let U,Q;return{c(){U=j("img"),UF(U,"width","100px"),BV(U.src,Q=F[2])||P(U,"src",Q),P(U,"alt","")},m(B,R){UU(B,U,R)},p(B,R){R&4&&!BV(U.src,Q=B[2])&&P(U,"src",Q)},d(B){B&&A(U)}}}function nE(F){let U,Q,B,R,V=F[3].replace(F[6],yF)+"",d,l,n,J=F[1].matches.length>0&&kJ(F),W=F[7]&&aJ(F),E=F[2]&&TJ(F);return{c(){U=j("div"),Q=j("div"),B=j("div"),R=j("span"),d=FU(),J&&J.c(),l=FU(),W&&W.c(),n=FU(),E&&E.c(),P(R,"class","omnisearch-result__title"),UF(U,"display","flex")},m(Z,e){UU(Z,U,e),H(U,Q),H(Q,B),H(B,R),R.innerHTML=V,H(B,d),J&&J.m(B,null),H(Q,l),W&&W.m(Q,null),H(U,n),E&&E.m(U,null)},p(Z,e){e&72&&V!==(V=Z[3].replace(Z[6],yF)+"")&&(R.innerHTML=V),Z[1].matches.length>0?J?J.p(Z,e):(J=kJ(Z),J.c(),J.m(B,null)):J&&(J.d(1),J=null),Z[7]?W?W.p(Z,e):(W=aJ(Z),W.c(),W.m(Q,null)):W&&(W.d(1),W=null),Z[2]?E?E.p(Z,e):(E=TJ(Z),E.c(),E.m(U,null)):E&&(E.d(1),E=null)},d(Z){Z&&A(U),J&&J.d(),W&&W.d(),E&&E.d()}}}function JE(F){let U,Q;return U=new _R({props:{id:F[1].path,selected:F[0],glyph:F[4],$$slots:{default:[nE]},$$scope:{ctx:F}}}),U.$on("mousemove",F[8]),U.$on("click",F[9]),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},p(B,[R]){let V={};R&2&&(V.id=B[1].path),R&1&&(V.selected=B[0]),R&16&&(V.glyph=B[4]),R&1262&&(V.$$scope={dirty:R,ctx:B}),U.$set(V)},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function WE(F,U,Q){let B,R,V,d,l;uB(F,AF,e=>Q(7,l=e));let{selected:n=!1}=U,{note:J}=U,W=null;function E(e){FF.call(this,F,e)}function Z(e){FF.call(this,F,e)}F.$$set=e=>{"selected"in e&&Q(0,n=e.selected),"note"in e&&Q(1,J=e.note)},F.$$.update=()=>{if(F.$$.dirty&2){U:if(Q(2,W=null),kB(J.path)){let e=app.vault.getFiles().find(r=>r.path===J.path);e&&Q(2,W=app.vault.getResourcePath(e))}}if(F.$$.dirty&2){U:Q(6,B=vF(J.foundWords))}if(F.$$.dirty&2){U:Q(5,R=cR(J.content,J.matches[0]?.offset??-1))}if(F.$$.dirty&2){U:Q(3,d=O.showShortName?J.basename:J.path)}};U:Q(4,V=!1);return[n,J,W,d,V,R,B,l,E,Z]}var hJ=class extends CU{constructor(U){super();mU(this,U,WE,JE,rU,{selected:0,note:1})}},cJ=hJ;function rJ(F,U){U?U.offsets=typeof U.offsets=="undefined"?!0:U.offsets:U={offsets:!0,tokenize:!0},F||(F="");let Q={text:[],offsets:[],exclude:{text:[]}};U.offsets&&(Q.offsets=[]);let B={text:[]},R=[],V=/(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|(-?"(?:[^"\\]|\\.)*")|(-?'(?:[^'\\]|\\.)*')|\S+|\S+:\S+/g,d,l=0;for(;(d=V.exec(F))!==null&&!(++l>=100);){let J=d[0],W=J.indexOf(":");if(W!==-1){let E=J.slice(0,W),Z=J.slice(W+1);Z=(Z+"").replace(/\\(.?)/g,function(e,r){switch(r){case"\\":return"\\";case"0":return"\0";case"":return"";default:return r}}),R.push({keyword:E,value:Z,offsetStart:d.index,offsetEnd:d.index+J.length})}else{let E=!1;J[0]==="-"&&(E=!0,J=J.slice(1)),J=(J+"").replace(/\\(.?)/g,function(Z,e){switch(e){case"\\":return"\\";case"0":return"\0";case"":return"";default:return e}}),E?B.text.push(J):R.push({text:J,offsetStart:d.index,offsetEnd:d.index+J.length})}}R.reverse();let n;for(;n=R.pop();)if(n.text)Q.text.push(n.text),U.offsets&&Q.offsets.push(n);else if(n.keyword){let J=n.keyword;U.keywords=U.keywords||[];let W=!1,E=!1;if(!/^-/.test(J))W=U.keywords.indexOf(J)!==-1;else if(J[0]==="-"){let e=J.slice(1);W=U.keywords.indexOf(e)!==-1,W&&(J=e,E=!0)}U.ranges=U.ranges||[];let Z=U.ranges.indexOf(J)!==-1;if(W){U.offsets&&Q.offsets.push({keyword:J,value:n.value,offsetStart:E?n.offsetStart+1:n.offsetStart,offsetEnd:n.offsetEnd});let e=n.value;if(e.length){let r=e.split(",");E?B[J]?B[J]instanceof Array?r.length>1?B[J]=B[J].concat(r):B[J].push(e):(B[J]=[B[J]],B[J].push(e)):r.length>1?B[J]=r:U.alwaysArray?B[J]=[e]:B[J]=e:Q[J]?Q[J]instanceof Array?r.length>1?Q[J]=Q[J].concat(r):Q[J].push(e):(Q[J]=[Q[J]],Q[J].push(e)):r.length>1?Q[J]=r:U.alwaysArray?Q[J]=[e]:Q[J]=e}}else if(Z){U.offsets&&Q.offsets.push(n);let e=n.value,r=e.split("-");Q[J]={},r.length===2?(Q[J].from=r[0],Q[J].to=r[1]):Q[J].from=e}else{let e=n.keyword+":"+n.value;Q.text.push(e),U.offsets&&Q.offsets.push({text:e,offsetStart:n.offsetStart,offsetEnd:n.offsetEnd})}}return Q.exclude=B,Q}var JQ=class{constructor(U=""){this.segments=[];this.exclusions=[];O.ignoreDiacritics&&(U=$F(U));let Q=rJ(U.toLowerCase(),{tokenize:!0});this.exclusions=Q.exclude.text.map(this.formatToken).filter(B=>!!B.value),this.segments=Q.text.reduce((B,R)=>{let V=this.formatToken(R);return V.value&&B.push(V),B},[])}isEmpty(){return this.segments.length===0}segmentsToStr(){return this.segments.map(({value:U})=>U).join(" ")}getExactTerms(){return this.segments.filter(({exact:U})=>U).map(({value:U})=>U)}formatToken(U){let Q=Hl(U);return{value:Q,exact:Q!==U}}};var NU=function(){return NU=Object.assign||function(U){for(var Q,B=1,R=arguments.length;B0&&V[V.length-1])&&(J[0]===6||J[0]===2)){Q=0;continue}if(J[0]===3&&(!V||J[1]>V[0]&&J[1]=F.length&&(F=void 0),{value:F&&F[B++],done:!F}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")}function kU(F,U){var Q=typeof Symbol=="function"&&F[Symbol.iterator];if(!Q)return F;var B=Q.call(F),R,V=[],d;try{for(;(U===void 0||U-- >0)&&!(R=B.next()).done;)V.push(R.value)}catch(l){d={error:l}}finally{try{R&&!R.done&&(Q=B.return)&&Q.call(B)}finally{if(d)throw d.error}}return V}var EE="ENTRIES",CJ="KEYS",DJ="VALUES",DU="",Bd=function(){function F(U,Q){var B=U._tree,R=Array.from(B.keys());this.set=U,this._type=Q,this._path=R.length>0?[{node:B,keys:R}]:[]}return F.prototype.next=function(){var U=this.dive();return this.backtrack(),U},F.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var U=zQ(this._path),Q=U.node,B=U.keys;if(zQ(B)===DU)return{done:!1,value:this.result()};var R=Q.get(zQ(B));return this._path.push({node:R,keys:Array.from(R.keys())}),this.dive()},F.prototype.backtrack=function(){if(this._path.length!==0){var U=zQ(this._path).keys;U.pop(),!(U.length>0)&&(this._path.pop(),this.backtrack())}},F.prototype.key=function(){return this.set._prefix+this._path.map(function(U){var Q=U.keys;return zQ(Q)}).filter(function(U){return U!==DU}).join("")},F.prototype.value=function(){return zQ(this._path).node.get(DU)},F.prototype.result=function(){switch(this._type){case DJ:return this.value();case CJ:return this.key();default:return[this.key(),this.value()]}},F.prototype[Symbol.iterator]=function(){return this},F}(),zQ=function(F){return F[F.length-1]},tE=function(F,U,Q){var B=new Map;if(U===void 0)return B;for(var R=U.length+1,V=R+Q,d=new Uint8Array(V*R).fill(Q+1),l=0;lQ)continue U}pJ(F.get(e),U,Q,B,R,c,d,l+e)}}}catch(y){n={error:y}}finally{try{Z&&!Z.done&&(J=E.return)&&J.call(E)}finally{if(n)throw n.error}}},Rd=function(){function F(U,Q){U===void 0&&(U=new Map),Q===void 0&&(Q=""),this._size=void 0,this._tree=U,this._prefix=Q}return F.prototype.atPrefix=function(U){var Q,B;if(!U.startsWith(this._prefix))throw new Error("Mismatched prefix");var R=kU(qR(this._tree,U.slice(this._prefix.length)),2),V=R[0],d=R[1];if(V===void 0){var l=kU(ld(d),2),n=l[0],J=l[1];try{for(var W=q(n.keys()),E=W.next();!E.done;E=W.next()){var Z=E.value;if(Z!==DU&&Z.startsWith(J)){var e=new Map;return e.set(Z.slice(J.length),n.get(Z)),new F(e,U)}}}catch(r){Q={error:r}}finally{try{E&&!E.done&&(B=W.return)&&B.call(W)}finally{if(Q)throw Q.error}}}return new F(V,U)},F.prototype.clear=function(){this._size=void 0,this._tree.clear()},F.prototype.delete=function(U){return this._size=void 0,SE(this._tree,U)},F.prototype.entries=function(){return new Bd(this,EE)},F.prototype.forEach=function(U){var Q,B;try{for(var R=q(this),V=R.next();!V.done;V=R.next()){var d=kU(V.value,2),l=d[0],n=d[1];U(l,n,this)}}catch(J){Q={error:J}}finally{try{V&&!V.done&&(B=R.return)&&B.call(R)}finally{if(Q)throw Q.error}}},F.prototype.fuzzyGet=function(U,Q){return tE(this._tree,U,Q)},F.prototype.get=function(U){var Q=Vd(this._tree,U);return Q!==void 0?Q.get(DU):void 0},F.prototype.has=function(U){var Q=Vd(this._tree,U);return Q!==void 0&&Q.has(DU)},F.prototype.keys=function(){return new Bd(this,CJ)},F.prototype.set=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U);return B.set(DU,Q),this},Object.defineProperty(F.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var U=this.entries();!U.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),F.prototype.update=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U);return B.set(DU,Q(B.get(DU))),this},F.prototype.fetch=function(U,Q){if(typeof U!="string")throw new Error("key must be a string");this._size=void 0;var B=dd(this._tree,U),R=B.get(DU);return R===void 0&&B.set(DU,R=Q()),R},F.prototype.values=function(){return new Bd(this,DJ)},F.prototype[Symbol.iterator]=function(){return this.entries()},F.from=function(U){var Q,B,R=new F;try{for(var V=q(U),d=V.next();!d.done;d=V.next()){var l=kU(d.value,2),n=l[0],J=l[1];R.set(n,J)}}catch(W){Q={error:W}}finally{try{d&&!d.done&&(B=V.return)&&B.call(V)}finally{if(Q)throw Q.error}}return R},F.fromObject=function(U){return F.from(Object.entries(U))},F}(),qR=function(F,U,Q){var B,R;if(Q===void 0&&(Q=[]),U.length===0||F==null)return[F,Q];try{for(var V=q(F.keys()),d=V.next();!d.done;d=V.next()){var l=d.value;if(l!==DU&&U.startsWith(l))return Q.push([F,l]),qR(F.get(l),U.slice(l.length),Q)}}catch(n){B={error:n}}finally{try{d&&!d.done&&(R=V.return)&&R.call(V)}finally{if(B)throw B.error}}return Q.push([F,U]),qR(void 0,"",Q)},Vd=function(F,U){var Q,B;if(U.length===0||F==null)return F;try{for(var R=q(F.keys()),V=R.next();!V.done;V=R.next()){var d=V.value;if(d!==DU&&U.startsWith(d))return Vd(F.get(d),U.slice(d.length))}}catch(l){Q={error:l}}finally{try{V&&!V.done&&(B=R.return)&&B.call(R)}finally{if(Q)throw Q.error}}},dd=function(F,U){var Q,B,R=U.length;U:for(var V=0;F&&V0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Rd,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},F.prototype.discard=function(U){var Q=this,B=this._idToShortId.get(U);if(B==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(U,": it is not in the index"));this._idToShortId.delete(U),this._documentIds.delete(B),this._storedFields.delete(B),(this._fieldLength.get(B)||[]).forEach(function(R,V){Q.removeFieldLength(B,V,Q._documentCount,R)}),this._fieldLength.delete(B),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},F.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var U=this._options.autoVacuum,Q=U.minDirtFactor,B=U.minDirtCount,R=U.batchSize,V=U.batchWait;this.conditionalVacuum({batchSize:R,batchWait:V},{minDirtCount:B,minDirtFactor:Q})}},F.prototype.discardAll=function(U){var Q,B,R=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var V=q(U),d=V.next();!d.done;d=V.next()){var l=d.value;this.discard(l)}}catch(n){Q={error:n}}finally{try{d&&!d.done&&(B=V.return)&&B.call(V)}finally{if(Q)throw Q.error}}}finally{this._options.autoVacuum=R}this.maybeAutoVacuum()},F.prototype.replace=function(U){var Q=this._options,B=Q.idField,R=Q.extractField,V=R(U,B);this.discard(V),this.add(U)},F.prototype.vacuum=function(U){return U===void 0&&(U={}),this.conditionalVacuum(U)},F.prototype.conditionalVacuum=function(U,Q){var B=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&Q,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var R=B._enqueuedVacuumConditions;return B._enqueuedVacuumConditions=Ed,B.performVacuuming(U,R)}),this._enqueuedVacuum)):this.vacuumConditionsMet(Q)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(U),this._currentVacuum)},F.prototype.performVacuuming=function(U,Q){return ZE(this,void 0,void 0,function(){var B,R,V,d,l,n,J,W,E,Z,e,r,c,h,N,k,t,S,a,T,C,D,p,o,s;return NE(this,function(v){switch(v.label){case 0:if(B=this._dirtCount,!this.vacuumConditionsMet(Q))return[3,10];R=U.batchSize||Nd.batchSize,V=U.batchWait||Nd.batchWait,d=1,v.label=1;case 1:v.trys.push([1,7,8,9]),l=q(this._index),n=l.next(),v.label=2;case 2:if(n.done)return[3,6];J=kU(n.value,2),W=J[0],E=J[1];try{for(Z=(D=void 0,q(E)),e=Z.next();!e.done;e=Z.next()){r=kU(e.value,2),c=r[0],h=r[1];try{for(N=(o=void 0,q(h)),k=N.next();!k.done;k=N.next())t=kU(k.value,1),S=t[0],!this._documentIds.has(S)&&(h.size<=1?E.delete(c):h.delete(S))}catch(y){o={error:y}}finally{try{k&&!k.done&&(s=N.return)&&s.call(N)}finally{if(o)throw o.error}}}}catch(y){D={error:y}}finally{try{e&&!e.done&&(p=Z.return)&&p.call(Z)}finally{if(D)throw D.error}}return this._index.get(W).size===0&&this._index.delete(W),d%R!=0?[3,4]:[4,new Promise(function(y){return setTimeout(y,V)})];case 3:v.sent(),v.label=4;case 4:d+=1,v.label=5;case 5:return n=l.next(),[3,2];case 6:return[3,9];case 7:return a=v.sent(),T={error:a},[3,9];case 8:try{n&&!n.done&&(C=l.return)&&C.call(l)}finally{if(T)throw T.error}return[7];case 9:this._dirtCount-=B,v.label=10;case 10:return[4,null];case 11:return v.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},F.prototype.vacuumConditionsMet=function(U){if(U==null)return!0;var Q=U.minDirtCount,B=U.minDirtFactor;return Q=Q||td.minDirtCount,B=B||td.minDirtFactor,this.dirtCount>=Q&&this.dirtFactor>=B},Object.defineProperty(F.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),F.prototype.has=function(U){return this._idToShortId.has(U)},F.prototype.search=function(U,Q){var B,R;Q===void 0&&(Q={});var V=this.executeQuery(U,Q),d=[];try{for(var l=q(V),n=l.next();!n.done;n=l.next()){var J=kU(n.value,2),W=J[0],E=J[1],Z=E.score,e=E.terms,r=E.match,c=e.length,h={id:this._documentIds.get(W),score:Z*c,terms:Object.keys(r),match:r};Object.assign(h,this._storedFields.get(W)),(Q.filter==null||Q.filter(h))&&d.push(h)}}catch(N){B={error:N}}finally{try{n&&!n.done&&(R=l.return)&&R.call(l)}finally{if(B)throw B.error}}return d.sort(YJ),d},F.prototype.autoSuggest=function(U,Q){var B,R,V,d;Q===void 0&&(Q={}),Q=NU(NU({},this._options.autoSuggestOptions),Q);var l=new Map;try{for(var n=q(this.search(U,Q)),J=n.next();!J.done;J=n.next()){var W=J.value,E=W.score,Z=W.terms,e=Z.join(" "),r=l.get(e);r!=null?(r.score+=E,r.count+=1):l.set(e,{score:E,terms:Z,count:1})}}catch(a){B={error:a}}finally{try{J&&!J.done&&(R=n.return)&&R.call(n)}finally{if(B)throw B.error}}var c=[];try{for(var h=q(l),N=h.next();!N.done;N=h.next()){var k=kU(N.value,2),r=k[0],t=k[1],E=t.score,Z=t.terms,S=t.count;c.push({suggestion:r,terms:Z,score:E/S})}}catch(a){V={error:a}}finally{try{N&&!N.done&&(d=h.return)&&d.call(h)}finally{if(V)throw V.error}}return c.sort(YJ),c},Object.defineProperty(F.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),F.loadJSON=function(U,Q){if(Q==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(U),Q)},F.getDefault=function(U){if(Zd.hasOwnProperty(U))return Wd(Zd,U);throw new Error('MiniSearch: unknown option "'.concat(U,'"'))},F.loadJS=function(U,Q){var B,R,V,d,l,n,J=U.index,W=U.documentCount,E=U.nextId,Z=U.documentIds,e=U.fieldIds,r=U.fieldLength,c=U.averageFieldLength,h=U.storedFields,N=U.dirtCount,k=U.serializationVersion;if(k!==1&&k!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var t=new F(Q);t._documentCount=W,t._nextId=E,t._documentIds=AR(Z),t._idToShortId=new Map,t._fieldIds=e,t._fieldLength=AR(r),t._avgFieldLength=c,t._storedFields=AR(h),t._dirtCount=N||0,t._index=new Rd;try{for(var S=q(t._documentIds),a=S.next();!a.done;a=S.next()){var T=kU(a.value,2),C=T[0],D=T[1];t._idToShortId.set(D,C)}}catch(m){B={error:m}}finally{try{a&&!a.done&&(R=S.return)&&R.call(S)}finally{if(B)throw B.error}}try{for(var p=q(J),o=p.next();!o.done;o=p.next()){var s=kU(o.value,2),v=s[0],y=s[1],i=new Map;try{for(var w=(l=void 0,q(Object.keys(y))),g=w.next();!g.done;g=w.next()){var L=g.value,M=y[L];k===1&&(M=M.ds),i.set(parseInt(L,10),AR(M))}}catch(m){l={error:m}}finally{try{g&&!g.done&&(n=w.return)&&n.call(w)}finally{if(l)throw l.error}}t._index.set(v,i)}}catch(m){V={error:m}}finally{try{o&&!o.done&&(d=p.return)&&d.call(p)}finally{if(V)throw V.error}}return t},F.prototype.executeQuery=function(U,Q){var B=this;if(Q===void 0&&(Q={}),typeof U!="string"){var R=NU(NU(NU({},Q),U),{queries:void 0}),V=U.queries.map(function(h){return B.executeQuery(h,R)});return this.combineResults(V,U.combineWith)}var d=this._options,l=d.tokenize,n=d.processTerm,J=d.searchOptions,W=NU(NU({tokenize:l,processTerm:n},J),Q),E=W.tokenize,Z=W.processTerm,e=E(U).flatMap(function(h){return Z(h)}).filter(function(h){return!!h}),r=e.map(hE(W)),c=r.map(function(h){return B.executeQuerySpec(h,W)});return this.combineResults(c,W.combineWith)},F.prototype.executeQuerySpec=function(U,Q){var B,R,V,d,l=NU(NU({},this._options.searchOptions),Q),n=(l.fields||this._options.fields).reduce(function(L,M){var m;return NU(NU({},L),(m={},m[M]=Wd(L,M)||1,m))},l.boost||{}),J=l.boostDocument,W=l.weights,E=l.maxFuzzy,Z=l.bm25,e=NU(NU({},iJ.weights),W),r=e.fuzzy,c=e.prefix,h=this._index.get(U.term),N=this.termResults(U.term,U.term,1,h,n,J,Z),k,t;if(U.prefix&&(k=this._index.atPrefix(U.term)),U.fuzzy){var S=U.fuzzy===!0?.2:U.fuzzy,a=S<1?Math.min(E,Math.round(U.term.length*S)):S;a&&(t=this._index.fuzzyGet(U.term,a))}if(k)try{for(var T=q(k),C=T.next();!C.done;C=T.next()){var D=kU(C.value,2),p=D[0],o=D[1],s=p.length-U.term.length;if(!!s){t==null||t.delete(p);var v=c*p.length/(p.length+.3*s);this.termResults(U.term,p,v,o,n,J,Z,N)}}}catch(L){B={error:L}}finally{try{C&&!C.done&&(R=T.return)&&R.call(T)}finally{if(B)throw B.error}}if(t)try{for(var y=q(t.keys()),i=y.next();!i.done;i=y.next()){var p=i.value,w=kU(t.get(p),2),g=w[0],s=w[1];if(!!s){var v=r*p.length/(p.length+s);this.termResults(U.term,p,v,g,n,J,Z,N)}}}catch(L){V={error:L}}finally{try{i&&!i.done&&(d=y.return)&&d.call(y)}finally{if(V)throw V.error}}return N},F.prototype.combineResults=function(U,Q){if(Q===void 0&&(Q=nd),U.length===0)return new Map;var B=Q.toLowerCase();return U.reduce(kE[B])||new Map},F.prototype.toJSON=function(){var U,Q,B,R,V=[];try{for(var d=q(this._index),l=d.next();!l.done;l=d.next()){var n=kU(l.value,2),J=n[0],W=n[1],E={};try{for(var Z=(B=void 0,q(W)),e=Z.next();!e.done;e=Z.next()){var r=kU(e.value,2),c=r[0],h=r[1];E[c]=Object.fromEntries(h)}}catch(N){B={error:N}}finally{try{e&&!e.done&&(R=Z.return)&&R.call(Z)}finally{if(B)throw B.error}}V.push([J,E])}}catch(N){U={error:N}}finally{try{l&&!l.done&&(Q=d.return)&&Q.call(d)}finally{if(U)throw U.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:V,serializationVersion:2}},F.prototype.termResults=function(U,Q,B,R,V,d,l,n){var J,W,E,Z,e;if(n===void 0&&(n=new Map),R==null)return n;try{for(var r=q(Object.keys(V)),c=r.next();!c.done;c=r.next()){var h=c.value,N=V[h],k=this._fieldIds[h],t=R.get(k);if(t!=null){var S=t.size,a=this._avgFieldLength[k];try{for(var T=(E=void 0,q(t.keys())),C=T.next();!C.done;C=T.next()){var D=C.value;if(!this._documentIds.has(D)){this.removeTerm(k,D,Q),S-=1;continue}var p=d?d(this._documentIds.get(D),Q):1;if(!!p){var o=t.get(D),s=this._fieldLength.get(D)[k],v=TE(o,S,this._documentCount,s,a,l),y=B*N*p*v,i=n.get(D);if(i){i.score+=y,rE(i.terms,U);var w=Wd(i.match,Q);w?w.push(h):i.match[Q]=[h]}else n.set(D,{score:y,terms:[U],match:(e={},e[Q]=[h],e)})}}}catch(g){E={error:g}}finally{try{C&&!C.done&&(Z=T.return)&&Z.call(T)}finally{if(E)throw E.error}}}}}catch(g){J={error:g}}finally{try{c&&!c.done&&(W=r.return)&&W.call(r)}finally{if(J)throw J.error}}return n},F.prototype.addTerm=function(U,Q,B){var R=this._index.fetch(B,yJ),V=R.get(U);if(V==null)V=new Map,V.set(Q,1),R.set(U,V);else{var d=V.get(Q);V.set(Q,(d||0)+1)}},F.prototype.removeTerm=function(U,Q,B){if(!this._index.has(B)){this.warnDocumentChanged(Q,U,B);return}var R=this._index.fetch(B,yJ),V=R.get(U);V==null||V.get(Q)==null?this.warnDocumentChanged(Q,U,B):V.get(Q)<=1?V.size<=1?R.delete(U):V.delete(Q):V.set(Q,V.get(Q)-1),this._index.get(B).size===0&&this._index.delete(B)},F.prototype.warnDocumentChanged=function(U,Q,B){var R,V;try{for(var d=q(Object.keys(this._fieldIds)),l=d.next();!l.done;l=d.next()){var n=l.value;if(this._fieldIds[n]===Q){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(U),' has changed before removal: term "').concat(B,'" was not present in field "').concat(n,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(J){R={error:J}}finally{try{l&&!l.done&&(V=d.return)&&V.call(d)}finally{if(R)throw R.error}}},F.prototype.addDocumentId=function(U){var Q=this._nextId;return this._idToShortId.set(U,Q),this._documentIds.set(Q,U),this._documentCount+=1,this._nextId+=1,Q},F.prototype.addFields=function(U){for(var Q=0;Q{let U=F.split(Gl),Q=aR();return Q?U.flatMap(B=>il.test(B)?Q.cut(B):[B]):U},UV=class{constructor(){this.indexedDocuments=new Map;this.previousResults=[];this.minisearch=new Jd(UV.options)}async loadCache(){let U=await hU.getMinisearchCache();U&&(this.minisearch=Jd.loadJS(U.data,UV.options),this.indexedDocuments=new Map(U.paths.map(Q=>[Q.path,Q.mtime])))}getDiff(U){let Q=new Map(U.map(V=>[V.path,V.mtime])),B=U.filter(V=>!this.indexedDocuments.has(V.path)||this.indexedDocuments.get(V.path)!==V.mtime),R=[...this.indexedDocuments].filter(([V,d])=>!Q.has(V)||Q.get(V)!==d).map(V=>({path:V[0],mtime:V[1]}));return{toAdd:B,toRemove:R}}async addFromPaths(U){let Q=await Promise.all(U.map(async R=>await hU.getDocument(R)));this.removeFromPaths(Q.filter(R=>this.indexedDocuments.has(R.path)).map(R=>R.path));let B=jl(Q,500);for(let R of B){R.forEach(d=>this.indexedDocuments.set(d.path,d.mtime));let V=R.filter(d=>this.minisearch.has(d.path));this.removeFromPaths(V.map(d=>d.path)),await this.minisearch.addAllAsync(R)}}removeFromPaths(U){U.forEach(B=>this.indexedDocuments.delete(B));let Q=U.filter(B=>this.minisearch.has(B));this.minisearch.discardAll(Q)}async search(U,Q){if(U.isEmpty())return this.previousResults=[],[];let B=this.minisearch.search(U.segmentsToStr(),{prefix:n=>n.length>=Q.prefixLength,fuzzy:.2,combineWith:"AND",boost:{basename:O.weightBasename,aliases:O.weightBasename,headings1:O.weightH1,headings2:O.weightH2,headings3:O.weightH3}});if(!B.length)return this.previousResults;if(Q.singleFilePath)return B.filter(n=>n.id===Q.singleFilePath);O.hideExcluded?B=B.filter(n=>!(app.metadataCache.isUserIgnored&&app.metadataCache.isUserIgnored(n.id))):B.forEach(n=>{app.metadataCache.isUserIgnored&&app.metadataCache.isUserIgnored(n.id)&&(n.score/=10)});let R=U.segments.filter(n=>n.value.startsWith("#")).map(n=>n.value);for(let n of R)for(let J of B)(J.tags??[]).includes(n)&&(J.score*=100);B=B.slice(0,50);let V=await Promise.all(B.map(async n=>await hU.getDocument(n.id))),d=U.getExactTerms();d.length&&(B=B.filter(n=>{let J=V.find(Z=>Z.path===n.id),W=J?.path.toLowerCase()??"",E=d0(J?.content??"").toLowerCase();return d.every(Z=>E.includes(Z)||W.includes(Z))}));let l=U.exclusions;return l.length&&(B=B.filter(n=>{let J=d0(V.find(W=>W.path===n.id)?.content??"").toLowerCase();return l.every(W=>!J.includes(W.value))})),B=B.filter((n,J,W)=>W.findIndex(E=>E.id===n.id)===J),this.previousResults=B,B}getMatches(U,Q,B){let R=null,V=[],d=0;for(;(R=Q.exec(U))!==null&&!(++d>=100);){let n=R[0];n&&V.push({match:n,offset:R.index})}let l=U.toLowerCase().indexOf(B.segmentsToStr());return l>-1&&V.unshift({offset:l,match:B.segmentsToStr()}),V}async getSuggestions(U,Q){let B;O.simpleSearch?B=await this.search(U,{prefixLength:1,singleFilePath:Q?.singleFilePath}):B=await this.search(U,{prefixLength:3,singleFilePath:Q?.singleFilePath});let R=U.segments.filter(l=>l.value.startsWith("#")).map(l=>l.value),V=await Promise.all(B.map(async l=>await hU.getDocument(l.id)));return B.map(l=>{let n=V.find(Z=>Z.path===l.id);n||(console.warn(`Omnisearch - Note "${l.id}" not in the live cache`),n={content:"",basename:l.id,path:l.id}),U.segments.forEach(Z=>{Z.value=Z.value.replace(/^#/,"")});let J=[...Object.keys(l.match),...U.segments.filter(Z=>Z.exact).map(Z=>Z.value),...R].filter(Z=>Z.length>1),W=this.getMatches(n.content,vF(J),U);return z({score:l.score,foundWords:J,matches:W},n)})}async writeToCache(){$R.Platform.isIosApp||await hU.writeMinisearchCache(this.minisearch,this.indexedDocuments)}},Sd=UV;Sd.options={tokenize:DE,processTerm:U=>(O.ignoreDiacritics?$F(U):U).toLowerCase(),idField:"path",fields:["basename","aliases","content","headings1","headings2","headings3"],storeFields:["tags"],logger(U,Q,B){B==="version_conflict"&&new $R.Notice("Omnisearch - Your index cache may be incorrect or corrupted. If this message keeps appearing, go to Settings to clear the cache.",5e3)}};var cU=new Sd;var ed=new Set;function vJ(F){ed.add(F)}async function GJ(){let F=[...ed].map(U=>U.path);F.length&&(cU.removeFromPaths(F),cU.addFromPaths(F),ed.clear())}function bJ(F,U,Q){let B=F.slice();return B[27]=U[Q],B[29]=Q,B}function pE(F){let U,Q,B;return{c(){U=j("button"),U.textContent="Create note"},m(R,V){UU(R,U,V),Q||(B=xU(U,"click",F[6]),Q=!0)},p:tU,d(R){R&&A(U),Q=!1,B()}}}function mE(F){let U,Q=O.showCreateButton&&pE(F);return{c(){Q&&Q.c(),U=LQ()},m(B,R){Q&&Q.m(B,R),UU(B,U,R)},p(B,R){O.showCreateButton&&Q.p(B,R)},d(B){Q&&Q.d(B),B&&A(U)}}}function XJ(F){let U,Q,B;return{c(){U=j("div"),Q=PU("\u23F3 Work in progress: "),B=PU(F[3]),UF(U,"text-align","center"),UF(U,"color","var(--text-accent)"),UF(U,"margin-top","10px")},m(R,V){UU(R,U,V),H(U,Q),H(U,B)},p(R,V){V&8&&jQ(B,R[3])},d(R){R&&A(U)}}}function OJ(F){let U,Q;function B(...R){return F[11](F[29],...R)}return U=new cJ({props:{selected:F[29]===F[0],note:F[27]}}),U.$on("mousemove",B),U.$on("click",F[5]),{c(){OU(U.$$.fragment)},m(R,V){YU(U,R,V),Q=!0},p(R,V){F=R;let d={};V&1&&(d.selected=F[29]===F[0]),V&4&&(d.note=F[27]),U.$set(d)},i(R){Q||(BU(U.$$.fragment,R),Q=!0)},o(R){RU(U.$$.fragment,R),Q=!1},d(R){pU(U,R)}}}function ME(F){let U;return{c(){U=PU("Searching...")},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function oE(F){let U;return{c(){U=PU("We found 0 result for your search here.")},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function iE(F){let U,Q,B,R=F[2],V=[];for(let W=0;WRU(V[W],1,1,()=>{V[W]=null});function l(W,E){if(!W[2].length&&W[1]&&!W[4])return oE;if(W[4])return ME}let n=l(F,-1),J=n&&n(F);return{c(){for(let W=0;W\u2191\u2193to navigate',n=FU(),J=j("div"),J.innerHTML=`alt \u2191\u2193 to cycle history`,W=FU(),E=j("div"),E.innerHTML='\u21B5to open',Z=FU(),e=j("div"),e.innerHTML=`\u21B9 - to switch to In-File Search`,r=FU(),c=j("br"),h=FU(),N=j("div"),k=j("span"),k.textContent=`${ul()} \u21B5`,t=FU(),S=j("span"),S.textContent="to open in a new pane",a=FU(),T=j("div"),T.innerHTML=`shift \u21B5 + to switch to In-File Search`,r=FU(),c=j("br"),h=FU(),N=j("div"),k=j("span"),k.textContent=`${xl()} \u21B5`,t=FU(),S=j("span"),S.textContent="to open in a new pane",a=FU(),T=j("div"),T.innerHTML=`shift \u21B5 to create`,C=FU(),D=j("div"),D.innerHTML=`ctrl shift \u21B5 to create in a new pane`,p=FU(),o=j("br"),s=FU(),v=j("div"),v.innerHTML=`alt \u21B5 to insert a link`,y=FU(),i=j("div"),i.innerHTML=`ctrl+h - to toggle excerpts`,w=FU(),g=j("div"),g.innerHTML='escto close',P(l,"class","prompt-instruction"),P(J,"class","prompt-instruction"),P(E,"class","prompt-instruction"),P(e,"class","prompt-instruction"),P(k,"class","prompt-instruction-command"),P(N,"class","prompt-instruction"),P(T,"class","prompt-instruction"),P(D,"class","prompt-instruction"),P(v,"class","prompt-instruction"),P(i,"class","prompt-instruction"),P(g,"class","prompt-instruction"),P(d,"class","prompt-instructions")},m(m,Y){YU(U,m,Y),UU(m,Q,Y),M&&M.m(m,Y),UU(m,B,Y),YU(R,m,Y),UU(m,V,Y),UU(m,d,Y),H(d,l),H(d,n),H(d,J),H(d,W),H(d,E),H(d,Z),H(d,e),H(d,r),H(d,c),H(d,h),H(d,N),H(N,k),H(N,t),H(N,S),H(d,a),H(d,T),H(d,C),H(d,D),H(d,p),H(d,o),H(d,s),H(d,v),H(d,y),H(d,i),H(d,w),H(d,g),L=!0},p(m,[Y]){let I={};Y&2&&(I.initialValue=m[1]),Y&1073741824&&(I.$$scope={dirty:Y,ctx:m}),U.$set(I),m[3]?M?M.p(m,Y):(M=bJ(m),M.c(),M.m(B.parentNode,B)):M&&(M.d(1),M=null);let X={};Y&1073741847&&(X.$$scope={dirty:Y,ctx:m}),R.$set(X)},i(m){L||(BU(U.$$.fragment,m),BU(R.$$.fragment,m),L=!0)},o(m){RU(U.$$.fragment,m),RU(R.$$.fragment,m),L=!1},d(m){pU(U,m),m&&A(Q),M&&M.d(m),m&&A(B),pU(R,m),m&&A(V),m&&A(d)}}}function sE(F,U,Q){let B,R;xB(F,sF,i=>Q(9,R=i));let{modal:V}=U,{previousQuery:d}=U,l=0,n=0,J,W=[],E,Z="",e=!0;KQ(async()=>{$.enable("vault"),$.on("vault","enter",k),$.on("vault","create-note",C),$.on("vault","open-in-new-pane",t),$.on("vault","insert-link",D),$.on("vault","tab",p),$.on("vault","arrow-up",()=>o(-1)),$.on("vault","arrow-down",()=>o(1)),$.on("vault","prev-search-history",r),$.on("vault","next-search-history",c),await vJ(),O.showPreviousQueryResults&&Q(7,d=(await hU.getSearchHistory())[0])}),gQ(()=>{$.disable("vault")});async function r(){let i=(await hU.getSearchHistory()).filter(w=>w);++n>=i.length&&(n=0),Q(7,d=i[n])}async function c(){let i=(await hU.getSearchHistory()).filter(w=>w);--n<0&&(n=i.length?i.length-1:0),Q(7,d=i[n])}async function h(){E=new JQ(J),Q(2,W=(await cU.getSuggestions(E)).sort((i,w)=>w.score-i.score)),Q(0,l=0),await s()}function N(i){!B||(i?.ctrlKey?t():k(),V.close())}function k(){!B||(a(B),V.close())}function t(){!B||(a(B,!0),V.close())}function S(){J&&hU.addToSearchHistory(J)}function a(i,w=!1){S(),PR(i,w)}async function T(i){await C()}async function C(i){if(J){try{await ZJ(J,i?.newLeaf)}catch(w){new zF.Notice(w.message);return}V.close()}}function D(){if(!B)return;let i=app.vault.getMarkdownFiles().find(m=>m.path===B.path),w=app.workspace.getActiveFile(),g=app.workspace.getActiveViewOfType(zF.MarkdownView);if(!g?.editor){new zF.Notice("Omnisearch - Error - No active editor",3e3);return}let L;i&&w?L=app.fileManager.generateMarkdownLink(i,w.path):L=`[[${B.basename}.${xl(B.path)}]]`;let M=g.editor.getCursor();g.editor.replaceRange(L,M,M),M.ch+=L.length,g.editor.setCursor(M),V.close()}function p(){if(!(B&&(TB(B?.path)||!B?.matches.length)))if(S(),V.close(),B){let i=app.vault.getAbstractFileByPath(B.path);i&&i instanceof zF.TFile&&new zQ(app,i,J).open()}else{let i=app.workspace.getActiveViewOfType(zF.MarkdownView);i&&new zQ(app,i.file,J).open()}}function o(i){Q(0,l=hR(l+i,W.length)),s()}async function s(){await lF(),B&&document.querySelector(`[data-result-id="${B.path}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}let v=i=>Q(1,J=i.detail),y=(i,w)=>Q(0,l=i);return F.$$set=i=>{"modal"in i&&Q(8,V=i.modal),"previousQuery"in i&&Q(7,d=i.previousQuery)},F.$$.update=()=>{if(F.$$.dirty&130){U:Q(1,J=J??d)}if(F.$$.dirty&2){U:J?(Q(2,W=[]),Q(4,e=!0),h().then(()=>{Q(4,e=!1)})):(Q(4,e=!1),Q(2,W=[]))}if(F.$$.dirty&5){U:B=W[l]}if(F.$$.dirty&512){U:switch(R){case KU.LoadingCache:Q(3,Z="Loading cache...");break;case KU.ReadingFiles:Q(3,Z="Reading files...");break;case KU.IndexingFiles:Q(3,Z="Indexing files...");break;case KU.WritingCache:h(),Q(3,Z="Updating cache...");break;default:h(),Q(3,Z="");break}}},[l,J,W,Z,e,N,T,d,V,R,v,y]}var OJ=class extends CU{constructor(U){super();mU(this,U,sE,iE,rU,{modal:8,previousQuery:7})}},HJ=OJ;var xJ=XU(require("obsidian"));function YE(F){let U,Q=F[2].replace(F[3],YF)+"";return{c(){U=j("div"),P(U,"class","omnisearch-result__body")},m(B,R){UU(B,U,R),U.innerHTML=Q},p(B,R){R&12&&Q!==(Q=B[2].replace(B[3],YF)+"")&&(U.innerHTML=Q)},d(B){B&&A(U)}}}function yE(F){let U,Q;return U=new qR({props:{id:F[0].toString(),selected:F[1],$$slots:{default:[YE]},$$scope:{ctx:F}}}),U.$on("mousemove",F[6]),U.$on("click",F[7]),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},p(B,[R]){let V={};R&1&&(V.id=B[0].toString()),R&2&&(V.selected=B[1]),R&268&&(V.$$scope={dirty:R,ctx:B}),U.$set(V)},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function vE(F,U,Q){let B,R,{offset:V}=U,{note:d}=U,{index:l=0}=U,{selected:n=!1}=U;function J(E){FF.call(this,F,E)}function W(E){FF.call(this,F,E)}return F.$$set=E=>{"offset"in E&&Q(4,V=E.offset),"note"in E&&Q(5,d=E.note),"index"in E&&Q(0,l=E.index),"selected"in E&&Q(1,n=E.selected)},F.$$.update=()=>{if(F.$$.dirty&32){U:Q(3,B=yF(d.foundWords))}if(F.$$.dirty&48){U:Q(2,R=cR(d?.content??"",V))}},[l,n,R,B,V,d,J,W]}var zJ=class extends CU{constructor(U){super();mU(this,U,vE,yE,rU,{offset:4,note:5,index:0,selected:1})}},uJ=zJ;function wJ(F,U,Q){let B=F.slice();return B[16]=U[Q],B[18]=Q,B}function GE(F){let U;return{c(){U=j("div"),U.textContent="We found 0 result for your search here.",UF(U,"text-align","center")},m(Q,B){UU(Q,U,B)},p:tU,i:tU,o:tU,d(Q){Q&&A(U)}}}function bE(F){let U,Q,B=F[4],R=[];for(let d=0;dRU(R[d],1,1,()=>{R[d]=null});return{c(){for(let d=0;d{d[W]=null}),jF(),Q=d[U],Q?Q.p(n,J):(Q=d[U]=V[U](n),Q.c()),BU(Q,1),Q.m(B.parentNode,B))},i(n){R||(BU(Q),R=!0)},o(n){RU(Q),R=!1},d(n){d[U].d(n),n&&A(B)}}}function OE(F){let U;return{c(){U=j("span"),U.textContent="to close"},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function HE(F){let U;return{c(){U=j("span"),U.textContent="to go back to Vault Search"},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function zE(F){let U,Q,B,R,V,d,l,n,J,W,E,Z,e,r,c;U=new KR({props:{placeholder:"Omnisearch - File",initialValue:F[1]}}),U.$on("input",F[10]),B=new gR({props:{$$slots:{default:[XE]},$$scope:{ctx:F}}});function h(t,S){return t[0]?HE:OE}let N=h(F,-1),k=N(F);return{c(){OU(U.$$.fragment),Q=FU(),OU(B.$$.fragment),R=FU(),V=j("div"),d=j("div"),d.innerHTML='\u2191\u2193to navigate',l=FU(),n=j("div"),n.innerHTML='\u21B5to open',J=FU(),W=j("div"),W.innerHTML=`\u21B9 - to switch to Vault Search`,E=FU(),Z=j("div"),e=j("span"),e.textContent="esc",r=FU(),k.c(),P(d,"class","prompt-instruction"),P(n,"class","prompt-instruction"),P(W,"class","prompt-instruction"),P(e,"class","prompt-instruction-command"),P(Z,"class","prompt-instruction"),P(V,"class","prompt-instructions")},m(t,S){YU(U,t,S),UU(t,Q,S),YU(B,t,S),UU(t,R,S),UU(t,V,S),H(V,d),H(V,l),H(V,n),H(V,J),H(V,W),H(V,E),H(V,Z),H(Z,e),H(Z,r),k.m(Z,null),c=!0},p(t,[S]){let a={};S&2&&(a.initialValue=t[1]),U.$set(a);let T={};S&524344&&(T.$$scope={dirty:S,ctx:t}),B.$set(T),N!==(N=h(t,S))&&(k.d(1),k=N(t),k&&(k.c(),k.m(Z,null)))},i(t){c||(BU(U.$$.fragment,t),BU(B.$$.fragment,t),c=!0)},o(t){RU(U.$$.fragment,t),RU(B.$$.fragment,t),c=!1},d(t){pU(U,t),t&&A(Q),pU(B,t),t&&A(R),t&&A(V),k.d()}}}function uE(F,U,Q){let B=F.find(R=>R.offset>U);return B?F.filter(R=>R.offset>U&&R.offset<=B.offset+Q):[]}function xE(F,U,Q){let{modal:B}=U,{parent:R=null}=U,{singleFilePath:V=""}=U,{previousQuery:d}=U,l,n=[],J=0,W,E;KQ(()=>{$.enable("infile"),$.on("infile","enter",c),$.on("infile","arrow-up",()=>e(-1)),$.on("infile","arrow-down",()=>e(1)),$.on("infile","tab",h)}),gQ(()=>{$.disable("infile")});function Z(t){let S=[],a=-1,T=0;for(;;){let C=uE(t,a,SB);if(!C.length||(a=C.last().offset,S.push(C),++T>100))break}return S}function e(t){Q(5,J=hR(J+t,n.length)),r()}async function r(){await lF(),document.querySelector(`[data-result-id="${J}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function c(t){if(W){B.close(),R&&R.close(),await PR(W,t?.ctrlKey);let S=app.workspace.getActiveViewOfType(xJ.MarkdownView);if(!S)return;let a=n[J]??0,T=S.editor.offsetToPos(a);T.ch=0,S.editor.setCursor(T),S.editor.scrollIntoView({from:{line:T.line-10,ch:0},to:{line:T.line+10,ch:0}})}}function h(){new WQ(app,d).open(),B.close()}let N=t=>Q(2,l=t.detail),k=(t,S)=>Q(5,J=t);return F.$$set=t=>{"modal"in t&&Q(7,B=t.modal),"parent"in t&&Q(0,R=t.parent),"singleFilePath"in t&&Q(8,V=t.singleFilePath),"previousQuery"in t&&Q(1,d=t.previousQuery)},F.$$.update=()=>{if(F.$$.dirty&2){U:Q(2,l=d??"")}if(F.$$.dirty&772){U:(async()=>{l&&(Q(9,E=new JQ(l)),Q(3,W=(await cU.getSuggestions(E,{singleFilePath:V}))[0]??null)),Q(5,J=0),await r()})()}if(F.$$.dirty&8){U:if(W){let t=Z(W.matches);Q(4,n=t.map(S=>Math.round((S.first().offset+S.last().offset)/2)))}}},[R,d,l,W,n,J,c,B,V,E,N,k]}var jJ=class extends CU{constructor(U){super();mU(this,U,xE,zE,rU,{modal:7,parent:0,singleFilePath:8,previousQuery:1})}},IJ=jJ;var kd=class extends fJ.Modal{constructor(U){super(U);this.modalEl.replaceChildren(),this.modalEl.addClass("omnisearch-modal","prompt"),this.modalEl.removeClass("modal"),this.modalEl.tabIndex=-1,this.scope.register([],"ArrowDown",Q=>{Q.preventDefault(),$.emit("arrow-down")}),this.scope.register([],"ArrowUp",Q=>{Q.preventDefault(),$.emit("arrow-up")});for(let Q of[{k:"J",dir:"down"},{k:"K",dir:"up"}])for(let B of["Ctrl","Mod"])this.scope.register([B],Q.k,R=>{this.app.vault.getConfig("vimMode")&&$.emit("arrow-"+Q.dir)});for(let Q of[{k:"N",dir:"down"},{k:"P",dir:"up"}])for(let B of["Ctrl","Mod"])this.scope.register([B],Q.k,R=>{this.app.vault.getConfig("vimMode")&&$.emit("arrow-"+Q.dir)});this.scope.register(["Mod"],"Enter",Q=>{Q.preventDefault(),$.emit("open-in-new-pane")}),this.scope.register(["Alt"],"Enter",Q=>{Q.preventDefault(),$.emit("insert-link")}),this.scope.register(["Shift"],"Enter",Q=>{Q.preventDefault(),$.emit("create-note")}),this.scope.register(["Ctrl","Shift"],"Enter",Q=>{Q.preventDefault(),$.emit("create-note",{newLeaf:!0})}),this.scope.register([],"Enter",Q=>{yl()||(Q.preventDefault(),$.emit("enter"))}),this.scope.register([],"Tab",Q=>{Q.preventDefault(),$.emit("tab")}),this.scope.register(["Alt"],"ArrowDown",Q=>{Q.preventDefault(),$.emit("next-search-history")}),this.scope.register(["Alt"],"ArrowUp",Q=>{Q.preventDefault(),$.emit("prev-search-history")}),this.scope.register(["Ctrl"],"H",Q=>{$.emit(aR.ToggleExcerpts)})}},WQ=class extends kd{constructor(U,Q){super(U);let B=new HJ({target:this.modalEl,props:{modal:this,previousQuery:Q}});this.onClose=()=>{B.$destroy()}}},zQ=class extends kd{constructor(U,Q,B="",R){super(U);let V=new IJ({target:this.modalEl,props:{modal:this,singleFilePath:Q.path,parent:R,previousQuery:B}});R&&R.containerEl.toggleVisibility(!1),this.onClose=()=>{R&&R.containerEl.toggleVisibility(!0),V.$destroy()}}};function wE(F){return F.map(U=>{let{score:Q,path:B,basename:R,foundWords:V,matches:d}=U;return{score:Q,path:B,basename:R,foundWords:V,matches:d.map(l=>({match:l.match,offset:l.offset}))}})}async function LE(F){let U=new JQ(F),Q=await cU.getSuggestions(U);return wE(Q)}var ad={search:LE};var Td=class extends uF.Plugin{async onload(){await ml(this),await IE(),await mQ.clearOldDatabases(),KE(this),O.ribbonIcon&&this.addRibbonButton(),this.addSettingTab(new B0(this)),$.disable("vault"),$.disable("infile"),$.on("global",aR.ToggleExcerpts,()=>{AF.set(!O.showExcerpt)}),this.addCommand({id:"show-modal",name:"Vault search",callback:()=>{new WQ(app).open()}}),this.addCommand({id:"show-modal-infile",name:"In-file search",editorCallback:(U,Q)=>{new zQ(app,Q.file).open()}}),app.workspace.onLayoutReady(async()=>{this.registerEvent(this.app.vault.on("create",async U=>{kB(U.path)&&(await hU.addToLiveCache(U.path),cU.addFromPaths([U.path]))})),this.registerEvent(this.app.vault.on("delete",U=>{hU.removeFromLiveCache(U.path),cU.removeFromPaths([U.path])})),this.registerEvent(this.app.vault.on("modify",async U=>{kB(U.path)&&(await hU.addToLiveCache(U.path),yJ(U))})),this.registerEvent(this.app.vault.on("rename",async(U,Q)=>{kB(U.path)&&(hU.removeFromLiveCache(Q),hU.addToLiveCache(U.path),cU.removeFromPaths([Q]),await cU.addFromPaths([U.path]))})),await jE()}),fE(this)}async onunload(){delete globalThis.omnisearch,await fU.clearCache()}addRibbonButton(){this.ribbonButton=this.addRibbonIcon("search","Omnisearch",U=>{new WQ(app).open()})}removeRibbonButton(){this.ribbonButton&&this.ribbonButton.parentNode?.removeChild(this.ribbonButton)}};async function jE(){console.time("Omnisearch - Indexing total time"),sF.set(KU.ReadingFiles);let F=app.vault.getFiles().filter(Q=>kB(Q.path));console.log(`Omnisearch - ${F.length} files total`),uF.Platform.isIosApp||(console.time("Omnisearch - Loading index from cache"),sF.set(KU.LoadingCache),await cU.loadCache(),console.timeEnd("Omnisearch - Loading index from cache"));let U=cU.getDiff(F.map(Q=>({path:Q.path,mtime:Q.stat.mtime})));U.toAdd.length&&console.log("Omnisearch - Total number of files to add/update: "+U.toAdd.length),U.toRemove.length&&console.log("Omnisearch - Total number of files to remove: "+U.toRemove.length),U.toAdd.length>=500&&new uF.Notice(`Omnisearch - ${U.toAdd.length} files need to be indexed. Obsidian may experience stutters and freezes during the process`,1e4),sF.set(KU.IndexingFiles),cU.removeFromPaths(U.toRemove.map(Q=>Q.path)),await cU.addFromPaths(U.toAdd.map(Q=>Q.path)),(U.toRemove.length||U.toAdd.length)&&(sF.set(KU.WritingCache),await cU.writeToCache()),console.timeEnd("Omnisearch - Indexing total time"),U.toAdd.length>=500&&new uF.Notice("Omnisearch - Your files have been indexed."),sF.set(KU.Done)}async function IE(){let F=[`${app.vault.configDir}/plugins/omnisearch/searchIndex.json`,`${app.vault.configDir}/plugins/omnisearch/notesCache.json`,`${app.vault.configDir}/plugins/omnisearch/notesCache.data`,`${app.vault.configDir}/plugins/omnisearch/searchIndex.data`,`${app.vault.configDir}/plugins/omnisearch/historyCache.json`,`${app.vault.configDir}/plugins/omnisearch/pdfCache.data`];for(let U of F)if(await app.vault.adapter.exists(U))try{await app.vault.adapter.remove(U)}catch{}}function fE(F){let U="1.8.0-beta.3";if(O.welcomeMessage!==U){let Q=new DocumentFragment;Q.createSpan({},B=>{B.innerHTML=`Omnisearch has been updated + to toggle excerpts`,w=FU(),g=j("div"),g.innerHTML='escto close',P(l,"class","prompt-instruction"),P(J,"class","prompt-instruction"),P(E,"class","prompt-instruction"),P(e,"class","prompt-instruction"),P(k,"class","prompt-instruction-command"),P(N,"class","prompt-instruction"),P(T,"class","prompt-instruction"),P(D,"class","prompt-instruction"),P(v,"class","prompt-instruction"),P(i,"class","prompt-instruction"),P(g,"class","prompt-instruction"),P(d,"class","prompt-instructions")},m(m,Y){YU(U,m,Y),UU(m,Q,Y),M&&M.m(m,Y),UU(m,B,Y),YU(R,m,Y),UU(m,V,Y),UU(m,d,Y),H(d,l),H(d,n),H(d,J),H(d,W),H(d,E),H(d,Z),H(d,e),H(d,r),H(d,c),H(d,h),H(d,N),H(N,k),H(N,t),H(N,S),H(d,a),H(d,T),H(d,C),H(d,D),H(d,p),H(d,o),H(d,s),H(d,v),H(d,y),H(d,i),H(d,w),H(d,g),L=!0},p(m,[Y]){let I={};Y&2&&(I.initialValue=m[1]),Y&1073741824&&(I.$$scope={dirty:Y,ctx:m}),U.$set(I),m[3]?M?M.p(m,Y):(M=XJ(m),M.c(),M.m(B.parentNode,B)):M&&(M.d(1),M=null);let X={};Y&1073741847&&(X.$$scope={dirty:Y,ctx:m}),R.$set(X)},i(m){L||(BU(U.$$.fragment,m),BU(R.$$.fragment,m),L=!0)},o(m){RU(U.$$.fragment,m),RU(R.$$.fragment,m),L=!1},d(m){pU(U,m),m&&A(Q),M&&M.d(m),m&&A(B),pU(R,m),m&&A(V),m&&A(d)}}}function YE(F,U,Q){let B,R;uB(F,YF,i=>Q(9,R=i));let{modal:V}=U,{previousQuery:d}=U,l=0,n=0,J,W=[],E,Z="",e=!0;KQ(async()=>{$.enable("vault"),$.on("vault","enter",k),$.on("vault","create-note",C),$.on("vault","open-in-new-pane",t),$.on("vault","insert-link",D),$.on("vault","tab",p),$.on("vault","arrow-up",()=>o(-1)),$.on("vault","arrow-down",()=>o(1)),$.on("vault","prev-search-history",r),$.on("vault","next-search-history",c),await GJ(),O.showPreviousQueryResults&&Q(7,d=(await hU.getSearchHistory())[0])}),gQ(()=>{$.disable("vault")});async function r(){let i=(await hU.getSearchHistory()).filter(w=>w);++n>=i.length&&(n=0),Q(7,d=i[n])}async function c(){let i=(await hU.getSearchHistory()).filter(w=>w);--n<0&&(n=i.length?i.length-1:0),Q(7,d=i[n])}async function h(){E=new JQ(J),Q(2,W=(await cU.getSuggestions(E)).sort((i,w)=>w.score-i.score)),Q(0,l=0),await s()}function N(i){!B||(i?.ctrlKey?t():k(),V.close())}function k(){!B||(a(B),V.close())}function t(){!B||(a(B,!0),V.close())}function S(){J&&hU.addToSearchHistory(J)}function a(i,w=!1){S(),PR(i,w)}async function T(i){await C()}async function C(i){if(J){try{await NJ(J,i?.newLeaf)}catch(w){new uF.Notice(w.message);return}V.close()}}function D(){if(!B)return;let i=app.vault.getMarkdownFiles().find(m=>m.path===B.path),w=app.workspace.getActiveFile(),g=app.workspace.getActiveViewOfType(uF.MarkdownView);if(!g?.editor){new uF.Notice("Omnisearch - Error - No active editor",3e3);return}let L;i&&w?L=app.fileManager.generateMarkdownLink(i,w.path):L=`[[${B.basename}.${wl(B.path)}]]`;let M=g.editor.getCursor();g.editor.replaceRange(L,M,M),M.ch+=L.length,g.editor.setCursor(M),V.close()}function p(){if(!(B&&(aB(B?.path)||!B?.matches.length)))if(S(),V.close(),B){let i=app.vault.getAbstractFileByPath(B.path);i&&i instanceof uF.TFile&&new uQ(app,i,J).open()}else{let i=app.workspace.getActiveViewOfType(uF.MarkdownView);i&&new uQ(app,i.file,J).open()}}function o(i){Q(0,l=hR(l+i,W.length)),s()}async function s(){await lF(),B&&document.querySelector(`[data-result-id="${B.path}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}let v=i=>Q(1,J=i.detail),y=(i,w)=>Q(0,l=i);return F.$$set=i=>{"modal"in i&&Q(8,V=i.modal),"previousQuery"in i&&Q(7,d=i.previousQuery)},F.$$.update=()=>{if(F.$$.dirty&130){U:Q(1,J=J??d)}if(F.$$.dirty&2){U:J?(Q(2,W=[]),Q(4,e=!0),h().then(()=>{Q(4,e=!1)})):(Q(4,e=!1),Q(2,W=[]))}if(F.$$.dirty&5){U:B=W[l]}if(F.$$.dirty&512){U:switch(R){case KU.LoadingCache:Q(3,Z="Loading cache...");break;case KU.ReadingFiles:Q(3,Z="Reading files...");break;case KU.IndexingFiles:Q(3,Z="Indexing files...");break;case KU.WritingCache:h(),Q(3,Z="Updating cache...");break;default:h(),Q(3,Z="");break}}},[l,J,W,Z,e,N,T,d,V,R,v,y]}var HJ=class extends CU{constructor(U){super();mU(this,U,YE,sE,rU,{modal:8,previousQuery:7})}},zJ=HJ;var wJ=XU(require("obsidian"));function yE(F){let U,Q=F[2].replace(F[3],yF)+"";return{c(){U=j("div"),P(U,"class","omnisearch-result__body")},m(B,R){UU(B,U,R),U.innerHTML=Q},p(B,R){R&12&&Q!==(Q=B[2].replace(B[3],yF)+"")&&(U.innerHTML=Q)},d(B){B&&A(U)}}}function vE(F){let U,Q;return U=new _R({props:{id:F[0].toString(),selected:F[1],$$slots:{default:[yE]},$$scope:{ctx:F}}}),U.$on("mousemove",F[6]),U.$on("click",F[7]),{c(){OU(U.$$.fragment)},m(B,R){YU(U,B,R),Q=!0},p(B,[R]){let V={};R&1&&(V.id=B[0].toString()),R&2&&(V.selected=B[1]),R&268&&(V.$$scope={dirty:R,ctx:B}),U.$set(V)},i(B){Q||(BU(U.$$.fragment,B),Q=!0)},o(B){RU(U.$$.fragment,B),Q=!1},d(B){pU(U,B)}}}function GE(F,U,Q){let B,R,{offset:V}=U,{note:d}=U,{index:l=0}=U,{selected:n=!1}=U;function J(E){FF.call(this,F,E)}function W(E){FF.call(this,F,E)}return F.$$set=E=>{"offset"in E&&Q(4,V=E.offset),"note"in E&&Q(5,d=E.note),"index"in E&&Q(0,l=E.index),"selected"in E&&Q(1,n=E.selected)},F.$$.update=()=>{if(F.$$.dirty&32){U:Q(3,B=vF(d.foundWords))}if(F.$$.dirty&48){U:Q(2,R=cR(d?.content??"",V))}},[l,n,R,B,V,d,J,W]}var uJ=class extends CU{constructor(U){super();mU(this,U,GE,vE,rU,{offset:4,note:5,index:0,selected:1})}},xJ=uJ;function LJ(F,U,Q){let B=F.slice();return B[16]=U[Q],B[18]=Q,B}function bE(F){let U;return{c(){U=j("div"),U.textContent="We found 0 result for your search here.",UF(U,"text-align","center")},m(Q,B){UU(Q,U,B)},p:tU,i:tU,o:tU,d(Q){Q&&A(U)}}}function XE(F){let U,Q,B=F[4],R=[];for(let d=0;dRU(R[d],1,1,()=>{R[d]=null});return{c(){for(let d=0;d{d[W]=null}),jF(),Q=d[U],Q?Q.p(n,J):(Q=d[U]=V[U](n),Q.c()),BU(Q,1),Q.m(B.parentNode,B))},i(n){R||(BU(Q),R=!0)},o(n){RU(Q),R=!1},d(n){d[U].d(n),n&&A(B)}}}function HE(F){let U;return{c(){U=j("span"),U.textContent="to close"},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function zE(F){let U;return{c(){U=j("span"),U.textContent="to go back to Vault Search"},m(Q,B){UU(Q,U,B)},d(Q){Q&&A(U)}}}function uE(F){let U,Q,B,R,V,d,l,n,J,W,E,Z,e,r,c;U=new KR({props:{placeholder:"Omnisearch - File",initialValue:F[1]}}),U.$on("input",F[10]),B=new gR({props:{$$slots:{default:[OE]},$$scope:{ctx:F}}});function h(t,S){return t[0]?zE:HE}let N=h(F,-1),k=N(F);return{c(){OU(U.$$.fragment),Q=FU(),OU(B.$$.fragment),R=FU(),V=j("div"),d=j("div"),d.innerHTML='\u2191\u2193to navigate',l=FU(),n=j("div"),n.innerHTML='\u21B5to open',J=FU(),W=j("div"),W.innerHTML=`\u21B9 + to switch to Vault Search`,E=FU(),Z=j("div"),e=j("span"),e.textContent="esc",r=FU(),k.c(),P(d,"class","prompt-instruction"),P(n,"class","prompt-instruction"),P(W,"class","prompt-instruction"),P(e,"class","prompt-instruction-command"),P(Z,"class","prompt-instruction"),P(V,"class","prompt-instructions")},m(t,S){YU(U,t,S),UU(t,Q,S),YU(B,t,S),UU(t,R,S),UU(t,V,S),H(V,d),H(V,l),H(V,n),H(V,J),H(V,W),H(V,E),H(V,Z),H(Z,e),H(Z,r),k.m(Z,null),c=!0},p(t,[S]){let a={};S&2&&(a.initialValue=t[1]),U.$set(a);let T={};S&524344&&(T.$$scope={dirty:S,ctx:t}),B.$set(T),N!==(N=h(t,S))&&(k.d(1),k=N(t),k&&(k.c(),k.m(Z,null)))},i(t){c||(BU(U.$$.fragment,t),BU(B.$$.fragment,t),c=!0)},o(t){RU(U.$$.fragment,t),RU(B.$$.fragment,t),c=!1},d(t){pU(U,t),t&&A(Q),pU(B,t),t&&A(R),t&&A(V),k.d()}}}function xE(F,U,Q){let B=F.find(R=>R.offset>U);return B?F.filter(R=>R.offset>U&&R.offset<=B.offset+Q):[]}function wE(F,U,Q){let{modal:B}=U,{parent:R=null}=U,{singleFilePath:V=""}=U,{previousQuery:d}=U,l,n=[],J=0,W,E;KQ(()=>{$.enable("infile"),$.on("infile","enter",c),$.on("infile","arrow-up",()=>e(-1)),$.on("infile","arrow-down",()=>e(1)),$.on("infile","tab",h)}),gQ(()=>{$.disable("infile")});function Z(t){let S=[],a=-1,T=0;for(;;){let C=xE(t,a,tB);if(!C.length||(a=C.last().offset,S.push(C),++T>100))break}return S}function e(t){Q(5,J=hR(J+t,n.length)),r()}async function r(){await lF(),document.querySelector(`[data-result-id="${J}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function c(t){if(W){B.close(),R&&R.close(),await PR(W,t?.ctrlKey);let S=app.workspace.getActiveViewOfType(wJ.MarkdownView);if(!S)return;let a=n[J]??0,T=S.editor.offsetToPos(a);T.ch=0,S.editor.setCursor(T),S.editor.scrollIntoView({from:{line:T.line-10,ch:0},to:{line:T.line+10,ch:0}})}}function h(){new WQ(app,d).open(),B.close()}let N=t=>Q(2,l=t.detail),k=(t,S)=>Q(5,J=t);return F.$$set=t=>{"modal"in t&&Q(7,B=t.modal),"parent"in t&&Q(0,R=t.parent),"singleFilePath"in t&&Q(8,V=t.singleFilePath),"previousQuery"in t&&Q(1,d=t.previousQuery)},F.$$.update=()=>{if(F.$$.dirty&2){U:Q(2,l=d??"")}if(F.$$.dirty&772){U:(async()=>{l&&(Q(9,E=new JQ(l)),Q(3,W=(await cU.getSuggestions(E,{singleFilePath:V}))[0]??null)),Q(5,J=0),await r()})()}if(F.$$.dirty&8){U:if(W){let t=Z(W.matches);Q(4,n=t.map(S=>Math.round((S.first().offset+S.last().offset)/2)))}}},[R,d,l,W,n,J,c,B,V,E,N,k]}var IJ=class extends CU{constructor(U){super();mU(this,U,wE,uE,rU,{modal:7,parent:0,singleFilePath:8,previousQuery:1})}},fJ=IJ;var kd=class extends KJ.Modal{constructor(U){super(U);this.modalEl.replaceChildren(),this.modalEl.addClass("omnisearch-modal","prompt"),this.modalEl.removeClass("modal"),this.modalEl.tabIndex=-1,this.scope.register([],"ArrowDown",Q=>{Q.preventDefault(),$.emit("arrow-down")}),this.scope.register([],"ArrowUp",Q=>{Q.preventDefault(),$.emit("arrow-up")});for(let Q of[{k:"J",dir:"down"},{k:"K",dir:"up"}])for(let B of["Ctrl","Mod"])this.scope.register([B],Q.k,R=>{this.app.vault.getConfig("vimMode")&&$.emit("arrow-"+Q.dir)});for(let Q of[{k:"N",dir:"down"},{k:"P",dir:"up"}])for(let B of["Ctrl","Mod"])this.scope.register([B],Q.k,R=>{this.app.vault.getConfig("vimMode")&&$.emit("arrow-"+Q.dir)});this.scope.register(["Mod"],"Enter",Q=>{Q.preventDefault(),$.emit("open-in-new-pane")}),this.scope.register(["Alt"],"Enter",Q=>{Q.preventDefault(),$.emit("insert-link")}),this.scope.register(["Shift"],"Enter",Q=>{Q.preventDefault(),$.emit("create-note")}),this.scope.register(["Ctrl","Shift"],"Enter",Q=>{Q.preventDefault(),$.emit("create-note",{newLeaf:!0})}),this.scope.register([],"Enter",Q=>{vl()||(Q.preventDefault(),$.emit("enter"))}),this.scope.register([],"Tab",Q=>{Q.preventDefault(),$.emit("tab")}),this.scope.register(["Alt"],"ArrowDown",Q=>{Q.preventDefault(),$.emit("next-search-history")}),this.scope.register(["Alt"],"ArrowUp",Q=>{Q.preventDefault(),$.emit("prev-search-history")}),this.scope.register(["Ctrl"],"H",Q=>{$.emit(kR.ToggleExcerpts)})}},WQ=class extends kd{constructor(U,Q){super(U);let B=new zJ({target:this.modalEl,props:{modal:this,previousQuery:Q}});this.onClose=()=>{B.$destroy()}}},uQ=class extends kd{constructor(U,Q,B="",R){super(U);let V=new fJ({target:this.modalEl,props:{modal:this,singleFilePath:Q.path,parent:R,previousQuery:B}});R&&R.containerEl.toggleVisibility(!1),this.onClose=()=>{R&&R.containerEl.toggleVisibility(!0),V.$destroy()}}};function LE(F){return F.map(U=>{let{score:Q,path:B,basename:R,foundWords:V,matches:d}=U;return{score:Q,path:B,basename:R,foundWords:V,matches:d.map(l=>({match:l.match,offset:l.offset}))}})}async function jE(F){let U=new JQ(F),Q=await cU.getSuggestions(U);return LE(Q)}var ad={search:jE};var Td=class extends DF.Plugin{async onload(){await Ml(this),await fE(),await MQ.clearOldDatabases(),gE(this),O.ribbonIcon&&this.addRibbonButton(),this.addSettingTab(new B0(this)),$.disable("vault"),$.disable("infile"),$.on("global",kR.ToggleExcerpts,()=>{AF.set(!O.showExcerpt)}),this.addCommand({id:"show-modal",name:"Vault search",callback:()=>{new WQ(app).open()}}),this.addCommand({id:"show-modal-infile",name:"In-file search",editorCallback:(U,Q)=>{new uQ(app,Q.file).open()}}),app.workspace.onLayoutReady(async()=>{this.registerEvent(this.app.vault.on("create",async U=>{eB(U.path)&&(await hU.addToLiveCache(U.path),cU.addFromPaths([U.path]))})),this.registerEvent(this.app.vault.on("delete",U=>{hU.removeFromLiveCache(U.path),cU.removeFromPaths([U.path])})),this.registerEvent(this.app.vault.on("modify",async U=>{eB(U.path)&&(await hU.addToLiveCache(U.path),vJ(U))})),this.registerEvent(this.app.vault.on("rename",async(U,Q)=>{eB(U.path)&&(hU.removeFromLiveCache(Q),hU.addToLiveCache(U.path),cU.removeFromPaths([Q]),await cU.addFromPaths([U.path]))})),await IE()}),KE(this)}async onunload(){delete globalThis.omnisearch,await fU.clearCache()}addRibbonButton(){this.ribbonButton=this.addRibbonIcon("search","Omnisearch",U=>{new WQ(app).open()})}removeRibbonButton(){this.ribbonButton&&this.ribbonButton.parentNode?.removeChild(this.ribbonButton)}};async function IE(){console.time("Omnisearch - Indexing total time"),YF.set(KU.ReadingFiles);let F=app.vault.getFiles().filter(Q=>eB(Q.path));console.log(`Omnisearch - ${F.length} files total`),DF.Platform.isIosApp||(console.time("Omnisearch - Loading index from cache"),YF.set(KU.LoadingCache),await cU.loadCache(),console.timeEnd("Omnisearch - Loading index from cache"));let U=cU.getDiff(F.map(Q=>({path:Q.path,mtime:Q.stat.mtime})));U.toAdd.length&&console.log("Omnisearch - Total number of files to add/update: "+U.toAdd.length),U.toRemove.length&&console.log("Omnisearch - Total number of files to remove: "+U.toRemove.length),U.toAdd.length>=1e3&&!DF.Platform.isIosApp&&new DF.Notice(`Omnisearch - ${U.toAdd.length} files need to be indexed. Obsidian may experience stutters and freezes during the process`,1e4),YF.set(KU.IndexingFiles),cU.removeFromPaths(U.toRemove.map(Q=>Q.path)),await cU.addFromPaths(U.toAdd.map(Q=>Q.path)),(U.toRemove.length||U.toAdd.length)&&(YF.set(KU.WritingCache),await cU.writeToCache()),console.timeEnd("Omnisearch - Indexing total time"),U.toAdd.length>=1e3&&new DF.Notice("Omnisearch - Your files have been indexed."),YF.set(KU.Done)}async function fE(){let F=[`${app.vault.configDir}/plugins/omnisearch/searchIndex.json`,`${app.vault.configDir}/plugins/omnisearch/notesCache.json`,`${app.vault.configDir}/plugins/omnisearch/notesCache.data`,`${app.vault.configDir}/plugins/omnisearch/searchIndex.data`,`${app.vault.configDir}/plugins/omnisearch/historyCache.json`,`${app.vault.configDir}/plugins/omnisearch/pdfCache.data`];for(let U of F)if(await app.vault.adapter.exists(U))try{await app.vault.adapter.remove(U)}catch{}}function KE(F){let U="1.8.0-beta.3";if(O.welcomeMessage!==U){let Q=new DocumentFragment;Q.createSpan({},B=>{B.innerHTML=`Omnisearch has been updated You can now enable "Images Indexing" to use Optical Character Recognition on your scanned documents -\u{1F50E}\u{1F5BC}`}),new uF.Notice(Q,3e4)}O.welcomeMessage=U,F.saveData(O)}function KE(F){F.registerObsidianProtocolHandler("omnisearch",U=>{new WQ(app,U.query).open()}),globalThis.omnisearch=ad,app.plugins.plugins.omnisearch.api=ad} +\u{1F50E}\u{1F5BC}`}),new DF.Notice(Q,3e4)}O.welcomeMessage=U,F.saveData(O)}function gE(F){F.registerObsidianProtocolHandler("omnisearch",U=>{new WQ(app,U.query).open()}),globalThis.omnisearch=ad,app.plugins.plugins.omnisearch.api=ad} diff --git a/.obsidian/plugins/omnisearch/manifest.json b/.obsidian/plugins/omnisearch/manifest.json index 19ae751..4d56e87 100644 --- a/.obsidian/plugins/omnisearch/manifest.json +++ b/.obsidian/plugins/omnisearch/manifest.json @@ -1,10 +1 @@ -{ - "id": "omnisearch", - "name": "Omnisearch", - "version": "1.9.0", - "minAppVersion": "1.0.0", - "description": "A search engine that just works", - "author": "Simon Cambier", - "authorUrl": "https://github.com/scambier/obsidian-omnisearch", - "isDesktopOnly": false -} +{"id":"omnisearch","name":"Omnisearch","version":"1.9.1","minAppVersion":"1.0.0","description":"A search engine that just works","author":"Simon Cambier","authorUrl":"https://github.com/scambier/obsidian-omnisearch","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/quickadd/main.js b/.obsidian/plugins/quickadd/main.js index 99a8167..8e3e58d 100644 --- a/.obsidian/plugins/quickadd/main.js +++ b/.obsidian/plugins/quickadd/main.js @@ -28096,10 +28096,19 @@ var TemplateChoice = class extends Choice { super(name, "Template" /* Template */); this.templatePath = ""; this.fileNameFormat = { enabled: false, format: "" }; - this.folder = { enabled: false, folders: [], chooseWhenCreatingNote: false, createInSameFolderAsActiveFile: false }; + this.folder = { + enabled: false, + folders: [], + chooseWhenCreatingNote: false, + createInSameFolderAsActiveFile: false + }; this.appendLink = false; this.incrementFileName = false; - this.openFileInNewTab = { enabled: false, direction: "vertical" /* vertical */, focus: true }; + this.openFileInNewTab = { + enabled: false, + direction: "vertical" /* vertical */, + focus: true + }; this.openFile = false; this.openFileInMode = "default"; } @@ -28123,12 +28132,26 @@ var CaptureChoice = class extends Choice { this.appendLink = false; this.captureTo = ""; this.captureToActiveFile = false; - this.createFileIfItDoesntExist = { enabled: false, createWithTemplate: false, template: "" }; + this.createFileIfItDoesntExist = { + enabled: false, + createWithTemplate: false, + template: "" + }; this.format = { enabled: false, format: "" }; - this.insertAfter = { enabled: false, after: "", insertAtEnd: false, createIfNotFound: false, createIfNotFoundLocation: "top" }; + this.insertAfter = { + enabled: false, + after: "", + insertAtEnd: false, + createIfNotFound: false, + createIfNotFoundLocation: "top" + }; this.prepend = false; this.task = false; - this.openFileInNewTab = { enabled: false, direction: "vertical" /* vertical */, focus: true }; + this.openFileInNewTab = { + enabled: false, + direction: "vertical" /* vertical */, + focus: true + }; this.openFile = false; this.openFileInMode = "default"; } @@ -28156,22 +28179,20 @@ var MultiChoice = class extends Choice { // src/gui/GenericYesNoPrompt/GenericYesNoPrompt.ts var import_obsidian2 = require("obsidian"); var GenericYesNoPrompt = class extends import_obsidian2.Modal { - constructor(app, header, text2) { - super(app); + constructor(app2, header, text2) { + super(app2); this.header = header; this.text = text2; this.didSubmit = false; - this.waitForClose = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.waitForClose = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.open(); this.display(); } - static Prompt(app, header, text2) { - const newPromptModal = new GenericYesNoPrompt(app, header, text2); + static Prompt(app2, header, text2) { + const newPromptModal = new GenericYesNoPrompt(app2, header, text2); return newPromptModal.waitForClose; } display() { @@ -28179,7 +28200,9 @@ var GenericYesNoPrompt = class extends import_obsidian2.Modal { this.contentEl.empty(); this.titleEl.textContent = this.header; this.contentEl.createEl("p", { text: this.text }); - const buttonsDiv = this.contentEl.createDiv({ cls: "yesNoPromptButtonContainer" }); + const buttonsDiv = this.contentEl.createDiv({ + cls: "yesNoPromptButtonContainer" + }); const noButton = new import_obsidian2.ButtonComponent(buttonsDiv).setButtonText("No").onClick(() => this.submit(false)); const yesButton = new import_obsidian2.ButtonComponent(buttonsDiv).setButtonText("Yes").onClick(() => this.submit(true)).setWarning(); yesButton.buttonEl.focus(); @@ -29848,7 +29871,10 @@ var Suggest = class { } } setSelectedItem(selectedIndex, scrollIntoView) { - const normalizedIndex = wrapAround(selectedIndex, this.suggestions.length); + const normalizedIndex = wrapAround( + selectedIndex, + this.suggestions.length + ); const prevSelectedSuggestion = this.suggestions[this.selectedItem]; const selectedSuggestion = this.suggestions[normalizedIndex]; prevSelectedSuggestion == null ? void 0 : prevSelectedSuggestion.removeClass("is-selected"); @@ -29860,8 +29886,8 @@ var Suggest = class { } }; var TextInputSuggest = class { - constructor(app, inputEl) { - this.app = app; + constructor(app2, inputEl) { + this.app = app2; this.inputEl = inputEl; this.scope = new import_obsidian3.Scope(); this.suggestEl = createDiv("suggestion-container"); @@ -31316,15 +31342,17 @@ function buildFileMap(files, unresolvedLinkNames) { } return fileMap; } -function getAliasesForFile(file, app) { +function getAliasesForFile(file, app2) { var _a, _b, _c, _d; - const fileMetadata = app.metadataCache.getFileCache(file); + const fileMetadata = app2.metadataCache.getFileCache(file); const fileMetaAlias = (_d = (_c = (_a = fileMetadata == null ? void 0 : fileMetadata.frontmatter) == null ? void 0 : _a.alias) != null ? _c : (_b = fileMetadata == null ? void 0 : fileMetadata.frontmatter) == null ? void 0 : _b.aliases) != null ? _d : ""; let aliases = []; if (typeof fileMetaAlias === "string" && fileMetaAlias) { aliases.push(fileMetaAlias); } else if (Array.isArray(fileMetaAlias)) { - const filteredAliases = fileMetaAlias.filter((v) => v && typeof v === "string"); + const filteredAliases = fileMetaAlias.filter( + (v) => v && typeof v === "string" + ); if (filteredAliases.length) { aliases.push(...filteredAliases); } @@ -31332,14 +31360,17 @@ function getAliasesForFile(file, app) { return { ...file, alias: aliases }; } var SilentFileSuggester = class extends TextInputSuggest { - constructor(app, inputEl) { - super(app, inputEl); - this.app = app; + constructor(app2, inputEl) { + super(app2, inputEl); + this.app = app2; this.inputEl = inputEl; this.lastInput = ""; - const filesAndAliases = app.vault.getMarkdownFiles().map((file) => getAliasesForFile(file, app)); - const unresolvedLinkNames = this.getUnresolvedLinkNames(app); - const fileAndAliasMap = buildFileMap(filesAndAliases, unresolvedLinkNames); + const filesAndAliases = app2.vault.getMarkdownFiles().map((file) => getAliasesForFile(file, app2)); + const unresolvedLinkNames = this.getUnresolvedLinkNames(app2); + const fileAndAliasMap = buildFileMap( + filesAndAliases, + unresolvedLinkNames + ); this.fileNames = [...fileAndAliasMap.keys()]; this.fileMap = fileAndAliasMap; } @@ -31401,34 +31432,76 @@ var SilentFileSuggester = class extends TextInputSuggest { let insertedEndPosition = 0; const suggestionItem = this.fileMap.get(item); if (suggestionItem.type === 0 /* File */) { - insertedEndPosition = this.makeLinkObsidianMethod(suggestionItem == null ? void 0 : suggestionItem.file, currentInputValue, cursorPosition, lastInputLength); + insertedEndPosition = this.makeLinkObsidianMethod( + suggestionItem == null ? void 0 : suggestionItem.file, + currentInputValue, + cursorPosition, + lastInputLength + ); } else if (suggestionItem.type === 1 /* Alias */) { - insertedEndPosition = this.makeLinkObsidianMethod(suggestionItem == null ? void 0 : suggestionItem.file, currentInputValue, cursorPosition, lastInputLength, item); + insertedEndPosition = this.makeLinkObsidianMethod( + suggestionItem == null ? void 0 : suggestionItem.file, + currentInputValue, + cursorPosition, + lastInputLength, + item + ); } else { - insertedEndPosition = this.makeLinkManually(currentInputValue, item.replace(/.md$/, ""), cursorPosition, lastInputLength); + insertedEndPosition = this.makeLinkManually( + currentInputValue, + item.replace(/.md$/, ""), + cursorPosition, + lastInputLength + ); } this.inputEl.trigger("input"); this.close(); - this.inputEl.setSelectionRange(insertedEndPosition, insertedEndPosition); + this.inputEl.setSelectionRange( + insertedEndPosition, + insertedEndPosition + ); } makeLinkObsidianMethod(linkFile, currentInputValue, cursorPosition, lastInputLength, alias) { - const file = this.app.vault.getAbstractFileByPath(linkFile.path); - const link = this.app.fileManager.generateMarkdownLink(file, "", "", alias != null ? alias : ""); - this.inputEl.value = this.getNewInputValueForFileLink(currentInputValue, link, cursorPosition, lastInputLength); + const file = this.app.vault.getAbstractFileByPath( + linkFile.path + ); + const link = this.app.fileManager.generateMarkdownLink( + file, + "", + "", + alias != null ? alias : "" + ); + this.inputEl.value = this.getNewInputValueForFileLink( + currentInputValue, + link, + cursorPosition, + lastInputLength + ); return cursorPosition - lastInputLength + link.length + 2; } makeLinkManually(currentInputValue, item, cursorPosition, lastInputLength) { - this.inputEl.value = this.getNewInputValueForFileName(currentInputValue, item, cursorPosition, lastInputLength); + this.inputEl.value = this.getNewInputValueForFileName( + currentInputValue, + item, + cursorPosition, + lastInputLength + ); return cursorPosition - lastInputLength + item.length + 2; } getNewInputValueForFileLink(currentInputElValue, selectedItem, cursorPosition, lastInputLength) { - return `${currentInputElValue.substr(0, cursorPosition - lastInputLength - 2)}${selectedItem}${currentInputElValue.substr(cursorPosition)}`; + return `${currentInputElValue.substr( + 0, + cursorPosition - lastInputLength - 2 + )}${selectedItem}${currentInputElValue.substr(cursorPosition)}`; } getNewInputValueForFileName(currentInputElValue, selectedItem, cursorPosition, lastInputLength) { - return `${currentInputElValue.substr(0, cursorPosition - lastInputLength)}${selectedItem}]]${currentInputElValue.substr(cursorPosition)}`; + return `${currentInputElValue.substr( + 0, + cursorPosition - lastInputLength + )}${selectedItem}]]${currentInputElValue.substr(cursorPosition)}`; } - getUnresolvedLinkNames(app) { - const unresolvedLinks = app.metadataCache.unresolvedLinks; + getUnresolvedLinkNames(app2) { + const unresolvedLinks = app2.metadataCache.unresolvedLinks; const unresolvedLinkNames = /* @__PURE__ */ new Set(); for (const sourceFileName in unresolvedLinks) { for (const unresolvedLink in unresolvedLinks[sourceFileName]) { @@ -31441,12 +31514,12 @@ var SilentFileSuggester = class extends TextInputSuggest { // src/gui/suggesters/tagSuggester.ts var SilentTagSuggester = class extends TextInputSuggest { - constructor(app, inputEl) { - super(app, inputEl); - this.app = app; + constructor(app2, inputEl) { + super(app2, inputEl); + this.app = app2; this.inputEl = inputEl; this.lastInput = ""; - this.tags = Object.keys(app.metadataCache.getTags()); + this.tags = Object.keys(app2.metadataCache.getTags()); } getSuggestions(inputStr) { const cursorPosition = this.inputEl.selectionStart; @@ -31457,8 +31530,13 @@ var SilentTagSuggester = class extends TextInputSuggest { } const tagInput = tagMatch[1]; this.lastInput = tagInput; - const suggestions = this.tags.filter((tag) => tag.toLowerCase().contains(tagInput.toLowerCase())); - const fuse = new Fuse(suggestions, { findAllMatches: true, threshold: 0.8 }); + const suggestions = this.tags.filter( + (tag) => tag.toLowerCase().contains(tagInput.toLowerCase()) + ); + const fuse = new Fuse(suggestions, { + findAllMatches: true, + threshold: 0.8 + }); const search2 = fuse.search(this.lastInput).map((value) => value.item); return search2; } @@ -31470,21 +31548,32 @@ var SilentTagSuggester = class extends TextInputSuggest { const lastInputLength = this.lastInput.length; const currentInputValue = this.inputEl.value; let insertedEndPosition = 0; - this.inputEl.value = this.getNewInputValueForTag(currentInputValue, item, cursorPosition, lastInputLength); + this.inputEl.value = this.getNewInputValueForTag( + currentInputValue, + item, + cursorPosition, + lastInputLength + ); insertedEndPosition = cursorPosition - lastInputLength + item.length - 1; this.inputEl.trigger("input"); this.close(); - this.inputEl.setSelectionRange(insertedEndPosition, insertedEndPosition); + this.inputEl.setSelectionRange( + insertedEndPosition, + insertedEndPosition + ); } getNewInputValueForTag(currentInputElValue, selectedItem, cursorPosition, lastInputLength) { - return `${currentInputElValue.substr(0, cursorPosition - lastInputLength - 1)}${selectedItem}${currentInputElValue.substr(cursorPosition)}`; + return `${currentInputElValue.substr( + 0, + cursorPosition - lastInputLength - 1 + )}${selectedItem}${currentInputElValue.substr(cursorPosition)}`; } }; // src/gui/GenericInputPrompt/GenericInputPrompt.ts var GenericInputPrompt = class extends import_obsidian4.Modal { - constructor(app, header, placeholder, value) { - super(app); + constructor(app2, header, placeholder, value) { + super(app2); this.header = header; this.didSubmit = false; this.submitClickCallback = (evt) => this.submit(); @@ -31497,19 +31586,28 @@ var GenericInputPrompt = class extends import_obsidian4.Modal { }; this.placeholder = placeholder; this.input = value; - this.waitForClose = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.waitForClose = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.display(); this.open(); - this.fileSuggester = new SilentFileSuggester(app, this.inputComponent.inputEl); - this.tagSuggester = new SilentTagSuggester(app, this.inputComponent.inputEl); + this.fileSuggester = new SilentFileSuggester( + app2, + this.inputComponent.inputEl + ); + this.tagSuggester = new SilentTagSuggester( + app2, + this.inputComponent.inputEl + ); } - static Prompt(app, header, placeholder, value) { - const newPromptModal = new GenericInputPrompt(app, header, placeholder, value); + static Prompt(app2, header, placeholder, value) { + const newPromptModal = new GenericInputPrompt( + app2, + header, + placeholder, + value + ); return newPromptModal.waitForClose; } display() { @@ -31517,7 +31615,11 @@ var GenericInputPrompt = class extends import_obsidian4.Modal { this.contentEl.empty(); this.titleEl.textContent = this.header; const mainContentContainer = this.contentEl.createDiv(); - this.inputComponent = this.createInputField(mainContentContainer, this.placeholder, this.input); + this.inputComponent = this.createInputField( + mainContentContainer, + this.placeholder, + this.input + ); this.createButtonBar(mainContentContainer); } createInputField(container, placeholder, value) { @@ -31533,8 +31635,16 @@ var GenericInputPrompt = class extends import_obsidian4.Modal { } createButtonBar(mainContentContainer) { const buttonBarContainer = mainContentContainer.createDiv(); - this.createButton(buttonBarContainer, "Ok", this.submitClickCallback).setCta().buttonEl.style.marginRight = "0"; - this.createButton(buttonBarContainer, "Cancel", this.cancelClickCallback); + this.createButton( + buttonBarContainer, + "Ok", + this.submitClickCallback + ).setCta().buttonEl.style.marginRight = "0"; + this.createButton( + buttonBarContainer, + "Cancel", + this.cancelClickCallback + ); buttonBarContainer.style.display = "flex"; buttonBarContainer.style.flexDirection = "row-reverse"; buttonBarContainer.style.justifyContent = "flex-start"; @@ -31554,7 +31664,10 @@ var GenericInputPrompt = class extends import_obsidian4.Modal { this.resolvePromise(this.input); } removeInputListener() { - this.inputComponent.inputEl.removeEventListener("keydown", this.submitEnterCallback); + this.inputComponent.inputEl.removeEventListener( + "keydown", + this.submitEnterCallback + ); } onOpen() { super.onOpen(); @@ -31590,9 +31703,9 @@ var log = new LogManager(); // src/gui/suggesters/genericTextSuggester.ts var GenericTextSuggester = class extends TextInputSuggest { - constructor(app, inputEl, items) { - super(app, inputEl); - this.app = app; + constructor(app2, inputEl, items) { + super(app2, inputEl); + this.app = app2; this.inputEl = inputEl; this.items = items; } @@ -31621,16 +31734,14 @@ var GenericTextSuggester = class extends TextInputSuggest { // src/gui/ChoiceBuilder/choiceBuilder.ts var ChoiceBuilder = class extends import_obsidian5.Modal { - constructor(app) { - super(app); + constructor(app2) { + super(app2); this.didSubmit = false; this.svelteElements = []; - this.waitForClose = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.waitForClose = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.containerEl.addClass("quickAddModal"); this.open(); } @@ -31645,17 +31756,28 @@ var ChoiceBuilder = class extends import_obsidian5.Modal { searchComponent.setValue(value); searchComponent.setPlaceholder("File path"); const markdownFiles = this.app.vault.getMarkdownFiles().map((f) => f.path); - new GenericTextSuggester(this.app, searchComponent.inputEl, markdownFiles); + new GenericTextSuggester( + this.app, + searchComponent.inputEl, + markdownFiles + ); searchComponent.onChange(onChangeCallback); }); return component; } addCenteredChoiceNameHeader(choice) { - const headerEl = this.contentEl.createEl("h2", { cls: "choiceNameHeader" }); + const headerEl = this.contentEl.createEl("h2", { + cls: "choiceNameHeader" + }); headerEl.setText(choice.name); headerEl.addEventListener("click", async (ev) => { try { - const newName = await GenericInputPrompt.Prompt(this.app, choice.name, "Choice name", choice.name); + const newName = await GenericInputPrompt.Prompt( + this.app, + choice.name, + "Choice name", + choice.name + ); if (newName !== choice.name) { choice.name = newName; headerEl.setText(newName); @@ -31869,18 +31991,21 @@ var FolderList_default = FolderList; // src/utility.ts var import_obsidian6 = require("obsidian"); -function getTemplater(app) { - return app.plugins.plugins["templater-obsidian"]; +function getTemplater(app2) { + return app2.plugins.plugins["templater-obsidian"]; } -async function replaceTemplaterTemplatesInCreatedFile(app, file, force = false) { - const templater = getTemplater(app); +async function replaceTemplaterTemplatesInCreatedFile(app2, file, force = false) { + var _a; + const templater = getTemplater(app2); if (templater && (force || !(templater == null ? void 0 : templater.settings["trigger_on_file_creation"]))) { - const active_file = app.workspace.getActiveFile(); - await templater.templater.overwrite_file_commands(file); + const active_file = app2.workspace.getActiveFile(); + if ((_a = templater == null ? void 0 : templater.templater) == null ? void 0 : _a.overwrite_file_commands) { + await templater.templater.overwrite_file_commands(file); + } } } -async function templaterParseTemplate(app, templateContent, targetFile) { - const templater = getTemplater(app); +async function templaterParseTemplate(app2, templateContent, targetFile) { + const templater = getTemplater(app2); if (!templater) return templateContent; return await templater.templater.parse_template( @@ -31888,38 +32013,38 @@ async function templaterParseTemplate(app, templateContent, targetFile) { templateContent ); } -function getCoreTemplatesPath(app) { - const internalTemplatePlugin = app.internalPlugins.plugins.templates; +function getCoreTemplatesPath(app2) { + const internalTemplatePlugin = app2.internalPlugins.plugins.templates; if (internalTemplatePlugin) { const templateFolderPath = internalTemplatePlugin.instance.options.folder; if (templateFolderPath) return templateFolderPath; } } -function getTemplaterTemplatesPath(app) { - const templater = getTemplater(app); +function getTemplaterTemplatesPath(app2) { + const templater = getTemplater(app2); if (templater) { const templateFolderPath = templater.settings["template_folder"]; if (templateFolderPath) return templateFolderPath; } } -function getTemplateFiles(app) { +function getTemplateFiles(app2) { let templateFiles = /* @__PURE__ */ new Set(); - const markdownFiles = app.vault.getMarkdownFiles(); - const coreTemplatesPath = getCoreTemplatesPath(app); - const templaterTemplatesPath = getTemplaterTemplatesPath(app); + const markdownFiles = app2.vault.getMarkdownFiles(); + const coreTemplatesPath = getCoreTemplatesPath(app2); + const templaterTemplatesPath = getTemplaterTemplatesPath(app2); markdownFiles.forEach((file) => { if (file.path.contains(coreTemplatesPath) || file.path.contains(templaterTemplatesPath)) templateFiles.add(file); }); return [...templateFiles]; } -function getTemplatePaths(app) { - return getTemplateFiles(app).map((file) => file.path); +function getTemplatePaths(app2) { + return getTemplateFiles(app2).map((file) => file.path); } -function getNaturalLanguageDates(app) { - return app.plugins.plugins["nldates-obsidian"]; +function getNaturalLanguageDates(app2) { + return app2.plugins.plugins["nldates-obsidian"]; } function getDate(input) { let duration; @@ -31928,9 +32053,9 @@ function getDate(input) { } return (input == null ? void 0 : input.format) ? window.moment().add(duration).format(input.format) : window.moment().add(duration).format("YYYY-MM-DD"); } -function appendToCurrentLine(toAppend, app) { +function appendToCurrentLine(toAppend, app2) { try { - const activeView = app.workspace.getActiveViewOfType(import_obsidian6.MarkdownView); + const activeView = app2.workspace.getActiveViewOfType(import_obsidian6.MarkdownView); if (!activeView) { log.logError(`unable to append '${toAppend}' to current line.`); return; @@ -31940,17 +32065,17 @@ function appendToCurrentLine(toAppend, app) { log.logError(`unable to append '${toAppend}' to current line.`); } } -function findObsidianCommand(app, commandId) { - return app.commands.findCommand(commandId); +function findObsidianCommand(app2, commandId) { + return app2.commands.findCommand(commandId); } -function deleteObsidianCommand(app, commandId) { - if (findObsidianCommand(app, commandId)) { - delete app.commands.commands[commandId]; - delete app.commands.editorCommands[commandId]; +function deleteObsidianCommand(app2, commandId) { + if (findObsidianCommand(app2, commandId)) { + delete app2.commands.commands[commandId]; + delete app2.commands.editorCommands[commandId]; } } -function getAllFolderPathsInVault(app) { - return app.vault.getAllLoadedFiles().filter((f) => f instanceof import_obsidian6.TFolder).map((folder) => folder.path); +function getAllFolderPathsInVault(app2) { + return app2.vault.getAllLoadedFiles().filter((f) => f instanceof import_obsidian6.TFolder).map((folder) => folder.path); } function getUserScriptMemberAccess(fullMemberPath) { const fullMemberArray = fullMemberPath.split("::"); @@ -31976,16 +32101,16 @@ function getLinesInString(input) { function escapeRegExp(text2) { return text2.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } -async function openFile(app, file, optional) { +async function openFile(app2, file, optional) { let leaf; if (optional.openInNewTab && optional.direction) { - leaf = app.workspace.getLeaf("split", optional.direction); + leaf = app2.workspace.getLeaf("split", optional.direction); } else { - leaf = app.workspace.getLeaf("tab"); + leaf = app2.workspace.getLeaf("tab"); } await leaf.openFile(file); if (optional == null ? void 0 : optional.focus) { - app.workspace.setActiveLeaf(leaf, { focus: optional.focus }); + app2.workspace.setActiveLeaf(leaf, { focus: optional.focus }); } if (optional == null ? void 0 : optional.mode) { const leafViewState = leaf.getViewState(); @@ -31998,8 +32123,8 @@ async function openFile(app, file, optional) { }); } } -async function getUserScript(command, app) { - const file = app.vault.getAbstractFileByPath(command.path); +async function getUserScript(command, app2) { + const file = app2.vault.getAbstractFileByPath(command.path); if (!file) { log.logError(`failed to load file ${command.path}.`); return; @@ -32008,7 +32133,7 @@ async function getUserScript(command, app) { let req = (s) => window.require && window.require(s); let exp = {}; let mod = { exports: exp }; - const fileContent = await app.vault.read(file); + const fileContent = await app2.vault.read(file); const fn2 = window.eval( `(function(require, module, exports) { ${fileContent} })` @@ -32050,7 +32175,11 @@ var Formatter = class { if (offsetIsInt) offset2 = parseInt(offsetString); } - output = this.replacer(output, DATE_REGEX, getDate({ offset: offset2 })); + output = this.replacer( + output, + DATE_REGEX, + getDate({ offset: offset2 }) + ); } while (DATE_REGEX_FORMATTED.test(output)) { const dateMatch = DATE_REGEX_FORMATTED.exec(output); @@ -32064,7 +32193,11 @@ var Formatter = class { if (offsetIsInt) offset2 = parseInt(offsetString); } - output = this.replacer(output, DATE_REGEX_FORMATTED, getDate({ format: format3, offset: offset2 })); + output = this.replacer( + output, + DATE_REGEX_FORMATTED, + getDate({ format: format3, offset: offset2 }) + ); } return output; } @@ -32081,7 +32214,11 @@ var Formatter = class { const currentFilePathLink = this.getCurrentFileLink(); let output = input; while (LINK_TO_CURRENT_FILE_REGEX.test(output)) - output = this.replacer(output, LINK_TO_CURRENT_FILE_REGEX, currentFilePathLink); + output = this.replacer( + output, + LINK_TO_CURRENT_FILE_REGEX, + currentFilePathLink + ); return output; } async replaceVariableInString(input) { @@ -32095,11 +32232,21 @@ var Formatter = class { if (!this.getVariableValue(variableName)) { const suggestedValues = variableName.split(","); if (suggestedValues.length === 1) - this.variables.set(variableName, await this.promptForVariable(variableName)); + this.variables.set( + variableName, + await this.promptForVariable(variableName) + ); else - this.variables.set(variableName, await this.suggestForValue(suggestedValues)); + this.variables.set( + variableName, + await this.suggestForValue(suggestedValues) + ); } - output = this.replacer(output, VARIABLE_REGEX, this.getVariableValue(variableName)); + output = this.replacer( + output, + VARIABLE_REGEX, + this.getVariableValue(variableName) + ); } else { break; } @@ -32119,7 +32266,11 @@ var Formatter = class { while (MACRO_REGEX.test(output)) { const macroName = MACRO_REGEX.exec(output)[1]; const macroOutput = await this.getMacroValue(macroName); - output = this.replacer(output, MACRO_REGEX, macroOutput ? macroOutput.toString() : ""); + output = this.replacer( + output, + MACRO_REGEX, + macroOutput ? macroOutput.toString() : "" + ); } return output; } @@ -32131,14 +32282,30 @@ var Formatter = class { const dateFormat = match[2]; if (variableName && dateFormat) { if (!this.variables.get(variableName)) { - this.variables.set(variableName, await this.promptForVariable(variableName)); - const parseAttempt = this.getNaturalLanguageDates().parseDate(this.variables.get(variableName)); + this.variables.set( + variableName, + await this.promptForVariable(variableName) + ); + const parseAttempt = this.getNaturalLanguageDates().parseDate( + this.variables.get(variableName) + ); if (parseAttempt) - this.variables.set(variableName, parseAttempt.moment.format(dateFormat)); + this.variables.set( + variableName, + parseAttempt.moment.format(dateFormat) + ); else - throw new Error(`unable to parse date variable ${this.variables.get(variableName)}`); + throw new Error( + `unable to parse date variable ${this.variables.get( + variableName + )}` + ); } - output = this.replacer(output, DATE_VARIABLE_REGEX, this.variables.get(variableName)); + output = this.replacer( + output, + DATE_VARIABLE_REGEX, + this.variables.get(variableName) + ); } else { break; } @@ -32172,9 +32339,9 @@ var Formatter = class { // src/formatters/fileNameDisplayFormatter.ts var FileNameDisplayFormatter = class extends Formatter { - constructor(app) { + constructor(app2) { super(); - this.app = app; + this.app = app2; } async format(input) { let output = input; @@ -32220,32 +32387,48 @@ var FileNameDisplayFormatter = class extends Formatter { // src/gui/suggesters/formatSyntaxSuggester.ts var FormatSyntaxSuggester = class extends TextInputSuggest { - constructor(app, inputEl, plugin, suggestForFileNames = false) { - super(app, inputEl); - this.app = app; + constructor(app2, inputEl, plugin, suggestForFileNames = false) { + super(app2, inputEl); + this.app = app2; this.inputEl = inputEl; this.plugin = plugin; this.suggestForFileNames = suggestForFileNames; this.lastInput = ""; - this.macroNames = this.plugin.settings.macros.map((macro) => macro.name); + this.macroNames = this.plugin.settings.macros.map( + (macro) => macro.name + ); this.templatePaths = getTemplatePaths(this.app); } getSuggestions(inputStr) { const cursorPosition = this.inputEl.selectionStart; const lookbehind = 15; - const inputBeforeCursor = inputStr.substr(cursorPosition - lookbehind, lookbehind); + const inputBeforeCursor = inputStr.substr( + cursorPosition - lookbehind, + lookbehind + ); let suggestions = []; - this.processToken(inputBeforeCursor, (match, type, suggestion) => { - this.lastInput = match[0]; - this.lastInputType = type; - suggestions.push(suggestion); - if (this.lastInputType === 8 /* Template */) { - suggestions.push(...this.templatePaths.map((templatePath) => `{{TEMPLATE:${templatePath}}}`)); + this.processToken( + inputBeforeCursor, + (match, type, suggestion) => { + this.lastInput = match[0]; + this.lastInputType = type; + suggestions.push(suggestion); + if (this.lastInputType === 8 /* Template */) { + suggestions.push( + ...this.templatePaths.map( + (templatePath) => `{{TEMPLATE:${templatePath}}}` + ) + ); + } + if (this.lastInputType === 7 /* Macro */) { + suggestions.push( + ...this.macroNames.map( + (macroName) => `{{MACRO:${macroName}}}` + ) + ); + } } - if (this.lastInputType === 7 /* Macro */) { - suggestions.push(...this.macroNames.map((macroName) => `{{MACRO:${macroName}}}`)); - } - }); + ); return suggestions; } selectSuggestion(item) { @@ -32254,7 +32437,10 @@ var FormatSyntaxSuggester = class extends TextInputSuggest { const currentInputValue = this.inputEl.value; let insertedEndPosition = 0; const insert2 = (text2, offset2 = 0) => { - return `${currentInputValue.substr(0, cursorPosition - lastInputLength + offset2)}${text2}${currentInputValue.substr(cursorPosition)}`; + return `${currentInputValue.substr( + 0, + cursorPosition - lastInputLength + offset2 + )}${text2}${currentInputValue.substr(cursorPosition)}`; }; this.processToken(item, (match, type, suggestion) => { if (item.contains(suggestion)) { @@ -32268,7 +32454,10 @@ var FormatSyntaxSuggester = class extends TextInputSuggest { }); this.inputEl.trigger("input"); this.close(); - this.inputEl.setSelectionRange(insertedEndPosition, insertedEndPosition); + this.inputEl.setSelectionRange( + insertedEndPosition, + insertedEndPosition + ); } renderSuggestion(value, el) { if (value) @@ -32277,7 +32466,11 @@ var FormatSyntaxSuggester = class extends TextInputSuggest { processToken(input, callback) { const dateFormatMatch = DATE_FORMAT_SYNTAX_SUGGEST_REGEX.exec(input); if (dateFormatMatch) - callback(dateFormatMatch, 1 /* DateFormat */, "{{DATE:}}"); + callback( + dateFormatMatch, + 1 /* DateFormat */, + "{{DATE:}}" + ); const dateMatch = DATE_SYNTAX_SUGGEST_REGEX.exec(input); if (dateMatch) callback(dateMatch, 0 /* Date */, DATE_SYNTAX); @@ -32289,20 +32482,36 @@ var FormatSyntaxSuggester = class extends TextInputSuggest { callback(valueMatch, 3 /* Value */, VALUE_SYNTAX); const mathValueMatch = MATH_VALUE_SYNTAX_SUGGEST_REGEX.exec(input); if (mathValueMatch) - callback(mathValueMatch, 9 /* MathValue */, MATH_VALUE_SYNTAX); + callback( + mathValueMatch, + 9 /* MathValue */, + MATH_VALUE_SYNTAX + ); const variableMatch = VARIABLE_SYNTAX_SUGGEST_REGEX.exec(input); if (variableMatch) callback(variableMatch, 5 /* Variable */, "{{VALUE:}}"); const variableDateMatch = VARIABLE_DATE_SYNTAX_SUGGEST_REGEX.exec(input); if (variableDateMatch) - callback(variableDateMatch, 2 /* VariableDate */, "{{VDATE:}}"); + callback( + variableDateMatch, + 2 /* VariableDate */, + "{{VDATE:}}" + ); if (!this.suggestForFileNames) { const linkCurrentMatch = LINKCURRENT_SYNTAX_SUGGEST_REGEX.exec(input); if (linkCurrentMatch) - callback(linkCurrentMatch, 6 /* LinkCurrent */, LINKCURRENT_SYNTAX); + callback( + linkCurrentMatch, + 6 /* LinkCurrent */, + LINKCURRENT_SYNTAX + ); const templateMatch = TEMPLATE_SYNTAX_SUGGEST_REGEX.exec(input); if (templateMatch) - callback(templateMatch, 8 /* Template */, "{{TEMPLATE:"); + callback( + templateMatch, + 8 /* Template */, + "{{TEMPLATE:" + ); const macroMatch = MACRO_SYNTAX_SUGGEST_REGEX.exec(input); if (macroMatch) callback(macroMatch, 7 /* Macro */, "{{MACRO:"); @@ -32312,9 +32521,9 @@ var FormatSyntaxSuggester = class extends TextInputSuggest { // src/gui/suggesters/exclusiveSuggester.ts var ExclusiveSuggester = class extends TextInputSuggest { - constructor(app, inputEl, suggestItems, currentItems) { - super(app, inputEl); - this.app = app; + constructor(app2, inputEl, suggestItems, currentItems) { + super(app2, inputEl); + this.app = app2; this.inputEl = inputEl; this.suggestItems = suggestItems; this.currentItems = currentItems; @@ -32338,8 +32547,8 @@ var ExclusiveSuggester = class extends TextInputSuggest { // src/gui/ChoiceBuilder/templateChoiceBuilder.ts var TemplateChoiceBuilder = class extends ChoiceBuilder { - constructor(app, choice, plugin) { - super(app); + constructor(app2, choice, plugin) { + super(app2); this.plugin = plugin; this.choice = choice; this.display(); @@ -32378,7 +32587,9 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { }); const formatDisplay = this.contentEl.createEl("span"); const displayFormatter = new FileNameDisplayFormatter(this.app); - (async () => formatDisplay.textContent = await displayFormatter.format(this.choice.fileNameFormat.format))(); + (async () => formatDisplay.textContent = await displayFormatter.format( + this.choice.fileNameFormat.format + ))(); const formatInput = new import_obsidian7.TextComponent(this.contentEl); formatInput.setPlaceholder("File name format"); textField = formatInput; @@ -32386,14 +32597,23 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { formatInput.inputEl.style.marginBottom = "8px"; formatInput.setValue(this.choice.fileNameFormat.format).setDisabled(!this.choice.fileNameFormat.enabled).onChange(async (value) => { this.choice.fileNameFormat.format = value; - formatDisplay.textContent = await displayFormatter.format(value); + formatDisplay.textContent = await displayFormatter.format( + value + ); }); - new FormatSyntaxSuggester(this.app, textField.inputEl, this.plugin, true); + new FormatSyntaxSuggester( + this.app, + textField.inputEl, + this.plugin, + true + ); } addFolderSetting() { var _a, _b, _c, _d; const folderSetting = new import_obsidian7.Setting(this.contentEl); - folderSetting.setName("Create in folder").setDesc("Create the file in the specified folder. If multiple folders are specified, you will be prompted for which folder to create the file in.").addToggle((toggle) => { + folderSetting.setName("Create in folder").setDesc( + "Create the file in the specified folder. If multiple folders are specified, you will be prompted for which folder to create the file in." + ).addToggle((toggle) => { toggle.setValue(this.choice.folder.enabled); toggle.onChange((value) => { this.choice.folder.enabled = value; @@ -32402,8 +32622,12 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { }); if (this.choice.folder.enabled) { if (!((_a = this.choice.folder) == null ? void 0 : _a.createInSameFolderAsActiveFile)) { - const chooseFolderWhenCreatingNoteContainer = this.contentEl.createDiv("chooseFolderWhenCreatingNoteContainer"); - chooseFolderWhenCreatingNoteContainer.createEl("span", { text: "Choose folder when creating a new note" }); + const chooseFolderWhenCreatingNoteContainer = this.contentEl.createDiv( + "chooseFolderWhenCreatingNoteContainer" + ); + chooseFolderWhenCreatingNoteContainer.createEl("span", { + text: "Choose folder when creating a new note" + }); const chooseFolderWhenCreatingNote = new import_obsidian7.ToggleComponent(chooseFolderWhenCreatingNoteContainer); chooseFolderWhenCreatingNote.setValue((_b = this.choice.folder) == null ? void 0 : _b.chooseWhenCreatingNote).onChange((value) => { this.choice.folder.chooseWhenCreatingNote = value; @@ -32415,10 +32639,14 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { } if (!((_d = this.choice.folder) == null ? void 0 : _d.chooseWhenCreatingNote)) { const createInSameFolderAsActiveFileSetting = new import_obsidian7.Setting(this.contentEl); - createInSameFolderAsActiveFileSetting.setName("Create in same folder as active file").setDesc("Creates the file in the same folder as the currently active file. Will not create the file if there is no active file.").addToggle( + createInSameFolderAsActiveFileSetting.setName("Create in same folder as active file").setDesc( + "Creates the file in the same folder as the currently active file. Will not create the file if there is no active file." + ).addToggle( (toggle) => { var _a2; - return toggle.setValue((_a2 = this.choice.folder) == null ? void 0 : _a2.createInSameFolderAsActiveFile).onChange((value) => { + return toggle.setValue( + (_a2 = this.choice.folder) == null ? void 0 : _a2.createInSameFolderAsActiveFile + ).onChange((value) => { this.choice.folder.createInSameFolderAsActiveFile = value; this.reload(); }); @@ -32442,12 +32670,19 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { } }); this.svelteElements.push(folderListEl); - const inputContainer = folderSelectionContainer.createDiv("folderInputContainer"); + const inputContainer = folderSelectionContainer.createDiv( + "folderInputContainer" + ); const folderInput = new import_obsidian7.TextComponent(inputContainer); folderInput.inputEl.style.width = "100%"; folderInput.setPlaceholder("Folder path"); const allFolders = getAllFolderPathsInVault(this.app); - const suggester = new ExclusiveSuggester(this.app, folderInput.inputEl, allFolders, this.choice.folder.folders); + const suggester = new ExclusiveSuggester( + this.app, + folderInput.inputEl, + allFolders, + this.choice.folder.folders + ); const addFolder = () => { const input = folderInput.inputEl.value.trim(); if (this.choice.folder.folders.some((folder) => folder === input)) { @@ -32480,7 +32715,9 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { const incrementFileNameSetting = new import_obsidian7.Setting(this.contentEl); incrementFileNameSetting.setName("Increment file name").setDesc("If the file already exists, increment the file name.").addToggle((toggle) => { toggle.setValue(this.choice.incrementFileName); - toggle.onChange((value) => this.choice.incrementFileName = value); + toggle.onChange( + (value) => this.choice.incrementFileName = value + ); }); } addOpenFileSetting() { @@ -32491,29 +32728,35 @@ var TemplateChoiceBuilder = class extends ChoiceBuilder { this.choice.openFile = value; this.reload(); }); - }).addDropdown( - (dropdown) => { - dropdown.selectEl.style.marginLeft = "10px"; - if (!this.choice.openFileInMode) - this.choice.openFileInMode = "default"; - dropdown.addOption("source", "Source").addOption("preview", "Preview").addOption("default", "Default").setValue(this.choice.openFileInMode).onChange((value) => this.choice.openFileInMode = value); - } - ); + }).addDropdown((dropdown) => { + dropdown.selectEl.style.marginLeft = "10px"; + if (!this.choice.openFileInMode) + this.choice.openFileInMode = "default"; + dropdown.addOption("source", "Source").addOption("preview", "Preview").addOption("default", "Default").setValue(this.choice.openFileInMode).onChange( + (value) => this.choice.openFileInMode = value + ); + }); } addOpenFileInNewTabSetting() { const newTabSetting = new import_obsidian7.Setting(this.contentEl); newTabSetting.setName("New split").setDesc("Split your editor and open file in new split.").addToggle((toggle) => { toggle.setValue(this.choice.openFileInNewTab.enabled); - toggle.onChange((value) => this.choice.openFileInNewTab.enabled = value); + toggle.onChange( + (value) => this.choice.openFileInNewTab.enabled = value + ); }).addDropdown((dropdown) => { dropdown.selectEl.style.marginLeft = "10px"; dropdown.addOption("vertical" /* vertical */, "Vertical"); dropdown.addOption("horizontal" /* horizontal */, "Horizontal"); dropdown.setValue(this.choice.openFileInNewTab.direction); - dropdown.onChange((value) => this.choice.openFileInNewTab.direction = value); + dropdown.onChange( + (value) => this.choice.openFileInNewTab.direction = value + ); }); new import_obsidian7.Setting(this.contentEl).setName("Focus new pane").setDesc("Focus the opened tab immediately after opening").addToggle( - (toggle) => toggle.setValue(this.choice.openFileInNewTab.focus).onChange((value) => this.choice.openFileInNewTab.focus = value) + (toggle) => toggle.setValue(this.choice.openFileInNewTab.focus).onChange( + (value) => this.choice.openFileInNewTab.focus = value + ) ); } }; @@ -32524,8 +32767,8 @@ var import_obsidian18 = require("obsidian"); // src/engine/QuickAddEngine.ts var import_obsidian8 = require("obsidian"); var QuickAddEngine = class { - constructor(app) { - this.app = app; + constructor(app2) { + this.app = app2; } async createFolder(folder) { const folderExists = await this.app.vault.adapter.exists(folder); @@ -32535,7 +32778,10 @@ var QuickAddEngine = class { } formatFilePath(folderPath, fileName) { const actualFolderPath = folderPath ? `${folderPath}/` : ""; - const formattedFileName = fileName.replace(MARKDOWN_FILE_EXTENSION_REGEX, ""); + const formattedFileName = fileName.replace( + MARKDOWN_FILE_EXTENSION_REGEX, + "" + ); return `${actualFolderPath}${formattedFileName}.md`; } async fileExists(filePath) { @@ -32572,20 +32818,18 @@ var QuickAddEngine = class { // src/gui/GenericSuggester/genericSuggester.ts var import_obsidian9 = require("obsidian"); var GenericSuggester = class extends import_obsidian9.FuzzySuggestModal { - constructor(app, displayItems, items) { - super(app); + constructor(app2, displayItems, items) { + super(app2); this.displayItems = displayItems; this.items = items; - this.promise = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.promise = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.open(); } - static Suggest(app, displayItems, items) { - const newSuggester = new GenericSuggester(app, displayItems, items); + static Suggest(app2, displayItems, items) { + const newSuggester = new GenericSuggester(app2, displayItems, items); return newSuggester.promise; } getItemText(item) { @@ -32615,22 +32859,24 @@ var obsidian = __toESM(require("obsidian")); // src/gui/GenericCheckboxPrompt/genericCheckboxPrompt.ts var import_obsidian10 = require("obsidian"); var GenericCheckboxPrompt = class extends import_obsidian10.Modal { - constructor(app, items, selectedItems = []) { - super(app); + constructor(app2, items, selectedItems = []) { + super(app2); this.items = items; this.selectedItems = selectedItems; this._selectedItems = [...selectedItems]; - this.promise = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.promise = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.display(); this.open(); } - static Open(app, items, selectedItems) { - const newSuggester = new GenericCheckboxPrompt(app, items, selectedItems); + static Open(app2, items, selectedItems) { + const newSuggester = new GenericCheckboxPrompt( + app2, + items, + selectedItems + ); return newSuggester.promise; } display() { @@ -32645,25 +32891,35 @@ var GenericCheckboxPrompt = class extends import_obsidian10.Modal { this.rejectPromise("no input given."); } addCheckboxRows() { - const rowContainer = this.contentEl.createDiv("checkboxRowContainer"); + const rowContainer = this.contentEl.createDiv( + "checkboxRowContainer" + ); this.items.forEach((item) => this.addCheckboxRow(item, rowContainer)); } addCheckboxRow(item, container) { const checkboxRow = container.createDiv("checkboxRow"); - const text2 = checkboxRow.createEl("span", { text: item }); + const text2 = checkboxRow.createEl("span", { + text: item + }); const checkbox = new import_obsidian10.ToggleComponent(checkboxRow); checkbox.setTooltip(`Toggle ${item}`).setValue(this._selectedItems.contains(item)).onChange((value) => { if (value) this._selectedItems.push(item); else { - const index = this._selectedItems.findIndex((value2) => item === value2); + const index = this._selectedItems.findIndex( + (value2) => item === value2 + ); this._selectedItems.splice(index, 1); } }); } addSubmitButton() { - const submitButtonContainer = this.contentEl.createDiv("submitButtonContainer"); - const submitButton = new import_obsidian10.ButtonComponent(submitButtonContainer); + const submitButtonContainer = this.contentEl.createDiv( + "submitButtonContainer" + ); + const submitButton = new import_obsidian10.ButtonComponent( + submitButtonContainer + ); submitButton.setButtonText("Submit").setCta().onClick((evt) => { this.resolved = true; this.resolvePromise(this._selectedItems); @@ -32678,8 +32934,8 @@ var import_obsidian12 = require("obsidian"); // src/gui/GenericWideInputPrompt/GenericWideInputPrompt.ts var import_obsidian11 = require("obsidian"); var GenericWideInputPrompt = class extends import_obsidian11.Modal { - constructor(app, header, placeholder, value) { - super(app); + constructor(app2, header, placeholder, value) { + super(app2); this.header = header; this.didSubmit = false; this.submitClickCallback = (evt) => this.submit(); @@ -32692,19 +32948,28 @@ var GenericWideInputPrompt = class extends import_obsidian11.Modal { }; this.placeholder = placeholder; this.input = value; - this.waitForClose = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.waitForClose = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); this.display(); this.open(); - this.fileSuggester = new SilentFileSuggester(app, this.inputComponent.inputEl); - this.tagSuggester = new SilentTagSuggester(app, this.inputComponent.inputEl); + this.fileSuggester = new SilentFileSuggester( + app2, + this.inputComponent.inputEl + ); + this.tagSuggester = new SilentTagSuggester( + app2, + this.inputComponent.inputEl + ); } - static Prompt(app, header, placeholder, value) { - const newPromptModal = new GenericWideInputPrompt(app, header, placeholder, value); + static Prompt(app2, header, placeholder, value) { + const newPromptModal = new GenericWideInputPrompt( + app2, + header, + placeholder, + value + ); return newPromptModal.waitForClose; } display() { @@ -32712,7 +32977,11 @@ var GenericWideInputPrompt = class extends import_obsidian11.Modal { this.contentEl.empty(); this.titleEl.textContent = this.header; const mainContentContainer = this.contentEl.createDiv(); - this.inputComponent = this.createInputField(mainContentContainer, this.placeholder, this.input); + this.inputComponent = this.createInputField( + mainContentContainer, + this.placeholder, + this.input + ); this.createButtonBar(mainContentContainer); } createInputField(container, placeholder, value) { @@ -32728,8 +32997,16 @@ var GenericWideInputPrompt = class extends import_obsidian11.Modal { } createButtonBar(mainContentContainer) { const buttonBarContainer = mainContentContainer.createDiv(); - this.createButton(buttonBarContainer, "Ok", this.submitClickCallback).setCta().buttonEl.style.marginRight = "0"; - this.createButton(buttonBarContainer, "Cancel", this.cancelClickCallback); + this.createButton( + buttonBarContainer, + "Ok", + this.submitClickCallback + ).setCta().buttonEl.style.marginRight = "0"; + this.createButton( + buttonBarContainer, + "Cancel", + this.cancelClickCallback + ); buttonBarContainer.style.display = "flex"; buttonBarContainer.style.flexDirection = "row-reverse"; buttonBarContainer.style.justifyContent = "flex-start"; @@ -32749,7 +33026,10 @@ var GenericWideInputPrompt = class extends import_obsidian11.Modal { this.resolvePromise(this.input); } removeInputListener() { - this.inputComponent.inputEl.removeEventListener("keydown", this.submitEnterCallback); + this.inputComponent.inputEl.removeEventListener( + "keydown", + this.submitEnterCallback + ); } onOpen() { super.onOpen(); @@ -32765,22 +33045,22 @@ var GenericWideInputPrompt = class extends import_obsidian11.Modal { // src/quickAddApi.ts var QuickAddApi = class { - static GetApi(app, plugin, choiceExecutor) { + static GetApi(app2, plugin, choiceExecutor) { return { inputPrompt: (header, placeholder, value) => { - return this.inputPrompt(app, header, placeholder, value); + return this.inputPrompt(app2, header, placeholder, value); }, wideInputPrompt: (header, placeholder, value) => { - return this.wideInputPrompt(app, header, placeholder, value); + return this.wideInputPrompt(app2, header, placeholder, value); }, yesNoPrompt: (header, text2) => { - return this.yesNoPrompt(app, header, text2); + return this.yesNoPrompt(app2, header, text2); }, suggester: (displayItems, actualItems) => { - return this.suggester(app, displayItems, actualItems); + return this.suggester(app2, displayItems, actualItems); }, checkboxPrompt: (items, selectedItems) => { - return this.checkboxPrompt(app, items, selectedItems); + return this.checkboxPrompt(app2, items, selectedItems); }, executeChoice: async (choiceName, variables) => { const choice = plugin.getChoiceByName(choiceName); @@ -32795,7 +33075,11 @@ var QuickAddApi = class { choiceExecutor.variables.clear(); }, format: async (input) => { - return new CompleteFormatter(app, plugin, choiceExecutor).formatFileContent(input); + return new CompleteFormatter( + app2, + plugin, + choiceExecutor + ).formatFileContent(input); }, utility: { getClipboard: async () => { @@ -32805,9 +33089,11 @@ var QuickAddApi = class { return await navigator.clipboard.writeText(text2); }, getSelectedText: () => { - const activeView = app.workspace.getActiveViewOfType(import_obsidian12.MarkdownView); + const activeView = app2.workspace.getActiveViewOfType(import_obsidian12.MarkdownView); if (!activeView) { - log.logError("no active view - could not get selected text."); + log.logError( + "no active view - could not get selected text." + ); return; } if (!activeView.editor.somethingSelected()) { @@ -32830,28 +33116,38 @@ var QuickAddApi = class { } }; } - static async inputPrompt(app, header, placeholder, value) { + static async inputPrompt(app2, header, placeholder, value) { try { - return await GenericInputPrompt.Prompt(app, header, placeholder, value); + return await GenericInputPrompt.Prompt( + app2, + header, + placeholder, + value + ); } catch (e) { return void 0; } } - static async wideInputPrompt(app, header, placeholder, value) { + static async wideInputPrompt(app2, header, placeholder, value) { try { - return await GenericWideInputPrompt.Prompt(app, header, placeholder, value); + return await GenericWideInputPrompt.Prompt( + app2, + header, + placeholder, + value + ); } catch (e) { return void 0; } } - static async yesNoPrompt(app, header, text2) { + static async yesNoPrompt(app2, header, text2) { try { - return await GenericYesNoPrompt.Prompt(app, header, text2); + return await GenericYesNoPrompt.Prompt(app2, header, text2); } catch (e) { return void 0; } } - static async suggester(app, displayItems, actualItems) { + static async suggester(app2, displayItems, actualItems) { try { let displayedItems; if (typeof displayItems === "function") { @@ -32859,14 +33155,18 @@ var QuickAddApi = class { } else { displayedItems = displayItems; } - return await GenericSuggester.Suggest(app, displayedItems, actualItems); + return await GenericSuggester.Suggest( + app2, + displayedItems, + actualItems + ); } catch (e) { return void 0; } } - static async checkboxPrompt(app, items, selectedItems) { + static async checkboxPrompt(app2, items, selectedItems) { try { - return await GenericCheckboxPrompt.Open(app, items, selectedItems); + return await GenericCheckboxPrompt.Open(app2, items, selectedItems); } catch (e) { return void 0; } @@ -32893,11 +33193,11 @@ var EditorCommand = class extends Command { super(type, "EditorCommand" /* EditorCommand */); this.editorCommandType = type; } - static getSelectedText(app) { - return this.getActiveMarkdownView(app).editor.getSelection(); + static getSelectedText(app2) { + return this.getActiveMarkdownView(app2).editor.getSelection(); } - static getActiveMarkdownView(app) { - const activeView = app.workspace.getActiveViewOfType(import_obsidian13.MarkdownView); + static getActiveMarkdownView(app2) { + const activeView = app2.workspace.getActiveViewOfType(import_obsidian13.MarkdownView); if (!activeView) { log.logError("no active markdown view."); throw new Error("no active markdown view."); @@ -32911,9 +33211,9 @@ var CutCommand = class extends EditorCommand { constructor() { super("Cut" /* Cut */); } - static async run(app) { - const selectedText = EditorCommand.getSelectedText(app); - const activeView = EditorCommand.getActiveMarkdownView(app); + static async run(app2) { + const selectedText = EditorCommand.getSelectedText(app2); + const activeView = EditorCommand.getActiveMarkdownView(app2); if (!selectedText) { log.logError("nothing selected."); return; @@ -32928,8 +33228,8 @@ var CopyCommand = class extends EditorCommand { constructor() { super("Copy" /* Copy */); } - static async run(app) { - const selectedText = EditorCommand.getSelectedText(app); + static async run(app2) { + const selectedText = EditorCommand.getSelectedText(app2); await navigator.clipboard.writeText(selectedText); } }; @@ -32939,9 +33239,9 @@ var PasteCommand = class extends EditorCommand { constructor() { super("Paste" /* Paste */); } - static async run(app) { + static async run(app2) { const clipboard = await navigator.clipboard.readText(); - const activeView = EditorCommand.getActiveMarkdownView(app); + const activeView = EditorCommand.getActiveMarkdownView(app2); if (!activeView) { log.logError("no active markdown view."); return; @@ -32955,12 +33255,15 @@ var SelectActiveLineCommand = class extends EditorCommand { constructor() { super("Select active line" /* SelectActiveLine */); } - static run(app) { - const activeView = EditorCommand.getActiveMarkdownView(app); + static run(app2) { + const activeView = EditorCommand.getActiveMarkdownView(app2); const { line: lineNumber } = activeView.editor.getCursor(); const line = activeView.editor.getLine(lineNumber); const lineLength = line.length; - activeView.editor.setSelection({ line: lineNumber, ch: 0 }, { line: lineNumber, ch: lineLength }); + activeView.editor.setSelection( + { line: lineNumber, ch: 0 }, + { line: lineNumber, ch: lineLength } + ); } }; @@ -32969,8 +33272,8 @@ var SelectLinkOnActiveLineCommand = class extends EditorCommand { constructor() { super("Select link on active line" /* SelectLinkOnActiveLine */); } - static async run(app) { - const activeView = EditorCommand.getActiveMarkdownView(app); + static async run(app2) { + const activeView = EditorCommand.getActiveMarkdownView(app2); const { line: lineNumber } = activeView.editor.getCursor(); const line = activeView.editor.getLine(lineNumber); const match = WIKI_LINK_REGEX.exec(line); @@ -32980,21 +33283,24 @@ var SelectLinkOnActiveLineCommand = class extends EditorCommand { } const matchStart = match.index; const matchEnd = match[0].length + matchStart; - activeView.editor.setSelection({ line: lineNumber, ch: matchStart }, { line: lineNumber, ch: matchEnd }); + activeView.editor.setSelection( + { line: lineNumber, ch: matchStart }, + { line: lineNumber, ch: matchEnd } + ); } }; // src/engine/MacroChoiceEngine.ts var MacroChoiceEngine = class extends QuickAddChoiceEngine { - constructor(app, plugin, choice, macros, choiceExecutor, variables) { - super(app); + constructor(app2, plugin, choice, macros, choiceExecutor, variables) { + super(app2); this.choice = choice; this.plugin = plugin; this.macros = macros; this.choiceExecutor = choiceExecutor; this.params = { app: this.app, - quickAddApi: QuickAddApi.GetApi(app, plugin, choiceExecutor), + quickAddApi: QuickAddApi.GetApi(app2, plugin, choiceExecutor), variables: {}, obsidian }; @@ -33151,8 +33457,8 @@ var MacroChoiceEngine = class extends QuickAddChoiceEngine { // src/engine/SingleMacroEngine.ts var SingleMacroEngine = class extends MacroChoiceEngine { - constructor(app, plugin, macros, choiceExecutor, variables) { - super(app, plugin, null, macros, choiceExecutor, variables); + constructor(app2, plugin, macros, choiceExecutor, variables) { + super(app2, plugin, null, macros, choiceExecutor, variables); } async runAndGetOutput(macroName) { const { basename, memberAccess } = getUserScriptMemberAccess(macroName); @@ -33183,12 +33489,14 @@ var import_obsidian16 = require("obsidian"); // src/engine/SingleInlineScriptEngine.ts var SingleInlineScriptEngine = class extends MacroChoiceEngine { - constructor(app, plugin, choiceExecutor, variables) { - super(app, plugin, null, null, choiceExecutor, variables); + constructor(app2, plugin, choiceExecutor, variables) { + super(app2, plugin, null, null, choiceExecutor, variables); } async runAndGetOutput(code) { - const AsyncFunction = Object.getPrototypeOf(async function() { - }).constructor; + const AsyncFunction = Object.getPrototypeOf( + async function() { + } + ).constructor; const userCode = new AsyncFunction(code); return await userCode.bind(this.params, this).call(); } @@ -33994,9 +34302,14 @@ var LaTeXSuggester = class extends TextInputSuggest { let suggestions = []; if (match) { this.lastInput = match[1]; - suggestions = this.symbols.filter((val) => val.toLowerCase().contains(this.lastInput)); + suggestions = this.symbols.filter( + (val) => val.toLowerCase().contains(this.lastInput) + ); } - const fuse = new Fuse(suggestions, { findAllMatches: true, threshold: 0.8 }); + const fuse = new Fuse(suggestions, { + findAllMatches: true, + threshold: 0.8 + }); const searchResults = fuse.search(this.lastInput); return searchResults.map((value) => value.item); } @@ -34012,16 +34325,27 @@ var LaTeXSuggester = class extends TextInputSuggest { const currentInputValue = this.inputEl.value; let insertedEndPosition = 0; const textToInsert = item.replace(/\\\\/g, "\\"); - this.inputEl.value = `${currentInputValue.substr(0, cursorPosition - lastInputLength - 1)}${textToInsert}${currentInputValue.substr(cursorPosition)}`; + this.inputEl.value = `${currentInputValue.substr( + 0, + cursorPosition - lastInputLength - 1 + )}${textToInsert}${currentInputValue.substr(cursorPosition)}`; insertedEndPosition = cursorPosition - lastInputLength + item.length - 1; this.inputEl.trigger("input"); this.close(); if (item.contains(LATEX_CURSOR_MOVE_HERE)) { - const cursorPos = this.inputEl.value.indexOf(LATEX_CURSOR_MOVE_HERE); - this.inputEl.value = this.inputEl.value.replace(LATEX_CURSOR_MOVE_HERE, ""); + const cursorPos = this.inputEl.value.indexOf( + LATEX_CURSOR_MOVE_HERE + ); + this.inputEl.value = this.inputEl.value.replace( + LATEX_CURSOR_MOVE_HERE, + "" + ); this.inputEl.setSelectionRange(cursorPos, cursorPos); } else { - this.inputEl.setSelectionRange(insertedEndPosition, insertedEndPosition); + this.inputEl.setSelectionRange( + insertedEndPosition, + insertedEndPosition + ); } } }; @@ -34044,12 +34368,10 @@ var MathModal = class extends import_obsidian15.Modal { this.cancelClickCallback = (evt) => this.cancel(); this.open(); this.display(); - this.waitForClose = new Promise( - (resolve, reject) => { - this.resolvePromise = resolve; - this.rejectPromise = reject; - } - ); + this.waitForClose = new Promise((resolve, reject) => { + this.resolvePromise = resolve; + this.rejectPromise = reject; + }); new LaTeXSuggester(this.inputEl); this.inputEl.focus(); this.inputEl.select(); @@ -34066,7 +34388,12 @@ var MathModal = class extends import_obsidian15.Modal { tc.inputEl.style.width = "100%"; tc.inputEl.style.height = "10rem"; this.inputEl = tc.inputEl; - tc.onChange((0, import_obsidian15.debounce)(async (value) => await this.mathjaxLoop(mathDiv, value), 50)); + tc.onChange( + (0, import_obsidian15.debounce)( + async (value) => await this.mathjaxLoop(mathDiv, value), + 50 + ) + ); tc.inputEl.addEventListener("keydown", this.keybindListener); this.createButtonBar(this.contentEl.createDiv()); } @@ -34082,8 +34409,13 @@ var MathModal = class extends import_obsidian15.Modal { } cursorToGoTo() { if (this.inputEl.value.contains(LATEX_CURSOR_MOVE_HERE)) { - const cursorPos = this.inputEl.value.indexOf(LATEX_CURSOR_MOVE_HERE); - this.inputEl.value = this.inputEl.value.replace(LATEX_CURSOR_MOVE_HERE, ""); + const cursorPos = this.inputEl.value.indexOf( + LATEX_CURSOR_MOVE_HERE + ); + this.inputEl.value = this.inputEl.value.replace( + LATEX_CURSOR_MOVE_HERE, + "" + ); this.inputEl.setSelectionRange(cursorPos, cursorPos); } } @@ -34094,8 +34426,16 @@ var MathModal = class extends import_obsidian15.Modal { } createButtonBar(mainContentContainer) { const buttonBarContainer = mainContentContainer.createDiv(); - this.createButton(buttonBarContainer, "Ok", this.submitClickCallback).setCta().buttonEl.style.marginRight = "0"; - this.createButton(buttonBarContainer, "Cancel", this.cancelClickCallback); + this.createButton( + buttonBarContainer, + "Ok", + this.submitClickCallback + ).setCta().buttonEl.style.marginRight = "0"; + this.createButton( + buttonBarContainer, + "Cancel", + this.cancelClickCallback + ); buttonBarContainer.style.display = "flex"; buttonBarContainer.style.flexDirection = "row-reverse"; buttonBarContainer.style.justifyContent = "flex-start"; @@ -34138,9 +34478,9 @@ var InputPrompt = class { // src/formatters/completeFormatter.ts var CompleteFormatter = class extends Formatter { - constructor(app, plugin, choiceExecutor) { + constructor(app2, plugin, choiceExecutor) { super(); - this.app = app; + this.app = app2; this.plugin = plugin; this.choiceExecutor = choiceExecutor; this.variables = choiceExecutor == null ? void 0 : choiceExecutor.variables; @@ -34197,11 +34537,21 @@ var CompleteFormatter = class extends Formatter { return await MathModal.Prompt(); } async suggestForValue(suggestedValues) { - return await GenericSuggester.Suggest(this.app, suggestedValues, suggestedValues); + return await GenericSuggester.Suggest( + this.app, + suggestedValues, + suggestedValues + ); } async getMacroValue(macroName) { var _a; - const macroEngine = new SingleMacroEngine(this.app, this.plugin, this.plugin.settings.macros, this.choiceExecutor, this.variables); + const macroEngine = new SingleMacroEngine( + this.app, + this.plugin, + this.plugin.settings.macros, + this.choiceExecutor, + this.variables + ); const macroOutput = (_a = await macroEngine.runAndGetOutput(macroName)) != null ? _a : ""; Object.keys(macroEngine.params.variables).forEach((key) => { this.variables.set(key, macroEngine.params.variables[key]); @@ -34209,7 +34559,12 @@ var CompleteFormatter = class extends Formatter { return macroOutput; } async getTemplateContent(templatePath) { - return await new SingleTemplateEngine(this.app, this.plugin, templatePath, this.choiceExecutor).run(); + return await new SingleTemplateEngine( + this.app, + this.plugin, + templatePath, + this.choiceExecutor + ).run(); } async getSelectedText() { const activeView = this.app.workspace.getActiveViewOfType(import_obsidian16.MarkdownView); @@ -34224,7 +34579,12 @@ var CompleteFormatter = class extends Formatter { const match = INLINE_JAVASCRIPT_REGEX.exec(output); const code = (_a = match[1]) == null ? void 0 : _a.trim(); if (code) { - const executor = new SingleInlineScriptEngine(this.app, this.plugin, this.choiceExecutor, this.variables); + const executor = new SingleInlineScriptEngine( + this.app, + this.plugin, + this.choiceExecutor, + this.variables + ); const outVal = await executor.runAndGetOutput(code); for (let key in executor.params.variables) { this.variables.set(key, executor.params.variables[key]); @@ -34239,16 +34599,20 @@ var CompleteFormatter = class extends Formatter { // src/engine/TemplateEngine.ts var import_obsidian17 = require("obsidian"); var TemplateEngine = class extends QuickAddEngine { - constructor(app, plugin, choiceFormatter) { - super(app); + constructor(app2, plugin, choiceFormatter) { + super(app2); this.plugin = plugin; - this.templater = getTemplater(app); - this.formatter = new CompleteFormatter(app, plugin, choiceFormatter); + this.templater = getTemplater(app2); + this.formatter = new CompleteFormatter(app2, plugin, choiceFormatter); } async getOrCreateFolder(folders) { let folderPath; if (folders.length > 1) { - folderPath = await GenericSuggester.Suggest(this.app, folders, folders); + folderPath = await GenericSuggester.Suggest( + this.app, + folders, + folders + ); if (!folderPath) throw new Error("No folder selected."); } else { @@ -34261,7 +34625,10 @@ var TemplateEngine = class extends QuickAddEngine { return folderPath; } async getFormattedFilePath(folderPath, format3, promptHeader) { - const formattedName = await this.formatter.formatFileName(format3, promptHeader); + const formattedName = await this.formatter.formatFileName( + format3, + promptHeader + ); return this.formatFilePath(folderPath, formattedName); } async incrementFileName(fileName) { @@ -34272,7 +34639,10 @@ var TemplateEngine = class extends QuickAddEngine { const number = parseInt(numStr); if (!number) throw new Error("detected numbers but couldn't get them."); - newFileName = newFileName.replace(FILE_NUMBER_REGEX, `${number + 1}.md`); + newFileName = newFileName.replace( + FILE_NUMBER_REGEX, + `${number + 1}.md` + ); } else if (fileExists) { newFileName = newFileName.replace(FILE_NUMBER_REGEX, `${1}.md`); } @@ -34283,19 +34653,28 @@ var TemplateEngine = class extends QuickAddEngine { } async createFileWithTemplate(filePath, templatePath) { try { - const templateContent = await this.getTemplateContent(templatePath); + const templateContent = await this.getTemplateContent( + templatePath + ); const formattedTemplateContent = await this.formatter.formatFileContent(templateContent); - const createdFile = await this.createFileWithInput(filePath, formattedTemplateContent); + const createdFile = await this.createFileWithInput( + filePath, + formattedTemplateContent + ); await replaceTemplaterTemplatesInCreatedFile(this.app, createdFile); return createdFile; } catch (e) { - log.logError(`Could not create file with template. Maybe '${templatePath}' is an invalid template path?`); + log.logError( + `Could not create file with template. Maybe '${templatePath}' is an invalid template path?` + ); return null; } } async overwriteFileWithTemplate(file, templatePath) { try { - const templateContent = await this.getTemplateContent(templatePath); + const templateContent = await this.getTemplateContent( + templatePath + ); const formattedTemplateContent = await this.formatter.formatFileContent(templateContent); await this.app.vault.modify(file, formattedTemplateContent); await replaceTemplaterTemplatesInCreatedFile(this.app, file, true); @@ -34307,7 +34686,9 @@ var TemplateEngine = class extends QuickAddEngine { } async appendToFileWithTemplate(file, templatePath, section) { try { - const templateContent = await this.getTemplateContent(templatePath); + const templateContent = await this.getTemplateContent( + templatePath + ); const formattedTemplateContent = await this.formatter.formatFileContent(templateContent); const fileContent = await this.app.vault.cachedRead(file); const newFileContent = section === "top" ? `${formattedTemplateContent} @@ -34334,25 +34715,29 @@ ${formattedTemplateContent}`; // src/engine/SingleTemplateEngine.ts var SingleTemplateEngine = class extends TemplateEngine { - constructor(app, plugin, templatePath, choiceExecutor) { - super(app, plugin, choiceExecutor); + constructor(app2, plugin, templatePath, choiceExecutor) { + super(app2, plugin, choiceExecutor); this.templatePath = templatePath; } async run() { - let templateContent = await this.getTemplateContent(this.templatePath); + let templateContent = await this.getTemplateContent( + this.templatePath + ); if (!templateContent) { log.logError(`Template ${this.templatePath} not found.`); } - templateContent = await this.formatter.formatFileContent(templateContent); + templateContent = await this.formatter.formatFileContent( + templateContent + ); return templateContent; } }; // src/formatters/formatDisplayFormatter.ts var FormatDisplayFormatter = class extends Formatter { - constructor(app, plugin) { + constructor(app2, plugin) { super(); - this.app = app; + this.app = app2; this.plugin = plugin; } async format(input) { @@ -34394,7 +34779,12 @@ var FormatDisplayFormatter = class extends Formatter { } async getTemplateContent(templatePath) { try { - return await new SingleTemplateEngine(this.app, this.plugin, templatePath, null).run(); + return await new SingleTemplateEngine( + this.app, + this.plugin, + templatePath, + null + ).run(); } catch (e) { return `Template (not found): ${templatePath}`; } @@ -34406,8 +34796,8 @@ var FormatDisplayFormatter = class extends Formatter { // src/gui/ChoiceBuilder/captureChoiceBuilder.ts var CaptureChoiceBuilder = class extends ChoiceBuilder { - constructor(app, choice, plugin) { - super(app); + constructor(app2, choice, plugin) { + super(app2); this.plugin = plugin; this.choice = choice; this.display(); @@ -34442,7 +34832,9 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { const captureToActiveFileContainer = captureToContainer.createDiv("captureToActiveFileContainer"); const captureToActiveFileText = captureToActiveFileContainer.createEl("span"); captureToActiveFileText.textContent = "Capture to active file"; - const captureToActiveFileToggle = new import_obsidian18.ToggleComponent(captureToActiveFileContainer); + const captureToActiveFileToggle = new import_obsidian18.ToggleComponent( + captureToActiveFileContainer + ); captureToActiveFileToggle.setValue((_a = this.choice) == null ? void 0 : _a.captureToActiveFile); captureToActiveFileToggle.onChange((value) => { this.choice.captureToActiveFile = value; @@ -34452,7 +34844,9 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { const captureToFileContainer = captureToContainer.createDiv("captureToFileContainer"); const formatDisplay = captureToFileContainer.createEl("span"); const displayFormatter = new FileNameDisplayFormatter(this.app); - (async () => formatDisplay.textContent = await displayFormatter.format(this.choice.captureTo))(); + (async () => formatDisplay.textContent = await displayFormatter.format( + this.choice.captureTo + ))(); const formatInput = new import_obsidian18.TextComponent(captureToFileContainer); formatInput.setPlaceholder("File name format"); textField = formatInput; @@ -34460,16 +34854,27 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { formatInput.inputEl.style.marginBottom = "8px"; formatInput.setValue(this.choice.captureTo).setDisabled((_c = this.choice) == null ? void 0 : _c.captureToActiveFile).onChange(async (value) => { this.choice.captureTo = value; - formatDisplay.textContent = await displayFormatter.format(value); + formatDisplay.textContent = await displayFormatter.format( + value + ); }); - const markdownFilesAndFormatSyntax = [...this.app.vault.getMarkdownFiles().map((f) => f.path), ...FILE_NAME_FORMAT_SYNTAX]; - new GenericTextSuggester(this.app, textField.inputEl, markdownFilesAndFormatSyntax); + const markdownFilesAndFormatSyntax = [ + ...this.app.vault.getMarkdownFiles().map((f) => f.path), + ...FILE_NAME_FORMAT_SYNTAX + ]; + new GenericTextSuggester( + this.app, + textField.inputEl, + markdownFilesAndFormatSyntax + ); } } addPrependSetting() { var _a; const prependSetting = new import_obsidian18.Setting(this.contentEl); - prependSetting.setName("Write to bottom of file").setDesc(`Put value at the bottom of the file - otherwise at the ${((_a = this.choice) == null ? void 0 : _a.captureToActiveFile) ? "active cursor location" : "top"}.`).addToggle((toggle) => { + prependSetting.setName("Write to bottom of file").setDesc( + `Put value at the bottom of the file - otherwise at the ${((_a = this.choice) == null ? void 0 : _a.captureToActiveFile) ? "active cursor location" : "top"}.` + ).addToggle((toggle) => { toggle.setValue(this.choice.prepend); toggle.onChange((value) => this.choice.prepend = value); }); @@ -34483,7 +34888,9 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { } addAppendLinkSetting() { const appendLinkSetting = new import_obsidian18.Setting(this.contentEl); - appendLinkSetting.setName("Append link").setDesc("Add a link on your current cursor position, linking to the file you're capturing to.").addToggle((toggle) => { + appendLinkSetting.setName("Append link").setDesc( + "Add a link on your current cursor position, linking to the file you're capturing to." + ).addToggle((toggle) => { toggle.setValue(this.choice.appendLink); toggle.onChange((value) => this.choice.appendLink = value); }); @@ -34491,7 +34898,9 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { addInsertAfterSetting() { let insertAfterInput; const insertAfterSetting = new import_obsidian18.Setting(this.contentEl); - insertAfterSetting.setName("Insert after").setDesc("Insert capture after specified line. Accepts format syntax.").addToggle((toggle) => { + insertAfterSetting.setName("Insert after").setDesc( + "Insert capture after specified line. Accepts format syntax." + ).addToggle((toggle) => { toggle.setValue(this.choice.insertAfter.enabled); toggle.onChange((value) => { this.choice.insertAfter.enabled = value; @@ -34501,7 +34910,9 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { }); const insertAfterFormatDisplay = this.contentEl.createEl("span"); const displayFormatter = new FormatDisplayFormatter(this.app, this.plugin); - (async () => insertAfterFormatDisplay.innerText = await displayFormatter.format(this.choice.insertAfter.after))(); + (async () => insertAfterFormatDisplay.innerText = await displayFormatter.format( + this.choice.insertAfter.after + ))(); insertAfterInput = new import_obsidian18.TextComponent(this.contentEl); insertAfterInput.setPlaceholder("Insert after"); insertAfterInput.inputEl.style.width = "100%"; @@ -34510,31 +34921,41 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { this.choice.insertAfter.after = value; insertAfterFormatDisplay.innerText = await displayFormatter.format(value); }); - new FormatSyntaxSuggester(this.app, insertAfterInput.inputEl, this.plugin); + new FormatSyntaxSuggester( + this.app, + insertAfterInput.inputEl, + this.plugin + ); if (this.choice.insertAfter.enabled) { const insertAtEndSetting = new import_obsidian18.Setting(this.contentEl); - insertAtEndSetting.setName("Insert at end of section").setDesc("Insert the text at the end of the section, rather than at the top.").addToggle( + insertAtEndSetting.setName("Insert at end of section").setDesc( + "Insert the text at the end of the section, rather than at the top." + ).addToggle( (toggle) => { var _a; - return toggle.setValue((_a = this.choice.insertAfter) == null ? void 0 : _a.insertAtEnd).onChange((value) => this.choice.insertAfter.insertAtEnd = value); + return toggle.setValue((_a = this.choice.insertAfter) == null ? void 0 : _a.insertAtEnd).onChange( + (value) => this.choice.insertAfter.insertAtEnd = value + ); } ); const createLineIfNotFound = new import_obsidian18.Setting(this.contentEl); - createLineIfNotFound.setName("Create line if not found").setDesc("Creates the 'insert after' line if it is not found.").addToggle( - (toggle) => { - var _a, _b; - if (!((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFound)) - this.choice.insertAfter.createIfNotFound = false; - toggle.setValue((_b = this.choice.insertAfter) == null ? void 0 : _b.createIfNotFound).onChange((value) => this.choice.insertAfter.createIfNotFound = value).toggleEl.style.marginRight = "1em"; - } - ).addDropdown( - (dropdown) => { - var _a, _b; - if (!((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFoundLocation)) - this.choice.insertAfter.createIfNotFoundLocation = CREATE_IF_NOT_FOUND_TOP; - dropdown.addOption(CREATE_IF_NOT_FOUND_TOP, "Top").addOption(CREATE_IF_NOT_FOUND_BOTTOM, "Bottom").setValue((_b = this.choice.insertAfter) == null ? void 0 : _b.createIfNotFoundLocation).onChange((value) => this.choice.insertAfter.createIfNotFoundLocation = value); - } - ); + createLineIfNotFound.setName("Create line if not found").setDesc("Creates the 'insert after' line if it is not found.").addToggle((toggle) => { + var _a, _b; + if (!((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFound)) + this.choice.insertAfter.createIfNotFound = false; + toggle.setValue((_b = this.choice.insertAfter) == null ? void 0 : _b.createIfNotFound).onChange( + (value) => this.choice.insertAfter.createIfNotFound = value + ).toggleEl.style.marginRight = "1em"; + }).addDropdown((dropdown) => { + var _a, _b; + if (!((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFoundLocation)) + this.choice.insertAfter.createIfNotFoundLocation = CREATE_IF_NOT_FOUND_TOP; + dropdown.addOption(CREATE_IF_NOT_FOUND_TOP, "Top").addOption(CREATE_IF_NOT_FOUND_BOTTOM, "Bottom").setValue( + (_b = this.choice.insertAfter) == null ? void 0 : _b.createIfNotFoundLocation + ).onChange( + (value) => this.choice.insertAfter.createIfNotFoundLocation = value + ); + }); } } addFormatSetting() { @@ -34559,11 +34980,17 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { new FormatSyntaxSuggester(this.app, textField.inputEl, this.plugin); const formatDisplay = this.contentEl.createEl("span"); const displayFormatter = new FormatDisplayFormatter(this.app, this.plugin); - (async () => formatDisplay.innerText = await displayFormatter.format(this.choice.format.format))(); + (async () => formatDisplay.innerText = await displayFormatter.format( + this.choice.format.format + ))(); } addCreateIfNotExistsSetting() { if (!this.choice.createFileIfItDoesntExist) - this.choice.createFileIfItDoesntExist = { enabled: false, createWithTemplate: false, template: "" }; + this.choice.createFileIfItDoesntExist = { + enabled: false, + createWithTemplate: false, + template: "" + }; const createFileIfItDoesntExist = new import_obsidian18.Setting(this.contentEl); createFileIfItDoesntExist.setName("Create file if it doesn't exist").addToggle( (toggle) => { @@ -34579,19 +35006,29 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { var _a, _b, _c, _d, _e; let templateSelector; const createWithTemplateSetting = new import_obsidian18.Setting(this.contentEl); - createWithTemplateSetting.setName("Create file with given template.").addToggle((toggle) => { - var _a2; - return toggle.setValue((_a2 = this.choice.createFileIfItDoesntExist) == null ? void 0 : _a2.createWithTemplate).onChange((value) => { - this.choice.createFileIfItDoesntExist.createWithTemplate = value; - templateSelector.setDisabled(!value); - }); - }); + createWithTemplateSetting.setName("Create file with given template.").addToggle( + (toggle) => { + var _a2; + return toggle.setValue( + (_a2 = this.choice.createFileIfItDoesntExist) == null ? void 0 : _a2.createWithTemplate + ).onChange((value) => { + this.choice.createFileIfItDoesntExist.createWithTemplate = value; + templateSelector.setDisabled(!value); + }); + } + ); templateSelector = new import_obsidian18.TextComponent(this.contentEl); - templateSelector.setValue((_c = (_b = (_a = this.choice) == null ? void 0 : _a.createFileIfItDoesntExist) == null ? void 0 : _b.template) != null ? _c : "").setPlaceholder("Template path").setDisabled(!((_e = (_d = this.choice) == null ? void 0 : _d.createFileIfItDoesntExist) == null ? void 0 : _e.createWithTemplate)); + templateSelector.setValue((_c = (_b = (_a = this.choice) == null ? void 0 : _a.createFileIfItDoesntExist) == null ? void 0 : _b.template) != null ? _c : "").setPlaceholder("Template path").setDisabled( + !((_e = (_d = this.choice) == null ? void 0 : _d.createFileIfItDoesntExist) == null ? void 0 : _e.createWithTemplate) + ); templateSelector.inputEl.style.width = "100%"; templateSelector.inputEl.style.marginBottom = "8px"; const markdownFiles = getTemplatePaths(this.app); - new GenericTextSuggester(this.app, templateSelector.inputEl, markdownFiles); + new GenericTextSuggester( + this.app, + templateSelector.inputEl, + markdownFiles + ); templateSelector.onChange((value) => { this.choice.createFileIfItDoesntExist.template = value; }); @@ -34604,34 +35041,44 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { this.choice.openFile = value; this.reload(); }); - }).addDropdown( - (dropdown) => { - dropdown.selectEl.style.marginLeft = "10px"; - if (!this.choice.openFileInMode) - this.choice.openFileInMode = "default"; - dropdown.addOption("source", "Source").addOption("preview", "Preview").addOption("default", "Default").setValue(this.choice.openFileInMode).onChange((value) => this.choice.openFileInMode = value); - } - ); + }).addDropdown((dropdown) => { + dropdown.selectEl.style.marginLeft = "10px"; + if (!this.choice.openFileInMode) + this.choice.openFileInMode = "default"; + dropdown.addOption("source", "Source").addOption("preview", "Preview").addOption("default", "Default").setValue(this.choice.openFileInMode).onChange( + (value) => this.choice.openFileInMode = value + ); + }); } addOpenFileInNewTabSetting() { const newTabSetting = new import_obsidian18.Setting(this.contentEl); newTabSetting.setName("New Tab").setDesc("Open the file that is captured to in a new tab.").addToggle((toggle) => { var _a, _b; toggle.setValue((_b = (_a = this.choice) == null ? void 0 : _a.openFileInNewTab) == null ? void 0 : _b.enabled); - toggle.onChange((value) => this.choice.openFileInNewTab.enabled = value); + toggle.onChange( + (value) => this.choice.openFileInNewTab.enabled = value + ); }).addDropdown((dropdown) => { var _a, _b, _c; if (!((_a = this.choice) == null ? void 0 : _a.openFileInNewTab)) { - this.choice.openFileInNewTab = { enabled: false, direction: "vertical" /* vertical */, focus: true }; + this.choice.openFileInNewTab = { + enabled: false, + direction: "vertical" /* vertical */, + focus: true + }; } dropdown.selectEl.style.marginLeft = "10px"; dropdown.addOption("vertical" /* vertical */, "Vertical"); dropdown.addOption("horizontal" /* horizontal */, "Horizontal"); dropdown.setValue((_c = (_b = this.choice) == null ? void 0 : _b.openFileInNewTab) == null ? void 0 : _c.direction); - dropdown.onChange((value) => this.choice.openFileInNewTab.direction = value); + dropdown.onChange( + (value) => this.choice.openFileInNewTab.direction = value + ); }); new import_obsidian18.Setting(this.contentEl).setName("Focus new pane").setDesc("Focus the opened tab immediately").addToggle( - (toggle) => toggle.setValue(this.choice.openFileInNewTab.focus).onChange((value) => this.choice.openFileInNewTab.focus = value) + (toggle) => toggle.setValue(this.choice.openFileInNewTab.focus).onChange( + (value) => this.choice.openFileInNewTab.focus = value + ) ); } }; @@ -34639,8 +35086,8 @@ var CaptureChoiceBuilder = class extends ChoiceBuilder { // src/gui/ChoiceBuilder/macroChoiceBuilder.ts var import_obsidian19 = require("obsidian"); var MacroChoiceBuilder = class extends ChoiceBuilder { - constructor(app, choice, macros) { - super(app); + constructor(app2, choice, macros) { + super(app2); this.macros = macros; this.choice = choice; this.display(); @@ -34652,7 +35099,9 @@ var MacroChoiceBuilder = class extends ChoiceBuilder { } addSelectMacroSearch() { const selectMacroDropdownContainer = this.contentEl.createDiv("selectMacroDropdownContainer"); - const dropdown = new import_obsidian19.DropdownComponent(selectMacroDropdownContainer); + const dropdown = new import_obsidian19.DropdownComponent( + selectMacroDropdownContainer + ); let macroOptions = {}; this.macros.forEach((macro) => { macroOptions[macro.name] = macro.name; @@ -34661,7 +35110,9 @@ var MacroChoiceBuilder = class extends ChoiceBuilder { dropdown.onChange((value) => { this.selectMacro(value); }); - const selectedMacro = this.macros.find((m) => m.id === this.choice.macroId); + const selectedMacro = this.macros.find( + (m) => m.id === this.choice.macroId + ); if (selectedMacro) { dropdown.setValue(selectedMacro.name); } else { @@ -35336,8 +35787,8 @@ var UserScriptCommand_default = UserScriptCommand; // src/gui/MacroGUIs/UserScriptSettingsModal.ts var import_obsidian20 = require("obsidian"); var UserScriptSettingsModal = class extends import_obsidian20.Modal { - constructor(app, command, settings) { - super(app); + constructor(app2, command, settings) { + super(app2); this.command = command; this.settings = settings; this.display(); @@ -35366,7 +35817,12 @@ var UserScriptSettingsModal = class extends import_obsidian20.Modal { switch ((_b2 = (_a2 = options[option]) == null ? void 0 : _a2.type) == null ? void 0 : _b2.toLowerCase()) { case "text": case "input": - this.addInputBox(option, value, entry == null ? void 0 : entry.placeholder, entry == null ? void 0 : entry.secret); + this.addInputBox( + option, + value, + entry == null ? void 0 : entry.placeholder, + entry == null ? void 0 : entry.secret + ); break; case "checkbox": case "toggle": @@ -35418,7 +35874,10 @@ var UserScriptSettingsModal = class extends import_obsidian20.Modal { const formatDisplay = this.contentEl.createEl("span"); const input = new import_obsidian20.TextComponent(this.contentEl); new FormatSyntaxSuggester(this.app, input.inputEl, QuickAdd.instance); - const displayFormatter = new FormatDisplayFormatter(this.app, QuickAdd.instance); + const displayFormatter = new FormatDisplayFormatter( + this.app, + QuickAdd.instance + ); input.setValue(value).onChange(async (value2) => { this.command.settings[name] = value2; formatDisplay.innerText = await displayFormatter.format(value2); @@ -35901,7 +36360,7 @@ function instance16($$self, $$props, $$invalidate) { let { commands: commands2 } = $$props; let { deleteCommand } = $$props; let { saveCommands } = $$props; - let { app } = $$props; + let { app: app2 } = $$props; let { plugin } = $$props; let dragDisabled = true; const updateCommandList = (newCommands) => { @@ -35947,9 +36406,9 @@ function instance16($$self, $$props, $$invalidate) { function getChoiceBuilder(choice) { switch (choice.type) { case "Template" /* Template */: - return new TemplateChoiceBuilder(app, choice, plugin); + return new TemplateChoiceBuilder(app2, choice, plugin); case "Capture" /* Capture */: - return new CaptureChoiceBuilder(app, choice, plugin); + return new CaptureChoiceBuilder(app2, choice, plugin); case "Macro" /* Macro */: case "Multi" /* Multi */: default: @@ -35959,12 +36418,12 @@ function instance16($$self, $$props, $$invalidate) { function configureScript(e) { return __awaiter(this, void 0, void 0, function* () { const command = e.detail; - const userScript = yield getUserScript(command, app); + const userScript = yield getUserScript(command, app2); if (!(userScript === null || userScript === void 0 ? void 0 : userScript.settings)) { log.logWarning(`${command.name} has no settings.`); return; } - new UserScriptSettingsModal(app, command, userScript.settings).open(); + new UserScriptSettingsModal(app2, command, userScript.settings).open(); }); } const func = (c) => c.id !== SHADOW_PLACEHOLDER_ITEM_ID; @@ -36028,7 +36487,7 @@ function instance16($$self, $$props, $$invalidate) { if ("saveCommands" in $$props2) $$invalidate(10, saveCommands = $$props2.saveCommands); if ("app" in $$props2) - $$invalidate(11, app = $$props2.app); + $$invalidate(11, app2 = $$props2.app); if ("plugin" in $$props2) $$invalidate(12, plugin = $$props2.plugin); }; @@ -36044,7 +36503,7 @@ function instance16($$self, $$props, $$invalidate) { configureChoice, configureScript, saveCommands, - app, + app2, plugin, updateCommandList, func, @@ -36119,8 +36578,8 @@ var NestedChoiceCommand2 = class extends Command { // src/gui/MacroGUIs/MacroBuilder.ts var MacroBuilder = class extends import_obsidian22.Modal { - constructor(app, plugin, macro, choices) { - super(app); + constructor(app2, plugin, macro, choices) { + super(app2); this.commands = []; this.javascriptFiles = []; this.choices = []; @@ -36128,7 +36587,9 @@ var MacroBuilder = class extends import_obsidian22.Modal { this.svelteElements = []; this.choices = choices; this.plugin = plugin; - this.waitForClose = new Promise((resolve) => this.resolvePromise = resolve); + this.waitForClose = new Promise( + (resolve) => this.resolvePromise = resolve + ); this.getObsidianCommands(); this.getJavascriptFiles(); this.display(); @@ -36159,7 +36620,11 @@ var MacroBuilder = class extends import_obsidian22.Modal { headerEl.setText(header); headerEl.addClass("clickable"); headerEl.addEventListener("click", async () => { - const newMacroName = await GenericInputPrompt.Prompt(this.app, `Update name for ${this.macro.name}`, this.macro.name); + const newMacroName = await GenericInputPrompt.Prompt( + this.app, + `Update name for ${this.macro.name}`, + this.macro.name + ); if (!newMacroName) return; this.macro.name = newMacroName; @@ -36173,8 +36638,13 @@ var MacroBuilder = class extends import_obsidian22.Modal { let input; const addObsidianCommandFromInput = () => { const value = input.getValue(); - const obsidianCommand = this.commands.find((v) => v.name === value); - const command = new ObsidianCommand(obsidianCommand.name, obsidianCommand.commandId); + const obsidianCommand = this.commands.find( + (v) => v.name === value + ); + const command = new ObsidianCommand( + obsidianCommand.name, + obsidianCommand.commandId + ); command.generateId(); this.addCommandToMacro(command); input.setValue(""); @@ -36183,13 +36653,22 @@ var MacroBuilder = class extends import_obsidian22.Modal { input = textComponent; textComponent.inputEl.style.marginRight = "1em"; textComponent.setPlaceholder("Obsidian command"); - new GenericTextSuggester(this.app, textComponent.inputEl, this.commands.map((c) => c.name)); - textComponent.inputEl.addEventListener("keypress", (e) => { - if (e.key === "Enter") { - addObsidianCommandFromInput(); + new GenericTextSuggester( + this.app, + textComponent.inputEl, + this.commands.map((c) => c.name) + ); + textComponent.inputEl.addEventListener( + "keypress", + (e) => { + if (e.key === "Enter") { + addObsidianCommandFromInput(); + } } - }); - }).addButton((button) => button.setCta().setButtonText("Add").onClick(addObsidianCommandFromInput)); + ); + }).addButton( + (button) => button.setCta().setButtonText("Add").onClick(addObsidianCommandFromInput) + ); } addAddEditorCommandsSetting() { let dropdownComponent; @@ -36220,15 +36699,25 @@ var MacroBuilder = class extends import_obsidian22.Modal { new import_obsidian22.Setting(this.contentEl).setName("Editor commands").setDesc("Add editor command").addDropdown((dropdown) => { dropdownComponent = dropdown; dropdown.selectEl.style.marginRight = "1em"; - dropdown.addOption("Copy" /* Copy */, "Copy" /* Copy */).addOption("Cut" /* Cut */, "Cut" /* Cut */).addOption("Paste" /* Paste */, "Paste" /* Paste */).addOption("Select active line" /* SelectActiveLine */, "Select active line" /* SelectActiveLine */).addOption("Select link on active line" /* SelectLinkOnActiveLine */, "Select link on active line" /* SelectLinkOnActiveLine */); - }).addButton((button) => button.setCta().setButtonText("Add").onClick(addEditorCommandFromDropdown)); + dropdown.addOption("Copy" /* Copy */, "Copy" /* Copy */).addOption("Cut" /* Cut */, "Cut" /* Cut */).addOption("Paste" /* Paste */, "Paste" /* Paste */).addOption( + "Select active line" /* SelectActiveLine */, + "Select active line" /* SelectActiveLine */ + ).addOption( + "Select link on active line" /* SelectLinkOnActiveLine */, + "Select link on active line" /* SelectLinkOnActiveLine */ + ); + }).addButton( + (button) => button.setCta().setButtonText("Add").onClick(addEditorCommandFromDropdown) + ); } addAddUserScriptSetting() { let input; const addUserScriptFromInput = () => { const value = input.getValue(); const scriptBasename = getUserScriptMemberAccess(value).basename; - const file = this.javascriptFiles.find((f) => f.basename === scriptBasename); + const file = this.javascriptFiles.find( + (f) => f.basename === scriptBasename + ); if (!file) return; this.addCommandToMacro(new UserScript(value, file.path)); @@ -36238,12 +36727,19 @@ var MacroBuilder = class extends import_obsidian22.Modal { input = textComponent; textComponent.inputEl.style.marginRight = "1em"; textComponent.setPlaceholder("User script"); - new GenericTextSuggester(this.app, textComponent.inputEl, this.javascriptFiles.map((f) => f.basename)); - textComponent.inputEl.addEventListener("keypress", (e) => { - if (e.key === "Enter") { - addUserScriptFromInput(); + new GenericTextSuggester( + this.app, + textComponent.inputEl, + this.javascriptFiles.map((f) => f.basename) + ); + textComponent.inputEl.addEventListener( + "keypress", + (e) => { + if (e.key === "Enter") { + addUserScriptFromInput(); + } } - }); + ); }).addButton( (button) => button.setButtonText("Add").setCta().onClick(addUserScriptFromInput) ); @@ -36262,12 +36758,19 @@ var MacroBuilder = class extends import_obsidian22.Modal { input = textComponent; textComponent.inputEl.style.marginRight = "1em"; textComponent.setPlaceholder("Choice"); - new GenericTextSuggester(this.app, textComponent.inputEl, this.choices.map((c) => c.name)); - textComponent.inputEl.addEventListener("keypress", (e) => { - if (e.key === "Enter") { - addChoiceFromInput(); + new GenericTextSuggester( + this.app, + textComponent.inputEl, + this.choices.map((c) => c.name) + ); + textComponent.inputEl.addEventListener( + "keypress", + (e) => { + if (e.key === "Enter") { + addChoiceFromInput(); + } } - }); + ); }).addButton( (button) => button.setCta().setButtonText("Add").onClick(addChoiceFromInput) ); @@ -36291,11 +36794,19 @@ var MacroBuilder = class extends import_obsidian22.Modal { plugin: this.plugin, commands: this.macro.commands, deleteCommand: async (commandId) => { - const command = this.macro.commands.find((c) => c.id === commandId); - const promptAnswer = await GenericYesNoPrompt.Prompt(this.app, "Are you sure you wish to delete this command?", `If you click yes, you will delete '${command.name}'.`); + const command = this.macro.commands.find( + (c) => c.id === commandId + ); + const promptAnswer = await GenericYesNoPrompt.Prompt( + this.app, + "Are you sure you wish to delete this command?", + `If you click yes, you will delete '${command.name}'.` + ); if (!promptAnswer) return; - this.macro.commands = this.macro.commands.filter((c) => c.id !== commandId); + this.macro.commands = this.macro.commands.filter( + (c) => c.id !== commandId + ); this.commandListEl.updateCommandList(this.macro.commands); }, saveCommands: (commands2) => { @@ -36306,13 +36817,17 @@ var MacroBuilder = class extends import_obsidian22.Modal { this.svelteElements.push(this.commandListEl); } addCommandBar() { - const quickCommandContainer = this.contentEl.createDiv("quickCommandContainer"); + const quickCommandContainer = this.contentEl.createDiv( + "quickCommandContainer" + ); this.newChoiceButton(quickCommandContainer, "Capture", CaptureChoice); this.newChoiceButton(quickCommandContainer, "Template", TemplateChoice); this.addAddWaitCommandButton(quickCommandContainer); } addAddWaitCommandButton(quickCommandContainer) { - const button = new import_obsidian22.ButtonComponent(quickCommandContainer); + const button = new import_obsidian22.ButtonComponent( + quickCommandContainer + ); button.setIcon("clock").setTooltip("Add wait command").onClick(() => { this.addCommandToMacro(new WaitCommand2(100)); }); @@ -36320,7 +36835,9 @@ var MacroBuilder = class extends import_obsidian22.Modal { newChoiceButton(container, typeName, type) { const button = new import_obsidian22.ButtonComponent(container); button.setButtonText(typeName).setTooltip(`Add ${typeName} Choice`).onClick(() => { - const captureChoice = new type(`Untitled ${typeName} Choice`); + const captureChoice = new type( + `Untitled ${typeName} Choice` + ); this.addCommandToMacro(new NestedChoiceCommand2(captureChoice)); }); } @@ -36342,9 +36859,9 @@ var QuickAddMacro = class { // src/MacrosManager.ts var MacrosManager = class extends import_obsidian23.Modal { - constructor(app, plugin, macros, choices) { - super(app); - this.app = app; + constructor(app2, plugin, macros, choices) { + super(app2); + this.app = app2; this.macros = macros; this.choices = choices; this.plugin = plugin; @@ -36595,7 +37112,7 @@ function instance17($$self, $$props, $$invalidate) { let { macros = [] } = $$props; let { saveChoices } = $$props; let { saveMacros } = $$props; - let { app } = $$props; + let { app: app2 } = $$props; let { plugin } = $$props; function addChoiceToList(event) { const { name, type } = event.detail; @@ -36622,7 +37139,7 @@ function instance17($$self, $$props, $$invalidate) { function deleteChoice(e) { return __awaiter(this, void 0, void 0, function* () { const choice = e.detail.choice; - const userConfirmed = yield GenericYesNoPrompt.Prompt(app, `Confirm deletion of choice`, `Please confirm that you wish to delete '${choice.name}'. + const userConfirmed = yield GenericYesNoPrompt.Prompt(app2, `Confirm deletion of choice`, `Please confirm that you wish to delete '${choice.name}'. ${choice.type === "Multi" /* Multi */ ? "Deleting this choice will delete all (" + choice.choices.length + ") choices inside it!" : ""} `); if (userConfirmed) { @@ -36644,7 +37161,7 @@ function instance17($$self, $$props, $$invalidate) { let updatedChoice; if (oldChoice.type === "Multi" /* Multi */) { updatedChoice = oldChoice; - const name = yield GenericInputPrompt.Prompt(app, `Rename ${oldChoice.name}`, "", oldChoice.name); + const name = yield GenericInputPrompt.Prompt(app2, `Rename ${oldChoice.name}`, "", oldChoice.name); if (!name) return; updatedChoice.name = name; @@ -36681,11 +37198,11 @@ function instance17($$self, $$props, $$invalidate) { function getChoiceBuilder(choice) { switch (choice.type) { case "Template" /* Template */: - return new TemplateChoiceBuilder(app, choice, plugin); + return new TemplateChoiceBuilder(app2, choice, plugin); case "Capture" /* Capture */: - return new CaptureChoiceBuilder(app, choice, plugin); + return new CaptureChoiceBuilder(app2, choice, plugin); case "Macro" /* Macro */: - return new MacroChoiceBuilder(app, choice, macros); + return new MacroChoiceBuilder(app2, choice, macros); case "Multi" /* Multi */: default: break; @@ -36693,7 +37210,7 @@ function instance17($$self, $$props, $$invalidate) { } function openMacroManager() { return __awaiter(this, void 0, void 0, function* () { - const newMacros = yield new MacrosManager(app, plugin, macros, choices).waitForClose; + const newMacros = yield new MacrosManager(app2, plugin, macros, choices).waitForClose; if (newMacros) { saveMacros(newMacros); $$invalidate(7, macros = newMacros); @@ -36715,7 +37232,7 @@ function instance17($$self, $$props, $$invalidate) { if ("saveMacros" in $$props2) $$invalidate(8, saveMacros = $$props2.saveMacros); if ("app" in $$props2) - $$invalidate(9, app = $$props2.app); + $$invalidate(9, app2 = $$props2.app); if ("plugin" in $$props2) $$invalidate(10, plugin = $$props2.plugin); }; @@ -36729,7 +37246,7 @@ function instance17($$self, $$props, $$invalidate) { openMacroManager, macros, saveMacros, - app, + app2, plugin, choicelist_choices_binding, reorderChoices_handler @@ -36766,8 +37283,8 @@ var DEFAULT_SETTINGS = { devMode: false }; var QuickAddSettingsTab = class extends import_obsidian25.PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); + constructor(app2, plugin) { + super(app2, plugin); this.plugin = plugin; } display() { @@ -36775,7 +37292,9 @@ var QuickAddSettingsTab = class extends import_obsidian25.PluginSettingTab { containerEl.empty(); containerEl.createEl("h2", { text: "QuickAdd Settings" }); this.addChoicesSetting(); - new import_obsidian25.Setting(this.containerEl).setName("Use Multi-line Input Prompt").setDesc("Use multi-line input prompt instead of single-line input prompt").addToggle( + new import_obsidian25.Setting(this.containerEl).setName("Use Multi-line Input Prompt").setDesc( + "Use multi-line input prompt instead of single-line input prompt" + ).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inputPrompt === "multi-line").setTooltip("Use multi-line input prompt").onChange((value) => { if (value) { this.plugin.settings.inputPrompt = "multi-line"; @@ -36871,8 +37390,8 @@ var GuiLogger = class extends QuickAddLogger { // src/engine/StartupMacroEngine.ts var StartupMacroEngine = class extends MacroChoiceEngine { - constructor(app, plugin, macros, choiceExecutor) { - super(app, plugin, null, macros, choiceExecutor, null); + constructor(app2, plugin, macros, choiceExecutor) { + super(app2, plugin, null, macros, choiceExecutor, null); } async run() { this.macros.forEach((macro) => { @@ -36886,8 +37405,8 @@ var StartupMacroEngine = class extends MacroChoiceEngine { // src/engine/TemplateChoiceEngine.ts var import_obsidian27 = require("obsidian"); var TemplateChoiceEngine = class extends TemplateEngine { - constructor(app, plugin, choice, choiceExecutor) { - super(app, plugin, choiceExecutor); + constructor(app2, plugin, choice, choiceExecutor) { + super(app2, plugin, choiceExecutor); this.choice = choice; } async run() { @@ -36897,9 +37416,17 @@ var TemplateChoiceEngine = class extends TemplateEngine { } let filePath; if (this.choice.fileNameFormat.enabled) { - filePath = await this.getFormattedFilePath(folderPath, this.choice.fileNameFormat.format, this.choice.name); + filePath = await this.getFormattedFilePath( + folderPath, + this.choice.fileNameFormat.format, + this.choice.name + ); } else { - filePath = await this.getFormattedFilePath(folderPath, VALUE_SYNTAX, this.choice.name); + filePath = await this.getFormattedFilePath( + folderPath, + VALUE_SYNTAX, + this.choice.name + ); } if (this.choice.incrementFileName) filePath = await this.incrementFileName(filePath); @@ -36907,20 +37434,37 @@ var TemplateChoiceEngine = class extends TemplateEngine { if (await this.app.vault.adapter.exists(filePath)) { const file = this.app.vault.getAbstractFileByPath(filePath); if (!(file instanceof import_obsidian27.TFile) || file.extension !== "md") { - log.logError(`'${filePath}' already exists and is not a valid markdown file.`); + log.logError( + `'${filePath}' already exists and is not a valid markdown file.` + ); return; } await this.app.workspace.getLeaf("tab").openFile(file); - const userChoice = await GenericSuggester.Suggest(this.app, fileExistsChoices, fileExistsChoices); + const userChoice = await GenericSuggester.Suggest( + this.app, + fileExistsChoices, + fileExistsChoices + ); switch (userChoice) { case fileExistsAppendToTop: - createdFile = await this.appendToFileWithTemplate(file, this.choice.templatePath, "top"); + createdFile = await this.appendToFileWithTemplate( + file, + this.choice.templatePath, + "top" + ); break; case fileExistsAppendToBottom: - createdFile = await this.appendToFileWithTemplate(file, this.choice.templatePath, "bottom"); + createdFile = await this.appendToFileWithTemplate( + file, + this.choice.templatePath, + "bottom" + ); break; case fileExistsOverwriteFile: - createdFile = await this.overwriteFileWithTemplate(file, this.choice.templatePath); + createdFile = await this.overwriteFileWithTemplate( + file, + this.choice.templatePath + ); break; case fileExistsDoNothing: default: @@ -36928,14 +37472,20 @@ var TemplateChoiceEngine = class extends TemplateEngine { return; } } else { - createdFile = await this.createFileWithTemplate(filePath, this.choice.templatePath); + createdFile = await this.createFileWithTemplate( + filePath, + this.choice.templatePath + ); if (!createdFile) { log.logWarning(`Could not create file '${filePath}'.`); return; } } if (this.choice.appendLink) { - appendToCurrentLine(this.app.fileManager.generateMarkdownLink(createdFile, ""), this.app); + appendToCurrentLine( + this.app.fileManager.generateMarkdownLink(createdFile, ""), + this.app + ); } if (this.choice.openFile) { await openFile(this.app, createdFile, { @@ -36947,22 +37497,30 @@ var TemplateChoiceEngine = class extends TemplateEngine { } } async formatFolderPaths(folders) { - const folderPaths = await Promise.all(folders.map(async (folder) => { - return await this.formatter.formatFolderPath(folder); - })); + const folderPaths = await Promise.all( + folders.map(async (folder) => { + return await this.formatter.formatFolderPath(folder); + }) + ); return folderPaths; } async getFolderPath() { var _a, _b; - let folders = await this.formatFolderPaths([...this.choice.folder.folders]); + let folders = await this.formatFolderPaths([ + ...this.choice.folder.folders + ]); if ((_a = this.choice.folder) == null ? void 0 : _a.chooseWhenCreatingNote) { - const allFoldersInVault = getAllFolderPathsInVault(this.app); + const allFoldersInVault = getAllFolderPathsInVault( + this.app + ); return await this.getOrCreateFolder(allFoldersInVault); } if ((_b = this.choice.folder) == null ? void 0 : _b.createInSameFolderAsActiveFile) { const activeFile = this.app.workspace.getActiveFile(); if (!activeFile) { - log.logWarning("No active file. Cannot create file in same folder as active file. Creating in root folder."); + log.logWarning( + "No active file. Cannot create file in same folder as active file. Creating in root folder." + ); return ""; } return this.getOrCreateFolder([activeFile.parent.path]); @@ -36973,8 +37531,8 @@ var TemplateChoiceEngine = class extends TemplateEngine { // src/formatters/captureChoiceFormatter.ts var CaptureChoiceFormatter = class extends CompleteFormatter { - constructor(app, plugin, choiceExecutor) { - super(app, plugin, choiceExecutor); + constructor(app2, plugin, choiceExecutor) { + super(app2, plugin, choiceExecutor); this.file = null; this.fileContent = ""; } @@ -36985,7 +37543,11 @@ var CaptureChoiceFormatter = class extends CompleteFormatter { if (!choice || !file || fileContent === null) return input; const formatted = await this.formatFileContent(input); - const templaterFormatted = templaterParseTemplate(this.app, formatted, this.file); + const templaterFormatted = templaterParseTemplate( + this.app, + formatted, + this.file + ); if (!templaterFormatted) return formatted; return templaterFormatted; @@ -37012,14 +37574,24 @@ var CaptureChoiceFormatter = class extends CompleteFormatter { const frontmatterEndPosition = this.file ? await this.getFrontmatterEndPosition(this.file) : null; if (!frontmatterEndPosition) return `${formatted}${this.fileContent}`; - return this.insertTextAfterPositionInBody(formatted, this.fileContent, frontmatterEndPosition); + return this.insertTextAfterPositionInBody( + formatted, + this.fileContent, + frontmatterEndPosition + ); } async insertAfterHandler(formatted) { var _a, _b; - const targetString = await this.format(this.choice.insertAfter.after); - const targetRegex = new RegExp(`s*${escapeRegExp(targetString.replace("\\n", ""))}s*`); + const targetString = await this.format( + this.choice.insertAfter.after + ); + const targetRegex = new RegExp( + `s*${escapeRegExp(targetString.replace("\\n", ""))}s*` + ); let fileContentLines = getLinesInString(this.fileContent); - const targetPosition = fileContentLines.findIndex((line) => targetRegex.test(line)); + const targetPosition = fileContentLines.findIndex( + (line) => targetRegex.test(line) + ); const targetNotFound = targetPosition === -1; if (targetNotFound) { if ((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFound) { @@ -37033,7 +37605,9 @@ var CaptureChoiceFormatter = class extends CompleteFormatter { if (foundNextHeader) { let endOfSectionIndex; for (let i = nextHeaderPositionAfterTargetPosition + targetPosition; i > targetPosition; i--) { - const lineIsNewline = /^[\s\n ]*$/.test(fileContentLines[i]); + const lineIsNewline = /^[\s\n ]*$/.test( + fileContentLines[i] + ); if (!lineIsNewline) { endOfSectionIndex = i; break; @@ -37041,21 +37615,39 @@ var CaptureChoiceFormatter = class extends CompleteFormatter { } if (!endOfSectionIndex) endOfSectionIndex = targetPosition; - return this.insertTextAfterPositionInBody(formatted, this.fileContent, endOfSectionIndex); + return this.insertTextAfterPositionInBody( + formatted, + this.fileContent, + endOfSectionIndex + ); } else { - return this.insertTextAfterPositionInBody(formatted, this.fileContent, fileContentLines.length - 1); + return this.insertTextAfterPositionInBody( + formatted, + this.fileContent, + fileContentLines.length - 1 + ); } } - return this.insertTextAfterPositionInBody(formatted, this.fileContent, targetPosition); + return this.insertTextAfterPositionInBody( + formatted, + this.fileContent, + targetPosition + ); } async createInsertAfterIfNotFound(formatted) { var _a, _b; - const insertAfterLine = this.replaceLinebreakInString(await this.format(this.choice.insertAfter.after)); + const insertAfterLine = this.replaceLinebreakInString( + await this.format(this.choice.insertAfter.after) + ); const insertAfterLineAndFormatted = `${insertAfterLine} ${formatted}`; if (((_a = this.choice.insertAfter) == null ? void 0 : _a.createIfNotFoundLocation) === CREATE_IF_NOT_FOUND_TOP) { const frontmatterEndPosition = this.file ? await this.getFrontmatterEndPosition(this.file) : -1; - return this.insertTextAfterPositionInBody(insertAfterLineAndFormatted, this.fileContent, frontmatterEndPosition); + return this.insertTextAfterPositionInBody( + insertAfterLineAndFormatted, + this.fileContent, + frontmatterEndPosition + ); } if (((_b = this.choice.insertAfter) == null ? void 0 : _b.createIfNotFoundLocation) === CREATE_IF_NOT_FOUND_BOTTOM) { return `${this.fileContent} @@ -37087,12 +37679,16 @@ ${text2}${post}`; // src/engine/CaptureChoiceEngine.ts var CaptureChoiceEngine = class extends QuickAddChoiceEngine { - constructor(app, plugin, choice, choiceExecutor) { - super(app); + constructor(app2, plugin, choice, choiceExecutor) { + super(app2); this.choiceExecutor = choiceExecutor; this.choice = choice; this.plugin = plugin; - this.formatter = new CaptureChoiceFormatter(app, plugin, choiceExecutor); + this.formatter = new CaptureChoiceFormatter( + app2, + plugin, + choiceExecutor + ); } async run() { var _a, _b, _c, _d; @@ -37114,12 +37710,17 @@ var CaptureChoiceEngine = class extends QuickAddChoiceEngine { } else if ((_c = (_b = this.choice) == null ? void 0 : _b.createFileIfItDoesntExist) == null ? void 0 : _c.enabled) { getFileAndAddContentFn = this.onCreateFileIfItDoesntExist; } else { - log.logWarning(`The file ${filePath} does not exist and "Create file if it doesn't exist" is disabled.`); + log.logWarning( + `The file ${filePath} does not exist and "Create file if it doesn't exist" is disabled.` + ); return; } const { file, content: newFileContent } = await getFileAndAddContentFn.bind(this)(filePath, content); if (this.choice.appendLink) { - const markdownLink = this.app.fileManager.generateMarkdownLink(file, ""); + const markdownLink = this.app.fileManager.generateMarkdownLink( + file, + "" + ); appendToCurrentLine(markdownLink, this.app); } if ((_d = this.choice) == null ? void 0 : _d.openFile) { @@ -37151,7 +37752,12 @@ var CaptureChoiceEngine = class extends QuickAddChoiceEngine { if (!file) throw new Error("File not found"); const fileContent = await this.app.vault.read(file); - const newFileContent = await this.formatter.formatContentWithFile(content, this.choice, fileContent, file); + const newFileContent = await this.formatter.formatContentWithFile( + content, + this.choice, + fileContent, + file + ); return { file, content: newFileContent }; } async onCreateFileIfItDoesntExist(filePath, content) { @@ -37165,9 +37771,14 @@ var CaptureChoiceEngine = class extends QuickAddChoiceEngine { ); fileContent = await singleTemplateEngine.run(); } - const file = await this.createFileWithInput(filePath, fileContent); + const file = await this.createFileWithInput( + filePath, + fileContent + ); await replaceTemplaterTemplatesInCreatedFile(this.app, file); - const updatedFileContent = await this.app.vault.cachedRead(file); + const updatedFileContent = await this.app.vault.cachedRead( + file + ); const newFileContent = await this.formatter.formatContentWithFile( content, this.choice, @@ -37177,7 +37788,10 @@ var CaptureChoiceEngine = class extends QuickAddChoiceEngine { return { file, content: newFileContent }; } async getFilePath(captureTo) { - const formattedCaptureTo = await this.formatter.formatFileName(captureTo, this.choice.name); + const formattedCaptureTo = await this.formatter.formatFileName( + captureTo, + this.choice.name + ); return this.formatFilePath("", formattedCaptureTo); } async captureToActiveFile() { @@ -37189,12 +37803,18 @@ var CaptureChoiceEngine = class extends QuickAddChoiceEngine { let content = await this.getCaptureContent(); content = await this.formatter.formatContent(content, this.choice); if (this.choice.format.enabled) { - content = await templaterParseTemplate(this.app, content, activeFile); + content = await templaterParseTemplate( + this.app, + content, + activeFile + ); } if (!content) return; if (this.choice.prepend) { - const fileContent = await this.app.vault.cachedRead(activeFile); + const fileContent = await this.app.vault.cachedRead( + activeFile + ); const newFileContent = `${fileContent}${content}`; await this.app.vault.modify(activeFile, newFileContent); } else { @@ -37210,7 +37830,10 @@ var ChoiceSuggester = class extends import_obsidian28.FuzzySuggestModal { super(plugin.app); this.plugin = plugin; this.choices = choices; - this.choiceExecutor = new ChoiceExecutor(this.app, this.plugin); + this.choiceExecutor = new ChoiceExecutor( + this.app, + this.plugin + ); if (choiceExecutor) this.choiceExecutor = choiceExecutor; } @@ -37239,8 +37862,8 @@ var ChoiceSuggester = class extends import_obsidian28.FuzzySuggestModal { // src/choiceExecutor.ts var ChoiceExecutor = class { - constructor(app, plugin) { - this.app = app; + constructor(app2, plugin) { + this.app = app2; this.plugin = plugin; this.variables = /* @__PURE__ */ new Map(); } @@ -37268,20 +37891,41 @@ var ChoiceExecutor = class { } async onChooseTemplateType(templateChoice) { if (!templateChoice.templatePath) { - log.logError(`please provide a template path for ${templateChoice.name}`); + log.logError( + `please provide a template path for ${templateChoice.name}` + ); return; } - await new TemplateChoiceEngine(this.app, this.plugin, templateChoice, this).run(); + await new TemplateChoiceEngine( + this.app, + this.plugin, + templateChoice, + this + ).run(); } async onChooseCaptureType(captureChoice) { if (!captureChoice.captureTo && !(captureChoice == null ? void 0 : captureChoice.captureToActiveFile)) { - log.logError(`please provide a capture path for ${captureChoice.name}`); + log.logError( + `please provide a capture path for ${captureChoice.name}` + ); return; } - await new CaptureChoiceEngine(this.app, this.plugin, captureChoice, this).run(); + await new CaptureChoiceEngine( + this.app, + this.plugin, + captureChoice, + this + ).run(); } async onChooseMacroType(macroChoice) { - const macroEngine = await new MacroChoiceEngine(this.app, this.plugin, macroChoice, this.plugin.settings.macros, this, this.variables); + const macroEngine = await new MacroChoiceEngine( + this.app, + this.plugin, + macroChoice, + this.plugin.settings.macros, + this, + this.variables + ); await macroEngine.run(); Object.entries(macroEngine.params.variables).forEach(([key, value]) => { this.variables.set(key, value); @@ -37305,8 +37949,8 @@ var AppContext = React.createContext(void 0); // src/gui/ReactView.tsx function ReactView({}) { - const app = React2.useContext(AppContext); - const currentFile = app.workspace.getActiveFile(); + const app2 = React2.useContext(AppContext); + const currentFile = app2.workspace.getActiveFile(); return /* @__PURE__ */ React2.createElement("div", null, currentFile == null ? void 0 : currentFile.name); } var ReactView_default = ReactView; @@ -37342,6 +37986,9 @@ var ReactExampleView_default = ReactExampleView; // src/main.ts var QuickAdd = class extends import_obsidian30.Plugin { + get api() { + return QuickAddApi.GetApi(app, this, new ChoiceExecutor(app, this)); + } async onload() { console.log("Loading QuickAdd"); QuickAdd.instance = this; @@ -37373,7 +38020,9 @@ var QuickAdd = class extends import_obsidian30.Plugin { } console.log(`Test QuickAdd (dev)`); const fn2 = async () => { - const activeView = await this.app.workspace.getActiveViewOfType(import_obsidian30.MarkdownView); + const activeView = await this.app.workspace.getActiveViewOfType( + import_obsidian30.MarkdownView + ); if (!activeView) return false; const x = this.app.workspace.getLeaf("tab"); @@ -37382,10 +38031,20 @@ var QuickAdd = class extends import_obsidian30.Plugin { fn2(); } }); - this.registerView("react-example", (leaf) => new ReactExampleView_default(leaf)); + this.registerView( + "react-example", + (leaf) => new ReactExampleView_default(leaf) + ); log.register(new ConsoleErrorLogger()).register(new GuiLogger(this)); this.addSettingTab(new QuickAddSettingsTab(this.app, this)); - this.app.workspace.onLayoutReady(() => new StartupMacroEngine(this.app, this, this.settings.macros, new ChoiceExecutor(this.app, this)).run()); + this.app.workspace.onLayoutReady( + () => new StartupMacroEngine( + this.app, + this, + this.settings.macros, + new ChoiceExecutor(this.app, this) + ).run() + ); this.addCommandsForChoices(this.settings.choices); await this.convertMacroChoicesMacroToId(); } @@ -37394,7 +38053,11 @@ var QuickAdd = class extends import_obsidian30.Plugin { this.app.workspace.detachLeavesOfType("react-example"); } async loadSettings() { - this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + this.settings = Object.assign( + {}, + DEFAULT_SETTINGS, + await this.loadData() + ); } async saveSettings() { await this.saveData(this.settings); @@ -37442,7 +38105,9 @@ var QuickAdd = class extends import_obsidian30.Plugin { function convertMacroChoiceMacroToIdHelper(choice) { if (choice.type === "Multi" /* Multi */) { let multiChoice = choice; - const multiChoices = multiChoice.choices.map(convertMacroChoiceMacroToIdHelper); + const multiChoices = multiChoice.choices.map( + convertMacroChoiceMacroToIdHelper + ); multiChoice = { ...multiChoice, choices: multiChoices }; return multiChoice; } @@ -37455,7 +38120,9 @@ var QuickAdd = class extends import_obsidian30.Plugin { } return macroChoice; } - this.settings.choices = this.settings.choices.map(convertMacroChoiceMacroToIdHelper); + this.settings.choices = this.settings.choices.map( + convertMacroChoiceMacroToIdHelper + ); await this.saveSettings(); } }; diff --git a/.obsidian/plugins/quickadd/manifest.json b/.obsidian/plugins/quickadd/manifest.json index 015ff70..f475878 100644 --- a/.obsidian/plugins/quickadd/manifest.json +++ b/.obsidian/plugins/quickadd/manifest.json @@ -1,10 +1 @@ -{ - "id": "quickadd", - "name": "QuickAdd", - "version": "0.7.0", - "minAppVersion": "0.13.19", - "description": "Quickly add new pages or content to your vault.", - "author": "Christian B. B. Houmann", - "authorUrl": "https://bagerbach.com", - "isDesktopOnly": false -} \ No newline at end of file +{"id":"quickadd","name":"QuickAdd","version":"0.8.0","minAppVersion":"0.13.19","description":"Quickly add new pages or content to your vault.","author":"Christian B. B. Houmann","authorUrl":"https://bagerbach.com","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json index 60a6520..76e5dbf 100644 --- a/.obsidian/plugins/recent-files-obsidian/data.json +++ b/.obsidian/plugins/recent-files-obsidian/data.json @@ -1,8 +1,80 @@ { "recentFiles": [ + { + "basename": "Resources", + "path": "_PARA/Projects/Test Project/Resources.md" + }, + { + "basename": "Test Project", + "path": "_PARA/Projects/Test Project/Test Project.md" + }, + { + "basename": "202212090136", + "path": "202212090136.md" + }, + { + "basename": "202212122239", + "path": "202212122239.md" + }, { "basename": "202212120002", "path": "202212120002.md" + }, + { + "basename": "202212090137", + "path": "202212090137.md" + }, + { + "basename": "README", + "path": "README.md" + }, + { + "basename": "2022-12-12", + "path": "Daily/2022-12-12.md" + }, + { + "basename": "Kanban", + "path": "_PARA/Projects/Test Project/Kanban.md" + }, + { + "basename": "Computer Capture", + "path": "Inbox/Computer Capture/Computer Capture.md" + }, + { + "basename": "Tasks", + "path": "Computed/Tasks.md" + }, + { + "basename": "Kanban", + "path": "_PARA/Projects/Test Project 2/Kanban.md" + }, + { + "basename": "2022-12-11--11-59-30", + "path": "Inbox/Smartphone Capture/2022-12-11--11-59-30.md" + }, + { + "basename": "Computed", + "path": "Computed/Computed.md" + }, + { + "basename": "2022-12-11--12-00-00", + "path": "Inbox/Computer Capture/2022-12-11--12-00-00.md" + }, + { + "basename": "2022-12-11", + "path": "Daily/2022-12-11.md" + }, + { + "basename": "Daily", + "path": "Templates/Daily.md" + }, + { + "basename": "CRM", + "path": "Private/CRM/CRM.md" + }, + { + "basename": "People", + "path": "Templates/People.md" } ], "omittedPaths": [], diff --git a/.obsidian/plugins/waypoint/main.js b/.obsidian/plugins/waypoint/main.js index 242950c..390ba4a 100644 --- a/.obsidian/plugins/waypoint/main.js +++ b/.obsidian/plugins/waypoint/main.js @@ -61,6 +61,7 @@ var DEFAULT_SETTINGS = { waypointFlag: "%% Waypoint %%", stopScanAtFolderNotes: false, showFolderNotes: false, + showNonMarkdownFiles: false, debugLogging: false, useWikiLinks: true, showEnclosingNote: false, @@ -223,12 +224,19 @@ ${_Waypoint.END_WAYPOINT}`; return __async(this, null, function* () { const bullet = " ".repeat(indentLevel) + "-"; if (node instanceof import_obsidian.TFile) { - if (node.path.endsWith(".md")) { + console.log(node); + if (node.extension == "md") { if (this.settings.useWikiLinks) { return `${bullet} [[${node.basename}]]`; } else { return `${bullet} [${node.basename}](${this.getEncodedUri(rootNode, node)})`; } + } else if (this.settings.showNonMarkdownFiles) { + if (this.settings.useWikiLinks) { + return `${bullet} [[${node.name}]]`; + } else { + return `${bullet} [${node.name}](${this.getEncodedUri(rootNode, node)})`; + } } return null; } else if (node instanceof import_obsidian.TFolder) { @@ -368,6 +376,10 @@ var WaypointSettingsTab = class extends import_obsidian.PluginSettingTab { this.plugin.settings.showFolderNotes = value; yield this.plugin.saveSettings(); }))); + new import_obsidian.Setting(containerEl).setName("Show Non-Markdown Files").setDesc("If enabled, non-Markdown files will be listed alongside other notes in the generated waypoints.").addToggle((toggle) => toggle.setValue(this.plugin.settings.showNonMarkdownFiles).onChange((value) => __async(this, null, function* () { + this.plugin.settings.showNonMarkdownFiles = value; + yield this.plugin.saveSettings(); + }))); new import_obsidian.Setting(containerEl).setName("Show Enclosing Note").setDesc("If enabled, the name of the folder note containing the waypoint will be listed at the top of the generated waypoints.").addToggle((toggle) => toggle.setValue(this.plugin.settings.showEnclosingNote).onChange((value) => __async(this, null, function* () { this.plugin.settings.showEnclosingNote = value; yield this.plugin.saveSettings(); diff --git a/.obsidian/plugins/waypoint/manifest.json b/.obsidian/plugins/waypoint/manifest.json index fdb16b9..6352b68 100644 --- a/.obsidian/plugins/waypoint/manifest.json +++ b/.obsidian/plugins/waypoint/manifest.json @@ -1,10 +1 @@ -{ - "id": "waypoint", - "name": "Waypoint", - "version": "1.3.0", - "minAppVersion": "0.12.0", - "description": "Easily generate dynamic content maps in your folder notes. Enables folders to show up in the graph view and removes the need for messy tags!", - "author": "Idrees Hassan", - "authorUrl": "https://idreesinc.com", - "isDesktopOnly": false -} \ No newline at end of file +{"id":"waypoint","name":"Waypoint","version":"1.4.0","minAppVersion":"0.12.0","description":"Easily generate dynamic content maps in your folder notes. Enables folders to show up in the graph view and removes the need for messy tags!","author":"Idrees Hassan","authorUrl":"https://idreesinc.com","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/waypoint/styles.css b/.obsidian/plugins/waypoint/styles.css new file mode 100644 index 0000000..e69de29 diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index f5ea9bb..d76056f 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -8,12 +8,12 @@ "type": "tabs", "children": [ { - "id": "4b2d9504cca5ea7f", + "id": "382c94a56533417c", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "202212120002.md", + "file": "_PARA/Projects/Test Project/Resources.md", "mode": "source", "source": false } @@ -102,7 +102,7 @@ "state": { "type": "backlink", "state": { - "file": "202212120002.md", + "file": "_PARA/Projects/Test Project/Resources.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -119,7 +119,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "202212120002.md", + "file": "_PARA/Projects/Test Project/Resources.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -142,7 +142,7 @@ "state": { "type": "outline", "state": { - "file": "202212120002.md" + "file": "_PARA/Projects/Test Project/Resources.md" } } }, @@ -183,17 +183,17 @@ "periodic-notes:Open today": false } }, - "active": "4b2d9504cca5ea7f", + "active": "382c94a56533417c", "lastOpenFiles": [ - "README.md", - "Templates/People.md", - "Templates/Quarterly.md", - "Templates/Weekly.md", + "_PARA/Projects/Test Project/Test Project.md", "202212090136.md", - "Templates/Daily.md", + "202212122239.md", "202212120002.md", "202212090137.md", + "README.md", "Daily/2022-12-12.md", - "_tutorial/Hotkeys.md" + "_PARA/Projects/Test Project/Kanban.md", + "Private/Attachments/Pasted image 20221212222709.png", + "Inbox/Computer Capture/Computer Capture.md" ] } \ No newline at end of file diff --git a/202212122239.md b/202212122239.md new file mode 100644 index 0000000..ef9ead8 --- /dev/null +++ b/202212122239.md @@ -0,0 +1,19 @@ +--- +projects: [] +--- + +# Memes MOC + +> [!abstract]- Tags +> #zettel #moc + + +# Viral Memes + +## YouTube + +[[202212090137]] + +## Twitter + +[[202212090136]] \ No newline at end of file diff --git a/Computed/Computed.md b/Computed/Computed.md index 4a13ebd..c30e5ae 100644 --- a/Computed/Computed.md +++ b/Computed/Computed.md @@ -1,6 +1,7 @@ Dataview collections %% Begin Waypoint %% +- [[Tasks]] - [[Trackers]] %% End Waypoint %% \ No newline at end of file diff --git a/Computed/Tasks.md b/Computed/Tasks.md new file mode 100644 index 0000000..6e62da9 --- /dev/null +++ b/Computed/Tasks.md @@ -0,0 +1,20 @@ + +# Tasks in Daily Notes +```tasks +not done +heading includes todo/daily +``` + + +# Tasks in Inbox +```tasks +not done +path includes Inbox +``` + +# Tasks in Projects +```tasks +not done +path includes _PARA/Projects +heading includes To Do +``` \ No newline at end of file diff --git a/Daily/2022-12-11.md b/Daily/2022-12-11.md index 4e1fac7..9ef0adb 100644 --- a/Daily/2022-12-11.md +++ b/Daily/2022-12-11.md @@ -11,6 +11,10 @@ temperature: 75 Week: [[2022-W51]] +# Things I Need To Do + +## todo/daily +- [ ] this task was made on [[2022-12-11]] but it can be done whenever I guess! # Events That Happened Today diff --git a/Daily/2022-12-12.md b/Daily/2022-12-12.md index 9c00724..44d741a 100644 --- a/Daily/2022-12-12.md +++ b/Daily/2022-12-12.md @@ -1,3 +1,6 @@ + + + --- location: [48.8584, 2.2945] --- @@ -10,10 +13,18 @@ location: [48.8584, 2.2945] Week: [[2022-W51]] +# Things I Need To Do + +## todo/daily +- [ ] this needs to be done on the 12th!! + # Events That Happened Today +- Coachella WHOOOOO!! + # Thoughts I Had Today +![[seinfeld the art of seduction.png]] # Random Note Review diff --git a/Inbox/Computer Capture/2022-12-11--12-00-00.md b/Inbox/Computer Capture/2022-12-11--12-00-00.md index 5bfcf42..2d12736 100644 --- a/Inbox/Computer Capture/2022-12-11--12-00-00.md +++ b/Inbox/Computer Capture/2022-12-11--12-00-00.md @@ -1,3 +1,5 @@ Captured this absolute mad lad on my computer -![INSANE](https://media.giphy.com/media/sJWNLTclcvVmw/giphy.gif) \ No newline at end of file +![INSANE](https://media.giphy.com/media/sJWNLTclcvVmw/giphy.gif) + +- [ ] an open todo from my computer!! \ No newline at end of file diff --git a/Inbox/Smartphone Capture/2022-12-11--11-59-30.md b/Inbox/Smartphone Capture/2022-12-11--11-59-30.md index 05e2ec7..0112470 100644 --- a/Inbox/Smartphone Capture/2022-12-11--11-59-30.md +++ b/Inbox/Smartphone Capture/2022-12-11--11-59-30.md @@ -1,3 +1,5 @@ I am free from the shackes of my desk -![outside](https://media.giphy.com/media/597uiK69T07KHuJKGT/giphy.gif) \ No newline at end of file +![outside](https://media.giphy.com/media/597uiK69T07KHuJKGT/giphy.gif) + +- [ ] outside and remembered I need to do this! \ No newline at end of file diff --git a/Private/Attachments/seinfeld the art of seduction.png b/Private/Attachments/seinfeld the art of seduction.png new file mode 100644 index 0000000..d0382ba Binary files /dev/null and b/Private/Attachments/seinfeld the art of seduction.png differ diff --git a/README.md b/README.md index 845b611..7372a2e 100644 --- a/README.md +++ b/README.md @@ -349,7 +349,20 @@ Plugins: ## Content management systems -`todo` +Posting content on the internet has become a very normalized thing to do -- whether you post on your own domain or a large website like Twitter. Sharing coherent and well structured thought is becoming a necessary skill. Fortunately for us, we have a whole databank of really good thoughts to pull from! With structured data sourcing from PARA and "unstructured" data emerging from our Zettelkasten, creating long form content is more about stitching together existing raw material than creating from scratch. + +A **content management system** makes the process of posting easier taking care of boilerplate, formatting, serving to readers, etc. The most popular example is Wordpress, though many tools like Ghost/Substack serve similar roles these days. + +Obsidian can also be used as a full e2e CMS. I know because I built one into Obsidian! The plugins required to make a full CMS are outside the scope of BHOV-2023, but if you'd like to see the code that powers my Obsidian backed CMS you can click [here](https://github.com/bramses/kaneki) and [here](https://github.com/bramses/kaneki-obsidian), or if you want a deep dive on the process of building a CMS into Obsidian, click [here](https://www.bramadams.dev/projects/how-to-kaneki). + +Plugins: +- Kanban + +Related philosophies: +- PARA +- Zettelkasten +- Deep Work + ## Antifragility @@ -363,7 +376,19 @@ In BHOV-2023, Antifragility means that as your vault evolves you shouldn't feel ## Version Control Systems -`todo` +*Version Control Systems* like Git and SVN are specialized programs that track in history what happened to a particular file. For example, click this link to see a secret sentence that used to live right here: -> [I BROKE THE DAM](https://www.youtube.com/watch?v=3aX8ZdgNVRY&ab_channel=SouthParkClips). <- + +These changes are particularly useful to software engineering teams who need to trace the history of a working block of code. For our case in BHOV-2023, Git is mainly used for two things: file versioning and light publishing capability. + +Git very easily can monitor the **state** of the vault at any period of time, creating a snapshot of connections, notes, and plugins at a given moment in time. This means that we can update our files without fear that we'll delete something important. + +Git(Hub) also serves as a light publishing tool because you can have a public repository and GitHub has a Markdown renderer which means that when people visit files they will render in Markdown -- [example](https://github.com/bramses/bramses-highly-opinionated-vault-2023/blob/main/Readwise/Articles%20Test/The%20Ancient%20Japanese%20Technique%20That%20Produces%20Lumber%20Without%20Cutting%20Trees.md). + +Plugins: +- Obsidian Git + +External Software: +- GitHub ## Causa Sui @@ -376,7 +401,17 @@ Related Philosophies: ## Linking Your Thinking -`todo` +**Linking your Thinking** by Nick Milo is the concept of using emergence to discover relationships between your notes. + +I think of MoCs as directionally flexible Table of Contents. You can gather togther a case from across your notes and link them in one space. + +Automatically, Folder Notes include the Waypoint plugin which will keep a live version of all children in a folder. This is great for Parent level folders like `Projects` and `Archive`. + +Manually, you may also look to create your own Maps of Content (MOCs) from a particular tag, or create a Zettelkasten note that is a map of other Zettelkasten Notes. Meta! + +Plugins: +- Luhmann +- Note Refactor # Implementation @@ -421,6 +456,7 @@ month: `todo` + ## Folder Structure The following is the folder structure used by BHOV-2023, along with short descriptions as to why each exists. @@ -436,8 +472,9 @@ The following is the folder structure used by BHOV-2023, along with short descri - Hotkeys - Attachments - Attachments -- Computed - - Trackers +- Computed (*dataviews of information computed across your vault*) + - Trackers (*trackers like habit trackers, reminders etc*) + - Tasks (*open tasks found using - \[ \] all across the vault*) - Daily - Weekly - Quarterly @@ -446,7 +483,7 @@ The following is the folder structure used by BHOV-2023, along with short descri - Smartphone Capture - Private - CRM - - Attachments + - Attachments (*images will automatically be placed into this folder*) - Readwise - Templates - Canvases @@ -458,6 +495,10 @@ The following is the folder structure used by BHOV-2023, along with short descri ## CRM +Another private but universal trait of humans is our relationships to others. Knowing this BHOV-2023 includes a private CRM (`Private/CRM/CRM`) that can help keep track of the important people in your life. + +I use my CRM to keep track of important days like birthdays as well as items discussed (adult relationships can go months without speaking). + # Tips and Tricks `todo` @@ -484,10 +525,6 @@ The following is the folder structure used by BHOV-2023, along with short descri `todo` -## Shortcuts - -`todo` - ## Zotero `todo` @@ -508,7 +545,7 @@ The following is the folder structure used by BHOV-2023, along with short descri `todo` -## Mobile Integration +## Mobile Integration (General) `todo` @@ -520,6 +557,7 @@ Great! Now that that's out of the way, we can finally get to running the vault, 1. Select `Use this Template` **or** `git clone https://github.com/bramses/bramses-highly-opinionated-vault-2023.git` 2. Download into your local machine 3. Open the vault and rename it to whatever you want and open it in Obsidian +4. Before you commit anything to GitHub, make sure you edit `.gitignore` to match what you want to publish. Doing this early will save you headaches down the road if you decide to publish (*part*) of your vault ## After You're Up and Running @@ -541,15 +579,17 @@ After getting your sea legs for a few days (perhaps a week!) and you feel comfor Truly nothing in this vault is *required*, but if you want the full experience, these community plugins are quote-unquote mandatory: +The following is a list of these plugins as well as a one sentence blurb of how I use them in BHOV-2023 and why they create the fabric of the system. + - Auto Link Title - Calendar - Commander - Dataview -- Excalidraw - Folder Note - Footnote Shortcut - Hotkeys for Templates - Kanban +- Luhmann - Natural Language Dates - Obsidian Git - Omnisearch @@ -570,11 +610,15 @@ Truly nothing in this vault is *required*, but if you want the full experience, These plugins aren't needed, as some are QoL and others have a steep price tag attached (some even have both!). But these apps are no less critical to my workflow than the "Required" apps above, so I need to include them. +The following is a list of these plugins as well as a one sentence blurb of how I use them in BHOV-2023 and why you may be interested. + - Open in VSCode - Map View +- Excalidraw - [Shimmering Obsidian](https://github.com/chrisgrieser/shimmering-obsidian) (Alfred plugin) - Full Calendar - New Tab Default Page +- Plugin Update Tracker - GPT-3 Summarizer - Obsidian Linter - Ozan's Image in Editor Plugin diff --git a/Templates/Daily.md b/Templates/Daily.md index 40c1eba..bdabbbe 100644 --- a/Templates/Daily.md +++ b/Templates/Daily.md @@ -10,11 +10,14 @@ location: [48.8584, 2.2945] Week: [[<% tp.date.now('yyyy') %>-W<% tp.date.now('ww') %>]] +# Things I Need To Do + +## todo/daily + # Events That Happened Today # Thoughts I Had Today - # Random Note Review <%* const files = app.vault.getFiles().filter(f => f.path.includes(".md")); const random = Math.floor(Math.random() * (files.length - 1)); const random2 = Math.floor(Math.random() * (files.length - 1)); const random3 = Math.floor(Math.random() * (files.length - 1)); const randomNote = files[random]; const randomNote2 = files[random2]; const randomNote3 = files[random3] -%> @@ -24,7 +27,7 @@ Week: [[<% tp.date.now('yyyy') %>-W<% tp.date.now('ww') %>]] <%* const todayIs = tp.date.now("YYYY-MM-DD") %> -# Capture Notes +# Capture Notes From Today ```dataview LIST FROM "Inbox" diff --git a/_PARA/Projects/Test Project 2/Kanban.md b/_PARA/Projects/Test Project 2/Kanban.md index 75df84a..3f0525a 100644 --- a/_PARA/Projects/Test Project 2/Kanban.md +++ b/_PARA/Projects/Test Project 2/Kanban.md @@ -6,6 +6,7 @@ kanban-plugin: basic ## To Do +- [ ] a task for test project 2! ## In Progress diff --git a/_PARA/Projects/Test Project/Kanban.md b/_PARA/Projects/Test Project/Kanban.md index 75df84a..b328708 100644 --- a/_PARA/Projects/Test Project/Kanban.md +++ b/_PARA/Projects/Test Project/Kanban.md @@ -6,6 +6,7 @@ kanban-plugin: basic ## To Do +- [ ] a task for test project! ## In Progress